From 41c0f0812fd02bf9db2c276c675549ce9685af8b Mon Sep 17 00:00:00 2001 From: Douglas Souders Date: Fri, 4 Nov 2016 16:12:16 -0400 Subject: [PATCH] release 10.1.0 from build 4449150 --- README.md | 21 +- ReleaseNotes.md | 47 +- open-vm-tools/ChangeLog | 2110 +- open-vm-tools/LICENSE | 151 +- open-vm-tools/Makefile.am | 16 +- open-vm-tools/Makefile.in | 735 - open-vm-tools/NEWS | 12 + open-vm-tools/aclocal.m4 | 902 - open-vm-tools/checkvm/Makefile.am | 2 +- open-vm-tools/checkvm/Makefile.in | 566 - open-vm-tools/checkvm/checkvm.c | 2 +- open-vm-tools/checkvm/checkvm_version.h | 2 +- .../Cpp/Communication/Makefile.am | 241 + .../src/AmqpInboundChannelAdapterInstance.cpp | 276 + .../src/AmqpInboundChannelAdapterInstance.h | 160 + .../src/AmqpOutboundEndpointInstance.cpp | 131 + .../src/AmqpOutboundEndpointInstance.h | 119 + .../amqpIntegration/src/BindingInstance.cpp | 54 + .../amqpIntegration/src/BindingInstance.h | 66 + .../src/CachingConnectionFactoryObj.cpp | 187 + .../src/CachingConnectionFactoryObj.h | 108 + .../amqpIntegration/src/ExchangeInstance.cpp | 117 + .../amqpIntegration/src/ExchangeInstance.h | 120 + .../src/IntegrationObjects.cpp | 100 + .../amqpIntegration/src/IntegrationObjects.h | 73 + .../amqpIntegration/src/QueueInstance.cpp | 102 + .../amqpIntegration/src/QueueInstance.h | 101 + .../src/RabbitAdminInstance.cpp | 235 + .../amqpIntegration/src/RabbitAdminInstance.h | 127 + .../src/RabbitTemplateInstance.cpp | 191 + .../src/RabbitTemplateInstance.h | 149 + .../src/SecureCachingConnectionFactoryObj.cpp | 204 + .../src/SecureCachingConnectionFactoryObj.h | 108 + .../amqpIntegration/src/amqpIntegration.cpp | 54 + .../src/amqpIntegrationDefines.h | 25 + .../Subsystems/amqpIntegration/src/stdafx.h | 51 + .../commIntegration/include/CCmsMessage.h | 233 + .../include/CCmsMessageAttachments.h | 106 + .../include/CMessageDeliveryRecord.h | 60 + .../include/CMessagePartDescriptor.h | 103 + .../CMessagePartDescriptorSourceRecord.h | 50 + .../include/CMessagePartRecord.h | 58 + .../include/CMessagePartsHeader.h | 91 + .../commIntegration/include/ReplyToResolver.h | 26 + .../commIntegration/src/CCmsMessage.cpp | 915 + .../src/CCmsMessageAttachments.cpp | 377 + .../src/CCmsMessageTransformer.cpp | 65 + .../src/CCmsMessageTransformer.h | 63 + .../src/CCmsMessageTransformerInstance.cpp | 153 + .../src/CCmsMessageTransformerInstance.h | 86 + .../commIntegration/src/CCmsMessageUtils.cpp | 361 + .../commIntegration/src/CCmsMessageUtils.h | 120 + .../src/CEventTopicCalculatorInstance.cpp | 92 + .../src/CEventTopicCalculatorInstance.h | 61 + .../src/CIncomingMessageHandler.cpp | 66 + .../src/CIncomingMessageHandler.h | 63 + .../src/CIncomingMessageHandlerInstance.cpp | 261 + .../src/CIncomingMessageHandlerInstance.h | 82 + .../src/CMessageDeliveryRecord.cpp | 85 + .../src/CMessagePartDescriptor.cpp | 172 + .../src/CMessagePartDescriptorCalculator.cpp | 218 + .../src/CMessagePartDescriptorCalculator.h | 39 + .../CMessagePartDescriptorSourceRecord.cpp | 65 + .../src/CMessagePartRecord.cpp | 93 + .../src/CMessagePartsBuilder.cpp | 114 + .../src/CMessagePartsBuilder.h | 37 + .../src/CMessagePartsHeader.cpp | 154 + .../src/CMessagePartsParser.cpp | 164 + .../commIntegration/src/CMessagePartsParser.h | 34 + .../src/COutgoingMessageHandler.cpp | 260 + .../src/COutgoingMessageHandler.h | 65 + .../src/CProtocolHeaderEnricher.cpp | 65 + .../src/CProtocolHeaderEnricher.h | 63 + .../src/CProtocolHeaderEnricherInstance.cpp | 108 + .../src/CProtocolHeaderEnricherInstance.h | 76 + .../commIntegration/src/CReplyToCacher.cpp | 66 + .../commIntegration/src/CReplyToCacher.h | 63 + .../src/CReplyToCacherInstance.cpp | 69 + .../src/CReplyToCacherInstance.h | 72 + .../src/CReplyToResolverInstance.cpp | 196 + .../src/CReplyToResolverInstance.h | 71 + .../commIntegration/src/commIntegration.cpp | 76 + .../src/commIntegrationDefines.h | 26 + .../Subsystems/commIntegration/src/stdafx.h | 22 + .../amqpCore/include/amqpClient/AMQChannel.h | 265 + .../include/amqpClient/AMQChannelManager.h | 95 + .../amqpCore/include/amqpClient/AMQCommand.h | 75 + .../include/amqpClient/AMQConnection.h | 141 + .../include/amqpClient/AmqpClientLink.h | 23 + .../amqpClient/BlockingRpcContinuation.h | 73 + .../include/amqpClient/CAmqpAuthMechanism.h | 45 + .../include/amqpClient/CAmqpChannel.h | 140 + .../include/amqpClient/CAmqpConnection.h | 254 + .../amqpCore/include/amqpClient/CAmqpFrame.h | 67 + .../include/amqpClient/CommandAssembler.h | 103 + .../amqpClient/ConnectionFactoryImpl.h | 96 + .../amqpClient/ConnectionWeakReference.h | 64 + .../include/amqpClient/ConsumerDispatcher.h | 208 + .../include/amqpClient/ConsumerWorkService.h | 55 + .../include/amqpClient/IConnectionInt.h | 56 + .../include/amqpClient/IRpcContinuation.h | 47 + .../amqpClient/TCopyOnWriteContainer.h | 73 + .../amqpClient/amqpImpl/BasicAckMethod.h | 52 + .../amqpClient/amqpImpl/BasicCancelMethod.h | 50 + .../amqpClient/amqpImpl/BasicConsumeMethod.h | 64 + .../amqpClient/amqpImpl/BasicGetMethod.h | 53 + .../amqpClient/amqpImpl/BasicProperties.h | 154 + .../amqpClient/amqpImpl/BasicPublishMethod.h | 67 + .../amqpClient/amqpImpl/BasicQosMethod.h | 57 + .../amqpClient/amqpImpl/BasicRecoverMethod.h | 52 + .../amqpClient/amqpImpl/BasicRejectMethod.h | 55 + .../amqpImpl/ChannelCloseOkMethod.h | 46 + .../amqpClient/amqpImpl/EnvelopeImpl.h | 58 + .../amqpImpl/ExchangeDeclareMethod.h | 61 + .../amqpImpl/ExchangeDeleteMethod.h | 53 + .../include/amqpClient/amqpImpl/FieldImpl.h | 40 + .../amqpClient/amqpImpl/GetResponseImpl.h | 66 + .../amqpClient/amqpImpl/IContentHeader.h | 41 + .../include/amqpClient/amqpImpl/IMethod.h | 40 + .../amqpClient/amqpImpl/IServerMethod.h | 44 + .../amqpClient/amqpImpl/QueueBindMethod.h | 59 + .../amqpClient/amqpImpl/QueueDeclareMethod.h | 88 + .../amqpClient/amqpImpl/QueueDeleteMethod.h | 56 + .../amqpClient/amqpImpl/QueuePurgeMethod.h | 52 + .../amqpClient/amqpImpl/QueueUnbindMethod.h | 61 + .../include/amqpClient/api/AMQExceptions.h | 122 + .../amqpCore/include/amqpClient/api/Address.h | 89 + .../amqpClient/api/AmqpContentHeaders.h | 201 + .../include/amqpClient/api/AmqpMethods.h | 299 + .../include/amqpClient/api/CertInfo.h | 49 + .../amqpCore/include/amqpClient/api/Channel.h | 441 + .../include/amqpClient/api/Connection.h | 53 + .../amqpClient/api/ConnectionFactory.h | 232 + .../include/amqpClient/api/Consumer.h | 81 + .../include/amqpClient/api/ContentHeader.h | 33 + .../include/amqpClient/api/Envelope.h | 43 + .../include/amqpClient/api/GetResponse.h | 44 + .../amqpCore/include/amqpClient/api/Method.h | 36 + .../include/amqpClient/api/ReturnListener.h | 53 + .../include/amqpClient/api/amqpClient.h | 286 + .../amqpCore/AbstractConnectionFactory.h | 140 + .../amqpCore/include/amqpCore/AmqpAdmin.h | 97 + .../include/amqpCore/AmqpHeaderMapper.h | 117 + .../amqpCore/AmqpMessageListenerSource.h | 56 + .../include/amqpCore/AmqpOutboundEndpoint.h | 169 + .../amqpCore/include/amqpCore/AmqpTemplate.h | 169 + .../amqpCore/include/amqpCore/Binding.h | 37 + .../amqpCore/include/amqpCore/BindingImpl.h | 48 + .../include/amqpCore/BindingInternal.h | 34 + .../include/amqpCore/BlockingQueueConsumer.h | 191 + .../amqpCore/CachingConnectionFactory.h | 269 + .../amqpCore/include/amqpCore/ChannelProxy.h | 33 + .../amqpCore/CompositeConnectionListener.h | 53 + .../amqpCore/include/amqpCore/Connection.h | 45 + .../include/amqpCore/ConnectionFactory.h | 93 + .../include/amqpCore/ConnectionListener.h | 40 + .../include/amqpCore/ConnectionProxy.h | 32 + .../amqpCore/DefaultAmqpHeaderMapper.h | 63 + .../amqpCore/include/amqpCore/Exchange.h | 56 + .../amqpCore/include/amqpCore/ExchangeImpl.h | 126 + .../include/amqpCore/ExchangeInternal.h | 35 + .../include/amqpCore/MessageListener.h | 27 + .../amqpCore/include/amqpCore/Queue.h | 49 + .../amqpCore/include/amqpCore/QueueImpl.h | 73 + .../amqpCore/include/amqpCore/QueueInternal.h | 34 + .../amqpCore/include/amqpCore/RabbitAdmin.h | 110 + .../include/amqpCore/RabbitTemplate.h | 168 + .../include/amqpCore/SimpleConnection.h | 47 + .../amqpCore/SimpleMessageListenerContainer.h | 165 + .../amqpCore/src/amqpClient/AMQChannel.cpp | 1249 + .../src/amqpClient/AMQChannelManager.cpp | 146 + .../amqpCore/src/amqpClient/AMQCommand.cpp | 54 + .../amqpCore/src/amqpClient/AMQConnection.cpp | 492 + .../amqpCore/src/amqpClient/AMQUtil.cpp | 304 + .../amqpCore/src/amqpClient/AMQUtil.h | 63 + .../amqpCore/src/amqpClient/Address.cpp | 128 + .../amqpCore/src/amqpClient/AmqpAuthPlain.cpp | 26 + .../amqpCore/src/amqpClient/AmqpAuthPlain.h | 31 + .../amqpCore/src/amqpClient/AmqpChannel.cpp | 51 + .../amqpCore/src/amqpClient/AmqpChannel.h | 47 + .../amqpCore/src/amqpClient/AmqpCommon.cpp | 275 + .../amqpCore/src/amqpClient/AmqpCommon.h | 93 + .../src/amqpClient/AmqpConnection.cpp | 129 + .../amqpCore/src/amqpClient/AmqpConnection.h | 114 + .../amqpCore/src/amqpClient/AmqpUtil.cpp | 203 + .../amqpCore/src/amqpClient/AmqpUtil.h | 120 + .../amqpClient/BlockingRpcContinuation.cpp | 58 + .../src/amqpClient/CAmqpAuthMechanism.cpp | 43 + .../amqpCore/src/amqpClient/CAmqpChannel.cpp | 253 + .../src/amqpClient/CAmqpConnection.cpp | 1059 + .../amqpCore/src/amqpClient/CAmqpFrame.cpp | 144 + .../amqpCore/src/amqpClient/CertInfo.cpp | 52 + .../src/amqpClient/CommandAssembler.cpp | 168 + .../src/amqpClient/ConnectionFactoryImpl.cpp | 214 + .../amqpClient/ConnectionWeakReference.cpp | 70 + .../src/amqpClient/ConsumerDispatcher.cpp | 341 + .../src/amqpClient/ConsumerWorkService.cpp | 49 + .../amqpCore/src/amqpClient/amqpClient.cpp | 34 + .../src/amqpClient/amqpImpl/AMQExceptions.cpp | 34 + .../src/amqpClient/amqpImpl/AMQPImpl.cpp | 93 + .../src/amqpClient/amqpImpl/AMQPImpl.h | 42 + .../amqpClient/amqpImpl/AmqpClientImpl.cpp | 181 + .../amqpImpl/AmqpContentHeadersImpl.cpp | 76 + .../amqpClient/amqpImpl/BasicAckMethod.cpp | 47 + .../amqpClient/amqpImpl/BasicCancelMethod.cpp | 41 + .../amqpImpl/BasicCancelOkMethod.cpp | 31 + .../amqpClient/amqpImpl/BasicCancelOkMethod.h | 47 + .../amqpImpl/BasicConsumeMethod.cpp | 61 + .../amqpImpl/BasicConsumeOkMethod.cpp | 31 + .../amqpImpl/BasicConsumeOkMethod.h | 47 + .../amqpImpl/BasicDeliverMethod.cpp | 53 + .../amqpClient/amqpImpl/BasicDeliverMethod.h | 55 + .../amqpImpl/BasicGetEmptyMethod.cpp | 24 + .../amqpClient/amqpImpl/BasicGetEmptyMethod.h | 45 + .../amqpClient/amqpImpl/BasicGetMethod.cpp | 44 + .../amqpClient/amqpImpl/BasicGetOkMethod.cpp | 54 + .../amqpClient/amqpImpl/BasicGetOkMethod.h | 57 + .../amqpClient/amqpImpl/BasicProperties.cpp | 488 + .../amqpImpl/BasicPublishMethod.cpp | 98 + .../amqpClient/amqpImpl/BasicQosMethod.cpp | 51 + .../amqpClient/amqpImpl/BasicQosOkMethod.cpp | 24 + .../amqpClient/amqpImpl/BasicQosOkMethod.h | 45 + .../amqpImpl/BasicRecoverMethod.cpp | 43 + .../amqpImpl/BasicRecoverOkMethod.cpp | 24 + .../amqpImpl/BasicRecoverOkMethod.h | 45 + .../amqpClient/amqpImpl/BasicRejectMethod.cpp | 47 + .../amqpClient/amqpImpl/BasicReturnMethod.cpp | 47 + .../amqpClient/amqpImpl/BasicReturnMethod.h | 53 + .../amqpImpl/ChannelCloseMethod.cpp | 49 + .../amqpClient/amqpImpl/ChannelCloseMethod.h | 53 + .../ChannelCloseOkFromServerMethod.cpp | 24 + .../amqpImpl/ChannelCloseOkFromServerMethod.h | 44 + .../amqpImpl/ChannelCloseOkMethod.cpp | 38 + .../amqpImpl/ChannelOpenOkMethod.cpp | 36 + .../amqpClient/amqpImpl/ChannelOpenOkMethod.h | 49 + .../src/amqpClient/amqpImpl/EnvelopeImpl.cpp | 57 + .../amqpImpl/ExchangeDeclareMethod.cpp | 58 + .../amqpImpl/ExchangeDeclareOkMethod.cpp | 24 + .../amqpImpl/ExchangeDeclareOkMethod.h | 45 + .../amqpImpl/ExchangeDeleteMethod.cpp | 47 + .../amqpImpl/ExchangeDeleteOkMethod.cpp | 24 + .../amqpImpl/ExchangeDeleteOkMethod.h | 45 + .../src/amqpClient/amqpImpl/FieldImpl.cpp | 38 + .../amqpClient/amqpImpl/GetResponseImpl.cpp | 62 + .../amqpClient/amqpImpl/QueueBindMethod.cpp | 53 + .../amqpClient/amqpImpl/QueueBindOkMethod.cpp | 24 + .../amqpClient/amqpImpl/QueueBindOkMethod.h | 45 + .../amqpImpl/QueueDeclareMethod.cpp | 86 + .../amqpImpl/QueueDeclareOkMethod.cpp | 43 + .../amqpImpl/QueueDeclareOkMethod.h | 51 + .../amqpClient/amqpImpl/QueueDeleteMethod.cpp | 51 + .../amqpImpl/QueueDeleteOkMethod.cpp | 32 + .../amqpClient/amqpImpl/QueueDeleteOkMethod.h | 47 + .../amqpClient/amqpImpl/QueuePurgeMethod.cpp | 43 + .../amqpImpl/QueuePurgeOkMethod.cpp | 32 + .../amqpClient/amqpImpl/QueuePurgeOkMethod.h | 47 + .../amqpClient/amqpImpl/QueueUnbindMethod.cpp | 51 + .../amqpImpl/QueueUnbindOkMethod.cpp | 24 + .../amqpClient/amqpImpl/QueueUnbindOkMethod.h | 45 + .../src/amqpClient/amqpImpl/TMethodImpl.h | 62 + .../src/amqpClient/amqpImpl/amqpImplInt.h | 40 + .../amqpCore/src/amqpClient/amqpImpl/stdafx.h | 15 + .../amqpCore/src/amqpClient/stdafx.h | 59 + .../amqpCore/AbstractConnectionFactory.cpp | 207 + .../src/amqpCore/AmqpHeaderMapper.cpp | 31 + .../src/amqpCore/AmqpIntegrationCoreDefines.h | 28 + .../src/amqpCore/AmqpIntegrationCoreFunc.h | 109 + .../amqpCore/AmqpIntegrationExceptions.cpp | 16 + .../src/amqpCore/AmqpIntegrationExceptions.h | 34 + .../amqpCore/AmqpMessageListenerSource.cpp | 102 + .../src/amqpCore/AmqpOutboundEndpoint.cpp | 297 + .../src/amqpCore/AutoChannelClose.cpp | 22 + .../amqpCore/src/amqpCore/AutoChannelClose.h | 39 + .../amqpCore/src/amqpCore/BindingImpl.cpp | 50 + .../src/amqpCore/BlockingQueueConsumer.cpp | 455 + .../src/amqpCore/CachedChannelHandler.cpp | 382 + .../src/amqpCore/CachingConnectionFactory.cpp | 218 + .../ChannelCachingConnectionProxy.cpp | 68 + .../amqpCore/CompositeConnectionListener.cpp | 64 + .../src/amqpCore/DefaultAmqpHeaderMapper.cpp | 293 + .../amqpCore/src/amqpCore/ExchangeImpl.cpp | 128 + .../amqpCore/src/amqpCore/HeaderUtils.cpp | 114 + .../amqpCore/src/amqpCore/HeaderUtils.h | 84 + .../amqpCore/src/amqpCore/QueueImpl.cpp | 87 + .../amqpCore/src/amqpCore/RabbitAdmin.cpp | 316 + .../amqpCore/src/amqpCore/RabbitTemplate.cpp | 339 + .../src/amqpCore/SimpleConnection.cpp | 43 + .../SimpleMessageListenerContainer.cpp | 414 + .../src/amqpCore/amqpIntegrationCoreLink.h | 30 + .../amqpCore/src/amqpCore/stdafx.h | 25 + .../amqpListener/include/AmqpListenerWorker.h | 36 + .../amqpListener/src/AmqpListenerWorker.cpp | 109 + .../amqpListener/src/amqpListenerMain.cpp | 179 + .../Communication/amqpListener/src/stdafx.h | 19 + .../Framework/Framework/include/BaseDefines.h | 73 + .../Framework/include/BasePlatformInc.h | 33 + .../Framework/include/BasePlatformLink.h | 78 + .../Framework/Framework/include/Collections.h | 14 + .../include/Common/CApplicationContext.h | 114 + .../Framework/include/Common/CAutoCondition.h | 45 + .../Framework/include/Common/CAutoMutex.h | 38 + .../Framework/include/Common/CAutoRecMutex.h | 38 + .../Framework/include/Common/CCafRegex.h | 62 + .../include/Common/CCmdLineOptions.h | 71 + .../Framework/include/Common/CConfigParams.h | 68 + .../include/Common/CConfigParamsChain.h | 47 + .../Framework/include/Common/CFileLock.h | 56 + .../Framework/include/Common/CIniFile.h | 118 + .../Framework/include/Common/CLoggingSetter.h | 32 + .../Framework/include/Common/CLoggingUtils.h | 59 + .../include/Common/CManagedThreadPool.h | 125 + .../Framework/include/Common/CThreadPool.h | 77 + .../Framework/include/Common/CThreadSignal.h | 64 + .../Framework/include/Common/CVariant.h | 65 + .../Framework/include/Common/IAppConfig.h | 84 + .../include/Common/IAppConfigWrite.h | 67 + .../Framework/include/Common/IAppContext.h | 33 + .../Framework/include/Common/IConfigParams.h | 36 + .../Framework/include/Common/IWork.h | 31 + .../Framework/include/CommonDefines.h | 33 + .../Framework/include/CommonGlobals.h | 50 + .../Doc/CafCoreTypesDoc/CAddInCollectionDoc.h | 45 + .../include/Doc/CafCoreTypesDoc/CAddInsDoc.h | 48 + .../CAttachmentCollectionDoc.h | 54 + .../Doc/CafCoreTypesDoc/CAttachmentDoc.h | 66 + .../CAttachmentNameCollectionDoc.h | 45 + .../CAuthnAuthzCollectionDoc.h | 48 + .../Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h | 59 + .../Doc/CafCoreTypesDoc/CClassFiltersDoc.h | 50 + .../Doc/CafCoreTypesDoc/CClassSpecifierDoc.h | 54 + .../CFullyQualifiedClassGroupDoc.h | 55 + .../CInlineAttachmentCollectionDoc.h | 48 + .../CafCoreTypesDoc/CInlineAttachmentDoc.h | 55 + .../CLoggingLevelCollectionDoc.h | 48 + .../CafCoreTypesDoc/CLoggingLevelElemDoc.h | 52 + .../Doc/CafCoreTypesDoc/COperationDoc.h | 53 + .../CafCoreTypesDoc/CParameterCollectionDoc.h | 54 + .../CafCoreTypesDoc/CPropertyCollectionDoc.h | 48 + .../Doc/CafCoreTypesDoc/CPropertyDoc.h | 57 + .../CafCoreTypesDoc/CProtocolCollectionDoc.h | 48 + .../Doc/CafCoreTypesDoc/CProtocolDoc.h | 55 + .../Doc/CafCoreTypesDoc/CRequestConfigDoc.h | 64 + .../Doc/CafCoreTypesDoc/CRequestHeaderDoc.h | 81 + .../CRequestInstanceParameterDoc.h | 65 + .../CafCoreTypesDoc/CRequestParameterDoc.h | 57 + .../Doc/CafCoreTypesDoc/CStatisticsDoc.h | 77 + .../Doc/CafCoreTypesDoc/CafCoreTypesDocLink.h | 25 + .../CafCoreTypesDoc/CafCoreTypesDocTypes.h | 69 + .../CFullPackageElemDoc.h | 72 + .../CGetInventoryJobDoc.h | 44 + .../CafInstallRequestDoc/CInstallBatchDoc.h | 60 + .../CInstallPackageSpecDoc.h | 84 + .../CInstallProviderJobDoc.h | 78 + .../CInstallProviderSpecDoc.h | 67 + .../CafInstallRequestDoc/CInstallRequestDoc.h | 74 + .../CafInstallRequestDoc/CMinPackageElemDoc.h | 59 + .../CafInstallRequestDoc/CPackageDefnDoc.h | 63 + .../CUninstallProviderJobDoc.h | 71 + .../CafInstallRequestDocLink.h | 25 + .../CafInstallRequestDocTypes.h | 22 + .../Doc/DiagRequestDoc/CDiagRequestDoc.h | 68 + .../Doc/DiagRequestDoc/DiagRequestDocLink.h | 25 + .../include/Doc/DiagTypesDoc/CDiagBatchDoc.h | 60 + .../DiagTypesDoc/CDiagCollectInstancesDoc.h | 44 + .../CDiagDeleteValueCollectionDoc.h | 48 + .../Doc/DiagTypesDoc/CDiagDeleteValueDoc.h | 54 + .../DiagTypesDoc/CDiagSetValueCollectionDoc.h | 48 + .../Doc/DiagTypesDoc/CDiagSetValueDoc.h | 57 + .../Doc/DiagTypesDoc/DiagTypesDocLink.h | 25 + .../include/Doc/DocUtils/EnumConvertersXml.h | 91 + .../CafCoreTypesXml/AddInCollectionXml.h | 37 + .../Doc/DocXml/CafCoreTypesXml/AddInsXml.h | 37 + .../CafCoreTypesXml/AttachmentCollectionXml.h | 37 + .../AttachmentNameCollectionXml.h | 37 + .../DocXml/CafCoreTypesXml/AttachmentXml.h | 37 + .../CafCoreTypesXml/AuthnAuthzCollectionXml.h | 37 + .../DocXml/CafCoreTypesXml/AuthnAuthzXml.h | 37 + .../CafCoreTypesXml/CafCoreTypesXmlLink.h | 28 + .../DocXml/CafCoreTypesXml/ClassFiltersXml.h | 37 + .../CafCoreTypesXml/ClassSpecifierXml.h | 37 + .../FullyQualifiedClassGroupXml.h | 37 + .../LoggingLevelCollectionXml.h | 37 + .../CafCoreTypesXml/LoggingLevelElemXml.h | 37 + .../Doc/DocXml/CafCoreTypesXml/OperationXml.h | 37 + .../CafCoreTypesXml/ParameterCollectionXml.h | 37 + .../CafCoreTypesXml/PropertyCollectionXml.h | 37 + .../Doc/DocXml/CafCoreTypesXml/PropertyXml.h | 37 + .../CafCoreTypesXml/ProtocolCollectionXml.h | 37 + .../Doc/DocXml/CafCoreTypesXml/ProtocolXml.h | 37 + .../DocXml/CafCoreTypesXml/RequestConfigXml.h | 37 + .../DocXml/CafCoreTypesXml/RequestHeaderXml.h | 37 + .../RequestInstanceParameterXml.h | 37 + .../CafCoreTypesXml/RequestParameterXml.h | 37 + .../Doc/DocXml/CafCoreTypesXml/RequestXml.h | 31 + .../DocXml/CafCoreTypesXml/StatisticsXml.h | 37 + .../CafInstallRequestXmlLink.h | 28 + .../CafInstallRequestXmlRoots.h | 79 + .../CafInstallRequestXml/FullPackageElemXml.h | 37 + .../CafInstallRequestXml/GetInventoryJobXml.h | 37 + .../CafInstallRequestXml/InstallBatchXml.h | 37 + .../InstallPackageSpecXml.h | 37 + .../InstallProviderJobXml.h | 37 + .../InstallProviderSpecXml.h | 37 + .../CafInstallRequestXml/InstallRequestXml.h | 37 + .../CafInstallRequestXml/MinPackageElemXml.h | 37 + .../CafInstallRequestXml/PackageDefnXml.h | 37 + .../UninstallProviderJobXml.h | 37 + .../DocXml/DiagRequestXml/DiagRequestXml.h | 37 + .../DiagRequestXml/DiagRequestXmlLink.h | 28 + .../DiagRequestXml/DiagRequestXmlRoots.h | 43 + .../Doc/DocXml/DiagTypesXml/DiagBatchXml.h | 37 + .../DiagTypesXml/DiagCollectInstancesXml.h | 37 + .../DiagDeleteValueCollectionXml.h | 37 + .../DocXml/DiagTypesXml/DiagDeleteValueXml.h | 37 + .../DiagTypesXml/DiagSetValueCollectionXml.h | 37 + .../Doc/DocXml/DiagTypesXml/DiagSetValueXml.h | 37 + .../DocXml/DiagTypesXml/DiagTypesXmlLink.h | 28 + .../DocXml/MgmtRequestXml/MgmtRequestXml.h | 37 + .../MgmtRequestXml/MgmtRequestXmlLink.h | 28 + .../MgmtRequestXml/MgmtRequestXmlRoots.h | 43 + .../Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h | 37 + .../MgmtCollectInstancesCollectionXml.h | 37 + .../MgmtTypesXml/MgmtCollectInstancesXml.h | 37 + .../MgmtTypesXml/MgmtCollectSchemaXml.h | 37 + .../MgmtInvokeOperationCollectionXml.h | 37 + .../MgmtTypesXml/MgmtInvokeOperationXml.h | 37 + .../DocXml/MgmtTypesXml/MgmtTypesXmlLink.h | 28 + .../MultiPmeMgmtBatchCollectionXml.h | 37 + .../MultiPmeMgmtBatchXml.h | 37 + .../MultiPmeMgmtRequestXml.h | 37 + .../MultiPmeMgmtRequestXmlLink.h | 28 + .../MultiPmeMgmtRequestXmlRoots.h | 43 + .../PmeIdCollectionXml.h | 37 + .../PayloadEnvelopeXml/PayloadEnvelopeXml.h | 37 + .../PayloadEnvelopeXmlLink.h | 28 + .../PayloadEnvelopeXmlRoots.h | 42 + .../DocXml/PersistenceXml/CertCollectionXml.h | 34 + .../PersistenceXml/CertPathCollectionXml.h | 34 + .../DocXml/PersistenceXml/LocalSecurityXml.h | 34 + .../PersistenceProtocolCollectionXml.h | 34 + .../PersistenceXml/PersistenceProtocolXml.h | 34 + .../DocXml/PersistenceXml/PersistenceXml.h | 34 + .../PersistenceXml/PersistenceXmlLink.h | 25 + .../PersistenceXml/PersistenceXmlRoots.h | 39 + .../RemoteSecurityCollectionXml.h | 34 + .../DocXml/PersistenceXml/RemoteSecurityXml.h | 34 + .../ProviderInfraXml/ClassCollectionXml.h | 37 + .../ProviderInfraXml/ProviderInfraXmlLink.h | 28 + .../ProviderInfraXml/ProviderInfraXmlRoots.h | 61 + .../DocXml/ProviderInfraXml/ProviderRegXml.h | 37 + .../ProviderInfraXml/SchemaSummaryXml.h | 37 + .../ProviderRequestXml/ProviderBatchXml.h | 37 + .../ProviderCollectInstancesCollectionXml.h | 37 + .../ProviderCollectInstancesXml.h | 37 + .../ProviderCollectSchemaRequestXml.h | 37 + .../ProviderInvokeOperationCollectionXml.h | 37 + .../ProviderInvokeOperationXml.h | 37 + .../ProviderRequestConfigXml.h | 37 + .../ProviderRequestHeaderXml.h | 37 + .../ProviderRequestXml/ProviderRequestXml.h | 37 + .../ProviderRequestXmlLink.h | 28 + .../ProviderRequestXmlRoots.h | 61 + .../Doc/DocXml/ProviderResultsXml/CdifXml.h | 37 + .../DefinitionObjectCollectionXml.h | 37 + .../ProviderResultsXmlLink.h | 28 + .../ProviderResultsXmlRoots.h | 61 + .../ProviderResultsXml/RequestIdentifierXml.h | 37 + .../Doc/DocXml/ProviderResultsXml/SchemaXml.h | 37 + .../Doc/DocXml/ResponseXml/ErrorResponseXml.h | 37 + .../ResponseXml/EventKeyCollectionXml.h | 37 + .../Doc/DocXml/ResponseXml/EventKeyXml.h | 37 + .../Doc/DocXml/ResponseXml/EventManifestXml.h | 37 + .../ResponseXml/ManifestCollectionXml.h | 37 + .../Doc/DocXml/ResponseXml/ManifestXml.h | 37 + .../ResponseXml/ProviderEventResponseXml.h | 37 + .../DocXml/ResponseXml/ProviderResponseXml.h | 37 + .../DocXml/ResponseXml/ResponseHeaderXml.h | 37 + .../Doc/DocXml/ResponseXml/ResponseXml.h | 37 + .../Doc/DocXml/ResponseXml/ResponseXmlLink.h | 28 + .../Doc/DocXml/ResponseXml/ResponseXmlRoots.h | 97 + .../ActionClassInstanceCollectionXml.h | 37 + .../SchemaTypesXml/ActionClassInstanceXml.h | 37 + .../DocXml/SchemaTypesXml/ActionClassXml.h | 37 + .../SchemaTypesXml/ClassCardinalityXml.h | 37 + .../Doc/DocXml/SchemaTypesXml/ClassFieldXml.h | 37 + .../SchemaTypesXml/ClassIdentifierXml.h | 37 + .../SchemaTypesXml/ClassInstancePropertyXml.h | 37 + .../DocXml/SchemaTypesXml/ClassPropertyXml.h | 37 + .../DocXml/SchemaTypesXml/CmdlMetadataXml.h | 37 + .../Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h | 37 + .../DocXml/SchemaTypesXml/CollectMethodXml.h | 37 + .../DataClassInstanceCollectionXml.h | 37 + .../SchemaTypesXml/DataClassInstanceXml.h | 37 + .../SchemaTypesXml/DataClassPropertyXml.h | 37 + .../SchemaTypesXml/DataClassSubInstanceXml.h | 37 + .../Doc/DocXml/SchemaTypesXml/DataClassXml.h | 37 + .../InstanceOperationCollectionXml.h | 37 + .../SchemaTypesXml/InstanceOperationXml.h | 37 + .../SchemaTypesXml/InstanceParameterXml.h | 37 + .../Doc/DocXml/SchemaTypesXml/JoinTypeXml.h | 37 + .../SchemaTypesXml/LogicalRelationshipXml.h | 37 + .../SchemaTypesXml/MethodParameterXml.h | 37 + .../Doc/DocXml/SchemaTypesXml/MethodXml.h | 37 + .../SchemaTypesXml/PhysicalRelationshipXml.h | 37 + .../DocXml/SchemaTypesXml/RelationshipXml.h | 37 + .../SchemaTypesXml/SchemaTypesXmlLink.h | 28 + .../Doc/MgmtRequestDoc/CMgmtRequestDoc.h | 74 + .../Doc/MgmtRequestDoc/MgmtRequestDocLink.h | 25 + .../include/Doc/MgmtTypesDoc/CMgmtBatchDoc.h | 60 + .../CMgmtCollectInstancesCollectionDoc.h | 48 + .../MgmtTypesDoc/CMgmtCollectInstancesDoc.h | 58 + .../Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h | 44 + .../CMgmtInvokeOperationCollectionDoc.h | 48 + .../MgmtTypesDoc/CMgmtInvokeOperationDoc.h | 58 + .../Doc/MgmtTypesDoc/MgmtTypesDocLink.h | 25 + .../CMultiPmeMgmtBatchCollectionDoc.h | 48 + .../CMultiPmeMgmtBatchDoc.h | 54 + .../CMultiPmeMgmtRequestDoc.h | 63 + .../CPmeIdCollectionDoc.h | 45 + .../MultiPmeMgmtRequestDocLink.h | 25 + .../PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h | 88 + .../PayloadEnvelopeDocLink.h | 25 + .../Doc/PersistenceDoc/CCertCollectionDoc.h | 45 + .../PersistenceDoc/CCertPathCollectionDoc.h | 45 + .../Doc/PersistenceDoc/CLocalSecurityDoc.h | 65 + .../Doc/PersistenceDoc/CPersistenceDoc.h | 64 + .../CPersistenceProtocolCollectionDoc.h | 48 + .../PersistenceDoc/CPersistenceProtocolDoc.h | 104 + .../CRemoteSecurityCollectionDoc.h | 48 + .../Doc/PersistenceDoc/CRemoteSecurityDoc.h | 79 + .../Doc/PersistenceDoc/PersistenceDocLink.h | 25 + .../ProviderInfraDoc/CClassCollectionDoc.h | 48 + .../Doc/ProviderInfraDoc/CProviderRegDoc.h | 69 + .../Doc/ProviderInfraDoc/CSchemaSummaryDoc.h | 68 + .../ProviderInfraDoc/ProviderInfraDocLink.h | 25 + .../ProviderRequestDoc/CProviderBatchDoc.h | 59 + .../CProviderCollectInstancesCollectionDoc.h | 48 + .../CProviderCollectInstancesDoc.h | 72 + .../CProviderCollectSchemaRequestDoc.h | 72 + .../CProviderInvokeOperationCollectionDoc.h | 48 + .../CProviderInvokeOperationDoc.h | 72 + .../CProviderRequestConfigDoc.h | 53 + .../ProviderRequestDoc/CProviderRequestDoc.h | 74 + .../CProviderRequestHeaderDoc.h | 54 + .../ProviderRequestDocLink.h | 25 + .../include/Doc/ProviderResultsDoc/CCdifDoc.h | 60 + .../CDefinitionObjectCollectionDoc.h | 45 + .../CRequestIdentifierDoc.h | 72 + .../Doc/ProviderResultsDoc/CSchemaDoc.h | 66 + .../ProviderResultsDocLink.h | 25 + .../Doc/ResponseDoc/CErrorResponseDoc.h | 67 + .../Doc/ResponseDoc/CEventKeyCollectionDoc.h | 48 + .../include/Doc/ResponseDoc/CEventKeyDoc.h | 50 + .../Doc/ResponseDoc/CEventManifestDoc.h | 68 + .../Doc/ResponseDoc/CManifestCollectionDoc.h | 48 + .../include/Doc/ResponseDoc/CManifestDoc.h | 72 + .../ResponseDoc/CProviderEventResponseDoc.h | 71 + .../Doc/ResponseDoc/CProviderResponseDoc.h | 80 + .../include/Doc/ResponseDoc/CResponseDoc.h | 80 + .../Doc/ResponseDoc/CResponseHeaderDoc.h | 64 + .../include/Doc/ResponseDoc/ResponseDocLink.h | 25 + .../Doc/SchemaTypesDoc/CActionClassDoc.h | 79 + .../CActionClassInstanceCollectionDoc.h | 48 + .../SchemaTypesDoc/CActionClassInstanceDoc.h | 63 + .../Doc/SchemaTypesDoc/CClassCardinalityDoc.h | 60 + .../Doc/SchemaTypesDoc/CClassFieldDoc.h | 60 + .../Doc/SchemaTypesDoc/CClassIdentifierDoc.h | 55 + .../CClassInstancePropertyDoc.h | 77 + .../Doc/SchemaTypesDoc/CClassPropertyDoc.h | 112 + .../Doc/SchemaTypesDoc/CCmdlMetadataDoc.h | 50 + .../Doc/SchemaTypesDoc/CCmdlUnionDoc.h | 55 + .../Doc/SchemaTypesDoc/CCollectMethodDoc.h | 75 + .../Doc/SchemaTypesDoc/CDataClassDoc.h | 88 + .../CDataClassInstanceCollectionDoc.h | 48 + .../SchemaTypesDoc/CDataClassInstanceDoc.h | 81 + .../SchemaTypesDoc/CDataClassPropertyDoc.h | 58 + .../SchemaTypesDoc/CDataClassSubInstanceDoc.h | 71 + .../CInstanceOperationCollectionDoc.h | 48 + .../SchemaTypesDoc/CInstanceOperationDoc.h | 50 + .../SchemaTypesDoc/CInstanceParameterDoc.h | 79 + .../include/Doc/SchemaTypesDoc/CJoinTypeDoc.h | 63 + .../SchemaTypesDoc/CLogicalRelationshipDoc.h | 84 + .../include/Doc/SchemaTypesDoc/CMethodDoc.h | 85 + .../Doc/SchemaTypesDoc/CMethodParameterDoc.h | 76 + .../SchemaTypesDoc/CPhysicalRelationshipDoc.h | 78 + .../Doc/SchemaTypesDoc/CRelationshipDoc.h | 79 + .../Doc/SchemaTypesDoc/SchemaTypesDocLink.h | 25 + .../Doc/SchemaTypesDoc/SchemaTypesDocTypes.h | 33 + .../Framework/include/DocContracts.h | 26 + .../Framework/Framework/include/DocUtils.h | 16 + .../Cpp/Framework/Framework/include/DocXml.h | 29 + .../include/Exception/CCafException.h | 81 + .../Framework/include/FrameworkLink.h | 20 + .../Cpp/Framework/Framework/include/IBean.h | 56 + .../Framework/Framework/include/ICafObject.h | 55 + .../Framework/Framework/include/IVariant.h | 33 + .../Framework/Framework/include/Integration.h | 21 + .../Integration/Caf/CBeanPropertiesHelper.h | 54 + .../Integration/Caf/CCafMessageCreator.h | 114 + .../Integration/Caf/CCafMessageHeaders.h | 138 + .../Caf/CCafMessageHeadersWriter.h | 89 + .../Integration/Caf/CCafMessagePayload.h | 93 + .../Caf/CCafMessagePayloadParser.h | 63 + .../Integration/Caf/IntegrationCafLink.h | 23 + .../Core/CAbstractMessageChannel.h | 63 + .../Integration/Core/CAbstractMessageRouter.h | 53 + .../Core/CAbstractPollableChannel.h | 57 + .../Core/CBroadcastingDispatcher.h | 60 + .../Core/CChannelInterceptorAdapter.h | 51 + .../Integration/Core/CChannelResolver.h | 49 + .../include/Integration/Core/CDocument.h | 57 + .../include/Integration/Core/CErrorHandler.h | 51 + .../Integration/Core/CExpressionHandler.h | 53 + .../include/Integration/Core/CIntException.h | 73 + .../include/Integration/Core/CIntMessage.h | 86 + .../Integration/Core/CIntMessageHeaders.h | 89 + .../Integration/Core/CIntegrationAppContext.h | 141 + .../Integration/Core/CMessageHandler.h | 68 + .../Integration/Core/CMessageHeaderUtils.h | 77 + .../Integration/Core/CMessagingTemplate.h | 71 + .../Core/CMessagingTemplateHandler.h | 48 + .../Core/CSimpleAsyncTaskExecutor.h | 58 + .../Core/CSimpleAsyncTaskExecutorState.h | 68 + .../Core/CSourcePollingChannelAdapter.h | 70 + .../Integration/Core/CUnicastingDispatcher.h | 61 + .../include/Integration/Core/FileHeaders.h | 19 + .../Integration/Core/IntegrationCoreLink.h | 23 + .../include/Integration/Core/MessageHeaders.h | 63 + .../Dependencies/CPollerMetadata.h | 47 + .../include/Integration/IChannelInterceptor.h | 64 + .../Integration/IChannelInterceptorInstance.h | 26 + .../Integration/IChannelInterceptorSupport.h | 31 + .../include/Integration/IChannelResolver.h | 35 + .../Framework/include/Integration/IDocument.h | 50 + .../include/Integration/IErrorHandler.h | 34 + .../include/Integration/IErrorProcessor.h | 31 + .../include/Integration/IExpressionInvoker.h | 29 + .../include/Integration/IIntMessage.h | 73 + .../Integration/IIntegrationAppContext.h | 38 + .../Integration/IIntegrationAppContextAware.h | 28 + .../Integration/IIntegrationComponent.h | 35 + .../IIntegrationComponentInstance.h | 33 + .../include/Integration/IIntegrationObject.h | 38 + .../include/Integration/ILifecycle.h | 29 + .../include/Integration/IMessageChannel.h | 35 + .../include/Integration/IMessageDispatcher.h | 38 + .../include/Integration/IMessageHandler.h | 35 + .../include/Integration/IMessageProcessor.h | 31 + .../include/Integration/IMessageProducer.h | 27 + .../include/Integration/IMessageRouter.h | 30 + .../include/Integration/IMessageSplitter.h | 34 + .../Framework/include/Integration/IPhased.h | 25 + .../include/Integration/IPollableChannel.h | 33 + .../Framework/include/Integration/IRunnable.h | 28 + .../include/Integration/ISmartLifecycle.h | 25 + .../Integration/ISubscribableChannel.h | 33 + .../include/Integration/ITaskExecutor.h | 37 + .../include/Integration/IThrowable.h | 35 + .../include/Integration/ITransformer.h | 31 + .../Memory/DynamicArray/DynamicArrayInc.h | 50 + .../SDynamicArrayMallocAllocator.h | 29 + .../Memory/DynamicArray/TByteAdapter.h | 104 + .../Memory/DynamicArray/TCharAdapter.h | 401 + .../Memory/DynamicArray/TDynamicArray.h | 1088 + .../Memory/DynamicArray/TWCharAdapter.h | 370 + .../Framework/include/PlatformDefines.h | 38 + .../Framework/include/PlatformErrors.h | 171 + .../Framework/Framework/include/PlatformIID.h | 62 + .../Framework/include/PlatformStringFunc.h | 17 + .../Framework/include/PlatformTypes.h | 38 + .../Framework/Framework/include/TCafObject.h | 35 + .../Framework/include/TCafQIObject.h | 89 + .../Framework/include/TCafSmartPtr.h | 399 + .../Framework/include/TCafStackObject.h | 34 + .../include/Xml/MarkupParser/CMarkupParser.h | 65 + .../include/Xml/XmlUtils/CXmlElement.h | 88 + .../Framework/Framework/src/BasePlatform.cpp | 19 + .../src/Collections/Graphs/GraphsInc.h | 13 + .../src/Collections/Graphs/TEdgeListGraph.h | 497 + .../src/Collections/Iterators/IteratorsInc.h | 33 + .../Collections/Iterators/TConstIterator.h | 94 + .../Collections/Iterators/TConstMapIterator.h | 92 + .../Iterators/TConstMultimapIterator.h | 82 + .../src/Collections/Iterators/TIterator.h | 84 + .../src/Collections/Iterators/TMapIterator.h | 91 + .../Collections/Iterators/TMultimapIterator.h | 82 + .../Iterators/TSmartConstIterator.h | 88 + .../Iterators/TSmartConstMapIterator.h | 91 + .../Iterators/TSmartConstMultimapIterator.h | 83 + .../Collections/Iterators/TSmartIterator.h | 84 + .../Collections/Iterators/TSmartMapIterator.h | 91 + .../Iterators/TSmartMultimapIterator.h | 83 + .../Framework/src/Common/AppConfigUtils.cpp | 132 + .../Framework/src/Common/AppConfigUtils.h | 54 + .../Framework/src/Common/CAppConfig.cpp | 1059 + .../Framework/src/Common/CAppConfig.h | 196 + .../src/Common/CApplicationContext.cpp | 498 + .../Framework/src/Common/CAutoCondition.cpp | 77 + .../Framework/src/Common/CAutoFileUnlock.cpp | 31 + .../Framework/src/Common/CAutoFileUnlock.h | 26 + .../Framework/src/Common/CAutoMutex.cpp | 76 + .../src/Common/CAutoMutexLockUnlock.cpp | 74 + .../src/Common/CAutoMutexLockUnlock.h | 47 + .../src/Common/CAutoMutexLockUnlockRaw.cpp | 40 + .../src/Common/CAutoMutexLockUnlockRaw.h | 32 + .../src/Common/CAutoMutexUnlockLock.cpp | 72 + .../src/Common/CAutoMutexUnlockLock.h | 47 + .../Framework/src/Common/CAutoRecMutex.cpp | 75 + .../Framework/src/Common/CCafRegex.cpp | 264 + .../Framework/src/Common/CCmdLineOptions.cpp | 253 + .../Framework/src/Common/CConfigParams.cpp | 98 + .../src/Common/CConfigParamsChain.cpp | 72 + .../Framework/src/Common/CDaemonUtils.cpp | 410 + .../Framework/src/Common/CDaemonUtils.h | 25 + .../Framework/src/Common/CDateTimeUtils.cpp | 105 + .../Framework/src/Common/CDateTimeUtils.h | 37 + .../src/Common/CEnvironmentUtils.cpp | 41 + .../Framework/src/Common/CEnvironmentUtils.h | 25 + .../Framework/src/Common/CFileLock.cpp | 178 + .../Framework/src/Common/CFileSystemUtils.cpp | 1291 + .../Framework/src/Common/CFileSystemUtils.h | 205 + .../Framework/src/Common/CHexCodec.cpp | 127 + .../Framework/src/Common/CHexCodec.h | 31 + .../Framework/src/Common/CIniFile.cpp | 528 + .../Framework/src/Common/CLoggingSetter.cpp | 61 + .../Framework/src/Common/CLoggingUtils.cpp | 195 + .../src/Common/CManagedThreadPool.cpp | 392 + .../src/Common/CPersistenceUtils.cpp | 466 + .../Framework/src/Common/CPersistenceUtils.h | 84 + .../Framework/src/Common/CProcessUtils.cpp | 441 + .../Framework/src/Common/CProcessUtils.h | 76 + .../Framework/src/Common/CStringUtils.cpp | 186 + .../Framework/src/Common/CStringUtils.h | 87 + .../Framework/src/Common/CThreadPool.cpp | 94 + .../Framework/src/Common/CThreadSignal.cpp | 93 + .../Framework/src/Common/CThreadUtils.cpp | 52 + .../Framework/src/Common/CThreadUtils.h | 29 + .../Framework/src/Common/CTimeUnit.cpp | 91 + .../Framework/src/Common/CTimeUnit.h | 61 + .../Framework/src/Common/CVariant.cpp | 179 + .../Framework/src/Common/CafInitialize.cpp | 57 + .../Framework/src/Common/CafInitialize.h | 24 + .../src/Common/CommonAggregatorLink.h | 65 + .../Framework/src/Common/TBlockingCell.h | 107 + .../Framework/src/Common/UriUtils.cpp | 406 + .../Framework/Framework/src/Common/UriUtils.h | 51 + .../Framework/Framework/src/Common/stdafx.h | 31 + .../Framework/Framework/src/CommonGlobals.cpp | 57 + .../CafCoreTypesDoc/CAddInCollectionDoc.cpp | 41 + .../Doc/DocDoc/CafCoreTypesDoc/CAddInsDoc.cpp | 43 + .../CAttachmentCollectionDoc.cpp | 51 + .../DocDoc/CafCoreTypesDoc/CAttachmentDoc.cpp | 72 + .../CAttachmentNameCollectionDoc.cpp | 41 + .../CAuthnAuthzCollectionDoc.cpp | 43 + .../DocDoc/CafCoreTypesDoc/CAuthnAuthzDoc.cpp | 62 + .../CafCoreTypesDoc/CClassFiltersDoc.cpp | 48 + .../CafCoreTypesDoc/CClassSpecifierDoc.cpp | 51 + .../CFullyQualifiedClassGroupDoc.cpp | 55 + .../CInlineAttachmentCollectionDoc.cpp | 43 + .../CafCoreTypesDoc/CInlineAttachmentDoc.cpp | 55 + .../CLoggingLevelCollectionDoc.cpp | 43 + .../CafCoreTypesDoc/CLoggingLevelElemDoc.cpp | 53 + .../DocDoc/CafCoreTypesDoc/COperationDoc.cpp | 50 + .../CParameterCollectionDoc.cpp | 51 + .../CPropertyCollectionDoc.cpp | 43 + .../DocDoc/CafCoreTypesDoc/CPropertyDoc.cpp | 57 + .../CProtocolCollectionDoc.cpp | 43 + .../DocDoc/CafCoreTypesDoc/CProtocolDoc.cpp | 56 + .../CafCoreTypesDoc/CRequestConfigDoc.cpp | 65 + .../CafCoreTypesDoc/CRequestHeaderDoc.cpp | 89 + .../CRequestInstanceParameterDoc.cpp | 69 + .../CafCoreTypesDoc/CRequestParameterDoc.cpp | 57 + .../DocDoc/CafCoreTypesDoc/CStatisticsDoc.cpp | 90 + .../src/Doc/DocDoc/CafCoreTypesDoc/stdafx.h | 20 + .../CFullPackageElemDoc.cpp | 78 + .../CGetInventoryJobDoc.cpp | 41 + .../CafInstallRequestDoc/CInstallBatchDoc.cpp | 59 + .../CInstallPackageSpecDoc.cpp | 93 + .../CInstallProviderJobDoc.cpp | 88 + .../CInstallProviderSpecDoc.cpp | 71 + .../CInstallRequestDoc.cpp | 81 + .../CMinPackageElemDoc.cpp | 62 + .../CafInstallRequestDoc/CPackageDefnDoc.cpp | 64 + .../CUninstallProviderJobDoc.cpp | 79 + .../Doc/DocDoc/CafInstallRequestDoc/stdafx.h | 20 + .../DocDoc/DiagRequestDoc/CDiagRequestDoc.cpp | 73 + .../src/Doc/DocDoc/DiagRequestDoc/stdafx.h | 20 + .../Doc/DocDoc/DiagTypesDoc/CDiagBatchDoc.cpp | 59 + .../DiagTypesDoc/CDiagCollectInstancesDoc.cpp | 41 + .../CDiagDeleteValueCollectionDoc.cpp | 43 + .../DiagTypesDoc/CDiagDeleteValueDoc.cpp | 55 + .../CDiagSetValueCollectionDoc.cpp | 43 + .../DocDoc/DiagTypesDoc/CDiagSetValueDoc.cpp | 57 + .../src/Doc/DocDoc/DiagTypesDoc/stdafx.h | 20 + .../DocDoc/MgmtRequestDoc/CMgmtRequestDoc.cpp | 81 + .../src/Doc/DocDoc/MgmtRequestDoc/stdafx.h | 20 + .../Doc/DocDoc/MgmtTypesDoc/CMgmtBatchDoc.cpp | 59 + .../CMgmtCollectInstancesCollectionDoc.cpp | 43 + .../MgmtTypesDoc/CMgmtCollectInstancesDoc.cpp | 58 + .../MgmtTypesDoc/CMgmtCollectSchemaDoc.cpp | 41 + .../CMgmtInvokeOperationCollectionDoc.cpp | 43 + .../MgmtTypesDoc/CMgmtInvokeOperationDoc.cpp | 58 + .../src/Doc/DocDoc/MgmtTypesDoc/stdafx.h | 20 + .../CMultiPmeMgmtBatchCollectionDoc.cpp | 43 + .../CMultiPmeMgmtBatchDoc.cpp | 51 + .../CMultiPmeMgmtRequestDoc.cpp | 66 + .../CPmeIdCollectionDoc.cpp | 41 + .../DocDoc/MultiPmeMgmtRequestDoc/stdafx.h | 20 + .../CPayloadEnvelopeDoc.cpp | 101 + .../Doc/DocDoc/PayloadEnvelopeDoc/stdafx.h | 20 + .../PersistenceDoc/CCertCollectionDoc.cpp | 41 + .../PersistenceDoc/CCertPathCollectionDoc.cpp | 41 + .../PersistenceDoc/CLocalSecurityDoc.cpp | 70 + .../DocDoc/PersistenceDoc/CPersistenceDoc.cpp | 65 + .../CPersistenceProtocolCollectionDoc.cpp | 43 + .../CPersistenceProtocolDoc.cpp | 123 + .../CRemoteSecurityCollectionDoc.cpp | 43 + .../PersistenceDoc/CRemoteSecurityDoc.cpp | 87 + .../src/Doc/DocDoc/PersistenceDoc/stdafx.h | 20 + .../ProviderInfraDoc/CClassCollectionDoc.cpp | 43 + .../ProviderInfraDoc/CProviderRegDoc.cpp | 77 + .../ProviderInfraDoc/CSchemaSummaryDoc.cpp | 71 + .../src/Doc/DocDoc/ProviderInfraDoc/stdafx.h | 20 + .../ProviderRequestDoc/CProviderBatchDoc.cpp | 58 + ...CProviderCollectInstancesCollectionDoc.cpp | 43 + .../CProviderCollectInstancesDoc.cpp | 78 + .../CProviderCollectSchemaRequestDoc.cpp | 80 + .../CProviderInvokeOperationCollectionDoc.cpp | 43 + .../CProviderInvokeOperationDoc.cpp | 78 + .../CProviderRequestConfigDoc.cpp | 50 + .../CProviderRequestDoc.cpp | 81 + .../CProviderRequestHeaderDoc.cpp | 51 + .../Doc/DocDoc/ProviderRequestDoc/stdafx.h | 20 + .../DocDoc/ProviderResultsDoc/CCdifDoc.cpp | 59 + .../CDefinitionObjectCollectionDoc.cpp | 41 + .../CRequestIdentifierDoc.cpp | 81 + .../DocDoc/ProviderResultsDoc/CSchemaDoc.cpp | 67 + .../Doc/DocDoc/ProviderResultsDoc/stdafx.h | 20 + .../DocDoc/ResponseDoc/CErrorResponseDoc.cpp | 72 + .../ResponseDoc/CEventKeyCollectionDoc.cpp | 43 + .../Doc/DocDoc/ResponseDoc/CEventKeyDoc.cpp | 48 + .../DocDoc/ResponseDoc/CEventManifestDoc.cpp | 71 + .../ResponseDoc/CManifestCollectionDoc.cpp | 43 + .../Doc/DocDoc/ResponseDoc/CManifestDoc.cpp | 78 + .../ResponseDoc/CProviderEventResponseDoc.cpp | 74 + .../ResponseDoc/CProviderResponseDoc.cpp | 89 + .../Doc/DocDoc/ResponseDoc/CResponseDoc.cpp | 89 + .../DocDoc/ResponseDoc/CResponseHeaderDoc.cpp | 71 + .../src/Doc/DocDoc/ResponseDoc/stdafx.h | 20 + .../DocDoc/SchemaTypesDoc/CActionClassDoc.cpp | 86 + .../CActionClassInstanceCollectionDoc.cpp | 43 + .../CActionClassInstanceDoc.cpp | 64 + .../SchemaTypesDoc/CClassCardinalityDoc.cpp | 62 + .../DocDoc/SchemaTypesDoc/CClassFieldDoc.cpp | 62 + .../SchemaTypesDoc/CClassIdentifierDoc.cpp | 55 + .../CClassInstancePropertyDoc.cpp | 87 + .../SchemaTypesDoc/CClassPropertyDoc.cpp | 141 + .../SchemaTypesDoc/CCmdlMetadataDoc.cpp | 48 + .../DocDoc/SchemaTypesDoc/CCmdlUnionDoc.cpp | 55 + .../SchemaTypesDoc/CCollectMethodDoc.cpp | 80 + .../DocDoc/SchemaTypesDoc/CDataClassDoc.cpp | 101 + .../CDataClassInstanceCollectionDoc.cpp | 43 + .../SchemaTypesDoc/CDataClassInstanceDoc.cpp | 88 + .../SchemaTypesDoc/CDataClassPropertyDoc.cpp | 57 + .../CDataClassSubInstanceDoc.cpp | 73 + .../CInstanceOperationCollectionDoc.cpp | 43 + .../SchemaTypesDoc/CInstanceOperationDoc.cpp | 48 + .../SchemaTypesDoc/CInstanceParameterDoc.cpp | 91 + .../DocDoc/SchemaTypesDoc/CJoinTypeDoc.cpp | 66 + .../CLogicalRelationshipDoc.cpp | 94 + .../Doc/DocDoc/SchemaTypesDoc/CMethodDoc.cpp | 94 + .../SchemaTypesDoc/CMethodParameterDoc.cpp | 86 + .../CPhysicalRelationshipDoc.cpp | 86 + .../SchemaTypesDoc/CRelationshipDoc.cpp | 87 + .../src/Doc/DocDoc/SchemaTypesDoc/stdafx.h | 20 + .../src/Doc/DocUtils/AttachmentUtils.cpp | 65 + .../src/Doc/DocUtils/AttachmentUtils.h | 33 + .../src/Doc/DocUtils/DefnObjectConverter.cpp | 218 + .../src/Doc/DocUtils/DefnObjectConverter.h | 49 + .../Framework/src/Doc/DocUtils/DocUtilsInc.h | 21 + .../Framework/src/Doc/DocUtils/DocUtilsLink.h | 33 + .../src/Doc/DocUtils/DocXmlUtils.cpp | 50 + .../Framework/src/Doc/DocUtils/DocXmlUtils.h | 23 + .../src/Doc/DocUtils/EnumConvertersXml.cpp | 588 + .../src/Doc/DocUtils/ParameterUtils.cpp | 336 + .../src/Doc/DocUtils/ParameterUtils.h | 84 + .../Framework/src/Doc/DocUtils/stdafx.h | 19 + .../CafCoreTypesXml/AddInCollectionXml.cpp | 75 + .../Doc/DocXml/CafCoreTypesXml/AddInsXml.cpp | 78 + .../AttachmentCollectionXml.cpp | 76 + .../AttachmentNameCollectionXml.cpp | 75 + .../DocXml/CafCoreTypesXml/AttachmentXml.cpp | 100 + .../AuthnAuthzCollectionXml.cpp | 78 + .../DocXml/CafCoreTypesXml/AuthnAuthzXml.cpp | 89 + .../CafCoreTypesXml/ClassFiltersXml.cpp | 84 + .../CafCoreTypesXml/ClassSpecifierXml.cpp | 86 + .../FullyQualifiedClassGroupXml.cpp | 75 + .../LoggingLevelCollectionXml.cpp | 78 + .../CafCoreTypesXml/LoggingLevelElemXml.cpp | 77 + .../DocXml/CafCoreTypesXml/OperationXml.cpp | 76 + .../ParameterCollectionXml.cpp | 105 + .../CafCoreTypesXml/PropertyCollectionXml.cpp | 78 + .../DocXml/CafCoreTypesXml/PropertyXml.cpp | 100 + .../CafCoreTypesXml/ProtocolCollectionXml.cpp | 78 + .../DocXml/CafCoreTypesXml/ProtocolXml.cpp | 79 + .../CafCoreTypesXml/RequestConfigXml.cpp | 112 + .../CafCoreTypesXml/RequestHeaderXml.cpp | 154 + .../RequestInstanceParameterXml.cpp | 107 + .../CafCoreTypesXml/RequestParameterXml.cpp | 100 + .../Doc/DocXml/CafCoreTypesXml/RequestXml.cpp | 41 + .../DocXml/CafCoreTypesXml/StatisticsXml.cpp | 151 + .../src/Doc/DocXml/CafCoreTypesXml/stdafx.h | 27 + .../CafInstallRequestXmlRoots.cpp | 250 + .../FullPackageElemXml.cpp | 125 + .../GetInventoryJobXml.cpp | 61 + .../CafInstallRequestXml/InstallBatchXml.cpp | 106 + .../InstallPackageSpecXml.cpp | 144 + .../InstallProviderJobXml.cpp | 147 + .../InstallProviderSpecXml.cpp | 121 + .../InstallRequestXml.cpp | 140 + .../MinPackageElemXml.cpp | 88 + .../CafInstallRequestXml/PackageDefnXml.cpp | 96 + .../UninstallProviderJobXml.cpp | 113 + .../Doc/DocXml/CafInstallRequestXml/stdafx.h | 27 + .../DocXml/DiagRequestXml/DiagRequestXml.cpp | 121 + .../DiagRequestXml/DiagRequestXmlRoots.cpp | 96 + .../src/Doc/DocXml/DiagRequestXml/stdafx.h | 27 + .../Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp | 106 + .../DiagTypesXml/DiagCollectInstancesXml.cpp | 61 + .../DiagDeleteValueCollectionXml.cpp | 79 + .../DiagTypesXml/DiagDeleteValueXml.cpp | 87 + .../DiagSetValueCollectionXml.cpp | 79 + .../DocXml/DiagTypesXml/DiagSetValueXml.cpp | 90 + .../src/Doc/DocXml/DiagTypesXml/stdafx.h | 27 + .../DocXml/MgmtRequestXml/MgmtRequestXml.cpp | 138 + .../MgmtRequestXml/MgmtRequestXmlRoots.cpp | 96 + .../src/Doc/DocXml/MgmtRequestXml/stdafx.h | 27 + .../Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp | 106 + .../MgmtCollectInstancesCollectionXml.cpp | 79 + .../MgmtTypesXml/MgmtCollectInstancesXml.cpp | 100 + .../MgmtTypesXml/MgmtCollectSchemaXml.cpp | 61 + .../MgmtInvokeOperationCollectionXml.cpp | 79 + .../MgmtTypesXml/MgmtInvokeOperationXml.cpp | 100 + .../src/Doc/DocXml/MgmtTypesXml/stdafx.h | 27 + .../MultiPmeMgmtBatchCollectionXml.cpp | 79 + .../MultiPmeMgmtBatchXml.cpp | 88 + .../MultiPmeMgmtRequestXml.cpp | 113 + .../MultiPmeMgmtRequestXmlRoots.cpp | 96 + .../PmeIdCollectionXml.cpp | 77 + .../DocXml/MultiPmeMgmtRequestXml/stdafx.h | 27 + .../PayloadEnvelopeXml/PayloadEnvelopeXml.cpp | 154 + .../PayloadEnvelopeXmlRoots.cpp | 67 + .../Doc/DocXml/PayloadEnvelopeXml/stdafx.h | 27 + .../PersistenceXml/CertCollectionXml.cpp | 61 + .../PersistenceXml/CertPathCollectionXml.cpp | 61 + .../PersistenceXml/LocalSecurityXml.cpp | 85 + .../PersistenceProtocolCollectionXml.cpp | 65 + .../PersistenceXml/PersistenceProtocolXml.cpp | 187 + .../DocXml/PersistenceXml/PersistenceXml.cpp | 98 + .../PersistenceXml/PersistenceXmlRoots.cpp | 64 + .../RemoteSecurityCollectionXml.cpp | 65 + .../PersistenceXml/RemoteSecurityXml.cpp | 122 + .../src/Doc/DocXml/PersistenceXml/stdafx.h | 24 + .../ProviderInfraXml/ClassCollectionXml.cpp | 79 + .../ProviderInfraXmlRoots.cpp | 172 + .../ProviderInfraXml/ProviderRegXml.cpp | 110 + .../ProviderInfraXml/SchemaSummaryXml.cpp | 105 + .../src/Doc/DocXml/ProviderInfraXml/stdafx.h | 27 + .../ProviderRequestXml/ProviderBatchXml.cpp | 96 + .../ProviderCollectInstancesCollectionXml.cpp | 79 + .../ProviderCollectInstancesXml.cpp | 117 + .../ProviderCollectSchemaRequestXml.cpp | 124 + .../ProviderInvokeOperationCollectionXml.cpp | 79 + .../ProviderInvokeOperationXml.cpp | 117 + .../ProviderRequestConfigXml.cpp | 77 + .../ProviderRequestHeaderXml.cpp | 87 + .../ProviderRequestXml/ProviderRequestXml.cpp | 140 + .../ProviderRequestXmlRoots.cpp | 172 + .../Doc/DocXml/ProviderRequestXml/stdafx.h | 27 + .../Doc/DocXml/ProviderResultsXml/CdifXml.cpp | 106 + .../DefinitionObjectCollectionXml.cpp | 71 + .../ProviderResultsXmlRoots.cpp | 172 + .../RequestIdentifierXml.cpp | 131 + .../DocXml/ProviderResultsXml/SchemaXml.cpp | 161 + .../Doc/DocXml/ProviderResultsXml/stdafx.h | 27 + .../DocXml/ResponseXml/ErrorResponseXml.cpp | 119 + .../ResponseXml/EventKeyCollectionXml.cpp | 79 + .../Doc/DocXml/ResponseXml/EventKeyXml.cpp | 66 + .../DocXml/ResponseXml/EventManifestXml.cpp | 104 + .../ResponseXml/ManifestCollectionXml.cpp | 79 + .../Doc/DocXml/ResponseXml/ManifestXml.cpp | 117 + .../ResponseXml/ProviderEventResponseXml.cpp | 129 + .../ResponseXml/ProviderResponseXml.cpp | 158 + .../DocXml/ResponseXml/ResponseHeaderXml.cpp | 103 + .../Doc/DocXml/ResponseXml/ResponseXml.cpp | 159 + .../DocXml/ResponseXml/ResponseXmlRoots.cpp | 326 + .../src/Doc/DocXml/ResponseXml/stdafx.h | 27 + .../ActionClassInstanceCollectionXml.cpp | 79 + .../SchemaTypesXml/ActionClassInstanceXml.cpp | 95 + .../DocXml/SchemaTypesXml/ActionClassXml.cpp | 143 + .../SchemaTypesXml/ClassCardinalityXml.cpp | 84 + .../DocXml/SchemaTypesXml/ClassFieldXml.cpp | 84 + .../SchemaTypesXml/ClassIdentifierXml.cpp | 75 + .../ClassInstancePropertyXml.cpp | 147 + .../SchemaTypesXml/ClassPropertyXml.cpp | 228 + .../DocXml/SchemaTypesXml/CmdlMetadataXml.cpp | 74 + .../DocXml/SchemaTypesXml/CmdlUnionXml.cpp | 75 + .../SchemaTypesXml/CollectMethodXml.cpp | 194 + .../DataClassInstanceCollectionXml.cpp | 79 + .../SchemaTypesXml/DataClassInstanceXml.cpp | 179 + .../SchemaTypesXml/DataClassPropertyXml.cpp | 105 + .../DataClassSubInstanceXml.cpp | 159 + .../DocXml/SchemaTypesXml/DataClassXml.cpp | 178 + .../InstanceOperationCollectionXml.cpp | 79 + .../SchemaTypesXml/InstanceOperationXml.cpp | 66 + .../SchemaTypesXml/InstanceParameterXml.cpp | 129 + .../Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp | 110 + .../SchemaTypesXml/LogicalRelationshipXml.cpp | 167 + .../SchemaTypesXml/MethodParameterXml.cpp | 128 + .../Doc/DocXml/SchemaTypesXml/MethodXml.cpp | 214 + .../PhysicalRelationshipXml.cpp | 137 + .../DocXml/SchemaTypesXml/RelationshipXml.cpp | 137 + .../src/Doc/DocXml/SchemaTypesXml/stdafx.h | 27 + .../src/Exception/CBacktraceUtils.cpp | 142 + .../Framework/src/Exception/CBacktraceUtils.h | 32 + .../Framework/src/Exception/CCafException.cpp | 146 + .../src/Exception/CCafExceptionEx.cpp | 44 + .../Framework/src/Exception/CCafExceptionEx.h | 70 + .../Framework/src/Exception/CValidate.cpp | 257 + .../Framework/src/Exception/CValidate.h | 43 + .../Framework/src/Exception/ClassMacros.h | 96 + .../src/Exception/ExceptionExMacros.h | 67 + .../Framework/src/Exception/ExceptionLink.h | 33 + .../Framework/src/Exception/ExceptionMacros.h | 157 + .../Framework/src/Exception/StatusMacros.h | 32 + .../src/Exception/ValidationMacros.h | 146 + .../src/Exception/ValidationMacrosRaw.h | 76 + .../Framework/src/Exception/stdafx.h | 24 + .../Integration/Caf/CBeanPropertiesHelper.cpp | 95 + .../Integration/Caf/CCafMessageCreator.cpp | 468 + .../Integration/Caf/CCafMessageHeaders.cpp | 418 + .../Caf/CCafMessageHeadersWriter.cpp | 223 + .../Integration/Caf/CCafMessagePayload.cpp | 197 + .../Caf/CCafMessagePayloadParser.cpp | 103 + .../Framework/src/Integration/Caf/stdafx.h | 21 + .../Core/CAbstractMessageChannel.cpp | 69 + .../Core/CAbstractMessageRouter.cpp | 96 + .../Core/CAbstractPollableChannel.cpp | 88 + .../Core/CBroadcastingDispatcher.cpp | 133 + .../Core/CChannelInterceptorAdapter.cpp | 41 + .../src/Integration/Core/CChannelResolver.cpp | 86 + .../src/Integration/Core/CDocument.cpp | 298 + .../src/Integration/Core/CErrorHandler.cpp | 95 + .../Integration/Core/CExpressionHandler.cpp | 136 + .../src/Integration/Core/CIntException.cpp | 95 + .../src/Integration/Core/CIntMessage.cpp | 240 + .../Integration/Core/CIntMessageHeaders.cpp | 130 + .../Core/CIntegrationAppContext.cpp | 701 + .../src/Integration/Core/CMessageHandler.cpp | 166 + .../Integration/Core/CMessageHeaderUtils.cpp | 199 + .../Integration/Core/CMessagingTemplate.cpp | 154 + .../Core/CMessagingTemplateHandler.cpp | 53 + .../Core/CSimpleAsyncTaskExecutor.cpp | 230 + .../Core/CSimpleAsyncTaskExecutorState.cpp | 159 + .../Core/CSourcePollingChannelAdapter.cpp | 138 + .../Core/CUnicastingDispatcher.cpp | 116 + .../src/Integration/Core/FileHeaders.cpp | 16 + .../src/Integration/Core/MessageHeaders.cpp | 57 + .../Framework/src/Integration/Core/stdafx.h | 23 + .../Framework/src/Logging/CLogger.cpp | 116 + .../Framework/Framework/src/Logging/CLogger.h | 62 + .../Framework/src/Logging/LoggingLink.h | 37 + .../Framework/src/Logging/LoggingMacros.h | 250 + .../Framework/Framework/src/Logging/stdafx.h | 34 + .../Framework/Framework/src/PlatformIID.cpp | 160 + .../Framework/src/PlatformStringFunc.cpp | 36 + .../src/SubSystemBase/CEcmDllManager.cpp | 829 + .../src/SubSystemBase/CEcmDllManager.h | 47 + .../src/SubSystemBase/CEcmSubSystem.cpp | 339 + .../src/SubSystemBase/CEcmSubSystem.h | 70 + .../src/SubSystemBase/CEcmSubSystemModule.cpp | 300 + .../src/SubSystemBase/CEcmSubSystemModule.h | 43 + .../SubSystemBase/CEcmSubSystemRegistry.cpp | 26 + .../src/SubSystemBase/CEcmSubSystemRegistry.h | 22 + .../src/SubSystemBase/EcmSubSystemBase.cpp | 108 + .../src/SubSystemBase/EcmSubSystemBase.h | 164 + .../src/SubSystemBase/SubSystemBaseInc.h | 13 + .../src/SubSystemBase/SubSystemBaseLink.h | 29 + .../src/SubSystemBase/TCafSubSystemCreator.h | 132 + .../src/SubSystemBase/TCafSubSystemObject.h | 72 + .../SubSystemBase/TCafSubSystemObjectRoot.h | 214 + .../src/SubSystemBase/TCafSubSystemSmartCl.h | 608 + .../Framework/src/SubSystemBase/stdafx.h | 19 + .../src/Xml/MarkupParser/CMarkupParser.cpp | 250 + .../src/Xml/MarkupParser/MarkupParserLink.h | 24 + .../Framework/src/Xml/MarkupParser/stdafx.h | 24 + .../src/Xml/XmlUtils/CXmlElement.cpp | 417 + .../Framework/src/Xml/XmlUtils/CXmlUtils.cpp | 135 + .../Framework/src/Xml/XmlUtils/CXmlUtils.h | 45 + .../Framework/src/Xml/XmlUtils/XmlUtilsLink.h | 25 + .../Framework/src/Xml/XmlUtils/stdafx.h | 27 + .../Cpp/Framework/Framework/src/stdafx.h | 17 + .../common-agent/Cpp/Framework/Makefile.am | 428 + .../CEnvelopeToPayloadTransformerInstance.h | 91 + .../include/CafIntegrationSubsys.h | 20 + .../src/CEnvelopeToPayloadTransformer.cpp | 68 + .../src/CEnvelopeToPayloadTransformer.h | 63 + .../CEnvelopeToPayloadTransformerInstance.cpp | 138 + .../src/CErrorToResponseTransformer.cpp | 84 + .../src/CErrorToResponseTransformer.h | 63 + .../CErrorToResponseTransformerInstance.cpp | 135 + .../src/CErrorToResponseTransformerInstance.h | 68 + .../src/CPayloadHeaderEnricher.cpp | 85 + .../src/CPayloadHeaderEnricher.h | 65 + .../src/CPayloadHeaderEnricherInstance.cpp | 109 + .../src/CPayloadHeaderEnricherInstance.h | 70 + .../CafIntegration/src/CafIntegration.cpp | 56 + .../Subsystems/CafIntegration/src/stdafx.h | 25 + .../include/CFileReadingMessageSource.h | 78 + .../include/CMessageHandlerChainInstance.h | 167 + .../include/CXPathHeaderEnricherItem.h | 55 + .../Integration/include/IntegrationSubsys.h | 19 + .../src/CDirectChannelInstance.cpp | 119 + .../Integration/src/CDirectChannelInstance.h | 85 + .../Integration/src/CErrorChannel.cpp | 91 + .../Integration/src/CErrorChannel.h | 64 + .../Integration/src/CErrorChannelInstance.cpp | 142 + .../Integration/src/CErrorChannelInstance.h | 81 + .../CFileInboundChannelAdapterInstance.cpp | 161 + .../src/CFileInboundChannelAdapterInstance.h | 77 + .../CFileOutboundChannelAdapterInstance.cpp | 186 + .../src/CFileOutboundChannelAdapterInstance.h | 96 + .../src/CFileReadingMessageSource.cpp | 207 + .../src/CFileToStringTransformerInstance.cpp | 109 + .../src/CFileToStringTransformerInstance.h | 69 + .../CHeaderEnricherTransformerInstance.cpp | 184 + .../src/CHeaderEnricherTransformerInstance.h | 76 + .../src/CHeaderExpressionInvoker.cpp | 84 + .../src/CHeaderExpressionInvoker.h | 59 + .../src/CHeaderValueRouterInstance.cpp | 208 + .../src/CHeaderValueRouterInstance.h | 74 + .../src/CIntegrationObjectFactory.cpp | 76 + .../src/CIntegrationObjectFactory.h | 61 + .../src/CLoggingChannelAdapterInstance.cpp | 128 + .../src/CLoggingChannelAdapterInstance.h | 70 + .../src/CMessageHandlerChainInstance.cpp | 474 + .../Integration/src/CNullChannel.cpp | 89 + .../Subsystems/Integration/src/CNullChannel.h | 64 + .../Integration/src/CNullChannelInstance.cpp | 84 + .../Integration/src/CNullChannelInstance.h | 70 + .../Integration/src/CObjectFactoryTables.cpp | 156 + .../Integration/src/CObjectFactoryTables.h | 23 + .../src/CPayloadContentRouterInstance.cpp | 208 + .../src/CPayloadContentRouterInstance.h | 73 + .../src/CPublishSubscribeChannelInstance.cpp | 138 + .../src/CPublishSubscribeChannelInstance.h | 86 + .../Integration/src/CQueueChannelInstance.cpp | 120 + .../Integration/src/CQueueChannelInstance.h | 75 + .../src/CRecipientListRouterInstance.cpp | 198 + .../src/CRecipientListRouterInstance.h | 72 + .../Integration/src/CRouterInstance.cpp | 198 + .../Integration/src/CRouterInstance.h | 72 + .../src/CServiceActivatorInstance.cpp | 199 + .../src/CServiceActivatorInstance.h | 73 + .../Integration/src/CWireTapInstance.cpp | 184 + .../Integration/src/CWireTapInstance.h | 90 + .../src/CXPathHeaderEnricherItem.cpp | 67 + ...XPathHeaderEnricherTransformerInstance.cpp | 216 + .../CXPathHeaderEnricherTransformerInstance.h | 86 + .../Integration/src/Integration.cpp | 54 + .../Subsystems/Integration/src/stdafx.h | 43 + .../include/CIniFileWithoutSection.h | 104 + .../Config_Provider/src/CConfigProvider.cpp | 510 + .../Config_Provider/src/CConfigProvider.h | 103 + .../src/CIniFileWithoutSection.cpp | 479 + .../Config_Provider/src/ConfigProvider.cpp | 28 + .../Config_Provider/src/stdafx.h | 19 + .../include/CPackageInstaller.h | 106 + .../include/CProviderInstaller.h | 86 + .../Install_Provider/include/IPackage.h | 41 + .../Install_Provider/src/CInstallProvider.cpp | 253 + .../Install_Provider/src/CInstallProvider.h | 60 + .../Install_Provider/src/CInstallUtils.cpp | 58 + .../Install_Provider/src/CInstallUtils.h | 32 + .../Install_Provider/src/CPackageExecutor.cpp | 158 + .../Install_Provider/src/CPackageExecutor.h | 47 + .../src/CPackageInstaller.cpp | 656 + .../Install_Provider/src/CPathBuilder.cpp | 203 + .../Install_Provider/src/CPathBuilder.h | 50 + .../src/CProviderInstaller.cpp | 411 + .../Install_Provider/src/InstallProvider.cpp | 33 + .../Install_Provider/src/stdafx.h | 31 + .../Cpp/InternalProviders/Makefile.am | 113 + .../src/CRemoteCommandProvider.cpp | 195 + .../src/CRemoteCommandProvider.h | 63 + .../src/RemoteCommandProvider.cpp | 28 + .../RemoteCommand_Provider/src/stdafx.h | 19 + .../src/CTestInfraProvider.cpp | 150 + .../src/CTestInfraProvider.h | 57 + .../src/TestInfraProvider.cpp | 28 + .../TestInfra_Provider/src/stdafx.h | 19 + .../Cpp/ManagementAgent/Makefile.am | 126 + .../include/CManagementAgentHostWork.h | 44 + .../src/CManagementAgentHostWork.cpp | 86 + .../src/ManagementAgentHost.cpp | 16 + .../src/ManagementAgentHostMain.cpp | 190 + .../ManagementAgent/src/stdafx.h | 19 + .../CAttachmentRequestTransformerInstance.h | 92 + .../include/CConfigEnvReadingMessageSource.h | 56 + .../CDiagToMgmtRequestTransformerInstance.h | 121 + .../include/CMonitorReadingMessageSource.h | 90 + .../CPersistenceReadingMessageSource.h | 56 + .../include/CProviderExecutorRequest.h | 48 + .../include/CProviderExecutorRequestHandler.h | 74 + .../MaIntegration/include/CResponseFactory.h | 89 + .../include/CSchemaCacheManager.h | 71 + .../CSinglePmeRequestSplitterInstance.h | 141 + .../MaIntegration/include/IConfigEnv.h | 38 + .../MaIntegration/include/IPersistence.h | 39 + .../MaIntegration/include/MaIntegration.h | 38 + .../src/CAttachmentRequestTransformer.cpp | 84 + .../src/CAttachmentRequestTransformer.h | 64 + .../CAttachmentRequestTransformerInstance.cpp | 247 + .../src/CCollectSchemaExecutor.cpp | 110 + .../src/CCollectSchemaExecutor.h | 56 + .../MaIntegration/src/CConfigEnv.cpp | 239 + .../Subsystems/MaIntegration/src/CConfigEnv.h | 102 + ...ConfigEnvInboundChannelAdapterInstance.cpp | 144 + .../CConfigEnvInboundChannelAdapterInstance.h | 83 + .../MaIntegration/src/CConfigEnvMerge.cpp | 301 + .../MaIntegration/src/CConfigEnvMerge.h | 55 + .../src/CConfigEnvMessageHandler.cpp | 84 + .../src/CConfigEnvMessageHandler.h | 67 + ...onfigEnvOutboundChannelAdapterInstance.cpp | 160 + ...CConfigEnvOutboundChannelAdapterInstance.h | 82 + .../src/CConfigEnvReadingMessageSource.cpp | 80 + .../src/CDiagToMgmtRequestTransformer.cpp | 84 + .../src/CDiagToMgmtRequestTransformer.h | 64 + .../CDiagToMgmtRequestTransformerInstance.cpp | 491 + .../src/CInstallToMgmtRequestTransformer.cpp | 84 + .../src/CInstallToMgmtRequestTransformer.h | 64 + ...nstallToMgmtRequestTransformerInstance.cpp | 385 + ...CInstallToMgmtRequestTransformerInstance.h | 106 + .../CMonitorInboundChannelAdapterInstance.cpp | 124 + .../CMonitorInboundChannelAdapterInstance.h | 78 + .../src/CMonitorReadingMessageSource.cpp | 227 + ...rsistenceInboundChannelAdapterInstance.cpp | 162 + ...PersistenceInboundChannelAdapterInstance.h | 83 + .../MaIntegration/src/CPersistenceMerge.cpp | 419 + .../MaIntegration/src/CPersistenceMerge.h | 78 + .../src/CPersistenceMessageHandler.cpp | 83 + .../src/CPersistenceMessageHandler.h | 67 + .../src/CPersistenceNamespaceDb.cpp | 606 + .../src/CPersistenceNamespaceDb.h | 108 + ...sistenceOutboundChannelAdapterInstance.cpp | 144 + ...ersistenceOutboundChannelAdapterInstance.h | 78 + .../src/CPersistenceReadingMessageSource.cpp | 80 + .../src/CProviderCollectSchemaExecutor.cpp | 347 + .../src/CProviderCollectSchemaExecutor.h | 86 + .../MaIntegration/src/CProviderExecutor.cpp | 145 + .../MaIntegration/src/CProviderExecutor.h | 82 + .../src/CProviderExecutorRequest.cpp | 86 + .../src/CProviderExecutorRequestHandler.cpp | 263 + .../MaIntegration/src/CResponseFactory.cpp | 389 + .../MaIntegration/src/CSchemaCacheManager.cpp | 236 + .../src/CSinglePmeRequestSplitter.cpp | 84 + .../src/CSinglePmeRequestSplitter.h | 66 + .../src/CSinglePmeRequestSplitterInstance.cpp | 458 + .../MaIntegration/src/CVersionTransformer.cpp | 84 + .../MaIntegration/src/CVersionTransformer.h | 64 + .../src/CVersionTransformerInstance.cpp | 181 + .../src/CVersionTransformerInstance.h | 85 + .../MaIntegration/src/IntegrationObjects.cpp | 88 + .../MaIntegration/src/IntegrationObjects.h | 61 + .../MaIntegration/src/MaContracts.h | 15 + .../MaIntegration/src/MaIntegration.cpp | 85 + .../Subsystems/MaIntegration/src/stdafx.h | 52 + .../VgAuth/include/CVgAuthContext.h | 41 + .../VgAuth/include/CVgAuthImpersonation.h | 54 + .../VgAuth/include/CVgAuthUserHandle.h | 51 + .../VgAuth/include/IVgAuthImpersonation.h | 25 + .../VgAuth/src/CGuestAuthenticator.cpp | 88 + .../VgAuth/src/CGuestAuthenticator.h | 66 + .../src/CGuestAuthenticatorInstance.cpp | 271 + .../VgAuth/src/CGuestAuthenticatorInstance.h | 90 + .../Subsystems/VgAuth/src/CVgAuthContext.cpp | 61 + .../Subsystems/VgAuth/src/CVgAuthError.cpp | 214 + .../Subsystems/VgAuth/src/CVgAuthError.h | 45 + .../VgAuth/src/CVgAuthImpersonation.cpp | 82 + .../VgAuth/src/CVgAuthInitializer.cpp | 120 + .../VgAuth/src/CVgAuthInitializer.h | 61 + .../VgAuth/src/CVgAuthUserHandle.cpp | 102 + .../VgAuth/src/VgAuthIntegration.cpp | 48 + .../Subsystems/VgAuth/src/stdafx.h | 29 + .../common-agent/Cpp/ProviderFx/Makefile.am | 44 + .../ProviderFx/include/CProviderDocHelper.h | 116 + .../ProviderFx/include/CProviderDriver.h | 77 + .../ProviderFx/include/IInvokedProvider.h | 36 + .../ProviderFx/include/IProviderRequest.h | 39 + .../ProviderFx/include/IProviderResponse.h | 28 + .../ProviderFx/include/ProviderFxLink.h | 26 + .../ProviderFx/src/CProviderCdifFormatter.cpp | 223 + .../ProviderFx/src/CProviderCdifFormatter.h | 69 + .../ProviderFx/src/CProviderDocHelper.cpp | 191 + .../ProviderFx/src/CProviderDriver.cpp | 390 + .../ProviderFx/src/CProviderRequest.h | 79 + .../ProviderFx/ProviderFx/src/ProviderFx.cpp | 13 + .../Cpp/ProviderFx/ProviderFx/src/stdafx.h | 21 + open-vm-tools/common-agent/etc/Makefile.am | 24 + .../common-agent/etc/install/Makefile.am | 36 + .../etc/install/caf-c-communication-service | 81 + .../etc/install/caf-c-management-agent | 81 + .../common-agent/etc/install/caf-dbg.sh | 542 + .../common-agent/etc/install/caf-vgauth | 81 + .../common-agent/etc/install/commonenv.sh | 1 + .../common-agent/etc/install/install.sh | 199 + .../etc/install/postinstallInstall.sh | 7 + .../etc/install/postinstallUpgrade.sh | 7 + .../etc/install/preinstallUpgrade.sh | 9 + .../etc/install/preremoveUninstall.sh | 7 + .../common-agent/etc/install/preuninstall.sh | 40 + .../common-agent/etc/install/preupgrade.sh | 11 + .../etc/install/restartServices.sh | 13 + .../etc/install/stopAndRemoveServices.sh | 14 + .../common-agent/etc/install/upgrade.sh | 102 + .../common-agent/etc/scripts/Makefile.am | 35 + .../common-agent/etc/scripts/caf-common | 194 + .../common-agent/etc/scripts/caf-processes.sh | 191 + .../etc/scripts/is-listener-running | 9 + .../common-agent/etc/scripts/is-ma-running | 9 + .../common-agent/etc/scripts/setUpVgAuth | 39 + .../etc/scripts/start-VGAuthService | 32 + .../common-agent/etc/scripts/start-listener | 29 + .../common-agent/etc/scripts/start-ma | 30 + .../common-agent/etc/scripts/startTestProc | 6 + .../etc/scripts/stop-VGAuthService | 7 + .../common-agent/etc/scripts/stop-listener | 9 + .../common-agent/etc/scripts/stop-ma | 10 + .../common-agent/etc/scripts/tearDownVgAuth | 39 + open-vm-tools/common-agent/etc/scripts/vgAuth | 82 + open-vm-tools/common-agent/input/Makefile.am | 23 + .../input/installProviderHeader.sh | 9 + .../common-agent/input/invokers/Makefile.am | 24 + ...cafTestInfra_CafTestInfraProvider_1_0_0.sh | 4 + .../invokers/caf_ConfigProvider_1_0_0.sh | 4 + .../invokers/caf_InstallProvider_1_0_0.sh | 4 + .../caf_RemoteCommandProvider_1_0_0.sh | 4 + .../input/providerReg/Makefile.am | 24 + ...afTestInfra_CafTestInfraProvider_1_0_0.xml | 12 + .../providerReg/caf_ConfigProvider_1_0_0.xml | 12 + .../providerReg/caf_InstallProvider_1_0_0.xml | 12 + .../caf_RemoteCommandProvider_1_0_0.xml | 12 + open-vm-tools/config/compile | 142 - open-vm-tools/config/config.guess | 1500 - open-vm-tools/config/config.sub | 1616 - open-vm-tools/config/depcomp | 584 - open-vm-tools/config/install-sh | 507 - open-vm-tools/config/ltmain.sh | 7750 ---- open-vm-tools/config/missing | 367 - open-vm-tools/configure | 34205 ---------------- open-vm-tools/configure.ac | 344 +- open-vm-tools/docs/Makefile.am | 2 +- open-vm-tools/docs/Makefile.in | 582 - open-vm-tools/docs/api/Makefile.am | 2 +- open-vm-tools/docs/api/Makefile.in | 458 - open-vm-tools/docs/api/services/debug.txt | 2 +- open-vm-tools/docs/api/services/guestrpc.txt | 2 +- open-vm-tools/docs/api/services/main.doxy | 2 +- open-vm-tools/docs/api/services/plugins.txt | 2 +- open-vm-tools/guestproxycerttool/Makefile.am | 2 +- open-vm-tools/guestproxycerttool/Makefile.in | 616 - open-vm-tools/guestproxycerttool/cert_key.c | 8 +- open-vm-tools/guestproxycerttool/cert_key.h | 2 +- open-vm-tools/guestproxycerttool/cert_tool.c | 2 +- .../guestproxycerttool/cert_tool_version.h | 2 +- open-vm-tools/guestproxycerttool/cert_util.c | 4 +- open-vm-tools/guestproxycerttool/cert_util.h | 2 +- open-vm-tools/hgfsclient/Makefile.am | 2 +- open-vm-tools/hgfsclient/Makefile.in | 583 - open-vm-tools/hgfsclient/hgfsclient.c | 2 +- open-vm-tools/hgfsclient/hgfsclient_version.h | 2 +- open-vm-tools/hgfsmounter/Makefile.am | 2 +- open-vm-tools/hgfsmounter/Makefile.in | 585 - open-vm-tools/hgfsmounter/hgfsmounter.c | 2 +- .../hgfsmounter/hgfsmounter_version.h | 2 +- open-vm-tools/lib/Makefile.am | 2 +- open-vm-tools/lib/Makefile.in | 599 - open-vm-tools/lib/appUtil/Makefile.am | 2 +- open-vm-tools/lib/appUtil/Makefile.in | 534 - open-vm-tools/lib/appUtil/appUtil.c | 2 +- open-vm-tools/lib/appUtil/appUtilX11.c | 6 +- open-vm-tools/lib/asyncsocket/Makefile.am | 3 +- open-vm-tools/lib/asyncsocket/Makefile.in | 533 - .../lib/asyncsocket/asyncSocketInt.h | 207 +- .../lib/asyncsocket/asyncSocketInterface.c | 969 + open-vm-tools/lib/asyncsocket/asyncsocket.c | 804 +- open-vm-tools/lib/auth/Makefile.am | 2 +- open-vm-tools/lib/auth/Makefile.in | 533 - open-vm-tools/lib/auth/authPosix.c | 2 +- open-vm-tools/lib/backdoor/Makefile.am | 2 +- open-vm-tools/lib/backdoor/Makefile.in | 541 - open-vm-tools/lib/backdoor/backdoor.c | 2 +- open-vm-tools/lib/backdoor/backdoorGcc32.c | 2 +- open-vm-tools/lib/backdoor/backdoorGcc64.c | 2 +- open-vm-tools/lib/backdoor/backdoorInt.h | 2 +- open-vm-tools/lib/dataMap/Makefile.am | 2 +- open-vm-tools/lib/dataMap/Makefile.in | 532 - open-vm-tools/lib/dataMap/dataMap.c | 2 +- open-vm-tools/lib/dict/Makefile.am | 2 +- open-vm-tools/lib/dict/Makefile.in | 532 - open-vm-tools/lib/dict/dictll.c | 2 +- open-vm-tools/lib/dynxdr/Makefile.am | 2 +- open-vm-tools/lib/dynxdr/Makefile.in | 533 - open-vm-tools/lib/dynxdr/dynxdr.c | 2 +- open-vm-tools/lib/dynxdr/xdrutil.c | 2 +- open-vm-tools/lib/err/Makefile.am | 2 +- open-vm-tools/lib/err/Makefile.in | 533 - open-vm-tools/lib/err/err.c | 2 +- open-vm-tools/lib/err/errInt.h | 2 +- open-vm-tools/lib/err/errPosix.c | 2 +- open-vm-tools/lib/file/Makefile.am | 2 +- open-vm-tools/lib/file/Makefile.in | 544 - open-vm-tools/lib/file/file.c | 4 +- open-vm-tools/lib/file/fileIO.c | 2 +- open-vm-tools/lib/file/fileIOPosix.c | 3 +- open-vm-tools/lib/file/fileInt.h | 2 +- open-vm-tools/lib/file/fileLockPosix.c | 2 +- open-vm-tools/lib/file/fileLockPrimitive.c | 2 +- open-vm-tools/lib/file/filePosix.c | 68 +- open-vm-tools/lib/file/fileStandAlone.c | 2 +- open-vm-tools/lib/file/fileTemp.c | 2 +- open-vm-tools/lib/file/fileTempPosix.c | 3 +- open-vm-tools/lib/foundryMsg/Makefile.am | 2 +- open-vm-tools/lib/foundryMsg/Makefile.in | 536 - open-vm-tools/lib/foundryMsg/foundryMsg.c | 2 +- .../foundryMsg/foundryPropertyListCommon.c | 2 +- .../foundryMsg/vixTranslateErrOpenSource.c | 2 +- open-vm-tools/lib/glibUtils/Makefile.am | 2 +- open-vm-tools/lib/glibUtils/Makefile.in | 557 - open-vm-tools/lib/glibUtils/fileLogger.c | 8 +- open-vm-tools/lib/glibUtils/stdLogger.c | 2 +- open-vm-tools/lib/glibUtils/sysLogger.c | 2 +- open-vm-tools/lib/guestApp/Makefile.am | 2 +- open-vm-tools/lib/guestApp/Makefile.in | 532 - open-vm-tools/lib/guestApp/guestApp.c | 2 +- open-vm-tools/lib/guestRpc/Makefile.am | 2 +- open-vm-tools/lib/guestRpc/Makefile.in | 549 - open-vm-tools/lib/guestRpc/nicinfo.x | 2 +- open-vm-tools/lib/hashMap/Makefile.am | 2 +- open-vm-tools/lib/hashMap/Makefile.in | 532 - open-vm-tools/lib/hashMap/hashMap.c | 221 +- open-vm-tools/lib/hgfs/Makefile.am | 2 +- open-vm-tools/lib/hgfs/Makefile.in | 540 - open-vm-tools/lib/hgfs/cpName.c | 2 +- open-vm-tools/lib/hgfs/cpNameInt.h | 2 +- open-vm-tools/lib/hgfs/cpNameLinux.c | 2 +- open-vm-tools/lib/hgfs/cpNameLite.c | 2 +- open-vm-tools/lib/hgfs/cpNameUtil.c | 2 +- open-vm-tools/lib/hgfs/cpNameUtilInt.h | 2 +- open-vm-tools/lib/hgfs/cpNameUtilLinux.c | 2 +- open-vm-tools/lib/hgfs/hgfsEscape.c | 13 +- open-vm-tools/lib/hgfs/hgfsUtil.c | 6 +- open-vm-tools/lib/hgfsBd/Makefile.am | 2 +- open-vm-tools/lib/hgfsBd/Makefile.in | 532 - open-vm-tools/lib/hgfsBd/hgfsBd.c | 14 +- open-vm-tools/lib/hgfsHelper/Makefile.am | 2 +- open-vm-tools/lib/hgfsHelper/Makefile.in | 532 - .../lib/hgfsHelper/hgfsHelperPosix.c | 2 +- open-vm-tools/lib/hgfsServer/Makefile.am | 2 +- open-vm-tools/lib/hgfsServer/Makefile.in | 545 - open-vm-tools/lib/hgfsServer/hgfsDirNotify.h | 2 +- .../lib/hgfsServer/hgfsDirNotifyStub.c | 2 +- open-vm-tools/lib/hgfsServer/hgfsServer.c | 453 +- open-vm-tools/lib/hgfsServer/hgfsServerInt.h | 22 +- .../lib/hgfsServer/hgfsServerLinux.c | 78 +- .../lib/hgfsServer/hgfsServerOplock.c | 2 +- .../lib/hgfsServer/hgfsServerOplock.h | 2 +- .../lib/hgfsServer/hgfsServerOplockInt.h | 2 +- .../lib/hgfsServer/hgfsServerOplockLinux.c | 2 +- .../lib/hgfsServer/hgfsServerPacketUtil.c | 53 +- .../lib/hgfsServer/hgfsServerParameters.c | 22 +- .../lib/hgfsServer/hgfsServerParameters.h | 2 +- .../lib/hgfsServerManagerGuest/Makefile.am | 2 +- .../lib/hgfsServerManagerGuest/Makefile.in | 537 - .../hgfsServerManagerGuest/hgfsChannelGuest.c | 2 +- .../hgfsChannelGuestBd.c | 2 +- .../hgfsChannelGuestInt.h | 2 +- .../hgfsServerManagerGuest.c | 2 +- .../lib/hgfsServerPolicyGuest/Makefile.am | 2 +- .../lib/hgfsServerPolicyGuest/Makefile.in | 533 - .../hgfsServerPolicyGuest.c | 61 +- open-vm-tools/lib/hgfsUri/Makefile.am | 2 +- open-vm-tools/lib/hgfsUri/hgfsUriPosix.c | 2 +- open-vm-tools/lib/impersonate/Makefile.am | 2 +- open-vm-tools/lib/impersonate/Makefile.in | 534 - open-vm-tools/lib/impersonate/impersonate.c | 3 +- .../lib/impersonate/impersonateInt.h | 2 +- .../lib/impersonate/impersonatePosix.c | 2 +- open-vm-tools/lib/include/appUtil.h | 16 +- open-vm-tools/lib/include/asyncsocket.h | 66 +- open-vm-tools/lib/include/auth.h | 2 +- open-vm-tools/lib/include/backdoor.h | 2 +- open-vm-tools/lib/include/backdoor_def.h | 67 +- open-vm-tools/lib/include/backdoor_types.h | 8 +- open-vm-tools/lib/include/base64.h | 2 +- open-vm-tools/lib/include/bsd_output.h | 2 +- open-vm-tools/lib/include/buildNumber.h | 12 +- open-vm-tools/lib/include/capsProvider.h | 2 +- open-vm-tools/lib/include/circList.h | 230 +- open-vm-tools/lib/include/clamped.h | 35 +- open-vm-tools/lib/include/codeset.h | 6 +- open-vm-tools/lib/include/community_source.h | 2 +- .../lib/include/compat/compat_stdarg.h | 2 +- open-vm-tools/lib/include/conf.h | 3 +- open-vm-tools/lib/include/config.h | 13 +- open-vm-tools/lib/include/cpName.h | 2 +- open-vm-tools/lib/include/cpNameLite.h | 2 +- open-vm-tools/lib/include/cpNameUtil.h | 2 +- open-vm-tools/lib/include/cpuid_info.h | 2 +- open-vm-tools/lib/include/cryptoError.h | 3 +- open-vm-tools/lib/include/dataMap.h | 2 +- open-vm-tools/lib/include/dbllnklst.h | 2 +- open-vm-tools/lib/include/debug.h | 2 +- .../lib/include/deployPkg/linuxDeployment.h | 46 +- open-vm-tools/lib/include/dictll.h | 2 +- open-vm-tools/lib/include/dynarray.h | 2 +- open-vm-tools/lib/include/dynbuf.h | 4 +- open-vm-tools/lib/include/dynxdr.h | 2 +- open-vm-tools/lib/include/embed_version.h | 2 +- open-vm-tools/lib/include/err.h | 2 +- open-vm-tools/lib/include/escBitvector.h | 2 +- open-vm-tools/lib/include/escape.h | 2 +- open-vm-tools/lib/include/file.h | 8 +- open-vm-tools/lib/include/fileIO.h | 2 +- open-vm-tools/lib/include/fileLock.h | 2 +- open-vm-tools/lib/include/file_extensions.h | 2 +- open-vm-tools/lib/include/glibUtils.h | 2 +- open-vm-tools/lib/include/guestApp.h | 2 +- open-vm-tools/lib/include/guestInfo.h | 2 +- open-vm-tools/lib/include/guestStats.h | 2 +- open-vm-tools/lib/include/guest_msg_def.h | 2 +- open-vm-tools/lib/include/guest_os.h | 46 +- open-vm-tools/lib/include/guest_os_tables.h | 363 +- open-vm-tools/lib/include/hashMap.h | 4 +- open-vm-tools/lib/include/hashTable.h | 8 +- open-vm-tools/lib/include/hgfs.h | 23 +- open-vm-tools/lib/include/hgfsBd.h | 2 +- open-vm-tools/lib/include/hgfsDevLinux.h | 2 +- open-vm-tools/lib/include/hgfsEscape.h | 2 +- open-vm-tools/lib/include/hgfsHelper.h | 2 +- open-vm-tools/lib/include/hgfsProto.h | 19 +- open-vm-tools/lib/include/hgfsServer.h | 6 +- open-vm-tools/lib/include/hgfsServerManager.h | 2 +- open-vm-tools/lib/include/hgfsServerPolicy.h | 7 +- open-vm-tools/lib/include/hgfsTransport.h | 2 +- open-vm-tools/lib/include/hgfsUri.h | 2 +- open-vm-tools/lib/include/hgfsUtil.h | 2 +- open-vm-tools/lib/include/hgfsVirtualDir.h | 2 +- open-vm-tools/lib/include/hostType.h | 2 +- open-vm-tools/lib/include/hostinfo.h | 2 +- .../lib/include/imgcust-common/imgcust-api.h | 37 +- .../lib/include/imgcust-common/log.h | 11 +- .../lib/include/imgcust-common/process.h | 112 +- .../include/imgcust-guest/guestcust-events.h | 15 +- open-vm-tools/lib/include/impersonate.h | 2 +- open-vm-tools/lib/include/includeCheck.h | 2 +- open-vm-tools/lib/include/iovector.h | 2 +- open-vm-tools/lib/include/libExport.hh | 2 +- open-vm-tools/lib/include/localconfig.h | 2 +- open-vm-tools/lib/include/log.h | 2 +- open-vm-tools/lib/include/logFixed.h | 2 +- open-vm-tools/lib/include/loglevel_defs.h | 2 +- open-vm-tools/lib/include/loglevel_user.h | 21 +- open-vm-tools/lib/include/memaligned.h | 2 +- open-vm-tools/lib/include/message.h | 2 +- open-vm-tools/lib/include/miscSolaris.h | 2 +- open-vm-tools/lib/include/mntinfo.h | 2 +- open-vm-tools/lib/include/msg.h | 2 +- open-vm-tools/lib/include/msgList.h | 4 +- open-vm-tools/lib/include/msgfmt.h | 2 +- open-vm-tools/lib/include/msgid.h | 2 +- open-vm-tools/lib/include/msgid_defs.h | 2 +- open-vm-tools/lib/include/mutexRank.h | 2 +- open-vm-tools/lib/include/mutexRankLib.h | 14 +- open-vm-tools/lib/include/netutil.h | 2 +- open-vm-tools/lib/include/nicInfo.h | 2 +- open-vm-tools/lib/include/panic.h | 2 +- open-vm-tools/lib/include/poll.h | 2 +- open-vm-tools/lib/include/pollImpl.h | 2 +- open-vm-tools/lib/include/posix.h | 2 +- open-vm-tools/lib/include/preference.h | 2 +- open-vm-tools/lib/include/procMgr.h | 2 +- open-vm-tools/lib/include/productState.h | 7 +- open-vm-tools/lib/include/random.h | 63 +- open-vm-tools/lib/include/removable_device.h | 2 +- open-vm-tools/lib/include/rpcin.h | 2 +- open-vm-tools/lib/include/rpcout.h | 4 +- open-vm-tools/lib/include/rpcvmx.h | 2 +- open-vm-tools/lib/include/safetime.h | 2 +- open-vm-tools/lib/include/sha1.h | 13 +- open-vm-tools/lib/include/sigPosixRegs.h | 8 +- open-vm-tools/lib/include/slashProc.h | 2 +- open-vm-tools/lib/include/sslDirect.h | 4 +- open-vm-tools/lib/include/str.h | 2 +- open-vm-tools/lib/include/strutil.h | 4 +- open-vm-tools/lib/include/su.h | 2 +- open-vm-tools/lib/include/syncDriver.h | 2 +- open-vm-tools/lib/include/syncDriverIoc.h | 2 +- open-vm-tools/lib/include/syncEvent.h | 2 +- open-vm-tools/lib/include/system.h | 2 +- open-vm-tools/lib/include/timeutil.h | 2 +- open-vm-tools/lib/include/tracer.hh | 2 +- open-vm-tools/lib/include/unicode.h | 2 +- open-vm-tools/lib/include/unicodeBase.h | 16 +- open-vm-tools/lib/include/unicodeICU.h | 2 +- open-vm-tools/lib/include/unicodeOperations.h | 2 +- open-vm-tools/lib/include/unicodeTransforms.h | 2 +- open-vm-tools/lib/include/unicodeTypes.h | 2 +- open-vm-tools/lib/include/userlock.h | 2 +- open-vm-tools/lib/include/util.h | 7 +- open-vm-tools/lib/include/util_shared.h | 198 - open-vm-tools/lib/include/uuid.h | 16 +- open-vm-tools/lib/include/vix.h | 2 +- open-vm-tools/lib/include/vixCommands.h | 2 +- open-vm-tools/lib/include/vixOpenSource.h | 2 +- open-vm-tools/lib/include/vmGuestLib.h | 12 +- open-vm-tools/lib/include/vmSessionId.h | 2 +- open-vm-tools/lib/include/vm_api.h | 2 +- open-vm-tools/lib/include/vm_assert.h | 2 +- open-vm-tools/lib/include/vm_atomic.h | 129 +- open-vm-tools/lib/include/vm_basic_asm.h | 6 +- open-vm-tools/lib/include/vm_basic_asm_x86.h | 2 +- .../lib/include/vm_basic_asm_x86_64.h | 2 +- open-vm-tools/lib/include/vm_basic_defs.h | 19 +- open-vm-tools/lib/include/vm_basic_math.h | 2 +- open-vm-tools/lib/include/vm_basic_types.h | 27 +- .../lib/include/vm_compilation_options.h | 2 +- open-vm-tools/lib/include/vm_ctype.h | 2 +- open-vm-tools/lib/include/vm_device_version.h | 31 +- open-vm-tools/lib/include/vm_legal.h | 4 +- open-vm-tools/lib/include/vm_procps.h | 2 +- open-vm-tools/lib/include/vm_product.h | 17 +- .../lib/include/vm_product_versions.h | 100 +- open-vm-tools/lib/include/vm_tools_version.h | 59 +- open-vm-tools/lib/include/vm_version.h | 2 +- open-vm-tools/lib/include/vm_vmx_type.h | 2 +- open-vm-tools/lib/include/vmblock.h | 4 +- open-vm-tools/lib/include/vmblock_user.h | 2 +- open-vm-tools/lib/include/vmcheck.h | 2 +- open-vm-tools/lib/include/vmci_defs.h | 14 +- open-vm-tools/lib/include/vmci_sockets.h | 8 +- open-vm-tools/lib/include/vmfs.h | 2 +- open-vm-tools/lib/include/vmk_exports.h | 2 +- open-vm-tools/lib/include/vmsignal.h | 2 +- open-vm-tools/lib/include/vmstdio.h | 2 +- open-vm-tools/lib/include/vmsupport.h | 2 +- open-vm-tools/lib/include/vmtoolsd_version.h | 2 +- open-vm-tools/lib/include/vmware.h | 2 +- .../include/vmware/guestrpc/capabilities.h | 2 +- .../lib/include/vmware/guestrpc/deploypkg.h | 2 +- .../lib/include/vmware/guestrpc/powerops.h | 2 +- .../lib/include/vmware/guestrpc/tclodefs.h | 2 +- .../lib/include/vmware/guestrpc/timesync.h | 2 +- .../lib/include/vmware/guestrpc/vmbackup.h | 4 +- .../lib/include/vmware/tools/desktopevents.h | 2 +- .../lib/include/vmware/tools/guestrpc.h | 2 +- open-vm-tools/lib/include/vmware/tools/i18n.h | 2 +- open-vm-tools/lib/include/vmware/tools/log.h | 119 +- .../lib/include/vmware/tools/plugin.h | 2 +- .../lib/include/vmware/tools/rpcdebug.h | 2 +- .../lib/include/vmware/tools/threadPool.h | 2 +- .../lib/include/vmware/tools/utils.h | 20 +- .../lib/include/vmware/tools/vmbackup.h | 2 +- open-vm-tools/lib/include/vmware_pack_begin.h | 2 +- open-vm-tools/lib/include/vmware_pack_end.h | 2 +- open-vm-tools/lib/include/vmware_pack_init.h | 2 +- open-vm-tools/lib/include/vmxrpc.h | 2 +- open-vm-tools/lib/include/vthreadBase.h | 2 +- open-vm-tools/lib/include/win32util.h | 2 +- open-vm-tools/lib/include/wiper.h | 2 +- open-vm-tools/lib/include/x86_basic_defs.h | 11 +- open-vm-tools/lib/include/x86cpuid.h | 123 +- open-vm-tools/lib/include/x86cpuid_asm.h | 10 +- open-vm-tools/lib/include/x86vendor.h | 2 +- open-vm-tools/lib/include/xdg.h | 2 +- open-vm-tools/lib/include/xdrutil.h | 2 +- open-vm-tools/lib/lock/Makefile.am | 2 +- open-vm-tools/lib/lock/Makefile.in | 542 - open-vm-tools/lib/lock/ul.c | 2 +- open-vm-tools/lib/lock/ulBarrier.c | 23 +- open-vm-tools/lib/lock/ulCondVar.c | 15 +- open-vm-tools/lib/lock/ulExcl.c | 12 +- open-vm-tools/lib/lock/ulInt.h | 2 +- open-vm-tools/lib/lock/ulIntShared.h | 2 +- open-vm-tools/lib/lock/ulRW.c | 10 +- open-vm-tools/lib/lock/ulRec.c | 12 +- open-vm-tools/lib/lock/ulSema.c | 6 +- open-vm-tools/lib/lock/ulStats.c | 10 +- open-vm-tools/lib/message/Makefile.am | 2 +- open-vm-tools/lib/message/Makefile.in | 532 - open-vm-tools/lib/message/message.c | 2 +- open-vm-tools/lib/misc/Makefile.am | 4 +- open-vm-tools/lib/misc/Makefile.in | 575 - open-vm-tools/lib/misc/atomic.c | 2 +- open-vm-tools/lib/misc/base64.c | 8 +- open-vm-tools/lib/misc/codeset.c | 24 +- open-vm-tools/lib/misc/codesetBase.c | 2 +- open-vm-tools/lib/misc/codesetOld.c | 2 +- open-vm-tools/lib/misc/codesetOld.h | 2 +- open-vm-tools/lib/misc/codesetUTF8.c | 89 + open-vm-tools/lib/misc/dynarray.c | 2 +- open-vm-tools/lib/misc/dynbuf.c | 2 +- open-vm-tools/lib/misc/escape.c | 2 +- open-vm-tools/lib/misc/hashTable.c | 28 +- open-vm-tools/lib/misc/hostType.c | 2 +- open-vm-tools/lib/misc/hostinfo.c | 2 +- open-vm-tools/lib/misc/hostinfoHV.c | 2 +- open-vm-tools/lib/misc/hostinfoInt.h | 2 +- open-vm-tools/lib/misc/hostinfoPosix.c | 83 +- open-vm-tools/lib/misc/hostname.c | 2 +- open-vm-tools/lib/misc/idLinux.c | 2 +- open-vm-tools/lib/misc/iovector.c | 2 +- open-vm-tools/lib/misc/logFixed.c | 2 +- open-vm-tools/lib/misc/machineID.c | 2 +- open-vm-tools/lib/misc/miscSolaris.c | 2 +- open-vm-tools/lib/misc/msgList.c | 10 +- open-vm-tools/lib/misc/msgfmt.c | 2 +- open-vm-tools/lib/misc/posixDlopen.c | 2 +- open-vm-tools/lib/misc/posixInt.h | 2 +- open-vm-tools/lib/misc/posixPosix.c | 4 +- open-vm-tools/lib/misc/posixPwd.c | 2 +- open-vm-tools/lib/misc/prng.c | 217 + open-vm-tools/lib/misc/random.c | 77 +- open-vm-tools/lib/misc/sha1.c | 425 +- open-vm-tools/lib/misc/strutil.c | 163 +- open-vm-tools/lib/misc/timeutil.c | 2 +- open-vm-tools/lib/misc/utilMem.c | 2 +- open-vm-tools/lib/misc/util_misc.c | 66 +- open-vm-tools/lib/misc/vmstdio.c | 2 +- open-vm-tools/lib/misc/vthreadBase.c | 16 +- open-vm-tools/lib/netUtil/Makefile.am | 2 +- open-vm-tools/lib/netUtil/Makefile.in | 532 - open-vm-tools/lib/netUtil/netUtilLinux.c | 2 +- open-vm-tools/lib/nicInfo/Makefile.am | 2 +- open-vm-tools/lib/nicInfo/Makefile.in | 572 - open-vm-tools/lib/nicInfo/compareNicInfo.c | 2 +- open-vm-tools/lib/nicInfo/nicInfo.c | 2 +- open-vm-tools/lib/nicInfo/nicInfoInt.h | 2 +- open-vm-tools/lib/nicInfo/nicInfoPosix.c | 102 +- open-vm-tools/lib/nicInfo/util.c | 2 +- open-vm-tools/lib/panic/Makefile.am | 2 +- open-vm-tools/lib/panic/Makefile.in | 532 - open-vm-tools/lib/panic/panic.c | 2 +- open-vm-tools/lib/panicDefault/Makefile.am | 2 +- open-vm-tools/lib/panicDefault/Makefile.in | 532 - open-vm-tools/lib/panicDefault/panicDefault.c | 8 +- open-vm-tools/lib/poll/Makefile.am | 2 +- open-vm-tools/lib/poll/Makefile.in | 532 - open-vm-tools/lib/poll/poll.c | 6 +- open-vm-tools/lib/pollGtk/Makefile.am | 2 +- open-vm-tools/lib/pollGtk/Makefile.in | 533 - open-vm-tools/lib/pollGtk/pollGtk.c | 3 +- open-vm-tools/lib/procMgr/Makefile.am | 2 +- open-vm-tools/lib/procMgr/Makefile.in | 536 - open-vm-tools/lib/procMgr/procMgrPosix.c | 111 +- open-vm-tools/lib/procMgr/procMgrSolaris.c | 2 +- open-vm-tools/lib/rpcChannel/Makefile.am | 2 +- open-vm-tools/lib/rpcChannel/Makefile.in | 570 - open-vm-tools/lib/rpcChannel/bdoorChannel.c | 19 +- open-vm-tools/lib/rpcChannel/rpcChannel.c | 58 +- open-vm-tools/lib/rpcChannel/rpcChannelInt.h | 11 +- open-vm-tools/lib/rpcChannel/simpleSocket.c | 265 +- open-vm-tools/lib/rpcChannel/simpleSocket.h | 17 +- open-vm-tools/lib/rpcChannel/vsockChannel.c | 31 +- open-vm-tools/lib/rpcIn/Makefile.am | 2 +- open-vm-tools/lib/rpcIn/Makefile.in | 540 - open-vm-tools/lib/rpcIn/rpcin.c | 4 +- open-vm-tools/lib/rpcOut/Makefile.am | 2 +- open-vm-tools/lib/rpcOut/Makefile.in | 532 - open-vm-tools/lib/rpcOut/rpcout.c | 56 +- open-vm-tools/lib/rpcVmx/Makefile.am | 2 +- open-vm-tools/lib/rpcVmx/Makefile.in | 532 - open-vm-tools/lib/rpcVmx/rpcvmx.c | 2 +- open-vm-tools/lib/slashProc/Makefile.am | 2 +- open-vm-tools/lib/slashProc/Makefile.in | 541 - open-vm-tools/lib/slashProc/net.c | 2 +- open-vm-tools/lib/slashProc/slashProcNetInt.h | 2 +- open-vm-tools/lib/sslDirect/Makefile.am | 2 +- open-vm-tools/lib/sslDirect/Makefile.in | 556 - open-vm-tools/lib/sslDirect/sslDirect.c | 88 +- open-vm-tools/lib/sslDirect/sslStubs.c | 2 +- open-vm-tools/lib/string/Makefile.am | 2 +- open-vm-tools/lib/string/Makefile.in | 542 - open-vm-tools/lib/string/bsd_vsnprintf.c | 2 +- open-vm-tools/lib/string/bsd_vsnwprintf.c | 40 +- open-vm-tools/lib/string/str.c | 2 +- open-vm-tools/lib/stubs/Makefile.am | 2 +- open-vm-tools/lib/stubs/Makefile.in | 557 - open-vm-tools/lib/stubs/stub-config.c | 2 +- open-vm-tools/lib/stubs/stub-log.c | 2 +- open-vm-tools/lib/stubs/stub-msgfmt-fbsd.c | 2 +- open-vm-tools/lib/stubs/stub-user-msg.c | 2 +- open-vm-tools/lib/stubs/stub-user-panic.c | 2 +- open-vm-tools/lib/stubs/stub-user-util.c | 2 +- open-vm-tools/lib/stubs/stub-warning.c | 2 +- open-vm-tools/lib/syncDriver/Makefile.am | 5 +- open-vm-tools/lib/syncDriver/Makefile.in | 541 - open-vm-tools/lib/syncDriver/nullDriver.c | 4 +- open-vm-tools/lib/syncDriver/syncDriverInt.h | 13 +- .../lib/syncDriver/syncDriverLinux.c | 44 +- .../lib/syncDriver/syncDriverPosix.c | 136 +- open-vm-tools/lib/syncDriver/vmSyncDriver.c | 37 +- open-vm-tools/lib/system/Makefile.am | 2 +- open-vm-tools/lib/system/Makefile.in | 532 - open-vm-tools/lib/system/systemLinux.c | 2 +- open-vm-tools/lib/unicode/Makefile.am | 2 +- open-vm-tools/lib/unicode/Makefile.in | 551 - open-vm-tools/lib/unicode/unicodeCommon.c | 2 +- open-vm-tools/lib/unicode/unicodeICU.c | 2 +- open-vm-tools/lib/unicode/unicodeInt.h | 2 +- open-vm-tools/lib/unicode/unicodeSimpleBase.c | 118 +- .../lib/unicode/unicodeSimpleOperations.c | 2 +- .../lib/unicode/unicodeSimpleTransforms.c | 2 +- .../lib/unicode/unicodeSimpleTypes.c | 2 +- open-vm-tools/lib/unicode/unicodeStatic.c | 2 +- open-vm-tools/lib/user/Makefile.am | 2 +- open-vm-tools/lib/user/Makefile.in | 534 - open-vm-tools/lib/user/util.c | 122 +- open-vm-tools/lib/user/utilBacktrace.c | 2 +- open-vm-tools/lib/vmCheck/Makefile.am | 2 +- open-vm-tools/lib/vmCheck/Makefile.in | 532 - open-vm-tools/lib/vmCheck/vmcheck.c | 2 +- open-vm-tools/lib/vmSignal/Makefile.am | 2 +- open-vm-tools/lib/vmSignal/Makefile.in | 532 - open-vm-tools/lib/vmSignal/vmsignal.c | 2 +- open-vm-tools/lib/wiper/Makefile.am | 2 +- open-vm-tools/lib/wiper/Makefile.in | 533 - open-vm-tools/lib/wiper/wiperCommon.c | 2 +- open-vm-tools/lib/wiper/wiperPosix.c | 2 +- open-vm-tools/lib/xdg/Makefile.am | 2 +- open-vm-tools/lib/xdg/Makefile.in | 540 - open-vm-tools/lib/xdg/xdg.c | 2 +- open-vm-tools/libDeployPkg/Makefile.am | 6 +- open-vm-tools/libDeployPkg/Makefile.in | 639 - open-vm-tools/libDeployPkg/deployPkgFormat.h | 56 +- .../libDeployPkg/libDeployPkg_version.h | 2 +- open-vm-tools/libDeployPkg/linuxDeployment.c | 286 +- .../libDeployPkg/linuxDeploymentUtilities.c | 71 + .../libDeployPkg/linuxDeploymentUtilities.h | 27 + open-vm-tools/libDeployPkg/mspackConfig.h | 82 +- open-vm-tools/libDeployPkg/mspackWrapper.c | 8 +- open-vm-tools/libDeployPkg/mspackWrapper.h | 8 +- open-vm-tools/libDeployPkg/processPosix.c | 171 +- open-vm-tools/libDeployPkg/toolsDeployPkg.h | 48 +- open-vm-tools/libguestlib/Makefile.am | 4 +- open-vm-tools/libguestlib/Makefile.in | 678 - open-vm-tools/libguestlib/guestlibIoctl.x | 2 +- open-vm-tools/libguestlib/guestlibV3.x | 2 +- open-vm-tools/libguestlib/vmGuestLib.c | 2 +- open-vm-tools/libguestlib/vmGuestLibInt.h | 2 +- .../libguestlib/vmguestlib_version.h | 2 +- open-vm-tools/libhgfs/Makefile.am | 2 +- open-vm-tools/libhgfs/Makefile.in | 588 - open-vm-tools/libhgfs/hgfslib.c | 2 +- open-vm-tools/libvmtools/Makefile.am | 2 +- open-vm-tools/libvmtools/Makefile.in | 693 - open-vm-tools/libvmtools/guestSDKLog.c | 2 +- open-vm-tools/libvmtools/i18n.c | 5 +- open-vm-tools/libvmtools/monotonicTimer.c | 2 +- open-vm-tools/libvmtools/signalSource.c | 7 +- open-vm-tools/libvmtools/vmtools.c | 2 +- open-vm-tools/libvmtools/vmtoolsConfig.c | 126 +- open-vm-tools/libvmtools/vmtoolsInt.h | 2 +- open-vm-tools/libvmtools/vmtoolsLog.c | 47 +- open-vm-tools/libvmtools/vmtoolslib_version.h | 2 +- open-vm-tools/libvmtools/vmxLogger.c | 2 +- open-vm-tools/m4/vmtools.m4 | 2 +- open-vm-tools/modules/Makefile.in | 550 - open-vm-tools/modules/linux/dkms.conf | 2 +- open-vm-tools/modules/linux/dkms.sh | 6 +- .../modules/linux/shared/autoconf/dalias.c | 2 +- .../modules/linux/shared/autoconf/dalias1.c | 2 +- .../shared/autoconf/truncate_pagecache.c | 2 +- .../linux/shared/autoconf/wait_on_bit.c | 53 + .../modules/linux/shared/kernelStubs.h | 5 +- .../modules/linux/shared/kernelStubsSal.h | 85 +- .../modules/linux/shared/vmci_call_defs.h | 10 +- .../modules/linux/shared/vmci_defs.h | 14 +- .../modules/linux/shared/vmci_kernel_if.h | 12 +- open-vm-tools/modules/linux/vmblock/Makefile | 2 +- open-vm-tools/modules/linux/vmci/Makefile | 2 +- .../modules/linux/vmci/common/vmciContext.c | 88 +- .../modules/linux/vmci/common/vmciContext.h | 1 + .../modules/linux/vmci/common/vmciDoorbell.c | 4 + .../modules/linux/vmci/common/vmciDriver.c | 9 +- .../modules/linux/vmci/common/vmciEvent.c | 15 +- .../modules/linux/vmci/common/vmciQPair.c | 94 +- .../modules/linux/vmci/common/vmciQueuePair.c | 99 +- .../modules/linux/vmci/common/vmciQueuePair.h | 4 +- .../modules/linux/vmci/shared/vmciQueue.h | 2 +- open-vm-tools/modules/linux/vmhgfs/Makefile | 2 +- .../modules/linux/vmhgfs/Makefile.kernel | 3 +- .../modules/linux/vmhgfs/bdhandler.c | 2 +- open-vm-tools/modules/linux/vmhgfs/dentry.c | 2 +- open-vm-tools/modules/linux/vmhgfs/dir.c | 2 +- open-vm-tools/modules/linux/vmhgfs/file.c | 2 +- .../modules/linux/vmhgfs/filesystem.c | 14 +- .../modules/linux/vmhgfs/filesystem.h | 2 +- open-vm-tools/modules/linux/vmhgfs/fsutil.c | 5 +- open-vm-tools/modules/linux/vmhgfs/fsutil.h | 2 +- open-vm-tools/modules/linux/vmhgfs/inode.c | 25 +- open-vm-tools/modules/linux/vmhgfs/inode.h | 2 +- open-vm-tools/modules/linux/vmhgfs/link.c | 2 +- open-vm-tools/modules/linux/vmhgfs/module.c | 2 +- open-vm-tools/modules/linux/vmhgfs/module.h | 5 +- open-vm-tools/modules/linux/vmhgfs/page.c | 10 +- open-vm-tools/modules/linux/vmhgfs/request.c | 2 +- open-vm-tools/modules/linux/vmhgfs/request.h | 2 +- open-vm-tools/modules/linux/vmhgfs/stubs.c | 2 +- open-vm-tools/modules/linux/vmhgfs/super.c | 2 +- .../modules/linux/vmhgfs/transport.c | 2 +- .../modules/linux/vmhgfs/transport.h | 2 +- .../modules/linux/vmhgfs/vmhgfs_version.h | 8 +- open-vm-tools/modules/linux/vmsync/Makefile | 2 +- open-vm-tools/modules/linux/vmxnet/Makefile | 2 +- open-vm-tools/modules/linux/vsock/Makefile | 2 +- .../modules/shared/vmmemctl/balloonInt.h | 7 +- .../modules/shared/vmmemctl/dbllnklst.h | 2 +- .../modules/shared/vmmemctl/kernelStubs.h | 5 +- .../modules/shared/vmmemctl/kernelStubsSal.h | 85 +- open-vm-tools/modules/shared/vmxnet/net.h | 2 +- .../modules/shared/vmxnet/vmnet_def.h | 1 + .../modules/shared/vmxnet/vmxnet3_defs.h | 33 +- open-vm-tools/modules/solaris/vmhgfs/Makefile | 2 +- open-vm-tools/modules/solaris/vmhgfs/debug.c | 2 +- open-vm-tools/modules/solaris/vmhgfs/debug.h | 2 +- .../modules/solaris/vmhgfs/filesystem.c | 2 +- .../modules/solaris/vmhgfs/filesystem.h | 2 +- .../modules/solaris/vmhgfs/hgfsBdGlue.c | 2 +- .../modules/solaris/vmhgfs/hgfsBdGlue.h | 2 +- .../modules/solaris/vmhgfs/hgfsSolaris.h | 2 +- .../modules/solaris/vmhgfs/hgfsState.c | 2 +- .../modules/solaris/vmhgfs/hgfsState.h | 2 +- .../modules/solaris/vmhgfs/kernelStubs.h | 5 +- .../solaris/vmhgfs/kernelStubsSolaris.c | 2 +- open-vm-tools/modules/solaris/vmhgfs/module.c | 2 +- open-vm-tools/modules/solaris/vmhgfs/module.h | 2 +- .../modules/solaris/vmhgfs/request.c | 2 +- .../modules/solaris/vmhgfs/request.h | 2 +- open-vm-tools/modules/solaris/vmhgfs/vnode.c | 2 +- open-vm-tools/modules/solaris/vmhgfs/vnode.h | 2 +- .../solaris/vmmemctl/kernelStubsSolaris.c | 2 +- .../modules/solaris/vmxnet3/vmxnet3_tx.c | 30 +- open-vm-tools/namespacetool/COPYING | 502 + open-vm-tools/namespacetool/Makefile.am | 40 + open-vm-tools/namespacetool/namespacetool.c | 724 + open-vm-tools/rpctool/Makefile.am | 2 +- open-vm-tools/rpctool/Makefile.in | 562 - open-vm-tools/rpctool/rpctool.c | 2 +- open-vm-tools/scripts/Makefile.in | 463 - open-vm-tools/scripts/build/instvmsg.sh | 2 +- .../scripts/build/rpcgen_wrapper.sh.in | 2 +- open-vm-tools/scripts/common/statechange.sh | 2 +- open-vm-tools/scripts/common/statechange.subr | 2 +- open-vm-tools/scripts/common/vm-support | 2 +- open-vm-tools/scripts/freebsd/network | 2 +- open-vm-tools/scripts/linux/network | 12 +- open-vm-tools/scripts/linux/pam.d/vmtoolsd | 4 +- open-vm-tools/scripts/solaris/network | 2 +- open-vm-tools/services/Makefile.am | 2 +- open-vm-tools/services/Makefile.in | 581 - open-vm-tools/services/plugins/Makefile.am | 2 +- open-vm-tools/services/plugins/Makefile.in | 601 - .../services/plugins/deployPkg/Makefile.am | 2 +- .../services/plugins/deployPkg/Makefile.in | 712 - .../services/plugins/deployPkg/deployPkg.c | 2 +- .../services/plugins/deployPkg/deployPkgInt.h | 2 +- .../services/plugins/deployPkg/deployPkgLog.c | 2 +- .../plugins/deployPkg/deployPkgPlugin.c | 2 +- .../plugins/desktopEvents/Makefile.am | 2 +- .../plugins/desktopEvents/Makefile.in | 643 - .../plugins/desktopEvents/deFeatures.h | 2 +- .../plugins/desktopEvents/desktopEvents.c | 2 +- .../plugins/desktopEvents/desktopEventsInt.h | 2 +- .../services/plugins/desktopEvents/reload.c | 2 +- .../plugins/desktopEvents/sessionMgr.c | 2 +- .../desktopEvents/sessionMgrSignals.gm | 2 +- .../services/plugins/desktopEvents/x11Lock.c | 14 +- .../services/plugins/desktopEvents/xioError.c | 2 +- .../services/plugins/dndcp/Makefile.am | 21 +- .../services/plugins/dndcp/Makefile.in | 943 - .../services/plugins/dndcp/copyPasteCompat.c | 2 +- .../services/plugins/dndcp/copyPasteCompat.h | 2 +- .../plugins/dndcp/copyPasteCompatX11.c | 137 +- .../services/plugins/dndcp/copyPasteDnDImpl.h | 2 +- .../plugins/dndcp/copyPasteDnDWrapper.cpp | 2 +- .../plugins/dndcp/copyPasteDnDWrapper.h | 2 +- .../plugins/dndcp/copyPasteDnDX11.cpp | 6 +- .../services/plugins/dndcp/copyPasteDnDX11.h | 2 +- .../services/plugins/dndcp/copyPasteUIX11.cpp | 24 +- .../services/plugins/dndcp/copyPasteUIX11.h | 4 +- .../services/plugins/dndcp/cpFileContents.x | 2 +- .../plugins/dndcp/dnd/copyPasteRpc.hh | 2 +- .../plugins/dndcp/dnd/copyPasteRpcV4.hh | 2 +- .../services/plugins/dndcp/dnd/dnd.h | 2 +- .../plugins/dndcp/dnd/dndCPLibExport.hh | 2 +- .../services/plugins/dndcp/dnd/dndCPMsgV4.c | 2 +- .../services/plugins/dndcp/dnd/dndCPMsgV4.h | 2 +- .../plugins/dndcp/dnd/dndCPTransport.h | 2 +- .../services/plugins/dndcp/dnd/dndClipboard.c | 2 +- .../services/plugins/dndcp/dnd/dndClipboard.h | 2 +- .../services/plugins/dndcp/dnd/dndCommon.c | 2 +- .../plugins/dndcp/dnd/dndFileContentsUtil.h | 2 +- .../services/plugins/dndcp/dnd/dndInt.h | 2 +- .../services/plugins/dndcp/dnd/dndLinux.c | 2 +- .../services/plugins/dndcp/dnd/dndMsg.c | 2 +- .../services/plugins/dndcp/dnd/dndMsg.h | 2 +- .../services/plugins/dndcp/dnd/dndRpc.hh | 2 +- .../services/plugins/dndcp/dnd/dndRpcV4.hh | 2 +- .../services/plugins/dndcp/dnd/dndXdg.c | 454 + .../plugins/dndcp/dnd/fileTransferRpc.hh | 2 +- .../plugins/dndcp/dnd/fileTransferRpcV4.hh | 2 +- .../services/plugins/dndcp/dnd/rpcBase.h | 2 +- .../services/plugins/dndcp/dnd/rpcV3Util.hpp | 2 +- .../services/plugins/dndcp/dndFileList.hh | 2 +- .../plugins/dndcp/dndGuest/copyPasteRpcV3.cc | 2 +- .../plugins/dndcp/dndGuest/copyPasteRpcV3.hh | 2 +- .../plugins/dndcp/dndGuest/copyPasteRpcV4.cc | 2 +- .../dndcp/dndGuest/dndCPTransportGuestRpc.cpp | 2 +- .../dndcp/dndGuest/dndCPTransportGuestRpc.hpp | 2 +- .../plugins/dndcp/dndGuest/dndFileList.cc | 2 +- .../plugins/dndcp/dndGuest/dndFileList.hh | 2 +- .../plugins/dndcp/dndGuest/dndRpcListener.hpp | 2 +- .../plugins/dndcp/dndGuest/dndRpcV3.cc | 2 +- .../plugins/dndcp/dndGuest/dndRpcV3.hh | 2 +- .../plugins/dndcp/dndGuest/dndRpcV4.cc | 2 +- .../dndcp/dndGuest/fileTransferRpcV4.cc | 2 +- .../plugins/dndcp/dndGuest/guestCopyPaste.hh | 3 +- .../dndcp/dndGuest/guestCopyPasteDest.cc | 2 +- .../dndcp/dndGuest/guestCopyPasteMgr.cc | 3 +- .../dndcp/dndGuest/guestCopyPasteSrc.cc | 2 +- .../plugins/dndcp/dndGuest/guestDnD.hh | 5 +- .../plugins/dndcp/dndGuest/guestDnDCPMgr.cc | 2 +- .../plugins/dndcp/dndGuest/guestDnDCPMgr.hh | 2 +- .../plugins/dndcp/dndGuest/guestDnDDest.cc | 2 +- .../plugins/dndcp/dndGuest/guestDnDMgr.cc | 4 +- .../plugins/dndcp/dndGuest/guestDnDSrc.cc | 2 +- .../dndcp/dndGuest/guestFileTransfer.cc | 2 +- .../dndcp/dndGuest/guestFileTransfer.hh | 2 +- .../plugins/dndcp/dndGuest/rpcV3Util.cpp | 2 +- .../plugins/dndcp/dndGuest/rpcV4Util.cpp | 2 +- .../plugins/dndcp/dndGuest/rpcV4Util.hpp | 2 +- .../services/plugins/dndcp/dndPluginInt.h | 2 +- .../services/plugins/dndcp/dndPluginIntX11.h | 2 +- .../services/plugins/dndcp/dndUIX11.cpp | 53 +- .../services/plugins/dndcp/dndUIX11.h | 2 +- .../services/plugins/dndcp/dndcp.cpp | 2 +- .../services/plugins/dndcp/dragDetWndX11.cpp | 9 +- .../services/plugins/dndcp/dragDetWndX11.h | 2 +- .../services/plugins/dndcp/pointer.cpp | 2 +- .../services/plugins/dndcp/pointer.h | 2 +- .../services/plugins/dndcp/stringxx/string.cc | 18 +- .../services/plugins/dndcp/stringxx/string.hh | 18 +- .../plugins/dndcp/stringxx/ubstr_t.hh | 2 +- .../services/plugins/dndcp/xutils/xutils.cc | 2 +- .../services/plugins/dndcp/xutils/xutils.hh | 2 +- .../plugins/grabbitmqProxy/Makefile.am | 2 +- .../plugins/grabbitmqProxy/Makefile.in | 577 - .../grabbitmqProxy/grabbitmqProxyPlugin.c | 22 +- .../grabbitmqProxy/rabbitmqProxyConst.h | 2 +- .../services/plugins/guestInfo/Makefile.am | 2 +- .../services/plugins/guestInfo/Makefile.in | 721 - .../services/plugins/guestInfo/diskInfo.c | 2 +- .../plugins/guestInfo/diskInfoPosix.c | 2 +- .../services/plugins/guestInfo/guestInfoInt.h | 12 +- .../plugins/guestInfo/guestInfoServer.c | 195 +- .../services/plugins/guestInfo/perfMonLinux.c | 43 +- .../services/plugins/hgfsServer/Makefile.am | 2 +- .../services/plugins/hgfsServer/Makefile.in | 576 - .../services/plugins/hgfsServer/hgfsPlugin.c | 93 +- .../services/plugins/powerOps/Makefile.am | 2 +- .../services/plugins/powerOps/Makefile.in | 576 - .../services/plugins/powerOps/powerOps.c | 2 +- .../plugins/resolutionSet/Makefile.am | 2 +- .../plugins/resolutionSet/Makefile.in | 605 - .../plugins/resolutionSet/resolutionInt.h | 2 +- .../plugins/resolutionSet/resolutionRandR12.c | 2 +- .../plugins/resolutionSet/resolutionRandR12.h | 2 +- .../plugins/resolutionSet/resolutionSet.c | 2 +- .../plugins/resolutionSet/resolutionX11.c | 6 +- .../services/plugins/timeSync/Makefile.am | 2 +- .../services/plugins/timeSync/Makefile.in | 630 - .../services/plugins/timeSync/pllLinux.c | 2 +- .../services/plugins/timeSync/pllNone.c | 2 +- .../services/plugins/timeSync/slewAdjtime.c | 2 +- .../services/plugins/timeSync/slewLinux.c | 2 +- .../services/plugins/timeSync/timeSync.c | 2 +- .../services/plugins/timeSync/timeSync.h | 2 +- .../services/plugins/timeSync/timeSyncPosix.c | 2 +- .../services/plugins/timeSync/timeSyncPosix.h | 2 +- .../services/plugins/vix/Makefile.am | 2 +- .../services/plugins/vix/Makefile.in | 611 - .../services/plugins/vix/foundryToolsDaemon.c | 205 +- .../services/plugins/vix/vixPlugin.c | 2 +- .../services/plugins/vix/vixPluginInt.h | 2 +- open-vm-tools/services/plugins/vix/vixTools.c | 187 +- .../services/plugins/vix/vixToolsEnvVars.c | 2 +- .../services/plugins/vix/vixToolsInt.h | 4 +- .../services/plugins/vmbackup/Makefile.am | 2 +- .../services/plugins/vmbackup/Makefile.in | 646 - .../services/plugins/vmbackup/README | 6 + .../services/plugins/vmbackup/guestQuiesce.x | 18 +- .../services/plugins/vmbackup/nullProvider.c | 158 +- .../services/plugins/vmbackup/scriptOps.c | 2 +- .../services/plugins/vmbackup/stateMachine.c | 382 +- .../services/plugins/vmbackup/syncDriverOps.c | 4 +- .../services/plugins/vmbackup/vmBackupInt.h | 34 +- .../plugins/vmbackup/vmBackupSignals.gm | 2 +- open-vm-tools/services/vmtoolsd/Makefile.am | 2 +- open-vm-tools/services/vmtoolsd/Makefile.in | 755 - open-vm-tools/services/vmtoolsd/cmdLine.c | 6 +- open-vm-tools/services/vmtoolsd/l10n/ja.vmsg | 4 +- open-vm-tools/services/vmtoolsd/mainLoop.c | 16 +- open-vm-tools/services/vmtoolsd/mainPosix.c | 2 +- open-vm-tools/services/vmtoolsd/pluginMgr.c | 4 +- open-vm-tools/services/vmtoolsd/serviceObj.c | 2 +- open-vm-tools/services/vmtoolsd/serviceObj.h | 2 +- open-vm-tools/services/vmtoolsd/svcSignals.gm | 2 +- open-vm-tools/services/vmtoolsd/threadPool.c | 2 +- .../services/vmtoolsd/toolsCoreInt.h | 21 +- open-vm-tools/services/vmtoolsd/toolsRpc.c | 121 +- open-vm-tools/tests/Makefile.am | 2 +- open-vm-tools/tests/Makefile.in | 585 - open-vm-tools/tests/testDebug/Makefile.am | 2 +- open-vm-tools/tests/testDebug/Makefile.in | 602 - open-vm-tools/tests/testDebug/testDebug.c | 2 +- open-vm-tools/tests/testPlugin/Makefile.am | 2 +- open-vm-tools/tests/testPlugin/Makefile.in | 603 - open-vm-tools/tests/testPlugin/testData.x | 2 +- open-vm-tools/tests/testPlugin/testPlugin.c | 2 +- open-vm-tools/tests/testVmblock/Makefile.am | 2 +- open-vm-tools/tests/testVmblock/Makefile.in | 613 - .../tests/testVmblock/manual-blocker.c | 2 +- open-vm-tools/tests/testVmblock/vmblocktest.c | 2 +- open-vm-tools/tests/vmrpcdbg/Makefile.am | 4 +- open-vm-tools/tests/vmrpcdbg/Makefile.in | 556 - open-vm-tools/tests/vmrpcdbg/debugChannel.c | 6 +- open-vm-tools/tests/vmrpcdbg/vmrpcdbg.c | 18 +- open-vm-tools/tests/vmrpcdbg/vmrpcdbgInt.h | 2 +- open-vm-tools/toolbox/Makefile.am | 4 +- open-vm-tools/toolbox/Makefile.in | 688 - open-vm-tools/toolbox/l10n/de.vmsg | 22 +- open-vm-tools/toolbox/l10n/ja.vmsg | 24 +- open-vm-tools/toolbox/l10n/ko.vmsg | 24 +- open-vm-tools/toolbox/l10n/zh_CN.vmsg | 22 +- open-vm-tools/toolbox/toolbox-cmd.c | 13 +- open-vm-tools/toolbox/toolboxCmdInt.h | 7 +- open-vm-tools/toolbox/toolboxcmd-config.c | 298 + open-vm-tools/toolbox/toolboxcmd-devices.c | 2 +- open-vm-tools/toolbox/toolboxcmd-info.c | 237 + open-vm-tools/toolbox/toolboxcmd-logging.c | 2 +- open-vm-tools/toolbox/toolboxcmd-scripts.c | 2 +- open-vm-tools/toolbox/toolboxcmd-shrink.c | 2 +- open-vm-tools/toolbox/toolboxcmd-stat.c | 10 +- open-vm-tools/toolbox/toolboxcmd-time.c | 2 +- open-vm-tools/toolbox/toolboxcmd_version.h | 2 +- open-vm-tools/udev/99-vmware-scsi-udev.rules | 3 + open-vm-tools/udev/Makefile.am | 21 + open-vm-tools/vgauth/Makefile.am | 2 +- open-vm-tools/vgauth/Makefile.in | 581 - open-vm-tools/vgauth/cli/Makefile.am | 2 +- open-vm-tools/vgauth/cli/Makefile.in | 591 - open-vm-tools/vgauth/cli/l10n/de.vmsg | 2 +- open-vm-tools/vgauth/cli/l10n/en.vmsg | 2 +- open-vm-tools/vgauth/cli/l10n/es.vmsg | 2 +- open-vm-tools/vgauth/cli/l10n/fr.vmsg | 2 +- open-vm-tools/vgauth/cli/l10n/it.vmsg | 2 +- open-vm-tools/vgauth/cli/l10n/ja.vmsg | 2 +- open-vm-tools/vgauth/cli/l10n/ko.vmsg | 2 +- open-vm-tools/vgauth/cli/l10n/zh_CN.vmsg | 2 +- open-vm-tools/vgauth/cli/l10n/zh_TW.vmsg | 2 +- open-vm-tools/vgauth/cli/main.c | 124 +- open-vm-tools/vgauth/common/VGAuthBasicDefs.h | 2 +- open-vm-tools/vgauth/common/VGAuthLog.c | 2 +- open-vm-tools/vgauth/common/VGAuthLog.h | 2 +- open-vm-tools/vgauth/common/VGAuthProto.h | 2 +- open-vm-tools/vgauth/common/VGAuthUtil.c | 2 +- open-vm-tools/vgauth/common/VGAuthUtil.h | 2 +- open-vm-tools/vgauth/common/audit.c | 2 +- open-vm-tools/vgauth/common/audit.h | 2 +- open-vm-tools/vgauth/common/certverify.c | 20 +- open-vm-tools/vgauth/common/certverify.h | 16 +- open-vm-tools/vgauth/common/createToken.h | 2 +- open-vm-tools/vgauth/common/i18n.c | 2 +- open-vm-tools/vgauth/common/i18n.h | 2 +- open-vm-tools/vgauth/common/prefs.c | 2 +- open-vm-tools/vgauth/common/prefs.h | 2 +- open-vm-tools/vgauth/common/s4u2self.h | 2 +- open-vm-tools/vgauth/common/serviceUser.h | 2 +- open-vm-tools/vgauth/common/usercheck.c | 2 +- open-vm-tools/vgauth/common/usercheck.h | 2 +- open-vm-tools/vgauth/lib/Makefile.am | 2 +- open-vm-tools/vgauth/lib/Makefile.in | 727 - open-vm-tools/vgauth/lib/VGAuthInt.h | 2 +- open-vm-tools/vgauth/lib/alias.c | 2 +- open-vm-tools/vgauth/lib/auth.c | 2 +- open-vm-tools/vgauth/lib/authPosix.c | 2 +- open-vm-tools/vgauth/lib/comm.c | 2 +- open-vm-tools/vgauth/lib/common.c | 2 +- open-vm-tools/vgauth/lib/errortext.c | 2 +- open-vm-tools/vgauth/lib/impersonate.c | 5 +- open-vm-tools/vgauth/lib/impersonateLinux.c | 2 +- open-vm-tools/vgauth/lib/l10n/de.vmsg | 2 +- open-vm-tools/vgauth/lib/l10n/en.vmsg | 2 +- open-vm-tools/vgauth/lib/l10n/es.vmsg | 2 +- open-vm-tools/vgauth/lib/l10n/fr.vmsg | 2 +- open-vm-tools/vgauth/lib/l10n/it.vmsg | 2 +- open-vm-tools/vgauth/lib/l10n/ja.vmsg | 2 +- open-vm-tools/vgauth/lib/l10n/ko.vmsg | 2 +- open-vm-tools/vgauth/lib/l10n/zh_CN.vmsg | 2 +- open-vm-tools/vgauth/lib/l10n/zh_TW.vmsg | 2 +- open-vm-tools/vgauth/lib/netPosix.c | 2 +- open-vm-tools/vgauth/lib/proto.c | 2 +- open-vm-tools/vgauth/public/VGAuthAlias.h | 2 +- .../vgauth/public/VGAuthAuthentication.h | 2 +- open-vm-tools/vgauth/public/VGAuthCommon.h | 2 +- open-vm-tools/vgauth/public/VGAuthError.h | 2 +- .../vgauth/public/VGAuthIdProvider.h | 2 +- open-vm-tools/vgauth/service/Makefile.am | 31 +- open-vm-tools/vgauth/service/Makefile.in | 900 - open-vm-tools/vgauth/service/fileLogger.c | 7 +- open-vm-tools/vgauth/service/gio.c | 2 +- open-vm-tools/vgauth/service/l10n/de.vmsg | 2 +- open-vm-tools/vgauth/service/l10n/en.vmsg | 2 +- open-vm-tools/vgauth/service/l10n/es.vmsg | 2 +- open-vm-tools/vgauth/service/l10n/fr.vmsg | 2 +- open-vm-tools/vgauth/service/l10n/it.vmsg | 2 +- open-vm-tools/vgauth/service/l10n/ja.vmsg | 2 +- open-vm-tools/vgauth/service/l10n/ko.vmsg | 2 +- open-vm-tools/vgauth/service/l10n/zh_CN.vmsg | 2 +- open-vm-tools/vgauth/service/l10n/zh_TW.vmsg | 2 +- open-vm-tools/vgauth/service/log.c | 2 +- open-vm-tools/vgauth/service/main.c | 2 +- open-vm-tools/vgauth/service/service.h | 4 +- open-vm-tools/vgauth/service/servicePosix.c | 2 +- open-vm-tools/vgauth/service/signalSource.c | 2 +- .../vgauth/service/vgauthService_version.h | 2 +- open-vm-tools/vgauth/serviceImpl/alias.c | 147 +- open-vm-tools/vgauth/serviceImpl/file.c | 2 +- open-vm-tools/vgauth/serviceImpl/filePosix.c | 2 +- open-vm-tools/vgauth/serviceImpl/netPosix.c | 4 +- open-vm-tools/vgauth/serviceImpl/proto.c | 50 +- open-vm-tools/vgauth/serviceImpl/random.c | 2 +- .../{saml.cpp => saml-xml-security-c.cpp} | 13 +- .../vgauth/serviceImpl/saml-xmlsec1.c | 1477 + open-vm-tools/vgauth/serviceImpl/samlInt.hpp | 2 +- .../vgauth/serviceImpl/schemas/catalog.xml | 6 + open-vm-tools/vgauth/serviceImpl/service.c | 4 +- open-vm-tools/vgauth/serviceImpl/serviceInt.h | 7 +- open-vm-tools/vgauth/serviceImpl/ticket.c | 2 +- open-vm-tools/vgauth/serviceImpl/verify.c | 2 +- open-vm-tools/vmblock-fuse/Makefile.am | 2 +- open-vm-tools/vmblock-fuse/Makefile.in | 609 - open-vm-tools/vmblock-fuse/fsops.c | 2 +- open-vm-tools/vmblock-fuse/fsops.h | 2 +- open-vm-tools/vmblock-fuse/main.c | 2 +- open-vm-tools/vmblock-fuse/os.h | 2 +- open-vm-tools/vmblock-fuse/util.c | 2 +- open-vm-tools/vmblockmounter/Makefile.am | 2 +- open-vm-tools/vmblockmounter/Makefile.in | 579 - open-vm-tools/vmblockmounter/vmblockmounter.c | 2 +- .../vmblockmounter/vmblockmounter_version.h | 2 +- open-vm-tools/vmhgfs-fuse/Makefile.am | 3 +- open-vm-tools/vmhgfs-fuse/bdhandler.c | 23 +- open-vm-tools/vmhgfs-fuse/cache.c | 9 +- open-vm-tools/vmhgfs-fuse/config.c | 5 +- open-vm-tools/vmhgfs-fuse/config.h | 2 +- open-vm-tools/vmhgfs-fuse/file.c | 8 +- open-vm-tools/vmhgfs-fuse/filesystem.h | 6 + open-vm-tools/vmhgfs-fuse/main.c | 63 +- open-vm-tools/vmhgfs-fuse/module.h | 2 +- open-vm-tools/vmhgfs-fuse/session.c | 2 +- open-vm-tools/vmhgfs-fuse/session.h | 2 +- open-vm-tools/vmhgfs-fuse/transport.c | 84 +- open-vm-tools/vmhgfs-fuse/transport.h | 14 +- open-vm-tools/vmhgfs-fuse/vmhgfs_version.h | 6 +- .../vmware-user-suid-wrapper/Makefile.am | 2 +- .../vmware-user-suid-wrapper/Makefile.in | 599 - open-vm-tools/vmware-user-suid-wrapper/main.c | 2 +- .../wrapper-freebsd.c | 2 +- .../vmware-user-suid-wrapper/wrapper-linux.c | 2 +- .../wrapper-solaris.c | 2 +- .../vmware-user-suid-wrapper/wrapper.h | 2 +- .../wrapper_version.h | 2 +- open-vm-tools/xferlogs/Makefile.am | 2 +- open-vm-tools/xferlogs/Makefile.in | 565 - open-vm-tools/xferlogs/xferlogs.c | 2 +- open-vm-tools/xferlogs/xferlogs_version.h | 2 +- 2298 files changed, 139358 insertions(+), 103645 deletions(-) delete mode 100644 open-vm-tools/Makefile.in delete mode 100644 open-vm-tools/aclocal.m4 delete mode 100644 open-vm-tools/checkvm/Makefile.in create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Makefile.am create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegration.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegrationDefines.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CCmsMessage.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CCmsMessageAttachments.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessageDeliveryRecord.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartDescriptor.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartDescriptorSourceRecord.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartRecord.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartsHeader.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/ReplyToResolver.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessage.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageAttachments.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessageDeliveryRecord.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptor.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartRecord.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsHeader.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegration.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegrationDefines.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQChannel.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQChannelManager.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQCommand.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQConnection.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AmqpClientLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/BlockingRpcContinuation.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpAuthMechanism.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpChannel.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpConnection.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpFrame.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CommandAssembler.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConnectionFactoryImpl.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConnectionWeakReference.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConsumerDispatcher.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConsumerWorkService.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/IConnectionInt.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/IRpcContinuation.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/TCopyOnWriteContainer.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicAckMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicCancelMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicConsumeMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicGetMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicProperties.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicPublishMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicQosMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicRecoverMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicRejectMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ChannelCloseOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/EnvelopeImpl.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ExchangeDeclareMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ExchangeDeleteMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/FieldImpl.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/GetResponseImpl.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IContentHeader.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IServerMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueBindMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueDeclareMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueDeleteMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueuePurgeMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueUnbindMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AMQExceptions.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Address.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AmqpContentHeaders.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AmqpMethods.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/CertInfo.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Channel.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Connection.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ConnectionFactory.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Consumer.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ContentHeader.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Envelope.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/GetResponse.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Method.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ReturnListener.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/amqpClient.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AbstractConnectionFactory.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpAdmin.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpHeaderMapper.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpMessageListenerSource.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpOutboundEndpoint.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpTemplate.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Binding.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BindingImpl.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BindingInternal.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BlockingQueueConsumer.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/CachingConnectionFactory.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ChannelProxy.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/CompositeConnectionListener.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Connection.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionFactory.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionListener.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionProxy.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/DefaultAmqpHeaderMapper.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Exchange.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ExchangeImpl.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ExchangeInternal.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/MessageListener.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Queue.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/QueueImpl.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/QueueInternal.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/RabbitAdmin.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/RabbitTemplate.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/SimpleConnection.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/SimpleMessageListenerContainer.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannel.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannelManager.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQCommand.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQConnection.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/Address.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/BlockingRpcContinuation.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpChannel.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpConnection.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpFrame.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CertInfo.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CommandAssembler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionWeakReference.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerDispatcher.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerWorkService.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpClient.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQExceptions.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpClientImpl.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpContentHeadersImpl.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicProperties.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/FieldImpl.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/TMethodImpl.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/amqpImplInt.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AbstractConnectionFactory.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpHeaderMapper.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreDefines.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreFunc.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpMessageListenerSource.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpOutboundEndpoint.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingImpl.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BlockingQueueConsumer.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachedChannelHandler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachingConnectionFactory.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ChannelCachingConnectionProxy.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CompositeConnectionListener.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeImpl.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueImpl.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitAdmin.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitTemplate.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleConnection.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleMessageListenerContainer.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/amqpIntegrationCoreLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpListener/include/AmqpListenerWorker.h create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/AmqpListenerWorker.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/amqpListenerMain.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/BaseDefines.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/BasePlatformInc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/BasePlatformLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Collections.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CApplicationContext.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoCondition.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoMutex.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoRecMutex.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CCafRegex.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CCmdLineOptions.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CConfigParams.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CConfigParamsChain.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CFileLock.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CIniFile.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CLoggingSetter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CLoggingUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CManagedThreadPool.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CThreadPool.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CThreadSignal.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CVariant.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppConfig.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppConfigWrite.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppContext.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IConfigParams.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IWork.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonDefines.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonGlobals.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAddInCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAddInsDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CClassFiltersDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CClassSpecifierDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/COperationDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CParameterCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CPropertyDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CProtocolDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestConfigDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestHeaderDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestParameterDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CStatisticsDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CafCoreTypesDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CFullPackageElemDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallBatchDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallRequestDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CMinPackageElemDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CPackageDefnDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CafInstallRequestDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagRequestDoc/CDiagRequestDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagRequestDoc/DiagRequestDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagBatchDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagDeleteValueDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagSetValueDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/DiagTypesDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocUtils/EnumConvertersXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AddInsXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/OperationXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/PropertyXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ProtocolXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/StatisticsXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagBatchXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagSetValueXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/CertCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/CertPathCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/LocalSecurityXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/RemoteSecurityXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderRegXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/CdifXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/SchemaXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ErrorResponseXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventKeyCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventKeyXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventManifestXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ManifestCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ManifestXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ProviderEventResponseXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ProviderResponseXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseHeaderXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXmlRoots.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassFieldXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CollectMethodXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/JoinTypeXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/MethodParameterXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/MethodXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/RelationshipXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtRequestDoc/CMgmtRequestDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtRequestDoc/MgmtRequestDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtBatchDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/MgmtTypesDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/MultiPmeMgmtRequestDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PayloadEnvelopeDoc/PayloadEnvelopeDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CCertCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CCertPathCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CLocalSecurityDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceProtocolDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CRemoteSecurityDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/PersistenceDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CClassCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CProviderRegDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CSchemaSummaryDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/ProviderInfraDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderBatchDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/ProviderRequestDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CCdifDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CRequestIdentifierDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CSchemaDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/ProviderResultsDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CErrorResponseDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventKeyCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventKeyDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventManifestDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CManifestCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CManifestDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CProviderEventResponseDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CProviderResponseDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CResponseDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CResponseHeaderDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/ResponseDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassInstanceDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassCardinalityDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassFieldDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassIdentifierDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassPropertyDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCmdlMetadataDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCmdlUnionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCollectMethodDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassInstanceDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassPropertyDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceOperationDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceParameterDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CJoinTypeDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CMethodDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CMethodParameterDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CRelationshipDoc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/SchemaTypesDocLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/SchemaTypesDocTypes.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocContracts.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocXml.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Exception/CCafException.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/FrameworkLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/IBean.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/ICafObject.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/IVariant.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CBeanPropertiesHelper.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageCreator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageHeaders.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageHeadersWriter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessagePayload.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessagePayloadParser.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/IntegrationCafLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractMessageChannel.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractMessageRouter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractPollableChannel.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CBroadcastingDispatcher.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CChannelInterceptorAdapter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CChannelResolver.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CDocument.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CErrorHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CExpressionHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntException.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntMessage.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntMessageHeaders.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntegrationAppContext.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessageHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessageHeaderUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessagingTemplate.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessagingTemplateHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSimpleAsyncTaskExecutor.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSimpleAsyncTaskExecutorState.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSourcePollingChannelAdapter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CUnicastingDispatcher.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/FileHeaders.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/IntegrationCoreLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/MessageHeaders.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Dependencies/CPollerMetadata.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptor.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptorInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptorSupport.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelResolver.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IDocument.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IErrorHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IErrorProcessor.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IExpressionInvoker.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntMessage.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationAppContext.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationAppContextAware.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationComponent.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationComponentInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationObject.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ILifecycle.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageChannel.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageDispatcher.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageProcessor.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageProducer.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageRouter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageSplitter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IPhased.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IPollableChannel.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IRunnable.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ISmartLifecycle.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ISubscribableChannel.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ITaskExecutor.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IThrowable.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ITransformer.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/DynamicArrayInc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/SDynamicArrayMallocAllocator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TByteAdapter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TCharAdapter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TDynamicArray.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TWCharAdapter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformDefines.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformErrors.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformIID.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformStringFunc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformTypes.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafObject.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafQIObject.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafSmartPtr.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafStackObject.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Xml/MarkupParser/CMarkupParser.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/include/Xml/XmlUtils/CXmlElement.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatform.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/GraphsInc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/TEdgeListGraph.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/IteratorsInc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMapIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMultimapIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMapIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMultimapIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMapIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMultimapIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMapIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMultimapIterator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CApplicationContext.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoCondition.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutex.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlockRaw.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlockRaw.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoRecMutex.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCafRegex.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCmdLineOptions.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParams.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParamsChain.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLock.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CIniFile.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingSetter.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CManagedThreadPool.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadPool.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadSignal.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CVariant.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CommonAggregatorLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/TBlockingCell.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/CommonGlobals.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInsDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAuthnAuthzDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CClassFiltersDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CClassSpecifierDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CInlineAttachmentDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CLoggingLevelElemDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/COperationDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CParameterCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CPropertyCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CPropertyDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CProtocolCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CProtocolDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestConfigDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestHeaderDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestInstanceParameterDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestParameterDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CStatisticsDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CFullPackageElemDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CGetInventoryJobDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallBatchDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallPackageSpecDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallProviderJobDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallProviderSpecDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallRequestDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CMinPackageElemDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CPackageDefnDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CUninstallProviderJobDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagRequestDoc/CDiagRequestDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagRequestDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagBatchDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagCollectInstancesDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagDeleteValueDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagSetValueCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagSetValueDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtRequestDoc/CMgmtRequestDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtRequestDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtBatchDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectInstancesDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectSchemaDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtInvokeOperationDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PayloadEnvelopeDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CCertCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CCertPathCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CLocalSecurityDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceProtocolCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceProtocolDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CRemoteSecurityCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CRemoteSecurityDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CClassCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CProviderRegDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CSchemaSummaryDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderBatchDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectInstancesDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderInvokeOperationDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestConfigDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestHeaderDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CCdifDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CRequestIdentifierDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CSchemaDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CErrorResponseDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventKeyCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventKeyDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventManifestDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CManifestCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CManifestDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CProviderEventResponseDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CProviderResponseDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CResponseDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CResponseHeaderDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassInstanceDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassCardinalityDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassFieldDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassIdentifierDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassInstancePropertyDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassPropertyDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCmdlMetadataDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCmdlUnionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCollectMethodDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassInstanceDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassPropertyDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassSubInstanceDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceOperationCollectionDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceOperationDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceParameterDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CJoinTypeDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CLogicalRelationshipDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CMethodDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CMethodParameterDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CPhysicalRelationshipDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CRelationshipDoc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsInc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/EnumConvertersXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafException.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ClassMacros.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionExMacros.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionMacros.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StatusMacros.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacros.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacrosRaw.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageCreator.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeaders.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayload.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageChannel.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageRouter.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractPollableChannel.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CBroadcastingDispatcher.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelResolver.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CDocument.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CErrorHandler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CExpressionHandler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntException.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessage.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessageHeaders.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntegrationAppContext.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHandler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHeaderUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplate.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplateHandler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CUnicastingDispatcher.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/FileHeaders.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/MessageHeaders.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingMacros.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformIID.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformStringFunc.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseInc.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemCreator.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObject.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObjectRoot.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemSmartCl.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/CMarkupParser.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/MarkupParserLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlElement.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/XmlUtilsLink.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Framework/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Makefile.am create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/include/CEnvelopeToPayloadTransformerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/include/CafIntegrationSubsys.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CafIntegration.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CFileReadingMessageSource.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CMessageHandlerChainInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CXPathHeaderEnricherItem.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/IntegrationSubsys.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileReadingMessageSource.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CMessageHandlerChainInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherItem.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/Integration.cpp create mode 100644 open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/include/CIniFileWithoutSection.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CIniFileWithoutSection.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/ConfigProvider.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/CPackageInstaller.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/CProviderInstaller.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/IPackage.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageInstaller.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CProviderInstaller.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/InstallProvider.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/Makefile.am create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/RemoteCommandProvider.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.h create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/TestInfraProvider.cpp create mode 100644 open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Makefile.am create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/include/CManagementAgentHostWork.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CManagementAgentHostWork.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHost.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHostMain.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CAttachmentRequestTransformerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CConfigEnvReadingMessageSource.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CDiagToMgmtRequestTransformerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CMonitorReadingMessageSource.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CPersistenceReadingMessageSource.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CProviderExecutorRequest.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CProviderExecutorRequestHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CResponseFactory.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CSchemaCacheManager.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CSinglePmeRequestSplitterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/IConfigEnv.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/IPersistence.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/MaIntegration.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorInboundChannelAdapterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorInboundChannelAdapterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorReadingMessageSource.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMerge.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMerge.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequest.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CResponseFactory.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSchemaCacheManager.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaContracts.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaIntegration.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthContext.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthImpersonation.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthUserHandle.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/IVgAuthImpersonation.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthContext.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthImpersonation.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.h create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthUserHandle.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/VgAuthIntegration.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/stdafx.h create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/Makefile.am create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDocHelper.h create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDriver.h create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IInvokedProvider.h create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderRequest.h create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderResponse.h create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/ProviderFxLink.h create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.h create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDocHelper.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDriver.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderRequest.h create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/ProviderFx.cpp create mode 100644 open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/stdafx.h create mode 100644 open-vm-tools/common-agent/etc/Makefile.am create mode 100644 open-vm-tools/common-agent/etc/install/Makefile.am create mode 100644 open-vm-tools/common-agent/etc/install/caf-c-communication-service create mode 100644 open-vm-tools/common-agent/etc/install/caf-c-management-agent create mode 100644 open-vm-tools/common-agent/etc/install/caf-dbg.sh create mode 100644 open-vm-tools/common-agent/etc/install/caf-vgauth create mode 100644 open-vm-tools/common-agent/etc/install/commonenv.sh create mode 100644 open-vm-tools/common-agent/etc/install/install.sh create mode 100644 open-vm-tools/common-agent/etc/install/postinstallInstall.sh create mode 100644 open-vm-tools/common-agent/etc/install/postinstallUpgrade.sh create mode 100644 open-vm-tools/common-agent/etc/install/preinstallUpgrade.sh create mode 100644 open-vm-tools/common-agent/etc/install/preremoveUninstall.sh create mode 100644 open-vm-tools/common-agent/etc/install/preuninstall.sh create mode 100644 open-vm-tools/common-agent/etc/install/preupgrade.sh create mode 100644 open-vm-tools/common-agent/etc/install/restartServices.sh create mode 100644 open-vm-tools/common-agent/etc/install/stopAndRemoveServices.sh create mode 100644 open-vm-tools/common-agent/etc/install/upgrade.sh create mode 100644 open-vm-tools/common-agent/etc/scripts/Makefile.am create mode 100644 open-vm-tools/common-agent/etc/scripts/caf-common create mode 100644 open-vm-tools/common-agent/etc/scripts/caf-processes.sh create mode 100644 open-vm-tools/common-agent/etc/scripts/is-listener-running create mode 100644 open-vm-tools/common-agent/etc/scripts/is-ma-running create mode 100644 open-vm-tools/common-agent/etc/scripts/setUpVgAuth create mode 100644 open-vm-tools/common-agent/etc/scripts/start-VGAuthService create mode 100644 open-vm-tools/common-agent/etc/scripts/start-listener create mode 100644 open-vm-tools/common-agent/etc/scripts/start-ma create mode 100644 open-vm-tools/common-agent/etc/scripts/startTestProc create mode 100644 open-vm-tools/common-agent/etc/scripts/stop-VGAuthService create mode 100644 open-vm-tools/common-agent/etc/scripts/stop-listener create mode 100644 open-vm-tools/common-agent/etc/scripts/stop-ma create mode 100644 open-vm-tools/common-agent/etc/scripts/tearDownVgAuth create mode 100644 open-vm-tools/common-agent/etc/scripts/vgAuth create mode 100644 open-vm-tools/common-agent/input/Makefile.am create mode 100644 open-vm-tools/common-agent/input/installProviderHeader.sh create mode 100644 open-vm-tools/common-agent/input/invokers/Makefile.am create mode 100644 open-vm-tools/common-agent/input/invokers/cafTestInfra_CafTestInfraProvider_1_0_0.sh create mode 100644 open-vm-tools/common-agent/input/invokers/caf_ConfigProvider_1_0_0.sh create mode 100644 open-vm-tools/common-agent/input/invokers/caf_InstallProvider_1_0_0.sh create mode 100644 open-vm-tools/common-agent/input/invokers/caf_RemoteCommandProvider_1_0_0.sh create mode 100644 open-vm-tools/common-agent/input/providerReg/Makefile.am create mode 100644 open-vm-tools/common-agent/input/providerReg/cafTestInfra_CafTestInfraProvider_1_0_0.xml create mode 100644 open-vm-tools/common-agent/input/providerReg/caf_ConfigProvider_1_0_0.xml create mode 100644 open-vm-tools/common-agent/input/providerReg/caf_InstallProvider_1_0_0.xml create mode 100644 open-vm-tools/common-agent/input/providerReg/caf_RemoteCommandProvider_1_0_0.xml delete mode 100755 open-vm-tools/config/compile delete mode 100755 open-vm-tools/config/config.guess delete mode 100755 open-vm-tools/config/config.sub delete mode 100755 open-vm-tools/config/depcomp delete mode 100755 open-vm-tools/config/install-sh delete mode 100755 open-vm-tools/config/ltmain.sh delete mode 100755 open-vm-tools/config/missing delete mode 100755 open-vm-tools/configure delete mode 100644 open-vm-tools/docs/Makefile.in delete mode 100644 open-vm-tools/docs/api/Makefile.in delete mode 100644 open-vm-tools/guestproxycerttool/Makefile.in delete mode 100644 open-vm-tools/hgfsclient/Makefile.in delete mode 100644 open-vm-tools/hgfsmounter/Makefile.in delete mode 100644 open-vm-tools/lib/Makefile.in delete mode 100644 open-vm-tools/lib/appUtil/Makefile.in delete mode 100644 open-vm-tools/lib/asyncsocket/Makefile.in create mode 100644 open-vm-tools/lib/asyncsocket/asyncSocketInterface.c delete mode 100644 open-vm-tools/lib/auth/Makefile.in delete mode 100644 open-vm-tools/lib/backdoor/Makefile.in delete mode 100644 open-vm-tools/lib/dataMap/Makefile.in delete mode 100644 open-vm-tools/lib/dict/Makefile.in delete mode 100644 open-vm-tools/lib/dynxdr/Makefile.in delete mode 100644 open-vm-tools/lib/err/Makefile.in delete mode 100644 open-vm-tools/lib/file/Makefile.in delete mode 100644 open-vm-tools/lib/foundryMsg/Makefile.in delete mode 100644 open-vm-tools/lib/glibUtils/Makefile.in delete mode 100644 open-vm-tools/lib/guestApp/Makefile.in delete mode 100644 open-vm-tools/lib/guestRpc/Makefile.in delete mode 100644 open-vm-tools/lib/hashMap/Makefile.in delete mode 100644 open-vm-tools/lib/hgfs/Makefile.in delete mode 100644 open-vm-tools/lib/hgfsBd/Makefile.in delete mode 100644 open-vm-tools/lib/hgfsHelper/Makefile.in delete mode 100644 open-vm-tools/lib/hgfsServer/Makefile.in delete mode 100644 open-vm-tools/lib/hgfsServerManagerGuest/Makefile.in delete mode 100644 open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.in delete mode 100644 open-vm-tools/lib/impersonate/Makefile.in delete mode 100644 open-vm-tools/lib/include/util_shared.h delete mode 100644 open-vm-tools/lib/lock/Makefile.in delete mode 100644 open-vm-tools/lib/message/Makefile.in delete mode 100644 open-vm-tools/lib/misc/Makefile.in create mode 100644 open-vm-tools/lib/misc/codesetUTF8.c create mode 100644 open-vm-tools/lib/misc/prng.c delete mode 100644 open-vm-tools/lib/netUtil/Makefile.in delete mode 100644 open-vm-tools/lib/nicInfo/Makefile.in delete mode 100644 open-vm-tools/lib/panic/Makefile.in delete mode 100644 open-vm-tools/lib/panicDefault/Makefile.in delete mode 100644 open-vm-tools/lib/poll/Makefile.in delete mode 100644 open-vm-tools/lib/pollGtk/Makefile.in delete mode 100644 open-vm-tools/lib/procMgr/Makefile.in delete mode 100644 open-vm-tools/lib/rpcChannel/Makefile.in delete mode 100644 open-vm-tools/lib/rpcIn/Makefile.in delete mode 100644 open-vm-tools/lib/rpcOut/Makefile.in delete mode 100644 open-vm-tools/lib/rpcVmx/Makefile.in delete mode 100644 open-vm-tools/lib/slashProc/Makefile.in delete mode 100644 open-vm-tools/lib/sslDirect/Makefile.in delete mode 100644 open-vm-tools/lib/string/Makefile.in delete mode 100644 open-vm-tools/lib/stubs/Makefile.in delete mode 100644 open-vm-tools/lib/syncDriver/Makefile.in delete mode 100644 open-vm-tools/lib/system/Makefile.in delete mode 100644 open-vm-tools/lib/unicode/Makefile.in delete mode 100644 open-vm-tools/lib/user/Makefile.in delete mode 100644 open-vm-tools/lib/vmCheck/Makefile.in delete mode 100644 open-vm-tools/lib/vmSignal/Makefile.in delete mode 100644 open-vm-tools/lib/wiper/Makefile.in delete mode 100644 open-vm-tools/lib/xdg/Makefile.in delete mode 100644 open-vm-tools/libDeployPkg/Makefile.in create mode 100644 open-vm-tools/libDeployPkg/linuxDeploymentUtilities.c create mode 100644 open-vm-tools/libDeployPkg/linuxDeploymentUtilities.h delete mode 100644 open-vm-tools/libguestlib/Makefile.in delete mode 100644 open-vm-tools/libhgfs/Makefile.in delete mode 100644 open-vm-tools/libvmtools/Makefile.in delete mode 100644 open-vm-tools/modules/Makefile.in create mode 100644 open-vm-tools/modules/linux/shared/autoconf/wait_on_bit.c create mode 100644 open-vm-tools/namespacetool/COPYING create mode 100644 open-vm-tools/namespacetool/Makefile.am create mode 100644 open-vm-tools/namespacetool/namespacetool.c delete mode 100644 open-vm-tools/rpctool/Makefile.in delete mode 100644 open-vm-tools/scripts/Makefile.in delete mode 100644 open-vm-tools/services/Makefile.in delete mode 100644 open-vm-tools/services/plugins/Makefile.in delete mode 100644 open-vm-tools/services/plugins/deployPkg/Makefile.in delete mode 100644 open-vm-tools/services/plugins/desktopEvents/Makefile.in delete mode 100644 open-vm-tools/services/plugins/dndcp/Makefile.in create mode 100644 open-vm-tools/services/plugins/dndcp/dnd/dndXdg.c delete mode 100644 open-vm-tools/services/plugins/grabbitmqProxy/Makefile.in delete mode 100644 open-vm-tools/services/plugins/guestInfo/Makefile.in delete mode 100644 open-vm-tools/services/plugins/hgfsServer/Makefile.in delete mode 100644 open-vm-tools/services/plugins/powerOps/Makefile.in delete mode 100644 open-vm-tools/services/plugins/resolutionSet/Makefile.in delete mode 100644 open-vm-tools/services/plugins/timeSync/Makefile.in delete mode 100644 open-vm-tools/services/plugins/vix/Makefile.in delete mode 100644 open-vm-tools/services/plugins/vmbackup/Makefile.in delete mode 100644 open-vm-tools/services/vmtoolsd/Makefile.in delete mode 100644 open-vm-tools/tests/Makefile.in delete mode 100644 open-vm-tools/tests/testDebug/Makefile.in delete mode 100644 open-vm-tools/tests/testPlugin/Makefile.in delete mode 100644 open-vm-tools/tests/testVmblock/Makefile.in delete mode 100644 open-vm-tools/tests/vmrpcdbg/Makefile.in delete mode 100644 open-vm-tools/toolbox/Makefile.in create mode 100644 open-vm-tools/toolbox/toolboxcmd-config.c create mode 100644 open-vm-tools/toolbox/toolboxcmd-info.c create mode 100644 open-vm-tools/udev/99-vmware-scsi-udev.rules create mode 100644 open-vm-tools/udev/Makefile.am delete mode 100644 open-vm-tools/vgauth/Makefile.in delete mode 100644 open-vm-tools/vgauth/cli/Makefile.in delete mode 100644 open-vm-tools/vgauth/lib/Makefile.in delete mode 100644 open-vm-tools/vgauth/service/Makefile.in rename open-vm-tools/vgauth/serviceImpl/{saml.cpp => saml-xml-security-c.cpp} (99%) create mode 100644 open-vm-tools/vgauth/serviceImpl/saml-xmlsec1.c create mode 100644 open-vm-tools/vgauth/serviceImpl/schemas/catalog.xml delete mode 100644 open-vm-tools/vmblock-fuse/Makefile.in delete mode 100644 open-vm-tools/vmblockmounter/Makefile.in delete mode 100644 open-vm-tools/vmware-user-suid-wrapper/Makefile.in delete mode 100644 open-vm-tools/xferlogs/Makefile.in diff --git a/README.md b/README.md index 37b4a8245..58fffc15b 100644 --- a/README.md +++ b/README.md @@ -84,29 +84,32 @@ open-vm-tools uses the GNU Automake tool for generating Makefiles to build all s Getting configure options & help: If you are looking for help or additional settings for the building of this project, the following configure command will display a list of help options: ./configure --help Using configure: When using configure in the steps below it is only necessary to call ./configure once unless there was a problem after the first invocation. Building Unix user-space programs: + 1. autoreconf -i 2. ./configure -3. Run "make" to build Unix userland and kernel +3. Run "make" to build Unix userland and kernel + Packaging: If you are interested in creating a Tools package, please see https://sourceforge.net/apps/mediawiki/open-vm-tools/index.php?title=Packaging for more information. #Getting Involved ##How can I get involved today? -You can get involved today in sevearl different ways: -- Start using open-vm-tools today and give us feedback . -- Suggest feature enhancements . +You can get involved today in several different ways: +- Start using open-vm-tools today and give us feedback. +- Suggest feature enhancements. - Identify and submit bugs under issues section: https://github.com/vmware/open-vm-tools/issues - Start porting the code to other operating systems. Here is the list of operating systems with open-vm-tools: - * Fedora 19 and later releases - * Debian 7.x and later releases - * openSUSE 11.x and later releases - * Recent Ubuntu releases (12.04 LTS, 13.10 and later) + * Red Hat Enterprise Linux 7.0 and later releases * SUSE Linux Enterprise 12 and later releases + * Ubuntu 14.04 and later releases * CentOS 7 and later releases + * Debian 7.x and later releases * Oracle Linux 7 and later + * Fedora 19 and later releases + * openSUSE 11.x and later releases ## Will external developers be allowed to become committers to the project? -Yes. Initially, VMware engineers will be the only committers. As we roll out our developement infrastructure, we will be looking to add external committers to the project as well. +Yes. Initially, VMware engineers will be the only committers. As we roll out our development infrastructure, we will be looking to add external committers to the project as well. ## How can I submit code changes like bug fixes, patches, new features to the project? Initially, you can submit bug fixes, patches and new features to the project development mailing list as attachments to emails or bug reports. To contribute source code, you will need to fill out a contribution agreement form as part of the submission process. We will have more details on this process shortly. diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 6f4ce1c57..ac9230664 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,6 +1,6 @@ -#open-vm-tools 10.0.0 Release Notes +#open-vm-tools 10.1.0 Release Notes -Updated on 1 SEP 2015 +Updated on 26 OCT 2016 ##What's in the Release Notes The release notes cover the following topics: @@ -13,14 +13,19 @@ The release notes cover the following topics: ##What's New VMware Tools is a suite of utilities that enhances the performance of the virtual machine's guest operating system and improves management of the virtual machine. Read about the new and enhanced features in this release below: -- **Common versioning**: Infrastructure changes to enable reporting of the true version of open-vm-tools. This feature is dependent on host support. -- **Quiesced snapshots enhancements for Linux guests running IO workload**: Robustness related enhancements in quiesced snapshot operation. The _vmtoolsd_ service supports caching of log messages when guest IO has been quiesced. Enhancements in the _vmbackup_ plugin use a separate thread to quiesce the guest OS to avoid timeout issues due to heavy I/O in the guest. -- **Shared Folders**: For Linux distributions with kernel version 4.0.0 and higher, there is a new FUSE based Shared Folders client which is used as a replacement for the kernel mode client. -- **ESXi Serviceability**: Default _vmtoolsd_ logging is directed to a file instead of syslog. _vmware-toolbox-cmd_ is enhanced for setting _vmtoolsd_ logging levels. -- **GuestInfo Enhancements**: Plugin enhancements to report more than 64 IP addresses from the guest. These enhancements will be available only after upgrading the host because the guest IP addresses limit also exists on the host side. +- **vmware-namespace-cmd**: Added vmware-namespace-cmd command line utility that exposes set/get commands for the namespace database in the VMX. +- **gtk3 support**: open-vm-tools has been updated to use gtk3 libraries. +- **Common Agent Framework (CAF)**: CAF provides the basic services necessary to simplify secure and efficient management of agents inside virtual machines. +- **xmlsec1**: Changed guest authentication to xmlsec1. +- **FreeBSD**: Changes to support open-vm-tools on FreeBSD. +- **Automatic Linux Kernel Modules**: Automatic rebuilding of kernel modules is enabled by default. +- **New sub-command**: Added a new sub-command to push updated network information to the host on demand. +- **udev-rules**: Added udev rules for configuring SCSI timeout in the guest. +- **Ubuntu 16.10**: Fixes for running on Ubuntu 16.10. +- **Quiesced Snapshot**: Fix for quiesced snapshot failure leaving guest file system quiesced. ## Internationalization -open-vm-tools 10.0.0 supports the following languages: +open-vm-tools 10.1.0 supports the following languages: - English - French @@ -33,24 +38,26 @@ open-vm-tools 10.0.0 supports the following languages: - Traditional Chinese ## Compatibility -open-vm-tools 10.0.0 is compatible with all supported versions of VMware vSphere, VMware Workstation 12.0 and VMware Fusion 8.0. +open-vm-tools 10.1.0 is compatible with all supported versions of VMware vSphere, VMware Workstation 12.5 and VMware Fusion 8.5. ## Installation and Upgrades for This Release The steps to install open-vm-tools vary depending on your VMware product and the guest operating system you have installed. For general steps to install open-vm-tools in most VMware products, see https://github.com/vmware/open-vm-tools/blob/master/README.md ## Known Issues The known issues are as follows: -- **The status of IPv6 address is displayed as "unknown"** +- **Common Agent Framework in open-vm-tools fails to build in Ubuntu 14.04.** - The status of IPv6 address from vim-cmd is displayed as "unknown" even when the address is valid. + Common Agent Framework in open-vm-tools fails to build in Ubuntu 14.04 with rabbitmq-c version lower than 0.8.0 - Workaround: None -- **TextCopyPaste between host and guest systems fail** + Workaround: Upgrade rabbitmq-c to version 0.8.0 or higher for TLS1.2 support in Common Agent Framework - Copy and Paste of text between host and guest systems fail if the text size 50KB or higher. - - Workaround: Copy and Paste smaller amounts of text. -- **Definition of the field _ipAddress_ in guestinfo is ambiguous** +- **vmusr plug-ins do not load on Solaris 10 Update 11.** + + While running VMware Tools 10.1 on Solaris 10 U11 guest operating systems, the following vmusr plug-ins are not loaded: + libdesktopEvents.so + libdndcp.so + libresolutionSet.so + + This issue might also occur in Solaris version 11.2. + + Workaround: Upgrade to Solaris 11.3. - The field _ipAddress_ is defined as "Primary IP address assigned to the guest operating system, if known". - - Workaround: The field _ipAddress_ in this context for Linux is defined as the first IP address fetched by open-vm-tools. diff --git a/open-vm-tools/ChangeLog b/open-vm-tools/ChangeLog index 0f1c10278..74fb72920 100644 --- a/open-vm-tools/ChangeLog +++ b/open-vm-tools/ChangeLog @@ -1,4 +1,2110 @@ +open-vm-tools-10.1.0 build 4449150 + +* Hgfs VMX: make the shares object use const strings + + The share name, path and tags strings are immutable and so should be + const. They remain that way for the life time of the share. If a user changes + any of these in the UI the share will be deleted and a new one created . + + This change makes them const strings. + +* Hgfs Linux Mounter: add noserverino mount option + + When Linux clients run against a Windows HGFS server they can get + messed up with the host file IDs returned by the HGFS server + when using them for inode numbers. + + This change allows the user to mount with an option to disable + that and always generate inode numbers internally. + +* Hgfs Linux Server: clean up the mode permission initialization for creates + + For some reason that is unclear the mode permissions bit mask is set to + all ones except for the permissions bits, which we then add as required. This is + dangerous if any of the other bits become used in some way. Currently, + they appear to be ignored and unused so we have not run into odd + errors or behavior. This might change in the future. + + Now initialize the the mode permissions field to zero so that we only set + the bits we want. + +* Log the proper exit code of powerops Scripts. + + Use WEXITSTATUS to extract the proper exit code after a + child process is completed. + +* Remove nullok from pam configuration files. + + The guest operations should be not be allowed for a user with a blank + password. Lets remove 'nullok' setting from vmtools / vgauth related pam + configuration files. + +* asyncWebSocket: capture the websocket close status code correctly. + + This change fixes the following bugs while capturing the websocket close + frame status code: + 1. An incorrect 'if' condition prevented reading the websocket status code + e.g. if (WebSocketDecodeBytesAvailable(s) > 4) now changed to + if (s->websocket.frameSize >=2) + 2. The status code itself was parsed incorrectly (only one byte was read + instead of two) + 3. If the closeframe was masked, it was never unmasked before reading the + status code + + Also replaces HYBI prefix in variables to use WEB_SOCKET. + + This change still does not handle the following case: + 1. The websocket close status (normally two bytes total) straddles decodeBuffer + boundaries. It would need more investigation to prove if this can even happen. + If it does happen, the close status would be interpreted as missing, which is + incorrect but mostly harmless. + 2. The last chunk of decoded data (without the close status code) does not get + sent to the application when a websocket close frame is encountered. + +* atomics: Atomic_ReadIfEqualWriteBool fails on 32-bit compiles + + The Atomic_ReadIfEqualWriteBool is documented to return the value + of the potential exchange from before the attempted operation. In + the 32-bit case we're not doing that. Fix this. + +* MXUser Locks: Collect the locking activity tree only when requested + + Currently we always collect the locking activity tree and optionally + report it. To lower overhead in an OBJ build, only collect and report + it when enabled. + +* Tools: XML encoding "not quite right" + + Because we've always handled the XML coming out of tools with the + special C XML routines it was never noticed that the escaping of + characters was incorrect - not all of the XML sensitive characters + were escaped. Fix this. + + The solution is to escape the escape character (already done) and all + five of the XML sensitive characters. + +* pyVigor: Handle tools XML string escaped data + + Now that tools is properly passing back escaped strings to avoid + any issues with standard/official XML, unescape the strings in the + pyVigor guestOps support code. + + To easily facilitate this, a C callable wrapped function is created + and used. + +* Hgfs Posix Server: return file allocation size for attributes + + Currently only the Windows HGFS server returns the allocation size + of a file. This allows the clients to use accurate disk space sizes + and help the guest enumerations calcuate disk space correctly and + for stat and du type of operations to report correct information. + Posix clients currently under report the file size disk allocation. + + Posix clients are being fixed in a separate change. + + Posix hosts should also return this information so that it can be + used by clients in stat and du type of operations. The block information + could be returned as a new field but that seems unnecessary since + their already exists an allocation size field which goes unused for + Posix HGFS servers, and can be calculated from the number of 512 byte + blocks returned on a stat. + +* rmks: Send error codes to View Client via VMDB + + Until now, rmks error codes set with MKSRoleMain_Disconnected() were sent to the View client using process exit codes. + + The MKS team pointed out that exit codes are unreliably set and recommended using VMDB instead. + + This change: + 1. Sends the error code to View client using VMDB instead of a process exit code. + 2. Modifies crtbora to no longer retrieve the rmks process exit code. + 3. Interprets the websocket close status code from Blast and converts it to a + VDP error code for View client. + 4. Handles normal, empty, and missing websocket status codes as the blast server + currently only sends these. A subsequent change will convert the full range + of websocket errors to corresponding VDP error codes. + 5. Sends proper error code on rmks crash + + This new logic works for PCOIP, because the VDP plugin mechanism also uses + MKSRoleMain_Disconnected to pass back error codes. + +* Add additional logging to debug grabbitmqproxy socket permission. + + Need add this log line to verify that the VSOCK was fixed later + +* fix up reload time constants + + #define in deci-seconds is just confusing + +* Don't claim we reloaded a non-existent config file + + VMTools_LoadConfig() is returning TRUE if there's no config + file, which confuses its callers and makes them do extra work. + + Only return TRUE for a non-existent file if its the first time through + or if we used to have a file. + +* Unicode: Begin retiring Unicode_Free + + Now that the Unicode and ConstUnicode data types have been retired, + there is nothing special about Unicode_Free. Retire it. + +* tools: silence uninitialized variable warning + +* clean up debug & warning messages in guestInfo plugin + +* recategorize powerOps logging messages + + re-work logging messages in the powerOps plugin + to provide better data by default. + +* Unicode: the opaque type is dead + + Remove the build options... + +* sizeof: more low hanging fruit + + Continue moving our code to the prefered style. + +* adjust logging noise for vmtoolsd + + change the logging levels for vmtoolsd so that messages come out + at the proper level. + +* lib/file: File_CreateDirectory and friends needs to be consistent + + File_CreateDirectory fails if the directory already exists on POSIX + but succeeds on Windows. Things need to be consistent. Make the Windows + version behave like the POSIX version - fail if it already exists. + + If one want to create a directory but tolerate that it already exists + we already have File_EnsureDirectoryEx for that. + +* Avoid logging when guest IO has been frozen. + + This change is part 1 of the change to cache log messages when + guest has been quiesced. In this change, we avoid logging when + guest IO has been frozen. In a subsequent change, i.e. part 2, + we will add the code to cache and flush the log messages. + +* Add Config_GetDouble to lib/stubs. + +* Const-ify our APIs that use struct iovec + + Some of our APIs use "struct iovec *iov", which is not the expected semantics: + readv/writev/preadv/pwritev take a "struct iovec const *iov" + (see http://linux.die.net/man/2/preadv ). So const-ify these APIs. + + lib/public/iovector.h + lib/misc/iovector.c + IOV_WriteIovToBuf + IOV_WriteBufToIov + + lib/public/fileIO.h + lib/file/fileIOPosix.c + lib/file/fileIOWin32.c + FileIO_Readv + FileIO_Writev + FileIO_Preadv + FileIO_Pwritev + + lib/public/aioMgr.h + lib/aiomgr/aioMgr.c + devices/disk/vmxAioMgr.c + lib/aiomgr/simple.c + lib/aiomgr/unbuf.c + lib/aioManagers/aioGeneric.c + lib/aioManagers/aioHttp.c + lib/aioManagers/aioLinux.c + lib/aioManagers/aioWin32Completion.c + lib/blockListVmomi/sanMP.c + lib/dmg/dmgAioMgr.c + AIOMgr_Queue + AIOMgrInterface.Queue + +* Modifications to random.c + + Instead of #ifdefs for each function a lot of #defines are used. + Furthermore, #bora/lib/misc is used to leverage its SHA1 implementation. + The file random_impl.h and the function RandomImplInit() are introduced. + +* HGFS Protocol: open reply add flags field and flags + + The HGFS open request has an allocation size that the Windows + HGFS server can use to reserve disk space when creating a new + file (or overwrite or supersede an existing file). + Current implementation of the HGFS server does not make use + of this allocation size field. Thus, when it does it should + return a flag in the result to indicate the size was used. + This allows clients to be sure if the HGFS server used the + initial allocation size or not. If not, then the client will + continue to do as it currently does, which is cache it locally, + and override the values returned from the HGFS server. + + Future Windows clients, can then test the open reply flags and + always use the allocation size returned from the HGFS server + calls, and not override them with the local cached value. + +* Change default debugging level and location + + As part of the serviceability project, turn on + file logging by default, increase the default log levels, + and document what they mean and when they should be used. + + Be sure any fatal errors always make it to syslog/event viewer + no matter how things are configured. + + Fix a bug where changing the logging filename was + ignored if done while tools was running. + + +* GuestStats: "MemTotal" is misleading + + What Windows and Linux do are quite different. What we need to do is + create a new name - MemPhysUsable - to express what's really desired + and then clean up the Windows, Linux and Vigor codes accordingly. + + Fix the Windows page in rate. + +* Gather new default Tools logs with vm-support + + Part of the serviceability work + +* Hgfs Linux Client: fix size of mount info + + Mount info structure is passed between the mounter and the kernel + driver client. + This structure does not have any guaranteed packing and no way to verify + if something becomes misaligned. + This change modifies the HgfsMountInfo to include a structure size field + so that it can be verified by the kernel client with the HGFS mounter + application. + In this regard we also ensure the structure is packed so that + we should always get the same size no matter what the packing + is at the build time for the mounter and driver. + +* Tools: Use VmkuserCompat_ForkExec for ProcMgrStartProcess on ESXi + + When vmtoolsd for nested ESXi executes a program on behalf of the + VIX API, it should use VmkuserCompat_ForkExec with a specific + resource pool rather than the Posix standard fork & exec. + +* vSock: Prepare for FreeBSD + + The FreeBSD folks are interested in porting the vmci and vsock drivers + for us. When that happens, our API will be available on that platform. + In preparation for that, let's add support to our header for FreeBSD. + For now we just add some stubs that return errors. This way, we can + write code against the APIs now, as long as we handle the errors + appropriately. + +* vm_atomic: fence Atomic_ReadAdd{16,32} on arm64. + + Atomic_ReadAdd{16,32} were missing DMBs before/after the ops. On arm64 + we're emulating x86 memory ordering with atomics by placing these + barriers conservatively, somehow these two ops missed out. + +* Clean up logging in vix plugin + + Make the logging more sane in the default (< debug) mode. + + 2 patterns should be used: + + - a g_debug() containing the op, user, and arguments to the op + - a g_message() at the end containing the op and the return code + + The first could be considered sensitive information, so it will + be visible only if logging is increaded from the + default. The second will happen in the default scenario. + + Also exposed a global gImpersonatedUsername that tracks the + currently impersonated user for use in debug. + +* Add toolbox-cmd support for logging configuration + + Add a 'logging' operation to toolbox-cmd to allow + tools.conf logfile changes from the cmdline. Currently + just adds 'level', but designed so it can be enhanced + to allow additional logging changes. + +* Create namespacetool which should support on Linux and windows guest. + +* Blast failed to set resolution in the remote session + + This problem was caused by Blast switching to a new verison og Glib (2.42.2), + that was broken, namely the x64 version of glib was missing g_get_user_name_utf8 + export. This fix replaces the call to g_get_user_name_utf8 by GetUserNameA + which allows for vmtools.dll and VMWareREsolutionSet.exe to load properly. + +* File_ListDirectory: Use Util_FreeStringList to clean up + + There are few explicit clean ups of File_ListDirectory left over + from ancient times. Clean this up. + +* VMCI: Generate event in vmkon guest pause/unpause + + This change introduces a VMK only VMCI event that notifies VMCI clients + when a guest is paused (quiesced) and unpaused. This is to allow VMK + VMCI clients to release any pinned guest memory, and in general stop + bothering the guest while the guest is paused. + + VMCI versions bumped only for VMK since this doesn't affect other platforms. + +* Str_Asprintf error checking + + Found a few places that really should check the return value. + +* Fix a compilation error in toolboxcmd-shrink.c with gcc 5.0.1. + + While building OVT for Fedora 22, hit a compilation error with + gcc 5.0.1. This is not specific to open-vm-tools as such because + we will hit it whenever we switch to new compiler for internal + build too. And, there is some redundant code here. ShrinkGetMountPoints() + function also calls ShrinkGetWiperState() and handles the WIPER_UNAVAILABLE + and WIPER_DISABLED cases. So, this call to ShrinkGetWiperState() is + redundant because wiper state would be always WIPER_ENABLED at + this line. + +* Dictionary: First pass at cleaning up the parameter descriptions + + We're adding static analysis of functions so the IN/OUT/OPT + for each parameter had better be correct. Clean up the low hanging + fruit now so we can get to the good stuff faster. + + This is explicitly not being complete as we are going to the dictionary + code to test the detection in the static analyzer. Later changes will + clean up the detected issues. + +* Vigor: function parameter comments IN/OUT/OPT + + Touch a few places in the online code, cleaning up a few things. + + This is not intended to be definitive, just to cut down early, excess + noise when static analysis kicks in. Futher changes will finish up + the job. + +* lib/file: remove File_Poll* + + No uses of this code for a long time. Remove it. + +* Fix the compiler check and include mul64.h in open-vm-tools. + + CLN 2699687 introduced a compiler version check and CLN 2700663 + introduced a new header file mul64.h. The compiler check was + intended to be >= GCC 4.4, but it was insisting on both major + and minor version of GCC to be >= 4. So, it was breaking on + Fedora 22 that has GCC 5.1.1 and for a community user building + OVT with GCC 4.3. + + For old compilers we need to provide mul64.h, so include it + in open-vm-tools. + +* publish tools version and install type + + This change consists of 3 parts: + + For tools: + - publish version even when installed from OSPs or open-vm-tools + (no longer use MAX_INT as the version) + - along with the version, publish the install type + + For vmx: + - accept tools install type from tools, and set tools VersionStatus + to TOOLS_STATUS_UNMANAGED in case the install type is OSP or OVT + - save install type to disk + - publish install type in vigor + + For hostd: + - publish install type in vim/vmodl + +* Improve function header comments (IN/OUT/OPT) + + As we're looking into static code coverage a few include files have + can be cleaned up to reduce the noise, making it easy to see real + issues and find bugs. + +* IN/OUT/OPT: line things up for decorating + + Get ready for adding the necessary argument descriptions for static + code coverage. + +* Print a newline after the Wipe operation is done. + + After the wiper operations is completd, the terminal prompt is printed + right after 'Progress' bar and it doesn't look good. Print a newline on + the console after the wipe operation is done. + +* Uniformly refer to "open-vm-tools" instead of other variants, such as "Open VM Tools". + + We are standardizing on "open-vm-tools". + + There's a bonus fix for a typo in an error message in verify_tools.py. + The other changes are all to comments or README files. + +* Add "PANIC: " prefix to Panic + + This change adds a standard "PANIC: " prefix to vmx and + lib/panic panics, and upgrades the vmx panic to the "Panic" + log level. + + I'm doing this in an effort to help automated scripts + determine what the Panic message was from a vmx crash, but + it's also nice for developers when reading log files. (The + RemoteMKS did this a few years ago, and it's been a nice + convenience.) + +* open-vm-tools: fixes to build on FreeBSD 10 + + This change includes various fixes to make open-vm-tools build on + FreeBSD. + + Prerequesites: install gcc48 with the command + pkg install gcc + + Install build dependencies: + glib libdnet libXinerama libXrandr gtk2 gtkmm24 + + Instructions for building: + + autoreconf -i --force + env CC=gcc48 CFLAGS=-Wl,-rpath=/usr/local/lib/gcc48 CPPFLAGS="-I/usr/local/include/" LIBS="-L/usr/local/lib" ./configure --without-kernel-modules --without-xmlsecurity --without-icu --disable-vgauth --disable-grabbitmqproxy --disable-deploypkg + make + + - disable vsock for OSes other than Linux + - define CheckSanity only ifdef VMX86_DEBUG + - make build of hgfsUriPosix depend on having gtkmm, and enable on FreeBSD + - xferlogs.c does not need wchar.h + +* Plumb VMware Photon (container OS) + + Add VMware Photon as a guest. It is plumbed as a full guest (not an + alias) so at all times, now and in the future, it always shows up as + "VMware Photon" - not as something generic underneath. + + The host info code expects that the Photon team will provide an + "/etc/lsb-release" file with the appropriate contents therein. We will + make any necessary agreeing changes in a later change. + + The necessary fields may be found in lsbFields array in the + lib/misc/hostinfoPosix.c file. + +* Disable the tools start up time sync if the guest clock is running + faster. + + When the guest clock is running faster, and when guest reboot, some + service may stuck due to the time get moved backwards by the tools + time sync plugin. Making the entire guest to hang. + + The problem is very tricky to fix. Having the tools start up script + wait for the time sync to complete shall not work well in the newer + guest releases where the services are all started up in parallel as much + possible. + + There are also situations where guest has NTP set up while the host + does not causing a ping pong effects between the tools time sync and + the NTP time sync. + + The main purpose of the time sync is to prevent the guest from running + behind. So if the guest is faster, we can afford not to sync it. + This change disable the tools start up time sync if the guest clock + is faster than the host. + +* File_CopyFromNameToName: reduce to File_Copy + + The 3rd parameter to File_CopyFromNameToName (dstDispose) was "magic", + several raw integer values selected the behavior. This has been the + behavior for a Very Long Time. Sometime since then, we got File_Copy + which takes a Bool that does exactly the same thing, but without + magic numbers. + + Wholesale replace: + File_CopyFromNameToName -> File_Copy + File_CopyFromFdToName -> (no remaining callsites) + + All mappings are mechanical (1->TRUE, 2->FALSE). Done by hand, + so do please double-check during review. OpenGrok shows this is + all mentiones of these function names (minus some dead code). Two + cases in apps/modconfig were changed due to the code appearing to + be pre-existing buggy (an unlinked / nonexistent file should not + be clobbered). + +* Use the if_nametoindex() from libc to replace private NetUtil_GetIfIndex(). + + Replace the private interface name to index function with if_nametoindex() + from libc. The if_nametoindex() will try all the possible protocols to get + a socket handle to retrieve the interface index. + +* Use gcc's _Static_assert for ASSERT_ON_COMPILE + + Since version 4.6, gcc has supported _Static_assert, + regardless of the -std option. This generates better error + messages than our existing ASSERT_ON_COMPILE macro. + +* Initial Branch of CAF code into vmtools branch + +* Merg in CAF changes + + Change 3592033 on 2015/05/27 by dmathews@dmathews_cafdev_vmtools 'Enhance the install.sh a bit Q' +* Add some symbolic links to SOs on install + +* lib/file: FileIO_Close* error handling is inconsistent + + Make FileIO_Close* return a FileIOResult, just like FileIO_Open, and + adjust the code that tests appropriatedly. + +* Tools upgrade always regenerates server key and certificate files. + + Modify vmtools installer and guest proxy tool to enable users to + preserve guest proxy data during uninstallation and regenerate server + key and certificate files during installation. Move guest proxy data + creation and destruction from installer to proxy tool. + +* Caching support for log messages when guest IO is frozen. + + This change is part 2 of adding caching support for log messages + when guest filesystem has been quiesced. + + When guest filesystem is quiesced we can't log messages to log files. + When we are suspended log IO mode, we start caching formatted log + messages with required log configuration in an array. We cache a + max of 4K log messages when guest is in quiesced state. The cached + log messages are flushed using appropriate log handlers when log IO + is resumed. Caching log configuration at the time of quiescing is + fine because log configuration can't be changed in quiesced state + anyway. + + In order to control (including disabling log caching), we also have + a tools.conf switch maxCacheEntries (default 4K). + + tools-for-esxi builds with glib-2.16.4 which does not provide + g_ptr_array_set_free_func interface. Tools build uses glib-2.24.2. + Talked to Etienne, ESXi ships with glib 2.26.0 built as cayman_glib. + I was able to bump glib version for tools-for-esxi to match with + Tools build, but then I hit issues with FreeBSD build which is + also using some ancient version of glib. For now, I have given up + on bumping glib at the moment and avoid calling the missing glib + function g_ptr_array_set_free_func. + +* Added a missing break statement. + + This was reported from the community: + https://github.com/vmware/open-vm-tools/issues/25 + +* Initial CAF vmtools build integration + +* Porting of the guest proxy cert tool to Windows (Part 1) + + Ported most of the SSL functionality to Windows. + Fix the make files. + Compiled and run successfuly on Windows. + + Resolved the OPENSSL_Applink error. See + http://stackoverflow.com/questions/16125905/ssl-no-openssl-applink + + Fork off the implementation that requires Windows native API calls. + Those implementations shall be filled in in Part2. + +* CAF - Preserve config on upgrade + +* Log the message about caching correctly. + + When maxCacheEntries is set to 0, caching is disabled. + We need to log it correctly. + +* lib/log: allow more than one custom output + + This is done a way that is minimally invasive into our existing codes. + + This also makes the custom output more similar to the other outputs + in that there is now a way to specify a unique name for each instance. + +* vgauth - add a -h option + + add a -h option, even though it shouldn't be run from a cmdline. + +* lib/log: provide a function that handles common product info issues + + Refactor the simple, default product info setting code into an + accessible routine to make Log Facility users life easier. + +* lib/log: handle a new init with function + + It can use the new product state setter too... + +* lib/file: FileIO_Sync return value cleanup + + The FileIO_Sync usage is inconsistent with the rest of FileIO - return + int rather than FileIOResult. + +* FileIO_IsSuccess: clean up some code (and fix a bug) + +* Hgfs Linux Installer: add HGFS FUSE mount capability + + Running the Linux tar installer for tools there are 2 HGFS clients which can + be installed and mounted to provide file sharing between the host and + the guest. The existing Linux kernel mode client and the FUSE client. + + This change adds the checks to decide which HGFS client to use and install. + Which HGFS client to install is decided using the Linux kernel version, + and 4.0.0 is the current latest version used if HGFS FUSE is supported + tests if the Linux VM has the FUSE components installed or not. + + The capability of the HGFS FUSE client to run (by default) is done by the + HGFS FUSE client itself running it with -e or --enabled argument. This + performs a system compability check and returns + 0 = success system is compatible i.e., enabled by default, + 1 = Linux OS version is not supported for HGFS FUSE client older than 4.0.0 + 2 = Linux OS is missing FUSE components and the user should install them. + For 0 or success the installer willl install the HGFS FUSE client by default + and mount the HGFS shares at the usual location of /mnt/hgfs + For 1 result the installer will install the legacy kernel version. + For 2 the installer outputs a message for the user recommending installing + the FUSE packages to enable the feature. + + The VMware tools start up scripts also run the HGFS FUSE binary to determine + the current system compatibility and will start and mount the HGFS FUSE client + for 0 returned as above. Otherwise, the legacy kernel driver will be started + and mounted. (Assuming HGFS client is needed.) + + The VIX RPC callback in the vmtools daemon called when the UI enables shared + folders to perform the HGFS mount now also runs the HGFS FUSE binary to + determine whether it should mount using the HGFS FUSE client or the legacy + kernel driver. It also determines if the mount is needed checking for the + expected HGFS client mount from the mtab entries. + + Lastly, the user can mount the FUSE client manually even if the system + compatibility checks for default use fail. It just will not work with the UI + enable or disable of the feature or across reboots for those cases. + +* Perform Linux quiescing in a separate thread. + + When guest is doing IO, OPEN and FIFREEZE calls might + take longer than expected. OPEN could take long even when + it is a network mount point (NFS), though it is no longer + applicable after fix for bug 1206486. In order to free up + the main thread for processing other important messages + like ping, we run the freeze steps in a separate thread. + + The new thread for freeze modifies currentOp in gBackupState + which is also accessed by the AsyncCallback driving the state + machine (run by main thread). Also, according to a comment in + vm_atomic.h, gcc might generate two instructions for writing + a 64-bit value. Therefore, we have opLock mutex to protect + access to currentOp and related fields. + + Having a separate thread requires tracking freeze status + and adding a new state VMBACKUP_MSTATE_SYNC_FREEZE_WAIT + to vmbackup state machine. Freeze status is tracked as + VmBackupFreezeStatus. + + This change is mostly Linux specific because the bug + was found on Linux and a major issue is to enforce + Windows threading apartments. When enabled for Windows + same code generates RPC_E_WRONG_THREAD because CoCreateInstance + is created by a different (main) thread than submitTask. + Refer http://blogs.msdn.com/b/larryosterman/archive/2005/08/25/456344.aspx. + Fixing this for Windows will require major code re-org and + probably not worth it right now. + + While there, improve some log messages and add few new log + messages for future use. + +* Asyncsocket: Fix DoOneMsg ref count leak and other bugs + + There a few issues with AsyncSocket_DoOneMsg: + + - The poll callback removal is specific to regular socket, and does + not remove any real-time callback that may have been registered. + + - When using with IVmdbPoll, it would leak an ref when the function + is called within an asyncsocket error handler being called from the + recv callback. In that case AsyncSocketIPollRemove would not + decrement the ref count, but the subsequent AsyncSocketIPollAdd would + increment, resulting in an imbalance. The fix is to not add the + callback in the error case. + + - The recv callback can also be canceled if FillRecvBuffer fires the + client callback, so we need to check for that. + +* Stop caching procState for Posix guests. + + The child process' state for StartProgramInGuest is + cached in memory for 5 mins. procState holds a FD in + case of Posix. FDs are limited per process (usually + 1024 by default). Therefore, holding on to open FDs + in cache could be problematic if there are frequent + calls to StartProgramInGuest, as that would make + vmtoolsd run out of FDs. Holding on to procState is + required only for Windows to keep Windows from reusing + PIDs, however, this is not required in case of Posix. + Stop caching procState for the child processes that + are no longer running in case of Posix which would + automatically take care of closing the FD. + +* Tools Vix Plugin: fix mount call potential security issue + + The Vix plugin processes the HGFS mount request when the user enables shared + folders feature from the UI. For Linux guests only, this results in a system + call to mount. However, no path is specified and it could pick up any mount + in the root system path. + + We fix this by explicitly checking for the system mount which resides in either + "/bin" for example in the case of Ubuntu, or "/usr/bin" in the case of SUSE. + +* lib/file: Posix File_WalkDirectoryNext incorrect + + The Posix File_WalkDirectoryNext header documentation is incorrect. It + returns a directory entry, not a full path. The Windows and Posix + implementations of File_WalkDirectory* and File_ListDirectory all + behave identically - they return directory contents, not full paths. + +* Add more logging around AsyncSocket Flushing. + +* Tools Vix Plugin: fix fuse mount arguments list + +* Change default sampling rate for guest stats to 20 seconds. + + Add a new poll interval guestinfo.stats-interval with default value + of 20 seconds. GuestStats follow this interval now and rest of the + GuestInfo follows the existing guestinfo.poll-interval with old + default value of 30 seconds. + + Now, users can disable GuestStats by setting guestinfo.stats-interval=0, + so guestinfo.disable-perf-mon is a redundant configuration. However, + we need to support it for being compatible with old tools configuration + as this alone is not a big enough reason to upgrade the tools config. + + VC and layers above use 20 seconds interval for sampling performance + stats. The current default interval for guestInfo leads to a sampling + error of 30%. In order to avoid sampling errors we have few choices, + change the current default or add a separate interval for guest stats. + We choose latter because we don't want to increasing reporting frequency + for guestInfo in general and thereby increase unnecessary load on + overall system. + + Also added a kill switch "guestinfo.stats.enabled" (default TRUE) in + VMX to disable guest stats. When this config is set to FALSE, treat + the guest stats as v1 to updating vmkernel, but don't process the + extendable part of the payload. + + There was a typo bug in memAvailable calculations on Linux. It was using + lowWaterMark->value where it should have been lowWaterMarkValue. + +* atomics: add arm64 implementation for Atomic_Bool + + Straight forward Atomic_Bool support for arm64 + +* Port guest proxy cert tool to Windows (Part 4 and Final) + + Added code to check for the super user privileges. + Added an verbose option to enable logging if the user needs to. + +* Fixed typo in namespace command name from "namespace-get-events" to "namespace-get-event". + Added fflush for stdout and stderror. + +* Include cstring to avoid 'memset not in scope' error. + + Under a specific build environment (SUSE SLED 11 SP4), it fails to compile + open-vm-tools source codes because cstring is not included to define the memset + function prototype. + +* Add additional logging to help debug TCLO rpc timeout + + It is going to be very useful to dump the content of the TCLO RPC + requests. Also we should also need to log the empty message periodically + so that we can be sure that the tools side is checking the TCLO RPC + in time. + +* GOS Table: Add asianux7-64 + + Yet another asianux release... + + In this case we had gone ahead and covered a future version 5 release + and now discover that they renamed it version 7. We keep the 5 entries + so existing VMs run but all front facing stuff is now version 7. + +* Make mouse switchable between VMW0003 and PNP0F13 + +* Guest OS: trivial clean up + + The entries for OTHER should be together. + +* Help with tools uninstall removal of caf directories + +* Virtualize most of the AsyncSocket_* public member functions in vmcore-main. + + - Exceptions to this approach are AysncSocket_GetID and + AsyncSocket_SetErrorFn APIs. + +* GuestOS: Future proof Linux version identification + + When we encounter a Linux newer than the code knows about we + return a guestOS string that is the latest known to code along + with its appropriate description. This is very future proof. + + Change the Linux ID code to return a description string which is + dynamically created from the major/minor release number of the + Linux - return "Other Linux x.y kernel". + + This makes the Linux ID code in sync with the Solaris and Windows + codes which perform the equivalent operations. + + Towards this end, the "front facing" descriptions for Linux 3.x + are updated to "3.x or later". If a newer Linux comes along that + needs special treatment, the front facing string will be changed to + "3.x-a.b" and the new Linux will get its own string. + + This change makes Linux 4.x "just fall out". We really do not care + what the guest OS string is within the VMX file, only that it is + correct for the guest to be run. + +* Fast UTF8 validation + + We validate UTF8 strings using the ICU or older CodeSet routines. + These paths are correct but have somewhat high overhead. Encorporate + an optimized, high speed UTF8 validator. + + The optimized, high speed UTF8 validator is added as a separate file + within lib/misc so it can be used throughout our source base with + minimal interactions. By name, it is part of the CodeSet API. + + A Unicode library wrapper function for the CodeSet function is also + included... some may find this useful routine more easily this way. + +* asyncsocket: add AsyncSocket_SetCloseOptions() + + This is the first of a two-part change to: + - enable asyncWebSocket::close to send a websocket close frame per + RFC-6455 and flush it out before closing the socket, and + - enable a websocket client to optionally wait asynchronously until + the remote side cleanly shuts down the connection in response to + receiving a close frame. + + AsyncSocket_SetCloseOptions() adds the following optional behaviors + when AsyncSocket_Close() is called: + + 1. If flushEnabledMaxWaitMsec is set, AsyncSocket_Close() will + synchronously call AsyncSocket_Flush() until all outgoing data + are sent over the wire. + 2. If closeCb is set, the callback will fire when AsyncSocket_Close() + has closed the socket. + + For the asyncWebSocket case: + Option #1 allows the application to synchronously wait for the websocket + close frame to get flushed out. + Option #2 allows the application to asynchronously wait for the websocket + close frame reply before closing the socket. + +* Let the vmtools uninstall remove some paths + +* Remove some log files that CAF put into it's bin dir + +* Implement a PCG random number generator + + PCG is a new / fast random number generator that looks pretty + good. Best part: it only needs 64 bits of state storage normally. + +* Coverity fixes for possible use_after_free, double_free and double_close. + +* Random_FastSeed: take explicit seed + + Make the seed be explicit instead of implicitly 0. + +* Replace global gLoggingStopped with thread private LogState. + + Logger is not a global object, so using a logger level lock to + protect global variable gLoggingStopped does not help. This was + not an issue before because Toolsd was pretty much single threaded. + + This change does two things: + 1. Replace global gLoggingStopped with thread private LogState. + 2. Keep the existing lock in vmx logger to protect the logger itself + from the scenario of different threads logging to same domain + (=> same logger being used by multiple callers) at the same time. + +* Window 10 Server now has an official name - 2016 + +* fix vgauth logging defaults + + more servicability work. make vgauth use /var/log like toolsd + +* AsyncSocket - Parsing updated websocket header field. Additional logs. + + Parse updated websocket header field for e2e port and pass it to proxy API. + Additional log messages for better debug information. + +* ASYNC-SOCKET: Fix the logic to throw away buffers that we failed to send. + + AsyncSocketSendSocket appends a buffer to the sendBufList and tries + to send it out. If the send fails, there is logic to remove it from + the list but it was comparing the head of the list to see if it has + changed while we actually appended the buffer to the tail of the list. + This results in the failed buffer lingering in the list and upon an + immediate asynSocketClose, the callback associated with the failed + buffer would fire. + +* Add ProductState_GetConfigName, make W32UtilGetCommonAppDataPath use it + + Add ProductState_{Set,Get}ConfigName functions that programs + can use to explicitly specify the product name for + configuration files. + +* Don't sort compatible product names completely lexically (CUI) + + Add internal sorting keys to use instead. This also allows + us to sort products alphabetically but to sort versions in + decreasing order. + +* Rename MsgList_ToString to MsgList_ToEnglishString + + MsgList_ToString does not perform localization. This is + confusing. Even though its function comment says so, we + should just make the function name more descriptive. + +* Fix error messages in CAF install.sh script + +* Add usrsctp to AsyncProxySocket. + Remove unused variable which prevents compile with -Werror. + Fix scons build breakage. + +* Skip freezing autofs mounts. + + It's possible that some autofs maps entry become invalid over time. So, + trying to freeze such invalid entries could lead quiesce snapshot to be + failed. + +* Windows named pipe server impl in bora/lib + + This code adds the server creation functinality for named pipes in + asyncsocket library. It exposes the AsyncSocket_CreateNamedPipe + function which creates a named pipe and passes a valid AsyncSocket + object to the user. Also changed/added a few other functions to make it + work. Added an accept function that gets called when a new connection + request comes in. Added needed functions for Closing the named pipe on + cleanup. + + The internal accept callback function creates a new AsyncSocket object, + swaps the HANDLE object of the new AsyncSocket object with the older + object and returns to the client the new AsyncSocket object(handle is + swapped as the connection is associated with the HANDLE). The older + asyncsocket object is put to listen mode again. + +* Fix the params passed to accept SSL callback function + + The clientData passed to AsyncSocketSslAcceptCallback is really just + the asock structure. That is different from the asock->clientData which + is expected to be passed to sslAcceptFn(). + + The current callers of AsyncSocket_StartSslAccept() don't use the clientData + field in CB, which is probably why they never had an issue. + +* Avoid warning message when logging group is missing. + + When tools.conf is not around, g_key_file_get_integer() + returns G_KEY_FILE_ERROR_GROUP_NOT_FOUND, so a check for + G_KEY_FILE_ERROR_KEY_NOT_FOUND error alone is not sufficient. + Missing error check was leading to an unnecessary warning + in the system logs whenever service was started with no + tools.conf. + +* AsyncSocket/SSL: Add APIs to do connect SSL asynchronously. + + Currently AsyncSocket_ConnectSSL is a synchronous API. VRDMA backend needs + to initiate SSL connections from VMX which have to be asynchronous. There are + already APIs in ssl.h/asyncsocket.h for accepting SSL connections + asynchronously. + + This change adds new functions to do SSL connect asynchronously. The APIs + are very similar to AcceptSSL APIs (SSL_SetupAcceptWithContext, SSL_TryCompleteAccept and + AsyncSocket_StartSslAccept). + +* Make sure a timeout source exists when the polling interval is + unchanged. + + TweakGatherLoop previously returned without creating a timeout source + if the polling interval had not changed. That's fine if a timeout + source already exists, but that may not always be the case. To address + that possibility, the code has been modified to check whether there + is a timeout source before checking whether the polling interval has + changed. + +* Hgfs Server: add a common function for shares access check + + Previously this function was duplicated and placed in VMX and + tools policy code. This leads to the Hgfs Server library calling + directly into the VMX and tools service. + Furthermore, the function does not need to reside in the policy + code as it only relies on the arguments passed and uses + definitions defined in the Hgfs protocol header. + + This change adds the function into the hgfs server library. + + This simplifies the tools build of the server policy code + as it will not need to duplicate the function now and so + is removed. + + The host server policy will be updated separately. + +* Hgfs Server VMX: replace the check mode for a share + + This removes the other duplicated policy function to + check the shares access mode. It is now replaced with a call + into the Hgfs server share access check funciton. + +* Define int128 and uint128 in vm_basic_types.h + +* nrandom: Add raw SHA1 APIs and use Intel's HWRNG if available + + Add support for RDRAND and RDSEED. + + Using opcode for RDSEED to work around that our GNU assembler doesn't + recognize the 'rdseed' instruction yet. + + Adjust sha1.c and thereby fix extract_buf() in native random driver. + + * The random driver doesn't use the "full" SHA1 algorithm (no padding, no + variable length messages) + * It sets the initial state if RDRAND is supported and only transforms + block-wise + * To have the same behavior (omitting the prepare phase) in ESXi we add + SHA1RawInit() and SHA1RawTransformBlocks() + +* open-vm-tools: use top_srcdir instead of top_builddir for include paths + + With autoconfed packages, it's generally possible to build in another + directory than the source directory. For example, you can do: + + # tar zxf pkg-1.2.tar.gz + # cd pkg-1.2 + # mkdir build && cd build + # ../configure && make + + The advantage is that it's very easy to clean up, just remove the build dir. + However, the feature was broken in open-vm-tools because in some places + $top_builddir was used instead of $top_srddir. This change fixes that. + +* Change StrUtil_StrToInt to reject empty strings as invalid. + + StrUtil_StrToInt(&out, ""); used to return true for success, and populate + `out` with zero. Now returns false. (As listed in the documentation, `out` + is undefined if the function fails.) + +* Refactoring of AsyncProxySocket code + + Refactoring of AsyncProxySocket code for better readability. + Mainly renamed direct socket to primary socket and proxy socket + to secondary socket. + +* Hgfs: move the file type from the protocol to the hgfs public header + + Since the file type is exposed to the DnD code it makes sense to move + it to the public hgfs header alongside other publicly exposed types + such as the open mode too. + This allows the DnD code to not include the Hgfs protocol header + directly. + Longer term it would be great if the DnD code minimised the exposure to + this type using DnD wrapper functions mapping to its own internal type. + This would allow later removal of exposing the Hgfs type completely with + minimal impact. + +* Fix timestamp check + + The timestamp check math was broken for NotOnOrAfter, + and if the lifetime of the token was long enough, it would + fail a valid token. Do some cleanup to make it all clearer. + +* Add 'info update network' subcommand + + Add network update cmd for the VMfork project so it + can flush reconfigured child network info asap to the management + layers. + +* Support for fallback to TCP for Blast UDP. + + When starting a UDP connection fails we should be falling back to the existing TCP connection. + The failure could be for any reason. E.g. - firewall in the middle which restricts UDP traffic or + client proxy initialization failed etc. + +* open-vm-tools: make dndcp plugin link with hgfsUriPosix + + During 'make install', libtool threw an error because it's not + able to find HgfsUri_ConvertFromPathToHgfsUri when linking the + dndcp plugin, because the dependency on hgfsUriPosix was missing. + + Fix Makefile.am to make dndcp plugin link with hgfsUriPosix. + +* Use C++11 for libsigc++-2.0 >= 2.5.1. + + According to http://libsigc.sourceforge.net/ and recent + build failures with open-vm-tools 10.0.0 on Fedora 23 & 24, + libsigc++-2.0 >= 2.5.1 requires C++11. + + When using C++11, I also figured that normally Linux builds + define "__linux__" instead of "linux". The latter is defined + only when GNU is enabled. So, replace "linux" with "__linux__" + so that we can use -std=c++11, otherwise, we will need to + use -std=gnu++11. We might want to use GNU C++11 extensions + in future for some other reasons, but I don't think "linux" + define is a good reason to choose it. + + C++11 generates warnings for missing space between strings + and literals. So, fix those as well. + +* Fix for assertion in asyncSocketInterface.c + + Like AsyncSocket_GetWebSocketProtocol, AsyncSocket_GetWebSocketCookie + is also used by clients with normal sockets (non-websockets). + The virtual table for these sockets will have "asock->vt->getWebSocketCookie" + as NULL. + +* Workaround fix to avoid rpc warning messages flooding by changing log level to debug. + Customers will see a lot of 'SimpleSock: Socket # closed by peer.' in their + event viewer if they are using terminal server. It does no harm but will bring + unnecessary concern to customer. Change its log level from warning to debug. + +* Add an error handler to X11 resolutionSet + + If display memory is not sufficient to set a new desktop size, an X error event + may be generated. Without a custom error handler, this will terminate the user + tools daemon, which is undesirable. + + Add an X error handler that logs the error without returning. + +* Hgfs Server VMX: add some logging for file change notify ops + + The packing of the Hgfs set watch operation for a directory in a share + HGFS_OP_SET_WATCH_V4 and for the packing of a HGFS_OP_NOTIFY_V4 + file change event was not logged. This makes it cumbersome to + track operation occurrences in the log file. + + Add logs for each of these events. + +* build vmware-toolbox-cmd for ESXi + +* Hgfs Linux Kernel Client: support older mount info version + + It is proving more problematic to expect that the HGFS mounter + binary and kernel HGFS driver client be kept in sync. For + full functionality with all the mount options supported the + latest mounter binary be used together with the latest kernel + client. However, users can mess this up at install time with + failure to replace the user mode mounter application. + Furthermore, Ubuntu need a new kernel mode HGFS client for + shipping 15.10 open-vm-tools-dkms package in a Linux 4.2 + kernel, and this needs to work with the older mounter binary. + + This change allows the kernel driver to support the existing + new mount information object but also the older one. + For future changes, bump the newer version in the mount + information object, too. + + In order to achieve the support of at least two versions of + the HgfsMountInfo structure make the main line + code independent from the mount information object and + now initializes the super block information object + from local variables set from the mount information data. + + The validation check for the user supplied HgfsMountInfo + data is pushed into a wrapper routine which will return success + or failure of the check. On success it will return the version + of the mounter information which is passed on to the function + for extraction of the interesting data fields to use. + + Note, for now, we support the current and older version only. + There is no assumption made about any newer version + being backwards compatible and extracting the information + that it knows in those cases, it will just fail. + + This only affects the Linux HGFS kernel client, the OSX and + Solaris clients remain as before as there is no need for + supporting multiple versions of the mounter binary. + +* vmtoolsd: log message when loading a plugin fails + + Add a log message when loading a plugin with system libraries fails. + Sometimes when vmtoolsd attempts to load a plugin it may fail, and + then attempt to load the plugin with shipped libraries. + +* Making Blocking socket APIs public. + + Making Blocking socket APIs public and removing them from virtual table. + +* lib/uuid: Avoid magic number for ISO 11578 UUID format length. + + We refer to the ISO 11578 hexadecimal UUID format as "packed" format. A + constant for its fixed length seems reasonable. + +* HostInfo: vmkernel5 + + The hostinfo identification code isn't coded to handle vmkernel 6.5 - + nor is it robust about what it would do when we hit vmkernel 10 and + later. + +* Modify freebsd debug statement to avoid a crash + + freebsd is trying to use a %Zu for a size_t value. + But instead, it appears to simply ignore the format + '%' and print it. + which means a lot of bogus debug noise like + + [Aug 18 09:45:24.159] [ debug] [vmsvc] RpcIn: sending Zu bytes + + Which is gross. But when we use it with more than one arg, + we end up with a nasty type issue, and try to treat use + arg1 with arg2's format, and boom: + + "RpcIn: received %Zu bytes, content:\"%s\"\n" + + The size_t in arg1 gets processed by the %s. + +* circList.h: stop name conflicting + + BSD headers (widely used by Mac OSX and by vmkernel's BSD + networking stack) have a sys/queue.h that defines LIST_FIRST + and LIST_FREE macros ... and does so differently from + the one in circList.h. Previously we have worked around the + problem with undef. + +* Meet the security requirements that we should disable SSLv3, TLSv1, and + TLSv1_1, leaving only the TLSV1_2 on. + + Leavarage the bora/lib/ssl's SSL_NewContext() function to create the + SSL context so that most of the other security requirements can be + auto fullfilled, e.g. cipher list, single DH use, no ticket... + +* display help message for "stat raw" commands through toolboxcli + + The help commands needs to be extended to include the "raw" related subcommands + + # vmware-toolbox-cmd stat raw + session + host + resources + vscsi scsi0:0 + vnet 00:0c:29:ca:27:69 + + # vmware-toolbox-cmd help stat + stat: print useful guest and host information + Usage: vmware-toolbox-cmd stat + + Subcommands: + hosttime: print the host time + speed: print the CPU speed in MHz + ESX guests only subcommands: + sessionid: print the current session id + balloon: print memory ballooning information + swap: print memory swapping information + memlimit: print memory limit information + memres: print memory reservation information + cpures: print CPU reservation information + cpulimit: print CPU limit information + +* Fix remove alias bugs + + If remove alias is called when a mapped alias also exists, + but with a different cert, then the remove alias code + was confused and returned invalid arg, thinking there + was no match. + + If multiple mapped entries refer to the same cert, + it would only look at the first user for removal, failing + w/o error to remove the later. + + Tweaked the remove alias code to fall through and + clear out any mapedp entries even if they shouldn't + be there, so anything left behind by 1545682 will + be clearable. + + Added some new unit tests for these scenarios. + + Also added some sanity checking code the service does at + startup to check for an orphaned alias. + +* GosTable: Photon is "Photon OS" now. + + Make the appropriate adjustments. + +* GosTable: add debian 9 and 10 + + Prepare for debian 9 and 10. + +* GosTable: Darwin 16 (OS X 10.12) + + Pre enable Darwin 16 (OS X 10.12). + + Default OS X becomes 10.11. + + Fusion team/Regis/Darius: We *REALLY* need to update + vmcore/vmx/main/cpuid.c to reflect the abiities of newer CPUs. + +* Update the cipher list. + + The cipher spec has been made more strict since the bora/lib/ssl/ssl.c + cipher list was last updated. + + VMTools calls the bora/lib/ssl/ssl.c SSL_NewContext() to create + the ssl context. We are required to use the updated cipher list. + Two approaches: 1) Set the the cipher list again after calling lib/ssl + SSL_NewContext. 2) Change lib/ssl to update the cipher list. + We decided to take the latter approach. + +* Fix impersonation on OS X. + + As of a security patch to 10.10.3, setreuid() cannot be reverted. + since OS X doesn't has setresuid(), that means we can only use + the effective uid for guestOps. + + This means: + - KillProcess can't be done, since kill() looks at real uid + - access(2) also looks at real, which can result in + GetFileAttributes() on an unreadable file suceeding, but + returning unset data + - Impersonate needs to use seteuid() instead of setreuid() + - When lanching a new process, we need to have both effective + and real set + +* Fix l10n handling on cmdline + + The glib option parser dealt poorly with Unicode + cmdline args before 2.40. Unfortunately, we use + an older version. So work around it and parse by hand. + +* Speed up File_IsFullPath. + + We currently do a Unicode_StartsWith in File_IsFullPath. This can + be replaced with a light-weight character compare. + +* Expose File_StripFwdSlashes + + Expose FileStripFwdSlashes as File_StripFwdSlashes. + +* Make Snapshot Take API with guest quiesce parameters + + 1. Change Snapshot Vigor API quiesce as quiesceData parameter + 2. Change tools/vmbackup to send new binary (ABI) API to vmtools + 3. Detect the timeout by keep_alive msg + +* Add namespacetool in tools package for Linux and windows. + + Modified user options- + - Provided simple namespace command for end user. + - added one more command to delete key. + + +* VMCI: Retire VMCI_QPFLAG_PINNED + + The VMCI_QPFLAG_PINNED was introduced to support a specific use case (vVol), + where mapping in a page when accessing a VMCI queue couldn't be handled. + vVol moved on to using vPageChannel (and may even be gone as a project now), + and the flag has already been removed from the upstreamed Linux driver, so + let's remove it completely. + +* Pre-glibc-2.5 is deprecated. + + Remove macros to work around pre-glibc-2.5. Most of these + cover functionality that was added in glibc-2.3 or glibc-2.4. + +* Remove wrapLib from loglevel_user.h. + +* Allow self signed certs anywhere in the chain + + A common use case is to have an SSO server with a self-signed root + and leaf cert. Before this change, if the leaf was in + the alias store, then the cert verification would fail because + the self-signed root was considered an error. + +* GosTable: clean up Debian + + The bits for Debian say "4-5" and one bit covers them all. No need to + be specific until there is a need. + +* Add VSS parameters and timeout to control the VSS process during snapshot + + 1. utilize the timeout to extend the time of process + 2. Add StartEx in VSS requestor to use vss paramters from + GuestQuiesceParamsV2 + +* mksVNCServer - Add support in Linux agent for sending session close reason to client. + +* Fix domain user decoder in vgauth. + + Fix printf format for domain users + +* GosTable: Separate out Oracle and CentOS + + We need Oracle and CentOS separated out for special treatment. + + The newer OSen are grouped in 3.x Linux (or later). + +* Initialize netutil properly. + + Netutil has some dependencies which are poorly enforced. + +* Add partly encrypted dictionary. + + We are leveraging existing code for encrypting VMs on + our hosted products, Workstation and Fusion. In the hosted products + the .vmx file dictionary entries are encrypted by default; we + support opt-out of encryption by specifying "plain" on get and set. + + However, on ESX we want most of the dictionary entries to be plain- + text by default. The main reason for this decision is compatibility + with several existing VMware products that depend on being able to + read and write the dictionary out of band. For example, SRM writes + to the .vmx file directly when fixing paths at the recover site. + + Note that the default behavior on ESX can be changed by using the + following config option: + encryption.unspecified.default = "encrypt" + With that option specified in the .vmx file before encryption, VMs + on ESX will be encrypted as they are on hosted. + +* open-vm-tools: add common-agent (CAF) + + Add caf files to open-vm-tools. + - building caf is disabled by default for now. + - the list of files to be included is generated dynamically, to + avoid extra work and errors when files change. + - however, the list of files to be compiled in the Makefile.am + files is NOT generated dynamically, so every time files are + added/removed, the Makefile.am files need to be adjusted. + - two caf source files had to be edited because they use the + macro VERSION which conflicts with defines used for ovt + - building caf depends on rabbitmq >= 0.6 (Ubuntu 14.04 ships + with version 0.4.1 and 15.04 with 0.5) + - caf files are licensed with LGPL + +* Pull 'disk' command from ESXi + + 'disk' command underlying support doesn't handle typical + ESX disk types, so remove it. + +* Stop compositing frames when no-one is watching + + This change makes the first foray into having the MKS stop + compositing frames when no-one is watching. + + Under the config option "mks.allowFrameWatchingChecks=TRUE" + (still disabled by default), the MKS will now skip the actual + compositing, unless an EndFrameImmediately is requested. This + has the nice side-effect of ensuring that the odd sources of + frame composition keep working like normal (such as SVGA + develEndFrames, mksReplays, or Checkpoint stale screenshots), + although we might want to revisit this in the future. + + We do not yet have any notifications of when the watching status + changes for the screenSources to consume, but that will + presumably be coming as soon as the first one is ready to use + this notification. + +* Generate isoimages_manifest.txt as part of tools linux build + + Tools build needs to generate ISO image map manifest file + isoimages_manifest.txt for host to pick the guest to ISO + name mapping. Define this mapping in the guest_os_tables.h, + so that it is all in one place and matches exactly with + the guests we know about. + + As part of this change, also introduce the new mapping for EOL + Linux and Windows guests, i.e. frozen ISOes for these guests: + 1. winPreVista.iso for pre-Vista Windows, and + 2. linuxPreGlibc25.iso for pre-RHEL 5, pre-SLES 11, pre-Ubuntu 10 + and other pre-glibc 2.5 based Linux distros + +* tar installer: remove pam_unix2.so from pam file + + A customer was concerned about the warning + "pam_unix2.so cannot be opened" on RHEL 6.3. That modules was + used in older Linux distributions, but the functionality has been + added to pam_unix.so ion newer ones. Since tools are frozen + for older distros, it's now safe to remove the reference to + pam_unix2.so. + +* Changes for building caf in Open VM Tools. + +* Merge CAF install directory. + +* return DNS info on ESXi + + ESXi Tools only returned the basic NIC info, not the routing + or DNS. This adds the DNS by rearranging #ifdef's and calling + the existing code for ESX. + +* Removed extra line in output of namespacetool command get-value. + +* Added namespacetool to open-vm-tools. + +* Fix incorrect value of prefixLength in guest info. + + The prefix length (number of netmask bits) are not set + in the guest info for the nested ESX VM. This is because we + were missing code path that computes it in ESX tools. + Added the code that computes it. + +* lib/misc: Remove Util_GetPrime. + + No callers remain for this bizarre function. Good-bye. + +* VMCI Win Client:Migrate to the new WDK build system + + Keep building the WinXP/Win2K3 and Win8 variants but with the new build logic. + Switching these to Vista and dropping the WinXP/Win2K3 builds will be a short + follow on change. + + The change also includes changes to make the drivers compile with the new build + system using warning level 4. + +* Update open vm tools installation to allow CAF to install/run + +* open-vm-tools: remove directories on uninstall + + A few directories related to caf remained after 'make uninstall'. + +* Update the Copyright year to 2016. + + A new version of GuestSDK will be released as a part of vSphere 2016. + Updated the copyright year to 2016 at all applicable places in the GuestSDK + code. + +* Fix upgrade from old (pre cafenv-appconfig) version of CAF + +* improve logging + + make the default logging more useful by turning a bunch + of Debug() into Log(). Now it dumps some of the request + basics and errors. tokens are hidden (security) and certs + are hidden (noise level). + +* more cmdline parser improvements + + restore support for '=' between option and value. + +* tool1010 L10n drop 1 + + This is to check in tools1010 L10n drop 1. + +* BackupComplete may lead to data loss if log is truncated + + Add extra state in VMX to commit snapshot before backup completion and update + manifest file at last. + +* open-vm-tools: fixes to build with FreeBSD + + - amd64 in host_cpu means 64bit, add that to configure.ac + - use 'z' for FMTSZ in FreeBSD, just like Linux + +* Merge CAF to Tools + +* Tools 10.1 - Final L10n drop + + This is to check in the final L10n drop for Tools 10.1. + +* Add Tools version 10.0.6 definition + +* prioritize 'ip' over 'ifconfig' for gathering networks + + openSUSE 13.1 (at least) has a bug with ifconfig where it + truncates the network name. which makes the script code + to save off the networks break. so instead of prioritizing + 'ifconfig', use 'ip' which doesn't have any issues. + +* tar installer: fix to build with clang > 3.4 + + Functions HasMap_Store() and _Retrieve() are not used any more, + so remove them. + + Implement CheckSanity only if VMX86_DEBUG is set to avoid + unused function warning. + +* Fix some memory leaks. + + leaking the 'data' pref value for a log handler. + leaking an rpc message response if the caller doesn't want it. + leaking username/password for every guestOp + +* Correct the freeze and thaw ordering for mount points + + There were two issues with the way we were doing quiescing on Linux: + 1. Thaw was following the same order as freeze, actually it should + follow the reverse order of freeze. Fixed the thaw order. + 2. Freeze was following the order provided by getmntent API which is + the order in which system created the mount points. This could + be problematic when a mount point depends on other mount point, + e.g. loopback mount point. In order to honor the dependency + among mount points, we need to reverse the order of mount points + listed by getmntent API. + + While reviewing this change it was found that the interface used for + passing the mount points around was not very clean. It was a ':' + separated string of mount points. There were multiple problems with it. + We were converting a list of strings into one string and then tokenizing + it later. As part of this change, we fix that interface too by replacing + the string with single-linked list, GSList. Using GSList brings glib + dependency to lib/syncDriver. + +* Restore fdCnt to size_t. + + The datatype for fdCnt was changed to ssize_t in a previous change. + It was not required because we can adjust the 'for' loop + using it and keep it as size_t. + +* Fix additional tools issues reported by Coverity. + + Fix some issues found by the latest Coverity scan of tools 10.1, + plus a few related nits. + +* Namespacetool links vmtools lib which has already implemented + functions "Debug" and "Panic". + + Removed these functions' implementations from namespacetool. + +* Added new constants for tools version 10.0.7 (namespacetool changes). + + open-vm-tools 10.0.7 will add support for namespace command line utility, + so, we need to add tools version constants for 10.0.7 (update3) as a + future reference. + +* Fix unused function errors thrown by clang 3.4 + + Fix unused function errors thrown by clang 3.4. These are all + caused by functions only used in an ASSERT(), which is defined + to a NOP for non-debug builds. + +* Improving CAF build time, esp for open-vm-tools - additional files + +* Add signature checks to lib/toolsversion accesses. + + Add Tools ISO signature checks to the accesses coming + from lib/toolsversion. Also, extend the signature checks + to cover manifest files we read from the ProductLocker. + + As this change requires some of the stuff in toolinstall.c, + mainly ToolInstallLocalFileReader. So, move that stuff to + a common place in lib/toolsIso, so that lib/toolsversion and + toolinstall.c can share it easily. + + While moving ToolInstallLocalFileReader to lib/toolsIso + rename it accordingly, i.e. ToolsIsoLocalFileReader. Also, + move the related callbacks along with it. + + New workflow for loading manifest files requires the + dictionary to be built from memory buffer, but existing + Dictionary API does not accept MsgList from caller. So, + add the missing API for this, i.e. Dictionary_LoadFromBufferEx. + +* Detect slow running systems in guestInfo. + + - Added a new function in guestInfo. The new function checks the last + time when the guest info was captured and prints a warning and sends + a RPC message to the VMX if the elapsed interval was more than the + expected poll interval. + +* Fix additional coverity issues in tools and hgfs. + + Fix some uninitialized variable problems reported by + the Coverity scan of tools. + +* Remove guestStats that are beyond 60u1 scope. + + The guestStats in R10 Tools release follow 60u1 scope and therefore + we need to remove the guestStats that are not in scope for 60u1. + +* Fix a couple more Coverity-reported issues in tools. + + Fix an uninitialized variable and a use-after-free problem + reported by Coverity. The use-after-free problem occurs in + the swig-generated file vmGuestLibJava_wrap.c and is addressed + by changing a function prototype processed by swig to use + void * in place of char *. For additional background see + https://sourceforge.net/p/swig/mailman/message/34977020/ + +* open-vm-tools: fix build error in Ubuntu 16.04 + + The -std=c++11 causes an error when used with the GNU C compiler, but it + is in GTKMM_CPPFLAGS. So this change moves GTKMM_CPPFLAGS from + libdndcp_la_CPPFLAGS to libdndcp_la_CXXFLAGS in + services/plugins/dndcp/Makefile.am. + + This also fixes building for current Debian sid. + +* Hold a reference to vSocket address family in vmtoolsd. + + On old hosts that do not support secure guestRpc vmtoolsd + falls back to use backdoor. However, there could be vmci + and vsocket drivers loaded in the guest that make vSocket + consumers (e.g. guestLib and namespace-cmd) try vSocket + all the time before falling back to backdoor. On old Linux + guests like RHEL 5, 6 (kernels below 3.9 that do not have + upstreamed vmci and vsocket drivers) this causes log spew + in guest system logs because of vSocket address family being + registered and unregistered on each RPC call (RpcChannel_SendOne). + + This could be solved in multiple ways involving some + work from user. In order to solve this problem in a user + friendly way, we hold a reference to vSocket device in + vmtoolsd service, so that the reference goes away during + Tools upgrade. + +* Tools GuestInfo - Return proper osname for Oracle Linux 6 / 7 + + Updated the code to detect Oracle Linux 6 and Oracle Linux 7 and return + proper osname acocrdingly. + + In Oracle Linux 6.7 GA VM, following are the contents of /etc/oracle-release + Oracle Linux Server release 6.7 + + In Oracle Linux 7.1 GA VM, following are the contents of /etc/oracle-release + Oracle Linux Server release 7.1 + +* Tools GuestInfo - Return proper osname for Centos 6 / 7 + + Updated the code to detect Centos 6 and Centos Linux 7 and return + proper osname acocrdingly. + + In Centos 6.7 GA VM, following are the contents of /etc/centos-release + CentOS release 6.7 (Final) + + In Centos 7.2 GA VM, following are the contents of /etc/centos-release + CentOS Linux release 7.2.1511 (Core) +* Tolerate the lack of RPC channel when there is no backdoor. + + A VM with the backdoor disabled leads to having no RPC channel + in vmtoolsd. Tolerate this situation instead of ASSERTing. + +* Make NullProvider race-free to be thread-safe. + + The NullProvider start function was sending the 'prov.snapshotCommit' + message to VMX, which was being done on the worker thread. + This led to a race condition where the VMX state machine advanced + faster than the guest side state machine. Later, when the VMX state + machine sent 'vmbackup.snapshotDone' to the vmbackup plugin, it + did not like it because it was not ready for that message. + + To fix this issue, we split the code that sends the + 'prov.snapshotCommit' message into a separate callback + that gets called by the main thread instead of the worker + thread. To do that, we created a VmBackupOp for NullProvider + so that it can be monitored by the top level state machine. + + Also fixed a subtle race in VmBackupAsyncCallback. It can + prematurely release an op if the op was set by worker thread + between the QueryStatus and Release calls. This was possible + due the initial value of status. Fixed the initial value of + status to make it impossible. + +* open-vm-tools: add udev rules to set scsi timeout + + To avoid volumes going read-only offline, a longer timeout + was needed. This is already done for tar tools and OSPs using + udev rules, but not yet for open-vm-tools. This change adds + a udev rule for open-vm-tools. + +* Fix a namespace tool crash. + + The namespace tool core-dumps when running the following command + vmware-namespace-cmd -V get-value name -k key + + This is because glib options parser removed the -V from the argv, + and passed the ValidateNsCommands() check. However, the later + RunNamespacecommand shall ASSERT() on the NULL nscmd. + +* Properly handle non-ASCII filenames. + + Filenames are passed as UTF-8, but file opens (both CreateFile + and fopen()) were assuming ASCII. Switch to a conversion and + CreateFileW and g_fopen(), which handles full UTF-8 filenames. + + Also tweak the error logging to dump the error code + for easier debugging on non-English OSes. + +* Fix the namespace tool verbose option. + + The namespace tool verbose option was supposed to print out the debug + and warning messages of the vm libs to stdio, but it didn't. + +* Don't auto-retry RpcChannel_Send when error is final. + + RpcChannel_Send retries in case of any error. However, retry makes + sense only when there is a transport error. When there is a failure + returned from VMware in handling the RPC command, the error is final + and retrying does not make any sense, so avoid retry when + it is not a transport error. In order to differentiate between + the two types of errors the internal function signatures required + changes. As there are not many direct consumers for RpcOut_send, fix + all of its callers too to check rpcStatus along with the return + value of the function. The new API behavior also allows + removal of some string comparisons on "reply". + + There are no other behavioral changes intended in RpcChannel_Send, + so all the callers of this function remain untouched. + +* Replace RpcOut_sendOne with RpcChannel_SendOne in vmtoolsd commandline. + + "vmtoolsd --cmd=" uses RpcOut_sendOne which is a backdoor + only implementation. It should try vSocket before falling back to + backdoor. + +* Make sure the Windows version of namespacetool logs to stdio instead + of logging to debugger. + + The Windows version of namespacetool didn't print warning messages + under the verbose option. + +* Add toolbox-cmd for tools.conf config entries. + + Add a generic tools.conf set/get mechanism that can + be used for any config entry. The first specific use case + is to enable/disable the allowLocalSystem pref for SRM. + +* Remove an ASSERT and save vSock family reference in vmsvc only. + + VMCISock_GetAFValueFd API does not open a vsock device if the kernel + has upstreamed drivers. So don't ASSERT if the vsock fd is not valid + in such cases. Save the reference only when the family as well as + the fd are valid, because there is no need to save the reference in + the case of upstreamed drivers. + + If 'vmusr' holds a reference to vSock address family, it could + come in the way of upgrade because 'vmusr' keeps running during + upgrade. To avoid that issue and given that we just need one + reference, we limit the reference to main service only. + + Also fix the VMCISock_GetAFValueFd API to initialize outFd in + the case of upstreamed drivers. + +* Allow SAML authn to bypass impersonation if the user is unchanged. + + vmwsu can't create an impersonation token for SYSTEM + since its not a 'real' account. So bypass the impersonation + phase since toolsd is already running as SYSTEM. + +* Increase the scope of 'opLock' to avoid a race in VmBackupAsyncCallback. + + A previous fixe to a race between worker thread and main thread + in VmBackupAsyncCallback could lead to premature release of + 'currentOp' from 'gBackupState'. If the 'currentOp' was set after + VmBackupAsyncCallback had queried status of the 'currentOp', but + VmBackupAsyncCallback was not done with 'status' value check, + it could release the 'currentOp' prematurely because 'status' + was initialized to VMBACKUP_STATUS_FINISHED. The fix was to + initialize the 'status' to VMBACKUP_STATUS_PENDING. The fix + broke HBR because HBR invokes quiescing with the 'execScripts = false' + option, and in that case there is no 'currentOp' setup by the + VmBackupStartScripts() call, which leaves VmBackupAsyncCallback + in its initialized 'status' VMBACKUP_STATUS_PENDING. + This fix reverts the previous fix by restoring the 'status' initial + value to VMBACKUP_STATUS_FINISHED and increases the scope of the + lock 'opLock' to address the race condition. + + This change also adds some Tools configuration settings to make + it easier to test HBR scenarios. + + Also moved the common functions to vmtoolslib. + +* Fix HGFS mount call to create mount point. + + For FUSE clients and open-vm-tools installations the package + might not create the shared folders mount point. The only reliable + way to ensure that we have one is to create it ourselves. + + This also ensures if a user has inadvertently deleted the mount + point after installing tools and before enabling the Shared Folders + feature the mount will be robust enough to still mount. + + Secondly, did some clean up of the mount function to move the check + for already mounted into a separate function. + + Finally, the mount file table check now uses the common mount info + macros and the system calls are replaced with ProcMgr exec calls. + The file access checks now use the glib routines as do the mkdir and + rmdir for mount point creation and deletion. + +* Make Vsock RPC code handle the ECONNRESET. + + The VMX might delay releasing a vsock when the client side closes + the end point first. This makes a later client vsock connect attempt + fail with ECONNRESET using the same source port as the closed one. + Note that the client binds OK on the reused source port, since + the client side has released the socket on that port. + + Rewrote the connect code to make it more clear and explicitly + separated the retry logic. The existing higher level error code + enum was also not clearly defined. It is best to keep and + return the system errno, and also added additional information + about which socket API call failed. + +* tar installer/OSPs: Check for a valid shell in pam configuration. + + When a program is run in a VM using vmrun from the host, the user + account is not checked for a valid shell. This changes adds this + to the pam configuration for vmtoolsd. + + Note that /sbin/nologin is a valid shell in CentOS and RHEL, but + not in Ubuntu. Valid shells are those that are listed in /etc/shells. + +* open-vm-tools: Add support for gtk3. + + Add support for building open-vm-tools with gtk3. + + #ifdef statements have been added for conditional compiling + for GTK2/GTK3. + +* Tools RpcIn: fix an assert triggered by a race condition + + RpcIn open channel asserts that the current channel is NULL. This + is being triggered during the disk wipe operation test. + + The test stressed the machine so that the guest tools service ran + slowly and the VMX timed out and so reset the channel. This caused + the tools service to do a channel check reset, which then called + RpcChannelRestart to stop and start the channel. + Unfortunately, this call modified the channel global without + synchronizing with the other threads sending RPCs. DiskWipe plugin + was in the middle of a RpcChannel_Send (with the lock acquired) + when the restart call ran concurrently. + + To fix this issue the RpcChannelRestart now acquires the same channel + lock around the channel stop and start calls so that all sending + threads wait or complete first. + +* Tools RPC: Fix XDR invocation on mac and an uninitialized variable. + + Uninitialized variable in rpcin.c: Initialize status to FALSE. + + xdrproc_t: On many platforms xdrproc_t is an unprototyped function + pointer that can take either 2 or 3 arguments. Apple changed their + implementation to always take 3 arguments, so add a third argument. + +* Guest DNDCP: Remove unused private variables. + +* Hgfs Server: minor clean up of request header size. + + Consistently use the correct function for determining the header + size for the HGFS packet to be used. This is necessary due to the + different protocol versions that exist; originally the request and + reply contained different protocol headers. + +* Hgfs Server: more minor clean up of write operations. + +* Hgfs Server: write ops clean up. + + Very minor write ops clean up fixes which renames the arguments + and local variables to be more consistent. + +* Hgfs Server: add write op arg basic validate write op. + + Add the basic write operation argument validation routine to obtain + the data sizes of the request and data to write for the supported HGFS + protocol versions (1 through 4). Add a call to it from the main write + operation handler. + +* Hgfs Server: write op move argument checks. + + Consolidate the argument verifications to the common code as these + are often duplicated. This will now explicitly perform the Hgfs write + operation argument verification in the common handler before calling + the platform specific code to actually peform the write. + +* Hgfs Server: write op move argument checks. + + Complete the argument verifications in the common code adding the + missing checks for the write request packet size checks and the + write request data size (separated from the request itself as + in V4 of the HGFS protocol). + This will catch any attempts from a client to pass a write request + containing a data size argument for the data to write that is greater + than the amount of data in the HGFS packet or data buffer passed. + +* Thaw/resume guest file system when VMX aborts an operation. + + When an operation is aborted by VMX after quiescing the + guest, we need to thaw/resume the guest without leaving + it in limbo. + +* Common version: Use disable-tools-version for old hosts only. + + Use disable-tools-version for old hosts only, and add a + hide-tools-version flag. Set disable-tools-version to "true" + again for OSPs. + +* Apply ICU patches to lib/unicode. + + Apply various ICU patches between ICU 4.4.1 and 57.1. + +* Return default value in case of NULL key instead of ASSERTing. + + The configKey is NULL for NullProvider, so VMTools_ConfigGetBoolean + should return default value if any of the input args is NULL. + +* Updating glib and dependent libraries for CAF to latest version + + glib is upgraded to 2.48.0 with the following dependencies: + + libiconv 1.14 + pcre 8.38 + zlib 1.2.8 + libffi 3.2.1 + +* xmlsec1 support for verification + + Add SAML verification with xmlsec1. + +* Fix some memory leaks + +* Add verification of SAML assertions (Subject and Condtions) + +* Do schema validation with xmlsec1. + + Add schema validation for xmlsec1 based SAML verification. + +* Add xmlsec1 to open-vm-tools. + + Add the new files to open-vm-tools and add a switch to + turn it on. xml-security-c remains the default for + now. + + also clean up the service Makefile, which was using + the client lib, for common code instead of building it in. + +* Update VGAuth source for compilation with OpenSSL 1.0.x or 1.1.0. + + OpenSSL 1.1.0 is about to released. With that release comes a number + of changes that include making several types opague. Along with this, + new or renamed setter/getter functions appear. The API changes and + the impact on open-source products is discussed at: + https://wiki.openssl.org/index.php/1.1_API_Changes. Updated man pages + are available at: https://www.openssl.org/docs/manmaster/ + + The impact on VMware Tools and open-vm-tools is that the message + digest type MD_CTX has become opague. Local (stack) MD_CTX objects + are not supported. The required change is to dynamically allocate + MD_CTX objects as needed using the 1.1.0 API xxx_new() and xxx_free() + or the pre-1.1.0 functions xxx_create() and xxx_destroy(). + +* Update glib and pcre. + + This change adds a new glib.mk whose scope is local to the tools build. + The new glib.mk sets the glib2 version to 2.48 for the tools build. + The new version of glib depends upon libpcre, libiconv and libffi. + +* Properly configure xmlsec1 for CentOS. + + Some distros build xmlsec1 with dynamic crypto, so we + have to do things slightly differently. + + Also work around a bug in how Redhat & SuSE packages xmlsec1. + They built it with -DXMLSEC_NO_SIZE_T, but that flag + isn't properly exposed by xmlsec1-config. This results + in a bunch of xmlsec1 data structures (anything with an xmlSecSize + in it) being different between the lib and our code, and + it tends not to work when our code references fields + in the data structure. So this change always sets + -DXMLSEC_NO_SIZE_T. + +* Log level change in CAF - Change default log level to ERROR. + open-vm-tools-10.0.5 build 3227882 + * ae82fa6 [Bug 1526360] fix timestamp check * b510107 [Bug 1531545] Add an error handler to X11 resolutionSet * adab9c5 [Bug 1503195] Kill tasklet when unloading vmci module @@ -181,7 +2287,7 @@ open-vm-tools-10.0.0 build 3000743 * Change WSAAddressToString to WSAAddressToStringA -* Handle EINVAL for preadv and pwritev. +* Handle EINVAL for preadv and pwritev. * Change GET_CURRENT_LOCATION definition. @@ -209,7 +2315,7 @@ open-vm-tools-10.0.0 build 3000743 * First submit of the VDTI PCI Device. -* Cleanup/Rationalize coreDump +* Cleanup/Rationalize coreDump * vSock VMX: Introduce a separate sendCb field diff --git a/open-vm-tools/LICENSE b/open-vm-tools/LICENSE index 18dd5f13f..ea8618525 100644 --- a/open-vm-tools/LICENSE +++ b/open-vm-tools/LICENSE @@ -1,10 +1,10 @@ LICENSE -open-vm-tools 10.0.0 +Open-vm-tools v10.1.0 The Linux kernel modules are released under the GPL v2, a majority of the user level components are released under the LGPL v2.1, and the SVGA and mouse drivers are released under the X11 license. -Copyright © 2007-2015 VMware, Inc. All rights reserved. +Copyright © 2007-2016 VMware, Inc. All rights reserved. ========================================================================= GNU GENERAL PUBLIC LICENSE @@ -231,23 +231,89 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ======== -open-vm-tools v10.0.0 includes a number of subcomponents with separate copyright notices and license terms. Your use of the source code for these subcomponents is subject to the terms and conditions of the following licenses. - +Open-vm-tools v10.1.0 includes a number of subcomponents with separate copyright notices and license terms. Your use of the source code for these subcomponents is subject to the terms and conditions of the following licenses. SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES - >>> base64.c-none - >>> convertutf.c/.h from unicode, inc.-none + >>> cvtutf-1.4 >>> freebsd-1.72 + >>> freebsd-base64-4.8 >>> icu4c-4.4.1 >>> unicode-5.0 ------- SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ------ + + +SECTION 2: GNU Lesser General Public License, V2.1 + + >>> libmspack-0.0.20040308alpha + + +=================================================== + + +--------------- SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ---------- BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s). ->>> base64.c-none + +>>> cvtutf-1.4 + +Copyright 2001-2004 Unicode, Inc. + +Disclaimer + +This source code is provided as is by Unicode, Inc. No claims are +made as to fitness for any particular purpose. No warranties of any +kind are expressed or implied. The recipient agrees to determine +applicability of information provided. If this file has been +purchased on magnetic or optical media from Unicode, Inc., the +sole remedy for any claim will be exchange of defective media +within 90 days of receipt. + +Limitations on Rights to Redistribute This Code + +Unicode, Inc. hereby grants the right to freely use the information +supplied in this file in the creation of products supporting the +Unicode Standard, and to make copies of this file in any form +for internal or external distribution as long as this notice +remains attached. + + +>>> freebsd-1.72 + +Copyright (c) 1990, 1993 The Regents of the University of California. 3 +All rights reserved. + +This code is derived from software contributed to Berkeley by +Chris Torek. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +4. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +>>> freebsd-base64-4.8 base64.c -- routines to encode/decode base64 data $OpenLDAP: pkg/ldap/libraries/liblutil/base64.c,v 1.15 2006/01/03 22:12:11 kurt Exp $ / @@ -321,57 +387,19 @@ Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE +CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. This work is based upon Base64 routines (developed by IBM) found Berkeley Internet Name Daemon (BIND) as distributed by ISC. They were adapted for inclusion in OpenLDAP Software by Kurt D. Zeilenga. ->>> convertutf.c/.h from unicode, inc.-none - -Copyright 2001-2004 Unicode, Inc. - -Disclaimer - -This source code is provided as is by Unicode, Inc. No claims are -made as to fitness for any particular purpose. No warranties of any -kind are expressed or implied. The recipient agrees to determine -applicability of information provided. If this file has been -purchased on magnetic or optical media from Unicode, Inc., the -sole remedy for any claim will be exchange of defective media -within 90 days of receipt. - -Limitations on Rights to Redistribute This Code - -Unicode, Inc. hereby grants the right to freely use the information -supplied in this file in the creation of products supporting the -Unicode Standard, and to make copies of this file in any form -for internal or external distribution as long as this notice -remains attached. - ->>> freebsd-1.72 - -Copyright (c) 1990, 1993 The Regents of the University of California. 3 -All rights reserved. - -This code is derived from software contributed to Berkeley by -Chris Torek. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -4. Neither the name of the University nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >>> icu4c-4.4.1 @@ -391,6 +419,7 @@ Except as contained in this notice, the name of a copyright holder shall not be All trademarks and registered trademarks mentioned herein are the property of their respective owners. + >>> unicode-5.0 Copyright (c) 2008 VMware, Inc. All rights reserved. @@ -403,4 +432,16 @@ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. -[OPENVMTOOLS1000SS081015] + +--------------- SECTION 2: GNU Lesser General Public License, V2.1 ---------- + +GNU Lesser General Public License, V2.1 is applicable to the following component(s). + + +>>> libmspack-0.0.20040308alpha + +libmspack is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License (LGPL) version 2.1 + + +[OPENVMTOOLS1010HS090816] diff --git a/open-vm-tools/Makefile.am b/open-vm-tools/Makefile.am index dfb7cd234..c79cc6df3 100644 --- a/open-vm-tools/Makefile.am +++ b/open-vm-tools/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### Top-level Makefile for building the VMware OSS Tools. ### @@ -39,6 +39,7 @@ if ENABLE_DEPLOYPKG SUBDIRS += libDeployPkg endif SUBDIRS += rpctool +SUBDIRS += namespacetool if ENABLE_GRABBITMQPROXY SUBDIRS += guestproxycerttool endif @@ -64,3 +65,16 @@ if WITH_KERNEL_MODULES endif SUBDIRS += docs +if ENABLE_CAF + SUBDIRS += common-agent/Cpp/Framework + SUBDIRS += common-agent/Cpp/ManagementAgent + SUBDIRS += common-agent/Cpp/Communication + SUBDIRS += common-agent/Cpp/ProviderFx + SUBDIRS += common-agent/Cpp/InternalProviders + SUBDIRS += common-agent/input + SUBDIRS += common-agent/etc +endif + +if HAVE_UDEV + SUBDIRS += udev +endif diff --git a/open-vm-tools/Makefile.in b/open-vm-tools/Makefile.in deleted file mode 100644 index c382a181d..000000000 --- a/open-vm-tools/Makefile.in +++ /dev/null @@ -1,735 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### Top-level Makefile for building the VMware OSS Tools. -### -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@BUILD_HGFSMOUNTER_TRUE@am__append_1 = hgfsmounter -@ENABLE_VGAUTH_TRUE@am__append_2 = vgauth -@ENABLE_DEPLOYPKG_TRUE@am__append_3 = libDeployPkg -@ENABLE_GRABBITMQPROXY_TRUE@am__append_4 = guestproxycerttool -@HAVE_X11_TRUE@am__append_5 = vmware-user-suid-wrapper -@HAVE_FUSE_TRUE@am__append_6 = vmblock-fuse vmhgfs-fuse -@LINUX_FALSE@am__append_7 = vmblockmounter -@ENABLE_TESTS_TRUE@am__append_8 = tests -@WITH_KERNEL_MODULES_TRUE@am__append_9 = modules -subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure \ - $(top_srcdir)/scripts/build/rpcgen_wrapper.sh.in AUTHORS \ - COPYING ChangeLog INSTALL NEWS config/compile \ - config/config.guess config/config.sub config/depcomp \ - config/install-sh config/ltmain.sh config/missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = scripts/build/rpcgen_wrapper.sh -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = lib libvmtools libhgfs hgfsclient hgfsmounter vgauth \ - checkvm libguestlib libDeployPkg rpctool guestproxycerttool \ - scripts services toolbox vmware-user-suid-wrapper vmblock-fuse \ - vmhgfs-fuse vmblockmounter xferlogs tests modules docs -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# These flags get passed to aclocal when autoreconf calls it, and tell aclocal -# that all of our macros are in the 'm4' subdirectory. -ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = lib libvmtools libhgfs hgfsclient $(am__append_1) \ - $(am__append_2) checkvm libguestlib $(am__append_3) rpctool \ - $(am__append_4) scripts services toolbox $(am__append_5) \ - $(am__append_6) $(am__append_7) xferlogs $(am__append_8) \ - $(am__append_9) docs -all: all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -scripts/build/rpcgen_wrapper.sh: $(top_builddir)/config.status $(top_srcdir)/scripts/build/rpcgen_wrapper.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-libtool distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/NEWS b/open-vm-tools/NEWS index 08871d41e..bee741322 100644 --- a/open-vm-tools/NEWS +++ b/open-vm-tools/NEWS @@ -1,3 +1,15 @@ +open-vm-tools 2016.10.25 changes: + * Added vmware-namespace-cmd command line utility. + * Added gtk3 support. + * Added Common Agent Framework (CAF). + * Changed guest authentication to xmlsec1. + * FreeBSD support. + * Automatic Linux kernel modules are enabled by default. + * New sub-command to push updated network information to the host on demand. + * Added udev rules for configuring SCSI timeout in the guest. + * Fixes for running on Ubuntu 16.10. + * Fix for quiesced snapshot failure leaving guest file system quiesced. + open-vm-tools 2015.11.10 changes: * [vgauth] fix timestamp check * [libresolutionSet.so] Add an error handler to X11 resolutionSet diff --git a/open-vm-tools/aclocal.m4 b/open-vm-tools/aclocal.m4 deleted file mode 100644 index 78d92fdb9..000000000 --- a/open-vm-tools/aclocal.m4 +++ /dev/null @@ -1,902 +0,0 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) - -# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 3 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 12 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) -m4_include([m4/vmtools.m4]) diff --git a/open-vm-tools/checkvm/Makefile.am b/open-vm-tools/checkvm/Makefile.am index 54c95a17d..4a276da8a 100644 --- a/open-vm-tools/checkvm/Makefile.am +++ b/open-vm-tools/checkvm/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/checkvm/Makefile.in b/open-vm-tools/checkvm/Makefile.in deleted file mode 100644 index 61dd77cbb..000000000 --- a/open-vm-tools/checkvm/Makefile.in +++ /dev/null @@ -1,566 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-checkvm$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = checkvm -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_checkvm_OBJECTS = checkvm.$(OBJEXT) -vmware_checkvm_OBJECTS = $(am_vmware_checkvm_OBJECTS) -am__DEPENDENCIES_1 = -vmware_checkvm_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_checkvm_SOURCES) -DIST_SOURCES = $(vmware_checkvm_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_checkvm_SOURCES = checkvm.c -vmware_checkvm_LDADD = @VMTOOLS_LIBS@ $(am__append_1) -@HAVE_ICU_FALSE@vmware_checkvm_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_checkvm_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu checkvm/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu checkvm/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-checkvm$(EXEEXT): $(vmware_checkvm_OBJECTS) $(vmware_checkvm_DEPENDENCIES) - @rm -f vmware-checkvm$(EXEEXT) - $(vmware_checkvm_LINK) $(vmware_checkvm_OBJECTS) $(vmware_checkvm_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkvm.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/checkvm/checkvm.c b/open-vm-tools/checkvm/checkvm.c index 5df798050..1642d9411 100644 --- a/open-vm-tools/checkvm/checkvm.c +++ b/open-vm-tools/checkvm/checkvm.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/checkvm/checkvm_version.h b/open-vm-tools/checkvm/checkvm_version.h index a6693d5df..2e41c5be6 100644 --- a/open-vm-tools/checkvm/checkvm_version.h +++ b/open-vm-tools/checkvm/checkvm_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/common-agent/Cpp/Communication/Makefile.am b/open-vm-tools/common-agent/Cpp/Communication/Makefile.am new file mode 100644 index 000000000..ece6a9438 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Makefile.am @@ -0,0 +1,241 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +AUTOMAKE_OPTIONS = subdir-objects +subsysdir = @CAF_SUBSYS_DIR@ +subsys_LTLIBRARIES = +cafbindir = @CAF_PME_BIN_DIR@ +cafbin_PROGRAMS = +caflibdir = @CAF_PME_LIB_DIR@ +caflib_LTLIBRARIES = +caflib_LTLIBRARIES += libCommAmqpIntegration.la + +libCommAmqpIntegration_la_SOURCES= +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQChannel.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQChannelManager.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQCommand.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQConnection.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AMQUtil.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/Address.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpAuthPlain.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpChannel.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpCommon.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpConnection.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/AmqpUtil.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/BlockingRpcContinuation.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpChannel.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpConnection.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CAmqpFrame.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CertInfo.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/CommandAssembler.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConnectionWeakReference.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConsumerDispatcher.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/ConsumerWorkService.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpClient.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AMQExceptions.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AmqpClientImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/AmqpContentHeadersImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicProperties.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/FieldImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AbstractConnectionFactory.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AmqpHeaderMapper.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AmqpIntegrationExceptions.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AmqpMessageListenerSource.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AmqpOutboundEndpoint.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/AutoChannelClose.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/BindingImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/BlockingQueueConsumer.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/CachedChannelHandler.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/CachingConnectionFactory.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/ChannelCachingConnectionProxy.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/CompositeConnectionListener.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/ExchangeImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/HeaderUtils.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/QueueImpl.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/RabbitAdmin.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/RabbitTemplate.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/SimpleConnection.cpp +libCommAmqpIntegration_la_SOURCES += amqpCore/src/amqpCore/SimpleMessageListenerContainer.cpp + +libCommAmqpIntegration_la_CPPFLAGS = +libCommAmqpIntegration_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libCommAmqpIntegration_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +libCommAmqpIntegration_la_CPPFLAGS += @SSL_CPPFLAGS@ +libCommAmqpIntegration_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +libCommAmqpIntegration_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libCommAmqpIntegration_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpListener/include +libCommAmqpIntegration_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpCore/include +libCommAmqpIntegration_la_LIBADD = +libCommAmqpIntegration_la_LIBADD += @GLIB2_LIBS@ +libCommAmqpIntegration_la_LIBADD += @LOG4CPP_LIBS@ +libCommAmqpIntegration_la_LIBADD += @SSL_LIBS@ +libCommAmqpIntegration_la_LIBADD += -ldl +libCommAmqpIntegration_la_LIBADD += @LIBRABBITMQ_LIBS@ +libCommAmqpIntegration_la_LIBADD += ../Framework/libFramework.la + +libCommAmqpIntegration_la_LDFLAGS = -shared + +subsys_LTLIBRARIES += libCommAmqpIntegrationSubsys.la +libCommAmqpIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libCommAmqpIntegrationSubsys_la_SOURCES= +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/BindingInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/ExchangeInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/IntegrationObjects.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/QueueInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/RabbitAdminInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/RabbitTemplateInstance.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.cpp +libCommAmqpIntegrationSubsys_la_SOURCES += Subsystems/amqpIntegration/src/amqpIntegration.cpp + +libCommAmqpIntegrationSubsys_la_CPPFLAGS = +libCommAmqpIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libCommAmqpIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +libCommAmqpIntegrationSubsys_la_CPPFLAGS += @SSL_CPPFLAGS@ +libCommAmqpIntegrationSubsys_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +libCommAmqpIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libCommAmqpIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpListener/include +libCommAmqpIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpCore/include +libCommAmqpIntegrationSubsys_la_LIBADD = +libCommAmqpIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libCommAmqpIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libCommAmqpIntegrationSubsys_la_LIBADD += @SSL_LIBS@ +libCommAmqpIntegrationSubsys_la_LIBADD += -ldl +libCommAmqpIntegrationSubsys_la_LIBADD += @LIBRABBITMQ_LIBS@ +libCommAmqpIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la +libCommAmqpIntegrationSubsys_la_LIBADD += ../Communication/libCommAmqpIntegration.la + +libCommAmqpIntegrationSubsys_la_LDFLAGS += -shared + +cafbin_PROGRAMS += CommAmqpListener + +CommAmqpListener_SOURCES= +CommAmqpListener_SOURCES += amqpListener/src/AmqpListenerWorker.cpp +CommAmqpListener_SOURCES += amqpListener/src/amqpListenerMain.cpp + +CommAmqpListener_CPPFLAGS = +CommAmqpListener_CPPFLAGS += @GLIB2_CPPFLAGS@ +CommAmqpListener_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +CommAmqpListener_CPPFLAGS += @SSL_CPPFLAGS@ +CommAmqpListener_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +CommAmqpListener_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +CommAmqpListener_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpListener/include +CommAmqpListener_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpCore/include +CommAmqpListener_LDADD = +CommAmqpListener_LDADD += @GLIB2_LIBS@ +CommAmqpListener_LDADD += @LOG4CPP_LIBS@ +CommAmqpListener_LDADD += @SSL_LIBS@ +CommAmqpListener_LDADD += -ldl +CommAmqpListener_LDADD += @LIBRABBITMQ_LIBS@ +CommAmqpListener_LDADD += ../Framework/libFramework.la +CommAmqpListener_LDADD += ../Communication/libCommAmqpIntegration.la + +subsys_LTLIBRARIES += libCommIntegrationSubsys.la +libCommIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libCommIntegrationSubsys_la_SOURCES= +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessage.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageAttachments.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageTransformer.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageTransformerInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CCmsMessageUtils.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CEventTopicCalculatorInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CIncomingMessageHandler.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessageDeliveryRecord.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartDescriptor.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartRecord.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartsBuilder.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartsHeader.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CMessagePartsParser.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/COutgoingMessageHandler.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CProtocolHeaderEnricher.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CReplyToCacher.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CReplyToCacherInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/CReplyToResolverInstance.cpp +libCommIntegrationSubsys_la_SOURCES += Subsystems/commIntegration/src/commIntegration.cpp + +libCommIntegrationSubsys_la_CPPFLAGS = +libCommIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libCommIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +libCommIntegrationSubsys_la_CPPFLAGS += @SSL_CPPFLAGS@ +libCommIntegrationSubsys_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpListener/include +libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/amqpCore/include +libCommIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Communication/Subsystems/commIntegration/include +libCommIntegrationSubsys_la_LIBADD = +libCommIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libCommIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libCommIntegrationSubsys_la_LIBADD += @SSL_LIBS@ +libCommIntegrationSubsys_la_LIBADD += -ldl +libCommIntegrationSubsys_la_LIBADD += @LIBRABBITMQ_LIBS@ +libCommIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la +libCommIntegrationSubsys_la_LIBADD += ../Communication/libCommAmqpIntegration.la + +libCommIntegrationSubsys_la_LDFLAGS += -shared + diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..cc78a45e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.cpp @@ -0,0 +1,276 @@ +/* + * Created on: Aug 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IBean.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/Core/CMessageHandler.h" +#include "Integration/Core/CSimpleAsyncTaskExecutor.h" +#include "Integration/Core/CSourcePollingChannelAdapter.h" +#include "Integration/Dependencies/CPollerMetadata.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationAppContext.h" +#include "Integration/IIntegrationObject.h" +#include "amqpCore/AmqpHeaderMapper.h" +#include "amqpCore/AmqpMessageListenerSource.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpCore/DefaultAmqpHeaderMapper.h" +#include "amqpCore/Queue.h" +#include "Common/CCafRegex.h" +#include "Exception/CCafException.h" +#include "AmqpInboundChannelAdapterInstance.h" + + +using namespace Caf::AmqpIntegration; + +AmqpInboundChannelAdapterInstance::AmqpInboundChannelAdapterInstance() : + _isInitialized(false), + _isRunning(false), + _ackModeProp(ACKNOWLEDGEMODE_AUTO), + _connectionFactoryProp("connectionFactory"), + _autoStartupProp(true), + _phaseProp(G_MAXINT32), + _prefetchCountProp(1), + _receiveTimeoutProp(1000), + _recoveryIntervalProp(5000), + _txSizeProp(1), + CAF_CM_INIT_LOG("AmqpInboundChannelAdapterInstance") { +} + +AmqpInboundChannelAdapterInstance::~AmqpInboundChannelAdapterInstance() { +} + +void AmqpInboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + std::string prop = configSection->findOptionalAttribute("id"); + if (prop.length()) { + _idProp = prop; + } else { + _idProp = "AmqpInboundChannelAdapter-"; + _idProp += CStringUtils::createRandomUuid(); + } + _channelProp = configSection->findRequiredAttribute("channel"); + _queueProp = configSection->findRequiredAttribute("queue-name"); + prop = configSection->findOptionalAttribute("acknowledge-mode"); + if (prop.length()) { + if (prop == "NONE") { + _ackModeProp = ACKNOWLEDGEMODE_NONE; + } else if (prop == "AUTO") { + _ackModeProp = ACKNOWLEDGEMODE_AUTO; + } else if (prop == "MANUAL") { + CAF_CM_EXCEPTIONEX_VA0( + InvalidArgumentException, + 0, + "acknowledge-mode MANUAL is not supported"); + //_ackModeProp = ACKNOWLEDGEMODE_MANUAL; + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "invalid acknowledge-mode '%s'", + prop.c_str()); + } + } + prop = configSection->findOptionalAttribute("connection-factory"); + if (prop.length()) { + _connectionFactoryProp = prop; + } + _errorChannelProp = configSection->findRequiredAttribute("error-channel"); + _mappedRequestHeadersProp = configSection->findOptionalAttribute("mapped-request-headers"); + prop = configSection->findOptionalAttribute("auto-startup"); + if (prop.length()) { + if (prop == "true") { + _autoStartupProp = true; + } else if (prop == "false") { + _autoStartupProp = false; + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "invalid auto-startup '%s'", + prop.c_str()); + } + } + prop = configSection->findOptionalAttribute("phase"); + if (prop.length()) { + _phaseProp = CStringConv::fromString(prop); + } + prop = configSection->findOptionalAttribute("prefetch-count"); + if (prop.length()) { + _prefetchCountProp = CStringConv::fromString(prop); + } + prop = configSection->findOptionalAttribute("receive-timeout"); + if (prop.length()) { + _receiveTimeoutProp = CStringConv::fromString(prop); + } + prop = configSection->findOptionalAttribute("recovery-interval"); + if (prop.length()) { + _recoveryIntervalProp = CStringConv::fromString(prop); + } + prop = configSection->findOptionalAttribute("tx-size"); + if (prop.length()) { + _txSizeProp = CStringConv::fromString(prop); + } + + _isInitialized = true; +} + +std::string AmqpInboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _idProp; +} + +void AmqpInboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + CCafRegex qRegEx; + qRegEx.initialize("^\\#\\{(?P.+)\\}$"); + Cdeqstr matchName = qRegEx.matchName(_queueProp, "name"); + if (matchName.size()) { + std::string queueRef = matchName.front(); + CAF_CM_LOG_DEBUG_VA1("Resolving queue object reference '%s'", queueRef.c_str()); + SmartPtrIIntegrationObject obj = _intAppContext->getIntegrationObject(queueRef); + SmartPtrQueue queueObj; + queueObj.QueryInterface(obj, false); + if (queueObj) { + _queueProp = queueObj->getName(); + CAF_CM_LOG_DEBUG_VA2( + "Queue object reference '%s' resolved to AMQP queue name '%s'", + queueRef.c_str(), + _queueProp.c_str()); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Integration object '%s' is not of type Queue.", + queueRef.c_str()); + } + } + + SmartPtrAmqpHeaderMapper headerMapper; + if (_mappedRequestHeadersProp.length()) { + SmartPtrDefaultAmqpHeaderMapper defaultHeaderMapper; + defaultHeaderMapper.CreateInstance(); + defaultHeaderMapper->init(_mappedRequestHeadersProp); + headerMapper = defaultHeaderMapper; + } + + SmartPtrCPollerMetadata pollerMetadata; + pollerMetadata.CreateInstance(); + pollerMetadata->putMaxMessagesPerPoll(_txSizeProp); + pollerMetadata->putFixedRate(50); + + SmartPtrAmqpMessageListenerSource listenerSource; + listenerSource.CreateInstance(); + listenerSource->init(headerMapper, pollerMetadata); + + _listenerContainer.CreateInstance(); + _listenerContainer->setAcknowledgeMode(_ackModeProp); + SmartPtrIBean bean = appContext->getBean(_connectionFactoryProp); + SmartPtrConnectionFactory connectionFactory; + connectionFactory.QueryInterface(bean, false); + if (!connectionFactory) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Bean '%s' is not a ConnectionFactory", + _connectionFactoryProp.c_str()); + } + _listenerContainer->setConnectionFactory(connectionFactory); + _listenerContainer->setPrefetchCount(_prefetchCountProp); + _listenerContainer->setQueue(_queueProp); + _listenerContainer->setReceiveTimeout(_receiveTimeoutProp); + _listenerContainer->setRecoveryInterval(_recoveryIntervalProp); + _listenerContainer->setTxSize(_txSizeProp); + _listenerContainer->setMessagerListener(listenerSource); + _listenerContainer->init(); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize( + channelResolver, + channelResolver->resolveChannelName(_errorChannelProp)); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _idProp, + channelResolver->resolveChannelName(_channelProp), + SmartPtrICafObject()); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize( + messageHandler, + listenerSource, + errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize( + sourcePollingChannelAdapter, + errorHandler); + _taskExecutor = simpleAsyncTaskExecutor; + + _intAppContext = NULL; +} + +void AmqpInboundChannelAdapterInstance::setIntegrationAppContext( + SmartPtrIIntegrationAppContext context) { + CAF_CM_FUNCNAME_VALIDATE("setIntegrationAppContext"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(context); + _intAppContext = context; +} + +bool AmqpInboundChannelAdapterInstance::isAutoStartup() const { + CAF_CM_FUNCNAME_VALIDATE("isAutoStartup"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _autoStartupProp; +} + +void AmqpInboundChannelAdapterInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _listenerContainer->start(timeoutMs); + _taskExecutor->execute(timeoutMs); + _isRunning = true; +} + +void AmqpInboundChannelAdapterInstance::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _listenerContainer->stop(timeoutMs); + _taskExecutor->cancel(timeoutMs); +} + +bool AmqpInboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _isRunning; +} + +int32 AmqpInboundChannelAdapterInstance::getPhase() const { + CAF_CM_FUNCNAME_VALIDATE("getPhase"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _phaseProp; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.h new file mode 100644 index 000000000..c601a702a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpInboundChannelAdapterInstance.h @@ -0,0 +1,160 @@ +/* + * Created on: Aug 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AmqpInboundChannelAdapterInstance_h +#define AmqpInboundChannelAdapterInstance_h + + +#include "Integration/IIntegrationAppContextAware.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationAppContext.h" +#include "Integration/ITaskExecutor.h" +#include "amqpCore/SimpleMessageListenerContainer.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IPhased.h" +#include "Integration/ISmartLifecycle.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief Adapter that receives messages from an AMQP queue, converts them into + * integration messages, and sends the results to a Message Channel. + *

+ *

+ * Example context file declaration:
+ *
+ * 
+ *
+ * 
+ * 
+ *
+ * 
+ *
+ *	
+ *

+ * XML attribute definitions: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
AttributeDescription
idoptional Unique id for this adapter.
channelrequired The channel to which messages should be sent.
queue-namerequired The AMQP queue from which messaged should be consumed.
acknowledge-modeoptional Acknowledgment mode (NONE, AUTO, MANUAL). Defaults to AUTO.
connection-factoryoptional Bean reference to the RabbitMQ ConnectionFactory. Defaults to 'connectionFactory'
error-channelrequired Message channel to which error messages should be sent.
mapped-request-headersoptional A regular expression indicating which AMQP headers will be mapped into message headers.
auto-startupoptional Specifies if the adapter is to start automatically. If 'false', the adapter must be started programatically. Defaults to 'true'.
phaseoptional Specifies the phase in which the adapter should be started. By default this value is G_MAXINT32 meaning that this adapter will start as late as possible.
prefetch-countoptional Tells the AMQP broker how many messages to send to the the consumer in a single request. Defaults to 1.
receive-timeoutoptional Receive timeout in milliseconds. Defaults to 1000.
recovery-intervaloptional Specifies the interval between broker connection recovery attempts in milliseconds. Defaults to 5000.
tx-sizeoptional Tells the adapter how many messages to process in a single batch. This should be less than or equal to to prefetch-count. Defaults to 1.
+ */ +class AmqpInboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public IIntegrationAppContextAware, + public ISmartLifecycle, + public IPhased { + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IIntegrationAppContextAware) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(ISmartLifecycle) + CAF_QI_ENTRY(IPhased) + CAF_END_QI() +public: + AmqpInboundChannelAdapterInstance(); + virtual ~AmqpInboundChannelAdapterInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IIntegrationAppContextAware + void setIntegrationAppContext( + SmartPtrIIntegrationAppContext context); + +public: // ISmartLifecycle + bool isAutoStartup() const; + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IPhased + int32 getPhase() const; + +private: + bool _isInitialized; + bool _isRunning; + SmartPtrIIntegrationAppContext _intAppContext; + SmartPtrSimpleMessageListenerContainer _listenerContainer; + SmartPtrITaskExecutor _taskExecutor; + + std::string _idProp; + std::string _channelProp; + std::string _queueProp; + AcknowledgeMode _ackModeProp; + std::string _connectionFactoryProp; + std::string _errorChannelProp; + std::string _mappedRequestHeadersProp; + bool _autoStartupProp; + int32 _phaseProp; + uint32 _prefetchCountProp; + uint32 _receiveTimeoutProp; + uint32 _recoveryIntervalProp; + uint32 _txSizeProp; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(AmqpInboundChannelAdapterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(AmqpInboundChannelAdapterInstance); + +}} + +#endif /* AmqpInboundChannelAdapterInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.cpp new file mode 100644 index 000000000..9f1b8526e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.cpp @@ -0,0 +1,131 @@ +/* + * Created on: Jul 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpCore/AmqpOutboundEndpoint.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationAppContext.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageChannel.h" +#include "amqpCore/AmqpTemplate.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#include "AmqpOutboundEndpointInstance.h" + +using namespace Caf::AmqpIntegration; + +AmqpOutboundEndpointInstance::AmqpOutboundEndpointInstance() : + _isInitialized(false), + _isRunning(false), + CAF_CM_INIT_LOG("AmqpOutboundEndpointInstance") { +} + +AmqpOutboundEndpointInstance::~AmqpOutboundEndpointInstance() { +} + +void AmqpOutboundEndpointInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + _id = configSection->findOptionalAttribute("id"); + if (!_id.length()) { + _id = CStringUtils::createRandomUuid(); + } + _configSection = configSection; + _isInitialized = true; +} + +std::string AmqpOutboundEndpointInstance::getId() const { + return _id; +} + +void AmqpOutboundEndpointInstance::setIntegrationAppContext( + SmartPtrIIntegrationAppContext context) { + _context = context; +} + + +void AmqpOutboundEndpointInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + std::string elementVal = _configSection->findOptionalAttribute("amqp-template"); + if (!elementVal.length()) { + elementVal = "amqpTemplate"; + CAF_CM_LOG_DEBUG_VA0("Using default amqp-template reference value 'amqpTemplate'"); + } + SmartPtrIIntegrationObject amqpTemplateObj = _context->getIntegrationObject(elementVal); + SmartPtrAmqpTemplate amqpTemplate; + amqpTemplate.QueryInterface(amqpTemplateObj, false); + if (!amqpTemplate) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Bean '%s' is not of type AmqpTemplate", + elementVal.c_str()); + } + + SmartPtrIAppConfig appConfig = getAppConfig(); + SmartPtrAmqpOutboundEndpoint outboundEndpoint; + outboundEndpoint.CreateInstance(); + elementVal = _configSection->findOptionalAttribute("exchange-name"); + outboundEndpoint->setExchangeName(appConfig->resolveValue(elementVal)); + elementVal = _configSection->findOptionalAttribute("exchange-name-expression"); + outboundEndpoint->setExchangeNameExpression(elementVal); + elementVal = _configSection->findOptionalAttribute("routing-key"); + outboundEndpoint->setRoutingKey(appConfig->resolveValue(elementVal)); + elementVal = _configSection->findOptionalAttribute("routing-key-expression"); + outboundEndpoint->setRoutingKeyExpression(elementVal); + elementVal = _configSection->findOptionalAttribute("mapped-request-headers"); + outboundEndpoint->setMappedRequestHeadersExpression(appConfig->resolveValue(elementVal)); + outboundEndpoint->init( + amqpTemplate, + appConfig, + appContext); + + elementVal = _configSection->findRequiredAttribute("channel"); + SmartPtrIMessageChannel inputChannel = channelResolver->resolveChannelName(elementVal); + SmartPtrIIntegrationObject inputChannelObj; + inputChannelObj.QueryInterface(inputChannel); + + + _messagingTemplate.CreateInstance(); + _messagingTemplate->initialize( + channelResolver, + inputChannelObj, + errorMessageChannel, + SmartPtrIMessageChannel(), + outboundEndpoint); +} + +void AmqpOutboundEndpointInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(!_isRunning); + _isRunning = true; + _messagingTemplate->start(0); +} + +void AmqpOutboundEndpointInstance::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + _isRunning = false; + _messagingTemplate->stop(0); +} + +bool AmqpOutboundEndpointInstance::isRunning() const { + return _isRunning; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.h new file mode 100644 index 000000000..902b6ed94 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/AmqpOutboundEndpointInstance.h @@ -0,0 +1,119 @@ +/* + * Created on: Jul 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPOUTBOUNDENDPOINTINSTANCE_H_ +#define AMQPOUTBOUNDENDPOINTINSTANCE_H_ + + +#include "Integration/IIntegrationAppContextAware.h" + +#include "Common/IAppContext.h" +#include "Integration/Core/CMessagingTemplate.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationAppContext.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::AmqpOutboundEndpoint + *

+ *

+ * Example context file declaration:
+ *
+ * 
+ *
+ * 
+ *
+ * 
+ *	
+ *

+ * XML attribute definitions: + * + * + * + * + * + * + * + * + * + *
AttributeDescription
channelrequired The channel supplying messages to be sent.
exchange-nameThe name of the exchange to publish to. + * Either exchange-name or exchange-name-expression must be specified.
exchange-name-expressionThe name of the exchange to publish to resolved by calling an IExpressionInvoker object. + * Either exchange-name or exchange-name-expression must be specified.
routing-keyThe routing key for the message. + * Either routing-key or routing-key-expression must be specified.
routing-key-expressionThe routing key for the message resolved by calling an IExpressionInvoker object. + * Either routing-key or routing-key-expression must be specified.
mapped-request-headersoptional A regular expression used to transmit user-defined headers along with the message. + *
+ */ +class AmqpOutboundEndpointInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public IIntegrationAppContextAware, + public ILifecycle { + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IIntegrationAppContextAware) + CAF_QI_ENTRY(ILifecycle) + CAF_END_QI() + +public: + AmqpOutboundEndpointInstance(); + virtual ~AmqpOutboundEndpointInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IIntegrationAppContextAware + void setIntegrationAppContext( + SmartPtrIIntegrationAppContext context); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +private: + bool _isInitialized; + bool _isRunning; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrCMessagingTemplate _messagingTemplate; + SmartPtrIIntegrationAppContext _context; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(AmqpOutboundEndpointInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(AmqpOutboundEndpointInstance); + +}} +#endif /* AMQPOUTBOUNDENDPOINTINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.cpp new file mode 100644 index 000000000..67fbc4396 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.cpp @@ -0,0 +1,54 @@ +/* + * Created on: Jun 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "amqpCore/Binding.h" +#include "Exception/CCafException.h" +#include "BindingInstance.h" + +using namespace Caf::AmqpIntegration; + +BindingInstance::BindingInstance() : + CAF_CM_INIT("BindingInstance") { + _id = CStringUtils::createRandomUuid(); +} + +BindingInstance::~BindingInstance() { +} + +void BindingInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_EXCEPTIONEX_VA0( + UnsupportedOperationException, + 0, + "Binding init from xml not supported"); +} + +std::string BindingInstance::getId() const { + return _id; +} + +void BindingInstance::setBindingInternal(SmartPtrBinding binding) { + _binding = binding; +} + +std::string BindingInstance::getQueue() const { + return _binding->getQueue(); +} + +std::string BindingInstance::getExchange() const { + return _binding->getExchange(); +} + +std::string BindingInstance::getRoutingKey() const { + return _binding->getRoutingKey(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.h new file mode 100644 index 000000000..41df621fa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/BindingInstance.h @@ -0,0 +1,66 @@ +/* + * Created on: Jun 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BINDINGINSTANCE_H_ +#define BINDINGINSTANCE_H_ + +#include "Integration/IIntegrationObject.h" +#include "Integration/IDocument.h" +#include "amqpCore/Binding.h" +#include "amqpCore/BindingInternal.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::Binding + *

+ * Currently this object is only created indirectly through rabbit-binding + * declarations in exchange declarations. + */ +class BindingInstance : + public IIntegrationObject, + public BindingInternal, + public Binding { + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(BindingInternal) + CAF_QI_ENTRY(Binding) + CAF_END_QI() + +public: + BindingInstance(); + virtual ~BindingInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // BindingInternal + void setBindingInternal(SmartPtrBinding binding); + +public: // Binding + std::string getQueue() const; + std::string getExchange() const; + std::string getRoutingKey() const; + +private: + std::string _id; + SmartPtrBinding _binding; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BindingInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(BindingInstance); + +}} + +#endif /* BINDINGINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.cpp new file mode 100644 index 000000000..421904d4e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.cpp @@ -0,0 +1,187 @@ +/* + * Created on: Jun 4, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "amqpCore/CachingConnectionFactory.h" +#include "amqpClient/api/Connection.h" +#include "amqpCore/ConnectionListener.h" +#include "Exception/CCafException.h" +#include "CachingConnectionFactoryObj.h" + +using namespace Caf::AmqpIntegration; + +CachingConnectionFactoryObj::CachingConnectionFactoryObj() : + CAF_CM_INIT_LOG("CachingConnectionFactoryObj") { +} + +CachingConnectionFactoryObj::~CachingConnectionFactoryObj() { +} + +void CachingConnectionFactoryObj::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_factory); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + const std::string persistenceDir = AppConfigUtils::getRequiredString( + "persistence_dir"); + const SmartPtrCPersistenceProtocolDoc persistenceProtocol = + CPersistenceUtils::loadPersistenceProtocol(persistenceDir); + + if (persistenceProtocol.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, ERROR_INVALID_STATE, + "Persistence protocol is empty... Comm must be configured - %s", + persistenceDir.c_str()); + } + + UriUtils::SUriRecord uri; + UriUtils::parseUriString(persistenceProtocol->getUri(), uri); + + const std::string vhost = UriUtils::findOptParameter(uri, "vhost", + AppConfigUtils::getRequiredString("communication_amqp", "vhost")); + const std::string connectionTimeout = UriUtils::findOptParameter(uri, "connection_timeout", + CStringConv::toString( + AppConfigUtils::getRequiredUint32("communication_amqp", "connection_timeout"))); + const std::string connectionRetries = UriUtils::findOptParameter(uri, "connection_retries", + CStringConv::toString( + AppConfigUtils::getRequiredUint32("communication_amqp", "connection_retries"))); + const std::string connectionSecondsToWait = UriUtils::findOptParameter(uri, "connection_seconds_to_wait", + CStringConv::toString( + AppConfigUtils::getRequiredUint32("communication_amqp", "connection_seconds_to_wait"))); + const std::string channelCacheSize = UriUtils::findOptParameter(uri, "channel_cache_size", + CStringConv::toString( + AppConfigUtils::getRequiredUint32("communication_amqp", "channel_cache_size"))); + + CAF_CM_VALIDATE_STRING(uri.protocol); + CAF_CM_VALIDATE_STRING(uri.host); + CAF_CM_VALIDATE_STRING(uri.portStr); + CAF_CM_VALIDATE_STRING(vhost); + + SmartPtrCachingConnectionFactory factory; + factory.CreateInstance(); + factory->init(); + factory->setProtocol(uri.protocol); + factory->setHost(uri.host); + factory->setPort(uri.port); + factory->setVirtualHost(vhost); + if (!uri.username.empty()) { + factory->setUsername(uri.username); + } + if (!uri.password.empty()) { + factory->setPassword(uri.password); + } + if (!connectionTimeout.empty()) { + factory->setConnectionTimeout(CStringConv::fromString(connectionTimeout)); + } + if (!connectionRetries.empty()) { + factory->setRetries(CStringConv::fromString(connectionRetries)); + } + if (!connectionSecondsToWait.empty()) { + factory->setSecondsToWait( + CStringConv::fromString(connectionSecondsToWait)); + } + if (!channelCacheSize.empty()) { + factory->setChannelCacheSize(CStringConv::fromString(channelCacheSize)); + } + + _factory = factory; +} + +void CachingConnectionFactoryObj::terminateBean() { + CAF_CM_FUNCNAME("terminateBean"); + try { + if (_factory) { + _factory->destroy(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION + ; + CAF_CM_CLEAREXCEPTION; +} + +SmartPtrConnection CachingConnectionFactoryObj::createConnection() { + CAF_CM_FUNCNAME_VALIDATE("createConnection"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->createConnection(); +} + +std::string CachingConnectionFactoryObj::getProtocol() { + CAF_CM_FUNCNAME_VALIDATE("getProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getProtocol(); +} + +std::string CachingConnectionFactoryObj::getHost() { + CAF_CM_FUNCNAME_VALIDATE("getHost"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getHost(); +} + +uint32 CachingConnectionFactoryObj::getPort() { + CAF_CM_FUNCNAME_VALIDATE("getPort"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getPort(); +} + +std::string CachingConnectionFactoryObj::getVirtualHost() { + CAF_CM_FUNCNAME_VALIDATE("getVirtualHost"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getVirtualHost(); +} + +std::string CachingConnectionFactoryObj::getUsername() { + CAF_CM_FUNCNAME_VALIDATE("getUsername"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getUsername(); +} + +std::string CachingConnectionFactoryObj::getPassword() { + CAF_CM_FUNCNAME_VALIDATE("getPassword"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getPassword(); +} + +std::string CachingConnectionFactoryObj::getCaCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getCaCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getCaCertPath(); +} + +std::string CachingConnectionFactoryObj::getClientCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getClientCertPath(); +} + +std::string CachingConnectionFactoryObj::getClientKeyPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientKeyPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getClientKeyPath(); +} + +uint16 CachingConnectionFactoryObj::getRetries() { + CAF_CM_FUNCNAME_VALIDATE("getRetries"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getRetries(); +} + +uint16 CachingConnectionFactoryObj::getSecondsToWait() { + CAF_CM_FUNCNAME_VALIDATE("getSecondsToWait"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getSecondsToWait(); +} + +void CachingConnectionFactoryObj::addConnectionListener( + const SmartPtrConnectionListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("addConnectionListener"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + _factory->addConnectionListener(listener); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.h new file mode 100644 index 000000000..77cfd5978 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/CachingConnectionFactoryObj.h @@ -0,0 +1,108 @@ +/* + * Created on: Jun 4, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CACHINGCONNECTIONFACTORYOBJ_H_ +#define CACHINGCONNECTIONFACTORYOBJ_H_ + +#include "IBean.h" + +#include "amqpCore/CachingConnectionFactory.h" +#include "amqpClient/api/Connection.h" +#include "amqpCore/ConnectionListener.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An implementation of Caf::AmqpIntegration::ConnectionFactory that returns + * the same connections from all calls, ignores calls to + * Caf::AmqpClient::Connection::close and caches Caf::AmqpClient::Channel. + *

+ * By default, only one channel will be cached, with additional requested channels + * being created and disposed on demand. Consider raising the cache size in + * high-concurrency environments. + *

+ * NOTE: This factory requires explicit closing of all channels obtained from its + * shared connection. Failure to close channels will disable channel reuse. + *

+ * CachingConnectionFactory objects are created by inserting the following into + * the application context: + *

+ *
+ * \
+ * 	\
+ * 	\
+ * 	\
+ * \
+ * 
+ * Properties: + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyDescription
hostThe broker host. By default the machine's host name (or localhost + * if the host name cannot be determined).
portThe broker port. By default AmqpClient::DEFAULT_AMQP_PORT
virtualHostThe virtual host on the broker. By default AmqpClient::DEFAULT_VHOST
connectionTimeoutThe connection timeout in milliseconds. A value of zero means + * to wait indefinitely. By default 10 seconds.
channelCacheSizeThe number of channels to cache. By default 1.
+ */ +class CachingConnectionFactoryObj : + public TCafSubSystemObjectRoot, + public IBean, + public ConnectionFactory + { + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdAmqpCachingConnectionFactory) + + CAF_BEGIN_INTERFACE_MAP(CachingConnectionFactoryObj) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(ConnectionFactory) + CAF_END_INTERFACE_MAP() + +public: + CachingConnectionFactoryObj(); + virtual ~CachingConnectionFactoryObj(); + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // ConnectionFactory + SmartPtrConnection createConnection(); + std::string getProtocol(); + std::string getHost(); + uint32 getPort(); + std::string getVirtualHost(); + std::string getUsername(); + std::string getPassword(); + std::string getCaCertPath(); + std::string getClientCertPath(); + std::string getClientKeyPath(); + uint16 getRetries(); + uint16 getSecondsToWait(); + void addConnectionListener(const SmartPtrConnectionListener& listener); + +private: + SmartPtrCachingConnectionFactory _factory; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CachingConnectionFactoryObj); +}; + +}} + +#endif /* CACHINGCONNECTIONFACTORYOBJ_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.cpp new file mode 100644 index 000000000..61b29fa59 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.cpp @@ -0,0 +1,117 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "amqpCore/Binding.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#include "ExchangeInstance.h" +#include "BindingInstance.h" + +using namespace Caf::AmqpIntegration; + +ExchangeInstance::ExchangeInstance() : + CAF_CM_INIT_LOG("ExchangeInstance") { +} + +ExchangeInstance::~ExchangeInstance() { +} + +void ExchangeInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + + _id = CStringUtils::createRandomUuid(); + + SmartPtrIAppConfig appConfig = getAppConfig(); + + const std::string exchange = appConfig->resolveValue(configSection->findRequiredAttribute("name")); + const std::string durableStr = configSection->findOptionalAttribute("durable"); + if (durableStr.length()) { + if ((durableStr != "true") && (durableStr != "false")) { + CAF_CM_EXCEPTIONEX_VA3( + InvalidArgumentException, + 0, + "Invalid 'durable' value (%s) for %s '%s'. " + "Value must be either 'true' or 'false'.", + durableStr.c_str(), + configSection->getName().c_str(), + exchange.c_str()); + } + } + const bool durable = !durableStr.length() || (durableStr == "true"); + + if (configSection->getName() == "rabbit-direct-exchange") { + _exchange = createDirectExchange(exchange, durable); + } else if (configSection->getName() == "rabbit-topic-exchange") { + _exchange = createTopicExchange(exchange, durable); + } else if (configSection->getName() == "rabbit-headers-exchange") { + _exchange = createHeadersExchange(exchange, durable); + } else if (configSection->getName() == "rabbit-fanout-exchange") { + _exchange = createFanoutExchange(exchange, durable); + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Invalid exchange type (%s)", + configSection->getName().c_str()); + } + + SmartPtrIDocument bindingsSection = configSection->findOptionalChild("rabbit-bindings"); + if (bindingsSection) { + IDocument::SmartPtrCChildCollection bindingSections = + bindingsSection->getAllChildren(); + for (TSmartConstMapIterator bindingSection(*bindingSections); + bindingSection; + bindingSection++) { + if (bindingSection->getName() != "rabbit-binding") { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "Invalid tag (%s) found in bindings section of " + "exchange declaration (name=%s)", + bindingSection->getName().c_str(), + exchange.c_str()); + } + const std::string queue = appConfig->resolveValue(bindingSection->findRequiredAttribute("queue")); + const std::string key = appConfig->resolveValue(bindingSection->findRequiredAttribute("key")); + CAF_CM_LOG_DEBUG_VA3( + "Adding binding declaration [queue id=%s][exchange name=%s][key=%s]", + queue.c_str(), + exchange.c_str(), + key.c_str()); + SmartPtrBindingInstance binding; + binding.CreateInstance(); + binding->setBindingInternal(createBinding(queue, exchange, key)); + _bindings.push_back(binding); + } + } +} + +std::string ExchangeInstance::getId() const { + return _id; +} + +std::string ExchangeInstance::getName() const { + return _exchange->getName(); +} + +std::string ExchangeInstance::getType() const { + return _exchange->getType(); +} + +bool ExchangeInstance::isDurable() const { + return _exchange->isDurable(); +} + +std::deque ExchangeInstance::getEmbeddedBindings() const { + return _bindings; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.h new file mode 100644 index 000000000..7cd310c0d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/ExchangeInstance.h @@ -0,0 +1,120 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef EXCHANGEINSTANCE_H_ +#define EXCHANGEINSTANCE_H_ + + +#include "Integration/IIntegrationObject.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationAppContext.h" +#include "amqpCore/Binding.h" +#include "amqpCore/Exchange.h" +#include "amqpCore/ExchangeInternal.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::Exchange + *

+ * %Exchange to queue bindings are also declared as part of an exchange declaration. + *

+ * Example context file declarations: + *

+ * Direct exchange: + *

+ * 
+ *    
+ *    
+ * 
+ * 
+ * Topic exchange: + *
+ * 
+ *    
+ *    
+ * 
+ * 
+ * Other exchange types are rabbit-headers-exchange and + * rabbit-fanout-exchange. + *

+ * %Exchange XML attribute definitions: + * + * + * + * + * + * + *
AttributeDescription
namerequired The AMQP name of the exchange. This is the name that + * will be sent in the Exchange.Declare AMQP method.
durableoptional true to declare a durable exchange else false.
+ * %Binding XML attribute definitions: + * + * + * + * + * + * + *
AttributeDescription
queuerequired The id of the queue integration object to bind to the exchange.
keyrequired The routing key for the binding. + * The format is specific to the type of exchange.
+ */ +class ExchangeInstance : + public IIntegrationObject, + public ExchangeInternal, + public Exchange +{ + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(ExchangeInternal) + CAF_QI_ENTRY(Exchange) + CAF_END_QI() + +public: + ExchangeInstance(); + virtual ~ExchangeInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // Exchange + std::string getName() const; + std::string getType() const; + bool isDurable() const; + +public: // ExchangeInternal + std::deque getEmbeddedBindings() const; + +private: + std::string _id; + SmartPtrIIntegrationAppContext _integrationAppContext; + SmartPtrExchange _exchange; + std::deque _bindings; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(ExchangeInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(ExchangeInstance); + +}} + +#endif /* EXCHANGEINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.cpp new file mode 100644 index 000000000..4667fb9c1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.cpp @@ -0,0 +1,100 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Exception/CCafException.h" +#include "IntegrationObjects.h" +#include "RabbitTemplateInstance.h" +#include "RabbitAdminInstance.h" +#include "ExchangeInstance.h" +#include "QueueInstance.h" +#include "AmqpOutboundEndpointInstance.h" +#include "AmqpInboundChannelAdapterInstance.h" + +using namespace Caf::AmqpIntegration; + +IntegrationObjects::IntegrationObjects() : + CAF_CM_INIT("IntegrationObjects") { +} + +IntegrationObjects::~IntegrationObjects() { +} + +void IntegrationObjects::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; +} + +void IntegrationObjects::terminateBean() { +} + +bool IntegrationObjects::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_VALIDATE_INTERFACE(configSection); + + const std::string name = configSection->getName(); + return (name.compare("rabbit-template") == 0) + || (name.compare("rabbit-admin") == 0) + || (name.compare("rabbit-direct-exchange") == 0) + || (name.compare("rabbit-topic-exchange") == 0) + || (name.compare("rabbit-headers-exchange") == 0) + || (name.compare("rabbit-fanout-exchange") == 0) + || (name.compare("rabbit-queue") == 0) + || (name.compare("rabbit-outbound-channel-adapter") == 0) + || (name.compare("rabbit-inbound-channel-adapter") == 0); +} + +SmartPtrIIntegrationObject IntegrationObjects::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME("createObject"); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + const std::string name = configSection->getName(); + if (name.compare("rabbit-template") == 0) { + SmartPtrRabbitTemplateInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("rabbit-admin") == 0) { + SmartPtrRabbitAdminInstance object; + object.CreateInstance(); + rc = object; + } else if ((name.compare("rabbit-direct-exchange") == 0) + || (name.compare("rabbit-topic-exchange") == 0) + || (name.compare("rabbit-headers-exchange") == 0) + || (name.compare("rabbit-fanout-exchange") == 0)) { + SmartPtrExchangeInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("rabbit-queue") == 0) { + SmartPtrQueueInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("rabbit-outbound-channel-adapter") == 0) { + SmartPtrAmqpOutboundEndpointInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("rabbit-inbound-channel-adapter") == 0) { + SmartPtrAmqpInboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "Unknown name - %s", name.c_str()); + } + + rc->initialize(_ctorArgs, _properties, configSection); + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.h new file mode 100644 index 000000000..5e9a1b185 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/IntegrationObjects.h @@ -0,0 +1,73 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef INTEGRATIONOBJECTS_H_ +#define INTEGRATIONOBJECTS_H_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief The bean responsible for creating all of the AMQP integration objects. + *

+ * All applications using AMQP integration must include this definition in the + * application context: + *

+ * \
+ * 
+ */ +class IntegrationObjects : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdIntegrationObjects) + + CAF_BEGIN_INTERFACE_MAP(IntegrationObjects) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + IntegrationObjects(); + virtual ~IntegrationObjects(); + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(IntegrationObjects); +}; + +}} + +#endif /* INTEGRATIONOBJECTS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.cpp new file mode 100644 index 000000000..463a696a9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.cpp @@ -0,0 +1,102 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "amqpCore/Queue.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#include "QueueInstance.h" + +using namespace Caf::AmqpIntegration; + +QueueInstance::QueueInstance() : + CAF_CM_INIT("QueueInstance") { +} + +QueueInstance::~QueueInstance() { +} + +void QueueInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + _id = configSection->findRequiredAttribute("id"); + SmartPtrIAppConfig appConfig = getAppConfig(); + const std::string name = appConfig->resolveValue(configSection->findOptionalAttribute("name")); + const std::string durable = configSection->findOptionalAttribute("durable"); + const std::string exclusive = configSection->findOptionalAttribute("exclusive"); + const std::string autoDelete = configSection->findOptionalAttribute("auto-delete"); + + if (durable.length() && ((durable != "true") && (durable != "false"))) { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "queue id (%s): 'durable' must be 'true' or 'false', not '%s'", + _id.c_str(), + durable.c_str()); + } + if (exclusive.length() && ((exclusive != "true") && (exclusive != "false"))) { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "queue id (%s): 'exclusive' must be 'true' or 'false', not '%s'", + _id.c_str(), + exclusive.c_str()); + } + if (autoDelete.length() && ((autoDelete != "true") && (autoDelete != "false"))) { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "queue id (%s): 'auto-delete' must be 'true' or 'false', not '%s'", + _id.c_str(), + autoDelete.c_str()); + } + + if (name.length()) { + const bool durableFlag = durable.length() ? durable == "true" : false; + const bool exclusiveFlag = exclusive.length() ? exclusive == "true" : false; + const bool autoDeleteFlag = autoDelete.length() ? autoDelete == "true" : false; + _queue = createQueue(name, durableFlag, exclusiveFlag, autoDeleteFlag); + } else { + if ((durable == "true") || (exclusive == "false") || (autoDelete == "false")) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Anonymous queue (%s) cannot specify durable='true', exclusive='false', " + "or auto-delete='false'", + _id.c_str()); + } + _queue = createQueue("", false, true, true); + } +} + +std::string QueueInstance::getId() const { + return _id; +} + +void QueueInstance::setQueueInternal(SmartPtrQueue queue) { + _queue = queue; +} + +std::string QueueInstance::getName() const { + return _queue->getName(); +} + +bool QueueInstance::isDurable() const { + return _queue->isDurable(); +} + +bool QueueInstance::isExclusive() const { + return _queue->isExclusive(); +} + +bool QueueInstance::isAutoDelete() const { + return _queue->isAutoDelete(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.h new file mode 100644 index 000000000..9a2552a64 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/QueueInstance.h @@ -0,0 +1,101 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QUEUEINSTANCE_H_ +#define QUEUEINSTANCE_H_ + +#include "Integration/IIntegrationObject.h" +#include "Integration/IDocument.h" +#include "amqpCore/Queue.h" +#include "amqpCore/QueueInternal.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::Queue + *

+ * Example context file declarations: + *

+ * Named queue: + *

+ * 
+ * 
+ * Anonymous queue: + *
+ * 
+ * 
+ *

+ * XML attribute definitions: + * + * + * + * + * + * + * + * + * + * + * + *
AttributeDescription
idrequired The id of the integration object. + * All integration objects that reference queues must do so by their id.
nameoptional The AMQP name of the queue. This is the name that + * will be sent in the Queue.Declare AMQP method. It does not need to match the + * id. To declare an anonymous (server-named) queue, leave this attribute + * out of the declaration. Do not set name to blank.
durableoptional true to declare a durable queue else false.
exclusiveoptional true to declare the queue exclusive to the connection + * else false.
auto-deleteoptional true to declare that the queue be deleted when it is no + * longer in use else false.
+ * NOTE: Anonymous queues are automatically declared as non-durable, exclusive + * and auto-delete. They cannot be declared otherwise. + */ +class QueueInstance : + public IIntegrationObject, + public QueueInternal, + public Queue +{ + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(QueueInternal) + CAF_QI_ENTRY(Queue) + CAF_END_QI() + +public: + QueueInstance(); + virtual ~QueueInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // QueueInternal + void setQueueInternal(SmartPtrQueue queue); + +public: // Queue + std::string getName() const; + bool isDurable() const; + bool isExclusive() const; + bool isAutoDelete() const; + +private: + std::string _id; + SmartPtrQueue _queue; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(QueueInstance); + +}} + +#endif /* QUEUEINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.cpp new file mode 100644 index 000000000..823ee7db8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.cpp @@ -0,0 +1,235 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IBean.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationAppContext.h" +#include "Integration/IIntegrationObject.h" +#include "amqpCore/Binding.h" +#include "amqpCore/BindingInternal.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpCore/Exchange.h" +#include "amqpCore/ExchangeInternal.h" +#include "amqpCore/Queue.h" +#include "amqpCore/QueueInternal.h" +#include "RabbitAdminInstance.h" + +using namespace Caf::AmqpIntegration; + +RabbitAdminInstance::RabbitAdminInstance() : + _isRunning(false), + CAF_CM_INIT_LOG("RabbitAdminInstance") { +} + +RabbitAdminInstance::~RabbitAdminInstance() { +} + +void RabbitAdminInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + _id = configSection->findOptionalAttribute("id"); + if (!_id.length()) { + _id = "RabbitAdminInstance-"; + _id += CStringUtils::createRandomUuid(); + } + _connectionFactoryId = configSection->findRequiredAttribute("connection-factory"); + _admin.CreateInstance(); +} + +std::string RabbitAdminInstance::getId() const { + return _id; +} + +void RabbitAdminInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_VALIDATE_INTERFACE(appContext); + _appContext = appContext; +} + +void RabbitAdminInstance::setIntegrationAppContext(SmartPtrIIntegrationAppContext context) { + CAF_CM_FUNCNAME_VALIDATE("setIntegrationAppContext"); + CAF_CM_VALIDATE_INTERFACE(context); + _integrationAppContext = context; +} + +void RabbitAdminInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("start"); + + SmartPtrIBean factoryBean = _appContext->getBean(_connectionFactoryId); + SmartPtrConnectionFactory connectionFactory; + connectionFactory.QueryInterface(factoryBean, true); + _admin->init(connectionFactory); + + try { + CAF_CM_VALIDATE_INTERFACE(_integrationAppContext); + CAF_CM_LOG_DEBUG_VA0("Initializing exchange/queue/binding declarations"); + + std::deque queues; + IIntegrationAppContext::SmartPtrCObjectCollection objs = + _integrationAppContext->getIntegrationObjects(Queue::IIDOF()); + CAF_CM_LOG_DEBUG_VA1("Declaring %d queues", objs->size()); + if (objs->size()) { + for (TSmartConstIterator obj(*objs); + obj; + obj++) { + SmartPtrQueue queue; + queue.QueryInterface(*obj); + if (queue->getName().length()) { + CAF_CM_LOG_DEBUG_VA1("Declaring queue - %s", queue->getName().c_str()); + _admin->declareQueue(queue); + } else { + CAF_CM_LOG_DEBUG_VA0("Declaring anonymous queue"); + SmartPtrQueue anonQueue = _admin->declareQueue(); + SmartPtrQueueInternal queueInt; + queueInt.QueryInterface(queue); + queueInt->setQueueInternal(anonQueue); + } + queues.push_back(queue); + } + } + + std::deque exchanges; + std::deque bindings; + objs = _integrationAppContext->getIntegrationObjects(Exchange::IIDOF()); + CAF_CM_LOG_DEBUG_VA1("Declaring %d exchanges", objs->size()); + if (objs->size()) { + for (TSmartConstIterator obj(*objs); + obj; + obj++) { + SmartPtrExchange exchange; + exchange.QueryInterface(*obj); + _admin->declareExchange(exchange); + exchanges.push_back(exchange); + + SmartPtrExchangeInternal exchangeInternal; + exchangeInternal.QueryInterface(exchange); + std::deque embeddedBindings = exchangeInternal->getEmbeddedBindings(); + + bindings.insert( + bindings.end(), + embeddedBindings.begin(), + embeddedBindings.end()); + } + } + + objs = _integrationAppContext->getIntegrationObjects(Binding::IIDOF()); + if (objs->size()) { + for (TSmartConstIterator obj(*objs); + obj; + obj++) { + SmartPtrBinding binding; + binding.QueryInterface(*obj); + bindings.push_back(binding); + } + } + + CAF_CM_LOG_DEBUG_VA1("Declaring %d bindings", bindings.size()); + for (TSmartConstIterator > binding(bindings); + binding; + binding++) { + SmartPtrIIntegrationObject obj = + _integrationAppContext->getIntegrationObject(binding->getQueue()); + + // resolve the queue id to a queue name and replace the binding object + SmartPtrQueue queue; + queue.QueryInterface(obj); + SmartPtrBindingInternal bindingInternal; + bindingInternal.QueryInterface(*binding); + bindingInternal->setBindingInternal( + createBinding( + queue->getName(), + binding->getExchange(), + binding->getRoutingKey())); + + // declare the binding + _admin->declareBinding(*binding); + } + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + _admin->term(); + _admin = NULL; + } + CAF_CM_THROWEXCEPTION; + _isRunning = true; +} + +void RabbitAdminInstance::stop(const uint32 timeoutMs) { + if (_isRunning) { + _isRunning = false; + _admin->term(); + } + _admin = NULL; +} + +bool RabbitAdminInstance::isRunning() const { + return _isRunning; +} + +void RabbitAdminInstance::declareExchange(SmartPtrExchange exchange) { + CAF_CM_FUNCNAME_VALIDATE("declareExchange"); + CAF_CM_VALIDATE_BOOL(isRunning()); + _admin->declareExchange(exchange); +} + +bool RabbitAdminInstance::deleteExchange(const std::string& exchange) { + CAF_CM_FUNCNAME_VALIDATE("deleteExchange"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->deleteExchange(exchange); +} + +SmartPtrQueue RabbitAdminInstance::declareQueue() { + CAF_CM_FUNCNAME_VALIDATE("declareQueue"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->declareQueue(); +} + +void RabbitAdminInstance::declareQueue(SmartPtrQueue queue) { + CAF_CM_FUNCNAME_VALIDATE("declareQueue"); + CAF_CM_VALIDATE_BOOL(isRunning()); + _admin->declareQueue(queue); +} + +bool RabbitAdminInstance::deleteQueue(const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("deleteQueue"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->deleteQueue(queue); +} + +void RabbitAdminInstance::deleteQueue( + const std::string& queue, + const bool unused, + const bool empty) { + CAF_CM_FUNCNAME_VALIDATE("deleteQueue"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->deleteQueue(queue, unused, empty); +} + +void RabbitAdminInstance::purgeQueue(const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("purgeQueue"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->purgeQueue(queue); +} + +void RabbitAdminInstance::declareBinding(SmartPtrBinding binding) { + CAF_CM_FUNCNAME_VALIDATE("declareBinding"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->declareBinding(binding); +} + +void RabbitAdminInstance::removeBinding(SmartPtrBinding binding) { + CAF_CM_FUNCNAME_VALIDATE("removeBinding"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _admin->removeBinding(binding); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.h new file mode 100644 index 000000000..d9cde9b82 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitAdminInstance.h @@ -0,0 +1,127 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef RABBITADMININSTANCE_H_ +#define RABBITADMININSTANCE_H_ + + +#include "Integration/IIntegrationAppContextAware.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationAppContext.h" +#include "amqpCore/Binding.h" +#include "amqpCore/Exchange.h" +#include "amqpCore/Queue.h" +#include "amqpCore/RabbitAdmin.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::AmqpAdmin + *

+ *

+ * Example context file declaration:
+ *
+ * 
+ * 
+ *

+ * XML attribute definitions: + * + * + * + * + * + *
AttributeDescription
idoptional The id of the integration object
connection-factoryrequired The id of the ConnectionFactory bean
+ */ +class RabbitAdminInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IIntegrationAppContextAware, + public AmqpAdmin +{ + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IIntegrationAppContextAware) + CAF_QI_ENTRY(AmqpAdmin) + CAF_END_QI() + +public: + RabbitAdminInstance(); + virtual ~RabbitAdminInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IIntegrationAppContextAware + void setIntegrationAppContext( + SmartPtrIIntegrationAppContext context); + +public: // AmqpAdmin + void declareExchange(SmartPtrExchange exchange); + + bool deleteExchange(const std::string& exchange); + + SmartPtrQueue declareQueue(); + + void declareQueue(SmartPtrQueue queue); + + bool deleteQueue(const std::string& queue); + + void deleteQueue( + const std::string& queue, + const bool unused, + const bool empty); + + void purgeQueue(const std::string& queue); + + void declareBinding(SmartPtrBinding binding); + + void removeBinding(SmartPtrBinding binding); + +private: + bool _isRunning; + std::string _id; + std::string _connectionFactoryId; + SmartPtrRabbitAdmin _admin; + SmartPtrIAppContext _appContext; + SmartPtrIIntegrationAppContext _integrationAppContext; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(RabbitAdminInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(RabbitAdminInstance); + +}} + +#endif /* RABBITADMININSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.cpp new file mode 100644 index 000000000..a5f0b7413 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.cpp @@ -0,0 +1,191 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IBean.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "amqpCore/AmqpHeaderMapper.h" +#include "amqpCore/AmqpTemplate.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "Common/IAppConfig.h" +#include "RabbitTemplateInstance.h" + +using namespace Caf::AmqpIntegration; + +RabbitTemplateInstance::RabbitTemplateInstance() : + _isWired(false), + CAF_CM_INIT_LOG("RabbitTemplateInstance") { +} + +RabbitTemplateInstance::~RabbitTemplateInstance() { +} + +void RabbitTemplateInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + _id = configSection->findOptionalAttribute("id"); + if (!_id.length()) { + _id = CStringUtils::createRandomUuid(); + } + _configSection = configSection; +} + +std::string RabbitTemplateInstance::getId() const { + return _id; +} + +void RabbitTemplateInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_VALIDATE_INTERFACE(_configSection); + + const std::string connectionFactoryId = _configSection->findRequiredAttribute("connection-factory"); + SmartPtrIBean factoryBean = appContext->getBean(connectionFactoryId); + SmartPtrConnectionFactory connectionFactory; + connectionFactory.QueryInterface(factoryBean, true); + + SmartPtrIAppConfig appConfig = getAppConfig(); + + _template.CreateInstance(); + std::string param = _configSection->findOptionalAttribute("exchange"); + if (param.length()) { + CAF_CM_LOG_DEBUG_VA1("Setting exchange='%s'", param.c_str()); + _template->setExchange(appConfig->resolveValue(param)); + } + param = _configSection->findOptionalAttribute("queue"); + if (param.length()) { + CAF_CM_LOG_DEBUG_VA1("Setting queue='%s'", param.c_str()); + _template->setQueue(appConfig->resolveValue(param)); + } + param = _configSection->findOptionalAttribute("routing-key"); + if (param.length()) { + CAF_CM_LOG_DEBUG_VA1("Setting routing-key='%s'", param.c_str()); + _template->setRoutingKey(appConfig->resolveValue(param)); + } + param = _configSection->findOptionalAttribute("reply_timeout"); + if (param.length()) { + param = appConfig->resolveValue(param); + uint32 timeout = CStringConv::fromString(param); + CAF_CM_LOG_DEBUG_VA1("Setting reply_timeout=%d", timeout); + _template->setReplyTimeout(timeout); + } + + _template->init(connectionFactory); + _isWired = true; + _configSection = NULL; +} + +void RabbitTemplateInstance::start(const uint32 timeoutMs) { +} + +void RabbitTemplateInstance::stop(const uint32 timeoutMs) { + if (_isWired) { + _template->term(); + } + _template = NULL; + _isWired = false; +} + +bool RabbitTemplateInstance::isRunning() const { + return (_isWired && !_template.IsNull()); +} + +void RabbitTemplateInstance::send( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_VALIDATE_BOOL(isRunning()); + _template->send(message, headerMapper); +} + +void RabbitTemplateInstance::send( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_VALIDATE_BOOL(isRunning()); + _template->send(routingKey, message, headerMapper); +} + +void RabbitTemplateInstance::send( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_VALIDATE_BOOL(isRunning()); + _template->send(exchange, routingKey, message, headerMapper); +} + +SmartPtrIIntMessage RabbitTemplateInstance::receive( + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("receive"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->receive(headerMapper); +} + +SmartPtrIIntMessage RabbitTemplateInstance::receive( + const std::string& queueName, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("receive"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->receive(queueName, headerMapper); +} + +SmartPtrIIntMessage RabbitTemplateInstance::sendAndReceive( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + CAF_CM_FUNCNAME_VALIDATE("sendAndReceive"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->sendAndReceive( + message, + requestHeaderMapper, + responseHeaderMapper); +} + +SmartPtrIIntMessage RabbitTemplateInstance::sendAndReceive( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + CAF_CM_FUNCNAME_VALIDATE("sendAndReceive"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->sendAndReceive( + routingKey, + message, + requestHeaderMapper, + responseHeaderMapper); +} + +SmartPtrIIntMessage RabbitTemplateInstance::sendAndReceive( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + CAF_CM_FUNCNAME_VALIDATE("sendAndReceive"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->sendAndReceive( + exchange, + routingKey, + message, + requestHeaderMapper, + responseHeaderMapper); +} + +gpointer RabbitTemplateInstance::execute(SmartPtrExecutor executor, gpointer data) { + CAF_CM_FUNCNAME_VALIDATE("execute"); + CAF_CM_VALIDATE_BOOL(isRunning()); + return _template->execute(executor, data); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.h new file mode 100644 index 000000000..39debf169 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/RabbitTemplateInstance.h @@ -0,0 +1,149 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef RABBITTEMPLATEINSTANCE_H_ +#define RABBITTEMPLATEINSTANCE_H_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "amqpCore/AmqpHeaderMapper.h" +#include "amqpCore/AmqpTemplate.h" +#include "amqpCore/RabbitTemplate.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" + +namespace Caf { namespace AmqpIntegration { + +CAF_DECLARE_CLASS_AND_IMPQI_POINTER(RabbitTemplateInstance); + +/** + * @ingroup IntObj + * @brief An Integration Object implementing Caf::AmqpIntegration::AmqpTemplate + *

+ *

+ * Example context file declaration:
+ *
+ * 
+ * 
+ *

+ * XML attribute definitions: + * + * + * + * + * + * + * + * + * + * + * + *
AttributeDescription
idoptional The id of the integration object
connection-factoryrequired The id of the ConnectionFactory bean
exchangeoptional The name of the exchange to use by default
queueoptional The id of the queue to use by default. The queue name comes from + * the queue object with the given id.
routing-keyoptional The routing-key to use by default
reply_timeoutoptional The number of milliseconds to wait for a response when using + * sendAndReceive methods. This is an unsigned value. A value of zero indicates + * wait indefinitely.
+ */ +class RabbitTemplateInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public AmqpTemplate +{ + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(AmqpTemplate) + CAF_END_QI() + +public: + RabbitTemplateInstance(); + virtual ~RabbitTemplateInstance(); + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // AmqpTemplate + void send( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + void send( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + void send( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage receive( + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage receive( + const std::string& queueName, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + gpointer execute(SmartPtrExecutor executor, gpointer data); + +private: + bool _isWired; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrRabbitTemplate _template; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(RabbitTemplateInstance); +}; + +}} + +#endif /* RABBITTEMPLATEINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.cpp new file mode 100644 index 000000000..6a7854ce9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.cpp @@ -0,0 +1,204 @@ +/* + * Created on: Jun 4, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "amqpCore/CachingConnectionFactory.h" +#include "amqpClient/api/Connection.h" +#include "amqpCore/ConnectionListener.h" +#include "SecureCachingConnectionFactoryObj.h" + +using namespace Caf::AmqpIntegration; + +SecureCachingConnectionFactoryObj::SecureCachingConnectionFactoryObj() : + CAF_CM_INIT_LOG("SecureCachingConnectionFactoryObj") { +} + +SecureCachingConnectionFactoryObj::~SecureCachingConnectionFactoryObj() { +} + +void SecureCachingConnectionFactoryObj::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_factory); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + const std::string persistenceDir = + AppConfigUtils::getRequiredString("persistence_dir"); + + const SmartPtrCPersistenceDoc persistence = + CPersistenceUtils::loadPersistence(persistenceDir); + CAF_CM_VALIDATE_SMARTPTR(persistence); + + const SmartPtrCPersistenceProtocolDoc amqpBroker = + CPersistenceUtils::loadPersistenceProtocol(persistence->getPersistenceProtocolCollection()); + CAF_CM_VALIDATE_SMARTPTR(amqpBroker); + + const SmartPtrCCertPathCollectionDoc tlsCertPathCollection = amqpBroker->getTlsCertPathCollection(); + CAF_CM_VALIDATE_SMARTPTR(tlsCertPathCollection); + + const SmartPtrCLocalSecurityDoc localSecurity = persistence->getLocalSecurity(); + CAF_CM_VALIDATE_SMARTPTR(localSecurity); + + UriUtils::SUriRecord uri; + UriUtils::parseUriString(amqpBroker->getUri(), uri); + + const std::string vhost = UriUtils::findOptParameter(uri, "vhost", + AppConfigUtils::getRequiredString("communication_amqp", "vhost")); + const std::string connectionTimeout = UriUtils::findOptParameter(uri, "connection_timeout", + CStringConv::toString( + AppConfigUtils::getRequiredUint32("communication_amqp", "connection_timeout"))); + const std::string connectionRetries = UriUtils::findOptParameter(uri, "connection_retries", + CStringConv::toString( + AppConfigUtils::getRequiredUint32("communication_amqp", "connection_retries"))); + const std::string connectionSecondsToWait = UriUtils::findOptParameter(uri, "connection_seconds_to_wait", + CStringConv::toString( + AppConfigUtils::getRequiredUint32("communication_amqp", "connection_seconds_to_wait"))); + const std::string channelCacheSize = UriUtils::findOptParameter(uri, "channel_cache_size", + CStringConv::toString( + AppConfigUtils::getRequiredUint32("communication_amqp", "channel_cache_size"))); + + const std::deque tlsCertPathCollectionInner = tlsCertPathCollection->getCertPath(); + CAF_CM_VALIDATE_STL(tlsCertPathCollectionInner); + CAF_CM_VALIDATE_BOOL(tlsCertPathCollectionInner.size() == 1); + const std::string caCertPath = tlsCertPathCollectionInner.front(); + + CAF_CM_VALIDATE_STRING(uri.protocol); + CAF_CM_VALIDATE_STRING(uri.host); + CAF_CM_VALIDATE_STRING(uri.portStr); + CAF_CM_VALIDATE_STRING(vhost); + + CAF_CM_VALIDATE_STRING(caCertPath); + CAF_CM_VALIDATE_STRING(localSecurity->getCertPath()); + CAF_CM_VALIDATE_STRING(localSecurity->getPrivateKeyPath()); + + SmartPtrCachingConnectionFactory factory; + factory.CreateInstance(); + factory->init(); + factory->setProtocol(uri.protocol); + factory->setHost(uri.host); + factory->setPort(uri.port); + factory->setVirtualHost(vhost); + factory->setCaCertPath(caCertPath); + factory->setClientCertPath(localSecurity->getCertPath()); + factory->setClientKeyPath(localSecurity->getPrivateKeyPath()); + if (! uri.username.empty()) { + factory->setUsername(uri.username); + } + if (! uri.password.empty()) { + factory->setPassword(uri.password); + } + if (! connectionTimeout.empty()) { + factory->setConnectionTimeout(CStringConv::fromString(connectionTimeout)); + } + if (! connectionRetries.empty()) { + factory->setRetries(CStringConv::fromString(connectionRetries)); + } + if (! connectionSecondsToWait.empty()) { + factory->setSecondsToWait(CStringConv::fromString(connectionSecondsToWait)); + } + if (! channelCacheSize.empty()) { + factory->setChannelCacheSize(CStringConv::fromString(channelCacheSize)); + } + + _factory = factory; +} + +void SecureCachingConnectionFactoryObj::terminateBean() { + CAF_CM_FUNCNAME("terminateBean"); + try { + if (_factory) { + _factory->destroy(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +SmartPtrConnection SecureCachingConnectionFactoryObj::createConnection() { + CAF_CM_FUNCNAME_VALIDATE("createConnection"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->createConnection(); +} + +std::string SecureCachingConnectionFactoryObj::getProtocol() { + CAF_CM_FUNCNAME_VALIDATE("getProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getProtocol(); +} + +std::string SecureCachingConnectionFactoryObj::getHost() { + CAF_CM_FUNCNAME_VALIDATE("getHost"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getHost(); +} + +uint32 SecureCachingConnectionFactoryObj::getPort() { + CAF_CM_FUNCNAME_VALIDATE("getPort"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getPort(); +} + +std::string SecureCachingConnectionFactoryObj::getVirtualHost() { + CAF_CM_FUNCNAME_VALIDATE("getVirtualHost"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getVirtualHost(); +} + +std::string SecureCachingConnectionFactoryObj::getUsername() { + CAF_CM_FUNCNAME_VALIDATE("getUsername"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getUsername(); +} + +std::string SecureCachingConnectionFactoryObj::getPassword() { + CAF_CM_FUNCNAME_VALIDATE("getPassword"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getPassword(); +} + +std::string SecureCachingConnectionFactoryObj::getCaCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getCaCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getCaCertPath(); +} + +std::string SecureCachingConnectionFactoryObj::getClientCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getClientCertPath(); +} + +std::string SecureCachingConnectionFactoryObj::getClientKeyPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientKeyPath"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getClientKeyPath(); +} + +uint16 SecureCachingConnectionFactoryObj::getRetries() { + CAF_CM_FUNCNAME_VALIDATE("getRetries"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getRetries(); +} + +uint16 SecureCachingConnectionFactoryObj::getSecondsToWait() { + CAF_CM_FUNCNAME_VALIDATE("getSecondsToWait"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + return _factory->getSecondsToWait(); +} + +void SecureCachingConnectionFactoryObj::addConnectionListener(const SmartPtrConnectionListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("addConnectionListener"); + CAF_CM_PRECOND_ISINITIALIZED(_factory); + _factory->addConnectionListener(listener); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.h new file mode 100644 index 000000000..0ac9e3693 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/SecureCachingConnectionFactoryObj.h @@ -0,0 +1,108 @@ +/* + * Created on: Jun 4, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef SECURECACHINGCONNECTIONFACTORYOBJ_H_ +#define SECURECACHINGCONNECTIONFACTORYOBJ_H_ + +#include "IBean.h" + +#include "amqpCore/CachingConnectionFactory.h" +#include "amqpClient/api/Connection.h" +#include "amqpCore/ConnectionListener.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObj + * @brief An implementation of Caf::AmqpIntegration::SecureConnectionFactory that returns + * the same connections from all calls, ignores calls to + * Caf::AmqpClient::Connection::close and caches Caf::AmqpClient::Channel. + *

+ * By default, only one channel will be cached, with additional requested channels + * being created and disposed on demand. Consider raising the cache size in + * high-concurrency environments. + *

+ * NOTE: This factory requires explicit closing of all channels obtained from its + * shared connection. Failure to close channels will disable channel reuse. + *

+ * SecureCachingConnectionFactory objects are created by inserting the following into + * the application context: + *

+ *
+ * \
+ * 	\
+ * 	\
+ * 	\
+ * \
+ * 
+ * Properties: + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyDescription
hostThe broker host. By default the machine's host name (or localhost + * if the host name cannot be determined).
portThe broker port. By default AmqpClient::DEFAULT_AMQP_PORT
virtualHostThe virtual host on the broker. By default AmqpClient::DEFAULT_VHOST
connectionTimeoutThe connection timeout in milliseconds. A value of zero means + * to wait indefinitely. By default 10 seconds.
channelCacheSizeThe number of channels to cache. By default 1.
+ */ +class SecureCachingConnectionFactoryObj : + public TCafSubSystemObjectRoot, + public IBean, + public ConnectionFactory + { + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdAmqpSecureCachingConnectionFactory) + + CAF_BEGIN_INTERFACE_MAP(SecureCachingConnectionFactoryObj) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(ConnectionFactory) + CAF_END_INTERFACE_MAP() + +public: + SecureCachingConnectionFactoryObj(); + virtual ~SecureCachingConnectionFactoryObj(); + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // ConnectionFactory + SmartPtrConnection createConnection(); + std::string getProtocol(); + std::string getHost(); + uint32 getPort(); + std::string getVirtualHost(); + std::string getUsername(); + std::string getPassword(); + std::string getCaCertPath(); + std::string getClientCertPath(); + std::string getClientKeyPath(); + uint16 getRetries(); + uint16 getSecondsToWait(); + void addConnectionListener(const SmartPtrConnectionListener& listener); + +private: + SmartPtrCachingConnectionFactory _factory; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(SecureCachingConnectionFactoryObj); +}; + +}} + +#endif /* SECURECACHINGCONNECTIONFACTORYOBJ_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegration.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegration.cpp new file mode 100644 index 000000000..74600d7c3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegration.cpp @@ -0,0 +1,54 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CachingConnectionFactoryObj.h" +#include "SecureCachingConnectionFactoryObj.h" +#include "IntegrationObjects.h" + +namespace Caf { + +/** @brief CAF AMQP Integration */ +namespace AmqpIntegration { + const char* _sObjIdAmqpCachingConnectionFactory = "com.vmware.caf.comm.integration.amqp.caching.connection.factory"; + const char* _sObjIdAmqpSecureCachingConnectionFactory = "com.vmware.caf.comm.integration.amqp.secure.caching.connection.factory"; + const char* _sObjIdIntegrationObjects = "com.vmware.caf.comm.integration.objects"; +}} + +CEcmSubSystemModule _Module; + +using namespace Caf::AmqpIntegration; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) + CAF_OBJECT_ENTRY(CachingConnectionFactoryObj) + CAF_OBJECT_ENTRY(SecureCachingConnectionFactoryObj) + CAF_OBJECT_ENTRY(IntegrationObjects) +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegrationDefines.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegrationDefines.h new file mode 100644 index 000000000..ff3da4cb1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/amqpIntegrationDefines.h @@ -0,0 +1,25 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONDEFINES_H_ +#define AMQPINTEGRATIONDEFINES_H_ + +namespace Caf { + +/** @brief CAF AMQP Integration */ +namespace AmqpIntegration { + /** @brief CachingConnectionFactory bean subsystem id */ + extern const char* _sObjIdAmqpCachingConnectionFactory; + + /** @brief CachingConnectionFactory bean subsystem id */ + extern const char* _sObjIdAmqpSecureCachingConnectionFactory; + + /** @brief Integration object aggregator bean subsystem id */ + extern const char* _sObjIdIntegrationObjects; +}} + +#endif /* AMQPINTEGRATIONDEFINES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/stdafx.h new file mode 100644 index 000000000..ce0b5f7da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/amqpIntegration/src/stdafx.h @@ -0,0 +1,51 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#include +#include +#include "../../../amqpCore/src/amqpCore/amqpIntegrationCoreLink.h" +#include "amqpIntegrationDefines.h" + +/** + * @defgroup IntObj Integration Objects + * Documentation for the Integration Objects that can be declare in an + * application context file. + *

+ * The #Caf::AmqpIntegration::CachingConnectionFactoryObj bean has it's own bean definition in the + * application context: + *

+ * \
+ * 
+ *

+ * All other integration objects are accessed through the IntegrationObjects bean: + *

+ * \
+ * 
+ */ + +/** + * @defgroup IntObjImpl Integration Object Implementation + * Documentation for the implementation of the integration objects. + *

+ * These classes and methods cannot be used directly by application code. + */ + +/** + * @mainpage + * The CAF AMQP Integration Library provides integration components that enable + * AMQP message channels, endpoints and gateways to be wired into integration-enabled + * applications. + */ + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CCmsMessage.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CCmsMessage.h new file mode 100644 index 000000000..f15de055c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CCmsMessage.h @@ -0,0 +1,233 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCmsMessage_h_ +#define CCmsMessage_h_ + +#include + +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +class CCmsMessage { +public: + CCmsMessage(); + virtual ~CCmsMessage(); + +public: + void initialize( + const std::string& appId, + const std::string& pmeId); + +public: + void signBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void verifyBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void encryptBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void decryptBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void compressBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void uncompressBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const; + +public: + void signBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + + void verifyBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + + void encryptBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + + void decryptBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + + void compressBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + + void uncompressBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const; + +public: + void signFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void verifyFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void encryptFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void decryptFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void compressFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + + void uncompressFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const; + +public: + void signFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + + void verifyFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + + void encryptFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + + void decryptFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + + void compressFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + + void uncompressFileToFile( + const std::string& inputPath, + const std::string& outputPath) const; + +private: + void sign( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + + void verify( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + + void encrypt( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + + void decrypt( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + + void compress( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + + void uncompress( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const; + +private: + void checkCrlf( + const std::string& funcName, + const std::string& direction, + const SmartPtrCDynamicByteArray& buffer, + const std::string& path) const; + + void checkCrlf( + const std::string& funcName, + const std::string& direction, + const SmartPtrCDynamicByteArray& buffer) const; + + void checkCrlf( + const std::string& funcName, + const std::string& direction, + const std::string& path) const; + +private: + std::string getReqDirPath( + const std::string& directory, + const std::string& subdir, + const std::string& subdir1 = std::string()) const; + + std::string getReqFilePath( + const std::string& directory, + const std::string& filename) const; + + Cdeqstr getReqFilePaths( + const std::string& directory, + const std::string& subdir) const; + + std::string getReqRmtCertsDir( + const std::string& appId, + const std::string& pmeId) const; + + void getExistingDir( + const std::string& parentDir, + const std::string& childDir, + std::string& result, + std::string& errDirs) const; + +private: + bool _isInitialized; + + EVP_CIPHER* _cipher; + std::string _persistenceDir; + + std::string _nullPath; + SmartPtrCDynamicByteArray _nullBuffer; + + std::string _encryptPublicKeyPath; + std::string _decryptPublicKeyPath; + std::string _decryptPrivateKeyPath; + std::string _signPublicKeyPath; + std::string _signPrivateKeyPath; + Cdeqstr _caCertificatePaths; + + bool _checkCrlf; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCmsMessage); +}; + +CAF_DECLARE_SMART_POINTER(CCmsMessage); + +} + +#endif // #ifndef CCmsMessage_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CCmsMessageAttachments.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CCmsMessageAttachments.h new file mode 100644 index 000000000..ec1787a0a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CCmsMessageAttachments.h @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCmsMessageAttachments_h_ +#define CCmsMessageAttachments_h_ + + + +#include "CCmsMessage.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" + +namespace Caf { + +class CCmsMessageAttachments { +public: + CCmsMessageAttachments(); + virtual ~CCmsMessageAttachments(); + +public: + void initialize( + const SmartPtrCCmsMessage& cmsMessage); + +public: + void enforceSecurityOnAttachments( + const std::deque& attachmentCollection, + const bool isSigningEnforced, + const bool isEncryptionEnforced) const; + + std::deque encryptAndSignAttachments( + const std::deque& sourceAttachmentCollection) const; + + SmartPtrCAttachmentDoc encryptAndSignAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters = std::map()) const; + + std::deque decryptAndVerifyAttachments( + const std::deque& sourceAttachmentCollection) const; + + SmartPtrCAttachmentDoc decryptAndVerifyAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters) const; + +private: + void signAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const; + + void verifyAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const; + + void encryptAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const; + + void decryptAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const; + +private: + void removeStr( + std::string& sourceStr, + const std::string& strToRemove) const; + + void enforceSigning( + const bool isSigningEnforced, + const SmartPtrCAttachmentDoc& attachment) const; + + void enforceEncryption( + const bool isEncryptionEnforced, + const SmartPtrCAttachmentDoc& attachment) const; + +private: + bool _isInitialized; + + SmartPtrCCmsMessage _cmsMessage; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCmsMessageAttachments); +}; + +CAF_DECLARE_SMART_POINTER(CCmsMessageAttachments); + +} + +#endif // #ifndef CCmsMessageAttachments_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessageDeliveryRecord.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessageDeliveryRecord.h new file mode 100644 index 000000000..92a023ebf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessageDeliveryRecord.h @@ -0,0 +1,60 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessageDeliveryRecord_h +#define CMessageDeliveryRecord_h + + +#include "CMessagePartDescriptorSourceRecord.h" +#include "Integration/IIntMessage.h" + +namespace Caf { + +class CMessageDeliveryRecord { +public: + CMessageDeliveryRecord(); + virtual ~CMessageDeliveryRecord(); + +public: + void initialize( + const UUID& correlationId, + const uint32 numberOfParts, + const uint32 startingPartNumber, + const std::deque& messagePartSources, + const IIntMessage::SmartPtrCHeaders& messageHeaders); + +public: + UUID getCorrelationId() const; + + std::string getCorrelationIdStr() const; + + uint32 getNumberOfParts() const; + + uint32 getStartingPartNumber() const; + + std::deque getMessagePartSources() const; + + IIntMessage::SmartPtrCHeaders getMessageHeaders() const; + +private: + bool _isInitialized; + UUID _correlationId; + uint32 _numberOfParts; + uint32 _startingPartNumber; + std::deque _messagePartSources; + IIntMessage::SmartPtrCHeaders _messageHeaders; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessageDeliveryRecord); +}; + +CAF_DECLARE_SMART_POINTER(CMessageDeliveryRecord); + +} + +#endif /* CMessageDeliveryRecord_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartDescriptor.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartDescriptor.h new file mode 100644 index 000000000..42f366cac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartDescriptor.h @@ -0,0 +1,103 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessagePartDescriptor_h +#define CMessagePartDescriptor_h + + +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +class CMessagePartDescriptor; +CAF_DECLARE_SMART_POINTER(CMessagePartDescriptor); + +/** + * Class that emits and parses message parts header blocks.
+ */ +class CMessagePartDescriptor { +public: + /** + * Converts the BLOCK_SIZE data in a ByteBuffer into a MessagePartsHeader + *

+ * The incoming ByteBuffer position will be modified. + * @param buffer ByteBuffer to convert + * @return a MessagePartsHeader + */ + static SmartPtrCMessagePartDescriptor fromByteBuffer(SmartPtrCDynamicByteArray& buffer); + + /** + * Converts a byte array into a MessagePartsHeader + * @param blockData byte array to convert + * @return a MessagePartsHeader + */ + static SmartPtrCMessagePartDescriptor fromArray(SmartPtrCDynamicByteArray& blockData); + + static SmartPtrCDynamicByteArray toArray(const uint16 attachmentNumber, + const uint32 partNumber, const uint32 dataSize, const uint32 dataOffset); + +public: + CMessagePartDescriptor(); + virtual ~CMessagePartDescriptor(); + +public: + /** + * @param correlationId the correlation id + * @param numberOfParts the total number of parts + */ + void initialize( + const uint16 attachmentNumber, + const uint32 partNumber, + const uint32 dataSize, + const uint32 dataOffset); + + /** + * @return the attachmentNumber + */ + uint16 getAttachmentNumber() const; + std::string getAttachmentNumberStr() const; + + /** + * @return the partNumber + */ + uint32 getPartNumber() const; + + /** + * @return the dataSize + */ + uint32 getDataSize() const; + + /** + * @return the dataOffset + */ + uint32 getDataOffset() const; + +public: + /** + * The BLOCK_SIZE field stores the size of a MessagePartsHeader in byte array form.
+ */ + static const uint32 BLOCK_SIZE = 20; + static const byte CAF_MSG_VERSION = 1; + +private: + static const byte RESERVED = (byte)0xcd; + +private: + bool _isInitialized; + uint16 _attachmentNumber; + uint32 _partNumber; + uint32 _dataSize; + uint32 _dataOffset; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessagePartDescriptor); +}; + +} + +#endif /* CMessagePartDescriptor_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartDescriptorSourceRecord.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartDescriptorSourceRecord.h new file mode 100644 index 000000000..c29e818f4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartDescriptorSourceRecord.h @@ -0,0 +1,50 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessagePartDescriptorSourceRecord_h +#define CMessagePartDescriptorSourceRecord_h + +namespace Caf { + +class CMessagePartDescriptorSourceRecord { +public: + CMessagePartDescriptorSourceRecord(); + virtual ~CMessagePartDescriptorSourceRecord(); + +public: + void initialize( + const uint16 attachmentNumber, + const std::string filePath, + const uint32 dataOffset, + const uint32 dataLength); + +public: + uint16 getAttachmentNumber() const; + + std::string getFilePath() const; + + uint32 getDataOffset() const; + + uint32 getDataLength() const; + +private: + bool _isInitialized; + uint16 _attachmentNumber; + std::string _filePath; + uint32 _dataOffset; + uint32 _dataLength; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessagePartDescriptorSourceRecord); +}; + +CAF_DECLARE_SMART_POINTER(CMessagePartDescriptorSourceRecord); + +} + +#endif /* CMessagePartDescriptorSourceRecord_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartRecord.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartRecord.h new file mode 100644 index 000000000..59a5e51fe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartRecord.h @@ -0,0 +1,58 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessagePartRecord_h +#define CMessagePartRecord_h + +namespace Caf { + +class CMessagePartRecord { +public: + CMessagePartRecord(); + virtual ~CMessagePartRecord(); + +public: + void initialize( + const uint16 attachmentNumber, + const std::string filePath, + const uint64 dataOffset, + const uint64 dataLength); + +public: + uint16 getAttachmentNumber() const; + + std::string getFilePath() const; + + uint64 getDataOffset() const; + + uint64 getDataLength() const; + + void setAttachmentNumber(const uint16 attachmentNumber); + + void setFilePath(const std::string& filePath); + + void setDataOffset(const uint64 dataOffset); + + void setDataLength(const uint64 dataLength); + +private: + bool _isInitialized; + uint16 _attachmentNumber; + std::string _filePath; + uint64 _dataOffset; + uint64 _dataLength; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessagePartRecord); +}; + +CAF_DECLARE_SMART_POINTER(CMessagePartRecord); + +} + +#endif /* CMessagePartRecord_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartsHeader.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartsHeader.h new file mode 100644 index 000000000..12a4cb2e4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/CMessagePartsHeader.h @@ -0,0 +1,91 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessagePartsHeader_h +#define CMessagePartsHeader_h + + +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +class CMessagePartsHeader; +CAF_DECLARE_SMART_POINTER(CMessagePartsHeader); + +/** + * Class that emits and parses message parts header blocks.
+ */ +class CMessagePartsHeader { +public: + /** + * Converts the BLOCK_SIZE data in a ByteBuffer into a MessagePartsHeader + *

+ * The incoming ByteBuffer position will be modified. + * @param buffer ByteBuffer to convert + * @return a MessagePartsHeader + */ + static SmartPtrCMessagePartsHeader fromByteBuffer(SmartPtrCDynamicByteArray& buffer); + + /** + * Converts a byte array into a MessagePartsHeader + * @param blockData byte array to convert + * @return a MessagePartsHeader + */ + static SmartPtrCMessagePartsHeader fromArray(SmartPtrCDynamicByteArray& blockData); + + static SmartPtrCDynamicByteArray toArray(const UUID correlationId, + const uint32 numberOfParts); + +public: + CMessagePartsHeader(); + virtual ~CMessagePartsHeader(); + +public: + /** + * @param correlationId the correlation id + * @param numberOfParts the total number of parts + */ + void initialize( + const UUID correlationId, + const uint32 numberOfParts); + + /** + * @return the correlationId + */ + UUID getCorrelationId() const; + std::string getCorrelationIdStr() const; + + /** + * @return the numberOfParts + */ + uint32 getNumberOfParts() const; + +public: + /** + * The BLOCK_SIZE field stores the size of a MessagePartsHeader in byte array form.
+ */ + static const uint32 BLOCK_SIZE = 24; + static const byte CAF_MSG_VERSION = 1; + +private: + static const byte RESERVED1 = (byte)0xcd; + static const byte RESERVED2 = (byte)0xcd; + static const byte RESERVED3 = (byte)0xcd; + +private: + bool _isInitialized; + UUID _correlationId; + uint32 _numberOfParts; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessagePartsHeader); +}; + +} + +#endif /* CMessagePartsHeader_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/ReplyToResolver.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/ReplyToResolver.h new file mode 100644 index 000000000..ed2e174ce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/include/ReplyToResolver.h @@ -0,0 +1,26 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef ReplyToResolver_h +#define ReplyToResolver_h + + +#include "ICafObject.h" + +#include "Integration/IIntMessage.h" + +namespace Caf { +struct __declspec(novtable) ReplyToResolver : public ICafObject { + CAF_DECL_UUID("4D306795-4475-4D2C-BEF0-0ADE28843BBC") + + virtual std::string cacheReplyTo(const SmartPtrIIntMessage& message) = 0; + + virtual std::string lookupReplyTo(const SmartPtrIIntMessage& message) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ReplyToResolver); +} +#endif /* ReplyToResolver_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessage.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessage.cpp new file mode 100644 index 000000000..70ca9dd32 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessage.cpp @@ -0,0 +1,915 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "CCmsMessage.h" +#include "Exception/CCafException.h" +#include "CCmsMessageUtils.h" +#include + +using namespace Caf; + +CCmsMessage::CCmsMessage() : + _isInitialized(false), + _cipher(NULL), + _checkCrlf(false), + CAF_CM_INIT_LOG("CCmsMessage") { +} + +CCmsMessage::~CCmsMessage() { +} + +void CCmsMessage::initialize( + const std::string& appId, + const std::string& pmeId) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(appId); + CAF_CM_VALIDATE_STRING(pmeId); + + SSL_library_init(); + SSL_load_error_strings(); + + _persistenceDir = AppConfigUtils::getRequiredString("persistence_dir"); + + const std::string locDir = getReqDirPath(_persistenceDir, "local"); + const std::string locPublicKeyPath = getReqFilePath(locDir, "cert.pem"); + const std::string locPrivateKeyPath = getReqFilePath(locDir, "privateKey.pem"); + + const std::string rmtCertsDir = getReqRmtCertsDir(appId, pmeId); + const std::string rmtPublicKeyPath = getReqFilePath(rmtCertsDir, "cmsCert.pem"); + const std::string rmtCmsCipherNamePath = getReqFilePath(rmtCertsDir, "cmsCipherName.txt"); + const std::string rmtCipherName = FileSystemUtils::loadTextFile(rmtCmsCipherNamePath); + + _caCertificatePaths = getReqFilePaths(rmtCertsDir, "cmsCertCollection"); + + _cipher = const_cast(EVP_get_cipherbyname(rmtCipherName.c_str())); + CAF_CM_VALIDATE_PTR(_cipher); + + _encryptPublicKeyPath = rmtPublicKeyPath; + _decryptPublicKeyPath = rmtPublicKeyPath; + _decryptPrivateKeyPath = locPrivateKeyPath; + _signPublicKeyPath = locPublicKeyPath; + _signPrivateKeyPath = locPrivateKeyPath; + + CAF_CM_LOG_DEBUG_VA1("Initializing - rmtCipherName: %s", rmtCipherName.c_str()); + CAF_CM_LOG_DEBUG_VA1("Initializing - encryptPublicKeyPath: %s", _encryptPublicKeyPath.c_str()); + CAF_CM_LOG_DEBUG_VA1("Initializing - decryptPublicKeyPath: %s", _decryptPublicKeyPath.c_str()); + CAF_CM_LOG_DEBUG_VA1("Initializing - decryptPrivateKeyPath: %s", _decryptPrivateKeyPath.c_str()); + CAF_CM_LOG_DEBUG_VA1("Initializing - signPublicKeyPath: %s", _signPublicKeyPath.c_str()); + CAF_CM_LOG_DEBUG_VA1("Initializing - signPrivateKeyPath: %s", _signPrivateKeyPath.c_str()); + CAF_CM_LOG_DEBUG_VA2("Initializing - caCertificatePath: %s, %s", rmtCertsDir.c_str(), "cmsCertCollection"); + + _checkCrlf = AppConfigUtils::getOptionalBoolean("security", "check_crlf"); + + _isInitialized = true; +} + +void CCmsMessage::signBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("signBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + sign(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::verifyBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("verifyBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + verify(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::encryptBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("encryptBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + encrypt(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::decryptBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("decryptBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + decrypt(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::compressBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("compressBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + compress(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::uncompressBufferToBuffer( + const SmartPtrCDynamicByteArray& inputBuffer, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("uncompressBufferToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + CAF_CM_LOG_DEBUG_VA1("%s", CAF_CM_GET_FUNCNAME); + + outputBuffer.CreateInstance(); + uncompress(inputBuffer, _nullPath, outputBuffer, _nullPath); +} + +void CCmsMessage::signBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("signBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + sign(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::verifyBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("verifyBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + verify(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::encryptBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("encryptBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + encrypt(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::decryptBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("decryptBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + decrypt(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::compressBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("compressBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + compress(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::uncompressBufferToFile( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("uncompressBufferToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + uncompress(inputBuffer, _nullPath, nullBuffer, outputPath); +} + +void CCmsMessage::signFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("signFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + sign(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::verifyFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("verifyFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + verify(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::encryptFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("encryptFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + encrypt(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::decryptFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("decryptFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + decrypt(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::compressFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("compressFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + compress(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::uncompressFileToBuffer( + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer) const { + CAF_CM_FUNCNAME_VALIDATE("uncompressFileToBuffer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + + CAF_CM_LOG_DEBUG_VA2("%s - %s", CAF_CM_GET_FUNCNAME, inputPath.c_str()); + + outputBuffer.CreateInstance(); + uncompress(_nullBuffer, inputPath, outputBuffer, _nullPath); +} + +void CCmsMessage::signFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("signFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + sign(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::verifyFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("verifyFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + verify(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::encryptFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("encryptFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + encrypt(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::decryptFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("decryptFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + decrypt(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::compressFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("compressFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + compress(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::uncompressFileToFile( + const std::string& inputPath, + const std::string& outputPath) const { + CAF_CM_FUNCNAME_VALIDATE("uncompressFileToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputPath); + CAF_CM_VALIDATE_STRING(outputPath); + + CAF_CM_LOG_DEBUG_VA3("%s - %s, %s", CAF_CM_GET_FUNCNAME, inputPath.c_str(), + outputPath.c_str()); + + SmartPtrCDynamicByteArray nullBuffer; + uncompress(_nullBuffer, inputPath, nullBuffer, outputPath); +} + +void CCmsMessage::sign( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("sign"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + const uint32 flags = CMS_STREAM | CMS_BINARY; + + BIO* signPublicKeyBio = NULL; + BIO* signPrivateKeyBio = NULL; + X509* signPublicKey = NULL; + EVP_PKEY* signPrivateKey = NULL; + + BIO* outputBio = NULL; + BIO* inputBufferBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + signPublicKeyBio = CCmsMessageUtils::inputFileToBio(_signPublicKeyPath); + signPrivateKeyBio = CCmsMessageUtils::inputFileToBio(_signPrivateKeyPath); + + signPublicKey = CCmsMessageUtils::bioToX509(signPublicKeyBio); + // Casting to void to ignore return value and eliminate compiler warning + (void) BIO_reset(signPublicKeyBio); + signPrivateKey = CCmsMessageUtils::bioToPrivateKey(signPrivateKeyBio); + + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + contentInfo = CMS_sign(signPublicKey, signPrivateKey, NULL, inputBufferBio, + flags); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_sign Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + /* Write out S/MIME message */ + if (! SMIME_write_CMS(outputBio, contentInfo, inputBufferBio, flags)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA1(E_FAIL, + "SMIME_write_CMS Failed - %s", outputPath.c_str()); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(signPublicKey); + CCmsMessageUtils::free(signPrivateKey); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + CCmsMessageUtils::free(signPublicKeyBio); + CCmsMessageUtils::free(signPrivateKeyBio); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::verify( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("verify"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + std::deque caCertBios; + std::deque caCertX509s; + X509_STORE* caCertStore = NULL; + + BIO* inputBufferBio = NULL; + BIO* inputParsedBio = NULL; + BIO* outputBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + caCertBios = CCmsMessageUtils::inputFilesToBio(_caCertificatePaths); + caCertX509s = CCmsMessageUtils::biosToX509(caCertBios); + caCertStore = CCmsMessageUtils::createX509Store(caCertX509s); + + /* + * X509_STORE_free will free up recipient Store and its contents so set + * caCerts to NULL so it isn't freed up twice. + */ + caCertX509s.clear(); + + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + /* parse message */ + contentInfo = SMIME_read_CMS(inputBufferBio, &inputParsedBio); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "SMIME_read_CMS Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + if (! CMS_verify(contentInfo, NULL, caCertStore, inputParsedBio, outputBio, 0)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_verify Failed"); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(caCertX509s); + CCmsMessageUtils::free(caCertStore); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + CCmsMessageUtils::free(inputParsedBio); + CCmsMessageUtils::free(caCertBios); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::encrypt( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("encrypt"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + const uint32 flags = CMS_STREAM | CMS_BINARY; + + BIO* encryptPublicKeyBio = NULL; + X509* encryptPublicKey = NULL; + STACK_OF(X509)* encryptPublicKeyStack = NULL; + + BIO* outputBio = NULL; + BIO* inputBufferBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + encryptPublicKeyBio = CCmsMessageUtils::inputFileToBio(_encryptPublicKeyPath); + encryptPublicKey = CCmsMessageUtils::bioToX509(encryptPublicKeyBio); + encryptPublicKeyStack = CCmsMessageUtils::createX509Stack(encryptPublicKey); + + /* + * sk_X509_pop_free will CCmsMessageUtils::free up recipient STACK and its contents so set + * encryptPublicKey to NULL so it isn't freed up twice. + */ + encryptPublicKey = NULL; + + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + /* encrypt content */ + contentInfo = CMS_encrypt(encryptPublicKeyStack, inputBufferBio, _cipher, flags); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_encrypt Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + /* Write out S/MIME message */ + if (! SMIME_write_CMS(outputBio, contentInfo, inputBufferBio, flags)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "SMIME_write_CMS Failed"); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(encryptPublicKey); + CCmsMessageUtils::free(encryptPublicKeyStack); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + CCmsMessageUtils::free(encryptPublicKeyBio); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::decrypt( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("decrypt"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + BIO* decryptPublicKeyBio = NULL; + BIO* decryptPrivateKeyBio = NULL; + X509* decryptPublicKey = NULL; + EVP_PKEY* decryptPrivateKey = NULL; + + BIO* outputBio = NULL; + BIO* inputBufferBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + decryptPublicKeyBio = CCmsMessageUtils::inputFileToBio(_decryptPublicKeyPath); + decryptPrivateKeyBio = CCmsMessageUtils::inputFileToBio(_decryptPrivateKeyPath); + + decryptPublicKey = CCmsMessageUtils::bioToX509(decryptPublicKeyBio); + decryptPrivateKey = CCmsMessageUtils::bioToPrivateKey(decryptPrivateKeyBio); + + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + contentInfo = SMIME_read_CMS(inputBufferBio, NULL); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "SMIME_read_CMS Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + if (!CMS_decrypt(contentInfo, decryptPrivateKey, decryptPublicKey, + NULL, outputBio, 0)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_decrypt Failed"); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(decryptPublicKey); + CCmsMessageUtils::free(decryptPrivateKey); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + CCmsMessageUtils::free(decryptPublicKeyBio); + CCmsMessageUtils::free(decryptPrivateKeyBio); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::compress( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("compress"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + BIO* inputBufferBio = NULL; + BIO* outputBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + /* parse message */ + contentInfo = CMS_compress(inputBufferBio, NID_zlib_compression, + CMS_STREAM | CMS_BINARY); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_compress Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + /* Write out S/MIME message */ + if (! SMIME_write_CMS(outputBio, contentInfo, inputBufferBio, CMS_STREAM)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "SMIME_write_CMS Failed"); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::uncompress( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) const { + CAF_CM_FUNCNAME("uncompress"); + + checkCrlf(CAF_CM_GET_FUNCNAME, "input", inputBuffer, inputPath); + + BIO* inputBufferBio = NULL; + BIO* outputBio = NULL; + CMS_ContentInfo* contentInfo = NULL; + try { + inputBufferBio = CCmsMessageUtils::inputToBio(inputBuffer, inputPath); + + /* parse message */ + contentInfo = SMIME_read_CMS(inputBufferBio, NULL); + if (! contentInfo) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "SMIME_read_CMS Failed"); + } + + outputBio = CCmsMessageUtils::outputToBio(outputBuffer, outputPath); + + if (! CMS_uncompress(contentInfo, outputBio, NULL, 0)) { + CCmsMessageUtils::logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "CMS_uncompress Failed"); + } + + CCmsMessageUtils::bioToOutput(outputBio, outputBuffer, outputPath); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + CCmsMessageUtils::free(contentInfo); + CCmsMessageUtils::free(inputBufferBio); + CCmsMessageUtils::free(outputBio); + + CAF_CM_THROWEXCEPTION; + + checkCrlf(CAF_CM_GET_FUNCNAME, "output", outputBuffer, outputPath); +} + +void CCmsMessage::checkCrlf( + const std::string& funcName, + const std::string& direction, + const SmartPtrCDynamicByteArray& buffer, + const std::string& path) const { + CAF_CM_FUNCNAME("checkCrlf"); + CAF_CM_VALIDATE_STRING(funcName); + CAF_CM_VALIDATE_STRING(direction); + + if (_checkCrlf) { + if (! buffer.IsNull()) { + checkCrlf(funcName, direction, buffer); + } else if (! path.empty()) { + checkCrlf(funcName, direction, path); + } else { + CAF_CM_EXCEPTION_VA0(E_FAIL, "Must provide buffer or path"); + } + } +} + +void CCmsMessage::checkCrlf( + const std::string& funcName, + const std::string& direction, + const SmartPtrCDynamicByteArray& buffer) const { + CAF_CM_FUNCNAME("checkCrlf(buffer)"); + CAF_CM_VALIDATE_STRING(funcName); + CAF_CM_VALIDATE_STRING(direction); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + bool isFnd = false; + for (uint32 i = 0; ! isFnd && (i < buffer->getElementCount()); i++) { + if (buffer->getAt(i) == '\r') { + CAF_CM_EXCEPTION_VA2(E_FAIL, "Found CRLF - func: %s, dir: %s", + funcName.c_str(), direction.c_str()); + } + } +} + +void CCmsMessage::checkCrlf( + const std::string& funcName, + const std::string& direction, + const std::string& path) const { + CAF_CM_FUNCNAME("checkCrlf(path)"); + CAF_CM_VALIDATE_STRING(funcName); + CAF_CM_VALIDATE_STRING(direction); + CAF_CM_VALIDATE_STRING(path); + + std::ifstream ifs(path.c_str()); + if(!ifs) { + CAF_CM_EXCEPTION_VA1(E_FAIL, "Failed to open file - %s", path.c_str()); + } + + std::istream::sentry se(ifs, true); + std::streambuf* sb = ifs.rdbuf(); + + char c = '\0'; + bool isFnd = false; + while (! isFnd && ! ifs.eof() && (c != EOF)) { + c = sb->sbumpc(); + if (c == '\r') { + CAF_CM_EXCEPTION_VA3(E_FAIL, "Found CRLF - func: %s, dir: %s, path: %s", + funcName.c_str(), direction.c_str(), path.c_str()); + } + } +} + +std::string CCmsMessage::getReqDirPath( + const std::string& directory, + const std::string& subdir, + const std::string& subdir1) const { + CAF_CM_FUNCNAME("getReqFilePath"); + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(subdir); + + std::string rc; + if (subdir1.empty()) { + rc = FileSystemUtils::buildPath(directory, subdir); + } else { + rc = FileSystemUtils::buildPath(directory, subdir, subdir1); + } + + if (! FileSystemUtils::doesDirectoryExist(rc)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "Directory does not exist - %s", rc.c_str()); + } + + return rc; +} + +std::string CCmsMessage::getReqFilePath( + const std::string& directory, + const std::string& filename) const { + CAF_CM_FUNCNAME("getReqFilePath"); + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filename); + + const std::string rc = FileSystemUtils::buildPath(directory, filename); + if (! FileSystemUtils::doesFileExist(rc)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "File does not exist - %s", rc.c_str()); + } + + return rc; +} + +Cdeqstr CCmsMessage::getReqFilePaths( + const std::string& directory, + const std::string& subdir) const { + CAF_CM_FUNCNAME_VALIDATE("getReqFilePaths"); + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(subdir); + + const std::string dirPath = getReqDirPath(directory, subdir); + + FileSystemUtils::DirectoryItems dirItems = FileSystemUtils::itemsInDirectory( + dirPath, FileSystemUtils::REGEX_MATCH_ALL); + + Cdeqstr rc; + const FileSystemUtils::Files files = dirItems.files; + for (TConstIterator fileIter(files); fileIter; fileIter++) { + const std::string filename = *fileIter; + const std::string filePath = FileSystemUtils::buildPath( + dirPath, filename); + + rc.push_back(filePath); + } + + return rc; +} + +std::string CCmsMessage::getReqRmtCertsDir( + const std::string& appId, + const std::string& pmeId) const { + CAF_CM_FUNCNAME("getReqRmtCertsDir"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(appId); + CAF_CM_VALIDATE_STRING(pmeId); + + const std::string rmtCertsDir = getReqDirPath(_persistenceDir, "remote"); + const std::string pmeIdLower = CStringUtils::toLower(pmeId); + const std::string appIdLower = CStringUtils::toLower(appId); + const std::string pmeIdUpper = CStringUtils::toUpper(pmeId); + const std::string appIdUpper = CStringUtils::toUpper(appId); + + std::string rc; + std::string errDirs; + getExistingDir(rmtCertsDir, pmeIdLower, rc, errDirs); + getExistingDir(rmtCertsDir, appIdLower, rc, errDirs); + getExistingDir(rmtCertsDir, pmeIdUpper, rc, errDirs); + getExistingDir(rmtCertsDir, appIdUpper, rc, errDirs); + getExistingDir(rmtCertsDir, "remote_default", rc, errDirs); + + if (rc.empty()) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "Remote directories do not exist - %s", errDirs.c_str()); + } + + return rc; +} + +void CCmsMessage::getExistingDir( + const std::string& parentDir, + const std::string& childDir, + std::string& result, + std::string& errDirs) const { + CAF_CM_FUNCNAME_VALIDATE("getExistingDir"); + CAF_CM_VALIDATE_STRING(parentDir); + CAF_CM_VALIDATE_STRING(childDir); + + if (result.empty()) { + const std::string finalDir = FileSystemUtils::buildPath(parentDir, childDir); + errDirs += finalDir + ", "; + if (FileSystemUtils::doesDirectoryExist(finalDir)) { + result = finalDir; + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageAttachments.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageAttachments.cpp new file mode 100644 index 000000000..7bdc579ba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageAttachments.cpp @@ -0,0 +1,377 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +#include "CCmsMessage.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "CCmsMessageAttachments.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CCmsMessageAttachments::CCmsMessageAttachments() : + _isInitialized(false), + CAF_CM_INIT_LOG("CCmsMessageAttachments") { +} + +CCmsMessageAttachments::~CCmsMessageAttachments() { +} + +void CCmsMessageAttachments::initialize( + const SmartPtrCCmsMessage& cmsMessage) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(cmsMessage); + + _cmsMessage = cmsMessage; + + _isInitialized = true; +} + +std::deque CCmsMessageAttachments::encryptAndSignAttachments( + const std::deque& sourceAttachmentCollection) const { + CAF_CM_FUNCNAME("encryptAndSignAttachments"); + // sourceAttachmentCollection is optional + + std::deque rc; + for (TConstIterator > sourceAttachmentIter(sourceAttachmentCollection); + sourceAttachmentIter; sourceAttachmentIter++) { + const SmartPtrCAttachmentDoc sourceAttachment = *sourceAttachmentIter; + + UriUtils::SUriRecord sourceUriRecord; + UriUtils::parseUriString(sourceAttachment->getUri(), sourceUriRecord); + + if ((sourceUriRecord.protocol.compare("file") == 0) + && !sourceAttachment->getIsReference()) { + UriUtils::SFileUriRecord sourceFileUriRecord; + UriUtils::parseFileAddress(sourceUriRecord.address, sourceFileUriRecord); + const std::string sourceAttachmentPath = sourceFileUriRecord.path; + + if (!FileSystemUtils::doesFileExist(sourceAttachmentPath)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "File not found - %s", sourceAttachmentPath.c_str()); + } + + const SmartPtrCAttachmentDoc destAttachment = encryptAndSignAttachment( + sourceAttachmentPath, sourceAttachment, sourceUriRecord.parameters); + + rc.push_back(destAttachment); + } else { + rc.push_back(sourceAttachment); + } + } + + return rc; +} + +void CCmsMessageAttachments::enforceSecurityOnAttachments( + const std::deque& attachmentCollection, + const bool isSigningEnforced, + const bool isEncryptionEnforced) const { + CAF_CM_FUNCNAME("enforceSecurityOnAttachments"); + + for (TConstIterator > attachmentIter(attachmentCollection); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + const CMS_POLICY cmsPolicy = attachment->getCmsPolicy(); + switch(cmsPolicy) { + case CMS_POLICY_NONE: + enforceSigning(isSigningEnforced, attachment); + enforceEncryption(isEncryptionEnforced, attachment); + break; + case CMS_POLICY_CAF_ENCRYPTED: + enforceSigning(isSigningEnforced, attachment); + break; + case CMS_POLICY_CAF_SIGNED: + enforceEncryption(isEncryptionEnforced, attachment); + break; + case CMS_POLICY_APP_ENCRYPTED: + enforceSigning(isSigningEnforced, attachment); + break; + case CMS_POLICY_APP_SIGNED: + enforceEncryption(isEncryptionEnforced, attachment); + break; + case CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED: + case CMS_POLICY_APP_ENCRYPTED_AND_SIGNED: + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown CMS Policy - %d", static_cast(cmsPolicy)); + } + } +} + +SmartPtrCAttachmentDoc CCmsMessageAttachments::encryptAndSignAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters) const { + CAF_CM_FUNCNAME("encryptAndSignAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + SmartPtrCAttachmentDoc destAttachment = sourceAttachment; + + std::string destAttachmentPath; + std::string sourceAttachmentPathTmp = sourceAttachmentPath; + SmartPtrCAttachmentDoc sourceAttachmentTmp = sourceAttachment; + + const CMS_POLICY cmsPolicy = sourceAttachmentTmp->getCmsPolicy(); + switch(cmsPolicy) { + case CMS_POLICY_CAF_ENCRYPTED: + encryptAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_CAF_SIGNED: + signAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED: + encryptAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + + sourceAttachmentPathTmp = destAttachmentPath; + sourceAttachmentTmp = destAttachment; + + signAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_NONE: + case CMS_POLICY_APP_ENCRYPTED: + case CMS_POLICY_APP_SIGNED: + case CMS_POLICY_APP_ENCRYPTED_AND_SIGNED: + CAF_CM_LOG_DEBUG_VA1("Passthrough CMS Policy - %s", + EnumConvertersXml::convertCmsPolicyToString(cmsPolicy).c_str()) + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown CMS Policy - %d", static_cast(cmsPolicy)); + } + + return destAttachment; +} + +std::deque CCmsMessageAttachments::decryptAndVerifyAttachments( + const std::deque& sourceAttachmentCollection) const { + CAF_CM_FUNCNAME("decryptAndVerifyAttachments"); + // sourceAttachmentCollection is optional + + std::deque rc; + for (TConstIterator > sourceAttachmentIter(sourceAttachmentCollection); + sourceAttachmentIter; sourceAttachmentIter++) { + const SmartPtrCAttachmentDoc sourceAttachment = *sourceAttachmentIter; + + UriUtils::SUriRecord sourceUriRecord; + UriUtils::parseUriString(sourceAttachment->getUri(), sourceUriRecord); + + if ((sourceUriRecord.protocol.compare("file") == 0) + && !sourceAttachment->getIsReference()) { + UriUtils::SFileUriRecord sourceFileUriRecord; + UriUtils::parseFileAddress(sourceUriRecord.address, sourceFileUriRecord); + const std::string sourceAttachmentPath = sourceFileUriRecord.path; + + if (!FileSystemUtils::doesFileExist(sourceAttachmentPath)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "File not found - %s", sourceAttachmentPath.c_str()); + } + + const SmartPtrCAttachmentDoc destAttachment = decryptAndVerifyAttachment( + sourceAttachmentPath, sourceAttachment, sourceUriRecord.parameters); + + rc.push_back(destAttachment); + } else { + rc.push_back(sourceAttachment); + } + } + + return rc; +} + +SmartPtrCAttachmentDoc CCmsMessageAttachments::decryptAndVerifyAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters) const { + CAF_CM_FUNCNAME("decryptAndVerifyAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + SmartPtrCAttachmentDoc destAttachment = sourceAttachment; + + std::string destAttachmentPath; + std::string sourceAttachmentPathTmp = sourceAttachmentPath; + SmartPtrCAttachmentDoc sourceAttachmentTmp = sourceAttachment; + + const CMS_POLICY cmsPolicy = sourceAttachmentTmp->getCmsPolicy(); + switch(cmsPolicy) { + case CMS_POLICY_CAF_ENCRYPTED: + decryptAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_CAF_SIGNED: + verifyAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED: + verifyAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + + sourceAttachmentPathTmp = destAttachmentPath; + sourceAttachmentTmp = destAttachment; + + decryptAttachment(sourceAttachmentPathTmp, sourceAttachmentTmp, + uriParameters, destAttachmentPath, destAttachment); + break; + case CMS_POLICY_NONE: + case CMS_POLICY_APP_ENCRYPTED: + case CMS_POLICY_APP_SIGNED: + case CMS_POLICY_APP_ENCRYPTED_AND_SIGNED: + CAF_CM_LOG_DEBUG_VA1("Passthrough CMS Policy - %s", + EnumConvertersXml::convertCmsPolicyToString(cmsPolicy).c_str()) + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown CMS Policy - %d", static_cast(cmsPolicy)); + } + + return destAttachment; +} + +void CCmsMessageAttachments::signAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const { + CAF_CM_FUNCNAME_VALIDATE("signAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + destAttachmentPath = sourceAttachmentPath + "_signed"; + _cmsMessage->signFileToFile(sourceAttachmentPath, destAttachmentPath); + + const std::string attachmentUri = UriUtils::appendParameters( + destAttachmentPath, uriParameters); + + destAttachment.CreateInstance(); + destAttachment->initialize(sourceAttachment->getName(), sourceAttachment->getType(), + "file:///" + attachmentUri, sourceAttachment->getIsReference(), + sourceAttachment->getCmsPolicy()); +} + +void CCmsMessageAttachments::verifyAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const { + CAF_CM_FUNCNAME_VALIDATE("verifyAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + destAttachmentPath = sourceAttachmentPath + "_verified"; + removeStr(destAttachmentPath, "_signed"); + + _cmsMessage->verifyFileToFile(sourceAttachmentPath, destAttachmentPath); + + const std::string attachmentUri = UriUtils::appendParameters( + destAttachmentPath, uriParameters); + + destAttachment.CreateInstance(); + destAttachment->initialize(sourceAttachment->getName(), sourceAttachment->getType(), + "file:///" + attachmentUri, sourceAttachment->getIsReference(), + sourceAttachment->getCmsPolicy()); +} + +void CCmsMessageAttachments::encryptAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const { + CAF_CM_FUNCNAME_VALIDATE("encryptAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + destAttachmentPath = sourceAttachmentPath + "_encrypted"; + _cmsMessage->encryptFileToFile(sourceAttachmentPath, destAttachmentPath); + + const std::string attachmentUri = UriUtils::appendParameters( + destAttachmentPath, uriParameters); + + destAttachment.CreateInstance(); + destAttachment->initialize(sourceAttachment->getName(), sourceAttachment->getType(), + "file:///" + attachmentUri, sourceAttachment->getIsReference(), + sourceAttachment->getCmsPolicy()); +} + +void CCmsMessageAttachments::decryptAttachment( + const std::string& sourceAttachmentPath, + const SmartPtrCAttachmentDoc& sourceAttachment, + const std::map& uriParameters, + std::string& destAttachmentPath, + SmartPtrCAttachmentDoc& destAttachment) const { + CAF_CM_FUNCNAME_VALIDATE("decryptAttachment"); + CAF_CM_VALIDATE_STRING(sourceAttachmentPath); + CAF_CM_VALIDATE_SMARTPTR(sourceAttachment); + + destAttachmentPath = sourceAttachmentPath + "_decrypted"; + removeStr(destAttachmentPath, "_encrypted"); + + _cmsMessage->decryptFileToFile(sourceAttachmentPath, destAttachmentPath); + + const std::string attachmentUri = UriUtils::appendParameters( + destAttachmentPath, uriParameters); + + destAttachment.CreateInstance(); + destAttachment->initialize(sourceAttachment->getName(), sourceAttachment->getType(), + "file:///" + attachmentUri, sourceAttachment->getIsReference(), + sourceAttachment->getCmsPolicy()); +} + +void CCmsMessageAttachments::removeStr( + std::string& sourceStr, + const std::string& strToRemove) const { + CAF_CM_FUNCNAME_VALIDATE("removeStr"); + CAF_CM_VALIDATE_STRING(sourceStr); + CAF_CM_VALIDATE_STRING(strToRemove); + + const size_t index = sourceStr.find(strToRemove); + if (index != std::string::npos) { + sourceStr.erase(index, strToRemove.length()); + } +} + +void CCmsMessageAttachments::enforceSigning( + const bool isSigningEnforced, + const SmartPtrCAttachmentDoc& attachment) const { + CAF_CM_FUNCNAME("enforceSigning"); + CAF_CM_VALIDATE_SMARTPTR(attachment); + + if (isSigningEnforced) { + CAF_CM_EXCEPTION_VA2(E_FAIL, + "Attachment must be signed - name: %s, uri: %s", + attachment->getName().c_str(), attachment->getUri().c_str()); + } +} + +void CCmsMessageAttachments::enforceEncryption( + const bool isEncryptionEnforced, + const SmartPtrCAttachmentDoc& attachment) const { + CAF_CM_FUNCNAME("enforceEncryption"); + CAF_CM_VALIDATE_SMARTPTR(attachment); + + if (isEncryptionEnforced) { + CAF_CM_EXCEPTION_VA2(E_FAIL, + "Attachment must be encrypted - name: %s, uri: %s", + attachment->getName().c_str(), attachment->getUri().c_str()); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.cpp new file mode 100644 index 000000000..1c66f7d35 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.cpp @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CCmsMessageTransformer.h" + +using namespace Caf; + +CCmsMessageTransformer::CCmsMessageTransformer() : + _isInitialized(false), + CAF_CM_INIT("CCmsMessageTransformer") { +} + +CCmsMessageTransformer::~CCmsMessageTransformer() { +} + +void CCmsMessageTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); +} + +void CCmsMessageTransformer::terminateBean() { +} + +void CCmsMessageTransformer::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +bool CCmsMessageTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + return false; +} + +SmartPtrIIntegrationObject CCmsMessageTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + rc.CreateInstance(_sObjIdCommIntegrationCmsMessageTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.h new file mode 100644 index 000000000..d0ca7fd9c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformer.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCmsMessageTransformer_h_ +#define CCmsMessageTransformer_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CCmsMessageTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CCmsMessageTransformer(); + virtual ~CCmsMessageTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationCmsMessageTransformer) + + CAF_BEGIN_INTERFACE_MAP(CCmsMessageTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CCmsMessageTransformer); +}; + +} + +#endif // #ifndef CCmsMessageTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.cpp new file mode 100644 index 000000000..bbd93b89d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.cpp @@ -0,0 +1,153 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Caf/CBeanPropertiesHelper.h" +#include "Integration/Caf/CCafMessageHeaders.h" +#include "CCmsMessage.h" +#include "CCmsMessageAttachments.h" +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Exception/CCafException.h" +#include "CCmsMessageTransformerInstance.h" +#include "Integration/Caf/CCafMessageCreator.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" + +using namespace Caf; + +CCmsMessageTransformerInstance::CCmsMessageTransformerInstance() : + _isInitialized(false), + _isSigningEnforced(true), + _isEncryptionEnforced(true), + CAF_CM_INIT("CCmsMessageTransformerInstance") { +} + +CCmsMessageTransformerInstance::~CCmsMessageTransformerInstance() { +} + +void CCmsMessageTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + const SmartPtrCBeanPropertiesHelper beanProperties = + CBeanPropertiesHelper::create(properties); + + _id = configSection->findRequiredAttribute("id"); + const std::string cmsPolicyStr = beanProperties->getRequiredString("cmsPolicy"); + + _isSigningEnforced = beanProperties->getRequiredBool("isSigningEnforced"); + _isEncryptionEnforced = beanProperties->getRequiredBool("isEncryptionEnforced"); + + _workingDirectory = AppConfigUtils::getRequiredString("communication_amqp", + _sConfigWorkingDir); + + _isInitialized = true; +} + +std::string CCmsMessageTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CCmsMessageTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +SmartPtrIIntMessage CCmsMessageTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + SmartPtrCCafMessageHeaders cafMessageHeaders = + CCafMessageHeaders::create(message->getHeaders()); + const std::string msgFlow = cafMessageHeaders->getFlowDirection(); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + SmartPtrCCmsMessage cmsMessage; + cmsMessage.CreateInstance(); + cmsMessage->initialize( + BasePlatform::UuidToString(payloadEnvelope->getClientId()), + payloadEnvelope->getPmeId()); + + SmartPtrCCmsMessageAttachments cmsMessageAttachments; + cmsMessageAttachments.CreateInstance(); + cmsMessageAttachments->initialize(cmsMessage); + + SmartPtrIIntMessage rc; + if (msgFlow.compare("OUTGOING") == 0) { + rc = createOutgoingPayload(message->getHeaders(), payloadEnvelope, cmsMessageAttachments); + } else if (msgFlow.compare("INCOMING") == 0) { + rc = createIncomingPayload(message->getHeaders(), payloadEnvelope, cmsMessageAttachments); + } else { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Invalid msgflow header value: %s", msgFlow.c_str()); + } + + return rc; +} + +SmartPtrIIntMessage CCmsMessageTransformerInstance::createOutgoingPayload( + const IIntMessage::SmartPtrCHeaders& headers, + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrCCmsMessageAttachments& cmsMessageAttachments) const { + CAF_CM_FUNCNAME_VALIDATE("createOutgoingPayload"); + CAF_CM_VALIDATE_SMARTPTR(headers); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + CAF_CM_VALIDATE_SMARTPTR(cmsMessageAttachments); + + const std::deque attachmentCollection = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + const std::deque attachmentCollectionCms = + cmsMessageAttachments->encryptAndSignAttachments(attachmentCollection); + + return CCafMessageCreator::createPayloadEnvelope( + payloadEnvelope, attachmentCollectionCms, headers); +} + +SmartPtrIIntMessage CCmsMessageTransformerInstance::createIncomingPayload( + const IIntMessage::SmartPtrCHeaders& headers, + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrCCmsMessageAttachments& cmsMessageAttachments) const { + CAF_CM_FUNCNAME_VALIDATE("createIncomingPayload"); + CAF_CM_VALIDATE_SMARTPTR(headers); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + CAF_CM_VALIDATE_SMARTPTR(cmsMessageAttachments); + + // Get the attachment collection out of the payload. + const std::deque attachmentCollectionCms = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + + // Make sure the attachments meet the minimum security bar. + cmsMessageAttachments->enforceSecurityOnAttachments(attachmentCollectionCms, + _isSigningEnforced, _isEncryptionEnforced); + + // Decrypt/verify the attachments. + const std::deque attachmentCollection = + cmsMessageAttachments->decryptAndVerifyAttachments(attachmentCollectionCms); + + return CCafMessageCreator::createPayloadEnvelope( + payloadEnvelope, attachmentCollection, headers); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.h new file mode 100644 index 000000000..293f424c3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageTransformerInstance.h @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCmsMessageTransformerInstance_h_ +#define CCmsMessageTransformerInstance_h_ + +#include + +#include "CCmsMessageAttachments.h" +#include "Common/IAppContext.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" + +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CCmsMessageTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CCmsMessageTransformerInstance(); + virtual ~CCmsMessageTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationCmsMessageTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CCmsMessageTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrIIntMessage createOutgoingPayload( + const IIntMessage::SmartPtrCHeaders& headers, + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrCCmsMessageAttachments& cmsMessageAttachments) const; + + SmartPtrIIntMessage createIncomingPayload( + const IIntMessage::SmartPtrCHeaders& headers, + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrCCmsMessageAttachments& cmsMessageAttachments) const; + +private: + bool _isInitialized; + std::string _id; + + std::string _workingDirectory; + bool _isSigningEnforced; + bool _isEncryptionEnforced; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CCmsMessageTransformerInstance); +}; + +} + +#endif // #ifndef CCmsMessageTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.cpp new file mode 100644 index 000000000..5eaf92ee8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.cpp @@ -0,0 +1,361 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Exception/CCafException.h" +#include "CCmsMessageUtils.h" + +using namespace Caf; + +BIO* CCmsMessageUtils::inputBufferToBio( + const SmartPtrCDynamicByteArray& inputBuffer) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "inputBufferToBio"); + CAF_CM_VALIDATE_SMARTPTR(inputBuffer); + + BIO* rc = BIO_new_mem_buf( + inputBuffer->getNonConstPtr(), static_cast(inputBuffer->getByteCount())); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "BIO_new_mem_buf Failed"); + } + + return rc; +} + +std::deque CCmsMessageUtils::inputFilesToBio( + const Cdeqstr& inputFileCollection) { + CAF_CM_STATIC_FUNC_VALIDATE("CCmsMessageUtils", "inputFilesToBio"); + CAF_CM_VALIDATE_STL(inputFileCollection); + + std::deque rc; + for (TConstIterator elemIter(inputFileCollection); elemIter; elemIter++) { + const std::string elem = *elemIter; + rc.push_back(inputFileToBio(elem)); + } + + return rc; +} + +BIO* CCmsMessageUtils::inputFileToBio( + const std::string& inputFile) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "inputFileToBio"); + CAF_CM_VALIDATE_STRING(inputFile); + + BIO* rc = BIO_new_file(inputFile.c_str(), "r"); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA1(E_FAIL, + "BIO_new_file Failed - %s", inputFile.c_str()); + } + + return rc; +} + +BIO* CCmsMessageUtils::inputToBio( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "inputToBio"); + + BIO* rc = NULL; + if (! inputBuffer.IsNull()) { + rc = inputBufferToBio(inputBuffer); + } else if (! inputPath.empty()) { + rc = inputFileToBio(inputPath); + } else { + CAF_CM_EXCEPTION_VA0(E_FAIL, "Must provide buffer or filename"); + } + + return rc; +} + +BIO* CCmsMessageUtils::outputPathToBio( + const std::string& outputPath) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "outputPathToBio"); + CAF_CM_VALIDATE_STRING(outputPath); + + BIO* rc = BIO_new_file(outputPath.c_str(), "w"); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA1(E_FAIL, + "BIO_new_file Failed - %s", outputPath.c_str()); + } + + return rc; +} + +BIO* CCmsMessageUtils::outputToBio( + const SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "outputToBio"); + + BIO* rc = NULL; + if (! outputBuffer.IsNull()) { + rc = createWriteBio(); + } else if (! outputPath.empty()) { + rc = outputPathToBio(outputPath); + } else { + CAF_CM_EXCEPTION_VA0(E_FAIL, "Must provide buffer or filename"); + } + + return rc; +} + +void CCmsMessageUtils::bioToOutput( + BIO* bio, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "bioToOutput"); + CAF_CM_VALIDATE_PTR(bio); + + if (! outputBuffer.IsNull()) { + bioToOutputBuffer(bio, outputBuffer); + } else if (! outputPath.empty()) { + bioToOutputFile(bio, outputPath); + } else { + CAF_CM_EXCEPTION_VA0(E_FAIL, "Must provide buffer or filename"); + } +} + +void CCmsMessageUtils::bioToOutputBuffer( + BIO* bio, + SmartPtrCDynamicByteArray& outputBuffer) { + CAF_CM_STATIC_FUNC_VALIDATE("CCmsMessageUtils", "bioToOutputBuffer"); + CAF_CM_VALIDATE_PTR(bio); + + BUF_MEM* bptr = NULL; + BIO_get_mem_ptr(bio, &bptr); + + // Casting to void to ignore return value and eliminate compiler warning + (void) BIO_set_close(bio, BIO_NOCLOSE); /* So BIO_free() leaves BUF_MEM alone */ + + outputBuffer.CreateInstance(); + outputBuffer->allocateBytes(bptr->length); + outputBuffer->memCpy(bptr->data, bptr->length); +} + +void CCmsMessageUtils::bioToOutputFile( + BIO* bio, + const std::string& outputPath) { + CAF_CM_STATIC_FUNC_VALIDATE("CCmsMessageUtils", "bioToOutputFile"); + CAF_CM_VALIDATE_PTR(bio); + CAF_CM_VALIDATE_STRING(outputPath); +} + +std::deque CCmsMessageUtils::biosToX509( + std::deque bioCollection) { + CAF_CM_STATIC_FUNC_VALIDATE("CCmsMessageUtils", "biosToX509"); + CAF_CM_VALIDATE_STL(bioCollection); + + std::deque rc; + for (TConstIterator > elemIter(bioCollection); elemIter; elemIter++) { + BIO* elem = *elemIter; + rc.push_back(bioToX509(elem)); + } + + return rc; +} + +X509* CCmsMessageUtils::bioToX509( + BIO* bio) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "bioToX509"); + CAF_CM_VALIDATE_PTR(bio); + + X509* rc = PEM_read_bio_X509(bio, NULL, 0, NULL); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "PEM_read_bio_X509 Failed"); + } + + return rc; +} + +EVP_PKEY* CCmsMessageUtils::bioToPrivateKey( + BIO* bio) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "bioToPrivateKey"); + CAF_CM_VALIDATE_PTR(bio); + + EVP_PKEY* rc = PEM_read_bio_PrivateKey(bio, NULL, 0, NULL); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "PEM_read_bio_PrivateKey Failed"); + } + + return rc; +} + +const SSL_METHOD* CCmsMessageUtils::protocolToSslMethod( + const std::string& protocol) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "protocolToSslMethod"); + CAF_CM_VALIDATE_STRING(protocol); + + const SSL_METHOD* rc; + if (protocol.compare("TLSv1_2") == 0) { + rc = TLSv1_2_method(); + } else { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Unknown protocol - %s", protocol.c_str()); + } + + return rc; +} + +BIO* CCmsMessageUtils::createWriteBio() { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "createWriteBio"); + + BIO* rc = BIO_new(BIO_s_mem()); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "BIO_new Failed"); + } + + return rc; +} + +STACK_OF(X509)* CCmsMessageUtils::createX509Stack( + X509* x509, + X509* x5091, + X509* x5092) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "createX509Stack"); + CAF_CM_VALIDATE_PTR(x509); + + /* Create recipient STACK and add recipient cert to it */ + STACK_OF(X509)* rc = sk_X509_new_null(); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "sk_X509_new_nuss Failed"); + } + + if (!sk_X509_push(rc, x509)) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "sk_X509_push Failed"); + } + + if (x5091) { + if (!sk_X509_push(rc, x5091)) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "sk_X509_push Failed"); + } + } + + if (x5092) { + if (!sk_X509_push(rc, x5092)) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "sk_X509_push Failed"); + } + } + + return rc; +} + +X509_STORE* CCmsMessageUtils::createX509Store( + std::deque x509Collection) { + CAF_CM_STATIC_FUNC("CCmsMessageUtils", "createX509Store"); + CAF_CM_VALIDATE_STL(x509Collection); + + X509_STORE* rc = X509_STORE_new(); + if (! rc) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "X509_STORE_new Failed"); + } + + for (TConstIterator > elemIter(x509Collection); elemIter; elemIter++) { + X509* elem = *elemIter; + if (!X509_STORE_add_cert(rc, elem)) { + logSslErrors(); + CAF_CM_EXCEPTION_VA0(E_FAIL, "X509_STORE_add_cert Failed"); + } + } + + return rc; +} + +void CCmsMessageUtils::free( + CMS_ContentInfo* contentInfo) { + if (contentInfo) { + CMS_ContentInfo_free(contentInfo); + } +} + +void CCmsMessageUtils::free( + std::deque x509Collection) { + for (TConstIterator > elemIter(x509Collection); elemIter; elemIter++) { + X509* elem = *elemIter; + free(elem); + } +} + +void CCmsMessageUtils::free( + X509* x509) { + if (x509) { + X509_free(x509); + } +} + +void CCmsMessageUtils::free( + STACK_OF(X509)* x509Stack) { + if (x509Stack) { + sk_X509_pop_free(x509Stack, X509_free); + } +} + +void CCmsMessageUtils::free( + std::deque bioCollection) { + for (TConstIterator > elemIter(bioCollection); elemIter; elemIter++) { + BIO* elem = *elemIter; + free(elem); + } +} + +void CCmsMessageUtils::free( + BIO* bio) { + if (bio) { + BIO_vfree(bio); + } +} + +void CCmsMessageUtils::free( + X509_STORE* x509Store) { + if (x509Store) { + X509_STORE_free(x509Store); + } +} + +void CCmsMessageUtils::free( + EVP_PKEY* privateKey) { + if (privateKey) { + EVP_PKEY_free(privateKey); + } +} + +void CCmsMessageUtils::logSslErrors() { + CAF_CM_STATIC_FUNC_LOG_ONLY("CCmsMessageUtils", "logSslErrors"); + + int32 sslErrorCode = ERR_get_error(); + while (sslErrorCode != 0) { + const char* sslErrorStr = ERR_error_string(sslErrorCode, NULL); + CAF_CM_LOG_WARN_VA2("SSL Error - code: %d, str: %s", sslErrorCode, sslErrorStr); + sslErrorCode = ERR_get_error(); + } +} + +void CCmsMessageUtils::logCiphers( + const std::string& prefix, + const SSL* ssl) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CCmsMessageUtils", "logCiphers"); + CAF_CM_VALIDATE_STRING(prefix); + CAF_CM_VALIDATE_PTR(ssl); + + int32 index = 0; + const char* cipher = SSL_get_cipher_list(ssl, index); + while (cipher != NULL) { + CAF_CM_LOG_DEBUG_VA3( + "%s - index: %d, str: %s", prefix.c_str(), index, cipher); + cipher = SSL_get_cipher_list(ssl, index++); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.h new file mode 100644 index 000000000..b37e7e125 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CCmsMessageUtils.h @@ -0,0 +1,120 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCmsMessageUtil_h_ +#define CCmsMessageUtil_h_ + +#include + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include +#include +#include +#include +#include +#include +#include + +namespace Caf { + +class CCmsMessageUtils { +public: // Convert + static BIO* inputBufferToBio( + const SmartPtrCDynamicByteArray& inputBuffer); + + static std::deque inputFilesToBio( + const Cdeqstr& inputFileCollection); + + static BIO* inputFileToBio( + const std::string& inputFile); + + static BIO* inputToBio( + const SmartPtrCDynamicByteArray& inputBuffer, + const std::string& inputPath); + + static BIO* outputPathToBio( + const std::string& outputPath); + + static BIO* outputToBio( + const SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath); + + static void bioToOutput( + BIO* bio, + SmartPtrCDynamicByteArray& outputBuffer, + const std::string& outputPath); + + static void bioToOutputBuffer( + BIO* bio, + SmartPtrCDynamicByteArray& outputBuffer); + + static void bioToOutputFile( + BIO* bio, + const std::string& outputPath); + + static std::deque biosToX509( + std::deque bioCollection); + + static X509* bioToX509( + BIO* bio); + + static EVP_PKEY* bioToPrivateKey( + BIO* bio); + + static const SSL_METHOD* protocolToSslMethod( + const std::string& protocol); + +public: // Create + static BIO* createWriteBio(); + + static STACK_OF(X509)* createX509Stack( + X509* x509, + X509* x5091 = NULL, + X509* x5092 = NULL); + + static X509_STORE* createX509Store( + std::deque x509Collection); + +public: // Free + static void free( + CMS_ContentInfo* contentInfo); + + static void free( + X509* x509); + + static void free( + std::deque x509Collection); + + static void free( + STACK_OF(X509)* x509Stack); + + static void free( + BIO* bio); + + static void free( + std::deque bioCollection); + + static void free( + X509_STORE* x509Store); + + static void free( + EVP_PKEY* privateKey); + +public: // Log + static void logSslErrors(); + + static void logCiphers( + const std::string& prefix, + const SSL* ssl); + +private: + CAF_CM_DECLARE_NOCREATE(CCmsMessageUtils); +}; + +} + +#endif // #ifndef CCmsMessageUtil_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.cpp new file mode 100644 index 000000000..dd543d98e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.cpp @@ -0,0 +1,92 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Caf/CCafMessagePayload.h" +#include "Doc/ResponseDoc/CEventKeyDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "IVariant.h" +#include "Integration/IIntMessage.h" +#include "Common/CCafRegex.h" +#include "Exception/CCafException.h" +#include "CEventTopicCalculatorInstance.h" + +using namespace Caf; + +CEventTopicCalculatorInstance::CEventTopicCalculatorInstance() : + _isInitialized(false), + CAF_CM_INIT("CEventTopicCalculatorInstance") { + CAF_CM_INIT_THREADSAFE; +} + +CEventTopicCalculatorInstance::~CEventTopicCalculatorInstance() { +} + +void CEventTopicCalculatorInstance::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +void CEventTopicCalculatorInstance::terminateBean() { +} + +SmartPtrIVariant CEventTopicCalculatorInstance::invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("invokeEspression"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(!methodParams.size()); + SmartPtrIVariant result; + + if (methodName == "getTopic") { + result = getTopic(message); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchMethodException, + 0, + "Method '%s' is not supported by this invoker", + methodName.c_str()); + } + return result; +} + +SmartPtrIVariant CEventTopicCalculatorInstance::getTopic( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("getTopic"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCCafMessagePayload cafMessagePayload = + CCafMessagePayload::create(message->getPayload()); + + const SmartPtrCManifestDoc manifest = cafMessagePayload->getManifest(); + + const std::deque eventKeyCollection = + cafMessagePayload->getEventKeyCollection(); + + CCafRegex replaceDots; + replaceDots.initialize("\\."); + + std::stringstream topicBld; + topicBld << "caf.event." + << replaceDots.replaceLiteral(manifest->getClassName(), "_") + << '.' + << replaceDots.replaceLiteral(manifest->getClassNamespace(), "_") + << '.' + << replaceDots.replaceLiteral(manifest->getClassVersion(), "_"); + for (TConstIterator > key(eventKeyCollection); key; key++) { + const SmartPtrCEventKeyDoc eventKey = *key; + topicBld << '.' << replaceDots.replaceLiteral(eventKey->getValue(), "_"); + } + + return CVariant::createString(topicBld.str()); +} + diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.h new file mode 100644 index 000000000..7cf443614 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CEventTopicCalculatorInstance.h @@ -0,0 +1,61 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CEventTopicCalculatorInstance_h +#define CEventTopicCalculatorInstance_h + + +#include "IBean.h" + +#include "IVariant.h" +#include "Integration/IIntMessage.h" +#include "Integration/IExpressionInvoker.h" + +namespace Caf { + +class CEventTopicCalculatorInstance : + public TCafSubSystemObjectRoot, + public IBean, + public IExpressionInvoker { +public: + CEventTopicCalculatorInstance(); + virtual ~CEventTopicCalculatorInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationEventTopicCalculator) + + CAF_BEGIN_INTERFACE_MAP(CEventTopicCalculatorInstance) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IExpressionInvoker) + CAF_END_INTERFACE_MAP() + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // IExpressionInvoker + SmartPtrIVariant invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message); + +private: + SmartPtrIVariant getTopic( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CEventTopicCalculatorInstance); +}; + +} + +#endif /* CEventTopicCalculatorInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.cpp new file mode 100644 index 000000000..b704745a5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.cpp @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CIncomingMessageHandler.h" + +using namespace Caf; + +CIncomingMessageHandler::CIncomingMessageHandler() : + _isInitialized(false), + CAF_CM_INIT("CIncomingMessageHandler") { +} + +CIncomingMessageHandler::~CIncomingMessageHandler() { +} + +void CIncomingMessageHandler::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); +} + +void CIncomingMessageHandler::terminateBean() { +} + +void CIncomingMessageHandler::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +bool CIncomingMessageHandler::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + return false; +} + +SmartPtrIIntegrationObject CIncomingMessageHandler::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + rc.CreateInstance(_sObjIdCommIntegrationIncomingMessageHandlerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.h new file mode 100644 index 000000000..5e1318ddf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandler.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CIncomingMessageHandler_h_ +#define CIncomingMessageHandler_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CIncomingMessageHandler : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CIncomingMessageHandler(); + virtual ~CIncomingMessageHandler(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationIncomingMessageHandler) + + CAF_BEGIN_INTERFACE_MAP(CIncomingMessageHandler) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CIncomingMessageHandler); +}; + +} + +#endif // #ifndef CIncomingMessageHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.cpp new file mode 100644 index 000000000..d08f50f87 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.cpp @@ -0,0 +1,261 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Caf/CCafMessageHeadersWriter.h" +#include "CMessagePartDescriptor.h" +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "CIncomingMessageHandlerInstance.h" +#include "CMessagePartsHeader.h" +#include "Integration/Core/MessageHeaders.h" +#include "Integration/Caf/CCafMessageCreator.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" +#include "Integration/Caf/CCafMessagePayload.h" +#include "Integration/Core/CMessageHeaderUtils.h" + +using namespace Caf; + +CIncomingMessageHandlerInstance::CIncomingMessageHandlerInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CIncomingMessageHandlerInstance") { +} + +CIncomingMessageHandlerInstance::~CIncomingMessageHandlerInstance() { +} + +void CIncomingMessageHandlerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + _id = configSection->findRequiredAttribute("id"); + _isInitialized = true; +} + +std::string CIncomingMessageHandlerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _id; +} + +void CIncomingMessageHandlerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); +} + +SmartPtrIIntMessage CIncomingMessageHandlerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + SmartPtrIIntMessage newMessage = handleMessage(message); + + return newMessage; +} +/** + * Processes an incoming message + *

+ * Pre-processes an incoming message and:
+ * (1) determines if it is a duplicate message
+ * (2) determines if it is a stand-alone message or part of a larger message + * (chunking)
+ * (3) enhances the message headers with internal information
+ * (4) caches the message's replyTo information
+ *

+ * This method will return null if the message cannot be processed as + * is. This is the case if the message is a chunk of a larger message. When + * all of the chunks are assembled then the assembled message will be + * returned. + *

+ * This component interacts with the MessageDeliveryStateRecorder in the + * case of message receipts. If a message receipt needs to be generated, a + * record will be added to the MessageDeliveryStateRecorder which will + * produce and send the receipt. + *

+ * If the message is a duplicate it will be marked as such and returned so + * that logic in the context file can do something with it if desired. + * + * @param message incoming message + * @return the incoming message if it can be processed on its own or null if + * not + */ +SmartPtrIIntMessage CIncomingMessageHandlerInstance::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_STATIC_FUNC_VALIDATE("CIncomingMessageHandlerInstance", "handleMessage"); + CAF_CM_VALIDATE_INTERFACE(message); + + const std::string workingDir = + AppConfigUtils::getRequiredString("communication_amqp", _sConfigWorkingDir); + + CMessageHeaderUtils::log(message->getHeaders()); + + SmartPtrIIntMessage rc; + if (CMessageHeaderUtils::getBoolOpt( + message->getHeaders(), MessageHeaders::_sMULTIPART)) { + rc = getAssembledMessage(message, workingDir); + } else { + rc = message; + } + return rc; +} + +SmartPtrIIntMessage CIncomingMessageHandlerInstance::getAssembledMessage( + const SmartPtrIIntMessage& message, + const std::string& workingDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CIncomingMessageHandlerInstance", "getAssembledMessage"); + CAF_CM_VALIDATE_INTERFACE(message); + CAF_CM_VALIDATE_STRING(workingDir); + + const std::string correlationId = processMessage(message, workingDir); + + const std::string messageDir = FileSystemUtils::buildPath( + workingDir, correlationId); + const std::string manifestFile = FileSystemUtils::buildPath(messageDir, "0.part"); + CAF_CM_LOG_DEBUG_VA1("Reconstructing manifest - %s", manifestFile.c_str()); + + const SmartPtrCDynamicByteArray payload = + CCafMessagePayload::createBufferFromFile(manifestFile); + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(payload); + + const std::deque attachmentDocs = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + + // refactor the local attachments to point to the transferred + // attachments + std::deque refactoredAttachments; + if (!attachmentDocs.empty()) { + if (!attachmentDocs.empty()) { + CAF_CM_LOG_DEBUG_VA2( + "Refactoring attachments - correlationId: %s, numAttachments: %d", + correlationId.c_str(), attachmentDocs.size()); + for (TConstIterator > attachmentIter(attachmentDocs); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + const std::string attachmentName = attachment->getName(); + const std::string attachmentUri = attachment->getUri(); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachmentUri, uriRecord); + + CAF_CM_LOG_DEBUG_VA3("Parsed URI - Uri: %s, protocol: %s, address: %s", + attachmentUri.c_str(), uriRecord.protocol.c_str(), + uriRecord.address.c_str()); + + if(uriRecord.protocol.compare("attachment") == 0) { + const std::string uriPath = uriRecord.address; + const std::string::size_type slashPos = uriPath.find('/'); + const std::string attNumStr = uriPath.substr(slashPos + 1); + + const std::string attFile = FileSystemUtils::buildPath( + messageDir, attNumStr + ".part"); + const std::string attUri = UriUtils::appendParameters( + attFile, uriRecord.parameters); + + SmartPtrCAttachmentDoc refactoredAttachment; + refactoredAttachment.CreateInstance(); + refactoredAttachment->initialize(attachment->getName(), + attachment->getType(), "file:///" + attUri, false, + attachment->getCmsPolicy()); + refactoredAttachments.push_back(refactoredAttachment); + + CAF_CM_LOG_DEBUG_VA3( + "Adding refactored attachment - name: %s, type: %s, uri: %s", + refactoredAttachment->getName().c_str(), + refactoredAttachment->getType().c_str(), + refactoredAttachment->getUri().c_str()); + } else { + refactoredAttachments.push_back(attachment); + } + } + } + } + + SmartPtrIIntMessage newMessage; + if (refactoredAttachments.empty()) { + newMessage = CCafMessageCreator::create( + payload, refactoredAttachments, message->getHeaders()); + } else { + const SmartPtrCCafMessageHeadersWriter cafMessageHeadersWriter = + CCafMessageHeadersWriter::create(); + cafMessageHeadersWriter->insertString( + MessageHeaders::_sMULTIPART_WORKING_DIR, messageDir); + + newMessage = CCafMessageCreator::createPayloadEnvelope( + payloadEnvelope, refactoredAttachments, + cafMessageHeadersWriter->getHeaders(), message->getHeaders()); + } + + return newMessage; +} + +std::string CIncomingMessageHandlerInstance::processMessage( + const SmartPtrIIntMessage& message, + const std::string& workingDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CIncomingMessageHandlerInstance", "processMessage"); + CAF_CM_VALIDATE_INTERFACE(message); + CAF_CM_VALIDATE_STRING(workingDir); + + SmartPtrCDynamicByteArray payload = message->getPayload(); + payload->resetCurrentPos(); + + CAF_CM_LOG_DEBUG_VA1("Processing payload - byteCount: %d", + payload->getByteCount()); + + const std::string payloadPath = FileSystemUtils::buildPath(FileSystemUtils::getTmpDir(), "payload.out"); + FileSystemUtils::saveByteFile(payloadPath, payload->getPtr(), payload->getByteCount()); + + SmartPtrCMessagePartsHeader header = + CMessagePartsHeader::fromByteBuffer(payload); + CAF_CM_LOG_DEBUG_VA3( + "Processing message parts - version: %d, correlationId: %s, numberOfParts: %d", + CMessagePartsHeader::CAF_MSG_VERSION, header->getCorrelationIdStr().c_str(), + header->getNumberOfParts()); + + const std::string messageDir = FileSystemUtils::buildPath( + workingDir, header->getCorrelationIdStr()); + if (!FileSystemUtils::doesFileExist(messageDir)) { + CAF_CM_LOG_DEBUG_VA1("Creating directory - %s", messageDir.c_str()); + FileSystemUtils::createDirectory(messageDir); + } + + while (payload->getByteCountFromCurrentPos() > 0) { + SmartPtrCMessagePartDescriptor partDescriptor = CMessagePartDescriptor::fromByteBuffer(payload); + CAF_CM_LOG_DEBUG_VA5( + "Processing message parts descriptor - version: %d, attachmentNumber: %d, partNumber: %d, dataSize: %d, dataOffset: %d", + CMessagePartDescriptor::CAF_MSG_VERSION, partDescriptor->getAttachmentNumber(), + partDescriptor->getPartNumber(), partDescriptor->getDataSize(), partDescriptor->getDataOffset()); + + const std::string attachmentFile = FileSystemUtils::buildPath( + messageDir, partDescriptor->getAttachmentNumberStr() + ".part"); + + SmartPtrCDynamicByteArray partBuffer; + partBuffer.CreateInstance(); + partBuffer->allocateBytes(partDescriptor->getDataSize()); + partBuffer->memCpy(payload->getPtrAtCurrentPos(), partDescriptor->getDataSize()); + partBuffer->incrementCurrentPos(static_cast(partDescriptor->getDataOffset())); + + payload->incrementCurrentPos(partDescriptor->getDataSize()); + + FileSystemUtils::saveByteFile(attachmentFile, partBuffer->getPtrAtCurrentPos(), partBuffer->getByteCountFromCurrentPos()); + } + + return header->getCorrelationIdStr(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.h new file mode 100644 index 000000000..89f101401 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CIncomingMessageHandlerInstance.h @@ -0,0 +1,82 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CIncomingMessageHandlerInstance_h +#define CIncomingMessageHandlerInstance_h + + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CIncomingMessageHandlerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CIncomingMessageHandlerInstance(); + virtual ~CIncomingMessageHandlerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationIncomingMessageHandlerInstance) + + CAF_BEGIN_INTERFACE_MAP(CIncomingMessageHandlerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + static SmartPtrIIntMessage handleMessage( + const SmartPtrIIntMessage& message); + + static SmartPtrIIntMessage getAssembledMessage( + const SmartPtrIIntMessage& message, + const std::string& workingDir); + + static std::string processMessage( + const SmartPtrIIntMessage& message, + const std::string& workingDir); + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CIncomingMessageHandlerInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CIncomingMessageHandlerInstance); +} + +#endif /* CIncomingMessageHandlerInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessageDeliveryRecord.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessageDeliveryRecord.cpp new file mode 100644 index 000000000..305f7d86e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessageDeliveryRecord.cpp @@ -0,0 +1,85 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CMessagePartDescriptorSourceRecord.h" +#include "Integration/IIntMessage.h" +#include "CMessageDeliveryRecord.h" + +using namespace Caf; + +CMessageDeliveryRecord::CMessageDeliveryRecord() : + _isInitialized(false), + _correlationId(CAFCOMMON_GUID_NULL), + _numberOfParts(0), + _startingPartNumber(0), + CAF_CM_INIT("CMessageDeliveryRecord") { +} + +CMessageDeliveryRecord::~CMessageDeliveryRecord() { +} + +void CMessageDeliveryRecord::initialize( + const UUID& correlationId, + const uint32 numberOfParts, + const uint32 startingPartNumber, + const std::deque& messagePartSources, + const IIntMessage::SmartPtrCHeaders& messageHeaders) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _correlationId = correlationId; + _numberOfParts = numberOfParts; + _startingPartNumber = startingPartNumber; + _messagePartSources = messagePartSources; + _messageHeaders = messageHeaders; + + _isInitialized = true; +} + +UUID CMessageDeliveryRecord::getCorrelationId() const { + CAF_CM_FUNCNAME_VALIDATE("getCorrelationId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _correlationId; +} + +std::string CMessageDeliveryRecord::getCorrelationIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getCorrelationId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return BasePlatform::UuidToString(_correlationId); +} + +uint32 CMessageDeliveryRecord::getNumberOfParts() const { + CAF_CM_FUNCNAME_VALIDATE("getNumberOfParts"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _numberOfParts; +} + +uint32 CMessageDeliveryRecord::getStartingPartNumber() const { + CAF_CM_FUNCNAME_VALIDATE("getStartingPartNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _startingPartNumber; +} + +std::deque CMessageDeliveryRecord::getMessagePartSources() const { + CAF_CM_FUNCNAME_VALIDATE("getMessagePartSources"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _messagePartSources; +} + +IIntMessage::SmartPtrCHeaders CMessageDeliveryRecord::getMessageHeaders() const { + CAF_CM_FUNCNAME_VALIDATE("getMessageHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _messageHeaders; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptor.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptor.cpp new file mode 100644 index 000000000..b869246e4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptor.cpp @@ -0,0 +1,172 @@ +/* Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "CMessagePartDescriptor.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +/** + * Converts the BLOCK_SIZE data in a ByteBuffer into a MessagePartsDescriptor + *

+ * The incoming ByteBuffer position will be modified. + * @param buffer ByteBuffer to convert + * @return a MessagePartsDescriptor + */ +SmartPtrCMessagePartDescriptor CMessagePartDescriptor::fromByteBuffer( + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC("CMessagePartDescriptor", "fromByteBuffer"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + if (buffer->getByteCountFromCurrentPos() < BLOCK_SIZE) { + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, + "Input data block is too small - rem: %d, tot: %d", + buffer->getByteCountFromCurrentPos(), buffer->getByteCount()); + } + + SmartPtrCDynamicByteArray data; + data.CreateInstance(); + data->allocateBytes(BLOCK_SIZE); + data->memCpy(buffer->getPtrAtCurrentPos(), BLOCK_SIZE); + + buffer->incrementCurrentPos(BLOCK_SIZE); + return fromArray(data); +} + +/** + * Converts a byte array into a MessagePartsDescriptor + * @param blockData byte array to convert + * @return a MessagePartsDescriptor + */ +SmartPtrCMessagePartDescriptor CMessagePartDescriptor::fromArray( + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC("CMessagePartDescriptor", "fromArray"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + if (buffer->getByteCount() < BLOCK_SIZE) { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "Input data block is too small - %d", + buffer->getByteCount()); + } + + if (CMessagePartsParser::getByte(buffer) != CAF_MSG_VERSION) { + CAF_CM_EXCEPTION_VA0(E_INVALIDARG, "Input data block version is incorrect"); + } + + const byte resvd = CMessagePartsParser::getByte(buffer); + if (resvd != RESERVED) { + CAF_CM_EXCEPTION_VA0(E_INVALIDARG, "Input data block reserved bits are incorrect"); + } + + const uint16 attachmentNumber = CMessagePartsParser::getUint16(buffer); + const uint32 partNumber = CMessagePartsParser::getUint32(buffer); + const uint32 dataSize = CMessagePartsParser::getUint32(buffer); + const uint32 dataOffset = CMessagePartsParser::getUint32(buffer); + buffer->verify(); + + SmartPtrCMessagePartDescriptor messagePartsDescriptor; + messagePartsDescriptor.CreateInstance(); + messagePartsDescriptor->initialize( + attachmentNumber, partNumber, dataSize, dataOffset); + + return messagePartsDescriptor; +} + +SmartPtrCDynamicByteArray CMessagePartDescriptor::toArray( + const uint16 attachmentNumber, + const uint32 partNumber, + const uint32 dataSize, + const uint32 dataOffset) { + SmartPtrCDynamicByteArray buffer; + buffer.CreateInstance(); + buffer->allocateBytes(BLOCK_SIZE); + + CMessagePartsBuilder::put(CAF_MSG_VERSION, buffer); + CMessagePartsBuilder::put(RESERVED, buffer); + CMessagePartsBuilder::put(attachmentNumber, buffer); + CMessagePartsBuilder::put(partNumber, buffer); + CMessagePartsBuilder::put(dataSize, buffer); + CMessagePartsBuilder::put(dataOffset, buffer); + buffer->verify(); + + return buffer; +} + +CMessagePartDescriptor::CMessagePartDescriptor() : + _isInitialized(false), + _attachmentNumber(0), + _partNumber(0), + _dataSize(0), + _dataOffset(0), + CAF_CM_INIT("CMessagePartDescriptor") { +} + +CMessagePartDescriptor::~CMessagePartDescriptor() { +} + +void CMessagePartDescriptor::initialize( + const uint16 attachmentNumber, + const uint32 partNumber, + const uint32 dataSize, + const uint32 dataOffset) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + this->_attachmentNumber = attachmentNumber; + this->_partNumber = partNumber; + this->_dataSize = dataSize; + this->_dataOffset = dataOffset; + _isInitialized = true; +} + +/** + * @return the attachmentNumber + */ +uint16 CMessagePartDescriptor::getAttachmentNumber() const { + CAF_CM_FUNCNAME_VALIDATE("getAttachmentNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _attachmentNumber; +} + +std::string CMessagePartDescriptor::getAttachmentNumberStr() const { + CAF_CM_FUNCNAME_VALIDATE("getAttachmentNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return CStringConv::toString(_attachmentNumber); +} + +/** + * @return the partNumber + */ +uint32 CMessagePartDescriptor::getPartNumber() const { + CAF_CM_FUNCNAME_VALIDATE("getPartNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _partNumber; +} + +/** + * @return the dataSize + */ +uint32 CMessagePartDescriptor::getDataSize() const { + CAF_CM_FUNCNAME_VALIDATE("getDataSize"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataSize; +} + +/** + * @return the dataOffset + */ +uint32 CMessagePartDescriptor::getDataOffset() const { + CAF_CM_FUNCNAME_VALIDATE("getDataOffset"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataOffset; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp new file mode 100644 index 000000000..c287225c1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.cpp @@ -0,0 +1,218 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CMessagePartDescriptorSourceRecord.h" +#include "CMessagePartRecord.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Exception/CCafException.h" +#include "CMessagePartDescriptorCalculator.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" +#include "Integration/Caf/CCafMessagePayload.h" +#include "Integration/Caf/CCafMessageCreator.h" + +using namespace Caf; + +uint32 CMessagePartDescriptorCalculator::getMaxPartSize() { + return AppConfigUtils::getRequiredUint32("communication_amqp", "max_part_size"); +} + +std::deque CMessagePartDescriptorCalculator::calculateSourcePartRecords( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartDescriptorCalculator", "calculateSourcePartRecords"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + const std::string workingDirectory = AppConfigUtils::getRequiredString("communication_amqp", + _sConfigWorkingDir); + + return refactorMessageIntoPartRecords(workingDirectory, payload); +} + +/* + * Parse the local file attachments and message body into records + * reflecting the full size of each part. + */ +std::deque CMessagePartDescriptorCalculator::refactorMessageIntoPartRecords( + const std::string& workingDirectory, + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_LOG("CMessagePartDescriptorCalculator", "refactorMessageIntoPartRecords"); + CAF_CM_VALIDATE_STRING(workingDirectory); + CAF_CM_VALIDATE_SMARTPTR(payload); + // attachmentCollectionDoc is optional + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(payload); + + const std::deque sourceAttachments = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + + // Scan the attachment collection and create part records for + // any local file attachments that need to be transmitted. + std::deque messageParts; + std::deque refactoredAttachments; + if (!sourceAttachments.empty()) { + int16 attachmentNumber = 1; + for (TConstIterator > sourceAttachmentIter(sourceAttachments); + sourceAttachmentIter; sourceAttachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *sourceAttachmentIter; + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachment->getUri(), uriRecord); + + if ((uriRecord.protocol.compare("file") == 0) && !attachment->getIsReference()) { + CAF_CM_LOG_DEBUG_VA1("Processing local file attachment - uri: %s", + attachment->getUri().c_str()); + + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + const std::string attachmentPath = fileUriRecord.path; + + if (!FileSystemUtils::doesFileExist(attachmentPath)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "File not found - %s", attachmentPath.c_str()); + } + + const int64 fileSize = FileSystemUtils::getFileSize(attachmentPath); + CAF_CM_LOG_DEBUG_VA2("Processing local file attachment - file: %s, size: %d", + attachmentPath.c_str(), fileSize); + + SmartPtrCMessagePartRecord messagePart; + messagePart.CreateInstance(); + messagePart->initialize(attachmentNumber, attachmentPath, 0, fileSize); + messageParts.push_back(messagePart); + + const std::string newAttachmentUri = UriUtils::appendParameters( + "attachment:/" + CStringConv::toString(attachmentNumber), + uriRecord.parameters); + + CAF_CM_LOG_DEBUG_VA1("New attachment URI - %s", newAttachmentUri.c_str()); + + SmartPtrCAttachmentDoc attachmentNew; + attachmentNew.CreateInstance(); + attachmentNew->initialize(attachment->getName(), attachment->getType(), + newAttachmentUri, attachment->getIsReference(), + attachment->getCmsPolicy()); + + refactoredAttachments.push_back(attachmentNew); + ++attachmentNumber; + } else { + refactoredAttachments.push_back(attachment); + } + } + } + + // If there are local file attachments to send then rebuild the message + // with the refactored attribute collection. + SmartPtrCDynamicByteArray payloadNew = payload; + if (!messageParts.empty()) { + payloadNew = CCafMessageCreator::createPayloadEnvelope( + payloadEnvelope, refactoredAttachments)->getPayload(); + } + + // Does the payload itself need to be split? + // If it is larger than max_part_size OR if there are transmitted attachments then 'yes' + const std::string newPayload = + CStringUtils::trim(CCafMessagePayload::saveToStr(payloadNew)); + if ((newPayload.length() > getMaxPartSize()) || ! messageParts.empty()) { + // Save the new payload to a file + const std::string requestIdStr = + BasePlatform::UuidToString(payloadEnvelope->getRequestId()); + const std::string payloadFileName = requestIdStr + "-payload.xml"; + const std::string payloadFile = FileSystemUtils::buildPath( + workingDirectory, payloadFileName); + FileSystemUtils::saveTextFile(payloadFile, newPayload); + + SmartPtrCMessagePartRecord messagePart; + messagePart.CreateInstance(); + messagePart->initialize(0, payloadFile, 0, newPayload.length()); + + messageParts.push_back(messagePart); + } + + // If there are MessagePartRecords then split them apart into + // MessagePartSourceRecords and return them else there is no + // splitting required. + if (!messageParts.empty()) { + return splitMessagePartRecords(messageParts); + } else { + return std::deque(); + } +} + +/* + * Split the message part records such that all parts will contain + * at most max_part_size bytes. + */ +std::deque CMessagePartDescriptorCalculator::splitMessagePartRecords( + std::deque& messageParts) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartDescriptorCalculator", "splitMessagePartRecords"); + CAF_CM_VALIDATE_STL(messageParts); + + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA0("Message part records"); + for (TConstIterator > messagePartIter(messageParts); + messagePartIter; messagePartIter++) { + const SmartPtrCMessagePartRecord messagePart = *messagePartIter; + CAF_CM_LOG_DEBUG_VA4( + "Message part - attachmentNumber: %d, filePath: %s, dataLength: %d, dataOffset: %d", + messagePart->getAttachmentNumber(), messagePart->getFilePath().c_str(), + messagePart->getDataLength(), messagePart->getDataOffset()); + } + } + + std::deque packedSourceRecords; + + uint64 currentPartSize = 0; + std::deque::iterator messagePartIter = messageParts.begin(); + while (messagePartIter != messageParts.end()) { + const SmartPtrCMessagePartRecord messagePart = *messagePartIter; + + const uint64 availablePartBytes = + messagePart->getDataLength() > LONG_MAX + ? LONG_MAX : messagePart->getDataLength(); + const uint64 fillBytes = MIN(getMaxPartSize() - currentPartSize, availablePartBytes); + + SmartPtrCMessagePartDescriptorSourceRecord sourceRecord; + sourceRecord.CreateInstance(); + sourceRecord->initialize(messagePart->getAttachmentNumber(), + messagePart->getFilePath(), static_cast(messagePart->getDataOffset()), static_cast(fillBytes)); + + packedSourceRecords.push_back(sourceRecord); + + currentPartSize += fillBytes; + messagePart->setDataOffset(messagePart->getDataOffset() + fillBytes); + messagePart->setDataLength(messagePart->getDataLength() - fillBytes); + if (messagePart->getDataLength() == 0) { + messagePartIter = messageParts.erase(messagePartIter); + } else { + ++messagePartIter; + } + + if (currentPartSize == getMaxPartSize()) { + currentPartSize = 0; + } + } + + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA0("Split message part descriptor source records"); + for (TConstIterator > packedSourceRecordIter(packedSourceRecords); + packedSourceRecordIter; packedSourceRecordIter++) { + const SmartPtrCMessagePartDescriptorSourceRecord packedSourceRecord = + *packedSourceRecordIter; + CAF_CM_LOG_DEBUG_VA4( + "Packed source - attachmentNumber: %d, filePath: %s, dataLength: %d, dataOffset: %d", + packedSourceRecord->getAttachmentNumber(), + packedSourceRecord->getFilePath().c_str(), + packedSourceRecord->getDataLength(), packedSourceRecord->getDataOffset()); + } + } + + return packedSourceRecords; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.h new file mode 100644 index 000000000..f98505aee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorCalculator.h @@ -0,0 +1,39 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessagePartDescriptorCalculator_h +#define CMessagePartDescriptorCalculator_h + + +#include "CMessagePartDescriptorSourceRecord.h" +#include "CMessagePartRecord.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +class CMessagePartDescriptorCalculator { +public: + static uint32 getMaxPartSize(); + + static std::deque calculateSourcePartRecords( + const SmartPtrCDynamicByteArray& payload); + +private: + static std::deque refactorMessageIntoPartRecords( + const std::string& workingDirectory, + const SmartPtrCDynamicByteArray& payload); + + static std::deque splitMessagePartRecords( + std::deque& messageParts); + +private: + CAF_CM_DECLARE_NOCREATE(CMessagePartDescriptorCalculator); +}; + +} + +#endif /* CMessagePartDescriptorCalculator_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.cpp new file mode 100644 index 000000000..8ae20a8d5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartDescriptorSourceRecord.cpp @@ -0,0 +1,65 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagePartDescriptorSourceRecord.h" + +using namespace Caf; + +CMessagePartDescriptorSourceRecord::CMessagePartDescriptorSourceRecord() : + _isInitialized(false), + _attachmentNumber(0), + _dataOffset(0), + _dataLength(0), + CAF_CM_INIT("CMessagePartDescriptorSourceRecord") { +} + +CMessagePartDescriptorSourceRecord::~CMessagePartDescriptorSourceRecord() { +} + +void CMessagePartDescriptorSourceRecord::initialize( + const uint16 attachmentNumber, + const std::string filePath, + const uint32 dataOffset, + const uint32 dataLength) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _attachmentNumber = attachmentNumber; + _filePath = filePath; + _dataOffset = dataOffset; + _dataLength = dataLength; + _isInitialized = true; +} + +uint16 CMessagePartDescriptorSourceRecord::getAttachmentNumber() const { + CAF_CM_FUNCNAME_VALIDATE("getAttachmentNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _attachmentNumber; +} + +std::string CMessagePartDescriptorSourceRecord::getFilePath() const { + CAF_CM_FUNCNAME_VALIDATE("getFilePath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _filePath; +} + +uint32 CMessagePartDescriptorSourceRecord::getDataOffset() const { + CAF_CM_FUNCNAME_VALIDATE("getDataOffset"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataOffset; +} + +uint32 CMessagePartDescriptorSourceRecord::getDataLength() const { + CAF_CM_FUNCNAME_VALIDATE("getDataLength"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataLength; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartRecord.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartRecord.cpp new file mode 100644 index 000000000..ab6fc505f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartRecord.cpp @@ -0,0 +1,93 @@ +/* + * Created on: Nov 26, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CMessagePartRecord.h" + +using namespace Caf; + +CMessagePartRecord::CMessagePartRecord() : + _isInitialized(false), + _attachmentNumber(0), + _dataOffset(0), + _dataLength(0), + CAF_CM_INIT("CMessagePartRecord") { +} + +CMessagePartRecord::~CMessagePartRecord() { +} + +void CMessagePartRecord::initialize( + const uint16 attachmentNumber, + const std::string filePath, + const uint64 dataOffset, + const uint64 dataLength) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _attachmentNumber = attachmentNumber; + _filePath = filePath; + _dataOffset = dataOffset; + _dataLength = dataLength; + _isInitialized = true; +} + +uint16 CMessagePartRecord::getAttachmentNumber() const { + CAF_CM_FUNCNAME_VALIDATE("getAttachmentNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _attachmentNumber; +} + +std::string CMessagePartRecord::getFilePath() const { + CAF_CM_FUNCNAME_VALIDATE("getFilePath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _filePath; +} + +uint64 CMessagePartRecord::getDataOffset() const { + CAF_CM_FUNCNAME_VALIDATE("getDataOffset"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataOffset; +} + +uint64 CMessagePartRecord::getDataLength() const { + CAF_CM_FUNCNAME_VALIDATE("getDataLength"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _dataLength; +} + +void CMessagePartRecord::setAttachmentNumber(const uint16 attachmentNumber) { + CAF_CM_FUNCNAME_VALIDATE("setAttachmentNumber"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _attachmentNumber = attachmentNumber; +} + +void CMessagePartRecord::setFilePath(const std::string& filePath) { + CAF_CM_FUNCNAME_VALIDATE("setFilePath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _filePath = filePath; +} + +void CMessagePartRecord::setDataOffset(const uint64 dataOffset) { + CAF_CM_FUNCNAME_VALIDATE("setDataOffset"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _dataOffset = dataOffset; +} + +void CMessagePartRecord::setDataLength(const uint64 dataLength) { + CAF_CM_FUNCNAME_VALIDATE("setDataLength"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _dataLength = dataLength; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.cpp new file mode 100644 index 000000000..6ba733e73 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.cpp @@ -0,0 +1,114 @@ +/* Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "CMessagePartsBuilder.h" + +using namespace Caf; + +void CMessagePartsBuilder::put( + const byte value, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "put(byte)"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + buffer->memAppend(&value, sizeof(value)); + +// CAF_CM_LOG_DEBUG_VA2("buffer - pos: %d, val: %02x", currentPos, value); +} + +void CMessagePartsBuilder::put( + const uint16 value, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "put(uint16)"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[2]; + buf[0] = value >> 8; + buf[1] = value >> 0; + putBytes(buf, 2, buffer); + +// CAF_CM_LOG_DEBUG_VA4("buffer - pos: %d, val: %04x, buf: %02x %02x", currentPos, value, buf[0], buf[1]); +} + +void CMessagePartsBuilder::put( + const uint32 value, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "put(uint32)"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[4]; + buf[0] = value >> 24; + buf[1] = value >> 16; + buf[2] = value >> 8; + buf[3] = value >> 0; + putBytes(buf, 4, buffer); + +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %08x, buf: %02x %02x %02x %02x", currentPos, value, buf[0], buf[1], buf[2], buf[3]); +} + +void CMessagePartsBuilder::put( + const uint64 value, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "put(uint64)"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[8]; +#ifdef WIN32 +#pragma warning(push) +#pragma warning(disable: 4244) +#endif + buf[0] = value >> 56; + buf[1] = value >> 48; + buf[2] = value >> 40; + buf[3] = value >> 32; + buf[4] = value >> 24; + buf[5] = value >> 16; + buf[6] = value >> 8; + buf[7] = value >> 0; +#ifdef WIN32 +#pragma warning(pop) +#endif + putBytes(buf, 8, buffer); + +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %016x, buf: %02x %02x %02x %02x", currentPos, value, buf[0], buf[1], buf[2], buf[3]); +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %016x, buf: %02x %02x %02x %02x", currentPos, value, buf[4], buf[5], buf[6], buf[7]); +} + +void CMessagePartsBuilder::put( + const UUID value, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "put(UUID)"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + put(static_cast(value.Data1), buffer); + put(static_cast(value.Data2), buffer); + put(static_cast(value.Data3), buffer); + putBytes(value.Data4, 8, buffer); +} + +void CMessagePartsBuilder::putBytes( + const byte* buf, + const uint32 bufLen, + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsBuilder", "putBytes"); + CAF_CM_VALIDATE_PTR(buf); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + for (uint32 index = 0; index < bufLen; index++) { + buffer->memAppend(&buf[index], sizeof(buf[index])); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.h new file mode 100644 index 000000000..2e801e27c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsBuilder.h @@ -0,0 +1,37 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessagePartsBuilder_h +#define CMessagePartsBuilder_h + + +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +/** + * Class that emits and parses message parts header blocks.
+ */ +class CMessagePartsBuilder { +public: + static void put(const byte value, SmartPtrCDynamicByteArray& buffer); + static void put(const uint16 value, SmartPtrCDynamicByteArray& buffer); + static void put(const uint32 value, SmartPtrCDynamicByteArray& buffer); + static void put(const uint64 value, SmartPtrCDynamicByteArray& buffer); + static void put(const GUID value, SmartPtrCDynamicByteArray& buffer); + +private: + static void putBytes(const byte* buf, const uint32 bufLen, + SmartPtrCDynamicByteArray& buffer); + +private: + CAF_CM_DECLARE_NOCREATE(CMessagePartsBuilder); +}; + +} + +#endif /* CMessagePartsBuilder_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsHeader.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsHeader.cpp new file mode 100644 index 000000000..1232fc024 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsHeader.cpp @@ -0,0 +1,154 @@ +/* Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "CMessagePartsHeader.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +/** + * Converts the BLOCK_SIZE data in a ByteBuffer into a MessagePartsHeader + *

+ * The incoming ByteBuffer position will be modified. + * @param buffer ByteBuffer to convert + * @return a MessagePartsHeader + */ +SmartPtrCMessagePartsHeader CMessagePartsHeader::fromByteBuffer( + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG("CMessagePartsHeader", "fromByteBuffer"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + if (buffer->getByteCountFromCurrentPos() < BLOCK_SIZE) { + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, + "Input data block is too small - rem: %d, tot: %d", + buffer->getByteCountFromCurrentPos(), buffer->getByteCount()); + } + + SmartPtrCDynamicByteArray data; + data.CreateInstance(); + data->allocateBytes(BLOCK_SIZE); + data->memCpy(buffer->getPtrAtCurrentPos(), BLOCK_SIZE); + + buffer->incrementCurrentPos(BLOCK_SIZE); + + return fromArray(data); +} + +/** + * Converts a byte array into a MessagePartsHeader + * @param blockData byte array to convert + * @return a MessagePartsHeader + */ +SmartPtrCMessagePartsHeader CMessagePartsHeader::fromArray( + SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG("CMessagePartsHeader", "fromArray"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + if (buffer->getByteCount() < BLOCK_SIZE) { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "Input data block is too small - %d", + buffer->getByteCount()); + } + + const int32 version = CMessagePartsParser::getByte(buffer); + if (version != CAF_MSG_VERSION) { + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, "Input data block version is incorrect: %d != %d", version, CAF_MSG_VERSION); + } + + const byte resvd1 = CMessagePartsParser::getByte(buffer); + const byte resvd2 = CMessagePartsParser::getByte(buffer); + const byte resvd3 = CMessagePartsParser::getByte(buffer); + if (resvd1 != RESERVED1 || resvd2 != RESERVED2 || resvd3 != RESERVED3) { + CAF_CM_EXCEPTION_VA0(E_INVALIDARG, "Input data block reserved bits are incorrect"); + } + + const UUID correlationId = CMessagePartsParser::getGuid(buffer); + const uint32 numberOfParts = CMessagePartsParser::getUint32(buffer); + buffer->verify(); + + SmartPtrCMessagePartsHeader messagePartsHeader; + messagePartsHeader.CreateInstance(); + messagePartsHeader->initialize(correlationId, numberOfParts); + + return messagePartsHeader; +} + +/** + * Create a byte array representation of a descriptor block + * @param correlationId the correlation id + * @param numberOfParts the number of message parts + * @return the byte array containing the encoded data + */ +SmartPtrCDynamicByteArray CMessagePartsHeader::toArray( + const UUID correlationId, + const uint32 numberOfParts) { + SmartPtrCDynamicByteArray buffer; + buffer.CreateInstance(); + buffer->allocateBytes(BLOCK_SIZE); + + CMessagePartsBuilder::put(CAF_MSG_VERSION, buffer); + CMessagePartsBuilder::put(RESERVED1, buffer); + CMessagePartsBuilder::put(RESERVED2, buffer); + CMessagePartsBuilder::put(RESERVED3, buffer); + CMessagePartsBuilder::put(correlationId, buffer); + CMessagePartsBuilder::put(numberOfParts, buffer); + buffer->verify(); + + return buffer; +} + +CMessagePartsHeader::CMessagePartsHeader() : + _isInitialized(false), + _correlationId(CAFCOMMON_GUID_NULL), + _numberOfParts(0), + CAF_CM_INIT("CMessagePartsHeader") { +} + +CMessagePartsHeader::~CMessagePartsHeader() { +} + +void CMessagePartsHeader::initialize( + const UUID correlationId, + const uint32 numberOfParts) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + this->_correlationId = correlationId; + this->_numberOfParts = numberOfParts; + _isInitialized = true; +} + +/** + * @return the correlationId + */ +UUID CMessagePartsHeader::getCorrelationId() const { + CAF_CM_FUNCNAME_VALIDATE("getCorrelationId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _correlationId; +} + +/** + * @return the correlationId + */ +std::string CMessagePartsHeader::getCorrelationIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getCorrelationId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return BasePlatform::UuidToString(_correlationId); +} + +/** + * @return the numberOfParts + */ +uint32 CMessagePartsHeader::getNumberOfParts() const { + CAF_CM_FUNCNAME_VALIDATE("getNumberOfParts"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _numberOfParts; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.cpp new file mode 100644 index 000000000..d8a80ae73 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.cpp @@ -0,0 +1,164 @@ +/* Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "CMessagePartsParser.h" + +using namespace Caf; + +byte CMessagePartsParser::getByte(SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartsParser", "getByte"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + const byte rc = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + +// CAF_CM_LOG_DEBUG_VA2("buffer - pos: %d, val: %02x", currentPos, rc); + + return rc; +} + +uint16 CMessagePartsParser::getUint16(SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartsParser", "getUint16"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[2]; + buf[0] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[1] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + + // Little and Big Endian + //const uint16 val = (buf[0]<<0) | (buf[1]<<8); + const uint16 val = (buf[0]<<8) | (buf[1]<<0); + +// CAF_CM_LOG_DEBUG_VA4("buffer - pos: %d, val: %04x, buf: %02x %02x", currentPos, val, buf[0], buf[1]); + + return val; +} + +uint32 CMessagePartsParser::getUint32(SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartsParser", "getUint32"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[4]; + buf[0] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[1] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[2] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[3] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + + // Little and Big Endian + //const uint32 val = (buf[0]<<0) | (buf[1]<<8) | (buf[2]<<16) | (buf[3]<<24); + const uint32 val = (buf[0]<<24) | (buf[1]<<16) | (buf[2]<<8) | (buf[3]<<0); + +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %08x, buf: %02x %02x %02x %02x", currentPos, val, buf[0], buf[1], buf[2], buf[3]); + + return val; +} + +uint64 CMessagePartsParser::getUint64(SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartsParser", "getUint64"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + byte buf[8]; + buf[0] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[1] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[2] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[3] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[4] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[5] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[6] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[7] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + + // Little and Big Endian +// const uint64 val = +// (buf[0]<<0) +// | (buf[1]<<8) +// | (buf[2]<<16) +// | (buf[3]<<24) +// | (static_cast(buf[4])<<32) +// | (static_cast(buf[5])<<40) +// | (static_cast(buf[6])<<48) +// | (static_cast(buf[7])<<56); + const uint64 val = + (static_cast(buf[0])<<56) + | (static_cast(buf[1])<<48) + | (static_cast(buf[2])<<40) + | (static_cast(buf[3])<<32) + | (buf[4]<<24) + | (buf[5]<<16) + | (buf[6]<<8) + | (buf[7]<<0); + +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %016x, buf: %02x %02x %02x %02x", currentPos, val, buf[0], buf[1], buf[2], buf[3]); +// CAF_CM_LOG_DEBUG_VA6("buffer - pos: %d, val: %016x, buf: %02x %02x %02x %02x", currentPos, val, buf[4], buf[5], buf[6], buf[7]); + + return val; +} + +UUID CMessagePartsParser::getGuid(SmartPtrCDynamicByteArray& buffer) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CMessagePartsParser", "getGuid"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + + UUID guid; + guid.Data1 = getUint32(buffer); + guid.Data2 = getUint16(buffer); + guid.Data3 = getUint16(buffer); + get8Bytes(buffer, guid.Data4); + + CAF_CM_LOG_DEBUG_VA1("guid - %s", BasePlatform::UuidToString(guid).c_str()); + + return guid; +} + +void CMessagePartsParser::get8Bytes(SmartPtrCDynamicByteArray& buffer, byte* buf) { + CAF_CM_STATIC_FUNC_VALIDATE("CMessagePartsParser", "get8Bytes"); + CAF_CM_VALIDATE_SMARTPTR(buffer); + +// const size_t currentPos = buffer->getByteCount() - buffer->getByteCountFromCurrentPos(); + + buf[0] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[1] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[2] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[3] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[4] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[5] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[6] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + buf[7] = buffer->getAtCurrentPos(); + buffer->incrementCurrentPos(1); + +// CAF_CM_LOG_DEBUG_VA5("buffer - pos: %d, buf: %02x %02x %02x %02x", currentPos, buf[0], buf[1], buf[2], buf[3]); +// CAF_CM_LOG_DEBUG_VA5("buffer - pos: %d, buf: %02x %02x %02x %02x", currentPos, buf[4], buf[5], buf[6], buf[7]); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.h new file mode 100644 index 000000000..91ef0b504 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CMessagePartsParser.h @@ -0,0 +1,34 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessagePartsParser_h +#define CMessagePartsParser_h + + +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +/** + * Class that emits and parses message parts header blocks.
+ */ +class CMessagePartsParser { +public: + static byte getByte(SmartPtrCDynamicByteArray& buffer); + static uint16 getUint16(SmartPtrCDynamicByteArray& buffer); + static uint32 getUint32(SmartPtrCDynamicByteArray& buffer); + static uint64 getUint64(SmartPtrCDynamicByteArray& buffer); + static UUID getGuid(SmartPtrCDynamicByteArray& buffer); + static void get8Bytes(SmartPtrCDynamicByteArray& buffer, byte* data); + +private: + CAF_CM_DECLARE_NOCREATE(CMessagePartsParser); +}; + +} + +#endif /* CMessagePartsParser_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.cpp new file mode 100644 index 000000000..df799d4e3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.cpp @@ -0,0 +1,260 @@ +/* + * Created on: Nov 25, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CMessageDeliveryRecord.h" +#include "CMessagePartDescriptorSourceRecord.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Integration/Core/CIntMessageHeaders.h" +#include "Exception/CCafException.h" +#include "COutgoingMessageHandler.h" +#include "CMessagePartsHeader.h" +#include "CMessagePartDescriptor.h" +#include "amqpCore/DefaultAmqpHeaderMapper.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" +#include "Integration/Core/CMessageHeaderUtils.h" +#include "Integration/Core/MessageHeaders.h" +#include "Integration/Core/CMessageHeaderUtils.h" + +#include + +using namespace Caf; + +COutgoingMessageHandler::COutgoingMessageHandler() : + _isInitialized(false), + CAF_CM_INIT_LOG("COutgoingMessageHandler") { +} + +COutgoingMessageHandler::~COutgoingMessageHandler() { +} + +void COutgoingMessageHandler::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + _isInitialized = true; +} + +void COutgoingMessageHandler::terminateBean() { +} + +/** + * Handles the incoming management request message + *

+ * Incoming messages are checked for local attachments that need to be transmitted. + * If the resulting message would be too large to transmit then multiple message + * records are created and stored for the {@link OutgoingMessageProducer} to handle. If the + * message is small enough to fit in a single transmission then it will be returned + * from this handler if a message receipt is not requested. + * + * @param message the incoming management request message + * @return null if the message must be transmitted as multiple parts or the message itself if it can be transmitted as is + */ +SmartPtrIIntMessage COutgoingMessageHandler::processMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("processMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + SmartPtrIIntMessage rc; + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + // Touch up the outgoing message headers first so that they are + // preserved through the rest of the system. + IIntMessage::SmartPtrCHeaders headers = message->getHeaders(); + + std::deque messagePartSourceRecords = + CMessagePartDescriptorCalculator::calculateSourcePartRecords(message->getPayload()); + if (messagePartSourceRecords.empty()) { + rc = augmentHeaders(false, message); + } else { + // Message splitting required. Iterate the message parts and group them + // such that each group of parts will fill maxPartSize bytes when transmitted. + std::deque deliveryRecords; + const uint32 maxPartSize = CMessagePartDescriptorCalculator::getMaxPartSize(); + const std::string correlationIdStr = CStringUtils::createRandomUuid(); + + UUID correlationId; + BasePlatform::UuidFromString(correlationIdStr.c_str(), correlationId); + + uint32 startPartNumber = 1; + uint32 currentPartSize = 0; + std::deque deliveryParts; + for (TConstIterator > sourceRecordIter(messagePartSourceRecords); + sourceRecordIter; sourceRecordIter++) { + const SmartPtrCMessagePartDescriptorSourceRecord sourceRecord = *sourceRecordIter; + deliveryParts.push_back(sourceRecord); + currentPartSize += sourceRecord->getDataLength(); + if (currentPartSize == maxPartSize) { + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA5( + "Adding message delivery record [size=%d][totalNumParts=%d][startPartNum=%d][parts=%d][correlationId=%s]", + currentPartSize, messagePartSourceRecords.size(), + startPartNumber, deliveryParts.size(), correlationIdStr.c_str()); + } + + SmartPtrCMessageDeliveryRecord deliveryRecord; + deliveryRecord.CreateInstance(); + deliveryRecord->initialize(correlationId, + static_cast(messagePartSourceRecords.size()), + startPartNumber, deliveryParts, message->getHeaders()); + + deliveryRecords.push_back(deliveryRecord); + + startPartNumber += static_cast(deliveryParts.size()); + deliveryParts.clear(); + currentPartSize = 0; + } else if (currentPartSize > maxPartSize) { + CAF_CM_EXCEPTION_VA2(ERROR_BUFFER_OVERFLOW, + "Buffer overflow - currentPartSize: %d, maxPartSize: %d", + currentPartSize, maxPartSize); + } + } + + if (currentPartSize > 0) { + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA5( + "Adding message delivery record [size=%d][totalNumParts=%d][startPartNum=%d][parts=%d][correlationId=%s]", + currentPartSize, messagePartSourceRecords.size(), + startPartNumber, deliveryParts.size(), correlationIdStr.c_str()); + } + + SmartPtrCMessageDeliveryRecord deliveryRecord; + deliveryRecord.CreateInstance(); + deliveryRecord->initialize(correlationId, + static_cast(messagePartSourceRecords.size()), + startPartNumber, deliveryParts, message->getHeaders()); + + deliveryRecords.push_back(deliveryRecord); + } + + if (deliveryRecords.size() != 1) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_SUPPORTED, + "Currently supports only one delivery record (i.e. no chunking) - size: %d", + deliveryRecords.size()); + } + + const SmartPtrIIntMessage newMessage = rehydrateMultiPartMessage( + deliveryRecords.back(), IIntMessage::SmartPtrCHeaders()); + rc = augmentHeaders(true, newMessage); + } + + CMessageHeaderUtils::log(rc->getHeaders()); + + return rc; +} + +SmartPtrIIntMessage COutgoingMessageHandler::rehydrateMultiPartMessage( + const SmartPtrCMessageDeliveryRecord& deliveryRecord, + const IIntMessage::SmartPtrCHeaders& addlHeaders) { + CAF_CM_STATIC_FUNC_LOG("COutgoingMessageHandler", "rehydrateMultiPartMessage"); + CAF_CM_VALIDATE_SMARTPTR(deliveryRecord); + // addlHeaders are optional + + uint32 payloadSize = CMessagePartsHeader::BLOCK_SIZE; + const std::deque sourceRecords = deliveryRecord->getMessagePartSources(); + for (TConstIterator > sourceRecordIter(sourceRecords); + sourceRecordIter; sourceRecordIter++) { + const SmartPtrCMessagePartDescriptorSourceRecord sourceRecord = *sourceRecordIter; + payloadSize += CMessagePartDescriptor::BLOCK_SIZE + sourceRecord->getDataLength(); + } + + SmartPtrCDynamicByteArray payload; + payload.CreateInstance(); + payload->allocateBytes(payloadSize); + + const SmartPtrCDynamicByteArray partsHeader = CMessagePartsHeader::toArray( + deliveryRecord->getCorrelationId(), deliveryRecord->getNumberOfParts()); + payload->memAppend(partsHeader->getPtr(), partsHeader->getByteCount()); + + uint32 partNumber = deliveryRecord->getStartingPartNumber(); + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA3("[# sourceRecords=%d][payloadSize=%d][startingPartNumber=%d]", + sourceRecords.size(), payloadSize, partNumber); + } + + for (TConstIterator > sourceRecordIter(sourceRecords); + sourceRecordIter; sourceRecordIter++) { + const SmartPtrCMessagePartDescriptorSourceRecord sourceRecord = *sourceRecordIter; + + const SmartPtrCDynamicByteArray partDescriptor = CMessagePartDescriptor::toArray( + sourceRecord->getAttachmentNumber(), partNumber++, sourceRecord->getDataLength(), + sourceRecord->getDataOffset()); + payload->memAppend(partDescriptor->getPtr(), partDescriptor->getByteCount()); + + CAF_CM_LOG_DEBUG_VA3("Reading from file - file: %s, len: %d, offset: %d", + sourceRecord->getFilePath().c_str(), sourceRecord->getDataLength(), + sourceRecord->getDataOffset()); + + std::ifstream file(sourceRecord->getFilePath().c_str(), std::ios::binary); + try { + if (!file.is_open()) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "Could not open binary file - %s", sourceRecord->getFilePath().c_str()); + } + + file.seekg(sourceRecord->getDataOffset(), std::ios::beg); + file.read(reinterpret_cast(payload->getNonConstPtrAtCurrentPos()), + sourceRecord->getDataLength()); + payload->verify(); + if (! file) { + CAF_CM_EXCEPTION_VA3(ERROR_BUFFER_OVERFLOW, + "Did not read full contents - file: %s, requested: %d, read: %d", + sourceRecord->getFilePath().c_str(), sourceRecord->getDataLength(), + file.gcount()); + } + + payload->incrementCurrentPos(sourceRecord->getDataLength()); + } + CAF_CM_CATCH_ALL; + file.close(); + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; + } + + SmartPtrCIntMessage rc; + rc.CreateInstance(); + rc->initialize(payload, deliveryRecord->getMessageHeaders(), addlHeaders); + + return rc; +} + +SmartPtrIIntMessage COutgoingMessageHandler::augmentHeaders( + const bool isMultiPart, + const SmartPtrIIntMessage& message) { + CAF_CM_STATIC_FUNC_VALIDATE("COutgoingMessageHandler", "augmentHeaders"); + CAF_CM_VALIDATE_INTERFACE(message); + + std::string contentType; + if (isMultiPart) { + contentType = "application/octet-stream"; + } else { + contentType = "text/plain"; + } + + CIntMessageHeaders messageHeaders; + messageHeaders.insertBool(MessageHeaders::_sMULTIPART, isMultiPart); + messageHeaders.insertString(AmqpIntegration::DefaultAmqpHeaderMapper::CONTENT_TYPE, + contentType); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), messageHeaders.getHeaders(), + message->getHeaders()); + + return messageImpl; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.h new file mode 100644 index 000000000..284ce865e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/COutgoingMessageHandler.h @@ -0,0 +1,65 @@ +/* + * Created on: Nov 25, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef COutgoingMessageHandler_h +#define COutgoingMessageHandler_h + + +#include "IBean.h" + +#include "CMessageDeliveryRecord.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageProcessor.h" + +using namespace Caf; + +class COutgoingMessageHandler : + public TCafSubSystemObjectRoot, + public IBean, + public IMessageProcessor { +public: + COutgoingMessageHandler(); + virtual ~COutgoingMessageHandler(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationOutgoingMessageHandler) + + CAF_BEGIN_INTERFACE_MAP(COutgoingMessageHandler) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IMessageProcessor) + CAF_END_INTERFACE_MAP() + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IMessageProcessor + SmartPtrIIntMessage processMessage( + const SmartPtrIIntMessage& message); + +private: + static SmartPtrIIntMessage rehydrateMultiPartMessage( + const SmartPtrCMessageDeliveryRecord& deliveryRecord, + const IIntMessage::SmartPtrCHeaders& addlHeaders); + + static SmartPtrIIntMessage augmentHeaders( + const bool isMultiPart, + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(COutgoingMessageHandler); +}; + +#endif /* COutgoingMessageHandler_h */ + diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.cpp new file mode 100644 index 000000000..3c344e9ae --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.cpp @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CProtocolHeaderEnricher.h" + +using namespace Caf; + +CProtocolHeaderEnricher::CProtocolHeaderEnricher() : + _isInitialized(false), + CAF_CM_INIT("CProtocolHeaderEnricher") { +} + +CProtocolHeaderEnricher::~CProtocolHeaderEnricher() { +} + +void CProtocolHeaderEnricher::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); +} + +void CProtocolHeaderEnricher::terminateBean() { +} + +void CProtocolHeaderEnricher::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +bool CProtocolHeaderEnricher::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + return false; +} + +SmartPtrIIntegrationObject CProtocolHeaderEnricher::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + rc.CreateInstance(_sObjIdCommIntegrationProtocolHeaderEnricherInstance); + rc->initialize(_ctorArgs, _properties, configSection); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.h new file mode 100644 index 000000000..60149a62b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricher.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProtocolHeaderEnricher_h_ +#define CProtocolHeaderEnricher_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CProtocolHeaderEnricher : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CProtocolHeaderEnricher(); + virtual ~CProtocolHeaderEnricher(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationProtocolHeaderEnricher) + + CAF_BEGIN_INTERFACE_MAP(CProtocolHeaderEnricher) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CProtocolHeaderEnricher); +}; + +} + +#endif // #ifndef CProtocolHeaderEnricher_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.cpp new file mode 100644 index 000000000..442678b28 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.cpp @@ -0,0 +1,108 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Caf/CCafMessageHeadersWriter.h" +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Exception/CCafException.h" +#include "CProtocolHeaderEnricherInstance.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" + +using namespace Caf; + +CProtocolHeaderEnricherInstance::CProtocolHeaderEnricherInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CProtocolHeaderEnricherInstance") { +} + +CProtocolHeaderEnricherInstance::~CProtocolHeaderEnricherInstance() { +} + +void CProtocolHeaderEnricherInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + _id = configSection->findRequiredAttribute("id"); + _isInitialized = true; +} + +std::string CProtocolHeaderEnricherInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _id; +} + +void CProtocolHeaderEnricherInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); +} + +SmartPtrIIntMessage CProtocolHeaderEnricherInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + const SmartPtrCProtocolDoc protocol = findProtocol(payloadEnvelope); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(protocol->getUri(), uriRecord); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setProtocol(uriRecord.protocol); + messageHeadersWriter->setProtocolAddress(uriRecord.address); + + CAF_CM_LOG_DEBUG_VA2( + "Enhanced the headers - protocol: \"%s\", connStr: \"%s\"", + uriRecord.protocol.c_str(), uriRecord.address.c_str()); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), + messageHeadersWriter->getHeaders(), message->getHeaders()); + + return messageImpl; +} + +SmartPtrCProtocolDoc CProtocolHeaderEnricherInstance::findProtocol( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope) const { + CAF_CM_FUNCNAME("findProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + + const SmartPtrCProtocolCollectionDoc protocolCollectionDoc = + payloadEnvelope->getProtocolCollection(); + CAF_CM_VALIDATE_SMARTPTR(protocolCollectionDoc); + + const std::deque protocolCollection = + protocolCollectionDoc->getProtocol(); + + if (protocolCollection.size() != 1) { + CAF_CM_EXCEPTION_VA1(E_NOTIMPL, + "Multiple protocols are not yet supported - %d", + protocolCollection.size()); + } + + return *(protocolCollection.begin()); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.h new file mode 100644 index 000000000..ca0438c9f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CProtocolHeaderEnricherInstance.h @@ -0,0 +1,76 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProtocolHeaderEnricherInstance_h +#define CProtocolHeaderEnricherInstance_h + + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CProtocolDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CProtocolHeaderEnricherInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CProtocolHeaderEnricherInstance(); + virtual ~CProtocolHeaderEnricherInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationProtocolHeaderEnricherInstance) + + CAF_BEGIN_INTERFACE_MAP(CProtocolHeaderEnricherInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrCProtocolDoc findProtocol( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope) const; + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProtocolHeaderEnricherInstance); +}; + +} + +#endif /* CProtocolHeaderEnricherInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.cpp new file mode 100644 index 000000000..006b88faa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.cpp @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CReplyToCacher.h" + +using namespace Caf; + +CReplyToCacher::CReplyToCacher() : + _isInitialized(false), + CAF_CM_INIT("CReplyToCacher") { +} + +CReplyToCacher::~CReplyToCacher() { +} + +void CReplyToCacher::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); +} + +void CReplyToCacher::terminateBean() { +} + +void CReplyToCacher::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +bool CReplyToCacher::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + return false; +} + +SmartPtrIIntegrationObject CReplyToCacher::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + rc.CreateInstance(_sObjIdCommIntegrationReplyToCacherInstance); + rc->initialize(_ctorArgs, _properties, configSection); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.h new file mode 100644 index 000000000..018990f31 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacher.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CReplyToCacher_h_ +#define CReplyToCacher_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CReplyToCacher : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CReplyToCacher(); + virtual ~CReplyToCacher(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationReplyToCacher) + + CAF_BEGIN_INTERFACE_MAP(CReplyToCacher) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CReplyToCacher); +}; + +} + +#endif // #ifndef CReplyToCacher_h_ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.cpp new file mode 100644 index 000000000..27f58c8a7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.cpp @@ -0,0 +1,69 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IBean.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Exception/CCafException.h" +#include "CReplyToCacherInstance.h" + +using namespace Caf; + +CReplyToCacherInstance::CReplyToCacherInstance() : + _isInitialized(false), + CAF_CM_INIT("CReplyToCacherInstance") { +} + +CReplyToCacherInstance::~CReplyToCacherInstance() { +} + +void CReplyToCacherInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + _id = configSection->findRequiredAttribute("id"); + _replyToResolverId = configSection->findRequiredAttribute("reply-to-resolver"); + _isInitialized = true; +} + +std::string CReplyToCacherInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _id; +} + +void CReplyToCacherInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + SmartPtrIBean replyToResolverBean = appContext->getBean(_replyToResolverId); + _replyToResolver.QueryInterface(replyToResolverBean, false); + if (!_replyToResolver) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchInterfaceException, 0, + "Bean '%s' is not a ReplyToResolver", _replyToResolverId.c_str()); + } +} + +SmartPtrIIntMessage CReplyToCacherInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _replyToResolver->cacheReplyTo(message); + + return message; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.h new file mode 100644 index 000000000..ccd2db264 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToCacherInstance.h @@ -0,0 +1,72 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CReplyToCacherInstance_h +#define CReplyToCacherInstance_h + + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "ReplyToResolver.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CReplyToCacherInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CReplyToCacherInstance(); + virtual ~CReplyToCacherInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationReplyToCacherInstance) + + CAF_BEGIN_INTERFACE_MAP(CReplyToCacherInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + std::string _replyToResolverId; + SmartPtrReplyToResolver _replyToResolver; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CReplyToCacherInstance); +}; + +} + +#endif /* CReplyToCacherInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.cpp new file mode 100644 index 000000000..2adfbc478 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.cpp @@ -0,0 +1,196 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Caf/CCafMessageHeaders.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "IVariant.h" +#include "Integration/IIntMessage.h" +#include "Exception/CCafException.h" +#include "CReplyToResolverInstance.h" +#include "amqpCore/DefaultAmqpHeaderMapper.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" + +using namespace Caf; + +CReplyToResolverInstance::CReplyToResolverInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CReplyToResolverInstance") { + CAF_CM_INIT_THREADSAFE; +} + +CReplyToResolverInstance::~CReplyToResolverInstance() { +} + +void CReplyToResolverInstance::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + // Read cache map into memory + loadCache(); + + _isInitialized = true; +} + +void CReplyToResolverInstance::terminateBean() { + persistCache(); +} + +std::string CReplyToResolverInstance::cacheReplyTo( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("cacheReplyTo"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + const SmartPtrCCafMessageHeaders cafMessageHeaders = + CCafMessageHeaders::create(message->getHeaders()); + const std::string replyTo = cafMessageHeaders->getOptionalStr( + AmqpIntegration::DefaultAmqpHeaderMapper::REPLY_TO); + + if (! replyTo.empty()) { + const UUID requestId = payloadEnvelope->getRequestId(); + const std::string requestIdStr = BasePlatform::UuidToString(requestId); + CAF_CM_LOG_DEBUG_VA2( + "Caching replyTo: [reqId=%s][replyTo=%s]", + requestIdStr.c_str(), + replyTo.c_str()); + _replyToAddresses.insert(std::make_pair(requestId, replyTo)); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Message does not have a '%s' header.", + AmqpIntegration::DefaultAmqpHeaderMapper::REPLY_TO.c_str()); + } + return replyTo; +} + +std::string CReplyToResolverInstance::lookupReplyTo( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("lookupReplyTo"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string replyTo; + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + const SmartPtrCCafMessageHeaders cafMessageHeaders = + CCafMessageHeaders::create(message->getHeaders()); + + const UUID requestId = payloadEnvelope->getRequestId(); + AddressMap::iterator replyToIter = _replyToAddresses.find(requestId); + if (replyToIter != _replyToAddresses.end()) { + replyTo = replyToIter->second; + _replyToAddresses.erase(replyToIter); + } else { + const std::string requestIdStr = BasePlatform::UuidToString(requestId); + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Request id %s was not found in the address collection.", + requestIdStr.c_str()); + } + return replyTo; +} + +SmartPtrIVariant CReplyToResolverInstance::invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("invokeExpression"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(!methodParams.size()); + SmartPtrIVariant result; + + if (methodName == "lookupReplyTo") { + result = CVariant::createString(lookupReplyTo(message)); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchMethodException, + 0, + "Method '%s' is not supported by this invoker", + methodName.c_str()); + } + return result; +} + +inline std::string CReplyToResolverInstance::getResolverCacheFilePath() +{ + return AppConfigUtils::getRequiredString("communication_amqp", "resolver_cache_file"); +} + +/* + * private methods + * + */ +void CReplyToResolverInstance::loadCache() { + CAF_CM_FUNCNAME_VALIDATE("loadCache"); + CAF_CM_LOCK_UNLOCK; + + //const std::string cacheFilePath = AppConfigUtils::getRequiredString("communication_amqp", "resolver_cache_file"); + const std::string cacheFilePath = getResolverCacheFilePath(); + const std::string cacheDirPath = FileSystemUtils::getDirname(cacheFilePath); + if (! FileSystemUtils::doesDirectoryExist(cacheDirPath)) { + FileSystemUtils::createDirectory(cacheDirPath); + } + if (FileSystemUtils::doesFileExist(cacheFilePath)) { + + const std::deque fileContents = FileSystemUtils::loadTextFileIntoColl(cacheFilePath); + for(TConstIterator > fileLineIter(fileContents); fileLineIter; fileLineIter++) { + //const std::string fileLine = *fileLineIter; + const Cdeqstr fileLineTokens = CStringUtils::split(*fileLineIter, ' '); + + CAF_CM_LOG_DEBUG_VA2("cache entry - reqId: %s, addr: %s", + fileLineTokens[0].c_str(), fileLineTokens[1].c_str()); + if (fileLineTokens.size() == 2) { + UUID reqId; + BasePlatform::UuidFromString(fileLineTokens[0].c_str(), reqId); + _replyToAddresses.insert(std::make_pair(reqId, fileLineTokens[1])); + } + } + + } else { + CAF_CM_LOG_DEBUG_VA1("resolver cache is not available - resolverCache: %s", cacheFilePath.c_str()); + } + +} + +void CReplyToResolverInstance::persistCache() { + CAF_CM_FUNCNAME_VALIDATE("persistCache"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + //const std::string cacheFilePath = AppConfigUtils::getRequiredString("communication_amqp", "resolver_cache_file"); + const std::string cacheFilePath = getResolverCacheFilePath(); + std::stringstream contents; + //contents.str(""); + for (AddressMap::const_iterator replyToIter = _replyToAddresses.begin(); + replyToIter != _replyToAddresses.end(); ++replyToIter) { + + std::string reqIdStr = BasePlatform::UuidToString(replyToIter->first); + contents << reqIdStr << " " << replyToIter->second << std::endl; + CAF_CM_LOG_DEBUG_VA2("caching entry - reqId: %s, addr: %s", + reqIdStr.c_str(), replyToIter->second.c_str()); + } + if (contents.str().length() > 0) { + CAF_CM_LOG_DEBUG_VA0("Caching resolver map."); + FileSystemUtils::saveTextFile(cacheFilePath, contents.str()); + } + + +} + diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.h new file mode 100644 index 000000000..3d24fcb93 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/CReplyToResolverInstance.h @@ -0,0 +1,71 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CReplyToResolverInstance_h +#define CReplyToResolverInstance_h + +#include "IBean.h" +#include "IVariant.h" +#include "ReplyToResolver.h" +#include "Integration/IIntMessage.h" +#include "Integration/IExpressionInvoker.h" + +namespace Caf { + +class CReplyToResolverInstance : + public TCafSubSystemObjectRoot, + public IBean, + public ReplyToResolver, + public IExpressionInvoker { +public: + CReplyToResolverInstance(); + virtual ~CReplyToResolverInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCommIntegrationReplyToResolver) + + CAF_BEGIN_INTERFACE_MAP(CReplyToResolverInstance) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(ReplyToResolver) + CAF_INTERFACE_ENTRY(IExpressionInvoker) + CAF_END_INTERFACE_MAP() + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // ReplyToResolver + std::string cacheReplyTo(const SmartPtrIIntMessage& message); + + std::string lookupReplyTo(const SmartPtrIIntMessage& message); + + static std::string getResolverCacheFilePath(); + +private: // ReplyToResolver + void loadCache(); + void persistCache(); + +public: // IExpressionInvoker + SmartPtrIVariant invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + typedef std::map AddressMap; + AddressMap _replyToAddresses; + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CReplyToResolverInstance); +}; +} + +#endif /* CReplyToResolverInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegration.cpp b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegration.cpp new file mode 100644 index 000000000..cbba3ff22 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegration.cpp @@ -0,0 +1,76 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CCmsMessageTransformer.h" +#include "CCmsMessageTransformerInstance.h" +#include "CEventTopicCalculatorInstance.h" +#include "CIncomingMessageHandler.h" +#include "CIncomingMessageHandlerInstance.h" +#include "COutgoingMessageHandler.h" +#include "CProtocolHeaderEnricher.h" +#include "CProtocolHeaderEnricherInstance.h" +#include "CReplyToCacher.h" +#include "CReplyToCacherInstance.h" +#include "CReplyToResolverInstance.h" + +namespace Caf { + const char* _sObjIdCommIntegrationCmsMessageTransformer = "com.vmware.caf.comm.integration.cmsmessagetransformer"; + const char* _sObjIdCommIntegrationCmsMessageTransformerInstance = "com.vmware.caf.comm.integration.cmsmessagetransformerinstance"; + const char* _sObjIdCommIntegrationEventTopicCalculator = "com.vmware.caf.comm.integration.eventtopiccalculator"; + const char* _sObjIdCommIntegrationIncomingMessageHandler = "com.vmware.caf.comm.integration.incomingmessagehandler"; + const char* _sObjIdCommIntegrationIncomingMessageHandlerInstance = "com.vmware.caf.comm.integration.incomingmessagehandlerinstance"; + const char* _sObjIdCommIntegrationOutgoingMessageHandler = "com.vmware.caf.comm.integration.outgoingmessagehandler"; + const char* _sObjIdCommIntegrationProtocolHeaderEnricher = "com.vmware.caf.comm.integration.protocolheaderenricher"; + const char* _sObjIdCommIntegrationProtocolHeaderEnricherInstance = "com.vmware.caf.comm.integration.protocolheaderenricherinstance"; + const char* _sObjIdCommIntegrationReplyToCacher = "com.vmware.caf.comm.integration.replytocacher"; + const char* _sObjIdCommIntegrationReplyToCacherInstance = "com.vmware.caf.comm.integration.replytocacherinstance"; + const char* _sObjIdCommIntegrationReplyToResolver = "com.vmware.caf.comm.integration.replytoresolver"; +} + +CEcmSubSystemModule _Module; + +using namespace Caf; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) + CAF_OBJECT_ENTRY(CCmsMessageTransformer) + CAF_OBJECT_ENTRY(CCmsMessageTransformerInstance) + CAF_OBJECT_ENTRY(CEventTopicCalculatorInstance) + CAF_OBJECT_ENTRY(CIncomingMessageHandler) + CAF_OBJECT_ENTRY(CIncomingMessageHandlerInstance) + CAF_OBJECT_ENTRY(COutgoingMessageHandler) + CAF_OBJECT_ENTRY(CProtocolHeaderEnricher) + CAF_OBJECT_ENTRY(CProtocolHeaderEnricherInstance) + CAF_OBJECT_ENTRY(CReplyToCacher) + CAF_OBJECT_ENTRY(CReplyToCacherInstance) + CAF_OBJECT_ENTRY(CReplyToResolverInstance) +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegrationDefines.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegrationDefines.h new file mode 100644 index 000000000..e5d2df8ce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/commIntegrationDefines.h @@ -0,0 +1,26 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef commIntegrationDefines_h +#define commIntegrationDefines_h + +namespace Caf { + + extern const char* _sObjIdCommIntegrationCmsMessageTransformer; + extern const char* _sObjIdCommIntegrationCmsMessageTransformerInstance; + extern const char* _sObjIdCommIntegrationEventTopicCalculator; + extern const char* _sObjIdCommIntegrationIncomingMessageHandler; + extern const char* _sObjIdCommIntegrationIncomingMessageHandlerInstance; + extern const char* _sObjIdCommIntegrationOutgoingMessageHandler; + extern const char* _sObjIdCommIntegrationProtocolHeaderEnricher; + extern const char* _sObjIdCommIntegrationProtocolHeaderEnricherInstance; + extern const char* _sObjIdCommIntegrationReplyToCacher; + extern const char* _sObjIdCommIntegrationReplyToCacherInstance; + extern const char* _sObjIdCommIntegrationReplyToResolver; +} + +#endif /* commIntegrationDefines_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/stdafx.h new file mode 100644 index 000000000..83cd6fca7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/Subsystems/commIntegration/src/stdafx.h @@ -0,0 +1,22 @@ +/* + * Created on: Aug 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h +#define stdafx_h + +#include +#include +#include "../../../amqpCore/src/amqpCore/amqpIntegrationCoreLink.h" +#include "commIntegrationDefines.h" + +#include +#include "CMessagePartsParser.h" +#include "CMessagePartsBuilder.h" +#include "CMessagePartDescriptorCalculator.h" +#include "CCmsMessageUtils.h" + +#endif /* stdafx_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQChannel.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQChannel.h new file mode 100644 index 000000000..ae34055cd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQChannel.h @@ -0,0 +1,265 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQCHANNEL_H_ +#define AMQCHANNEL_H_ + +#include "amqpClient/TCopyOnWriteContainer.h" +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Common/CAutoMutex.h" +#include "Exception/CCafException.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/AMQCommand.h" +#include "amqpClient/ConsumerDispatcher.h" +#include "amqpClient/ConsumerWorkService.h" +#include "amqpClient/IConnectionInt.h" +#include "amqpClient/IRpcContinuation.h" +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/api/AmqpMethods.h" +#include "amqpClient/api/Consumer.h" +#include "amqpClient/api/GetResponse.h" +#include "amqpClient/api/ReturnListener.h" +#include "amqpClient/api/amqpClient.h" +#include "Common/CThreadSignal.h" +#include "amqpClient/api/Channel.h" + +namespace Caf { namespace AmqpClient { + +class AMQChannel; +CAF_DECLARE_SMART_POINTER(AMQChannel); + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Concrete implementation of a Channel object representing an AMQP channel. + */ +class AMQChannel : public Channel { +public: + AMQChannel(); + virtual ~AMQChannel(); + + /** + * @brief Initializer + * @param connection the owning connection + * @param workService the work service to add channel tasks to + */ + void init( + const SmartPtrIConnectionInt& connection, + const SmartPtrConsumerWorkService& workService); + + /** + * @brief Notification of connection closure + *

+ * Called by the AMQChannelManager to notify the channel that the parent connect + * has closed for the supplied reason. + * @param exception the reason for the closure + */ + void notifyConnectionClosed(SmartPtrCCafException& exception); + + /** + * @brief Close the channel with the given reason + * @param exception reason for closure + */ + void close(SmartPtrCCafException& exception); + +public: // Channel + uint16 getChannelNumber(); + + void close(); + + bool isOpen(); + +public: // Basic + void basicAck( + const uint64 deliveryTag, + const bool ackMultiple); + + SmartPtrGetResponse basicGet( + const std::string& queue, + const bool noAck); + + void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const SmartPtrConsumer& consumer); + + AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const bool noAck, + const SmartPtrConsumer& consumer); + + AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noAck, + const bool noLocal, + const bool exclusive, + const SmartPtrConsumer& consumer, + const SmartPtrTable& arguments = SmartPtrTable()); + + AmqpMethods::Basic::SmartPtrCancelOk basicCancel( + const std::string& consumerTag); + + AmqpMethods::Basic::SmartPtrRecoverOk basicRecover( + const bool requeue); + + AmqpMethods::Basic::SmartPtrQosOk basicQos( + const uint32 prefetchSize, + const uint32 prefetchCount, + const bool global); + + void basicReject( + const uint64 deliveryTag, + const bool requeue); + +public: // Exchange + AmqpMethods::Exchange::SmartPtrDeclareOk exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool durable = false, + const SmartPtrTable& arguments = SmartPtrTable()); + + AmqpMethods::Exchange::SmartPtrDeleteOk exchangeDelete( + const std::string& exchange, + const bool ifUnused); + +public: // Queue + AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare(); + + AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare( + const std::string& queue, + const bool durable, + const bool exclusive, + const bool autoDelete, + const SmartPtrTable& arguments = SmartPtrTable()); + + AmqpMethods::Queue::SmartPtrDeclareOk queueDeclarePassive( + const std::string& queue); + + AmqpMethods::Queue::SmartPtrDeleteOk queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty); + + AmqpMethods::Queue::SmartPtrPurgeOk queuePurge( + const std::string& queue); + + AmqpMethods::Queue::SmartPtrBindOk queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments = SmartPtrTable()); + + AmqpMethods::Queue::SmartPtrUnbindOk queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments = SmartPtrTable()); + + void addReturnListener( + const SmartPtrReturnListener& listener); + + bool removeReturnListener( + const SmartPtrReturnListener& listener); + +private: + bool taskHandler(); + + void handleCompleteInboundCommand(const SmartPtrAMQCommand& command); + + bool processAsync(const SmartPtrAMQCommand& command); + + void ensureIsOpen(); + + SmartPtrAMQCommand execRpc(const SmartPtrIServerMethod& method); + + SmartPtrIRpcContinuation nextOutstandingRpc(); + + void transmit(const SmartPtrIServerMethod& method); + + void channelCloseByServerShutdown(const AmqpMethods::Channel::SmartPtrClose& closeMethod); + + void callReturnListeners(const SmartPtrAMQCommand& command); + +private: + /* + * This class hooks the channel into the worker service + * thread pool for channel inbound AMQP frame processing + */ + class ChannelTask : public CManagedThreadPool::IThreadTask { + public: + ChannelTask(); + + virtual ~ChannelTask(); + + /* + * Initialize the thread task + * channel is the pointer to the parent channel + */ + void init(SmartPtrAMQChannel channel); + + /* + * Thread pool task execution callback + * + * Calls through to the channel to do the actual work + * returns 'true' if the thread pool should remove this task + * returns 'false' if the thread pool should requeue this task + */ + bool run(); + + private: + SmartPtrAMQChannel _channel; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChannelTask); + }; + CAF_DECLARE_SMART_POINTER(ChannelTask); + +private: + static const uint8 DEBUGLOG_FLAG_ENTRYEXIT; + static const uint8 DEBUGLOG_FLAG_AMQP; + + bool _isInitialized; + volatile bool _isOpen; + uint8 _debugLogFlags; + SmartPtrIConnectionInt _connection; + SmartPtrConsumerWorkService _workService; + SmartPtrConsumerDispatcher _dispatcher; + uint16 _channelNumber; + SmartPtrCAmqpChannel _channelHandle; + SmartPtrAMQCommand _command; + SmartPtrIRpcContinuation _activeRpc; + SmartPtrCAutoMutex _channelMutex; + CThreadSignal _channelSignal; + + typedef std::deque ReturnListenerCollection; + typedef TCopyOnWriteContainer CowReturnListenerCollection; + CowReturnListenerCollection _returnListeners; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(AMQChannel); +}; + +}} + +#endif /* AMQCHANNEL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQChannelManager.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQChannelManager.h new file mode 100644 index 000000000..97666910d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQChannelManager.h @@ -0,0 +1,95 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQCHANNELMANAGER_H_ +#define AMQCHANNELMANAGER_H_ + + + +#include "Exception/CCafException.h" +#include "amqpClient/AMQChannel.h" +#include "amqpClient/ConsumerWorkService.h" +#include "amqpClient/api/Channel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Manages a set of channels for a connection. + * Channels are indexed by channel number (1.._channelMax). + */ +class AMQChannelManager { +public: + AMQChannelManager(); + virtual ~AMQChannelManager(); + +public: + /** + * @brief Initialize the manager to control channelMax channels. + * @param workService the service (thread pool) to run the channels in + */ + void init(const SmartPtrConsumerWorkService& workService); + + /** + * @brief Create a new channel + * @param connection The controlling #Caf::AmqpClient::IConnectionInt connection + * @return the new Channel + */ + SmartPtrChannel createChannel(const SmartPtrIConnectionInt& connection); + + /** + * @brief Return an existing channel on this connection. + * @param channelNumber the number of the required channel + * @return the #Caf::AmqpClient::Channel interface to the channel if it exists else + * throws an exception + */ + SmartPtrChannel getChannel(const uint16 channelNumber); + + /** + * @brief Return the number of open channels + * @return the number of open channels + */ + size_t getOpenChannelCount(); + + /** + * @brief Notify all channels that the connection is closed and the reason for it + * @param shutdownException the exception (reason) for the closure + */ + void notifyConnectionClose(SmartPtrCCafException& shutdownException); + + /** + * @brief Close achannel with the supplied reason + * @param channelNumber the channel to close + * @param reason the reason for closure + */ + void closeChannel(const uint16 channelNumber, SmartPtrCCafException& reason); + + /** + * @brief Remove a channel from management + * @param channelNumber channel number + */ + void removeChannel(const uint16 channelNumber); + +private: + typedef std::map ChannelMap; + + bool _isInitialized; + ChannelMap _channelMap; + SmartPtrConsumerWorkService _workService; + + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(AMQChannelManager); +}; +CAF_DECLARE_SMART_POINTER(AMQChannelManager); + +}} + +#endif /* AMQCHANNELMANAGER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQCommand.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQCommand.h new file mode 100644 index 000000000..76f471164 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQCommand.h @@ -0,0 +1,75 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQCOMMAND_H_ +#define AMQCOMMAND_H_ + + + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/CommandAssembler.h" +#include "amqpClient/amqpImpl/IContentHeader.h" +#include "amqpClient/amqpImpl/IMethod.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief This class represents an AMQP command + *

+ * This class wraps up the method, content header and body information for an + * incoming AMQP command. + */ +class AMQCommand { +public: + AMQCommand(); + virtual ~AMQCommand(); + + /** + * @brief Prepare the object for frame processing + */ + void init(); + + /** + * @brief Process an AMQP frame + * @param frame amqp frame data + */ + bool handleFrame(const SmartPtrCAmqpFrame& frame); + + /** + * @brief Return the body if available + * @return the body's raw bytes if available or a null object + */ + SmartPtrCDynamicByteArray getContentBody(); + + /** + * @brief Return the content header if available + * @return the IContentHeader if available or a + * null object + */ + SmartPtrIContentHeader getContentHeader(); + + /** + * @brief Return the method + * @return the IMethod object interface representing the method. + * QueryInterface must be used to get to the actual method object + */ + SmartPtrIMethod getMethod(); + +private: + SmartPtrCommandAssembler _assembler; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(AMQCommand); +}; +CAF_DECLARE_SMART_POINTER(AMQCommand); + +}} + +#endif /* AMQCOMMAND_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQConnection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQConnection.h new file mode 100644 index 000000000..ed71324f6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AMQConnection.h @@ -0,0 +1,141 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQCONNECTION_H_ +#define AMQCONNECTION_H_ + + +#include "Common/CThreadSignal.h" + +#include "amqpClient/CAmqpChannel.h" +#include "Common/CManagedThreadPool.h" +#include "amqpClient/AMQChannelManager.h" +#include "amqpClient/CAmqpAuthMechanism.h" +#include "amqpClient/CAmqpConnection.h" +#include "amqpClient/ConnectionWeakReference.h" +#include "amqpClient/ConsumerWorkService.h" +#include "amqpClient/api/Address.h" +#include "amqpClient/api/CertInfo.h" +#include "amqpClient/api/Channel.h" +#include "amqpClient/IConnectionInt.h" +#include "amqpClient/api/Connection.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Concrete class representing and managing an AMQP connection to a broker. + *

+ * To create a broker connection, use a ConnectionFactory created + * by calling #createConnectionFactory + */ +class AMQConnection : public Connection, public IConnectionInt { +public: + AMQConnection(); + virtual ~AMQConnection(); + +public: + /** + * @brief Initialize the connection. + * @param username name used to establish connection + * @param password for username + * @param address info needed to establish connection + * @param certInfo info needed to establish a secure connection + * @param requestedFrameMax max size of frame + * @param requestedChannelMax max number of channels + * @param requestedHeartbeat hearbeat in seconds + * @param connectionTimeout connection timeout in milliseconds + * @param consumerThreadCount number of consumer threads + */ + void init( + const std::string username, + const std::string password, + const SmartPtrAddress& address, + const SmartPtrCertInfo& certInfo, + const uint32 requestedFrameMax, + const uint32 requestedChannelMax, + const uint32 requestedHeartbeat, + const uint32 connectionTimeout, + const uint32 consumerThreadCount, + const uint16 retries, + const uint16 secondsToWait); + + /** + * @brief Start up the connection. + */ + void start(); + + +public: // Connection + SmartPtrChannel createChannel(); + + void closeChannel(const SmartPtrChannel& channel); + + void close(); + + bool isOpen(); + +public: // IConnectionInt + AMQPStatus amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel); + + void notifyChannelClosedByServer(const uint16 channelNumber); + + void channelCloseChannel(Channel *channel); + +private: + void initConnection(); + + static void closeChannel( + const bool isRunning, + const SmartPtrAMQChannelManager channelManager, + const SmartPtrChannel& channel); + + static SmartPtrChannel createChannel( + const bool isRunning, + const SmartPtrAMQChannelManager& channelManager, + const SmartPtrConnectionWeakReference& weakReferenceSelf); + + static void* threadFunc(void* context); + + void threadWorker(); + +private: + bool _isInitialized; + volatile bool _isRunning; + volatile bool _shouldShutdown; + bool _wasCloseCalled; + GThread* _thread; + CThreadSignal _connectionSignal; + SmartPtrAddress _address; + SmartPtrCertInfo _certInfo; + uint32 _connectionTimeout; + SmartPtrCAmqpConnection _connectionHandle; + uint32 _requestedFrameMax; + uint32 _requestedChannelMax; + uint32 _requestedHeartbeat; + uint16 _retries; + uint16 _secondsToWait; + SmartPtrCAmqpAuthMechanism _authMechanism; + SmartPtrAMQChannelManager _channelManager; + SmartPtrConnectionWeakReference _weakReferenceSelf; + SmartPtrCManagedThreadPool _threadPool; + SmartPtrConsumerWorkService _workService; + + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_CREATE_LOG; + CAF_THREADSIGNAL_CREATE; + CAF_CM_DECLARE_NOCOPY(AMQConnection); +}; + +CAF_DECLARE_SMART_POINTER(AMQConnection); + +}} + +#endif /* AMQCONNECTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AmqpClientLink.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AmqpClientLink.h new file mode 100644 index 000000000..1b432bf36 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/AmqpClientLink.h @@ -0,0 +1,23 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQP_CLIENTLINK_H_ +#define AMQP_CLIENTLINK_H_ + +#ifndef AMQPCLIENT_LINKAGE + #ifdef WIN32 + #ifdef AMQP_CLIENT + #define AMQPCLIENT_LINKAGE __declspec(dllexport) + #else + #define AMQPCLIENT_LINKAGE __declspec(dllimport) + #endif + #else + #define AMQPCLIENT_LINKAGE + #endif +#endif + +#endif /* AMQP_CLIENTLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/BlockingRpcContinuation.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/BlockingRpcContinuation.h new file mode 100644 index 000000000..2c0d2db55 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/BlockingRpcContinuation.h @@ -0,0 +1,73 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BLOCKINGRPCCONTINUATION_H_ +#define BLOCKINGRPCCONTINUATION_H_ + + + +#include "amqpClient/IRpcContinuation.h" + +#include "Exception/CCafException.h" +#include "amqpClient/AMQCommand.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @brief A IRpcContinuation that blocks until the response is received. + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + */ +class BlockingRpcContinuation : public IRpcContinuation { +public: + BlockingRpcContinuation(); + virtual ~BlockingRpcContinuation(); + + /** + * @brief Initialize the object + */ + void init(); + + /** + * @brief Waits indefinately for a response to an AMQP method call + * @retval null if an error occured. In this case call getException to get the exception + * @retval non-null AMQCommand response + */ + SmartPtrAMQCommand getReply(); + + /** + * @brief Waits for a time for a response to an AMQP method call + * @param timeout time in milliseconds to wait for a response + * @retval null if an error occured. In this case call getException to get the exception + * @retval non-null AMQCommand response + */ + SmartPtrAMQCommand getReply(uint32 timeout); + + /** + * @brief Returns the exception that occured if getReply returns null. + * @return the exception. The returned exception will have its reference count increased. + */ + SmartPtrCCafException getException(); + +public: // IRpcContinuation + void handleCommand(const SmartPtrAMQCommand& command); + + void handleAbort(SmartPtrCCafException exception); + +private: + bool _isInitialized; + TBlockingCell _blocker; + SmartPtrCCafException _exception; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BlockingRpcContinuation); +}; +CAF_DECLARE_SMART_POINTER(BlockingRpcContinuation); + +}} + +#endif /* BLOCKINGRPCCONTINUATION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpAuthMechanism.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpAuthMechanism.h new file mode 100644 index 000000000..035ed91e1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpAuthMechanism.h @@ -0,0 +1,45 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENT_CAMQPAUTHMECHANISM_H_ +#define AMQPCLIENT_CAMQPAUTHMECHANISM_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Manages a set of channels for a connection. + * Channels are indexed by channel number (1.._channelMax). + */ +class CAmqpAuthMechanism { +public: + CAmqpAuthMechanism(); + virtual ~CAmqpAuthMechanism(); + +public: + AMQPStatus createClient( + const std::string& username, + const std::string& password); + + std::string getUsername() const; + std::string getPassword() const; + +private: + std::string _username; + std::string _password; + + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CAmqpAuthMechanism); +}; +CAF_DECLARE_SMART_POINTER(CAmqpAuthMechanism); + +}} + +#endif /* AMQPCLIENT_CAMQPAUTHMECHANISM_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpChannel.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpChannel.h new file mode 100644 index 000000000..80d8cc016 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpChannel.h @@ -0,0 +1,140 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENT_CAMQPCHANNEL_H_ +#define AMQPCLIENT_CAMQPCHANNEL_H_ + + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/CAmqpConnection.h" +#include "amqpClient/CAmqpFrame.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Manages a set of channels for a connection. + * Channels are indexed by channel number (1.._channelMax). + */ +class CAmqpChannel { +public: + CAmqpChannel(); + virtual ~CAmqpChannel(); + + void initialize( + const SmartPtrCAmqpConnection& connection, + const amqp_channel_t& channel); + +public: + AMQPStatus close(); + + AMQPStatus closeOk(); + + AMQPStatus receive( + SmartPtrCAmqpFrame& frame, + int32 timeout); + + AMQPStatus getId( + uint16 *id); + + AMQPStatus basicAck( + const uint64 deliveryTag, + const bool multiple); + + AMQPStatus basicCancel( + const std::string& consumerTag, + const bool noWait); + + AMQPStatus basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus basicGet( + const std::string& queue, + const bool noAck); + + AMQPStatus basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body); + + AMQPStatus basicRecover( + const bool requeue); + + AMQPStatus basicQos( + const uint32 prefetchSize, + const uint16 prefetchCount, + bool global); + + AMQPStatus exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus exchangeDelete( + const std::string& exchange, + const bool ifUnused, + const bool noWait); + + AMQPStatus queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus queueDeclare( + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait); + + AMQPStatus queuePurge( + const std::string& queue, + const bool noWait); + + AMQPStatus queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& bindingKey, + const amqp_table_t *arguments); + +private: + bool _isInitialized; + SmartPtrCAmqpConnection _connection; + amqp_channel_t _channel; + + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CAmqpChannel); +}; + +}} + +#endif /* AMQPCLIENT_CAMQPCHANNEL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpConnection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpConnection.h new file mode 100644 index 000000000..07e01cd1f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpConnection.h @@ -0,0 +1,254 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENT_CAMQPCONNECTION_H_ +#define AMQPCLIENT_CAMQPCONNECTION_H_ + + +#include "amqpClient/CAmqpChannel.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/CAmqpAuthMechanism.h" +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/api/Address.h" +#include "amqpClient/api/CertInfo.h" + +namespace Caf { namespace AmqpClient { + +/** Connection states. */ +typedef enum { + AMQP_STATE_INITIALIZED = 0, /*!< New connection. */ + AMQP_STATE_CONNECTING, /*!< Connection in progress. */ + AMQP_STATE_CONNECTED, /*!< Connected. */ + AMQP_STATE_DISCONNECTING, /*!< Disconnection in process. */ + AMQP_STATE_DISCONNECTED, /*!< Disconnected. */ +} AMQPConnectionState; + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Manages a set of channels for a connection. + * Channels are indexed by channel number (1.._channelMax). + */ +class CAmqpConnection { +private: + typedef std::deque CAmqpFrames; + typedef std::map CChannelFrames; + CAF_DECLARE_SMART_POINTER(CChannelFrames); + + typedef std::set COpenChannels; + CAF_DECLARE_SMART_POINTER(COpenChannels); + +public: + CAmqpConnection(); + virtual ~CAmqpConnection(); + +public: + AMQPStatus connectionCreate( + const SmartPtrAddress& address, + const SmartPtrCAmqpAuthMechanism& auth, + const SmartPtrCertInfo& certInfo, + const uint16 channelMax, + const uint32 frameMax, + const uint16 heartbeat, + const uint16 retries, + const uint16 secondsToWait); + + AMQPStatus connectionConnect( + const int32 flags); + + AMQPStatus connectionClose(); + + AMQPStatus connectionProcessIO(); + + AMQPStatus connectionWaitForIO( + const int32 timeout); + + AMQPStatus connectionGetState( + AMQPConnectionState *state); + + AMQPStatus connectionGetMaxChannels( + uint16 *channels); + + AMQPStatus connectionGetMaxFrameSize( + uint32 *frameSize); + + AMQPStatus connectionGetHeartbeatInterval( + uint16 *interval); + + AMQPStatus connectionGetLastError( + const char **error); + + AMQPStatus channelOpen( + SmartPtrCAmqpChannel& chan); + + AMQPStatus channelClose( + const amqp_channel_t& channel); + + AMQPStatus channelCloseOk( + const amqp_channel_t& channel); + + AMQPStatus receive( + const amqp_channel_t& channel, + SmartPtrCAmqpFrame& frame, + const int32 timeout); + + AMQPStatus basicAck( + const amqp_channel_t& channel, + const uint64 deliveryTag, + const bool multiple); + + AMQPStatus basicCancel( + const amqp_channel_t& channel, + const std::string& consumerTag, + const bool noWait); + + AMQPStatus basicConsume( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus basicGet( + const amqp_channel_t& channel, + const std::string& queue, + const bool noAck); + + AMQPStatus basicPublish( + const amqp_channel_t& channel, + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body); + + AMQPStatus basicRecover( + const amqp_channel_t& channel, + const bool requeue); + + AMQPStatus basicQos( + const amqp_channel_t& channel, + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global); + + AMQPStatus exchangeDeclare( + const amqp_channel_t& channel, + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus exchangeDelete( + const amqp_channel_t& channel, + const std::string& exchange, + const bool ifUnused, + const bool noWait); + + AMQPStatus queueBind( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus queueDeclare( + const amqp_channel_t& channel, + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments); + + AMQPStatus queueDelete( + const amqp_channel_t& channel, + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait); + + AMQPStatus queuePurge( + const amqp_channel_t& channel, + const std::string& queue, + const bool noWait); + + AMQPStatus queueUnbind( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const amqp_table_t *arguments); + +private: + AMQPStatus createConnection(); + AMQPStatus createSslConnection(); + + AMQPStatus connectConnection(); + + AMQPStatus closeConnection(); + + AMQPStatus closeChannel( + const amqp_channel_t& channel); + + int32 receiveFrame( + const amqp_connection_state_t& connectionState, + SmartPtrCAmqpFrame& frame) const; + + void addFrames( + const CAmqpFrames& frames, + const SmartPtrCChannelFrames& channelFrames) const; + + bool isDataAvail( + const amqp_connection_state_t& connectionState) const; + + void validateOpenChannel( + const amqp_channel_t& channel) const; + + void restartListener( + const std::string& reason) const; + +private: + amqp_connection_state_t _connectionState; + amqp_socket_t* _socket; + amqp_channel_t _curChannel; + AMQPConnectionState _connectionStateEnum; + bool _isConnectionLost; + int32 _lastStatus; + + SmartPtrCAmqpAuthMechanism _auth; + uint16 _channelMax; + uint32 _frameMax; + uint16 _heartbeat; + uint16 _retries; + uint16 _secondsToWait; + SmartPtrAddress _address; + SmartPtrCertInfo _certInfo; + SmartPtrCChannelFrames _channelFrames; + + Csetstr _cachedStrings; + COpenChannels _openChannels; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CAmqpConnection); +}; + +}} + +#endif /* AMQPCLIENT_CAMQPCONNECTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpFrame.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpFrame.h new file mode 100644 index 000000000..a0d48a2b8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CAmqpFrame.h @@ -0,0 +1,67 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENT_CAMQPFRAME_H_ +#define AMQPCLIENT_CAMQPFRAME_H_ + +#include "amqp.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Manages a set of channels for a connection. + * Channels are indexed by channel number (1.._channelMax). + */ +class CAmqpFrame { +public: + CAmqpFrame(); + virtual ~CAmqpFrame(); + +public: + void initialize( + const amqp_frame_t& frame); + + uint8_t getFrameType() const; + amqp_channel_t getChannel() const; + + const amqp_method_t* const getPayloadAsMethod() const; + + uint16_t getHeaderClassId() const; + uint64_t getHeaderBodySize() const; + const amqp_basic_properties_t* const getHeaderProperties() const; + + const amqp_bytes_t* const getBodyFragment() const; + + void log(const std::string& prefix) const; + +private: + bool _isInitialized; + + uint8_t _frameType; + amqp_channel_t _channel; + + amqp_method_t _method; + + uint16_t _propertiesClassId; + uint64_t _propertiesBodySize; + amqp_basic_properties_t* _propertiesDecoded; + + amqp_bytes_t _bodyFragment; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CAmqpFrame); +}; +CAF_DECLARE_SMART_POINTER(CAmqpFrame); + +}} + +#endif /* AMQPCLIENT_CAMQPFRAME_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CommandAssembler.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CommandAssembler.h new file mode 100644 index 000000000..f59821189 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/CommandAssembler.h @@ -0,0 +1,103 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef COMMANDASSEMBLER_H_ +#define COMMANDASSEMBLER_H_ + + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/amqpImpl/IContentHeader.h" +#include "amqpClient/amqpImpl/IMethod.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief A class that manages the assembly of AMQP frames into a complete AMQP method + */ +class CommandAssembler { +public: + CommandAssembler(); + virtual ~CommandAssembler(); + + /** + * @brief Initialize the object + */ + void init(); + + /** + * @brief Process the AMQP frame + * @param frame AMQP frame + * @retval true all of the frames have been received and the AMQP method is complete + * @retval false more frames are required to complete the AMQP method + */ + bool handleFrame(const SmartPtrCAmqpFrame& frame); + + /** + * @brief Return the completion status of the method + * @retval true all frames have been received and the AMQP method is complete + * @retval false more frames are required to complete the AMQP method + */ + bool isComplete(); + + /** + * @brief Return the Method + * @return the interface to the Method. QueryInterface to the appropriate + * derived type based on the class ID and method ID. + */ + SmartPtrIMethod getMethod(); + + /** + * @brief Return the ContentHeader + * @return the interface to the ContentHeader. QueryInterface to the appropriate + * derived type based on the class ID. + */ + SmartPtrIContentHeader getContentHeader(); + + /** + * @brief Return the method body + * @return the method body data as raw bytes + */ + SmartPtrCDynamicByteArray getContentBody(); + +private: + typedef enum { + EXPECTING_METHOD, + EXPECTING_CONTENT_HEADER, + EXPECTING_CONTENT_BODY, + COMPLETE + } CAState; + + typedef std::deque CBodyCollection; + +private: + void consumeBodyFrame(const SmartPtrCAmqpFrame& frame); + void consumeHeaderFrame(const SmartPtrCAmqpFrame& frame); + void consumeMethodFrame(const SmartPtrCAmqpFrame& frame); + void updateContentBodyState(); + void appendBodyFragment(const amqp_bytes_t * const fragment); + SmartPtrCDynamicByteArray coalesceContentBody(); + +private: + bool _isInitialized; + CAState _state; + SmartPtrIMethod _method; + SmartPtrIContentHeader _contentHeader; + uint32 _remainingBodyBytes; + CBodyCollection _bodyCollection; + uint32 _bodyLength; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CommandAssembler); +}; +CAF_DECLARE_SMART_POINTER(CommandAssembler); + +}} +#endif /* COMMANDASSEMBLER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConnectionFactoryImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConnectionFactoryImpl.h new file mode 100644 index 000000000..b982462c7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConnectionFactoryImpl.h @@ -0,0 +1,96 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CONNECTIONFACTORYIMPL_H_ +#define CONNECTIONFACTORYIMPL_H_ + +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpClient/api/Address.h" +#include "amqpClient/api/CertInfo.h" +#include "amqpClient/api/Connection.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of ConnectionFactory + */ +class ConnectionFactoryImpl : public ConnectionFactory { +public: + ConnectionFactoryImpl(); + virtual ~ConnectionFactoryImpl(); + +public: // ConectionFactory + std::string getProtocol() const; + void setProtocol(const std::string& host); + std::string getHost() const; + void setHost(const std::string& host); + uint32 getPort() const; + void setPort(const uint32 port); + std::string getVirtualHost() const; + void setVirtualHost(const std::string& virtualHost); + std::string getUsername() const; + void setUsername(const std::string& username); + std::string getPassword() const; + void setPassword(const std::string& password); + std::string getCaCertPath() const; + void setCaCertPath(const std::string& caCertPath); + std::string getClientCertPath() const; + void setClientCertPath(const std::string& clientCertPath); + std::string getClientKeyPath() const; + void setClientKeyPath(const std::string& clientKeyPath); + uint32 getRequestedChannelMax() const; + void setRequestedChannelMax(const uint32 requestedChannelMax); + uint32 getRequestedFrameMax() const; + void setRequestedFrameMax(const uint32 requestedFrameMax); + uint32 getRequestedHeartbeat() const; + void setRequestedHeartbeat(const uint32 requestedHeartbeat); + uint32 getConnectionTimeout() const; + void setConnectionTimeout(const uint32 connectionTimeout); + uint32 getConsumerThreadCount() const; + void setConsumerThreadCount(const uint32 threadCount); + uint16 getRetries() const; + void setRetries(const uint16 retries); + uint16 getSecondsToWait() const; + void setSecondsToWait(const uint16 seconds); + + SmartPtrConnection newConnection(); + SmartPtrConnection newConnection( + const SmartPtrAddress& address, + const SmartPtrCertInfo& certInfo); + +private: + uint32 portOrDefault(const uint32 port) const; + +private: + std::string _protocol; + std::string _host; + uint32 _port; + std::string _virtualHost; + std::string _username; + std::string _password; + std::string _caCertPath; + std::string _clientCertPath; + std::string _clientKeyPath; + uint32 _requestedChannelMax; + uint32 _requestedFrameMax; + uint32 _requestedHeartbeat; + uint32 _connectionTimeout; + uint32 _consumerThreadCount; + uint16 _retries; + uint16 _secondsToWait; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ConnectionFactoryImpl); +}; +CAF_DECLARE_SMART_POINTER(ConnectionFactoryImpl); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConnectionWeakReference.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConnectionWeakReference.h new file mode 100644 index 000000000..2b680342b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConnectionWeakReference.h @@ -0,0 +1,64 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CONNECTIONWEAKREFERENCE_H_ +#define CONNECTIONWEAKREFERENCE_H_ + + +#include "amqpClient/IConnectionInt.h" +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief This class manages a weak reference to a IConnectionInt object. + *

+ * The channel manager needs a reference to its connection. The connection object + * has a reference to the channel manager. To break this reference cycle the channel + * manager will be handed weak references to the connection. + */ +class ConnectionWeakReference : public IConnectionInt { +public: + ConnectionWeakReference(); + virtual ~ConnectionWeakReference(); + +public: + /** + * @brief Sets the weakly referenced object + * @param connection the weakly referenced object + */ + void setReference(IConnectionInt* connection); + + /** + * @brief Clears the weakly referenced object. + * + * Calls to any Connection method on this object will result in a thrown + * exception after this method has been called. + */ + void clearReference(); + +public: // IConnectionInt + AMQPStatus amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel); + + void notifyChannelClosedByServer(const uint16 channelNumber); + + void channelCloseChannel(Channel *channel); + +private: + IConnectionInt* _connection; + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(ConnectionWeakReference); +}; +CAF_DECLARE_SMART_POINTER(ConnectionWeakReference); + +}} + +#endif /* CONNECTIONWEAKREFERENCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConsumerDispatcher.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConsumerDispatcher.h new file mode 100644 index 000000000..cc0dde985 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConsumerDispatcher.h @@ -0,0 +1,208 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CONSUMERDISPATCHER_H_ +#define CONSUMERDISPATCHER_H_ + + + +#include "ICafObject.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Exception/CCafException.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/ConsumerWorkService.h" +#include "amqpClient/api/Consumer.h" +#include "amqpClient/api/Envelope.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Dispatches notifications to a {@link Consumer} on an internally-managed work pool. + *

+ * Each {@link Channel} has a single {@link ConsumerDispatcher}, but the work pool may be + * shared with other channels, typically those on the name {@link AMQConnection}. + */ +class ConsumerDispatcher { +public: + ConsumerDispatcher(); + virtual ~ConsumerDispatcher(); + + /** + * @brief Initialize the object + * @param workService work service providing a work pool for dispatching notifications + */ + void init( + const SmartPtrConsumerWorkService& workService); + + /** + * @brief Prepare for shutdown of all consumers on this channel + */ + void quiesce(); + + /** + * @brief Lock the dispatcher + *

+ * Place a lock on the dispatcher. All threads attemping to call the dispatcher will + * be blocked until unlock is called. + */ + void lock(); + + /** + * @brief unlock the dispatcher + *

+ * Remove the lock on the dispatcher. + */ + void unlock(); + + /** + * @brief Adds a consumer to the dispatcher + * @param consumerTag consumer tag + * @param consumer consumer object + */ + void addConsumer( + const std::string& consumerTag, + const SmartPtrConsumer& consumer); + + /** + * @brief Removes a consumer from the dispatcher + * @param consumerTag consumer tag + */ + void removeConsumer( + const std::string& consumerTag); + + /** + * @brief Retrieves a consumer from the dispatcher + * @param consumerTag consumer tag + * @return the consumer or null if not found + */ + SmartPtrConsumer getConsumer( + const std::string& consumerTag); + + /** + * @brief Handle basic.consume-ok + * @param consumerTag consumer tag + */ + void handleConsumeOk( + const std::string& consumerTag); + + /** + * @brief Handle basic.cancel-ok + * @param consumerTag consumer tag + */ + void handleCancelOk( + const std::string& consumerTag); + + /** + * @brief Handle basic.recover-ok + */ + void handleRecoverOk(); + + /** + * @brief Handle basic.delivery + * @param consumerTag consumer tag + * @param envelope message envelope + * @param properties message properties and headers + * @param body message body + */ + void handleDelivery( + const std::string& consumerTag, + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + /** + * @brief Handle a channel shutdown event + * @param exception reason for the shutdown + */ + void handleShutdown(SmartPtrCCafException exception); + +private: // Task support + typedef enum { + DISPATCH_ITEM_METHOD_HANDLE_CONSUME_OK, + DISPATCH_ITEM_METHOD_HANDLE_CANCEL_OK, + DISPATCH_ITEM_METHOD_HANDLE_RECOVER_OK, + DISPATCH_ITEM_METHOD_HANDLE_DELIVERY, + DISPATCH_ITEM_METHOD_TERMINATE + } DispatchItemMethod; + + class DispatcherWorkItem : public ICafObject { + public: + DispatcherWorkItem(); + + void init( + const DispatchItemMethod method); + + void init( + const DispatchItemMethod method, + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + DispatchItemMethod getMethod() const; + SmartPtrEnvelope getEnvelope() const; + AmqpContentHeaders::SmartPtrBasicProperties getProperties() const; + SmartPtrCDynamicByteArray getBody() const; + + private: + DispatchItemMethod _method; + SmartPtrEnvelope _envelope; + AmqpContentHeaders::SmartPtrBasicProperties _properties; + SmartPtrCDynamicByteArray _body; + }; + CAF_DECLARE_SMART_POINTER(DispatcherWorkItem); + + class DispatcherTask : public CManagedThreadPool::IThreadTask { + public: + DispatcherTask(); + ~DispatcherTask(); + + void init( + const std::string& consumerTag, + const SmartPtrConsumer& consumer); + + void term(); + + void addWorkItem(const SmartPtrDispatcherWorkItem& workItem); + + bool run(); + + private: + static void FreeWorkItem(gpointer data); + + private: + std::string _consumerTag; + SmartPtrConsumer _consumer; + GAsyncQueue *_workItemQueue; + }; + CAF_DECLARE_SMART_POINTER(DispatcherTask); + +private: + typedef std::pair ConsumerItem; + typedef std::map ConsumerMap; + + ConsumerItem getConsumerItem(const std::string& consumerTag); + +private: + bool _isInitialized; + volatile bool _isShuttingDown; + SmartPtrConsumerWorkService _workService; + ConsumerMap _consumers; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(ConsumerDispatcher); +}; +CAF_DECLARE_SMART_POINTER(ConsumerDispatcher); + +}} + +#endif /* CONSUMERDISPATCHER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConsumerWorkService.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConsumerWorkService.h new file mode 100644 index 000000000..bb981f0f9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/ConsumerWorkService.h @@ -0,0 +1,55 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CONSUMERWORKSERVICE_H_ +#define CONSUMERWORKSERVICE_H_ + + +#include "Common/CManagedThreadPool.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief This class wraps a thread pool for executing channel worker threads + */ +class ConsumerWorkService { +public: + ConsumerWorkService(); + virtual ~ConsumerWorkService(); + + /** + * @brief Initializer + * @param threadPool the thread pool used to execute channel threads + */ + void init(const SmartPtrCManagedThreadPool& threadPool); + + /** + * @brief Add a worker thread to the pool + * @param task the task to add + */ + void addWork(const CManagedThreadPool::SmartPtrIThreadTask& task); + + /** + * @brief Respond to a connection-closed notification by terminating the thread pool + */ + void notifyConnectionClosed(); + +private: + bool _isInitialized; + SmartPtrCManagedThreadPool _threadPool; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(ConsumerWorkService); +}; +CAF_DECLARE_SMART_POINTER(ConsumerWorkService); + +}} + +#endif /* CONSUMERWORKSERVICE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/IConnectionInt.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/IConnectionInt.h new file mode 100644 index 000000000..37ea3e874 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/IConnectionInt.h @@ -0,0 +1,56 @@ +/* + * Created on: May 8, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef ICONNECTIONINT_H_ +#define ICONNECTIONINT_H_ + +#include "ICafObject.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/Channel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief This interface abstracts the calls to AMQP_ConnectionXXX c-api calls + *

+ * AMQConnection objects pass weak references to themselves to AMQChannel objects + * allowing them to make calls against the channel that require the connection handle. + */ +struct __declspec(novtable) IConnectionInt : public ICafObject { + + /** + * @brief Pass-through for the AMQP_ConnectionOpenChannel call + * @param channel the channel handle to be returned + * @return the AMQPStatus of the call. If AMQP_ERROR_OK then + * channel will be set to a valid channel handle. + */ + virtual AMQPStatus amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel) = 0; + + /** + * @brief Callback to notify the connection that a channel has been closed. This + * is in reponse to the server sending a channel.close method. + * @param channelNumber the channel number + */ + virtual void notifyChannelClosedByServer(const uint16 channelNumber) = 0; + + /** + * @brief Callback to notify the connection that a channel is being + * requested to close. + * @param channel Channel to close + */ + virtual void channelCloseChannel(Channel *channel) = 0; + +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IConnectionInt); + +}} + +#endif /* ICONNECTIONINT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/IRpcContinuation.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/IRpcContinuation.h new file mode 100644 index 000000000..b9175c391 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/IRpcContinuation.h @@ -0,0 +1,47 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef IRPCCONTINUATION_H_ +#define IRPCCONTINUATION_H_ + + +#include "ICafObject.h" + +#include "Exception/CCafException.h" +#include "amqpClient/AMQCommand.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Interface for RPC worker objects + *

+ * The channel worker thread will assemble incoming AMQP frames an then process + * the compiled frames as an AMQCommand object. If the command object belongs + * to an outstanding RPC call, that call will receive the command for processing. + */ +struct __declspec(novtable) IRpcContinuation : public ICafObject { + /** + * @brief Process the received AMQP command + * @param command the AMQCommand command object + */ + virtual void handleCommand(const SmartPtrAMQCommand& command) = 0; + + /** + * @brief Abort the command for the reason supplied + * @param exception the reason as an exception + */ + virtual void handleAbort(SmartPtrCCafException exception) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IRpcContinuation); + +}} + + +#endif /* IRPCCONTINUATION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/TCopyOnWriteContainer.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/TCopyOnWriteContainer.h new file mode 100644 index 000000000..fc469c0a0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/TCopyOnWriteContainer.h @@ -0,0 +1,73 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef TCOPYONWRITECONTAINER_H_ +#define TCOPYONWRITECONTAINER_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief An STL container wrapper that implements copy-on-write semantics + */ +template +class TCopyOnWriteContainer { +public: + typedef TCafSmartPtr > SmartPtrContainer; + + TCopyOnWriteContainer() { + _container.CreateInstance(); + } + + SmartPtrContainer getAll() { + return _container; + } + + void add(const ValueType& value) { + SmartPtrContainer newContainer; + newContainer.CreateInstance(); + newContainer->insert( + newContainer->begin(), + _container->begin(), + _container->end()); + newContainer->push_back(value); + _container = newContainer; + } + + bool remove(const ValueType& value) { + bool found = false; + SmartPtrContainer newContainer; + newContainer.CreateInstance(); + SmartPtrContainer currContainer = _container; + for (typename Container::const_iterator iter = currContainer->begin(); + iter != currContainer->end(); + ++iter) { + if (*iter == value) { + found = true; + } else { + newContainer->push_back(*iter); + } + } + + if (found) { + _container = newContainer; + } + return found; + } + + void clear() { + _container.CreateInstance(); + } + +private: + SmartPtrContainer _container; +}; + +}} + +#endif /* TCOPYONWRITECONTAINER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicAckMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicAckMethod.h new file mode 100644 index 000000000..20d02c9d7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicAckMethod.h @@ -0,0 +1,52 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICACKMETHOD_H_ +#define BASICACKMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.ack + */ +class BasicAckMethod :public IServerMethod { +public: + BasicAckMethod(); + virtual ~BasicAckMethod(); + + /** + * @brief Initialize the method + * @param deliveryTag delivery tag + * @param ackMultiple acknowledge multiple flag + */ + void init( + const uint64 deliveryTag, + const bool ackMultiple); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + uint64 _deliveryTag; + bool _ackMultiple; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicAckMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicAckMethod); + +}} + +#endif /* BASICACKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicCancelMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicCancelMethod.h new file mode 100644 index 000000000..2c4ed6d0c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicCancelMethod.h @@ -0,0 +1,50 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICCANCELMETHOD_H_ +#define BASICCANCELMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.cancel + */ +class BasicCancelMethod : public IServerMethod { +public: + BasicCancelMethod(); + virtual ~BasicCancelMethod(); + + /** + * @brief Initialize the method + * @param consumerTag the consumer tag associated with the consumer + */ + void init( + const std::string& consumerTag); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _consumerTag; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicCancelMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicCancelMethod); + +}} + +#endif /* BASICCANCELMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicConsumeMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicConsumeMethod.h new file mode 100644 index 000000000..0192eb0e0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicConsumeMethod.h @@ -0,0 +1,64 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICCONSUMEMETHOD_H_ +#define BASICCONSUMEMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/amqpClient.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.consume + */ +class BasicConsumeMethod : public IServerMethod { +public: + BasicConsumeMethod(); + virtual ~BasicConsumeMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param consumerTag consumer tag (or blank for server-generated tag) + * @param noLocal do not send messages to the connection that published them + * @param noAck no acknowledgement needed + * @param exclusive request exclusive consumer access to the queue + * @param arguments additional call arguments + */ + void init( + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const SmartPtrTable& arguments); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + std::string _consumerTag; + bool _noLocal; + bool _noAck; + bool _exclusive; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicConsumeMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicConsumeMethod); + +}} + +#endif /* BASICCONSUMEMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicGetMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicGetMethod.h new file mode 100644 index 000000000..d934c6643 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicGetMethod.h @@ -0,0 +1,53 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICGETMETHOD_H_ +#define BASICGETMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.get + */ +class BasicGetMethod : public IServerMethod { +public: + BasicGetMethod(); + virtual ~BasicGetMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param noAck no acknowledgement (manual acknowledgement) fag + */ + void init( + const std::string& queue, + const bool noAck); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + bool _noAck; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicGetMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicGetMethod); + +}} + +#endif /* BASICGETMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicProperties.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicProperties.h new file mode 100644 index 000000000..42f657378 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicProperties.h @@ -0,0 +1,154 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICPROPERTIES_H_ +#define BASICPROPERTIES_H_ + +#include "amqpClient/api/amqpClient.h" +#include "amqpClient/amqpImpl/IContentHeader.h" +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/api/AmqpContentHeaders.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic properties + */ +class BasicProperties : + public AmqpContentHeaders::BasicProperties, + public IContentHeader { + CAF_DECL_UUID("db3dbcd6-f241-47ff-b17c-d5cf6addabf8") + + CAF_BEGIN_QI() + CAF_QI_ENTRY(AmqpContentHeaders::BasicProperties) + CAF_QI_ENTRY(IContentHeader) + CAF_QI_ENTRY(BasicProperties) + CAF_END_QI() +public: + BasicProperties(); + virtual ~BasicProperties(); + + /** + * @brief Initialize the properties + *

+ * This version creates an object with no properties. Call the setXXX methods + * to add properties. + */ + void init(); + + /** + * @brief Initialize the properties + *

+ * Set the flags property to the binary 'or' (|) of + * BASIC_PROPERTY_XXXX_FLAG constants representing the fields present. + *

+ * Use 0, std::string() or + * SmartPtrTable() to skip initialization of fields not included + * in the object. + */ + void init( + const uint32 flags, + const std::string& contentType, + const std::string& contentEncoding, + const SmartPtrTable& headers, + const uint8 deliveryMode, + const uint8 priority, + const std::string& correlationId, + const std::string& replyTo, + const std::string& expiration, + const std::string& messageId, + const uint64 timestamp, + const std::string& type, + const std::string& userId, + const std::string& appId, + const std::string& clusterId); + + /** + * @brief Converts this class instance into a c-api amqp_basic_properties_t struct. + *

+ * The pointers in the c-api struct point at member of this class. This class instance + * must be realized as int32 as the return properties is in use. + * @param properties the c-api properties structure to be filled out + */ + void getAsApiProperties(amqp_basic_properties_t& properties); + +public: // IContentHeader + void init(const SmartPtrCAmqpFrame& frame); + + uint64 getBodySize(); + +public: // AmqpProperties::BasicProperties, + bool areHeadersAvailable(); + uint32 getFlags(); + std::string getContentType(); + void setContentType(const std::string& contentType); + std::string getContentEncoding(); + void setContentEncoding(const std::string& contentEncoding); + SmartPtrTable getHeaders(); + void setHeaders(const SmartPtrTable& headers); + uint8 getDeliveryMode(); + void setDeliveryMode(const uint8 deliveryMode); + uint8 getPriority(); + void setPriority(const uint8 priority); + std::string getCorrelationId(); + void setCorrelationId(const std::string& correlationId); + std::string getReplyTo(); + void setReplyTo(const std::string& replyTo); + std::string getExpiration(); + void setExpiration(const std::string& expiration); + std::string getMessageId(); + void setMessageId(const std::string& messageId); + uint64 getTimestamp(); + void setTimestamp(const uint64 timestamp); + std::string getType(); + void setType(const std::string& type); + std::string getUserId(); + void setUserId(const std::string& userId); + std::string getAppId(); + void setAppId(const std::string& appId); + std::string getClusterId(); + void setClusterId(const std::string& clusterId); + +public: // IAmqpContentHeader + uint16 getClassId(); + + std::string getClassName(); + +private: + void ValidatePropertyIsSet( + const uint32 flag, + const char* propertyName); + +private: + bool _isInitialized; + uint32 _flags; + uint64 _bodySize; + std::string _contentType; + std::string _contentEncoding; + SmartPtrTable _headers; + uint8 _deliveryMode; + uint8 _priority; + std::string _correlationId; + std::string _replyTo; + std::string _expiration; + std::string _messageId; + uint64 _timestamp; + std::string _type; + std::string _userId; + std::string _appId; + std::string _clusterId; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicProperties); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicProperties); + +}} + +#endif /* BASICPROPERTIES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicPublishMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicPublishMethod.h new file mode 100644 index 000000000..65a9a0d73 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicPublishMethod.h @@ -0,0 +1,67 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICPUBLISHMETHOD_H_ +#define BASICPUBLISHMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.publish + */ +class BasicPublishMethod : public IServerMethod { +public: + BasicPublishMethod(); + virtual ~BasicPublishMethod(); + + /** + * @brief Initialize the method + * @param exchange exchange name + * @param routingKey routing key + * @param mandatory mandatory delivery flag + * @param immediate immediate delivery flag + * @param properties message properties + * @param body message body raw bytes + */ + void init( + const std::string& exchange, + const std::string& routingKey, + bool mandatory, + bool immediate, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _exchange; + std::string _routingKey; + bool _mandatory; + bool _immediate; + AmqpContentHeaders::SmartPtrBasicProperties _properties; + SmartPtrCDynamicByteArray _body; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicPublishMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicPublishMethod); + +}} + +#endif /* BASICPUBLISHMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicQosMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicQosMethod.h new file mode 100644 index 000000000..54ee3b385 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicQosMethod.h @@ -0,0 +1,57 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICQOSMETHOD_H_ +#define BASICQOSMETHOD_H_ + + +#include "amqpClient/amqpImpl/IServerMethod.h" + +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.qos + */ +class BasicQosMethod : public IServerMethod { +public: + BasicQosMethod(); + virtual ~BasicQosMethod(); + + /** + * @brief Initialize the method + * @param prefetchSize prefetch window in octets + * @param prefetchCount prefetch windows in messages + * @param global apply to entire connection + */ + void init( + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + uint32 _prefetchSize; + uint16 _prefetchCount; + bool _global; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicQosMethod); + +}; +CAF_DECLARE_SMART_POINTER(BasicQosMethod); + +}} + +#endif /* BASICQOSMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicRecoverMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicRecoverMethod.h new file mode 100644 index 000000000..45083cd7a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicRecoverMethod.h @@ -0,0 +1,52 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICRECOVERMETHOD_H_ +#define BASICRECOVERMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.recover + */ +class BasicRecoverMethod : public IServerMethod { +public: + BasicRecoverMethod(); + virtual ~BasicRecoverMethod(); + + /** + * @brief Initialize the method + * @param requeue if false, the message will be redelivered to the + * original receipient. If true, the server will attempt to requeue + * the message, potentially delivering it to an alternative subscriber. + */ + void init( + const bool requeue); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + bool _requeue; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicRecoverMethod); + +}; +CAF_DECLARE_SMART_POINTER(BasicRecoverMethod); + +}} + +#endif /* BASICRECOVERMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicRejectMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicRejectMethod.h new file mode 100644 index 000000000..297430353 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/BasicRejectMethod.h @@ -0,0 +1,55 @@ +/* + * Created on: Aug 1, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICREJECTMETHOD_H_ +#define BASICREJECTMETHOD_H_ + + +#include "amqpClient/amqpImpl/IServerMethod.h" + +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.Reject + */ +class BasicRejectMethod : public IServerMethod { +public: + BasicRejectMethod(); + virtual ~BasicRejectMethod(); + + /** + * @brief Initialize the method + * @param deliveryTag delivery tag + * @param requeue requeue flag + */ + void init( + const uint64 deliveryTag, + const bool requeue); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + uint64 _deliveryTag; + bool _requeue; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicRejectMethod); +}; +CAF_DECLARE_SMART_POINTER(BasicRejectMethod); + +}} + +#endif /* BASICREJECTMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ChannelCloseOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ChannelCloseOkMethod.h new file mode 100644 index 000000000..fe1570162 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ChannelCloseOkMethod.h @@ -0,0 +1,46 @@ +/* + * Created on: May 17, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CHANNELCLOSEOKMETHOD_H_ +#define CHANNELCLOSEOKMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementatin of AMQP channel.close-ok + */ +class ChannelCloseOkMethod :public IServerMethod { +public: + ChannelCloseOkMethod(); + virtual ~ChannelCloseOkMethod(); + + /** + * Initialize the method + */ + void init(); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChannelCloseOkMethod); +}; +CAF_DECLARE_SMART_POINTER(ChannelCloseOkMethod); + +}} + +#endif /* CHANNELCLOSEOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/EnvelopeImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/EnvelopeImpl.h new file mode 100644 index 000000000..6b1d8c12a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/EnvelopeImpl.h @@ -0,0 +1,58 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef ENVELOPEIMPL_H_ +#define ENVELOPEIMPL_H_ + +#include "amqpClient/api/Envelope.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of Envelope + */ +class EnvelopeImpl : public Envelope { +public: + EnvelopeImpl(); + virtual ~EnvelopeImpl(); + + /** + * @brief Initialize the object + * @param deliveryTag delivery tag + * @param redelivered redelivered flag + * @param exchange exchange name + * @param routingKey routing key + */ + void init( + const uint64 deliveryTag, + const bool redelivered, + const std::string& exchange, + const std::string& routingKey); + +public: // Envelope + uint64 getDeliveryTag(); + bool getRedelivered(); + std::string getExchange(); + std::string getRoutingKey(); + +private: + bool _isInitialized; + uint64 _deliveryTag; + bool _redelivered; + std::string _exchange; + std::string _routingKey; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(EnvelopeImpl); +}; +CAF_DECLARE_SMART_POINTER(EnvelopeImpl); + +}} + +#endif /* ENVELOPEIMPL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ExchangeDeclareMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ExchangeDeclareMethod.h new file mode 100644 index 000000000..76a2e70ab --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ExchangeDeclareMethod.h @@ -0,0 +1,61 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef EXCHANGEDECLAREMETHOD_H_ +#define EXCHANGEDECLAREMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/amqpClient.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP exchange.declare + */ +class ExchangeDeclareMethod : public IServerMethod { +public: + ExchangeDeclareMethod(); + virtual ~ExchangeDeclareMethod(); + + /** + * @brief Initializes the method + * @param exchange exchange name + * @param type exchange type + * @param passive passive mode call + * @param durable request a durable exchange + * @param arguments declaration arguments + */ + void init( + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const SmartPtrTable& arguments); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _exchange; + std::string _type; + bool _passive; + bool _durable; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ExchangeDeclareMethod); +}; +CAF_DECLARE_SMART_POINTER(ExchangeDeclareMethod); + +}} +#endif /* EXCHANGEDECLAREMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ExchangeDeleteMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ExchangeDeleteMethod.h new file mode 100644 index 000000000..2a77c7918 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/ExchangeDeleteMethod.h @@ -0,0 +1,53 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef EXCHANGEDELETEMETHOD_H_ +#define EXCHANGEDELETEMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP exchange.delete + */ +class ExchangeDeleteMethod : public IServerMethod { +public: + ExchangeDeleteMethod(); + virtual ~ExchangeDeleteMethod(); + + /** + * @brief Initializes the method + * @param exchange exchange name + * @param ifUnused delete only if unused flag + */ + void init( + const std::string& exchange, + const bool ifUnused); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _exchange; + bool _ifUnused; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ExchangeDeleteMethod); + +}; +CAF_DECLARE_SMART_POINTER(ExchangeDeleteMethod); + +}} + +#endif /* EXCHANGEDELETEMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/FieldImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/FieldImpl.h new file mode 100644 index 000000000..ca02c2922 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/FieldImpl.h @@ -0,0 +1,40 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef FIELDIMPL_H_ +#define FIELDIMPL_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of a Field object + */ +class FieldImpl : public Field { +public: + FieldImpl(); + virtual ~FieldImpl(); + +public: // Field + AmqpFieldType getAmqpType() const; + + GVariant* getValue() const; + + void setTypeAndValue(AmqpFieldType type, GVariant *value); + +private: + AmqpFieldType _type; + GVariant *_value; + CAF_CM_DECLARE_NOCOPY(FieldImpl); +}; +CAF_DECLARE_SMART_POINTER(FieldImpl); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/GetResponseImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/GetResponseImpl.h new file mode 100644 index 000000000..a9c29e075 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/GetResponseImpl.h @@ -0,0 +1,66 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef GETRESPONSEIMPL_H_ +#define GETRESPONSEIMPL_H_ + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/Envelope.h" +#include "amqpClient/api/GetResponse.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Impelementation of the GetResponse interface + *

+ * A class to bundle together the information from a received message. The content is + * packaged into an Envelope, BasicProperties and the body for easier consumption as + * a single unit. + */ +class GetResponseImpl : public GetResponse { +public: + GetResponseImpl(); + virtual ~GetResponseImpl(); + + /** + * @brief Object initializer + * @param envelope the message envelope + * @param properties the messsage properties + * @param body the message body in raw bytes + * @param messageCount the number of messages remaining in the queue + */ + void init( + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body, + const uint32 messageCount); + +public: // GetResponse + SmartPtrEnvelope getEnvelope(); + AmqpContentHeaders::SmartPtrBasicProperties getProperties(); + SmartPtrCDynamicByteArray getBody(); + uint32 getMessageCount(); + +private: + bool _isInitialized; + SmartPtrEnvelope _envelope; + AmqpContentHeaders::SmartPtrBasicProperties _properties; + SmartPtrCDynamicByteArray _body; + uint32 _messageCount; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(GetResponseImpl); +}; +CAF_DECLARE_SMART_POINTER(GetResponseImpl); + +}} + +#endif /* GETRESPONSEIMPL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IContentHeader.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IContentHeader.h new file mode 100644 index 000000000..d65479323 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IContentHeader.h @@ -0,0 +1,41 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef ICONTENTHEADER_H_ +#define ICONTENTHEADER_H_ + +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/api/ContentHeader.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Base interface for AMQP content header implementation objects + */ +struct __declspec(novtable) IContentHeader : public ContentHeader { + CAF_DECL_UUID("04068590-3083-446E-83AE-DACD90C0F470") + + /** + * @brief Initialize the header object from c-api properties data + * @param properties the properties data + */ + virtual void init(const SmartPtrCAmqpFrame& frame) = 0; + + /** + * @brief Return the expected method body data size + * @return the expected body size + */ + virtual uint64 getBodySize() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IContentHeader); + +}} + +#endif /* ICONTENTHEADER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IMethod.h new file mode 100644 index 000000000..c2070b477 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IMethod.h @@ -0,0 +1,40 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef IMETHOD_H_ +#define IMETHOD_H_ + +#include "amqpClient/api/Method.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Base interface for AMQP method implementation objects + */ +struct __declspec(novtable) IMethod : public Method { + CAF_DECL_UUID("08ba9874-b34c-4afe-bfdc-a12fffaefddb") + + /** + * @brief Initialize the object from c-api method data + * @param method the method data + */ + virtual void init(const amqp_method_t * const method) = 0; + + /** + * @retval true if the method expects a content header + * @retval false if the method does not expect a content header + */ + virtual bool hasContent() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IMethod); + +}} + +#endif /* IMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IServerMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IServerMethod.h new file mode 100644 index 000000000..ae0e982ac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/IServerMethod.h @@ -0,0 +1,44 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef ISERVERMETHOD_H_ +#define ISERVERMETHOD_H_ + + +#include "ICafObject.h" + +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Base interface for server methods + */ +struct __declspec(novtable) IServerMethod : public ICafObject { + CAF_DECL_UUID("ce585a8d-8b49-4312-b356-6f612142b154") + + /** + * Return the method name + * @return the method name + */ + virtual std::string getMethodName() const = 0; + + /** + * Sends the command to the server + * @param channel AMQP channel + * @return the c-api AMQPStatus of the call + */ + virtual AMQPStatus send(const SmartPtrCAmqpChannel& channel) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IServerMethod); + +}} + +#endif /* ISERVERMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueBindMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueBindMethod.h new file mode 100644 index 000000000..fb7f4cf4c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueBindMethod.h @@ -0,0 +1,59 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QUEUEBINDMETHOD_H_ +#define QUEUEBINDMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/amqpClient.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.bind + */ +class QueueBindMethod : public IServerMethod { +public: + QueueBindMethod(); + virtual ~QueueBindMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param exchange exchange name + * @param routingKey routing key + * @param arguments binding arguments + */ + void init( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + std::string _exchange; + std::string _routingKey; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueBindMethod); +}; +CAF_DECLARE_SMART_POINTER(QueueBindMethod); + +}} + +#endif /* QUEUEBINDMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueDeclareMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueDeclareMethod.h new file mode 100644 index 000000000..545508140 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueDeclareMethod.h @@ -0,0 +1,88 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QUEUEDECLAREMETHOD_H_ +#define QUEUEDECLAREMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/amqpClient.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.declare + */ +class QueueDeclareMethod : + public IServerMethod { +public: + QueueDeclareMethod(); + virtual ~QueueDeclareMethod(); + + /** + * @brief Initialize the method using defaults + *

+ * The defaults are: + * + * + * + * + * + * + * + * + *
ParameterValue
queueblank - the server will generate a queue name
durablefalse - the queue will not be durable
exclusivetrue - the queue will be exclusive to this conenction
autoDeletetrue - the queue will be deleted when no longer used
+ */ + void init(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param durable durable queue flag + * @param exclusive exclusive queue flag + * @param autoDelete delete when no longer in use flag + * @param arguments method arguments + */ + void init( + const std::string& queue, + bool durable, + bool exclusive, + bool autoDelete, + const SmartPtrTable& arguments); + + /** + * @brief Initialize the method in passive mode + * @param queue queue name + */ + void initPassive( + const std::string& queue); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + bool _passive; + bool _durable; + bool _exclusive; + bool _autoDelete; + bool _noWait; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueDeclareMethod); +}; +CAF_DECLARE_SMART_POINTER(QueueDeclareMethod); + +}} + +#endif /* QUEUEDECLAREMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueDeleteMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueDeleteMethod.h new file mode 100644 index 000000000..cdb0ea323 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueDeleteMethod.h @@ -0,0 +1,56 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QUEUEDELETEMETHOD_H_ +#define QUEUEDELETEMETHOD_H_ + +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.delete + */ +class QueueDeleteMethod : public IServerMethod { +public: + QueueDeleteMethod(); + virtual ~QueueDeleteMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param ifUnused delete if queue is not in use flag + * @param ifEmpty delete is queue is empty flag + */ + void init( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + bool _ifUnused; + bool _ifEmpty; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueDeleteMethod); + +}; +CAF_DECLARE_SMART_POINTER(QueueDeleteMethod); + +}} + +#endif /* QUEUEDELETEMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueuePurgeMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueuePurgeMethod.h new file mode 100644 index 000000000..750e9be15 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueuePurgeMethod.h @@ -0,0 +1,52 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QUEUEPURGEMETHOD_H_ +#define QUEUEPURGEMETHOD_H_ + + +#include "amqpClient/amqpImpl/IServerMethod.h" + +#include "amqpClient/CAmqpChannel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.purge + */ +class QueuePurgeMethod : public IServerMethod { +public: + QueuePurgeMethod(); + virtual ~QueuePurgeMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + */ + void init( + const std::string& queue); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueuePurgeMethod); + +}; +CAF_DECLARE_SMART_POINTER(QueuePurgeMethod); + +}} + +#endif /* QUEUEPURGEMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueUnbindMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueUnbindMethod.h new file mode 100644 index 000000000..dc65ce730 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/amqpImpl/QueueUnbindMethod.h @@ -0,0 +1,61 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QUEUEUNBINDMETHOD_H_ +#define QUEUEUNBINDMETHOD_H_ + + +#include "amqpClient/amqpImpl/IServerMethod.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/amqpClient.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.unbind + */ +class QueueUnbindMethod : public IServerMethod { +public: + QueueUnbindMethod(); + virtual ~QueueUnbindMethod(); + + /** + * @brief Initialize the method + * @param queue queue name + * @param exchange exchange name + * @param routingKey routing key + * @param arguments method arguments + */ + void init( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments); + +public: // IServerMethod + std::string getMethodName() const; + + AMQPStatus send(const SmartPtrCAmqpChannel& channel); + +private: + bool _isInitialized; + std::string _queue; + std::string _exchange; + std::string _routingKey; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueUnbindMethod); + +}; +CAF_DECLARE_SMART_POINTER(QueueUnbindMethod); + +}} + +#endif /* QUEUEUNBINDMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AMQExceptions.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AMQExceptions.h new file mode 100644 index 000000000..ecf794354 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AMQExceptions.h @@ -0,0 +1,122 @@ +/* + * Created on: May 3, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_AMQEXCEPTIONS_H_ +#define AMQPCLIENTAPI_AMQEXCEPTIONS_H_ + +#include "Exception/CCafException.h" +#include "amqpClient/AmqpClientLink.h" + +#define AMQP_CM_DECLARE_EXCEPTION_CLASS(_exclass_) \ +class AMQPCLIENT_LINKAGE _exclass_ : public Caf::CCafException { \ +public: \ + _exclass_(); \ + virtual ~_exclass_(); \ + void throwSelf(); \ + void throwAddRefedSelf(); \ +private: \ + _exclass_(const _exclass_ &); \ + _exclass_ & operator=(const _exclass_ &); \ +}; \ +typedef TCafSmartPtr<_exclass_, TCafObject<_exclass_> > SmartPtr##_exclass_ + +#define AMQP_CM_DEFINE_EXCEPTION_CLASS(_exclass_) \ + _exclass_::_exclass_() : CCafException( #_exclass_ ) {} \ + _exclass_::~_exclass_() {} \ + void _exclass_::throwSelf() { throw this; } \ + void _exclass_::throwAddRefedSelf() { this->AddRef(); throw this; } + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @brief Exceptions defined by this library + */ +namespace AmqpExceptions { + +/** @brief Unmapped AMQP exception */ +//AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpException); +class AMQPCLIENT_LINKAGE AmqpException : public Caf::CCafException { +public: + AmqpException(); + virtual ~AmqpException(); + void throwSelf(); + void throwAddRefedSelf(); +private: + AmqpException(const AmqpException &); + AmqpException & operator=(const AmqpException &); +}; +typedef TCafSmartPtr > SmartPtrAmqpException; + +/** @brief AMQP_ERROR_TIMEOUT exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpTimeoutException); + +/** @brief AMQP_ERROR_NO_MEMORY exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpNoMemoryException); + +/** @brief AMQP_ERROR_INVALID_HANDLE exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpInvalidHandleException); + +/** @brief AMQP_ERROR_INVALID_ARGUMENT exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpInvalidArgumentException); + +/** @brief AMQP_ERROR_WRONG_STATE exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpWrongStateException); + +/** @brief AMQP_ERROR_TOO_MANY_CHANNELS exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpTooManyChannelsException); + +/** @brief AMQP_ERROR_QUEUE_FULL exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpQueueFullException); + +/** @brief AMQP_ERROR_FRAME_TOO_LARGE exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpFrameTooLargeException); + +/** @brief AMQP_ERROR_IO_ERROR exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpIoErrorException); + +/** @brief AMQP_ERROR_PROTOCOL_ERROR exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpProtocolErrorException); + +/** @brief AMQP_ERROR_UNIMPLEMENTED exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpUnimplementedException); + +/** @brief AMQP_ERROR_IO_INTERRUPTED exception */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(AmqpIoInterruptedException); + +// Processing exceptions + +/** @brief Unexpected frame */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(UnexpectedFrameException); + +/** @brief Unknown class or method */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(UnknownClassOrMethodException); + +/** @brief Connection is closed */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ConnectionClosedException); + +/** @brief Channel is closed */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedException); + +/** @brief Connection closed because of an error */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ConnectionUnexpectedCloseException); + +/** @brief Connection closed because of an I/O error */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ConnectionClosedByIOException); + +/** @brief Channel closed by server because of an error */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedByServerException); + +/** @brief Channel closed by the application because it is shutting down */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedByShutdownException); + +/** @brief Channel closed by the application user under normal circumstances */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelClosedByUserException); + +}}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Address.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Address.h new file mode 100644 index 000000000..5dd81e44c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Address.h @@ -0,0 +1,89 @@ +/* + * Created on: May 4, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_ADDRESS_H_ +#define AMQPCLIENTAPI_ADDRESS_H_ + +namespace Caf { namespace AmqpClient { + +/** Supported Protocols */ +typedef enum { + PROTOCOL_AMQP = 0, + PROTOCOL_AMQPS, + PROTOCOL_TUNNEL +} Protocol; + +/** + * @author mdonahue + * @brief A representation of a broker network address + */ +class Address { +public: + Address(); + virtual ~Address(); + +public: + /** + * @brief Construct an address from a protocol, host name, and port number + * @param protocol the communication protocol (tcp, ssl, etc.) + * @param host the host name or dotted ip address + * @param port the port number + */ + void initialize( + const std::string& protocol, + const std::string& host, + const uint32& port, + const std::string& virtualHost = std::string()); + + /** + * @return the protocol + */ + Protocol getProtocol() const; + + /** + * @return the protocol + */ + std::string getProtocolStr() const; + + /** + * @return the host name + */ + std::string getHost() const; + + /** + * @return the port number + */ + uint32 getPort() const; + + std::string getVirtualHost() const; + + std::string toString() const; + +private: + Protocol translateProtocol( + const std::string& protocol, + const std::string& host) const; + +private: + bool _isInitialized; + std::string _protocolStr; + Protocol _protocol; + std::string _host; + uint32 _port; + std::string _virtualHost; + std::string _toString; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(Address); +}; +CAF_DECLARE_SMART_POINTER(Address); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AmqpContentHeaders.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AmqpContentHeaders.h new file mode 100644 index 000000000..9001b9b83 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AmqpContentHeaders.h @@ -0,0 +1,201 @@ +/* + * Created on: May 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_AMQPCONTENTHEADERS_H_ +#define AMQPCLIENTAPI_AMQPCONTENTHEADERS_H_ + +#include "amqpClient/api/amqpClient.h" +#include "amqpClient/amqpImpl/BasicProperties.h" + +namespace Caf { namespace AmqpClient { + +/** + * @ingroup AmqpApi + * @brief AMQP content header objects */ +namespace AmqpContentHeaders { + +/** @brief content type property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CONTENT_TYPE_FLAG; +/** @brief content encoding property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CONTENT_ENCODING_FLAG; +/** @brief headers are present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_HEADERS_FLAG; +/** @brief delivery mode property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_DEVLIVERY_MODE_FLAG; +/** @brief priority property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_PRIORITY_FLAG; +/** @brief correlation id property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CORRELATION_ID_FLAG; +/** @brief reply to property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_REPLY_TO_FLAG; +/** @brief expiration property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_EXPIRATION_FLAG; +/** @brief message id property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_MESSAGE_ID_FLAG; +/** @brief timestamp property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_TIMESTAMP_FLAG; +/** @brief type property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_TYPE_FLAG; +/** @brief user id property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_USER_ID_FLAG; +/** @brief app id property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_APP_ID_FLAG; +/** @brief cluster id property is present */ +extern AMQPCLIENT_LINKAGE const uint32 BASIC_PROPERTY_CLUSTER_ID_FLAG; + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Basic properties class + *

+ * Review the AMQP protocol documentation for more information. + */ +struct __declspec(novtable) BasicProperties : public ContentHeader { + CAF_DECL_UUID("A6DEE271-36C7-4B46-8EA8-F1F0E3493FC4") + + /** @return are the headers available? */ + virtual bool areHeadersAvailable() = 0; + + /** + * @remark + * Use the binary 'and' (&) to test the flags against the + * BASIC_PROPERTY_XXXXX_FLAGS + * @return the bits representing the properties present in the object + */ + virtual uint32 getFlags() = 0; + + /** @return the content type */ + virtual std::string getContentType() = 0; + + /** @brief Set the content type */ + virtual void setContentType(const std::string& contentType) = 0; + + /** @return the content encoding */ + virtual std::string getContentEncoding() = 0; + + /** @brief Set the content encoding */ + virtual void setContentEncoding(const std::string& contentEncoding) = 0; + + /** @return the message headers */ + virtual SmartPtrTable getHeaders() = 0; + + /** @brief Set the headers */ + virtual void setHeaders(const SmartPtrTable& headers) = 0; + + /** @return the delivery mode */ + virtual uint8 getDeliveryMode() = 0; + + /** @brief Set the delivery mode */ + virtual void setDeliveryMode(const uint8 deliveryMode) = 0; + + /** @return the priority */ + virtual uint8 getPriority() = 0; + + /** @brief Set the priority */ + virtual void setPriority(const uint8 priority) = 0; + + /** @return the correlation id */ + virtual std::string getCorrelationId() = 0; + + /** @brief Set the correlation id */ + virtual void setCorrelationId(const std::string& correlationId) = 0; + + /** @return the reply to */ + virtual std::string getReplyTo() = 0; + + /** @brief Set the reply to */ + virtual void setReplyTo(const std::string& replyTo) = 0; + + /** @return the expiration */ + virtual std::string getExpiration() = 0; + + /** @brief Set the expiration */ + virtual void setExpiration(const std::string& expiration) = 0; + + /** @return the message id */ + virtual std::string getMessageId() = 0; + + /** @brief Set the message id */ + virtual void setMessageId(const std::string& messageId) = 0; + + /** @return the timestamp */ + virtual uint64 getTimestamp() = 0; + + /** @brief Set the timestamp */ + virtual void setTimestamp(const uint64 timestamp) = 0; + + /** @return the type */ + virtual std::string getType() = 0; + + /** @brief set the type */ + virtual void setType(const std::string& type) = 0; + + /** @return the user id */ + virtual std::string getUserId() = 0; + + /** @brief Set the user id */ + virtual void setUserId(const std::string& userId) = 0; + + /** @return the app id */ + virtual std::string getAppId() = 0; + + /** @brief Set the app id */ + virtual void setAppId(const std::string& appId) = 0; + + /** @return the cluster id */ + virtual std::string getClusterId() = 0; + + /** @brief Set the cluster id */ + virtual void setClusterId(const std::string& clusterId) = 0; +}; +CAF_DECLARE_SMART_POINTER(BasicProperties); + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Create a #Caf::AmqpClient::AmqpContentHeaders::BasicProperties object to be + * sent with a message. + *

+ * The object is created with no fields set. You must call the setXXX + * methods before publishing the message. + * @return an unpopulated basic properties object + */ +SmartPtrBasicProperties AMQPCLIENT_LINKAGE createBasicProperties(); + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Create an object containing #Caf::AmqpClient::AmqpContentHeaders::BasicProperties + * to be sent with a message + *

+ * Set the flags property to the binary 'or' (|) of + * BASIC_PROPERTY_XXXX_FLAG constants representing the fields present. + *

+ * Use 0, std::string() or + * SmartPtrTable() to skip initialization of fields not included + * in the object. + * @return a basic properties object + */ +SmartPtrBasicProperties AMQPCLIENT_LINKAGE createBasicProperties( + const uint32 flags, + const std::string& contentType, + const std::string& contentEncoding, + const SmartPtrTable& headers, + const uint8 deliveryMode, + const uint8 priority, + const std::string& correlationId, + const std::string& replyTo, + const std::string& expiration, + const std::string& messageId, + const uint64 timestamp, + const std::string& type, + const std::string& userId, + const std::string& appId, + const std::string& clusterId); +}}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AmqpMethods.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AmqpMethods.h new file mode 100644 index 000000000..5a6c63be5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/AmqpMethods.h @@ -0,0 +1,299 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_AMQPMETHODS_H_ +#define AMQPCLIENTAPI_AMQPMETHODS_H_ + +#include "amqpClient/api/Method.h" + +namespace Caf { namespace AmqpClient { namespace AmqpMethods { + +#if (1) // basic +/** + * @brief AMQP Basic methods + * @ingroup AmqpApi + */ +namespace Basic { + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.get-ok method parameters + */ +struct __declspec(novtable) GetOk : public Method { + CAF_DECL_UUID("A3CD4488-B600-4AC6-9513-03021AC06345") + + /** @return the delivery tag used for basic.ack calls */ + virtual uint64 getDeliveryTag() = 0; + + /** + * @retval true if the message was redelivered + * @retval false if the message has not been redlivered + */ + virtual bool getRedelivered() = 0; + + /** @return the name of the exchange supplying the message */ + virtual std::string getExchange() = 0; + + /** @return the message's routing key */ + virtual std::string getRoutingKey() = 0; + + /** @return the number of messages remaining in the queue */ + virtual uint32 getMessageCount() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(GetOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.get-empty method parameters + */ +struct __declspec(novtable) GetEmpty : public Method { + CAF_DECL_UUID("6bcd3e9e-e2b1-4824-b455-acad073737c5") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(GetEmpty); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.consume-ok method parameters + */ +struct __declspec(novtable) ConsumeOk : public Method { + CAF_DECL_UUID("29E385DA-37FB-48E4-9F6D-463555C9DDDC") + + virtual std::string getConsumerTag() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ConsumeOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.deliver method parameters + */ +struct __declspec(novtable) Deliver : public Method { + CAF_DECL_UUID("2AD74C5E-CC9D-4A6C-9738-DA836BC25FCA") + + /** @return the consumer tag associated with the consumer */ + virtual std::string getConsumerTag() = 0; + + /** @return the delivery tag used for basic.ack calls */ + virtual uint64 getDeliveryTag() = 0; + + /** + * @retval true if the message was redelivered + * @retval false if the message has not been redlivered + */ + virtual bool getRedelivered() = 0; + + /** @return the name of the exchange supplying the message */ + virtual std::string getExchange() = 0; + + /** @return the message's routing key */ + virtual std::string getRoutingKey() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Deliver); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.consume-ok method parameters + */ +struct __declspec(novtable) CancelOk : public Method { + CAF_DECL_UUID("759CEE2C-FDA5-4A2A-BFE0-617A879D05BF") + + /** @return the consumer tag associated with the consumer */ + virtual std::string getConsumerTag() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(CancelOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.return method parameters + */ +struct __declspec(novtable) Return : public Method { + CAF_DECL_UUID("000A440E-AEE4-418E-B9A0-9857F5C20283") + + /** @return the reply code */ + virtual uint16 getReplyCode() = 0; + + /** @return the reply text */ + virtual std::string getReplyText() = 0; + + /** @return the exchnage name */ + virtual std::string getExchange() = 0; + + /** @return the routing key */ + virtual std::string getRoutingKey() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Return); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.recover-ok method parameters + */ +struct __declspec(novtable) RecoverOk : public Method { + CAF_DECL_UUID("DF71DC22-B65C-44FC-A0F4-EFAC181E2F69") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(RecoverOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the basic.qos-ok method + */ +struct __declspec(novtable) QosOk : public Method { + CAF_DECL_UUID("D5710B1C-DE05-42F5-9695-95364C1D9468") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(QosOk); + +} // namespace Basic +#endif + +#if (1) // channel +/** + * @ingroup AmqpApi + * @brief AMQP Channel methods + */ +namespace Channel { + +/** + * @ingroup AmqpApi + * @brief Interface representing the channel.open-ok method parameters + */ +struct __declspec(novtable) OpenOk : public Method { + CAF_DECL_UUID("4c027f40-db11-4a72-ac2e-cc8da89035cb") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(OpenOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the channel.close method parameters + */ +struct __declspec(novtable) Close : public Method { + CAF_DECL_UUID("45d0c75f-ff48-4552-9a83-498efa5f6ad2") + + /** @return the reply code */ + virtual uint16 getReplyCode() = 0; + + /** @return the reply text */ + virtual std::string getReplyText() = 0; + + /** @return the class id of the method that caused the close */ + virtual uint16 getClassId() = 0; + + /** @return the method id of the method that caused the close */ + virtual uint16 getMethodId() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Close); + +/** + * @ingroup AmqpApi + * @brief Interface representing the channel.close-ok method parameters + */ +struct __declspec(novtable) CloseOk : public Method { + CAF_DECL_UUID("DAF11BD3-06B6-4FA4-AC80-2B0959D2297D") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(CloseOk); + +} // namespace Channel +#endif + +#if (1) // exchange +/** + * @ingroup AmqpApi + * @brief AMQP Exchange methods + */ +namespace Exchange { + +/** + * @ingroup AmqpApi + * @brief Interface representing the exchange.declare-ok method parameters + */ +struct __declspec(novtable) DeclareOk : public Method { + CAF_DECL_UUID("e54d9fff-7905-4e18-b1e8-090279a5cffe") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(DeclareOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the exchange.delete-ok method parameters + */ +struct __declspec(novtable) DeleteOk : public Method { + CAF_DECL_UUID("9f13d0fb-1bdd-473a-873a-58e948bc256c") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(DeleteOk); + +} // namespace Exchange +#endif + +#if (1) // queue +/** + * @ingroup AmqpApi + * @brief AMQP Queue methods + */ +namespace Queue { + +/** + * @ingroup AmqpApi + * @brief Interface representing the queue.declare-ok method parameters + */ +struct __declspec(novtable) DeclareOk : public Method { + CAF_DECL_UUID("EB96E48E-DF40-4D5F-A41F-7F4EBEBE2BE1") + + /** @return the name of the queue */ + virtual std::string getQueueName() = 0; + + /** @return the number of messages in the queue */ + virtual uint32 getMessageCount() = 0; + + /** @return the number of active consumers for the queue */ + virtual uint32 getConsumerCount() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(DeclareOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the queue.delete-ok method parameters + */ +struct __declspec(novtable) DeleteOk : public Method { + CAF_DECL_UUID("34f4b342-7ab0-44d5-b007-4eec141a4435") + + /** @return the number of messages deleted */ + virtual uint32 getMessageCount() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(DeleteOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the queue.delete-ok method parameters + */ +struct __declspec(novtable) PurgeOk : public Method { + CAF_DECL_UUID("63bcf694-5ac3-4067-8134-659133986099") + + /** @return the number of messages deleted */ + virtual uint32 getMessageCount() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(PurgeOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the queue.bind-ok method parameters + */ +struct __declspec(novtable) BindOk : public Method { + CAF_DECL_UUID("1a60c168-24d1-4184-a5ec-fcf9fca70994") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(BindOk); + +/** + * @ingroup AmqpApi + * @brief Interface representing the queue.unbind-ok method parameters + */ +struct __declspec(novtable) UnbindOk : public Method { + CAF_DECL_UUID("edf78de1-eee4-44c0-9051-e4f6ee80c0a2") +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(UnbindOk); + +} // namespace Queue +#endif + +}}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/CertInfo.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/CertInfo.h new file mode 100644 index 000000000..2b756ea97 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/CertInfo.h @@ -0,0 +1,49 @@ +/* + * Created on: May 4, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_CERTINFO_H_ +#define AMQPCLIENTAPI_CERTINFO_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author bwilliams + * @brief A representation of Cert Info + */ +class CertInfo { +public: + CertInfo(); + virtual ~CertInfo(); + +public: + void initialize( + const std::string& caCertPath, + const std::string& clientCertPath, + const std::string& clientKeyPath); + + std::string getCaCertPath() const; + + std::string getClientCertPath() const; + + std::string getClientKeyPath() const; + +private: + bool _isInitialized; + std::string _caCertPath; + std::string _clientCertPath; + std::string _clientKeyPath; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CertInfo); +}; +CAF_DECLARE_SMART_POINTER(CertInfo); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Channel.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Channel.h new file mode 100644 index 000000000..eaab84ac5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Channel.h @@ -0,0 +1,441 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_CHANNEL_H_ +#define AMQPCLIENTAPI_CHANNEL_H_ + + +#include "ICafObject.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/AmqpMethods.h" +#include "amqpClient/api/Consumer.h" +#include "amqpClient/api/GetResponse.h" +#include "amqpClient/api/ReturnListener.h" +#include "amqpClient/api/amqpClient.h" +#include "amqpClient/api/AmqpContentHeaders.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface to an AMQP channel + */ +struct __declspec(novtable) Channel : public ICafObject { + + /** @return the channel number */ + virtual uint16 getChannelNumber() = 0; + + /** @brief Closes the channel */ + virtual void close() = 0; + + /** + * @brief Returns the state of the channel + * @retval true the Channel is open + * @retval false the Channel is closed + */ + virtual bool isOpen() = 0; + + /** + * @brief Acknowledge on or more messages + *

+ * Acknowledges one or more messages delivered via the Deliver or + * Get-Ok methods. The client can ask to confirm a single message or a set of + * messages up to and including a specific message. + * + * @param deliveryTag the message's delivery tag + * @param ackMultiple acknowledge multiple messages

+ * If set to true, the delivery tag is treated as "up to and + * including", so that the client can acknowledge multiple messages with a single + * method. If set to false, the delivery tag refers to a single + * message. If the multiple field is true, and the delivery tag + * is 0, the server will acknowledge all outstanding messages. + */ + virtual void basicAck( + const uint64 deliveryTag, + const bool ackMultiple) = 0; + + /** + * @brief Provides a direct access to the messages in a queue + *

+ * This method provides a direct access to the messages in a queue using a + * synchronous dialogue that is designed for specific types of application where + * synchronous functionality is more important than performance. + * + * @param queue the queue name + * @param noAck no acknowledgment needed. If true, the server does not + * expect acknowledgements for messages. That is, when a message is delivered to the client + * the server assumes the delivery will succeed and immediately dequeues it. This + * functionality may increase performance but at the cost of reliability. Messages can get + * lost if a client dies before they are delivered to the application. + * @return message as a GetResponse object or + * a null object if there is no message available. + */ + virtual SmartPtrGetResponse basicGet( + const std::string& queue, + const bool noAck) = 0; + + /** + * @brief Publishes a message to a specific exchange + *

+ * This method publishes a message to a specific exchange. The message will be routed + * to queues as defined by the exchange configuration and distributed to any active + * consumers when the transaction, if any, is committed. + * @param exchange specifies the name of the exchange to publish to. The exchange + * name can be empty, meaning the default exchange. + * @param routingKey specifies the routing key for the message. + * @param properties specifies a #Caf::AmqpClient::AmqpContentHeaders::BasicProperties + * object containing properties and headers to publish with the message. + * @param body specifies the message body in raw bytes. + */ + virtual void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) = 0; + + /** + * @brief Publishes a message to a specific exchange + *

+ * This method publishes a message to a specific exchange with control over the + * mandatory and immediate bits. + * The message will be routed to queues as defined by the exchange configuration and + * distributed to any active consumers when the transaction, if any, is committed. + * @param exchange specifies the name of the exchange to publish to. The exchange + * name can be empty, meaning the default exchange. + * @param routingKey specifies the routing key for the message. + * @param mandatory specifies how the server is to react if the message cannot be routed + * to a queue. If true, the server will return an unroutable message + * with a Return method. If false, the server silently drops the + * message. + * @param immediate specifies how the server is to react if the message cannot be routed + * to a queue consumer immediately. If true, the server will return an + * undeliverable message with a Return method. If false, + * the server will queue the message, but with no guarantee that it will ever be + * consumed. + * @param properties specifies a #Caf::AmqpClient::AmqpContentHeaders::BasicProperties + * object containing properties and headers to publish with the message. + * @param body specifies the message body in raw bytes. + */ + virtual void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) = 0; + + /** + * @brief Starts a queue consumer + *

+ * This method asks the server to start a 'consumer', which is a transient request for + * messages from a specific queue. Consumers last as int32 as the channel they were + * declared on, or until the client cancels them.
+ * The arguments noAck, noLocal and + * exclusive are false and the server will + * genearate the consumer tag. + * @param queue queue name + * @param consumer an interface to the consumer object + * @return a #Caf::AmqpClient::AmqpMethods::Basic::ConsumeOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const SmartPtrConsumer& consumer) = 0; + + /** + * @brief Starts a queue consumer + *

+ * This method asks the server to start a 'consumer', which is a transient request for + * messages from a specific queue. Consumers last as int32 as the channel they were + * declared on, or until the client cancels them.
+ * The arguments noLocal and exclusive are + * false and the server will genearate the consumer tag. + * @param queue queue name + * @param noAck no acknowledgment needed. If true, the server does not + * expect acknowledgements for messages. That is, when a message is delivered to the client + * the server assumes the delivery will succeed and immediately dequeues it. This + * functionality may increase performance but at the cost of reliability. Messages can get + * lost if a client dies before they are delivered to the application. + * @param consumer an interface to the consumer object + * @return a #Caf::AmqpClient::AmqpMethods::Basic::ConsumeOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const bool noAck, + const SmartPtrConsumer& consumer) = 0; + + /** + * @brief Starts a queue consumer + *

+ * This method asks the server to start a 'consumer', which is a transient request for + * messages from a specific queue. Consumers last as int32 as the channel they were + * declared on, or until the client cancels them. + * @param queue queue name + * @param consumerTag consumer tag (or blank to specify server-generated tag) + * @param noAck acknowledgement flag + * @param noLocal do not send messages to the connection that published them + * @param exclusive request exclusive consumer access to the queue + * @param consumer an interface to the consumer object + * @param arguments a set of arguments for the declaration. The syntax of these + * arguments depends on the server implementation. + * @return a #Caf::AmqpClient::AmqpMethods::Basic::ConsumeOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noAck, + const bool noLocal, + const bool exclusive, + const SmartPtrConsumer& consumer, + const SmartPtrTable& arguments = SmartPtrTable()) = 0; + + /** + * @brief Cancels a consumer + *

+ * This method cancels a consumer. This does not affect already delivered messages, + * but it does mean the server will not send any more messages for that consumer. + * The client may receive an arbitrary number of messages in between sending the cancel + * method and receiving the cancel.ok reply. + * @param consumerTag consumer tag to cancel + * @return a #Caf::AmqpClient::AmqpMethods::Basic::CancelOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Basic::SmartPtrCancelOk basicCancel( + const std::string& consumerTag) = 0; + + /** + * @brief Redeliver unacknowledged messages + *

+ * This method asks the server to redeliver all unacknowledged message on the channel. + * Zero or more messages may be redelivered. + * @param requeue if false then the message will be redelivered to + * the original receipient. If true then the server will attempt to + * requeue the message, potentially delivering it to an alternate subscriber. + * @return a #Caf::AmqpClient::AmqpMethods::Basic::RecoverOk object containing the + * results of the call if successful + */ + virtual AmqpMethods::Basic::SmartPtrRecoverOk basicRecover( + const bool requeue) = 0; + + /** + * @brief Specifies quality of service + *

+ * This method requests a specific quality of service. The QoS can be specified for + * the current channel or for all channels on the connection. The particular properties + * and semantics of a qos method always depend on the content class semantics. + * @param prefetchSize prefetch window in octets. The client can request that messages + * be sent in advance so that when the client finishes processing a message, + * the following message is already help locally, rather than needing to be sent down + * the channel. Prefetching gives a performance improvement. This field specifies the + * prefetch window size in octets. The server will send a message in advance if it is + * equal to or smaller in size than the available prefetch size (and also falls into + * other prefetch limits). May be set to zero, meaning 'no specific limit', although + * other prefetch limits may still apply. The prefetch-size is ignored if the no-ack + * option is set. + * @param prefetchCount prefetch window in messages. This field may be used in combination + * with the prefetchSize field; a message will only be sent in advance if both + * prefetch windows (and those at the channel and connection level) allow it. The + * prefetch-count is ignored if the no-ack option is set. + * @param global apply to entire connection + * @return + */ + virtual AmqpMethods::Basic::SmartPtrQosOk basicQos( + const uint32 prefetchSize, + const uint32 prefetchCount, + const bool global) = 0; + + /** + * @brief Reject an incoming message + *

+ * This method allows a client to reject a message. It can be used to interrupt and + * cancel large incoming messages, or return un-treatable messages to their original + * queue. + * @param deliveryTag the delivery tag of the message + * @param requeue if true, the server will attempt to requeue + * the message. If false or the requeue attempt fails the + * message is discarded or dead-lettered. + */ + virtual void basicReject( + const uint64 deliveryTag, + const bool requeue) = 0; + + /** + * @brief Creates an exchange + *

+ * This method creates an exchange if it does not already exist, and if the exchange + * exists, verifies that it is of the correct and expected class. + * @param exchange exchange name + * @param type exchange type + * @param durable request a durable exchange + * @param arguments a set of agrguments for the declaration. The syntax of these + * arguments depends on the server implementation. + * @return a #Caf::AmqpClient::AmqpMethods::Exchange::DeclareOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Exchange::SmartPtrDeclareOk exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool durable = false, + const SmartPtrTable& arguments = SmartPtrTable()) = 0; + + /** + * @brief Deletes an exchange + *

+ * This method deletes an exchange. When an exchange is deleted all queue bindings on + * the exchange are cancelled. + * @param exchange exchange name + * @param ifUnused delete only if unused. If true, the server + * will only delete the exchange if it has no queue bindings. If the exchange has + * queue bindings the server does not delete it but raises a channel exception + * instead. + * @return a #Caf::AmqpClient::AmqpMethods::Exchange::DeleteOk object containing + * the results of the call if successful + */ + virtual AmqpMethods::Exchange::SmartPtrDeleteOk exchangeDelete( + const std::string& exchange, + const bool ifUnused) = 0; + + /** + * @brief Creates a queue using default parameters + *

+ * The defaults are: + * + * + * + * + * + * + * + * + *
ParameterValue
queueblank - the server will generate a queue name
durablefalse - the queue will not be durable
exclusivetrue - the queue will be exclusive to this conenction
autoDeletetrue - the queue will be deleted when no longer used
+ * @return a #Caf::AmqpClient::AmqpMethods::Queue::DeclareOk object containing + * the results of the call if successful. This object must be examined to retrieve + * the name of the queue generated by the server. + */ + virtual AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare() = 0; + + /** + * @brief Creates or checks a queue + *

+ * @param queue queue name. If blank the server will generate a name. + * @param durable request a durable queue + * @param exclusive request an exclusive queue + * @param autoDelete request that the queue be deleted when no longer in use + * @param arguments a set of agrguments for the declaration. The syntax of these + * arguments depends on the server implementation. + * @return a #Caf::AmqpClient::AmqpMethods::Queue::DeclareOk object containing + * the results of the call if successful. This object must be examined to retrieve + * the name of the queue generated by the server if the queue name was blank in + * the call. + */ + virtual AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare( + const std::string& queue, + const bool durable, + const bool exclusive, + const bool autoDelete, + const SmartPtrTable& arguments = SmartPtrTable()) = 0; + + /** + * @brief Declare a queue passively; i.e. check if it exists. + *

+ * @param queue queue name. + */ + virtual AmqpMethods::Queue::SmartPtrDeclareOk queueDeclarePassive( + const std::string& queue) = 0; + + /** + * @brief Deletes a queue + *

+ * This method deletes a queue. When a queue is deleted any pending messages are + * sent to a dead­-letter queue if this is defined in the server configuration, + * and all consumers on the queue are cancelled. + * @param queue queue name + * @param ifUnused delete only if unused. If true, the server + * will only delete the queue if it has no consumers. If the queue has consumers the + * server does does not delete it but raises a channel exception instead. + * @param ifEmpty delete only if empty. If true, the server will + * only delete the queue if it has no messages. If the queue has messages the + * server does does not delete it but raises a channel exception instead. + * @return a #Caf::AmqpClient::AmqpMethods::Queue::DeleteOk object containing the + * result of the call if successful. + */ + virtual AmqpMethods::Queue::SmartPtrDeleteOk queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty) = 0; + + /** + * @brief Purges a queue + *

+ * This method removes all messages from a queue which are not awaiting + * acknowledgment. + * @param queue queue name + * @return a #Caf::AmqpClient::AmqpMethods::Queue::PurgeOk containing the result + * of the call if successful. + */ + virtual AmqpMethods::Queue::SmartPtrPurgeOk queuePurge( + const std::string& queue) = 0; + + /** + * @brief Binds a queue to an exchange + *

+ * This method binds a queue to an exchange. Until a queue is bound it will not + * receive any messages. + * @param queue queue name + * @param exchange exchange name + * @param routingKey message routing key + * @param arguments a set of agrguments for the binding. The syntax of these + * arguments depends on the server implementation. + * @return a #Caf::AmqpClient::AmqpMethods::Queue::BindOk containing the result + * of the call if successful. + */ + virtual AmqpMethods::Queue::SmartPtrBindOk queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments = SmartPtrTable()) = 0; + + /** + * @brief Unbinds a queue from an exchange + * @param queue queue name + * @param exchange exchange name + * @param routingKey message routing key + * @param arguments a set of agrguments for the binding. The syntax of these + * arguments depends on the server implementation. + * @return a #Caf::AmqpClient::AmqpMethods::Queue::UnbindOk containing the result + * of the call if successful. + */ + virtual AmqpMethods::Queue::SmartPtrUnbindOk queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments = SmartPtrTable()) = 0; + + /** + * @brief Adds a {@link ReturnListener} to the channel + * @param listener the {@link ReturnListener} object to add + */ + virtual void addReturnListener( + const SmartPtrReturnListener& listener) = 0; + + /** + * @brief Removes a {@link ReturnListener} from the channel + * @param listener the {@link ReturnListener} to remove + */ + virtual bool removeReturnListener( + const SmartPtrReturnListener& listener) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Channel); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Connection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Connection.h new file mode 100644 index 000000000..c486607b5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Connection.h @@ -0,0 +1,53 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_CONNECTION_H_ +#define AMQPCLIENTAPI_CONNECTION_H_ + + +#include "ICafObject.h" + +#include "amqpClient/api/Channel.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface to an AMQP connection. + */ +struct __declspec(novtable) Connection : public ICafObject { + /** + * @brief Create a new channel + * @return a Channel + */ + virtual SmartPtrChannel createChannel() = 0; + + /** + * @brief Close a channel + * @param channel the Channel to close + */ + virtual void closeChannel(const SmartPtrChannel& channel) = 0; + + /** + * @brief Closes the connection and its channels + */ + virtual void close() = 0; + + /** + * @brief Return the state of the connection + * @retval true the connection is open + * @retval false the connection is closed + */ + virtual bool isOpen() = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(Connection); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ConnectionFactory.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ConnectionFactory.h new file mode 100644 index 000000000..205465c1b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ConnectionFactory.h @@ -0,0 +1,232 @@ +/* + * Created on: May 4, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_CONNECTIONFACTORY_H_ +#define AMQPCLIENTAPI_CONNECTIONFACTORY_H_ + +#include "ICafObject.h" + +#include "amqpClient/api/Address.h" +#include "amqpClient/api/CertInfo.h" +#include "amqpClient/api/Connection.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface to a convenience factory class to facilitate opening a + * #Caf::AmqpClient::Connection to an AMQP broker. + *

+ * ConnectionFactories are creating using the #Caf::AmqpClient::createConnectionFactory method. + */ +struct __declspec(novtable) ConnectionFactory : public ICafObject { + + /** + * @return the default protocol to use for connections + */ + virtual std::string getProtocol() const = 0; + + /** + * @brief Set the default protocol for connections + * @param protocol the default protocol for connections + */ + virtual void setProtocol(const std::string& protocol) = 0; + + /** + * @return the default host to use for connections + */ + virtual std::string getHost() const = 0; + + /** + * @brief Set the default host for connections + * @param host the default host for connections + */ + virtual void setHost(const std::string& host) = 0; + + /** + * @return the default port to use for connections + */ + virtual uint32 getPort() const = 0; + + /** + * @brief Set the default port for connections + * @param port the default port for connections + */ + virtual void setPort(const uint32 port) = 0; + + /** + * @return the default virtual host to use for connections + */ + virtual std::string getVirtualHost() const = 0; + + /** + * @brief Set the default virtual host for connections + * @param virtualHost the default virtual host for connections + */ + virtual void setVirtualHost(const std::string& virtualHost) = 0; + + /** + * @return the default user name to use for connections + */ + virtual std::string getUsername() const = 0; + + /** + * @brief Set the default user name for connections + * @param username the default user name for connections + */ + virtual void setUsername(const std::string& username) = 0; + + /** + * @return the default password to use for connections + */ + virtual std::string getPassword() const = 0; + + /** + * @brief Set the default password for connections + * @param password the default password for connections + */ + virtual void setPassword(const std::string& password) = 0; + + /** + * @return the default CaCertPath to use for connections + */ + virtual std::string getCaCertPath() const = 0; + + /** + * @brief Set the default CaCertPath for connections + * @param caCertPath the default CaCertPath for connections + */ + virtual void setCaCertPath(const std::string& caCertPath) = 0; + + /** + * @return the default ClientCertPath to use for connections + */ + virtual std::string getClientCertPath() const = 0; + + /** + * @brief Set the default ClientCertPath for connections + * @param clientCertPath the default ClientCertPath for connections + */ + virtual void setClientCertPath(const std::string& clientCertPath) = 0; + + /** + * @return the default ClientKeyPath to use for connections + */ + virtual std::string getClientKeyPath() const = 0; + + /** + * @brief Set the default ClientKeyPath for connections + * @param clientKeyPath the default ClientKeyPath for connections + */ + virtual void setClientKeyPath(const std::string& clientKeyPath) = 0; + + /** + * @return the initially requested maximum channel number; zero for unlimited + */ + virtual uint32 getRequestedChannelMax() const = 0; + + /** + * @brief Set the requested maximum channel number + * @param requestedChannelMax the initially requested maximum channel number; zero for unlimited + */ + virtual void setRequestedChannelMax(const uint32 requestedChannelMax) = 0; + + /** + * @return the initially requested maximum frame size; zero for unlimited + */ + virtual uint32 getRequestedFrameMax() const = 0; + + /** + * @brief Set the requested maximum frame size + * @param requestedFrameMax the initially requested maximum frame size; zero for unlimited + */ + virtual void setRequestedFrameMax(const uint32 requestedFrameMax) = 0; + + /** + * @return the initially requested heartbeat interval, in seconds; zero for none + */ + virtual uint32 getRequestedHeartbeat() const = 0; + + /** + * @brief Set the requested heartbeat interval + * @param requestedHeartbeat the initially requested heartbeat interval, in seconds; zero for none + */ + virtual void setRequestedHeartbeat(const uint32 requestedHeartbeat) = 0; + + /** + * @return the connection timeout, in milliseconds; zero for infinite + */ + virtual uint32 getConnectionTimeout() const = 0; + + /** + * @brief Set the connection timeout + * @param connectionTimeout connection establishment timeout in milliseconds; zero for infinite + */ + virtual void setConnectionTimeout(const uint32 connectionTimeout) = 0; + + /** + * @return the number of connection consumer processing threads + */ + virtual uint32 getConsumerThreadCount() const = 0; + + /** + * @brief Set the number of connection consumer processing threads + * @param threadCount the number of connection consumer processing threads + */ + virtual void setConsumerThreadCount(const uint32 threadCount) = 0; + + /** + * @return the number of connection retries + */ + virtual uint16 getRetries() const = 0; + + /** + * @brief Set the number of connection retries + * @param retries the number of connection retries + */ + virtual void setRetries(const uint16 retries) = 0; + + /** + * @return the number of connection seconds to wait + */ + virtual uint16 getSecondsToWait() const = 0; + + /** + * @brief Set the number of connection retries + * @param seconds the number of connection seconds to wait + */ + virtual void setSecondsToWait(const uint16 seconds) = 0; + + /** + * @brief Create a new broker connection + * @return a #Caf::AmqpClient::Connection interface to the connection + */ + virtual SmartPtrConnection newConnection() = 0; + + /** + * @brief Create a new broker connection + * @param address broker address to try + * @return a #Caf::AmqpClient::Connection interface to the connection + */ + virtual SmartPtrConnection newConnection( + const SmartPtrAddress& address, + const SmartPtrCertInfo& certInfo) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionFactory); + +/** + * @ingroup AmqpApi + * @brief Create a new #Caf::AmqpClient::ConnectionFactory + * @return a #Caf::AmqpClient::ConnectionFactory interface to a new connection factory + */ +SmartPtrConnectionFactory AMQPCLIENT_LINKAGE createConnectionFactory(); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Consumer.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Consumer.h new file mode 100644 index 000000000..99478d12c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Consumer.h @@ -0,0 +1,81 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CONSUMER_H_ +#define CONSUMER_H_ + +#include "ICafObject.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Exception/CCafException.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/Envelope.h" +#include "amqpClient/api/AmqpContentHeaders.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface for application callback objects to receive notifications and messages + * from a queue by subscription. + *

+ * The methods of this interface are invoked in a dispatch thread which is separate from the + * {@link Connection}'s thread. This allows {@link Consumer}s to call {@link Channel} or + * {@link Connection} methods without causing a deadlock. + */ +struct __declspec(novtable) Consumer : public ICafObject { + + /** + * @brief Called when the consumer is registered by a call to any of the + * {@link Channel#basicConsume} methods + * @param consumerTag the consumer tag associated with the consumer + */ + virtual void handleConsumeOk( + const std::string& consumerTag) = 0; + + /** + * @brief Called when the consumer is cancelled by a call to {@link Channel#basicCancel}. + * @param consumerTag the consumer tag associated with the consumer + */ + virtual void handleCancelOk( + const std::string& consumerTag) = 0; + + /** + * @brief Called when a basic.recover-ok is received. + * @param consumerTag the consumer tag associated with the consumer + */ + virtual void handleRecoverOk( + const std::string& consumerTag) = 0; + + /** + * @brief Called when a basic.deliver is received for this consumer. + * @param consumerTag the consumer tag associated with the consumer + * @param envelope message envelope + * @param properties message properties and headers + * @param body message body + */ + virtual void handleDelivery( + const std::string& consumerTag, + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) = 0; + + /** + * @brief Called when the channel has been shut down. + * @param consumerTag the consumer tag associated with the consumer + * @param reason the reason for the shut down + */ + virtual void handleShutdown( + const std::string& consumerTag, + SmartPtrCCafException& reason) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Consumer); + +}} + +#endif /* CONSUMER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ContentHeader.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ContentHeader.h new file mode 100644 index 000000000..51b274444 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ContentHeader.h @@ -0,0 +1,33 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_CONTENTHEADER_H_ +#define AMQPCLIENTAPI_CONTENTHEADER_H_ + + +#include "ICafObject.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Base interface for all AMQP content headers + */ +struct __declspec(novtable) ContentHeader : public ICafObject { + + /** @return the content header class id */ + virtual uint16 getClassId() = 0; + + /** @return the content header friendly class name */ + virtual std::string getClassName() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ContentHeader); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Envelope.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Envelope.h new file mode 100644 index 000000000..28098daf5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Envelope.h @@ -0,0 +1,43 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_ENVELOPE_H_ +#define AMQPCLIENTAPI_ENVELOPE_H_ + + +#include "ICafObject.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief An interface to objects that group together basic.get-ok message properties + */ +struct __declspec(novtable) Envelope : public ICafObject { + CAF_DECL_UUID("ce68d68a-6973-49e2-a003-cb4474624f5c") + + /** @return the delivery tag */ + virtual uint64 getDeliveryTag() = 0; + + /** + * @retval true if the message was redelivered + * @retval false if the message has not been redelivered + */ + virtual bool getRedelivered() = 0; + + /** @return the name of the exchange supplying the message */ + virtual std::string getExchange() = 0; + + /** @return the message's routing key */ + virtual std::string getRoutingKey() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Envelope); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/GetResponse.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/GetResponse.h new file mode 100644 index 000000000..5e8dc783a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/GetResponse.h @@ -0,0 +1,44 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_GETRESPONSE_H_ +#define AMQPCLIENTAPI_GETRESPONSE_H_ + +#include "ICafObject.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/Envelope.h" +#include "amqpClient/api/AmqpContentHeaders.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface representing the bundling of basic.get messages into a nicer form + */ +struct __declspec(novtable) GetResponse : public ICafObject { + CAF_DECL_UUID("c8bda284-7eea-46e1-b9c3-791310d69b04") + + /** @return the message envelope information (#Caf::AmqpClient::Envelope) */ + virtual SmartPtrEnvelope getEnvelope() = 0; + + /** @return the message properties (#Caf::AmqpClient::AmqpContentHeaders::BasicProperties) */ + virtual AmqpContentHeaders::SmartPtrBasicProperties getProperties() = 0; + + /** @return the message body raw bytes */ + virtual SmartPtrCDynamicByteArray getBody() = 0; + + /** @return the number of messages in the queue */ + virtual uint32 getMessageCount() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(GetResponse); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Method.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Method.h new file mode 100644 index 000000000..c97eb35bb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/Method.h @@ -0,0 +1,36 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_METHOD_H_ +#define AMQPCLIENTAPI_METHOD_H_ + + +#include "ICafObject.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Base interface to AMQP methods + */ +struct __declspec(novtable) Method : public ICafObject { + + /** @return the method's class ID */ + virtual uint16 getProtocolClassId() = 0; + + /** @return the method's method ID */ + virtual uint16 getProtocolMethodId() = 0; + + /** @return the method's friendly name */ + virtual std::string getProtocolMethodName() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Method); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ReturnListener.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ReturnListener.h new file mode 100644 index 000000000..d4ff5212f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/ReturnListener.h @@ -0,0 +1,53 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef RETURNLISTENER_H_ +#define RETURNLISTENER_H_ + +#include "ICafObject.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/AmqpContentHeaders.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApi + * @brief Interface for objects that will be notified of failed message deliveries + *

+ * When {@link Channel#basicPublish} is used with the mandatory and/or immediate + * flags set and the message cannot be delivered, the server will response with a + * basic.return method call. {@link ReturnListener}s can monitor + * these failed messages. + */ +struct __declspec(novtable) ReturnListener : public ICafObject { + CAF_DECL_UUID("FEB38A27-6338-4BDB-AA0E-527322A2393B") + + /** + * @brief Callback receiving the failed message + * @param replyCode server reply code + * @param replyText server reply text + * @param exchange exchange on which error occured + * @param routingKey routing key for the message that failed + * @param properties original message properties + * @param body original message body + */ + virtual void handleReturn( + const uint16 replyCode, + const std::string& replyText, + const std::string& exchange, + const std::string& routingKey, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ReturnListener); + +}} + +#endif /* RETURNLISTENER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/amqpClient.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/amqpClient.h new file mode 100644 index 000000000..7616b04ec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpClient/api/amqpClient.h @@ -0,0 +1,286 @@ +/* + * Created on: May 3, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCLIENTAPI_H_ +#define AMQPCLIENTAPI_H_ + +#include "amqpClient/AmqpClientLink.h" +#include "ICafObject.h" + +/** + * @defgroup AmqpApi AMQP API + * Documentaiton for the classes, methods and constants that can be + * used directly by applications to work with the AMQP protocol as a client. + */ +namespace Caf { namespace AmqpClient { + +/** Default user name */ +extern const char* DEFAULT_USER; + +/** Default password */ +extern const char* DEFAULT_PASS; + +/** Default virtual host */ +extern const char* DEFAULT_VHOST; + +/** Default protocol */ +extern const char* DEFAULT_PROTOCOL; + +/** Default host */ +extern const char* DEFAULT_HOST; + +/** Default maximum channel number; zero for maximum */ +static const uint32 DEFAULT_CHANNEL_MAX = 0; + +/** Default maximum frame size; zero for maximum */ +static const uint32 DEFAULT_FRAME_MAX = 131072; + +/** Default maximum heartbeat rate; zero for none */ +static const uint32 DEFAULT_HEARTBEAT = 0; + +/** 'Use the default port' port */ +static const uint32 USE_DEFAULT_PORT = UINT_MAX; + +/** The default non-ssl port */ +static const uint32 DEFAULT_AMQP_PORT = 5672; + +/** The default ssl port */ +static const uint32 DEFAULT_AMQP_SSL_PORT = 5671; + +/** The default connection timeout; zero means wait indefinately */ +static const uint32 DEFAULT_CONNECTION_TIMEOUT = 0; + +/** The default number of connection consumer threads */ +static const uint32 DEFAULT_CONSUMER_THREAD_COUNT = 10; + +/** The default number of basic.deliver messages to process in a single run of a channel consumer thread */ +static const uint32 DEFAULT_CONSUMER_THREAD_MAX_DELIVERY_COUNT = 100; + +/** The default number of times a connection open will be retried*/ +static const uint16 DEFAULT_CONNECTION_RETRIES = 5; + +/** The default number of seconds we will wait for each connection open attempt. 0 means wait indefinitely*/ +static const uint16 DEFAULT_CONNECTION_SECONDS_TO_WAIT = 30; + +/** + * @author mdonahue + * @brief Object that maps a c-api AMQP field into a lifetime-managed GVariant + */ +struct __declspec(novtable) Field : public ICafObject { + /** + * @brief Field value types + */ + typedef enum { + /** @brief internal value representing Not Set */ + AMQP_FIELD_TYPE_NOTSET, + /** @brief boolean */ + AMQP_FIELD_TYPE_BOOLEAN, + /** @brief signed 8-bit integer */ + AMQP_FIELD_TYPE_I8, + /** @brief unsigned 8-bit integer */ + AMQP_FIELD_TYPE_U8, + /** @brief signed 16-bit integer */ + AMQP_FIELD_TYPE_I16, + /** @brief unsigned 16-bit integer */ + AMQP_FIELD_TYPE_U16, + /** @brief signed 32-bit integer */ + AMQP_FIELD_TYPE_I32, + /** @brief unsigned 32-bit integer */ + AMQP_FIELD_TYPE_U32, + /** @brief signed 64-bit integer */ + AMQP_FIELD_TYPE_I64, + /** @brief unsigned 64-bit integer */ + AMQP_FIELD_TYPE_U64, + /** @brief 32-bit float */ + AMQP_FIELD_TYPE_F32, + /** @brief 64-bit double */ + AMQP_FIELD_TYPE_F64, + /** @brief UTF8-encoded text */ + AMQP_FIELD_TYPE_UTF8, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_ARRAY, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_BYTES, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_DECIMAL, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_TIMESTAMP, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_TABLE, + /** @brief NOT SUPPORTED */ + AMQP_FIELD_TYPE_VOID + } AmqpFieldType; + + /** + * @return the field type + */ + virtual AmqpFieldType getAmqpType() const = 0; + /** + * @return the field value as a GVariant + */ + virtual GVariant* getValue() const = 0; + /** + * @brief Set the field type and value + * @param type field type + * @param value field value. DO NOT increment the reference count + * before calling this method. This object will take ownership of + * the GVariant and will call g_variant_unref upon value reassignment or destruction. + */ + virtual void setTypeAndValue(AmqpFieldType type, GVariant *value) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Field); +/** @brief A map of field names to field objects */ +typedef std::map Table; +CAF_DECLARE_SMART_POINTER(Table); + +/** + * @brief Add a boolean value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddBoolean( + const std::string key, + const bool val, + SmartPtrTable& table); + +/** + * @brief Add a signed 8-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddInt8( + const std::string key, + const int8 val, + SmartPtrTable& table); + +/** + * @brief Add a unsigned 8-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddUint8( + const std::string key, + const uint8 val, + SmartPtrTable& table); + +/** + * @brief Add a signed 16-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddInt16( + const std::string key, + const int16 val, + SmartPtrTable& table); + +/** + * @brief Add a unsigned 16-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddUint16( + const std::string key, + const uint16 val, + SmartPtrTable& table); + +/** + * @brief Add a signed 32-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddInt32( + const std::string key, + const int32 val, + SmartPtrTable& table); + +/** + * @brief Add a unsigned 32-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddUint32( + const std::string key, + const uint32 val, + SmartPtrTable& table); + +/** + * @brief Add a signed 64-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddInt64( + const std::string key, + const int64 val, + SmartPtrTable& table); + +/** + * @brief Add a unsigned 64-bit value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddUint64( + const std::string key, + const uint64 val, + SmartPtrTable& table); + +/** + * @brief Add a float value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddFloat( + const std::string key, + const float val, + SmartPtrTable& table); + +/** + * @brief Add a double value to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddDouble( + const std::string key, + const double val, + SmartPtrTable& table); + +/** + * @brief Add UTF8-encoded text to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddUtf8( + const std::string key, + const std::string& val, + SmartPtrTable& table); + +/** + * @brief Add a time stamp (unsigned 64-bit integer) to a field table + * @param key the field key + * @param val the value + * @param table the table to insert the field into + */ +void AMQPCLIENT_LINKAGE tableAddTimestamp( + const std::string key, + const uint64 val, + SmartPtrTable& table); +}} + +#include "amqpClient/api/AMQExceptions.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AbstractConnectionFactory.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AbstractConnectionFactory.h new file mode 100644 index 000000000..33972c653 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AbstractConnectionFactory.h @@ -0,0 +1,140 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_ABSTRACTCONNECTIONFACTORY_H_ +#define AMQPINTEGRATIONCORE_ABSTRACTCONNECTIONFACTORY_H_ + +#include "amqpCore/ConnectionFactory.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpClient/api/Connection.h" +#include "amqpCore/CompositeConnectionListener.h" +#include "amqpCore/ConnectionListener.h" + +namespace Caf { namespace AmqpIntegration { + +class AMQPINTEGRATIONCORE_LINKAGE AbstractConnectionFactory : public ConnectionFactory { +public: + AbstractConnectionFactory(); + virtual ~AbstractConnectionFactory(); + + /** + * @brief Initialize the connection factory + * @param amqpConnectionFactory the underlying Caf::AmqpClient::ConnectionFactory object + */ + void init(const AmqpClient::SmartPtrConnectionFactory& amqpConnectionFactory); + + virtual void setConnectionListeners(const std::deque& listeners); + + /** + * @brief Set the default protocol for connections + * @param protocol the default protocol for connections + */ + void setProtocol(const std::string& protocol); + + /** + * @brief Set the default host for connections + * @param host the default host for connections + */ + void setHost(const std::string& host); + + /** + * @brief Set the default port for connections + * @param port the default port for connections + */ + void setPort(const uint32 port); + + /** + * @brief Set the default host for connections + * @param virtualHost the default host for connections + */ + void setVirtualHost(const std::string& virtualHost); + + /** + * @brief Set the default user name for connections + * @param username the default user name for connections + */ + void setUsername(const std::string& username); + + /** + * @brief Set the default password for connections + * @param password the default password for connections + */ + void setPassword(const std::string& password); + + /** + * @brief Set the default CaCertPath for connections + * @param caCertPath the default CaCertPath for connections + */ + void setCaCertPath(const std::string& caCertPath); + + /** + * @brief Set the default ClientCertPath for connections + * @param clientCertPath the default ClientCertPath for connections + */ + void setClientCertPath(const std::string& clientCertPath); + + /** + * @brief Set the default ClientKeyPath for connections + * @param clientKeyPath the default ClientKeyPath for connections + */ + void setClientKeyPath(const std::string& clientKeyPath); + + /** + * @brief Set the number of connection retries + * @param retries + */ + void setRetries(const uint16 retries); + + /** + * @brief Set the wait period in seconds + * @param seconds + */ + void setSecondsToWait(const uint16 seconds); + + /** + * @brief Set the connection timeout + * @param connectionTimeout connection establishment timeout in milliseconds; zero for infinite + */ + void setConnectionTimeout(const uint32 connectionTimeout); + +public: // ConnectionFactory + virtual SmartPtrConnection createConnection() = 0; + std::string getProtocol(); + std::string getHost(); + uint32 getPort(); + std::string getVirtualHost(); + std::string getUsername(); + std::string getPassword(); + std::string getCaCertPath(); + std::string getClientCertPath(); + std::string getClientKeyPath(); + uint16 getRetries(); + uint16 getSecondsToWait(); + virtual void addConnectionListener(const SmartPtrConnectionListener& listener); + +protected: + std::string getDefaultProtocol(); + + std::string getDefaultHostName(); + + SmartPtrConnection createBareConnection(); + + SmartPtrConnectionListener getConnectionListener(); + +private: + bool _isInitialized; + AmqpClient::SmartPtrConnectionFactory _amqpConnectionFactory; + SmartPtrCompositeConnectionListener _connectionListener; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(AbstractConnectionFactory); +}; +CAF_DECLARE_SMART_POINTER(AbstractConnectionFactory); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpAdmin.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpAdmin.h new file mode 100644 index 000000000..532b67dbf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpAdmin.h @@ -0,0 +1,97 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AMQPADMIN_H_ +#define AMQPINTEGRATIONCORE_AMQPADMIN_H_ + + + +#include "ICafObject.h" + +#include "amqpCore/Binding.h" +#include "amqpCore/Exchange.h" +#include "amqpCore/Queue.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Specifies a basic set of AMQP administrative operations for AMQP > 0.8 + */ +struct __declspec(novtable) AmqpAdmin : public ICafObject { + CAF_DECL_UUID("B10A94BC-0CC7-476F-A38A-2794CF98D74C") + + /** + * @brief Declare an exchange + * @param exchange the exchange (#Caf::AmqpIntegration::Exchange) to declare + */ + virtual void declareExchange(SmartPtrExchange exchange) = 0; + + /** + * @brief Delete an exchange + * @param exchange the name of the exchange + * @retval true the exchange existed and was deleted + * @retval false the exchange did not exists or could not be deleted + */ + virtual bool deleteExchange(const std::string& exchange) = 0; + + /** + * @brief Declare a queue whose name is automatically generated. + *

+ * The queue is created with durable=false, exclusive=true and auto-delete=true. + * @return the created queue. Call #Caf::AmqpIntegration::Queue::getName to + * get the server-generated name of the queue. + */ + virtual SmartPtrQueue declareQueue() = 0; + + /** + * @brief Declare a queue + * @param queue the queue to declare + */ + virtual void declareQueue(SmartPtrQueue queue) = 0; + + /** + * @brief Delete a queue without regard for whether it is in use or has messages in it + * @param queue the name of the queue + * @retval true the queue existed and was deleted + * @retval false the queue did not exist or could not be deleted + */ + virtual bool deleteQueue(const std::string& queue) = 0; + + /** + * @brief Delete a queue + * @param queue the name of the queue + * @param unused true if the queue should be deleted only if not in use + * @param empty true if the queue shoudl be deleted only if empty + */ + virtual void deleteQueue( + const std::string& queue, + const bool unused, + const bool empty) = 0; + + /** + * @brief Purges the contents of a queue + * @param queue the name of the queue + */ + virtual void purgeQueue(const std::string& queue) = 0; + + /** + * @brief Declare a binding of a queue to an exchange + * @param binding the binding information + */ + virtual void declareBinding(SmartPtrBinding binding) = 0; + + /** + * @brief Remove a binding of a queue to an exchange + * @param binding the binding information + */ + virtual void removeBinding(SmartPtrBinding binding) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(AmqpAdmin); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpHeaderMapper.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpHeaderMapper.h new file mode 100644 index 000000000..8d6bf32ee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpHeaderMapper.h @@ -0,0 +1,117 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AMQPHEADERMAPPER_H_ +#define AMQPINTEGRATIONCORE_AMQPHEADERMAPPER_H_ + + +#include "ICafObject.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Integration/IIntMessage.h" +#include "amqpClient/api/Envelope.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief This interface is used by objects that map AMQP headers to integration message + * headers and vice versa. + */ +struct __declspec(novtable) AMQPINTEGRATIONCORE_LINKAGE +AmqpHeaderMapper : public ICafObject { + CAF_DECL_UUID("5A292DD4-C3CC-4556-9809-90027C13EFA5") + + /* + * @brief Return the collection of AMQP headers from an integration message. + * @param headers the integration message headers + * @return the AMQP headers + */ + virtual AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties + fromHeaders(IIntMessage::SmartPtrCHeaders headers) = 0; + + /** + * @brief Return the collection of integration message headers from an AMQP message. + * @param properties the AMQP message properties (#Caf::AmqpClient::AmqpContentHeaders::BasicProperties). + * @param envelope the AMQP message envelope (#Caf::AmqpClient::Envelope). + * @return the filtered set of headers as integration message headers + */ + virtual IIntMessage::SmartPtrCHeaders + toHeaders( + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties, + AmqpClient::SmartPtrEnvelope envelope) = 0; + + /** + * @brief Return the filtered collection of integration message headers from an integration message. + * @param headers the input set of message headers + * @return the filtered set of headers as integration message headers + */ + virtual IIntMessage::SmartPtrCHeaders + filterHeaders( + IIntMessage::SmartPtrCHeaders headers) = 0; + + /** @brief AMQP header prefix */ + static const std::string PREFIX; + + /** @brief AMQP application id header */ + static const std::string APP_ID; + + /** @brief AMQP cluster id header */ + static const std::string CLUSTER_ID; + + /** @brief AMQP content encoding header */ + static const std::string CONTENT_ENCODING; + + /** @brief AMQP content length hedaer */ + static const std::string CONTENT_LENGTH; + + /** @brief AMQP content type header */ + static const std::string CONTENT_TYPE; + + /** @brief AMQP correlation id header */ + static const std::string CORRELATION_ID; + + /** @brief AMQP delivery mode header */ + static const std::string DELIVERY_MODE; + + /** @brief AMQP delivery tag header */ + static const std::string DELIVERY_TAG; + + /** @brief AMQP expiration header */ + static const std::string EXPIRATION; + + /** @brief AMQP message count header */ + static const std::string MESSAGE_COUNT; + + /** @brief AMQP message id header */ + static const std::string MESSAGE_ID; + + /** @brief AMQP received exchange header */ + static const std::string RECEIVED_EXCHANGE; + + /** @brief AMQP routing key header */ + static const std::string RECEIVED_ROUTING_KEY; + + /** @brief AMQP redelivered header */ + static const std::string REDELIVERED; + + /** @brief AMQP reply to header */ + static const std::string REPLY_TO; + + /** @brief AMQP timestamp header */ + static const std::string TIMESTAMP; + + /** @brief AMQP type header */ + static const std::string TYPE; + + /** @brief AMQP user id header */ + static const std::string USER_ID; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(AmqpHeaderMapper); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpMessageListenerSource.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpMessageListenerSource.h new file mode 100644 index 000000000..3011c043b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpMessageListenerSource.h @@ -0,0 +1,56 @@ +/* + * Created on: Aug 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AmqpMessageListenerSource_h +#define AmqpMessageListenerSource_h + +#include "Integration/Dependencies/CPollerMetadata.h" +#include "Integration/IIntMessage.h" +#include "amqpCore/AmqpHeaderMapper.h" +#include "amqpCore/MessageListener.h" +#include "Integration/Core/CAbstractPollableChannel.h" + +namespace Caf { namespace AmqpIntegration { + +class AMQPINTEGRATIONCORE_LINKAGE AmqpMessageListenerSource : + public CAbstractPollableChannel, + public MessageListener { +public: + AmqpMessageListenerSource(); + virtual ~AmqpMessageListenerSource(); + + void init( + const SmartPtrAmqpHeaderMapper& headerMapper, + const SmartPtrCPollerMetadata& pollerMetadata); + +public: // MessageListener + void onMessage(const SmartPtrIIntMessage& message); + +private: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + static void QueueItemDestroyFunc(gpointer data); + +private: + bool _isInitialized; + std::string _id; + GAsyncQueue *_messageQueue; + SmartPtrAmqpHeaderMapper _headerMapper; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(AmqpMessageListenerSource); +}; +CAF_DECLARE_SMART_POINTER(AmqpMessageListenerSource); + +}} + +#endif /* AmqpMessageListenerSource_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpOutboundEndpoint.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpOutboundEndpoint.h new file mode 100644 index 000000000..193ca2d43 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpOutboundEndpoint.h @@ -0,0 +1,169 @@ +/* + * Created on: Jul 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AMQPOUTBOUNDENDPOINT_H_ +#define AMQPINTEGRATIONCORE_AMQPOUTBOUNDENDPOINT_H_ + + + +#include "Integration/IMessageHandler.h" + +#include "Common/IAppConfig.h" +#include "Common/IAppContext.h" +#include "Integration/Core/CExpressionHandler.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "amqpCore/AmqpHeaderMapper.h" +#include "amqpCore/AmqpTemplate.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Adapter that converts and sends Messages to an AMQP exchange + */ +class AMQPINTEGRATIONCORE_LINKAGE AmqpOutboundEndpoint : public IMessageHandler { + CAF_BEGIN_QI() + CAF_QI_ENTRY(IMessageHandler) + CAF_END_QI() + +public: + AmqpOutboundEndpoint(); + virtual ~AmqpOutboundEndpoint(); + + /** + * @brief Initialize this object + * @param amqpTemplate the #Caf::AmqpIntegration::AmqpTemplate used to + * send and receive messages + * @param appConfig the application configuration object + * @param appContext the application context object + */ + void init( + SmartPtrAmqpTemplate amqpTemplate, + SmartPtrIAppConfig appConfig, + SmartPtrIAppContext appContext); + + /** + * @brief Set the name of the AMQP exchange + * @param exchangeName the name of the exchange + */ + void setExchangeName(const std::string& exchangeName); + + /** + * @brief Set the name of the AMQP exchange as an expression of message information + * @param exchangeNameExpression the exchange name expression + */ + void setExchangeNameExpression(const std::string& exchangeNameExpression); + + /** + * @brief Set the routing key + * @param routingKey the routing key + */ + void setRoutingKey(const std::string& routingKey); + + /** + * @brief Set the routing key as an expression of message information + * @param routingKeyExpression the routing key expression + */ + void setRoutingKeyExpression(const std::string& routingKeyExpression); + + /** + * @brief Set the regular expression mapping of headers to send along with the message + *

+ * AMQP headers (amqp_XXXX) are always automatically mapped to their AMQP + * BasicProperties counterparts. This expression controls which additional headers + * are sent along with the message. + * @param expression header mapping expression + */ + void setMappedRequestHeadersExpression(const std::string& expression); + + /** + * @brief Set the expects reply flag. + * @param expectReply true if a reply is expected else false + */ + void setExpectReply(const bool expectReply); + + /** + * @brief Set the requires reply flag. + * @param requiresReply true if a reply is required else false + */ + void setRequiresReply(const bool requiresReply); + + /** + * @brief Set the friendly name of this instance. + * @param name the instance name + */ + void setComponentName(const std::string& name); + + /** + * @brief Set the channel resolver object + * @param channelResolver the channel resolver + */ + void setChannelResolver(SmartPtrIChannelResolver channelResolver); + +public: // IMessageHandler + UUID getHandlerId() const; + + void handleMessage(const SmartPtrIIntMessage& message); + + SmartPtrIIntMessage getSavedMessage() const; + + void clearSavedMessage(); + +private: + SmartPtrIIntMessage handleRequestMessage(SmartPtrIIntMessage requestMessage); + + void handleResult( + SmartPtrIIntMessage resultMessage, + IIntMessage::SmartPtrCHeaders requestHeaders); + + void send( + const std::string& exchangeName, + const std::string& routingKey, + SmartPtrIIntMessage requestMessage); + + SmartPtrIIntMessage sendAndReceive( + const std::string& exchangeName, + const std::string& routingKey, + SmartPtrIIntMessage requestMessage); + + SmartPtrIIntMessage createReplyMessage( + SmartPtrIIntMessage reply, + IIntMessage::SmartPtrCHeaders requestHeaders); + + void sendReplyMessage( + SmartPtrIIntMessage reply, + const std::string& replyChannelHeaderValue); + +private: + bool _isInitialized; + UUID _id; + std::string _componentName; + SmartPtrAmqpTemplate _amqpTemplate; + bool _expectReply; + bool _requiresReply; + std::string _exchangeName; + std::string _exchangeNameExpression; + std::string _routingKey; + std::string _routingKeyExpression; + std::string _requestHeaderMapperExpression; + SmartPtrIChannelResolver _channelResolver; + SmartPtrIMessageChannel _outputChannel; + SmartPtrCExpressionHandler _exchangeNameHandler; + SmartPtrCExpressionHandler _routingKeyHandler; + SmartPtrAmqpHeaderMapper _requestHeaderMapper; + SmartPtrAmqpHeaderMapper _responseHeaderMapper; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(AmqpOutboundEndpoint); +}; +CAF_DECLARE_SMART_QI_POINTER(AmqpOutboundEndpoint); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpTemplate.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpTemplate.h new file mode 100644 index 000000000..2cb7da5ba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/AmqpTemplate.h @@ -0,0 +1,169 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AMQPTEMPLATE_H_ +#define AMQPINTEGRATIONCORE_AMQPTEMPLATE_H_ + + + +#include "ICafObject.h" + +#include "Integration/IIntMessage.h" +#include "amqpClient/api/Channel.h" +#include "amqpCore/AmqpHeaderMapper.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Specifies a basic set of AMQP operations. + *

+ * Provides synchronous send and receive methods as well as a generic executor + * through a callback to a provided object. + */ +struct __declspec(novtable) AmqpTemplate : public ICafObject { + CAF_DECL_UUID("B79DDF8E-B302-4576-9D96-DC413C76392C") + + /** + * @brief Send a message to a default exchange with a default routing key. + * @param message a message to send + * @param headerMapper optional header mapper to use in place of the standard mapper + */ + virtual void send( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Send a message to a default exchange with a routing key. + * @param routingKey the routing key + * @param message a message to send + * @param headerMapper optional header mapper to use in place of the standard mapper + */ + virtual void send( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Send a message to an exchange with a routing key. + * @param exchange the name of the exchange + * @param routingKey the routing key + * @param message a message to send + * @param headerMapper optional header mapper to use in place of the standard mapper + */ + virtual void send( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Receive a message if there is one from a default queue. + *

+ * Returns immediately, possibly with a null value. + * @param headerMapper optional header mapper to use in place of the standard mapper + */ + virtual SmartPtrIIntMessage receive( + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Receive a message if there is one from a specific queue. + *

+ * Returns immediately, possibly with a null value. + * @param queueName the name of the queue + * @param headerMapper optional header mapper to use in place of the standard mapper + */ + virtual SmartPtrIIntMessage receive( + const std::string& queueName, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Basic RPC pattern. + *

+ * Send a message to a default exchange with a default routing key and attempt to + * receive a response. The implementation will create a temporary anonymous queue + * to receive the response and will use the repy-to header to notify the recipient + * of the response routing. + * @param message a message to send + * @param requestHeaderMapper optional header mapper to use in place of the standard mapper on the outgoing message + * @param responseHeaderMapper optional header mapper to use in place of the standard mapper on the incoming message + */ + virtual SmartPtrIIntMessage sendAndReceive( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Basic RPC pattern. + *

+ * Send a message to a default exchange with a specific routing key and attempt to + * receive a response. The implementation will create a temporary anonymous queue + * to receive the response and will use the repy-to header to notify the recipient + * of the response routing. + * @param routingKey the routing key + * @param message a message to send + * @param requestHeaderMapper optional header mapper to use in place of the standard mapper on the outgoing message + * @param responseHeaderMapper optional header mapper to use in place of the standard mapper on the incoming message + */ + virtual SmartPtrIIntMessage sendAndReceive( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Basic RPC pattern. + *

+ * Send a message to a specific exchange with a specific routing key and attempt to + * receive a response. The implementation will create a temporary anonymous queue + * to receive the response and will use the repy-to header to notify the recipient + * of the response routing. + * @param exchange the name of the exchange + * @param routingKey the routing key + * @param message a message to send + * @param requestHeaderMapper optional header mapper to use in place of the standard mapper on the outgoing message + * @param responseHeaderMapper optional header mapper to use in place of the standard mapper on the incoming message + */ + virtual SmartPtrIIntMessage sendAndReceive( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()) = 0; + + /** + * @brief Interface to objects used to execute arbitrary AMQP commands + *

+ * This interface provides a mechanism to execute arbitrary AMQP commands. Implement + * a class based on this interface with the logic required to support the desired + * AMQP operation. The template will call this object with a channel on which + * to execute the command. + * @param channel the AMQP channel (Caf::AmqpClient::Channel in the + * CAF AMQP Client Library API documentation.) + * @param data user-specific data required to perform the operation + * @return a pointer to a user-specified object representing the result of the + * operation. + */ + struct Executor : public ICafObject { + virtual gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data) = 0; + }; + CAF_DECLARE_SMART_POINTER(Executor); + + /** + * @brief Execute an arbitrary AMQP operation + * @see #Caf::AmqpIntegration::AmqpTemplate::Executor + * @param executor the object used to execute the AMQP operation + * @param data user-specific data required to perform the operation + * @return a pointer to a user-specified object representing the result of the + * operation. + */ + virtual gpointer execute(SmartPtrExecutor executor, gpointer data) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(AmqpTemplate); + +}} + +#endif /* AMQPINTEGRATIONCORE_AMQPTEMPLATE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Binding.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Binding.h new file mode 100644 index 000000000..00103c6fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Binding.h @@ -0,0 +1,37 @@ +/* + * Created on: Jun 13, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_BINDING_H_ +#define AMQPINTEGRATIONCORE_BINDING_H_ + + +#include "ICafObject.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Simple container collecting information to describe a queue binding. Used in conjunction with RabbitAdmin. + *

+ * Use #Caf::AmqpIntegration::createBinding to create a binding. + */ +struct __declspec(novtable) Binding : public ICafObject { + CAF_DECL_UUID("A6067BE6-18C1-4D50-BB2F-AB9E49EA2111") + + /** @return the queue name */ + virtual std::string getQueue() const = 0; + + /** @return the exchange name */ + virtual std::string getExchange() const = 0; + + /** @return the routing key */ + virtual std::string getRoutingKey() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Binding); + +}} + +#endif /* AMQPINTEGRATIONCORE_BINDING_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BindingImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BindingImpl.h new file mode 100644 index 000000000..8f1fb196f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BindingImpl.h @@ -0,0 +1,48 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_BINDINGIMPL_H_ +#define AMQPINTEGRATIONCORE_BINDINGIMPL_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Implementations of the #Caf::AmqpIntegration::Binding interface. + */ +class AMQPINTEGRATIONCORE_LINKAGE BindingImpl : public Binding { +public: + BindingImpl(); + virtual ~BindingImpl(); + + /** + * @brief initialize the object + * @param queue the name of the queue + * @param exchange the name of the exchange + * @param routingKey the routing key + */ + void init( + const std::string queue, + const std::string exchange, + const std::string routingKey); + + std::string getQueue() const; + + std::string getExchange() const; + + std::string getRoutingKey() const; + +private: + std::string _queue; + std::string _exchange; + std::string _routingKey; + CAF_CM_DECLARE_NOCOPY(BindingImpl); +}; +CAF_DECLARE_SMART_POINTER(BindingImpl); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BindingInternal.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BindingInternal.h new file mode 100644 index 000000000..36e890861 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BindingInternal.h @@ -0,0 +1,34 @@ +/* + * Created on: Jun 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_BINDINGINTERNAL_H_ +#define AMQPINTEGRATIONCORE_BINDINGINTERNAL_H_ + + +#include "ICafObject.h" + +#include "amqpCore/Binding.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface allowing for internal management of binding integration objects + */ +struct __declspec(novtable) BindingInternal : public ICafObject { + CAF_DECL_UUID("23D0079E-93F8-4C06-BD33-F0E795506FB2") + + /** + * @brief Sets the delegated Binding object + * @param binding the delegated binding + */ + virtual void setBindingInternal(SmartPtrBinding binding) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(BindingInternal); + +}} +#endif /* AMQPINTEGRATIONCORE_BINDINGINTERNAL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BlockingQueueConsumer.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BlockingQueueConsumer.h new file mode 100644 index 000000000..b6f45a2a6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/BlockingQueueConsumer.h @@ -0,0 +1,191 @@ +/* + * Created on: Jul 30, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_BLOCKINGQUEUECONSUMER_H_ +#define AMQPINTEGRATIONCORE_BLOCKINGQUEUECONSUMER_H_ + +#include "ICafObject.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Common/CAutoRecMutex.h" +#include "Exception/CCafException.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/Channel.h" +#include "amqpClient/api/Envelope.h" +#include "amqpCore/AmqpHeaderMapper.h" +#include "amqpClient/api/Connection.h" +#include "amqpCore/ConnectionFactory.h" +#include "Integration/ILifecycle.h" + +namespace Caf { namespace AmqpIntegration { + +// Forward-declare +class BlockingQueueConsumer; +CAF_DECLARE_SMART_POINTER(BlockingQueueConsumer) + +/** + * @ingroup IntObjImpl + * @brief Specialized consumer encapsulating knowledge of the broker connections and having its own lifecycle + */ +class AMQPINTEGRATIONCORE_LINKAGE BlockingQueueConsumer : + public ILifecycle { +public: + BlockingQueueConsumer(); + virtual ~BlockingQueueConsumer(); + + /** + * @brief object initializer + * @param connectionFactory connection factory object + * @param headerMapper header mapper object to map incoming headers + * @param acknowledgeMode message acknowledgement mode + * @param prefetchCount if acknowledgeMode is AUTO or MANUAL this + * message prefetch count value will be sent to the broker via the basic.qos method. + * @param queue the queue to consume + */ + void init( + SmartPtrConnectionFactory connectionFactory, + SmartPtrAmqpHeaderMapper headerMapper, + AcknowledgeMode acknowledgeMode, + uint32 prefetchCount, + const std::string& queue); + + /** + * @retval the underlying channel + */ + AmqpClient::SmartPtrChannel getChannel(); + + /** + * @retval the AMQP consumer tag(s) + */ + std::string getConsumerTag(); + + /** + * @brief Wait for the next message delivery and return it + *

+ * This is a blocking call and will return only when a message has been delivered + * or the consumer is canceled. In the case of cancellation NULL will be returned. + * @retval the next message or NULL + */ + SmartPtrIIntMessage nextMessage(); + + /** + * @brief Wait for the next message delivery and return it + *

+ * This is a non-blocking call and will return when a message has been delivered + * within the timeout specified or if the consumer is canceled. + * @param timeout the timeout in milliseconds + * @retval the next message or NULL + */ + SmartPtrIIntMessage nextMessage(int32 timeout); + + /** + * @brief Acknowledges unacknowledged messages + *

+ * Sends a basic.ack for messages that have been delivered. This method only + * sends a basic.ack if the acknowledge mode flag is set to ACKNOWLEDGEMODE_AUTO. + */ + bool commitIfNecessary(); + + /** + * @brief Rejects unacknowledged messaages + *

+ * Sends a basic.reject for messages that have been delivered. This method only + * sends a basic.reject if the acknowledge mode flag is set to ACKNOWLEDGEMODE_AUTO. + * @param ex the application exception necessitating a rollback + */ + void rollbackOnExceptionIfNecessary(SmartPtrCCafException& ex); + +public: + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +private: + class InternalConsumer : public AmqpClient::Consumer { + public: + InternalConsumer(); + virtual ~InternalConsumer(); + + void init( + BlockingQueueConsumer* parent); + + public: + void handleConsumeOk( + const std::string& consumerTag); + + void handleCancelOk( + const std::string& consumerTag); + + void handleRecoverOk( + const std::string& consumerTag); + + void handleDelivery( + const std::string& consumerTag, + const AmqpClient::SmartPtrEnvelope& envelope, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + void handleShutdown( + const std::string& consumerTag, + SmartPtrCCafException& reason); + + std::string getConsumerTag(); + + private: + SmartPtrBlockingQueueConsumer _parent; + AmqpClient::SmartPtrChannel _channel; + std::string _consumerTag; + GAsyncQueue *_deliveryQueue; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(InternalConsumer); + }; + CAF_DECLARE_SMART_POINTER(InternalConsumer); + +private: + struct Delivery : public ICafObject { + AmqpClient::SmartPtrEnvelope envelope; + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties; + SmartPtrCDynamicByteArray body; + }; + CAF_DECLARE_SMART_POINTER(Delivery); + +private: + void checkShutdown(); + + SmartPtrIIntMessage handle(SmartPtrDelivery delivery); + + static void destroyQueueItem(gpointer data); + +private: + friend class InternalConsumer; + + bool _isInitialized; + volatile bool _isRunning; + volatile bool _isCanceled; + std::set _deliveryTags; + SmartPtrInternalConsumer _consumer; + SmartPtrCAutoRecMutex _parentLock; + SmartPtrCCafException _shutdownException; + GAsyncQueue *_deliveryQueue; + SmartPtrConnectionFactory _connectionFactory; + SmartPtrConnection _connection; + AmqpClient::SmartPtrChannel _channel; + SmartPtrAmqpHeaderMapper _headerMapper; + AcknowledgeMode _acknowledgeMode; + uint32 _prefetchCount; + std::string _queue; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(BlockingQueueConsumer); +}; + +}} + +#endif /* AMQPINTEGRATIONCORE_BLOCKINGQUEUECONSUMER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/CachingConnectionFactory.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/CachingConnectionFactory.h new file mode 100644 index 000000000..c399069d6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/CachingConnectionFactory.h @@ -0,0 +1,269 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CACHINGCONNECTIONFACTORY_H_ +#define CACHINGCONNECTIONFACTORY_H_ + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Common/CAutoRecMutex.h" +#include "Exception/CCafException.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/AmqpMethods.h" +#include "amqpClient/api/Channel.h" +#include "amqpClient/api/Consumer.h" +#include "amqpClient/api/GetResponse.h" +#include "amqpClient/api/ReturnListener.h" +#include "amqpClient/api/amqpClient.h" +#include "amqpCore/ChannelProxy.h" +#include "amqpClient/api/Connection.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpCore/ConnectionListener.h" +#include "amqpCore/AbstractConnectionFactory.h" +#include "amqpCore/ConnectionProxy.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Implementation of the CachingConnectionFactory Integration Object + */ +class AMQPINTEGRATIONCORE_LINKAGE CachingConnectionFactory : + public AbstractConnectionFactory { +public: + CachingConnectionFactory(); + virtual ~CachingConnectionFactory(); + + void init(); + + void init(const std::string& protocol, const std::string& host, const uint32 port); + + void init(const std::string& protocol, const std::string& host); + + void init(const uint32 port); + + void init(const AmqpClient::SmartPtrConnectionFactory& amqpConnectionFactory); + + void destroy(); + + uint32 getChannelCacheSize(); + + AmqpClient::SmartPtrChannel getChannel(); + + void setConnectionListeners(const std::deque& listeners); + + void setChannelCacheSize(uint32 cacheSize); + +public: // ConnectionFactory + SmartPtrConnection createConnection(); + + void addConnectionListener(const SmartPtrConnectionListener& listener); + +private: + typedef std::deque ProxyDeque; + CAF_DECLARE_SMART_POINTER(ProxyDeque); + + void reset(); + + SmartPtrChannelProxy newCachedChannelProxy(); + + AmqpClient::SmartPtrChannel createBareChannel(); + +private: + class ChannelCachingConnectionProxy : public ConnectionProxy { + public: + ChannelCachingConnectionProxy(); + virtual ~ChannelCachingConnectionProxy(); + + public: + void init( + SmartPtrConnection connection, + CachingConnectionFactory *parent); + + void destroy(); + + public: // ConnectionProxy + SmartPtrConnection getTargetConnection(); + + public: // Connection + AmqpClient::SmartPtrChannel createChannel(); + void close(); + bool isOpen(); + + public: + AmqpClient::SmartPtrChannel createBareChannel(); + + private: + SmartPtrConnection _target; + CachingConnectionFactory *_parent; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(ChannelCachingConnectionProxy); + }; + CAF_DECLARE_SMART_POINTER(ChannelCachingConnectionProxy); + friend class ChannelCachingConnectionProxy; + + class CachedChannelHandler : public ChannelProxy { + public: + CachedChannelHandler(); + virtual ~CachedChannelHandler(); + + void init( + CachingConnectionFactory *parent, + AmqpClient::SmartPtrChannel channel); + + private: + void logicalClose(); + + void physicalClose(); + + void checkChannel(); + + void postProcessCall(SmartPtrCCafException exception); + + public: // ChannelProxy + AmqpClient::SmartPtrChannel getTargetChannel(); + + public: // Channel + uint16 getChannelNumber(); + + void close(); + + bool isOpen(); + + void basicAck( + const uint64 deliveryTag, + const bool ackMultiple); + + AmqpClient::SmartPtrGetResponse basicGet( + const std::string& queue, + const bool noAck); + + void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + void basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const AmqpClient::SmartPtrConsumer& consumer); + + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const bool noAck, + const AmqpClient::SmartPtrConsumer& consumer); + + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noAck, + const bool noLocal, + const bool exclusive, + const AmqpClient::SmartPtrConsumer& consumer, + const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable()); + + AmqpClient::AmqpMethods::Basic::SmartPtrCancelOk basicCancel( + const std::string& consumerTag); + + AmqpClient::AmqpMethods::Basic::SmartPtrRecoverOk basicRecover( + const bool requeue); + + AmqpClient::AmqpMethods::Basic::SmartPtrQosOk basicQos( + const uint32 prefetchSize, + const uint32 prefetchCount, + const bool global); + + void basicReject( + const uint64 deliveryTag, + const bool requeue); + + AmqpClient::AmqpMethods::Exchange::SmartPtrDeclareOk exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool durable = false, + const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable()); + + AmqpClient::AmqpMethods::Exchange::SmartPtrDeleteOk exchangeDelete( + const std::string& exchange, + const bool ifUnused); + + AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare(); + + AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclare( + const std::string& queue, + const bool durable, + const bool exclusive, + const bool autoDelete, + const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable()); + + AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclarePassive( + const std::string& queue); + + AmqpClient::AmqpMethods::Queue::SmartPtrDeleteOk queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty); + + AmqpClient::AmqpMethods::Queue::SmartPtrPurgeOk queuePurge( + const std::string& queue); + + AmqpClient::AmqpMethods::Queue::SmartPtrBindOk queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable()); + + AmqpClient::AmqpMethods::Queue::SmartPtrUnbindOk queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::SmartPtrTable& arguments = AmqpClient::SmartPtrTable()); + + void addReturnListener( + const AmqpClient::SmartPtrReturnListener& listener); + + bool removeReturnListener( + const AmqpClient::SmartPtrReturnListener& listener); + + private: + CachingConnectionFactory *_parent; + AmqpClient::SmartPtrChannel _channel; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CachedChannelHandler); + }; + CAF_DECLARE_SMART_POINTER(CachedChannelHandler); + friend class CachedChannelHandler; + +private: + bool _isInitialized; + bool _isActive; + SmartPtrCAutoRecMutex _connectionMonitor; + SmartPtrChannelCachingConnectionProxy _connection; + uint32 _channelCacheSize; + SmartPtrProxyDeque _cachedChannels; + SmartPtrCAutoRecMutex _cachedChannelsMonitor; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CachingConnectionFactory); +}; +CAF_DECLARE_SMART_POINTER(CachingConnectionFactory); + +}} + +#endif /* CACHINGCONNECTIONFACTORY_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ChannelProxy.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ChannelProxy.h new file mode 100644 index 000000000..907a4773a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ChannelProxy.h @@ -0,0 +1,33 @@ +/* + * Created on: May 29, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CHANNELPROXY_H_ +#define CHANNELPROXY_H_ + + +#include "amqpClient/api/Channel.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface on objects used to proxy channel objects for the various + * connection objects. + */ +struct __declspec(novtable) ChannelProxy : public AmqpClient::Channel { + + /** + * @brief Return the proxied Channel object + * @return the proxied channel + */ + virtual AmqpClient::SmartPtrChannel getTargetChannel() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ChannelProxy); + +}} + +#endif /* CHANNELPROXY_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/CompositeConnectionListener.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/CompositeConnectionListener.h new file mode 100644 index 000000000..90edfbd00 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/CompositeConnectionListener.h @@ -0,0 +1,53 @@ +/* + * Created on: Jun 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef COMPOSITECONNECTIONLISTENER_H_ +#define COMPOSITECONNECTIONLISTENER_H_ + +#include "amqpClient/api/Connection.h" +#include "amqpCore/ConnectionListener.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Implementation of ConnectionListener that notifies multiple delegates + */ +class AMQPINTEGRATIONCORE_LINKAGE CompositeConnectionListener : public ConnectionListener { +public: + CompositeConnectionListener(); + virtual ~CompositeConnectionListener(); + + typedef std::deque ListenerDeque; + + /** + * @brief Set the delegate collection + * @param delegates the collection of ConnectionListener delegates + */ + void setDelegates(const ListenerDeque& delegates); + + /** + * @brief Add a delegate to the collection + * @param delegate the ConnectionListener delegate to add + */ + void addDelegate(const SmartPtrConnectionListener& delegate); + +public: // ConnectionListener + void onCreate(const SmartPtrConnection& connection); + void onClose(const SmartPtrConnection& connection); + +private: + ListenerDeque _delegates; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CompositeConnectionListener); +}; +CAF_DECLARE_SMART_POINTER(CompositeConnectionListener); + +}} + +#endif /* COMPOSITECONNECTIONLISTENER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Connection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Connection.h new file mode 100644 index 000000000..0b5b2de10 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Connection.h @@ -0,0 +1,45 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_CONNECTION_H_ +#define AMQPINTEGRATIONCORE_CONNECTION_H_ + + +#include "ICafObject.h" + +#include "amqpClient/api/Channel.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief An interface for Caf::AmqpIntegration connection objects + */ +struct __declspec(novtable) Connection : public ICafObject { + + /** + * @brief Create a {@link AmqpClient::Channel Channel}. + */ + virtual AmqpClient::SmartPtrChannel createChannel() = 0; + + /** + * @brief Close the connection + */ + virtual void close() = 0; + + /** + * @brief Check the connection's status + * @retval true the connection is open + * @retval false the connection is closed + */ + virtual bool isOpen() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Connection); + +}} + +#endif /* AMQPINTEGRATIONCORE_CONNECTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionFactory.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionFactory.h new file mode 100644 index 000000000..7f40c00ac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionFactory.h @@ -0,0 +1,93 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_CONNECTIONFACTORY_H_ +#define AMQPINTEGRATIONCORE_CONNECTIONFACTORY_H_ + +#include "amqpClient/api/Connection.h" +#include "amqpCore/ConnectionListener.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface for connection factory implementations + */ +struct __declspec(novtable) ConnectionFactory : ICafObject { + CAF_DECL_UUID("D2420BC6-240C-4EAC-8518-E86A93A40035") + + /** + * @return a new Connection + */ + virtual SmartPtrConnection createConnection() = 0; + + /** + * @return the default protocol to use for connections + */ + virtual std::string getProtocol() = 0; + + /** + * @return the default host to use for connections + */ + virtual std::string getHost() = 0; + + /** + * @return the default port to use for connections + */ + virtual uint32 getPort() = 0; + + /** + * @return the default virtual host to use for connections + */ + virtual std::string getVirtualHost() = 0; + + /** + * @return the default user name to use for connections + */ + virtual std::string getUsername() = 0; + + /** + * @return the default password to use for connections + */ + virtual std::string getPassword() = 0; + + /** + * @return the default path to the CA Cert + */ + virtual std::string getCaCertPath() = 0; + + /** + * @return the default path to the Client Cert + */ + virtual std::string getClientCertPath() = 0; + + /** + * @return the default path to the Client Key + */ + virtual std::string getClientKeyPath() = 0; + + /** + * @return the number of connection retries + */ + virtual uint16 getRetries() = 0; + + /** + * @return the number of connection seconds to wait + */ + virtual uint16 getSecondsToWait() = 0; + + /** + * @brief Add a connection create/close callback + * @param listener ConnectionListener callback + */ + virtual void addConnectionListener(const SmartPtrConnectionListener& listener) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionFactory); + +}} + +#endif /* AMQPINTEGRATIONCORE_CONNECTIONFACTORY_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionListener.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionListener.h new file mode 100644 index 000000000..d34590c59 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionListener.h @@ -0,0 +1,40 @@ +/* + * Created on: Jun 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_CONNECTIONLISTENER_H_ +#define AMQPINTEGRATIONCORE_CONNECTIONLISTENER_H_ + +#include "ICafObject.h" + +#include "amqpCore/Connection.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Connection event notification callback interface + */ +struct __declspec(novtable) ConnectionListener : public ICafObject { + CAF_DECL_UUID("8F249C38-CF91-4553-9C68-3D714626A7EC") + + /** + * @brief Connection created event + * @param connection the Connection that has been created + */ + virtual void onCreate(const SmartPtrConnection& connection) = 0; + + /** + * @brief Connection closed event + * @param connection the Connection that has been closed + */ + virtual void onClose(const SmartPtrConnection& connection) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionListener); + +}} + +#endif /* AMQPINTEGRATIONCORE_CONNECTIONLISTENER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionProxy.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionProxy.h new file mode 100644 index 000000000..3dcb70d9b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ConnectionProxy.h @@ -0,0 +1,32 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_CONNECTIONPROXY_H_ +#define AMQPINTEGRATIONCORE_CONNECTIONPROXY_H_ + +#include "amqpClient/api/Connection.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface on objects used to proxy connection objects for the various + * connection factories. + */ +struct __declspec(novtable) ConnectionProxy : public Connection { + + /** + * @brief Return the proxied Connection object + * @return the proxied connection + */ + virtual SmartPtrConnection getTargetConnection() = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ConnectionProxy); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/DefaultAmqpHeaderMapper.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/DefaultAmqpHeaderMapper.h new file mode 100644 index 000000000..efc71aca8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/DefaultAmqpHeaderMapper.h @@ -0,0 +1,63 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_DEFAULTAMQPHEADERMAPPER_H_ +#define AMQPINTEGRATIONCORE_DEFAULTAMQPHEADERMAPPER_H_ + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Common/CCafRegex.h" +#include "Integration/IIntMessage.h" +#include "amqpClient/api/Envelope.h" +#include "amqpCore/AmqpHeaderMapper.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief This class is used to map AMQP headers to integration message + * headers and vice versa. + *

+ * This class maps headers between the AMQP message protocol and the internal + * integration object message protocol. By default, standard AMQP headers are mapped and + * internal and user-defined headers are not. An optional regular expression can be + * supplied to allow user-defined headers to be mapped from integration messages + * to AMQP. + */ +class AMQPINTEGRATIONCORE_LINKAGE DefaultAmqpHeaderMapper : public AmqpHeaderMapper { +public: + DefaultAmqpHeaderMapper(); + virtual ~DefaultAmqpHeaderMapper(); + + /** + * @brief Object initializer + * @param userHeaderRegex the regular expression to apply to the integration + * message header keys. Those that match are mapped to the AMQP message headers. + */ + void init(const std::string& userHeaderRegex = std::string()); + + virtual AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties + fromHeaders(IIntMessage::SmartPtrCHeaders headers); + + virtual IIntMessage::SmartPtrCHeaders + toHeaders( + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties, + AmqpClient::SmartPtrEnvelope envelope); + + virtual IIntMessage::SmartPtrCHeaders + filterHeaders( + IIntMessage::SmartPtrCHeaders headers); + +private: + bool _isInitialized; + SmartPtrCCafRegex _userHeaderRegex; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(DefaultAmqpHeaderMapper); +}; +CAF_DECLARE_SMART_POINTER(DefaultAmqpHeaderMapper); + +}} + +#endif /* AMQPINTEGRATIONCORE_DEFAULTAMQPHEADERMAPPER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Exchange.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Exchange.h new file mode 100644 index 000000000..a935ce446 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Exchange.h @@ -0,0 +1,56 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_EXCHANGE_H_ +#define AMQPINTEGRATIONCORE_EXCHANGE_H_ + + +#include "ICafObject.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Constants representing the exchange types returned by #Caf::AmqpIntegration::Exchange::getType + */ +struct AMQPINTEGRATIONCORE_LINKAGE ExchangeTypes { + /** @brief direct exchange */ + static const char *DIRECT; + /** @brief topic exchange */ + static const char *TOPIC; + /** @brief headers exchange */ + static const char *HEADERS; + /** @brief fanoout exchange */ + static const char *FANOUT; +}; + +/** + * @brief Simple container collecting information to describe an exchange. Used in conjunction with RabbitAdmin. + *

+ * Use #Caf::AmqpIntegration::createDirectExchange, #Caf::AmqpIntegration::createTopicExchange, + * #Caf::AmqpIntegration::createHeadersExchange or #Caf::AmqpIntegration::createFanoutExchange + * to create an exchange. + */ +struct __declspec(novtable) Exchange : public ICafObject { + CAF_DECL_UUID("0F93E16B-E12D-4D00-8DB8-163D57BE2078") + + /** @return the name of the exchange */ + virtual std::string getName() const = 0; + + /** @return the exchange type @see #Caf::AmqpIntegration::ExchangeTypes */ + virtual std::string getType() const = 0; + + /** + * @retval true the exchange is durable + * @retval false the exchange is not durable + */ + virtual bool isDurable() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Exchange); + +}} + +#endif /* AMQPINTEGRATIONCORE_EXCHANGE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ExchangeImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ExchangeImpl.h new file mode 100644 index 000000000..fa6e83451 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ExchangeImpl.h @@ -0,0 +1,126 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_EXCHANGEIMPL_H_ +#define AMQPINTEGRATIONCORE_EXCHANGEIMPL_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Base class for implementations of the #Caf::AmqpIntegration::Exchange interface + */ +class AMQPINTEGRATIONCORE_LINKAGE AbstractExchange : public Exchange { +public: + AbstractExchange(); + virtual ~AbstractExchange(); + + /** + * @brief initalize the object + * @param name exchange name + * @param isDurable true if the exchange is durable else false + */ + void init( + const std::string& name, + const bool isDurable); + + virtual std::string getName() const; + virtual std::string getType() const = 0; + virtual bool isDurable() const; + +private: + std::string _name; + bool _isDurable; + CAF_CM_DECLARE_NOCOPY(AbstractExchange); +}; + +/** + * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for direct exchanges + */ +class DirectExchange : public AbstractExchange { +public: + DirectExchange(); + + /** + * @brief initalize the object + * @param name exchange name + * @param durable true if the exchange is durable else false + */ + void init( + const std::string name, + const bool durable); + + virtual std::string getType() const; + CAF_CM_DECLARE_NOCOPY(DirectExchange); +}; +CAF_DECLARE_SMART_POINTER(DirectExchange); + +/** + * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for topic exchanges + */ +class TopicExchange : public AbstractExchange { +public: + TopicExchange(); + + /** + * @brief initalize the object + * @param name exchange name + * @param durable true if the exchange is durable else false + */ + void init( + const std::string name, + const bool durable); + + virtual std::string getType() const; + CAF_CM_DECLARE_NOCOPY(TopicExchange); +}; +CAF_DECLARE_SMART_POINTER(TopicExchange); + +/** + * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for headers exchanges + */ +class HeadersExchange : public AbstractExchange { +public: + HeadersExchange(); + + /** + * @brief initalize the object + * @param name exchange name + * @param durable true if the exchange is durable else false + */ + void init( + const std::string name, + const bool durable); + + virtual std::string getType() const; + CAF_CM_DECLARE_NOCOPY(HeadersExchange); +}; +CAF_DECLARE_SMART_POINTER(HeadersExchange); + +/** + * @brief Implementation of the #Caf::AmqpIntegration::Exchange interface for fanout exchanges + */ +class FanoutExchange : public AbstractExchange { +public: + FanoutExchange(); + + /** + * @brief initalize the object + * @param name exchange name + * @param durable true if the exchange is durable else false + */ + void init( + const std::string name, + const bool durable); + + virtual std::string getType() const; + CAF_CM_DECLARE_NOCOPY(FanoutExchange); +}; +CAF_DECLARE_SMART_POINTER(FanoutExchange); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ExchangeInternal.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ExchangeInternal.h new file mode 100644 index 000000000..89ec599bf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/ExchangeInternal.h @@ -0,0 +1,35 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_EXCHANGEINTERNAL_H_ +#define AMQPINTEGRATIONCORE_EXCHANGEINTERNAL_H_ + + +#include "ICafObject.h" + +#include "amqpCore/Binding.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface allowing for internal management of exchange integration objects + */ +struct __declspec(novtable) ExchangeInternal : public ICafObject { + CAF_DECL_UUID("5373AD13-2103-4FC4-A581-9D6D454F02A3") + + /** + * @brief Return the bindings defined as part of the exchange definition + * @return the collection of bindings + */ + virtual std::deque getEmbeddedBindings() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ExchangeInternal); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/MessageListener.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/MessageListener.h new file mode 100644 index 000000000..d5704ec3d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/MessageListener.h @@ -0,0 +1,27 @@ +/* + * Created on: Aug 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_MESSAGELISTENER_H_ +#define AMQPINTEGRATIONCORE_MESSAGELISTENER_H_ + + +#include "ICafObject.h" + +#include "Integration/IIntMessage.h" + +namespace Caf { namespace AmqpIntegration { + +struct __declspec(novtable) MessageListener : public ICafObject { + CAF_DECL_UUID("5B2B7C47-ACEF-4FB1-97A0-1594D05AB4D9") + + virtual void onMessage(const SmartPtrIIntMessage& message) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(MessageListener); + +}} + +#endif /* AMQPINTEGRATIONCORE_MESSAGELISTENER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Queue.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Queue.h new file mode 100644 index 000000000..0f05ffa87 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/Queue.h @@ -0,0 +1,49 @@ +/* + * Created on: Jun 13, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_QUEUE_H_ +#define AMQPINTEGRATIONCORE_QUEUE_H_ + + +#include "ICafObject.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Simple container collecting information to describe a queue. Used in conjunction with RabbitAdmin. + *

+ * Use #Caf::AmqpIntegration::createQueue to create a queue. + */ +struct __declspec(novtable) Queue : public ICafObject { + CAF_DECL_UUID("082088AD-ECA3-4591-986F-8D9AFEDDEE7D") + + /** @return the name of the queue */ + virtual std::string getName() const = 0; + + /** + * @retval true the queue is durable + * @retval false the queue is not durable + */ + virtual bool isDurable() const = 0; + + /** + * @retval true the queue is exclusive to the connection + * @retval false the queue is not exclusive to the connection + */ + virtual bool isExclusive() const = 0; + + /** + * @retval true the server should delete the queue when it is no longer in use + * @retval false the server should not delete the queue when it is no longer in use + */ + virtual bool isAutoDelete() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(Queue); + +}} + +#endif /* AMQPINTEGRATIONCORE_QUEUE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/QueueImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/QueueImpl.h new file mode 100644 index 000000000..3a3096c09 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/QueueImpl.h @@ -0,0 +1,73 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_QUEUEIMPL_H_ +#define AMQPINTEGRATIONCORE_QUEUEIMPL_H_ + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Implementation of the #Caf::AmqpIntegration::Queue interface. + */ +class AMQPINTEGRATIONCORE_LINKAGE QueueImpl : public Queue { +public: + QueueImpl(); + virtual ~QueueImpl(); + + /** + * @brief initialize the object + *

+ * durable will be set to true; + * exclusive and autoDelete will be set to false. + * @param name queue name + */ + void init(const std::string& name); + + /** + * @brief initialize the object + *

+ * exclusive and autoDelete will be set to false. + * @param name queue name + * @param durable true to make the queue durable else false + */ + void init( + const std::string& name, + const bool durable); + + /** + * @brief initialize the object + * @param name queue name + * @param durable true to make the queue durable else false + * @param exclusive true to make the queue exclusive else false + * @param autoDelete true to make the queue auto-delete else false + */ + void init( + const std::string& name, + const bool durable, + const bool exclusive, + const bool autoDelete); + + std::string getName() const; + + bool isDurable() const; + + bool isExclusive() const; + + bool isAutoDelete() const; + +private: + std::string _name; + bool _durable; + bool _exclusive; + bool _autoDelete; + CAF_CM_DECLARE_NOCOPY(QueueImpl); +}; +CAF_DECLARE_SMART_POINTER(QueueImpl); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/QueueInternal.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/QueueInternal.h new file mode 100644 index 000000000..14abc9649 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/QueueInternal.h @@ -0,0 +1,34 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_QUEUEINTERNAL_H_ +#define AMQPINTEGRATIONCORE_QUEUEINTERNAL_H_ + + +#include "ICafObject.h" + +#include "amqpCore/Queue.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Interface allowing for internal management of queue integration objects + */ +struct __declspec(novtable) QueueInternal : public ICafObject { + CAF_DECL_UUID("E15F4DA8-C4DC-4813-82B9-1B15C69915D1") + + /** + * @brief Sets the delegated Queue object + * @param queue the delegated queue + */ + virtual void setQueueInternal(SmartPtrQueue queue) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(QueueInternal); + +}} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/RabbitAdmin.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/RabbitAdmin.h new file mode 100644 index 000000000..72d78c905 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/RabbitAdmin.h @@ -0,0 +1,110 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_RABBITADMIN_H_ +#define AMQPINTEGRATIONCORE_RABBITADMIN_H_ + +#include "amqpClient/api/Channel.h" +#include "amqpCore/Binding.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpCore/Exchange.h" +#include "amqpCore/Queue.h" +#include "amqpCore/RabbitTemplate.h" +#include "amqpCore/AmqpAdmin.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Implementation of the RabbitAdmin Integration Object + */ +class AMQPINTEGRATIONCORE_LINKAGE RabbitAdmin : public AmqpAdmin { +public: + RabbitAdmin(); + virtual ~RabbitAdmin(); + + void init(SmartPtrConnectionFactory connectionFactory); + + void term(); + +public: // AmqpAdmin + void declareExchange(SmartPtrExchange exchange); + + bool deleteExchange(const std::string& exchange); + + SmartPtrQueue declareQueue(); + + void declareQueue(SmartPtrQueue queue); + + bool deleteQueue(const std::string& queue); + + void deleteQueue( + const std::string& queue, + const bool unused, + const bool empty); + + void purgeQueue(const std::string& queue); + + void declareBinding(SmartPtrBinding binding); + + void removeBinding(SmartPtrBinding binding); + +private: // Executors + class DeclareExchangeExecutor : public AmqpTemplate::Executor { + public: + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeclareExchangeExecutor); + + class DeleteExchangeExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeleteExchangeExecutor); + + class DeclareQueueExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeclareQueueExecutor); + + class DeleteQueueExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeleteQueueExecutor); + + class DeleteQueueExExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeleteQueueExExecutor); + + class PurgeQueueExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(PurgeQueueExecutor); + + class DeclareBindingExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(DeclareBindingExecutor); + + class RemoveBindingExecutor : public AmqpTemplate::Executor { + gpointer execute(AmqpClient::SmartPtrChannel channel, gpointer data); + }; + CAF_DECLARE_SMART_POINTER(RemoveBindingExecutor); + +private: + bool _isInitialized; + SmartPtrRabbitTemplate _rabbitTemplate; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(RabbitAdmin); +}; + +CAF_DECLARE_SMART_POINTER(RabbitAdmin); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/RabbitTemplate.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/RabbitTemplate.h new file mode 100644 index 000000000..ace26c6ac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/RabbitTemplate.h @@ -0,0 +1,168 @@ +/* + * Created on: Jun 5, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_RABBITTEMPLATE_H_ +#define AMQPINTEGRATIONCORE_RABBITTEMPLATE_H_ + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Exception/CCafException.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/Channel.h" +#include "amqpClient/api/Envelope.h" +#include "amqpCore/AmqpHeaderMapper.h" +#include "amqpCore/AmqpTemplate.h" +#include "amqpClient/api/Connection.h" +#include "amqpCore/ConnectionFactory.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief Implementation of the RabbitTemplate Integration Object + */ +class AMQPINTEGRATIONCORE_LINKAGE RabbitTemplate : public AmqpTemplate { +public: + RabbitTemplate(); + virtual ~RabbitTemplate(); + + void init(SmartPtrConnectionFactory connectionFactory); + + void term(); + + void setExchange(const std::string& exchange); + + void setRoutingKey(const std::string& routingKey); + + void setQueue(const std::string& queue); + + void setReplyTimeout(const uint32 replyTimeout); + + void setHeaderMapper(const SmartPtrAmqpHeaderMapper& headerMapper); + +public: // AmqpTemplate + void send( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + void send( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + void send( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage receive( + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage receive( + const std::string& queueName, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage sendAndReceive( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + + gpointer execute(SmartPtrExecutor executor, gpointer data); + +private: + void doSend( + AmqpClient::SmartPtrChannel channel, + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper = SmartPtrAmqpHeaderMapper()); + + SmartPtrIIntMessage doSendAndReceive( + AmqpClient::SmartPtrChannel channel, + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper = SmartPtrAmqpHeaderMapper(), + SmartPtrAmqpHeaderMapper responseHeaderMapper = SmartPtrAmqpHeaderMapper()); + +private: + typedef TBlockingCell SynchronousHandoff; + CAF_DECLARE_SMART_POINTER(SynchronousHandoff); + + class DefaultConsumer : public AmqpClient::Consumer { + public: + DefaultConsumer(); + virtual ~DefaultConsumer(); + + void init( + SmartPtrAmqpHeaderMapper mapper, + SmartPtrSynchronousHandoff handoff); + + void handleConsumeOk( + const std::string& consumerTag); + + void handleCancelOk( + const std::string& consumerTag); + + void handleRecoverOk( + const std::string& consumerTag); + + void handleDelivery( + const std::string& consumerTag, + const AmqpClient::SmartPtrEnvelope& envelope, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body); + + void handleShutdown( + const std::string& consumerTag, + SmartPtrCCafException& reason); + + private: + SmartPtrAmqpHeaderMapper _mapper; + SmartPtrSynchronousHandoff _handoff; + }; + CAF_DECLARE_SMART_POINTER(DefaultConsumer); + +private: + static std::string DEFAULT_EXCHANGE; + static std::string DEFAULT_ROUTING_KEY; + static int32 DEFAULT_REPLY_TIMEOUT; + +private: + bool _isInitialized; + std::string _exchange; + std::string _routingKey; + std::string _queue; + uint32 _replyTimeout; + SmartPtrConnectionFactory _connectionFactory; + SmartPtrConnection _connection; + SmartPtrAmqpHeaderMapper _headerMapper; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(RabbitTemplate); +}; +CAF_DECLARE_SMART_POINTER(RabbitTemplate); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/SimpleConnection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/SimpleConnection.h new file mode 100644 index 000000000..fa897a536 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/SimpleConnection.h @@ -0,0 +1,47 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_SIMPLECONNECTION_H_ +#define AMQPINTEGRATIONCORE_SIMPLECONNECTION_H_ + +#include "amqpClient/api/Channel.h" +#include "amqpClient/api/Connection.h" +#include "amqpCore/Connection.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief A simple object that wraps a AmqpClient::Connection and exposes + * it as an AmqpIntegration::Connection. + */ +class AMQPINTEGRATIONCORE_LINKAGE SimpleConnection : public Connection { +public: + SimpleConnection(); + virtual ~SimpleConnection(); + + /** + * @brief Initialize the object with the given AmqpClient::Connection + * @param delegate the wrapped AmqpClient::Connection + */ + void init(const AmqpClient::SmartPtrConnection& delegate); + +public: // Connection + AmqpClient::SmartPtrChannel createChannel(); + void close(); + bool isOpen(); + +private: + AmqpClient::SmartPtrConnection _delegate; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(SimpleConnection); +}; +CAF_DECLARE_SMART_POINTER(SimpleConnection); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/SimpleMessageListenerContainer.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/SimpleMessageListenerContainer.h new file mode 100644 index 000000000..ddf3d6c9a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/include/amqpCore/SimpleMessageListenerContainer.h @@ -0,0 +1,165 @@ +/* + * Created on: Aug 1, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef SIMPLEMESSAGELISTENERCONTAINER_H_ +#define SIMPLEMESSAGELISTENERCONTAINER_H_ + + + +#include "Integration/IErrorHandler.h" + +#include "Exception/CCafException.h" +#include "Integration/Core/CSimpleAsyncTaskExecutor.h" +#include "Integration/IIntMessage.h" +#include "Integration/IThrowable.h" +#include "amqpClient/api/Channel.h" +#include "amqpCore/BlockingQueueConsumer.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpCore/MessageListener.h" +#include "Integration/ILifecycle.h" +#include "Integration/IRunnable.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief A simple message listener used by channels to retrieve messages + *

+ * This container manages message acknowledgment, broker connection recoverability and + * other aspects of consuming from queues. + */ +class AMQPINTEGRATIONCORE_LINKAGE SimpleMessageListenerContainer : + public ILifecycle { +public: + SimpleMessageListenerContainer(); + virtual ~SimpleMessageListenerContainer(); + + /** + * @brief initialize the object + */ + void init(); + + /** + * @brief initialize the object + * @param connectionFactory the ConnectionFactory + */ + void init( + SmartPtrConnectionFactory connectionFactory); + +public: + /** + * @brief Set the message acknowledgment mode + * @param acknowledgeMode acknowledgment mode + */ + void setAcknowledgeMode(AcknowledgeMode acknowledgeMode); + + void setPrefetchCount(const uint32 prefetchCount); + + void setReceiveTimeout(const uint32 receiveTimeout); + + void setRecoveryInterval(const uint32 recoveryInterval); + + void setTxSize(const uint32 txSize); + + void setQueue(const std::string& queue); + + void setConnectionFactory(SmartPtrConnectionFactory connectionFactory); + + void setMessagerListener(SmartPtrMessageListener messageListener); + + SmartPtrMessageListener getMessageListener(); + +public: // ILifecycle + void start(const uint32 timeoutMs); + + void stop(const uint32 timeoutMs); + + bool isRunning() const; + +private: + void validateConfig(); + + bool isActive(); + + bool receiveAndExecute(SmartPtrBlockingQueueConsumer consumer); + + void executeListener( + AmqpClient::SmartPtrChannel channel, + SmartPtrIIntMessage message); + + void doInvokeListener( + SmartPtrIIntMessage message); + + void restart(); + +private: + typedef TBlockingCell StartupExceptionHandoff; + CAF_DECLARE_SMART_POINTER(StartupExceptionHandoff); + +private: + class AsyncMessageProcessingConsumer : + public IRunnable, + public IErrorHandler { + public: + AsyncMessageProcessingConsumer(); + ~AsyncMessageProcessingConsumer(); + void init( + SimpleMessageListenerContainer *parent, + SmartPtrBlockingQueueConsumer consumer, + SmartPtrStartupExceptionHandoff startupException, + const uint32 timeout, + const uint32 recoveryInterval); + void run(); + void cancel(); + void handleError( + const SmartPtrIThrowable& throwable, + const SmartPtrIIntMessage& message) const; + + private: + void handleStartupFailure(); + + private: + SimpleMessageListenerContainer *_parent; + SmartPtrBlockingQueueConsumer _consumer; + SmartPtrStartupExceptionHandoff _startupException; + uint32 _timeout; + uint32 _recoveryInterval; + bool _isCanceled; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(AsyncMessageProcessingConsumer); + }; + CAF_DECLARE_SMART_POINTER(AsyncMessageProcessingConsumer); + +private: + bool _isInitialized; + volatile bool _isRunning; + volatile bool _isActive; + bool _debugTrace; + SmartPtrBlockingQueueConsumer _consumer; + SmartPtrCSimpleAsyncTaskExecutor _executor; + SmartPtrStartupExceptionHandoff _startupException; + + SmartPtrConnectionFactory _connectionFactory; + SmartPtrMessageListener _messageListener; + std::string _queue; + AcknowledgeMode _acknowledgeMode; + uint32 _receiveTimeout; + uint32 _prefetchCount; + uint32 _txSize; + uint32 _recoveryInterval; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(SimpleMessageListenerContainer); +}; +CAF_DECLARE_SMART_POINTER(SimpleMessageListenerContainer); + +}} + +#endif /* SIMPLEMESSAGELISTENERCONTAINER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannel.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannel.cpp new file mode 100644 index 000000000..63d059357 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannel.cpp @@ -0,0 +1,1249 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/AMQCommand.h" +#include "amqpClient/BlockingRpcContinuation.h" +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/ConsumerWorkService.h" +#include "amqpClient/IConnectionInt.h" +#include "amqpClient/IRpcContinuation.h" +#include "amqpClient/TCopyOnWriteContainer.h" +#include "amqpClient/amqpImpl/BasicAckMethod.h" +#include "amqpClient/amqpImpl/BasicCancelMethod.h" +#include "amqpClient/amqpImpl/BasicConsumeMethod.h" +#include "amqpClient/amqpImpl/BasicGetMethod.h" +#include "amqpClient/amqpImpl/BasicPublishMethod.h" +#include "amqpClient/amqpImpl/BasicQosMethod.h" +#include "amqpClient/amqpImpl/BasicRecoverMethod.h" +#include "amqpClient/amqpImpl/BasicRejectMethod.h" +#include "amqpClient/amqpImpl/ChannelCloseOkMethod.h" +#include "amqpClient/amqpImpl/EnvelopeImpl.h" +#include "amqpClient/amqpImpl/ExchangeDeclareMethod.h" +#include "amqpClient/amqpImpl/ExchangeDeleteMethod.h" +#include "amqpClient/amqpImpl/GetResponseImpl.h" +#include "amqpClient/amqpImpl/IContentHeader.h" +#include "amqpClient/amqpImpl/IMethod.h" +#include "amqpClient/amqpImpl/IServerMethod.h" +#include "amqpClient/amqpImpl/QueueBindMethod.h" +#include "amqpClient/amqpImpl/QueueDeclareMethod.h" +#include "amqpClient/amqpImpl/QueueDeleteMethod.h" +#include "amqpClient/amqpImpl/QueuePurgeMethod.h" +#include "amqpClient/amqpImpl/QueueUnbindMethod.h" +#include "amqpClient/api/AmqpMethods.h" +#include "amqpClient/api/Consumer.h" +#include "amqpClient/api/GetResponse.h" +#include "amqpClient/api/ReturnListener.h" +#include "amqpClient/api/amqpClient.h" +#include "amqpClient/AMQChannel.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#include "AMQUtil.h" + +using namespace Caf::AmqpClient; + +const uint8 AMQChannel::DEBUGLOG_FLAG_ENTRYEXIT = 0x01; +const uint8 AMQChannel::DEBUGLOG_FLAG_AMQP = 0x02; + +#define AMQCHANNEL_ENTRY \ + if (_debugLogFlags & DEBUGLOG_FLAG_ENTRYEXIT) { CAF_CM_LOG_DEBUG_VA0("entry"); } + +#define AMQCHANNEL_EXIT \ + if (_debugLogFlags & DEBUGLOG_FLAG_ENTRYEXIT) { CAF_CM_LOG_DEBUG_VA0("exit"); } + +#if (1) // init +AMQChannel::AMQChannel() : + _isInitialized(false), + _isOpen(false), + _debugLogFlags(0), + _channelNumber(0), + CAF_CM_INIT_LOG("AMQChannel") { + CAF_CM_INIT_THREADSAFE; + _channelMutex.CreateInstance(); + _channelMutex->initialize(); +} + +AMQChannel::~AMQChannel() { + if (_channelHandle) { + AmqpChannel::AMQP_ChannelClose(_channelHandle); + } +} + +void AMQChannel::init( + const SmartPtrIConnectionInt& connection, + const SmartPtrConsumerWorkService& workService) { + CAF_CM_FUNCNAME("init"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(connection); + CAF_CM_VALIDATE_SMARTPTR(workService); + + uint32 debugFlags = 0; + if (getAppConfig()->getUint32( + "AMQChannel", + "debugLogFlags", + debugFlags, + IConfigParams::PARAM_OPTIONAL)) { + _debugLogFlags = debugFlags; + } + + AMQCHANNEL_ENTRY; + _connection = connection; + _workService = workService; + _channelSignal.initialize("channelSignal"); + _dispatcher.CreateInstance(); + _dispatcher->init(_workService); + + // Sequence is important here. Once amqpConnectionOpenChannel is called the + // channel.open method will be sent. Therefore we must have an _activeRpc + // registered to handle the channel.open-ok response BEFORE activating the + // _channelTask. + + // Create the _activeRpc to listen for channel-open.ok + SmartPtrBlockingRpcContinuation continuation; + continuation.CreateInstance(); + continuation->init(); + _activeRpc = continuation; + + // Open the channel + AMQUtil::checkAmqpStatus( + _connection->amqpConnectionOpenChannel(_channelHandle), + "_connection->amqpConnectionOpenChannel"); + AMQUtil::checkAmqpStatus( + AmqpChannel::AMQP_ChannelGetId(_channelHandle, &_channelNumber), + "AmqpChannel::AMQP_ChannelGetId"); + + // Set up AMQP frame processing + _command.CreateInstance(); + _command->init(); + SmartPtrChannelTask channelTask; + channelTask.CreateInstance(); + channelTask->init(this); + _workService->addWork(channelTask); + + // Wait for the channel-open.ok response + SmartPtrAMQCommand command; + { + CAF_CM_UNLOCK_LOCK; + command = continuation->getReply(); + } + CAF_CM_VALIDATE_SMARTPTR(command); + AmqpMethods::Channel::SmartPtrOpenOk openOk; + openOk.QueryInterface(command->getMethod(), false); + if (!openOk) { + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + 0, + "Expected to receive channel.open-ok but received " + "%s instead. This channel cannot be used.", + command->getMethod()->getProtocolMethodName().c_str()); + } + + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_DEBUG_VA1("channel #%d is open", _channelNumber); + } + _isOpen = true; + _isInitialized = true; + AMQCHANNEL_EXIT; +} + +uint16 AMQChannel::getChannelNumber() { + CAF_CM_FUNCNAME_VALIDATE("getChannelNumber"); + CAF_CM_LOCK_UNLOCK; + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ensureIsOpen(); + AMQCHANNEL_EXIT; + return _channelNumber; +} + +bool AMQChannel::isOpen() { + CAF_CM_LOCK_UNLOCK; + return _isOpen; +} + +void AMQChannel::close() { + CAF_CM_FUNCNAME_VALIDATE("close"); + AMQCHANNEL_ENTRY; + _connection->channelCloseChannel(this); + AMQCHANNEL_EXIT; +} + +void AMQChannel::notifyConnectionClosed(SmartPtrCCafException& exception) { + CAF_CM_FUNCNAME_VALIDATE("notifyConnectionClosed"); + AMQCHANNEL_ENTRY + close(exception); + AMQCHANNEL_EXIT; +} + +void AMQChannel::close(SmartPtrCCafException& exception) { + CAF_CM_FUNCNAME_VALIDATE("close"); + CAF_CM_LOCK_UNLOCK; + AMQCHANNEL_ENTRY + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_DEBUG_VA1("Closing channel #%d", _channelNumber); + } + if (_isOpen) { + _isOpen = false; + _dispatcher->quiesce(); + + SmartPtrIRpcContinuation activeRpc; + { + CAF_CM_UNLOCK_LOCK; + activeRpc = nextOutstandingRpc(); + } + if (activeRpc) { + activeRpc->handleAbort(exception); + } + if (_dispatcher) { + _dispatcher->handleShutdown(exception); + } + AMQPStatus status = AmqpChannel::AMQP_ChannelClose(_channelHandle); + if (status != AMQP_ERROR_OK) { + CAF_CM_LOG_WARN_VA2( + "channel #%d closed with API code %d", + _channelNumber, + status); + } + } + AMQCHANNEL_EXIT; +} +#endif + +#if (1) // basic +void AMQChannel::basicAck( + const uint64 deliveryTag, + const bool ackMultiple) { + CAF_CM_FUNCNAME_VALIDATE("basicAck"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrBasicAckMethod method; + method.CreateInstance(); + method->init(deliveryTag, ackMultiple); + transmit(method); + AMQCHANNEL_EXIT; +} + +SmartPtrGetResponse AMQChannel::basicGet( + const std::string& queue, + const bool noAck) { + CAF_CM_FUNCNAME("basicGet"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrBasicGetMethod method; + method.CreateInstance(); + method->init(queue, noAck); + SmartPtrAMQCommand reply = execRpc(method); + SmartPtrIMethod replyMethod = reply->getMethod(); + + SmartPtrGetResponseImpl getResponse; + AmqpMethods::Basic::SmartPtrGetOk getOk; + getOk.QueryInterface(replyMethod, false); + if (getOk) { + AmqpContentHeaders::SmartPtrBasicProperties properties; + SmartPtrIContentHeader contentHeader = reply->getContentHeader(); + if (contentHeader) { + properties.QueryInterface(contentHeader, false); + if (!properties) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic properties content header. Received '%s'. " + "Please report this bug.", + contentHeader->getClassName().c_str()); + } + } + + SmartPtrEnvelopeImpl envelope; + envelope.CreateInstance(); + envelope->init( + getOk->getDeliveryTag(), + getOk->getRedelivered(), + getOk->getExchange(), + getOk->getRoutingKey()); + getResponse.CreateInstance(); + getResponse->init( + envelope, + properties, + reply->getContentBody(), + getOk->getMessageCount()); + } else { + AmqpMethods::Basic::SmartPtrGetEmpty getEmpty; + getEmpty.QueryInterface(replyMethod, false); + if(!getEmpty) { + CAF_CM_EXCEPTIONEX_VA2( + NoSuchInterfaceException, + 0, + "Expected a basic.get-ok or basic.get-empty response. Received '%s'. " + "Please report this bug.", + method->getMethodName().c_str(), + replyMethod->getProtocolMethodName().c_str()); + } + } + AMQCHANNEL_EXIT; + return getResponse; +} + +void AMQChannel::basicPublish( + const std::string& exchange, + const std::string& routingKey, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + basicPublish( + exchange, + routingKey, + false, + false, + properties, + body); +} + +void AMQChannel::basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME_VALIDATE("basicPublish"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrBasicPublishMethod method; + method.CreateInstance(); + method->init( + exchange, + routingKey, + mandatory, + immediate, + properties, + body); + transmit(method); + AMQCHANNEL_EXIT; +} + +AmqpMethods::Basic::SmartPtrConsumeOk AMQChannel::basicConsume( + const std::string& queue, + const SmartPtrConsumer& consumer) { + return basicConsume(queue, false, consumer); +} + +AmqpMethods::Basic::SmartPtrConsumeOk AMQChannel::basicConsume( + const std::string& queue, + const bool noAck, + const SmartPtrConsumer& consumer) { + return basicConsume(queue, "", noAck, false, false, consumer); +} + +AmqpMethods::Basic::SmartPtrConsumeOk AMQChannel::basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noAck, + const bool noLocal, + const bool exclusive, + const SmartPtrConsumer& consumer, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("basicConsume"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + AmqpMethods::Basic::SmartPtrConsumeOk consumeOk; + // Put a lock on the dispatcher. + // DO NOT FORGET TO UNLOCK IT NO MATTER WHAT! + _dispatcher->lock(); + try { + SmartPtrBasicConsumeMethod method; + method.CreateInstance(); + method->init(queue, consumerTag, noLocal, noAck, exclusive, arguments); + SmartPtrAMQCommand reply = execRpc(method); + SmartPtrIMethod replyMethod = reply->getMethod(); + consumeOk.QueryInterface(replyMethod, false); + if (consumeOk) { + const std::string& consumerTagActual = consumeOk->getConsumerTag(); + _dispatcher->addConsumer(consumerTagActual, consumer); + _dispatcher->handleConsumeOk(consumerTagActual); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic.consume-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + } + CAF_CM_CATCH_ALL; + _dispatcher->unlock(); + CAF_CM_THROWEXCEPTION; + AMQCHANNEL_EXIT; + return consumeOk; +} + +AmqpMethods::Basic::SmartPtrCancelOk AMQChannel::basicCancel( + const std::string& consumerTag) { + CAF_CM_FUNCNAME("basicCancel"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + AmqpMethods::Basic::SmartPtrCancelOk cancelOk; + SmartPtrConsumer originalConsumer = _dispatcher->getConsumer(consumerTag); + if (originalConsumer) { + SmartPtrBasicCancelMethod method; + method.CreateInstance(); + method->init(consumerTag); + SmartPtrAMQCommand reply = execRpc(method); + SmartPtrIMethod replyMethod = reply->getMethod(); + cancelOk.QueryInterface(replyMethod, false); + if (cancelOk) { + try { + _dispatcher->handleCancelOk(consumerTag); + } + CAF_CM_CATCH_ALL; + _dispatcher->removeConsumer(consumerTag); + CAF_CM_THROWEXCEPTION; + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic.cancel-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "No such consumer tag '%s'", + consumerTag.c_str()); + } + AMQCHANNEL_EXIT; + return cancelOk; +} + +AmqpMethods::Basic::SmartPtrRecoverOk AMQChannel::basicRecover( + const bool requeue) { + CAF_CM_FUNCNAME("basicRecover"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + AmqpMethods::Basic::SmartPtrRecoverOk recoverOk; + SmartPtrBasicRecoverMethod method; + method.CreateInstance(); + method->init(requeue); + SmartPtrAMQCommand reply = execRpc(method); + SmartPtrIMethod replyMethod = reply->getMethod(); + recoverOk.QueryInterface(replyMethod, false); + if (recoverOk) { + _dispatcher->handleRecoverOk(); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic.recover-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return recoverOk; +} + +AmqpMethods::Basic::SmartPtrQosOk AMQChannel::basicQos( + const uint32 prefetchSize, + const uint32 prefetchCount, + const bool global) { + CAF_CM_FUNCNAME("basicQos"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrBasicQosMethod method; + method.CreateInstance(); + method->init(prefetchSize, prefetchCount, global); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Basic::SmartPtrQosOk qosOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + qosOk.QueryInterface(replyMethod, false); + if (!qosOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic.qos-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return qosOk; +} + +void AMQChannel::basicReject( + const uint64 deliveryTag, + const bool requeue) { + CAF_CM_FUNCNAME_VALIDATE("basicReject"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrBasicRejectMethod method; + method.CreateInstance(); + method->init(deliveryTag, requeue); + transmit(method); + AMQCHANNEL_EXIT; +} +#endif + +#if (1) // exchange +AmqpMethods::Exchange::SmartPtrDeclareOk AMQChannel::exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool durable, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("exchangeDeclare"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrExchangeDeclareMethod method; + method.CreateInstance(); + method->init(exchange, type, false, durable, arguments); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Exchange::SmartPtrDeclareOk declareOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + declareOk.QueryInterface(replyMethod, false); + if (!declareOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a exchange.declare-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return declareOk; +} + +AmqpMethods::Exchange::SmartPtrDeleteOk AMQChannel::exchangeDelete( + const std::string& exchange, + const bool ifUnused) { + CAF_CM_FUNCNAME("exchangeDelete"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrExchangeDeleteMethod method; + method.CreateInstance(); + method->init(exchange, ifUnused); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Exchange::SmartPtrDeleteOk deleteOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + deleteOk.QueryInterface(replyMethod, false); + if (!deleteOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a exchange.delete-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return deleteOk; +} + +#endif + +#if (1) // queue +AmqpMethods::Queue::SmartPtrDeclareOk AMQChannel::queueDeclare() { + return queueDeclare( + "", + false, + true, + true); +} + +AmqpMethods::Queue::SmartPtrDeclareOk AMQChannel::queueDeclare( + const std::string& queue, + const bool durable, + const bool exclusive, + const bool autoDelete, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("queueDeclare"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueueDeclareMethod method; + method.CreateInstance(); + method->init(queue, durable, exclusive, autoDelete, arguments); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrDeclareOk declareOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + declareOk.QueryInterface(replyMethod, false); + if (!declareOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.declare-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return declareOk; +} + +AmqpMethods::Queue::SmartPtrDeclareOk AMQChannel::queueDeclarePassive( + const std::string& queue) { + CAF_CM_FUNCNAME("queueDeclarePassive"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueueDeclareMethod method; + method.CreateInstance(); + method->initPassive(queue); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrDeclareOk declareOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + declareOk.QueryInterface(replyMethod, false); + if (!declareOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.declare-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return declareOk; +} + +AmqpMethods::Queue::SmartPtrDeleteOk AMQChannel::queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty) { + CAF_CM_FUNCNAME("queueDelete"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueueDeleteMethod method; + method.CreateInstance(); + method->init(queue, ifUnused, ifEmpty); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrDeleteOk deleteOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + deleteOk.QueryInterface(replyMethod, false); + if (!deleteOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.delete-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return deleteOk; +} + +AmqpMethods::Queue::SmartPtrPurgeOk AMQChannel::queuePurge( + const std::string& queue) { + CAF_CM_FUNCNAME("queuePurge"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueuePurgeMethod method; + method.CreateInstance(); + method->init(queue); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrPurgeOk purgeOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + purgeOk.QueryInterface(replyMethod, false); + if (!purgeOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.purge-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return purgeOk; +} + +AmqpMethods::Queue::SmartPtrBindOk AMQChannel::queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("queueBind"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueueBindMethod method; + method.CreateInstance(); + method->init(queue, exchange, routingKey, arguments); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrBindOk bindOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + bindOk.QueryInterface(replyMethod, false); + if (!bindOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.bind-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return bindOk; +} + +AmqpMethods::Queue::SmartPtrUnbindOk AMQChannel::queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("queueUnbind"); + AMQCHANNEL_ENTRY; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrQueueUnbindMethod method; + method.CreateInstance(); + method->init(queue, exchange, routingKey, arguments); + SmartPtrAMQCommand reply = execRpc(method); + AmqpMethods::Queue::SmartPtrUnbindOk unbindOk; + SmartPtrIMethod replyMethod = reply->getMethod(); + unbindOk.QueryInterface(replyMethod, false); + if (!unbindOk) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a queue.unbind-ok response. Received '%s'. " + "Please report this bug.", + replyMethod->getProtocolMethodName().c_str()); + } + AMQCHANNEL_EXIT; + return unbindOk; +} +#endif +#if (1) // ReturnListener +void AMQChannel::addReturnListener( + const SmartPtrReturnListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("addReturnListener"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_LOCK_UNLOCK; + _returnListeners.add(listener); +} + +bool AMQChannel::removeReturnListener( + const SmartPtrReturnListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("removeReturnListener"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _returnListeners.remove(listener); +} +#endif + +#if (1) // processing +/* + * Worker thread execution callback. + * Check for an incoming frame and if one exists, process it. + * This method is also called during init() and it waiting for the + * channel.open-ok. While establishing the connection we may get timeout errors + * because the broker is down. In that case retry the connection for the allotted + * time before giving up. + */ +bool AMQChannel::taskHandler() { + CAF_CM_FUNCNAME("taskHandler"); + CAF_CM_LOCK_UNLOCK; + + try { + uint32 frameCount = 0; + AMQPStatus status = AMQP_ERROR_OK; + SmartPtrCAmqpFrame frame; + while (_channelHandle && (frameCount < 1000)) { + SmartPtrCAmqpChannel channelHandle = _channelHandle; + { + CAF_CM_UNLOCK_LOCK; + status = AmqpChannel::AMQP_ChannelReceive(channelHandle, frame, 0); + } + if (frame) { + ++frameCount; + try { + SmartPtrAMQCommand command = _command; + if (command->handleFrame(frame)) { + _command.CreateInstance(); + _command->init(); + handleCompleteInboundCommand(command); + } + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_CRIT_VA1("channel #%d", _channelNumber); + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + // Throw away the current command + _command.CreateInstance(); + _command->init(); + + // Abort any outstanding rpc + SmartPtrIRpcContinuation rpc; + { + CAF_CM_UNLOCK_LOCK; + rpc = nextOutstandingRpc(); + } + if (rpc) { + SmartPtrCCafException exception = CAF_CM_GETEXCEPTION; + rpc->handleAbort(exception); + } + CAF_CM_CLEAREXCEPTION; + } + } else if ((status == AMQP_ERROR_TIMEOUT) || (status == AMQP_ERROR_IO_INTERRUPTED)) { + break; + } else { + AMQUtil::checkAmqpStatus(status, "AmqpChannel::AMQP_ChannelReceive"); + } + } + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_CRIT_VA1("channel #%d", _channelNumber); + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + + // If we get here and the _channelHandle is NULL then + // the channel is closed. If so, return 'true'. + // + // If the _channelHandle is still good, return 'false' and let + // this task run again. + return (_channelHandle == NULL); +} + +/* + * A complete inbound AMQP command is available for processing. + */ +void AMQChannel::handleCompleteInboundCommand(const SmartPtrAMQCommand& command) { + CAF_CM_FUNCNAME("handleCompleteInboundCommand"); + // No LOCK_UNLOCK because there aren't any members to protect and because + // this routine makes a blocking call. + AMQCHANNEL_ENTRY; + // Check with asyn processing first + if (!processAsync(command)) { + // Command was not handled so must be part of an outstanding + // RPC call. Get the outstanding RPC call and have it process + // it. + // + // The outstanding RPC call may have been aborted because we are + // closing. That is the only time the RPC object should be null + // when in this method + SmartPtrIRpcContinuation rpc = nextOutstandingRpc(); + if (rpc) { + rpc->handleCommand(command); + } else if (isOpen()) { + CAF_CM_EXCEPTIONEX_VA3( + NullPointerException, + 0, + "[command=%s, class_id: 0x%08x, method_id: 0x%08x] nextOutstandingRpc() returned NULL and the channel is open. " + "This should never happen. Please report this bug.", + command->getMethod()->getProtocolMethodName().c_str(), + command->getMethod()->getProtocolClassId(), + command->getMethod()->getProtocolMethodId()); + } + } + AMQCHANNEL_EXIT; +} + +/* + * First line of incomming command processing. This method handles + * non-RPC commands such as channel.close, basic.deliver, basic.recover, etc. + */ +bool AMQChannel::processAsync(const SmartPtrAMQCommand& command) { + CAF_CM_FUNCNAME("processAsync"); + CAF_CM_LOCK_UNLOCK; + AMQCHANNEL_ENTRY; + bool commandHandled = false; + const amqp_method_number_t amqpMethodId = + (command->getMethod()->getProtocolClassId() << 16) | + command->getMethod()->getProtocolMethodId(); + + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_DEBUG_VA4( + "Method [channel=%d][class id=0x%04X][method id=0x%04X][name=%s]", + _channelNumber, + command->getMethod()->getProtocolClassId(), + command->getMethod()->getProtocolMethodId(), + command->getMethod()->getProtocolMethodName().c_str()); + } + + if (amqpMethodId == AMQP_CHANNEL_OPEN_OK_METHOD) { + // no-op. let it pass through + } + else if (amqpMethodId == AMQP_CHANNEL_CLOSE_METHOD) { + // first order of business - stop the dispatcher from handling incoming messages + _dispatcher->quiesce(); + + AmqpMethods::Channel::SmartPtrClose chClose; + chClose.QueryInterface(command->getMethod(), false); + if (chClose) { + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_INFO_VA5( + "channel.close %s [channel=%d][code=0x%04X][class id=0x%04X][method id=0x%04X]", + chClose->getReplyText().c_str(), + _channelNumber, + chClose->getReplyCode(), + chClose->getClassId(), + chClose->getMethodId()); + } + } else { + // Okay - very weird but we need to keep on going... + CAF_CM_LOG_CRIT_VA0( + "Received AMQP_CHANNEL_CLOSE_METHOD but method object " + "is not a AmqpMethods::Channel::Close instance. Please report " + "this bug."); + } + { + CAF_CM_UNLOCK_LOCK; + channelCloseByServerShutdown(chClose); + } + commandHandled = true; + } else if (amqpMethodId == AMQP_CHANNEL_CLOSE_OK_METHOD) { + _channelHandle = AMQP_HANDLE_INVALID; + commandHandled = true; + } else if (isOpen()) { + try { + SmartPtrIMethod method = command->getMethod(); + SmartPtrIContentHeader contentHeader = command->getContentHeader(); + switch (amqpMethodId) { + case AMQP_BASIC_DELIVER_METHOD: + { + commandHandled = true; + AmqpMethods::Basic::SmartPtrDeliver deliverMethod; + deliverMethod.QueryInterface(method, false); + if (deliverMethod) { + SmartPtrEnvelopeImpl envelope; + envelope.CreateInstance(); + envelope->init( + deliverMethod->getDeliveryTag(), + deliverMethod->getRedelivered(), + deliverMethod->getExchange(), + deliverMethod->getRoutingKey()); + + AmqpContentHeaders::SmartPtrBasicProperties properties; + if (contentHeader) { + properties.QueryInterface(contentHeader, false); + if (!properties) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected a basic properties content header. Received '%s'. " + "Please report this bug.", + contentHeader->getClassName().c_str()); + } + } + _dispatcher->handleDelivery( + deliverMethod->getConsumerTag(), + envelope, + properties, + command->getContentBody()); + } else { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "Received AMQP_BASIC_DELIVER_METHOD but the method object " + "is not a AmqpClient::AmqpMethods::Basic::Deliver instance. " + "Please report this bug."); + } + } + break; + + case AMQP_BASIC_RETURN_METHOD: + callReturnListeners(command); + commandHandled = true; + break; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + if (CAF_CM_ISEXCEPTION) { + // discard the command + commandHandled = true; + } + CAF_CM_CLEAREXCEPTION; + } else { + // We are shutting down so the inbound command should be + // discarded per spec. 'Consume' it by returning true. + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_INFO_VA0("isOpen() is false. Discarding command."); + } + commandHandled = true; + } + AMQCHANNEL_EXIT; + return commandHandled; +} + +/* + * Checks the _isOpen flag and throws an exception if the + * channel is closed. + */ +void AMQChannel::ensureIsOpen() { + CAF_CM_FUNCNAME("ensureIsOpen"); + CAF_CM_LOCK_UNLOCK; + AMQCHANNEL_ENTRY; + if (!isOpen()) { + CAF_CM_EXCEPTIONEX_VA0( + AmqpExceptions::ChannelClosedException, + 0, + "Attempt to use closed channel"); + } + AMQCHANNEL_EXIT; +} + +/* + * Execute a synchronous call such as basic.get, queue.declare, exchange.delete, + * etc. The AMQP synchronous calls are all executed through this mechanism. + */ +SmartPtrAMQCommand AMQChannel::execRpc(const SmartPtrIServerMethod& method) { + CAF_CM_FUNCNAME("execRpc"); + AMQCHANNEL_ENTRY; + SmartPtrBlockingRpcContinuation rpc; + try { + CAF_CM_LOCK_UNLOCK1(_channelMutex); + CAF_CM_LOCK_UNLOCK; + + ensureIsOpen(); + + const std::string methodName = method->getMethodName(); + rpc.CreateInstance(); + rpc->init(); + + // Wait for the current rpc to finish + while (_activeRpc) { + { + CAF_CM_UNLOCK_LOCK; + _channelSignal.waitOrTimeout(_channelMutex, 0); + } + } + + // indicate the new active RPC call + _activeRpc = rpc; + + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_DEBUG_VA2( + "[channel=%d] Sending AMQP method %s", + _channelNumber, + method->getMethodName().c_str()); + } + + // send the call to the server + AMQUtil::checkAmqpStatus( + method->send(_channelHandle), + methodName.c_str()); + } + CAF_CM_CATCH_ALL; + CAF_CM_THROWEXCEPTION; + + // Check the reply. If null there should be + // a reason (exception) explaining why the call failed. + // This getReply() doesn't need to be in a UNLOCK_LOCK because the LOCK_UNLOCK + // was scoped by the try. + SmartPtrAMQCommand reply = rpc->getReply(); + CAF_CM_LOG_DEBUG_VA1("RPC reply - %s", (reply.IsNull() ? "NULL" : reply->getMethod()->getProtocolMethodName().c_str())); + AMQCHANNEL_EXIT; + if (!reply) { + SmartPtrCCafException exception = rpc->getException(); + if (exception) { + exception->throwAddRefedSelf(); + } else { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "AMQP reply was not returned and no exception (reason) was provided."); + } + } + return reply; +} + +/* + * Retrieve the outstanding RPC call. This method interacts with the execRpc() + * method indirectly through the _channelMutex and _channelSignal. + * The execRpc() call blocks until the current RPC call is handled by the thread + * running the taskHandler (which eventually calls handleCompleteInboundCommand()) + * which calls this. + * + * When handleCompleteInboundCommand() gets the outstanding RPC to handle the command, + * the _activeRpc member is cleared and _channelSignal is signaled thus freeing + * the execRpc() call to execute its RPC. + */ +SmartPtrIRpcContinuation AMQChannel::nextOutstandingRpc() { + CAF_CM_FUNCNAME_VALIDATE("nextOutstandingRpc"); + + CAF_CM_LOCK_UNLOCK1(_channelMutex); + CAF_CM_LOCK_UNLOCK; + + SmartPtrIRpcContinuation result = _activeRpc; + _activeRpc = NULL; + _channelSignal.signal(); + AMQCHANNEL_EXIT; + return result; +} + +/* + * Transmit an AMQP method to the server + */ +void AMQChannel::transmit(const SmartPtrIServerMethod& method) { + CAF_CM_FUNCNAME_VALIDATE("transmit"); + CAF_CM_LOCK_UNLOCK; + AMQCHANNEL_ENTRY; + CAF_CM_VALIDATE_SMARTPTR(method); + if (_debugLogFlags & DEBUGLOG_FLAG_AMQP) { + CAF_CM_LOG_DEBUG_VA2( + "[channel=%d] Sending AMQP method %s", + _channelNumber, + method->getMethodName().c_str()); + } + AMQUtil::checkAmqpStatus(method->send(_channelHandle)); + AMQCHANNEL_EXIT; +} + +/* + * This method is called when we have received a channel.close method + * from the server. Respond with a channel.close-ok method then + * abort the outstanding RPC (if any) with the exception (reason) for the abort. + */ +void AMQChannel::channelCloseByServerShutdown( + const AmqpMethods::Channel::SmartPtrClose& closeMethod) { + CAF_CM_FUNCNAME("channelCloseByServerShutdown"); + AMQCHANNEL_ENTRY; + try { + CAF_CM_LOCK_UNLOCK1(_channelMutex); + CAF_CM_LOCK_UNLOCK; + + _isOpen = false; + _dispatcher->quiesce(); + + // Send channel.close-ok + SmartPtrChannelCloseOkMethod method; + method.CreateInstance(); + method->init(); + transmit(method); + + // Create the reason for the shutdown. + AmqpExceptions::SmartPtrChannelClosedByServerException exception; + try { + exception.CreateInstance(); + + // We *should* have received a Channel::Close method BUT you can + // never be too careful... + if (closeMethod) { + exception->populateVA( + closeMethod->getReplyCode(), + _cm_className_, + _cm_funcName_, + "channel.close %s [channel=%d][code=0x%04X][class id=0x%04X][method id=0x%04X]", + closeMethod->getReplyText().c_str(), + _channelNumber, + closeMethod->getReplyCode(), + closeMethod->getClassId(), + closeMethod->getMethodId()); + } else { + exception->populate( + "channel.close - no other information available", + 0, + _cm_className_, + _cm_funcName_); + } + + // Abort the outstanding rpc if any + if (_activeRpc) { + SmartPtrIRpcContinuation rpc = _activeRpc; + _activeRpc = NULL; + rpc->handleAbort(exception); + } + + // Notify the dispatcher + _dispatcher->handleShutdown(exception); + } + CAF_CM_CATCH_ALL; + + // Tear down + AmqpChannel::AMQP_ChannelClose(_channelHandle); + _channelHandle = AMQP_HANDLE_INVALID; + + // Remove this channel from management + _connection->notifyChannelClosedByServer(_channelNumber); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + AMQCHANNEL_EXIT; +} + +void AMQChannel::callReturnListeners(const SmartPtrAMQCommand& command) { + CAF_CM_FUNCNAME("callReturnListeners"); + CAF_CM_LOCK_UNLOCK; + try { + AmqpMethods::Basic::SmartPtrReturn basicReturn; + basicReturn.QueryInterface(command->getMethod(), false); + if (basicReturn) { + CowReturnListenerCollection::SmartPtrContainer listeners = + _returnListeners.getAll(); + AmqpContentHeaders::SmartPtrBasicProperties properties; + properties.QueryInterface(command->getContentHeader(), false); + if (properties) { + for (TSmartIterator listener(*listeners); + listener; + listener++) { + listener->handleReturn( + basicReturn->getReplyCode(), + basicReturn->getReplyText(), + basicReturn->getExchange(), + basicReturn->getRoutingKey(), + properties, + command->getContentBody()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected content header to be a basic.properties object. Instead it is " + "a '%s' object. Please report this bug.", + command->getContentHeader()->getClassName().c_str()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Expected command to be a basic.return command. Instead it is a " + "'%s' command. Please report this bug.", + command->getMethod()->getProtocolMethodName().c_str()); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +#endif + +#if (1) // ChannelTask +AMQChannel::ChannelTask::ChannelTask() : + CAF_CM_INIT("AMQChannel::ChannelTask") { +} + +AMQChannel::ChannelTask::~ChannelTask() { +} + +void AMQChannel::ChannelTask::init(SmartPtrAMQChannel channel) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_channel); + CAF_CM_VALIDATE_PTR(channel); + _channel = channel; +} + +bool AMQChannel::ChannelTask::run() { + CAF_CM_FUNCNAME_VALIDATE("run"); + CAF_CM_PRECOND_ISINITIALIZED(_channel); + return _channel->taskHandler(); +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannelManager.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannelManager.cpp new file mode 100644 index 000000000..adf9e71eb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQChannelManager.cpp @@ -0,0 +1,146 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/AMQChannel.h" +#include "amqpClient/ConsumerWorkService.h" +#include "amqpClient/api/Channel.h" +#include "amqpClient/AMQChannelManager.h" +#include "Exception/CCafException.h" + +using namespace Caf::AmqpClient; + +AMQChannelManager::AMQChannelManager() : + _isInitialized(false), + CAF_CM_INIT_LOG("AMQChannelManager") { + CAF_CM_INIT_THREADSAFE; +} + +AMQChannelManager::~AMQChannelManager() { +} + +void AMQChannelManager::init(const SmartPtrConsumerWorkService& workService) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(workService); + _workService = workService; + _isInitialized = true; +} + +SmartPtrChannel AMQChannelManager::createChannel(const SmartPtrIConnectionInt& connection) { + CAF_CM_FUNCNAME("createChannel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(connection); + SmartPtrAMQChannel channel; + + channel.CreateInstance(); + + SmartPtrConsumerWorkService workService = _workService; + { + CAF_CM_UNLOCK_LOCK; + channel->init(connection, workService); + } + + const uint16 channelNumber = channel->getChannelNumber(); + if (_channelMap.insert(ChannelMap::value_type(channelNumber, channel)).second) { + + } else { + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "Channel number %d is already in use. This should never happen. " + "Please report this as a bug.", + channelNumber); + } + return channel; +} + +SmartPtrChannel AMQChannelManager::getChannel(const uint16 channelNumber) { + CAF_CM_FUNCNAME("getChannel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + SmartPtrChannel channel; + ChannelMap::const_iterator channelIter = _channelMap.find(channelNumber); + if (channelIter != _channelMap.end()) { + channel = (*channelIter).second; + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Channel #%d does not exist.", + channelNumber); + } + return channel; +} + +size_t AMQChannelManager::getOpenChannelCount() { + CAF_CM_FUNCNAME_VALIDATE("getOpenChannelCount"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _channelMap.size(); +} + +void AMQChannelManager::notifyConnectionClose(SmartPtrCCafException& shutdownException) { + CAF_CM_FUNCNAME("notifyConnectionClose"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + try { + _workService->notifyConnectionClosed(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + for (TSmartMapIterator channel(_channelMap); channel; channel++) { + try { + CAF_CM_UNLOCK_LOCK; + channel->notifyConnectionClosed(shutdownException); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + _channelMap.clear(); +} + +void AMQChannelManager::closeChannel(const uint16 channelNumber, SmartPtrCCafException& reason) { + CAF_CM_FUNCNAME("closeChannel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ChannelMap::iterator channel = _channelMap.find(channelNumber); + if (channel != _channelMap.end()) { + { + CAF_CM_UNLOCK_LOCK; + channel->second->close(reason); + } + _channelMap.erase(channel); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Channel #%d is not in the channel manager", + channelNumber); + } +} + +void AMQChannelManager::removeChannel(const uint16 channelNumber) { + CAF_CM_FUNCNAME("removeChannel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ChannelMap::iterator channel = _channelMap.find(channelNumber); + if (channel != _channelMap.end()) { + _channelMap.erase(channel); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Channel #%d is not in the channel manager", + channelNumber); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQCommand.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQCommand.cpp new file mode 100644 index 000000000..79c3358f3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQCommand.cpp @@ -0,0 +1,54 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/amqpImpl/IContentHeader.h" +#include "amqpClient/amqpImpl/IMethod.h" +#include "amqpClient/AMQCommand.h" + +using namespace Caf::AmqpClient; + +AMQCommand::AMQCommand() : + CAF_CM_INIT("AMQCommand") { +} + +AMQCommand::~AMQCommand() { +} + +void AMQCommand::init() { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_assembler); + _assembler.CreateInstance(); + _assembler->init(); +} + +bool AMQCommand::handleFrame(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME_VALIDATE("handleFrame"); + CAF_CM_PRECOND_ISINITIALIZED(_assembler); + return _assembler->handleFrame(frame); +} + +SmartPtrCDynamicByteArray AMQCommand::getContentBody() { + CAF_CM_FUNCNAME_VALIDATE("getContentBody"); + CAF_CM_PRECOND_ISINITIALIZED(_assembler); + return _assembler->getContentBody(); +} + +SmartPtrIContentHeader AMQCommand::getContentHeader() { + CAF_CM_FUNCNAME_VALIDATE("getContentHeader"); + CAF_CM_PRECOND_ISINITIALIZED(_assembler); + return _assembler->getContentHeader(); +} + +SmartPtrIMethod AMQCommand::getMethod() { + CAF_CM_FUNCNAME_VALIDATE("getMethod"); + CAF_CM_PRECOND_ISINITIALIZED(_assembler); + return _assembler->getMethod(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQConnection.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQConnection.cpp new file mode 100644 index 000000000..0be9d60cb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQConnection.cpp @@ -0,0 +1,492 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/AMQChannelManager.h" +#include "amqpClient/CAmqpConnection.h" +#include "amqpClient/ConnectionWeakReference.h" +#include "amqpClient/api/Address.h" +#include "amqpClient/api/CertInfo.h" +#include "amqpClient/api/Channel.h" +#include "amqpClient/AMQConnection.h" +#include "Exception/CCafException.h" +#include "AMQUtil.h" + +using namespace Caf::AmqpClient; + +AMQConnection::AMQConnection() : + _isInitialized(false), + _isRunning(false), + _shouldShutdown(false), + _wasCloseCalled(false), + _thread(NULL), + _connectionTimeout(0), + _requestedFrameMax(0), + _requestedChannelMax(0), + _requestedHeartbeat(0), + _retries(0), + _secondsToWait(0), + CAF_CM_INIT_LOG("AMQConnection") { + CAF_CM_FUNCNAME("AMQPConnection()"); + CAF_CM_INIT_THREADSAFE; + try { + CAF_THREADSIGNAL_INIT; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +AMQConnection::~AMQConnection() { + CAF_CM_FUNCNAME_VALIDATE("~AMQConnection()"); + if (_weakReferenceSelf) { + _weakReferenceSelf->clearReference(); + _weakReferenceSelf = NULL; + } + + if (_connectionHandle && !_wasCloseCalled) { + CAF_CM_LOG_CRIT_VA0( + "close() has not been called on this connection. " + "You *** MUST *** call close() on a connection before releasing it."); + } + + if (_connectionHandle) { + AmqpConnection::AMQP_ConnectionClose(_connectionHandle); + } +} + +void AMQConnection::init( + const std::string username, + const std::string password, + const SmartPtrAddress& address, + const SmartPtrCertInfo& certInfo, + const uint32 requestedFrameMax, + const uint32 requestedChannelMax, + const uint32 requestedHeartbeat, + const uint32 connectionTimeout, + const uint32 consumerThreadCount, + const uint16 retries, + const uint16 secondsToWait) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(username); + // password is optional (e.g. AMQP Tunnel) + CAF_CM_VALIDATE_SMARTPTR(address); + // other parameters do not require validation + + CAF_CM_LOG_DEBUG_VA1( + "Creating AuthPlain credential for user %s", + username.c_str()); + AMQPStatus status = AmqpAuthPlain::AMQP_AuthPlainCreateClient( + _authMechanism, + username, + password); + AMQUtil::checkAmqpStatus(status, "AmqpAuthPlain::AMQP_AuthPlainCreateClient"); + + _address = address; + _certInfo = certInfo; + _requestedFrameMax = requestedFrameMax; + _requestedChannelMax = requestedChannelMax; + _requestedHeartbeat = requestedHeartbeat; + _retries = retries; + _secondsToWait = secondsToWait; + + initConnection(); + _connectionTimeout = connectionTimeout; + _connectionSignal.initialize("connectionSignal"); + _weakReferenceSelf.CreateInstance(); + _weakReferenceSelf->setReference(this); + + _threadPool.CreateInstance(); + _threadPool->init(address->toString(), consumerThreadCount, 100); + + _workService.CreateInstance(); + _workService->init(_threadPool); + _isInitialized = true; +} + +void AMQConnection::start() { + CAF_CM_FUNCNAME("start"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(!_isRunning); + + bool rc = false; + GThread* thread = _thread; + uint32 connectionTimeout = _connectionTimeout; + { + CAF_CM_UNLOCK_LOCK; + CAF_THREADSIGNAL_LOCK_UNLOCK; + thread = CThreadUtils::startJoinable(threadFunc, this); + rc = _connectionSignal.waitOrTimeout(CAF_THREADSIGNAL_MUTEX, connectionTimeout); + } + _thread = thread; + + if (rc) { + try { + uint16 channelMax = 0; + AMQUtil::checkAmqpStatus( + AmqpConnection::AMQP_ConnectionGetMaxChannels(_connectionHandle, &channelMax), + "AmqpConnection::AMQP_ConnectionGetMaxChannels"); + uint32 frameMax = 0; + AMQUtil::checkAmqpStatus( + AmqpConnection::AMQP_ConnectionGetMaxFrameSize(_connectionHandle, &frameMax), + "AmqpConnection::AMQP_ConnectionGetMaxFrameSize"); + uint16 heartbeat = 0; + AMQUtil::checkAmqpStatus( + AmqpConnection::AMQP_ConnectionGetHeartbeatInterval(_connectionHandle, &heartbeat), + "AMQUtil::checkAmqpStatus"); + CAF_CM_LOG_DEBUG_VA3( + "Tuned connection [chMax=%d][frameMax=%d][hbeat=%d]", + channelMax, + frameMax, + heartbeat); + _channelManager.CreateInstance(); + _channelManager->init(_workService); + } + CAF_CM_CATCH_ALL + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; + } else { + CAF_CM_LOG_DEBUG_VA1("Need to shutdown due to start issue: %d", rc); + _shouldShutdown = true; + + SmartPtrCCafException threadException; + GThread* thread = _thread; + { + CAF_CM_UNLOCK_LOCK; + threadException = + static_cast(g_thread_join(thread)); + } + + _thread = NULL; + + if (threadException) { + threadException->throwAddRefedSelf(); + } else { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::AmqpTimeoutException, + 0, + "Timed out trying to connect to %s", + _address->toString().c_str()); + } + } +} + +SmartPtrChannel AMQConnection::createChannel() { + CAF_CM_FUNCNAME_VALIDATE("createChannel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + bool isRunning; + SmartPtrAMQChannelManager channelManager; + SmartPtrConnectionWeakReference weakReferenceSelf; + { + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + isRunning = _isRunning; + channelManager = _channelManager; + weakReferenceSelf = _weakReferenceSelf; + } + + return createChannel(isRunning, channelManager, weakReferenceSelf); +} + +void AMQConnection::closeChannel(const SmartPtrChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("closeChannel"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + bool isRunning; + SmartPtrAMQChannelManager channelManager; + { + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + isRunning = _isRunning; + channelManager = _channelManager; + } + + closeChannel(isRunning, channelManager, channel); +} + +void AMQConnection::close() { + CAF_CM_FUNCNAME_VALIDATE("close"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _wasCloseCalled = true; + if (_isRunning) { + CAF_CM_LOG_DEBUG_VA0("Need to shutdown becaue the connection is closing"); + _shouldShutdown = true; + _weakReferenceSelf->clearReference(); + _weakReferenceSelf = NULL; + + _workService->notifyConnectionClosed(); + + if (NULL != _thread) { + GThread* thread = _thread; + { + CAF_CM_UNLOCK_LOCK; + g_thread_join(thread); + } + + _thread = NULL; + } + + { + CAF_CM_UNLOCK_LOCK; + while (_channelManager->getOpenChannelCount()) { + CThreadUtils::sleep(100); + } + } + } +} + +bool AMQConnection::isOpen() { + CAF_CM_FUNCNAME_VALIDATE("isOpen"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return (_isRunning && !_shouldShutdown); +} + +AMQPStatus AMQConnection::amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("amqpConnectionOpenChannel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_LOG_DEBUG_VA0("calling AmqpConnection::AMQP_ConnectionOpenChannel"); + AMQPStatus status = AmqpConnection::AMQP_ConnectionOpenChannel(_connectionHandle, channel); + if (status == AMQP_ERROR_OK) { + uint16 id = 0; + AmqpChannel::AMQP_ChannelGetId(channel, &id); + CAF_CM_LOG_DEBUG_VA1("created channel #%d", id); + } else { + CAF_CM_LOG_DEBUG_VA1("failed to create channel. status=%d", status); + } + return status; +} + +void AMQConnection::notifyChannelClosedByServer(const uint16 channelNumber) { + CAF_CM_LOCK_UNLOCK; + _channelManager->removeChannel(channelNumber); +} + +void AMQConnection::channelCloseChannel(Channel *channel) { + CAF_CM_FUNCNAME_VALIDATE("channelCloseChannel"); + CAF_CM_VALIDATE_PTR(channel); + closeChannel(channel); +} + +void AMQConnection::initConnection() { + CAF_CM_FUNCNAME_VALIDATE("initConnection"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_LOG_DEBUG_VA3( + "Creating connection " + "[reqChMax=%d][reqFrameMax=%d][reqHB=%d]", + _requestedChannelMax, + _requestedFrameMax, + _requestedHeartbeat); + AMQPStatus status = AmqpConnection::AMQP_ConnectionCreate( + _connectionHandle, + _address, + _authMechanism, + _certInfo, + _requestedChannelMax, + _requestedFrameMax, + _requestedHeartbeat, + _retries, + _secondsToWait); + AMQUtil::checkAmqpStatus(status, "AmqpConnection::AMQP_ConnectionCreate"); +} + +void AMQConnection::closeChannel( + const bool isRunning, + const SmartPtrAMQChannelManager channelManager, + const SmartPtrChannel& channel) { + CAF_CM_STATIC_FUNC("AMQConnection", "closeChannel"); + CAF_CM_VALIDATE_SMARTPTR(channelManager); + CAF_CM_VALIDATE_SMARTPTR(channel); + + if (isRunning) { + if (channel->isOpen()) { + const uint16 channelNumber = channel->getChannelNumber(); + SmartPtrCCafException reason; + try { + AmqpExceptions::SmartPtrChannelClosedByUserException exception; + exception.CreateInstance(); + reason = exception.GetNonAddRefedInterface(); + reason->populate( + "Closed by user", + 0, + _cm_className_, + _cm_funcName_); + + channelManager->closeChannel(channelNumber, reason); + } + CAF_CM_CATCH_ALL; + } + } else { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "The connection is closed"); + } +} + +SmartPtrChannel AMQConnection::createChannel( + const bool isRunning, + const SmartPtrAMQChannelManager& channelManager, + const SmartPtrConnectionWeakReference& weakReferenceSelf) { + CAF_CM_STATIC_FUNC("AMQConnection", "createChannel"); + + if (!isRunning) { + CAF_CM_EXCEPTIONEX_VA0( + AmqpExceptions::ConnectionClosedException, + 0, + "The connection is closed"); + } + + return channelManager->createChannel(weakReferenceSelf); +} + +void* AMQConnection::threadFunc(void* context) { + CAF_CM_STATIC_FUNC("AMQConnection", "threadFunc"); + try { + CAF_CM_VALIDATE_PTR(context); + SmartPtrAMQConnection self = (AMQConnection*)context; + self->threadWorker(); + } + CAF_CM_CATCH_ALL; + + return CAF_CM_GETEXCEPTION; +} + +void AMQConnection::threadWorker() { + CAF_CM_FUNCNAME("threadWorker"); + CAF_CM_LOCK_UNLOCK; + + try { + CAF_CM_LOG_DEBUG_VA1( + "Connecting to %s", + _address->toString().c_str()); + + AMQPStatus status = AMQP_ERROR_OK; + SmartPtrCAmqpConnection connectionHandle = _connectionHandle; + { + CAF_CM_UNLOCK_LOCK; + status = AmqpConnection::AMQP_ConnectionConnect( + connectionHandle, + AMQP_CONNECTION_FLAG_CLOSE_SOCKET); + } + AMQUtil::checkAmqpStatus(status, "AmqpConnection::AMQP_ConnectionConnect"); + + AMQPConnectionState state; + status = AmqpConnection::AMQP_ConnectionGetState( + _connectionHandle, + &state); + AMQUtil::checkAmqpStatus(status, "AmqpConnection::AMQP_ConnectionGetState"); + + while (!_shouldShutdown && (AMQP_STATE_CONNECTED != state)) { + status = AmqpConnection::AMQP_ConnectionProcessIO(_connectionHandle); + switch (status) { + case AMQP_ERROR_OK: + break; + + case AMQP_ERROR_IO_ERROR: + { + const char *err = NULL; + AmqpConnection::AMQP_ConnectionGetLastError(_connectionHandle, &err); + CAF_CM_LOG_WARN_VA2( + "Connection to [%s] failed: %s", + _address->toString().c_str(), + err); + _connectionHandle = AMQP_HANDLE_INVALID; + CThreadUtils::sleep(250); + initConnection(); + AMQPStatus status = AmqpConnection::AMQP_ConnectionConnect( + _connectionHandle, + AMQP_CONNECTION_FLAG_CLOSE_SOCKET); + AMQUtil::checkAmqpStatus(status, "AmqpConnection::AMQP_ConnectionConnect"); + } + break; + + default: + { + const char *err = NULL; + AmqpConnection::AMQP_ConnectionGetLastError(_connectionHandle, &err); + AMQUtil::checkAmqpStatus(status, err); + } + break; + } + + status = AmqpConnection::AMQP_ConnectionGetState( + _connectionHandle, + &state); + AMQUtil::checkAmqpStatus( + status, + "AmqpConnection::AMQP_ConnectionGetState"); + } + + if (!_shouldShutdown && (AMQP_STATE_CONNECTED == state)) { + { + CAF_THREADSIGNAL_LOCK_UNLOCK; + _isRunning = true; + _connectionSignal.signal(); + } + + while (!_shouldShutdown && AMQP_STATE_CONNECTED == state) { + SmartPtrCAmqpConnection connectionHandle = _connectionHandle; + { + CAF_CM_UNLOCK_LOCK; + status = AmqpConnection::AMQP_ConnectionWaitForIO(connectionHandle, 200); + status = AmqpConnection::AMQP_ConnectionProcessIO(connectionHandle); + status = AmqpConnection::AMQP_ConnectionGetState(connectionHandle, &state); + } + } + + _isRunning = false; + CAF_CM_LOG_DEBUG_VA2( + "IO loop has stopped. " + "[_shouldShutdown=%d][state=%d]", + _shouldShutdown, + state); + + SmartPtrCCafException shutdownException; + try { + if (_shouldShutdown) { + AmqpExceptions::SmartPtrChannelClosedByShutdownException exception; + exception.CreateInstance(); + shutdownException = exception.GetNonAddRefedInterface(); + shutdownException->populate( + "Normal application shutdown", + 0, + _cm_className_, + _cm_funcName_); + } else { + const char* error = NULL; + AmqpConnection::AMQP_ConnectionGetLastError(_connectionHandle, &error); + AmqpExceptions::SmartPtrConnectionClosedByIOException exception; + exception.CreateInstance(); + shutdownException = exception.GetNonAddRefedInterface(); + shutdownException->populate( + error, + 0, + _cm_className_, + _cm_funcName_); + } + { + CAF_CM_UNLOCK_LOCK; + _channelManager->notifyConnectionClose(shutdownException); + } + AmqpConnection::AMQP_ConnectionClose(_connectionHandle); + _connectionHandle = AMQP_HANDLE_INVALID; + } + CAF_CM_CATCH_ALL; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.cpp new file mode 100644 index 000000000..417699cef --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.cpp @@ -0,0 +1,304 @@ +/* + * Created on: May 3, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/amqpImpl/FieldImpl.h" +#include "amqpClient/api/amqpClient.h" +#include "Exception/CCafException.h" +#include "AMQUtil.h" + +using namespace Caf::AmqpClient; +using namespace Caf::AmqpClient::AmqpExceptions; + +void AMQUtil::checkAmqpStatus( + const AMQPStatus status, + const char* message) { + CAF_CM_STATIC_FUNC("AMQUtil", "checkAmqpStatus"); + + const char* exMsg = message ? message : ""; + + switch (status) { + case AMQP_ERROR_OK: + break; + case AMQP_ERROR_TIMEOUT: + CAF_CM_EXCEPTIONEX_VA0(AmqpTimeoutException, 0, exMsg); + break; + case AMQP_ERROR_NO_MEMORY: + CAF_CM_EXCEPTIONEX_VA0(AmqpNoMemoryException, 0, exMsg); + break; + case AMQP_ERROR_INVALID_HANDLE: + CAF_CM_EXCEPTIONEX_VA0(AmqpInvalidHandleException, 0, exMsg); + break; + case AMQP_ERROR_INVALID_ARGUMENT: + CAF_CM_EXCEPTIONEX_VA0(AmqpInvalidArgumentException, 0, exMsg); + break; + case AMQP_ERROR_WRONG_STATE: + CAF_CM_EXCEPTIONEX_VA0(AmqpWrongStateException, 0, exMsg); + break; + case AMQP_ERROR_TOO_MANY_CHANNELS: + CAF_CM_EXCEPTIONEX_VA0(AmqpTooManyChannelsException, 0, exMsg); + break; + case AMQP_ERROR_QUEUE_FULL: + CAF_CM_EXCEPTIONEX_VA0(AmqpQueueFullException, 0, exMsg); + break; + case AMQP_ERROR_FRAME_TOO_LARGE: + CAF_CM_EXCEPTIONEX_VA0(AmqpFrameTooLargeException, 0, exMsg); + break; + case AMQP_ERROR_IO_ERROR: + CAF_CM_EXCEPTIONEX_VA0(AmqpIoErrorException, 0, exMsg); + break; + case AMQP_ERROR_PROTOCOL_ERROR: + CAF_CM_EXCEPTIONEX_VA0(AmqpProtocolErrorException, 0, exMsg); + break; + case AMQP_ERROR_UNIMPLEMENTED: + CAF_CM_EXCEPTIONEX_VA0(AmqpUnimplementedException, 0, exMsg); + break; + case AMQP_ERROR_IO_INTERRUPTED: + CAF_CM_EXCEPTIONEX_VA0(AmqpIoInterruptedException, 0, exMsg); + break; + default: + CAF_CM_EXCEPTIONEX_VA0(AmqpException, status, exMsg); + break; + } +} + +std::string AMQUtil::amqpBytesToString(const amqp_bytes_t * const amqpBytes) { + CAF_CM_STATIC_FUNC_VALIDATE("AMQUtil", "amqpBytesToString"); + CAF_CM_VALIDATE_PTR(amqpBytes); + + CDynamicCharArray buf; + buf.allocateBytes(amqpBytes->len); + buf.memCpy(amqpBytes->bytes, amqpBytes->len); + return buf.getPtr(); +} + +SmartPtrTable AMQUtil::amqpApiTableToTableObj(const amqp_table_t * const amqpTable) { + CAF_CM_STATIC_FUNC_LOG("AMQUtil", "amqpApiTableToTableObj"); + CAF_CM_VALIDATE_PTR(amqpTable); + SmartPtrTable table; + table.CreateInstance(); + for (int32 idx = 0; idx < amqpTable->num_entries; ++idx) { + amqp_table_entry_t *entry = &amqpTable->entries[idx]; + CAF_CM_VALIDATE_PTR(entry); + std::string key = amqpBytesToString(&entry->key); + SmartPtrFieldImpl field; + field.CreateInstance(); + switch (entry->value.kind) { + case AMQP_FIELD_KIND_BOOLEAN: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_BOOLEAN, + g_variant_new_boolean(entry->value.value.boolean)); + break; + case AMQP_FIELD_KIND_I8: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_I8, + g_variant_new_byte(entry->value.value.i8)); + break; + case AMQP_FIELD_KIND_U8: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_U8, + g_variant_new_byte(entry->value.value.i8)); + break; + case AMQP_FIELD_KIND_I16: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_I16, + g_variant_new_int16(entry->value.value.i16)); + break; + case AMQP_FIELD_KIND_U16: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_U16, + g_variant_new_uint16(entry->value.value.u16)); + break; + case AMQP_FIELD_KIND_I32: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_I32, + g_variant_new_int32(entry->value.value.i32)); + break; + case AMQP_FIELD_KIND_U32: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_U32, + g_variant_new_uint32(entry->value.value.u32)); + break; + case AMQP_FIELD_KIND_I64: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_I64, + g_variant_new_int64(entry->value.value.i64)); + break; + case AMQP_FIELD_KIND_U64: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_U64, + g_variant_new_uint64(entry->value.value.u64)); + break; + case AMQP_FIELD_KIND_F32: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_F32, + g_variant_new_double(entry->value.value.f32)); + break; + case AMQP_FIELD_KIND_F64: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_F32, + g_variant_new_double(entry->value.value.f64)); + break; + case AMQP_FIELD_KIND_UTF8: + { + const std::string value = amqpBytesToString(&entry->value.value.bytes); + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_UTF8, + g_variant_new_string(value.c_str())); + } + break; + case AMQP_FIELD_KIND_TIMESTAMP: + field->setTypeAndValue( + Field::AMQP_FIELD_TYPE_TIMESTAMP, + g_variant_new_uint64(entry->value.value.u64)); + break; + + // Type not currently supported + case AMQP_FIELD_KIND_ARRAY: + case AMQP_FIELD_KIND_BYTES: + case AMQP_FIELD_KIND_DECIMAL: + case AMQP_FIELD_KIND_TABLE: + case AMQP_FIELD_KIND_VOID: + field = NULL; + CAF_CM_LOG_ERROR_VA2( + "AMQP field %s type %d is not supported", + key.c_str(), + entry->value.kind); + break; + default: + field = NULL; + CAF_CM_LOG_ERROR_VA2( + "AMQP field %s type %d is unknown", + key.c_str(), + entry->value.kind); + break; + } + + if (field) { + if (!table->insert(std::make_pair(key, field)).second) { + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "Duplicate field '%s' detected", + key.c_str()); + } + } + } + return table; +} + +void AMQUtil::amqpTableObjToApiTable(const SmartPtrTable& table, amqp_table_t& apiTable) { + CAF_CM_STATIC_FUNC_LOG("AMQUtil", "amqpTableObjToApiTable"); + CAF_CM_VALIDATE_SMARTPTR(table); + + memset(&apiTable, 0, sizeof(apiTable)); + apiTable.num_entries = static_cast(table->size()); + apiTable.entries = + reinterpret_cast(AmqpCommon::AMQP_Calloc( + apiTable.num_entries, + sizeof(*apiTable.entries))); + CAF_CM_VALIDATE_PTR(apiTable.entries); + try { + int32 idx = 0; + for (TSmartConstMapIterator tableEntry(*table); + tableEntry; + tableEntry++, idx++) { + amqp_table_entry_t *apiEntry = &apiTable.entries[idx]; + apiEntry->key = amqp_cstring_bytes(tableEntry.getKey().c_str()); + const SmartPtrField& field = *tableEntry; + GVariant *variant = field->getValue(); + + switch (field->getAmqpType()) { + case Field::AMQP_FIELD_TYPE_NOTSET: + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + 0, + "Table entry '%s' has a value type of AMQP_FIELD_TYPE_NOTSET", + tableEntry.getKey().c_str()); + break; + case Field::AMQP_FIELD_TYPE_BOOLEAN: + apiEntry->value.kind = AMQP_FIELD_KIND_BOOLEAN; + apiEntry->value.value.boolean = g_variant_get_boolean(variant); + break; + case Field::AMQP_FIELD_TYPE_I8: + apiEntry->value.kind = AMQP_FIELD_KIND_I8; + apiEntry->value.value.i8 = g_variant_get_byte(variant); + break; + case Field::AMQP_FIELD_TYPE_U8: + apiEntry->value.kind = AMQP_FIELD_KIND_U8; + apiEntry->value.value.u8 = g_variant_get_byte(variant); + break; + case Field::AMQP_FIELD_TYPE_I16: + apiEntry->value.kind = AMQP_FIELD_KIND_I16; + apiEntry->value.value.i16 = g_variant_get_int16(variant); + break; + case Field::AMQP_FIELD_TYPE_U16: + apiEntry->value.kind = AMQP_FIELD_KIND_U16; + apiEntry->value.value.u16 = g_variant_get_uint16(variant); + break; + case Field::AMQP_FIELD_TYPE_I32: + apiEntry->value.kind = AMQP_FIELD_KIND_I32; + apiEntry->value.value.i32 = g_variant_get_int32(variant); + break; + case Field::AMQP_FIELD_TYPE_U32: + apiEntry->value.kind = AMQP_FIELD_KIND_U32; + apiEntry->value.value.u32 = g_variant_get_uint32(variant); + break; + case Field::AMQP_FIELD_TYPE_I64: + apiEntry->value.kind = AMQP_FIELD_KIND_I64; + apiEntry->value.value.i64 = g_variant_get_int64(variant); + break; + case Field::AMQP_FIELD_TYPE_U64: + apiEntry->value.kind = AMQP_FIELD_KIND_U64; + apiEntry->value.value.u64 = g_variant_get_uint64(variant); + break; + case Field::AMQP_FIELD_TYPE_F32: + apiEntry->value.kind = AMQP_FIELD_KIND_F32; + apiEntry->value.value.f32 = static_cast(g_variant_get_double(variant)); + break; + case Field::AMQP_FIELD_TYPE_F64: + apiEntry->value.kind = AMQP_FIELD_KIND_F64; + apiEntry->value.value.f64 = g_variant_get_double(variant); + break; + case Field::AMQP_FIELD_TYPE_UTF8: + apiEntry->value.kind = AMQP_FIELD_KIND_UTF8; + apiEntry->value.value.bytes = + amqp_cstring_bytes(g_variant_get_string(variant, NULL)); + break; + case Field::AMQP_FIELD_TYPE_TIMESTAMP: + apiEntry->value.kind = AMQP_FIELD_KIND_TIMESTAMP; + apiEntry->value.value.u64 = g_variant_get_uint64(variant); + break; + case Field::AMQP_FIELD_TYPE_ARRAY: + case Field::AMQP_FIELD_TYPE_BYTES: + case Field::AMQP_FIELD_TYPE_DECIMAL: + case Field::AMQP_FIELD_TYPE_TABLE: + case Field::AMQP_FIELD_TYPE_VOID: + default: + CAF_CM_LOG_ERROR_VA2( + "AMQP field %s type %d is not supported", + tableEntry.getKey().c_str(), + field->getAmqpType()); + break; + } + } + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + amqpFreeApiTable(&apiTable); + memset(&apiTable, 0, sizeof(apiTable)); + } + CAF_CM_THROWEXCEPTION; +} + +void AMQUtil::amqpFreeApiTable(amqp_table_t *table) { + if (table) { + AmqpCommon::AMQP_Free(table->entries); + memset(table, 0, sizeof(*table)); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.h new file mode 100644 index 000000000..d211bb70e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AMQUtil.h @@ -0,0 +1,63 @@ +/* + * Created on: May 3, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQUTIL_H_ +#define AMQUTIL_H_ + + +#include "amqpClient/api/amqpClient.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief A collection of helpers for dealing with AMQP and the underlying amqp library. + */ +namespace AMQUtil { + /** + * @brief Check an AMQPStatus and throw an exception if the status is not AMQP_ERROR_OK + * @param status AMQPStatus returned from amqp library calls + * @param message Optional message text to add to thrown exception + */ + void checkAmqpStatus( + const AMQPStatus status, + const char* message = NULL); + + /** + * @brief Convert an amqp_bytes_t array to a std::string + * @param amqpBytes Raw string bytes + * @return conversion to string + */ + std::string amqpBytesToString(const amqp_bytes_t * const amqpBytes); + + /** + * @brief Convert an amqp_table_t to a smart Table object + * @param amqpTable Raw table bytes + * @return convertion to a smart Table object + */ + SmartPtrTable amqpApiTableToTableObj(const amqp_table_t * const amqpTable); + + /** + * @brief Convert a smart Table object to an amqp_table_t struct + * The caller is responsible for cleaning up the table by calling amqpFreeApiTable() + * @param table smart Table object source + * @param apiTable amqp_table_t output struct + */ + void amqpTableObjToApiTable(const SmartPtrTable& table, amqp_table_t& apiTable); + + /** + * @brief Clean up the memory used by a amqp_table_t + * @param table table to free + */ + void amqpFreeApiTable(amqp_table_t *table); +} + +}} + +#endif /* AMQUTIL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/Address.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/Address.cpp new file mode 100644 index 000000000..6875a207f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/Address.cpp @@ -0,0 +1,128 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "amqpClient/api/Address.h" +#include "Exception/CCafException.h" + +using namespace Caf::AmqpClient; + +Address::Address() : + _isInitialized(false), + _protocol(PROTOCOL_AMQP), + _port(UINT_MAX), + CAF_CM_INIT_LOG("Address") {} + +Address::~Address() {} + +void Address::initialize( + const std::string& protocol, + const std::string& host, + const uint32& port, + const std::string& virtualHost) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(protocol); + CAF_CM_VALIDATE_STRING(host); + + _protocol = translateProtocol(protocol, host); + + _protocolStr = protocol; + _host = host; + _port = port; + _virtualHost = virtualHost; + + std::stringstream builder; + builder << _protocolStr << ":" + << "host=" << _host << "," + << "port=" << _port << "," + << "virtualhost=" << _virtualHost; + _toString = builder.str(); + + _isInitialized = true; +} + +/** + * @return the protocol + */ +Protocol Address::getProtocol() const { + CAF_CM_FUNCNAME_VALIDATE("getProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _protocol; +} + +/** + * @return the protocol + */ +std::string Address::getProtocolStr() const { + CAF_CM_FUNCNAME_VALIDATE("getProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _protocolStr; +} + +/** + * @return the host name + */ +std::string Address::getHost() const { + CAF_CM_FUNCNAME_VALIDATE("getHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _host; +} + +/** + * @return the port number + */ +uint32 Address::getPort() const { + CAF_CM_FUNCNAME_VALIDATE("getPort"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _port; +} + +std::string Address::getVirtualHost() const { + CAF_CM_FUNCNAME_VALIDATE("getVirtualHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _virtualHost; +} + +std::string Address::toString() const { + CAF_CM_FUNCNAME_VALIDATE("toString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _toString; +} + +Protocol Address::translateProtocol( + const std::string& protocol, + const std::string& host) const { + CAF_CM_FUNCNAME("translateProtocol"); + CAF_CM_VALIDATE_STRING(protocol); + CAF_CM_VALIDATE_STRING(host); + + Protocol rc = PROTOCOL_AMQP; + if (protocol.compare("amqp") == 0) { + rc = PROTOCOL_AMQP; + CAF_CM_LOG_DEBUG_VA1( + "Parsed amqp protocol - host: %s", host.c_str()); + } else if (protocol.compare("amqps") == 0) { + rc = PROTOCOL_AMQPS; + CAF_CM_EXCEPTION_VA0(E_FAIL, + "amqps protocol not yet supported"); + } else if (protocol.compare("tunnel") == 0) { + if ((host.compare("localhost") == 0) || (host.compare("127.0.0.1") == 0)) { + rc = PROTOCOL_TUNNEL; + CAF_CM_LOG_DEBUG_VA1( + "Parsed tunnel protocol - host: %s", host.c_str()); + } else { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Tunnel protocol only supports localhost - %s", host.c_str()); + } + } else { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Unknown protocol - %s", protocol.c_str()); + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.cpp new file mode 100644 index 000000000..e2341a198 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.cpp @@ -0,0 +1,26 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpAuthMechanism.h" +#include "AmqpAuthPlain.h" +#include "AmqpUtil.h" + +using namespace Caf::AmqpClient; + +AMQPStatus AmqpAuthPlain::AMQP_AuthPlainCreateClient( + SmartPtrCAmqpAuthMechanism& mech, + const std::string& username, + const std::string& password) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpAuthPlain", "AMQP_AuthPlainCreateClient"); + CAF_CM_VALIDATE_STRING(username); + // password is optional + + mech.CreateInstance(); + return mech->createClient(username, password); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.h new file mode 100644 index 000000000..186454506 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpAuthPlain.h @@ -0,0 +1,31 @@ +/* + * Created on: Oct 7, 2014 + * Author: bwilliams + * + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCORE_AMQPAUTHPLAIN_H_ +#define AMQPCORE_AMQPAUTHPLAIN_H_ + + +#include "amqpClient/CAmqpAuthMechanism.h" + +namespace Caf { namespace AmqpClient { + +#define SHA256_HASH_LEN 32 + +class AmqpAuthPlain { +public: + static AMQPStatus AMQP_AuthPlainCreateClient( + SmartPtrCAmqpAuthMechanism& pMech, + const std::string& username, + const std::string& password); + +private: + CAF_CM_DECLARE_NOCREATE (AmqpAuthPlain); +}; + +}} + +#endif /* AMQPCORE_AMQPAUTHPLAIN_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.cpp new file mode 100644 index 000000000..c58bd0def --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.cpp @@ -0,0 +1,51 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/CAmqpFrame.h" +#include "AmqpChannel.h" +#include "AmqpUtil.h" + +using namespace Caf::AmqpClient; + +AMQPStatus AmqpChannel::AMQP_ChannelClose( + const SmartPtrCAmqpChannel& channel) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpChannel", "AMQP_ChannelClose"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->close(); +} + +AMQPStatus AmqpChannel::AMQP_ChannelCloseOk( + const SmartPtrCAmqpChannel& channel) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpChannel", "AMQP_ChannelCloseOk"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->closeOk(); +} + +AMQPStatus AmqpChannel::AMQP_ChannelReceive( + const SmartPtrCAmqpChannel& channel, + SmartPtrCAmqpFrame& frame, + const int32 timeout) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpChannel", "AMQP_ChannelReceive"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->receive(frame, timeout); +} + +AMQPStatus AmqpChannel::AMQP_ChannelGetId( + const SmartPtrCAmqpChannel& channel, + uint16 *id) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpChannel", "AMQP_ChannelGetId"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(id); + + return channel->getId(id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.h new file mode 100644 index 000000000..f38b15977 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpChannel.h @@ -0,0 +1,47 @@ +/* + * Created on: Oct 7, 2014 + * Author: bwilliams + * + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCORE_AMQPCHANNEL_H_ +#define AMQPCORE_AMQPCHANNEL_H_ + +#include "AmqpCommon.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/CAmqpFrame.h" + +namespace Caf { namespace AmqpClient { + +/** AMQP channel state. */ +typedef enum AMQPChannelState { + AMQP_CHANNEL_OPEN = 0, AMQP_CHANNEL_WAITING_FOR_CLOSE_OK, AMQP_CHANNEL_CLOSED +} AMQPChannelState; + +class AmqpChannel { +public: + static AMQPStatus AMQP_ChannelClose( + const SmartPtrCAmqpChannel& chan); + + static AMQPStatus AMQP_ChannelCloseOk( + const SmartPtrCAmqpChannel& chan); + + static AMQPStatus AMQP_ChannelReceive( + const SmartPtrCAmqpChannel& chan, + SmartPtrCAmqpFrame& frame, + const int32 timeout); + + static AMQPStatus AMQP_ChannelGetId( + const SmartPtrCAmqpChannel& chan, + uint16 *id); + +private: + CAF_CM_DECLARE_NOCREATE (AmqpChannel); +}; + +} +} + +#endif /* AMQPCORE_CHANNEL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.cpp new file mode 100644 index 000000000..ffeb98b2a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.cpp @@ -0,0 +1,275 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "AmqpCommon.h" + +using namespace Caf::AmqpClient; + +void* AmqpCommon::AMQP_Calloc( + size_t nmemb, + size_t size) { + return calloc(nmemb, size); +} + +void AmqpCommon::AMQP_Free( + void *ptr) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpCommon", "AMQP_Free"); + CAF_CM_VALIDATE_PTR(ptr); + free(ptr); +} + +int32 AmqpCommon::sendMethod( + const amqp_connection_state_t& connectionState, + const amqp_channel_t& channel, + const amqp_method_number_t& methodId, + void *decodedMethod) { + return validateStatus( + "amqp_send_method - " + CStringConv::toString(methodId), + amqp_send_method( + connectionState, + channel, + methodId, + decodedMethod)); +} + +int32 AmqpCommon::validateStatusRequired( + const std::string& msg, + const int32 status) { + CAF_CM_STATIC_FUNC_LOG("AmqpCommon", "validateStatus"); + CAF_CM_VALIDATE_STRING(msg); + + if (status < 0) { + CAF_CM_EXCEPTION_VA2(E_FAIL, "%s: %s", + msg.c_str(), amqp_error_string2(status)); + } + + return status; +} + +int32 AmqpCommon::validateStatus( + const std::string& msg, + const int32 status) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AmqpCommon", "validateStatus"); + CAF_CM_VALIDATE_STRING(msg); + + if (status < 0) { + CAF_CM_LOG_WARN_VA2("%s: %s", + msg.c_str(), amqp_error_string2(status)); + } + + return status; +} + +int32 AmqpCommon::validateRpcReply( + const std::string& msg, + const amqp_rpc_reply_t& rpcReply) { + CAF_CM_STATIC_FUNC_LOG("AmqpCommon", "validateRpcReply"); + CAF_CM_VALIDATE_STRING(msg); + + int32 status = 0; + switch (rpcReply.reply_type) { + case AMQP_RESPONSE_NORMAL: + break; + + case AMQP_RESPONSE_NONE: + CAF_CM_EXCEPTION_VA1(E_FAIL, "%s: missing RPC reply type!", msg.c_str()); + break; + + case AMQP_RESPONSE_LIBRARY_EXCEPTION: + status = rpcReply.library_error; + CAF_CM_LOG_WARN_VA2("%s: %s", msg.c_str(), + amqp_error_string2(rpcReply.library_error)); + break; + + case AMQP_RESPONSE_SERVER_EXCEPTION: + switch (rpcReply.reply.id) { + case AMQP_CONNECTION_CLOSE_METHOD: { + amqp_connection_close_t *reply = + reinterpret_cast(rpcReply.reply.decoded); + + CAF_CM_EXCEPTION_VA4(E_FAIL, + "%s: server connection error %d, message: %.*s", msg.c_str(), + reply->reply_code, reply->reply_text.len, + static_cast(reply->reply_text.bytes)); + + break; + } + case AMQP_CHANNEL_CLOSE_METHOD: { + amqp_connection_close_t *reply = + reinterpret_cast(rpcReply.reply.decoded); + + CAF_CM_EXCEPTION_VA4(E_FAIL, + "%s: server channel error %d, message: %.*s", msg.c_str(), + reply->reply_code, reply->reply_text.len, + static_cast(reply->reply_text.bytes)); + break; + } + default: + CAF_CM_EXCEPTION_VA2(E_FAIL, + "%s: unknown server error, method id 0x%08X", msg.c_str(), + rpcReply.reply.id); + break; + } + break; + } + + return status; +} + +void AmqpCommon::strToAmqpBytes( + const std::string& src, + amqp_bytes_t& dest, + Csetstr& cachedStrings) { + if (src.empty()) { + dest.len = 0; + dest.bytes = NULL; + } else { + dest = amqp_cstring_bytes(getString(src, cachedStrings).c_str()); + } +} + +const std::string& AmqpCommon::getString( + const std::string& src, + Csetstr& cachedStrings) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AmqpCommon", "getString"); + CAF_CM_VALIDATE_STRING(src); + + if (cachedStrings.end() == cachedStrings.find(src)) { + cachedStrings.insert(src); + } + + return *(cachedStrings.find(src)); +} + +void AmqpCommon::boolToAmqpBool( + const bool src, + amqp_boolean_t& dest) { + dest = src ? TRUE : FALSE; +} + +void AmqpCommon::cpTableSafely( + const amqp_table_t* src, + amqp_table_t& dest) { + dest = (NULL == src ? amqp_empty_table : *src); +} + +void AmqpCommon::dumpMessageBody( + const void *buffer, + const size_t bufferLen) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AmqpCommon", "dumpMessageBody"); + CAF_CM_VALIDATE_PTR(buffer); + + unsigned char *buf = (unsigned char *) buffer; + int32 count = 0; + int32 numinrow = 0; + int32 chs[16]; + int32 oldchs[16] = {0}; + int32 showed_dots = 0; + size_t i; + + for (i = 0; i < bufferLen; i++) { + int32 ch = buf[i]; + + if (numinrow == 16) { + int32 i; + + if (rowsEqual(oldchs, chs)) { + if (!showed_dots) { + showed_dots = 1; + CAF_CM_LOG_DEBUG_VA0( + " .. .. .. .. .. .. .. .. : .. .. .. .. .. .. .. .."); + } + } else { + showed_dots = 0; + dumpRow(count, numinrow, chs); + } + + for (i=0; i<16; i++) { + oldchs[i] = chs[i]; + } + + numinrow = 0; + } + + count++; + chs[numinrow++] = ch; + } + + dumpRow(count, numinrow, chs); + + if (numinrow != 0) { + printf("%08dX:\n", count); + } +} + +bool AmqpCommon::rowsEqual( + int32 *row1, + int32 *row2) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AmqpCommon", "rowsEqual"); + CAF_CM_VALIDATE_PTR(row1); + CAF_CM_VALIDATE_PTR(row2); + + int32 i = 0; + for (; (i < 16) && (row1[i] == row2[i]); i++) {} + return (i == 15); +} + +void AmqpCommon::dumpRow( + const int32 count, + const int32 numinrow, + const int32 *chs) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AmqpCommon", "dumpRow"); + CAF_CM_VALIDATE_PTR(chs); + + static const int32 BUFF_SIZE = 100; + char buff[BUFF_SIZE]; + std::string msg; + +#ifdef WIN32 + sprintf_s(buff, BUFF_SIZE, "%08lX:", count - numinrow); +#else + snprintf(buff, BUFF_SIZE, "%08dX:", count - numinrow); +#endif + msg += buff; + + if (numinrow > 0) { + for (int32 i = 0; i < numinrow; i++) { + if (i == 8) { + msg += " :"; + } +#ifdef WIN32 + sprintf_s(buff, BUFF_SIZE, " %02X", chs[i]); +#else + snprintf(buff, BUFF_SIZE, " %02X", chs[i]); +#endif + msg += buff; + } + for (int32 i = numinrow; i < 16; i++) { + if (i == 8) { + msg += " :"; + } + msg += " "; + } + msg += " "; + for (int32 i = 0; i < numinrow; i++) { + if (isprint(chs[i])) { +#ifdef WIN32 + sprintf_s(buff, BUFF_SIZE, "%c", chs[i]); +#else + snprintf(buff, BUFF_SIZE, "%c", chs[i]); +#endif + msg += buff; + } else { + msg += "."; + } + } + } + + CAF_CM_LOG_DEBUG_VA1("row: %s", msg.c_str()); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.h new file mode 100644 index 000000000..22cc0b0e9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpCommon.h @@ -0,0 +1,93 @@ +/* + * Created on: Oct 7, 2014 + * Author: bwilliams + * + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCORE_AMQPCOMMON_H_ +#define AMQPCORE_AMQPCOMMON_H_ + +namespace Caf { namespace AmqpClient { + +/** AMQP status codes. */ +typedef enum { + AMQP_ERROR_OK = 0, /**< AMQP_ERROR_OK */ + AMQP_ERROR_TIMEOUT, /**< AMQP_ERROR_TIMEOUT */ + AMQP_ERROR_NO_MEMORY, /**< AMQP_ERROR_NO_MEMORY */ + AMQP_ERROR_INVALID_HANDLE, /**< AMQP_ERROR_INVALID_HANDLE */ + AMQP_ERROR_INVALID_ARGUMENT, /**< AMQP_ERROR_INVALID_ARGUMENT */ + AMQP_ERROR_WRONG_STATE, /**< AMQP_ERROR_WRONG_STATE */ + AMQP_ERROR_TOO_MANY_CHANNELS, /**< AMQP_ERROR_TOO_MANY_CHANNELS */ + AMQP_ERROR_QUEUE_FULL, /**< AMQP_ERROR_QUEUE_FULL */ + AMQP_ERROR_FRAME_TOO_LARGE, /**< AMQP_ERROR_FRAME_TOO_LARGE */ + AMQP_ERROR_IO_ERROR, /**< AMQP_ERROR_IO_ERROR */ + AMQP_ERROR_PROTOCOL_ERROR, /**< AMQP_ERROR_PROTOCOL_ERROR */ + AMQP_ERROR_UNIMPLEMENTED, /**< AMQP_ERROR_UNIMPLEMENTED */ + AMQP_ERROR_IO_INTERRUPTED, /**< AMQP_ERROR_IO_INTERRUPTED */ + AMQP_ERROR_MAX, /**< AMQP_ERROR_MAX */ +} AMQPStatus; + +class AmqpCommon { +public: + static void *AMQP_Calloc( + size_t nmemb, size_t size); + + static void AMQP_Free(void *ptr); + + static int32 sendMethod( + const amqp_connection_state_t& connectionState, + const amqp_channel_t& channel, + const amqp_method_number_t& methodId, + void *decodedMethod); + + static int32 validateStatusRequired( + const std::string& msg, + const int32 status); + + static int32 validateStatus( + const std::string& msg, + const int32 status); + + static int32 validateRpcReply( + const std::string& msg, + const amqp_rpc_reply_t& rpcReply); + + static void strToAmqpBytes( + const std::string& src, + amqp_bytes_t& dest, + Csetstr& cachedStrings); + + static void boolToAmqpBool( + const bool src, + amqp_boolean_t& dest); + + static void cpTableSafely( + const amqp_table_t* src, + amqp_table_t& dest); + + static void dumpMessageBody( + const void *buffer, + const size_t bufferLen); + +private: + static bool rowsEqual( + int32 *row1, + int32 *row2); + + static void dumpRow( + const int32 count, + const int32 numinrow, + const int32 *chs); + + static const std::string& getString( + const std::string& src, + Csetstr& cachedStrings); + +private: + CAF_CM_DECLARE_NOCREATE (AmqpCommon); +}; + +}} + +#endif /* AMQPCORE_AMQPCOMMON_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.cpp new file mode 100644 index 000000000..7b68af283 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.cpp @@ -0,0 +1,129 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/CAmqpAuthMechanism.h" +#include "amqpClient/CAmqpConnection.h" +#include "amqpClient/api/Address.h" +#include "amqpClient/api/CertInfo.h" +#include "AmqpConnection.h" + +using namespace Caf::AmqpClient; + +AMQPStatus AmqpConnection::AMQP_ConnectionCreate( + SmartPtrCAmqpConnection& conn, + const SmartPtrAddress& address, + const SmartPtrCAmqpAuthMechanism& auth, + const SmartPtrCertInfo& certInfo, + const uint16 channelMax, + const uint32 frameMax, + const uint16 heartbeat, + const uint16 retries, + const uint16 secondsToWait) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionCreate"); + CAF_CM_VALIDATE_SMARTPTR(address); + CAF_CM_VALIDATE_SMARTPTR(auth); + + conn.CreateInstance(); + return conn->connectionCreate(address, auth, certInfo, + channelMax, frameMax, heartbeat, retries, secondsToWait); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionConnect( + const SmartPtrCAmqpConnection& conn, + const int32 flags) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionConnect"); + CAF_CM_VALIDATE_SMARTPTR(conn); + + return conn->connectionConnect(flags); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionOpenChannel( + const SmartPtrCAmqpConnection& conn, + SmartPtrCAmqpChannel& chan) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionOpenChannel"); + CAF_CM_VALIDATE_SMARTPTR(conn); + + return conn->channelOpen(chan); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionClose( + const SmartPtrCAmqpConnection& conn) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionClose"); + CAF_CM_VALIDATE_SMARTPTR(conn); + + return conn->connectionClose(); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionProcessIO( + const SmartPtrCAmqpConnection& conn) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionProcessIO"); + CAF_CM_VALIDATE_SMARTPTR(conn); + + return conn->connectionProcessIO(); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionWaitForIO( + const SmartPtrCAmqpConnection& conn, + const int32 timeout) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionWaitForIO"); + CAF_CM_VALIDATE_SMARTPTR(conn); + + return conn->connectionWaitForIO(timeout); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionGetState( + const SmartPtrCAmqpConnection& conn, + AMQPConnectionState *state) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionGetState"); + CAF_CM_VALIDATE_SMARTPTR(conn); + CAF_CM_VALIDATE_PTR(state); + + return conn->connectionGetState(state); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionGetMaxChannels( + const SmartPtrCAmqpConnection& conn, + uint16 *channels) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionGetMaxChannels"); + CAF_CM_VALIDATE_SMARTPTR(conn); + CAF_CM_VALIDATE_PTR(channels); + + return conn->connectionGetMaxChannels(channels); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionGetMaxFrameSize( + const SmartPtrCAmqpConnection& conn, + uint32 *frameSize) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionGetMaxFrameSize"); + CAF_CM_VALIDATE_SMARTPTR(conn); + CAF_CM_VALIDATE_PTR(frameSize); + + return conn->connectionGetMaxFrameSize(frameSize); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionGetHeartbeatInterval( + const SmartPtrCAmqpConnection& conn, + uint16 *interval) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionGetHeartbeatInterval"); + CAF_CM_VALIDATE_SMARTPTR(conn); + CAF_CM_VALIDATE_PTR(interval); + + return conn->connectionGetHeartbeatInterval(interval); +} + +AMQPStatus AmqpConnection::AMQP_ConnectionGetLastError( + const SmartPtrCAmqpConnection& conn, + const char **error) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpConnection", "AMQP_ConnectionGetLastError"); + CAF_CM_VALIDATE_SMARTPTR(conn); + CAF_CM_VALIDATE_PTR(error); + + return conn->connectionGetLastError(error); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.h new file mode 100644 index 000000000..fe802f6ca --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpConnection.h @@ -0,0 +1,114 @@ +/* + * Created on: Oct 7, 2014 + * Author: bwilliams + * + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCORE_AMQPCONNECTION_H_ +#define AMQPCORE_AMQPCONNECTION_H_ + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/CAmqpAuthMechanism.h" +#include "amqpClient/CAmqpConnection.h" +#include "amqpClient/api/Address.h" +#include "amqpClient/api/CertInfo.h" + +namespace Caf { namespace AmqpClient { + +/** Default maximum number of channels. */ +static const uint16 AMQP_CHANNEL_MAX_DEFAULT = 0; /* Unlimited. */ + +/** Default maximum frame size. */ +static const uint32 AMQP_FRAME_MAX_DEFAULT = 131072; /* 128kB */ + +/** Default heartbeat frequency. */ +static const uint16 AMQP_HEARTBEAT_DEFAULT = 0; /* No heartbeat. */ + +/** AMQP connection internal state details. */ +typedef enum AMQPConnectionInternalState { + AMQP_CONNECTION_INITIALIZED = 0, + AMQP_CONNECTION_CONNECTING, + AMQP_CONNECTION_WAITING_FOR_START, + AMQP_CONNECTION_WAITING_FOR_SECURE, + AMQP_CONNECTION_WAITING_FOR_TUNE, + AMQP_CONNECTION_WAITING_FOR_OPEN_OK, + AMQP_CONNECTION_OPEN, + AMQP_CONNECTION_WAITING_FOR_CLOSE_OK, + AMQP_CONNECTION_SENT_CLOSE_OK, + AMQP_CONNECTION_CLOSED +} AMQPConnectionInternalState; + +/** Close the socket when the connection is closed. */ +#define AMQP_CONNECTION_FLAG_CLOSE_SOCKET (1 << 0) +/** Don't lock the connection against multi-threaded applications. */ +#define AMQP_CONNECTION_FLAG_NO_LOCK (1 << 1) +/** Don't retry I/O when interrupted by signals. */ +#define AMQP_CONNECTION_FLAG_NO_IO_RETRY (1 << 2) + +/** Mode to poll the socket. */ +typedef enum { + AMQP_WANT_READ = 0x1, /*!< Poll socket for readability. */ + AMQP_WANT_WRITE = 0x2, /*!< Poll socket for writability. */ + AMQP_POLL_NO_IO_RETRY = 0x4, /*!< Don't retry I/O on EINTR. */ +} AMQPPollFlags; + +class AmqpConnection { +public: + static AMQPStatus AMQP_ConnectionCreate( + SmartPtrCAmqpConnection& pConn, + const SmartPtrAddress& address, + const SmartPtrCAmqpAuthMechanism& auth, + const SmartPtrCertInfo& certInfo, + const uint16 channelMax, + const uint32 frameMax, + const uint16 heartbeat, + const uint16 retries, + const uint16 secondsToWait); + + static AMQPStatus AMQP_ConnectionConnect( + const SmartPtrCAmqpConnection& conn, + const int32 flags); + + static AMQPStatus AMQP_ConnectionOpenChannel( + const SmartPtrCAmqpConnection& conn, + SmartPtrCAmqpChannel& chan); + + static AMQPStatus AMQP_ConnectionClose( + const SmartPtrCAmqpConnection& conn); + + static AMQPStatus AMQP_ConnectionProcessIO( + const SmartPtrCAmqpConnection& conn); + + static AMQPStatus AMQP_ConnectionWaitForIO( + const SmartPtrCAmqpConnection& conn, + const int32 timeout); + + static AMQPStatus AMQP_ConnectionGetState( + const SmartPtrCAmqpConnection& conn, + AMQPConnectionState *state); + + static AMQPStatus AMQP_ConnectionGetMaxChannels( + const SmartPtrCAmqpConnection& conn, + uint16 *channels); + + static AMQPStatus AMQP_ConnectionGetMaxFrameSize( + const SmartPtrCAmqpConnection& conn, + uint32 *frameSize); + + static AMQPStatus AMQP_ConnectionGetHeartbeatInterval( + const SmartPtrCAmqpConnection& conn, + uint16 *interval); + + static AMQPStatus AMQP_ConnectionGetLastError( + const SmartPtrCAmqpConnection& conn, + const char **error); + +private: + CAF_CM_DECLARE_NOCREATE (AmqpConnection); +}; + +} +} + +#endif /* AMQPCORE_AMQPCONNECTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.cpp new file mode 100644 index 000000000..577bee01c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.cpp @@ -0,0 +1,203 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "AmqpUtil.h" + +using namespace Caf::AmqpClient; + +AMQPStatus AmqpUtil::AMQP_BasicAck( + const SmartPtrCAmqpChannel& channel, + const uint64 deliveryTag, + const bool multiple) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicAck"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->basicAck(deliveryTag, multiple); +} + +AMQPStatus AmqpUtil::AMQP_BasicCancel( + const SmartPtrCAmqpChannel& channel, + const std::string& consumerTag, + const bool noWait) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicCancel"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(consumerTag); + + return channel->basicCancel(consumerTag, noWait); +} + +AMQPStatus AmqpUtil::AMQP_BasicConsume( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicConsume"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + + return channel->basicConsume(queue, consumerTag, noLocal, noAck, + exclusive, noWait, arguments); +} + +AMQPStatus AmqpUtil::AMQP_BasicGet( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool noAck) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicGet"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + + return channel->basicGet(queue, noAck); +} + +AMQPStatus AmqpUtil::AMQP_BasicPublish( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicPublish"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + CAF_CM_VALIDATE_PTR(basicProps); + CAF_CM_VALIDATE_SMARTPTR(body); + + return channel->basicPublish(exchange, routingKey, mandatory, + immediate, basicProps, body); +} + +AMQPStatus AmqpUtil::AMQP_BasicRecover( + const SmartPtrCAmqpChannel& channel, + const bool requeue) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicRecover"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->basicRecover(requeue); +} + +AMQPStatus AmqpUtil::AMQP_BasicQos( + const SmartPtrCAmqpChannel& channel, + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_BasicQos"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + return channel->basicQos(prefetchSize, prefetchCount, global); +} + +AMQPStatus AmqpUtil::AMQP_ExchangeDeclare( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_ExchangeDeclare"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(type); + + return channel->exchangeDeclare(exchange, type, passive, durable, + noWait, arguments); +} + +AMQPStatus AmqpUtil::AMQP_ExchangeDelete( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const bool ifUnused, + const bool noWait) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_ExchangeDelete"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(exchange); + + return channel->exchangeDelete(exchange, ifUnused, noWait); +} + +AMQPStatus AmqpUtil::AMQP_QueueBind( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_QueueBind"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + + return channel->queueBind(queue, exchange, routingKey, noWait, arguments); +} + +AMQPStatus AmqpUtil::AMQP_QueueDeclare( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_QueueDeclare"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + + return channel->queueDeclare(queue, passive, durable, exclusive, + autoDelete, noWait, arguments); +} + +AMQPStatus AmqpUtil::AMQP_QueueDelete( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_QueueDelete"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + + return channel->queueDelete(queue, ifUnused, ifEmpty, noWait); +} + +AMQPStatus AmqpUtil::AMQP_QueuePurge( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool noWait) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_QueuePurge"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + + return channel->queuePurge(queue, noWait); +} + +AMQPStatus AmqpUtil::AMQP_QueueUnbind( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& exchange, + const std::string& bindingKey, + const amqp_table_t *arguments) { + CAF_CM_STATIC_FUNC_VALIDATE("AmqpUtil", "AMQP_QueueUnbind"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(bindingKey); + + return channel->queueUnbind(queue, exchange, bindingKey, arguments); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.h new file mode 100644 index 000000000..8cae791ba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/AmqpUtil.h @@ -0,0 +1,120 @@ +/* + * Created on: Oct 7, 2014 + * Author: bwilliams + * + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPCORE_AMQPUTIL_H_ +#define AMQPCORE_AMQPUTIL_H_ + +#include "amqpClient/CAmqpChannel.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { namespace AmqpClient { + +class AmqpUtil { +public: + static AMQPStatus AMQP_BasicAck( + const SmartPtrCAmqpChannel& channel, + const uint64 deliveryTag, + const bool multiple); + + static AMQPStatus AMQP_BasicCancel( + const SmartPtrCAmqpChannel& channel, + const std::string& consumerTag, + const bool noWait); + + static AMQPStatus AMQP_BasicConsume( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments); + + static AMQPStatus AMQP_BasicGet( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool noAck); + + static AMQPStatus AMQP_BasicPublish( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body); + + static AMQPStatus AMQP_BasicRecover( + const SmartPtrCAmqpChannel& channel, + const bool requeue); + + static AMQPStatus AMQP_BasicQos( + const SmartPtrCAmqpChannel& channel, + const uint32 prefetchSize, + const uint16 prefetchCount, + bool global); + + static AMQPStatus AMQP_ExchangeDeclare( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments); + + static AMQPStatus AMQP_ExchangeDelete( + const SmartPtrCAmqpChannel& channel, + const std::string& exchange, + const bool ifUnused, + const bool noWait); + + static AMQPStatus AMQP_QueueBind( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments); + + static AMQPStatus AMQP_QueueDeclare( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments); + + static AMQPStatus AMQP_QueueDelete( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait); + + static AMQPStatus AMQP_QueuePurge( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const bool noWait); + + static AMQPStatus AMQP_QueueUnbind( + const SmartPtrCAmqpChannel& channel, + const std::string& queue, + const std::string& exchange, + const std::string& bindingKey, + const amqp_table_t *arguments); + +private: + CAF_CM_DECLARE_NOCREATE (AmqpUtil); +}; + +}} + +#endif /* AMQPCORE_AMQPUTIL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/BlockingRpcContinuation.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/BlockingRpcContinuation.cpp new file mode 100644 index 000000000..e5a1e78e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/BlockingRpcContinuation.cpp @@ -0,0 +1,58 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Exception/CCafException.h" +#include "amqpClient/AMQCommand.h" +#include "amqpClient/BlockingRpcContinuation.h" + +using namespace Caf::AmqpClient; + +BlockingRpcContinuation::BlockingRpcContinuation() : + _isInitialized(false), + CAF_CM_INIT("BlockingRpcContinuation") { +} + +BlockingRpcContinuation::~BlockingRpcContinuation() { +} + +void BlockingRpcContinuation::init() { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +SmartPtrAMQCommand BlockingRpcContinuation::getReply() { + CAF_CM_FUNCNAME_VALIDATE("getReply"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _blocker.get(); +} + +SmartPtrAMQCommand BlockingRpcContinuation::getReply(uint32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("getReply"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _blocker.get(timeout); +} + +SmartPtrCCafException BlockingRpcContinuation::getException() { + CAF_CM_FUNCNAME_VALIDATE("getException"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _exception; +} +void BlockingRpcContinuation::handleCommand(const SmartPtrAMQCommand& command) { + CAF_CM_FUNCNAME_VALIDATE("handleCommand"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _blocker.set(command); +} + +void BlockingRpcContinuation::handleAbort(SmartPtrCCafException exception) { + CAF_CM_FUNCNAME_VALIDATE("handleAbort"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _exception = exception; + _blocker.set(NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp new file mode 100644 index 000000000..9cc1d957c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpAuthMechanism.cpp @@ -0,0 +1,43 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "amqpClient/CAmqpAuthMechanism.h" + +using namespace Caf::AmqpClient; + +CAmqpAuthMechanism::CAmqpAuthMechanism() : + CAF_CM_INIT("CAmqpAuthMechanism") { + CAF_CM_INIT_THREADSAFE; +} + +CAmqpAuthMechanism::~CAmqpAuthMechanism() { +} + +AMQPStatus CAmqpAuthMechanism::createClient( + const std::string& username, + const std::string& password) { + CAF_CM_FUNCNAME_VALIDATE("createClient"); + CAF_CM_VALIDATE_STRING(username); + // password is optional + + _username = username; + _password = password; + + return AMQP_ERROR_OK; +} + +std::string CAmqpAuthMechanism::getUsername() const { + CAF_CM_FUNCNAME_VALIDATE("getUsername"); + CAF_CM_VALIDATE_STRING(_username); + return _username; +} + +std::string CAmqpAuthMechanism::getPassword() const { + // password is optional + return _password; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpChannel.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpChannel.cpp new file mode 100644 index 000000000..fdfefa551 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpChannel.cpp @@ -0,0 +1,253 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/CAmqpConnection.h" +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/CAmqpChannel.h" + +using namespace Caf::AmqpClient; + +CAmqpChannel::CAmqpChannel() : + _isInitialized(false), + _channel(0), + CAF_CM_INIT("CAmqpChannel") { + CAF_CM_INIT_THREADSAFE; +} + +CAmqpChannel::~CAmqpChannel() { +} + +void CAmqpChannel::initialize( + const SmartPtrCAmqpConnection& connection, + const amqp_channel_t& channel) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(connection); + + _connection = connection; + _channel = channel; + _isInitialized = true; +} + +AMQPStatus CAmqpChannel::close() { + AMQPStatus rc = AMQP_ERROR_OK; + if (_isInitialized) { + rc = _connection->channelClose(_channel); + + _connection = NULL; + _channel = 0; + _isInitialized = false; + } + + return rc; +} + +AMQPStatus CAmqpChannel::closeOk() { + CAF_CM_FUNCNAME_VALIDATE("closeOk"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _connection->channelCloseOk(_channel); +} + +AMQPStatus CAmqpChannel::receive( + SmartPtrCAmqpFrame& frame, + int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("receive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _connection->receive(_channel, frame, timeout); +} + +AMQPStatus CAmqpChannel::getId( + uint16 *id) { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(id); + + *id = _channel; + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpChannel::basicAck( + const uint64 deliveryTag, + const bool multiple) { + CAF_CM_FUNCNAME_VALIDATE("basicAck"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _connection->basicAck(_channel, deliveryTag, multiple); +} + +AMQPStatus CAmqpChannel::basicCancel( + const std::string& consumerTag, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("basicCancel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(consumerTag); + + return _connection->basicCancel(_channel, consumerTag, noWait); +} + +AMQPStatus CAmqpChannel::basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("basicConsume"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + + return _connection->basicConsume(_channel, queue, consumerTag, + noLocal, noAck, exclusive, noWait, arguments); +} + +AMQPStatus CAmqpChannel::basicGet( + const std::string& queue, + const bool noAck) { + CAF_CM_FUNCNAME_VALIDATE("basicGet"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + + return _connection->basicGet(_channel, queue, noAck); +} + +AMQPStatus CAmqpChannel::basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME_VALIDATE("basicPublish"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + CAF_CM_VALIDATE_PTR(basicProps); + CAF_CM_VALIDATE_SMARTPTR(body); + + return _connection->basicPublish(_channel, exchange, routingKey, + mandatory, immediate, basicProps, body); +} + +AMQPStatus CAmqpChannel::basicRecover( + const bool requeue) { + CAF_CM_FUNCNAME_VALIDATE("basicRecover"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _connection->basicRecover(_channel, requeue); +} + +AMQPStatus CAmqpChannel::basicQos( + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global) { + CAF_CM_FUNCNAME_VALIDATE("basicQos"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _connection->basicQos(_channel, prefetchSize, prefetchCount, global); +} + +AMQPStatus CAmqpChannel::exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("exchangeDeclare"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(type); + + return _connection->exchangeDeclare(_channel, exchange, type, passive, + durable, noWait, arguments); +} + +AMQPStatus CAmqpChannel::exchangeDelete( + const std::string& exchange, + const bool ifUnused, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("exchangeDelete"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(exchange); + + return _connection->exchangeDelete(_channel, exchange, ifUnused, noWait); +} + +AMQPStatus CAmqpChannel::queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueBind"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + + return _connection->queueBind(_channel, queue, exchange, routingKey, + noWait, arguments); +} + +AMQPStatus CAmqpChannel::queueDeclare( + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueDeclare"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + + return _connection->queueDeclare(_channel, queue, passive, durable, + exclusive, autoDelete, noWait, arguments); +} + +AMQPStatus CAmqpChannel::queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("queueDelete"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + + return _connection->queueDelete(_channel, queue, ifUnused, ifEmpty, noWait); +} + +AMQPStatus CAmqpChannel::queuePurge( + const std::string& queue, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("queuePurge"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + + return _connection->queuePurge(_channel, queue, noWait); +} + +AMQPStatus CAmqpChannel::queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& bindingKey, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueUnbind"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(bindingKey); + + return _connection->queueUnbind(_channel, queue, exchange, bindingKey, arguments); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpConnection.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpConnection.cpp new file mode 100644 index 000000000..8541a3adb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpConnection.cpp @@ -0,0 +1,1059 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/CAmqpAuthMechanism.h" +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/api/Address.h" +#include "amqpClient/api/CertInfo.h" +#include "amqpClient/CAmqpConnection.h" +#include "Exception/CCafException.h" + +using namespace Caf::AmqpClient; + +CAmqpConnection::CAmqpConnection() : + _connectionState(NULL), + _socket(NULL), + _curChannel(0), + _connectionStateEnum(AMQP_STATE_DISCONNECTED), + _isConnectionLost(false), + _lastStatus(0), + _channelMax(0), + _frameMax(0), + _heartbeat(0), + _retries(0), + _secondsToWait(0), + CAF_CM_INIT_LOG("CAmqpConnection") { + CAF_CM_INIT_THREADSAFE; +} + +CAmqpConnection::~CAmqpConnection() { + CAF_CM_LOCK_UNLOCK; + if (NULL != _connectionState) { + closeConnection(); + } +} + +AMQPStatus CAmqpConnection::connectionCreate( + const SmartPtrAddress& address, + const SmartPtrCAmqpAuthMechanism& auth, + const SmartPtrCertInfo& certInfo, + const uint16 channelMax, + const uint32 frameMax, + const uint16 heartbeat, + const uint16 retries, + const uint16 secondsToWait) { + CAF_CM_FUNCNAME("connectionCreate"); + CAF_CM_VALIDATE_SMARTPTR(address); + CAF_CM_VALIDATE_SMARTPTR(auth); + + CAF_CM_LOCK_UNLOCK; + + _address = address; + _auth = auth; + _certInfo = certInfo; + _channelMax = channelMax; + _frameMax = frameMax; + _heartbeat = heartbeat; + _channelFrames.CreateInstance(); + _retries = retries; + _secondsToWait = secondsToWait; + + AMQPStatus rc = AMQP_ERROR_OK; + switch(_address->getProtocol()) { + case PROTOCOL_AMQP: + rc = createConnection(); + break; + case PROTOCOL_AMQPS: + rc = createSslConnection(); + break; + case PROTOCOL_TUNNEL: + rc = createSslConnection(); + break; + default: + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Unknown protocol - %d", _address->getProtocol()); + } + + return rc; +} + +AMQPStatus CAmqpConnection::connectionConnect( + const int32 flags) { + CAF_CM_LOCK_UNLOCK; + return connectConnection(); +} + +AMQPStatus CAmqpConnection::connectionClose() { + CAF_CM_LOCK_UNLOCK; + return closeConnection(); +} + +AMQPStatus CAmqpConnection::connectionProcessIO() { + //TODO: Is this call necessary anymore? + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectionWaitForIO( + int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("connectionWaitForIO"); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + AMQPStatus rc = AMQP_ERROR_TIMEOUT; + if (isDataAvail(_connectionState)) { + rc = AMQP_ERROR_OK; + } else { + if (timeout > 0) { + { + CAF_CM_UNLOCK_LOCK; + CThreadUtils::sleep(timeout); + } + if (isDataAvail(_connectionState)) { + rc = AMQP_ERROR_OK; + } + } + } + + return rc; +} + +AMQPStatus CAmqpConnection::connectionGetState( + AMQPConnectionState *state) { + CAF_CM_FUNCNAME_VALIDATE("connectionGetState"); + CAF_CM_VALIDATE_PTR(state); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + *state = _connectionStateEnum; + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectionGetMaxChannels( + uint16 *channels) { + CAF_CM_FUNCNAME_VALIDATE("connectionGetMaxChannels"); + CAF_CM_VALIDATE_PTR(channels); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + *channels = amqp_get_channel_max(_connectionState); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectionGetMaxFrameSize( + uint32 *frameSize) { + CAF_CM_FUNCNAME_VALIDATE("connectionGetMaxFrameSize"); + CAF_CM_VALIDATE_PTR(frameSize); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + *frameSize = amqp_get_frame_max(_connectionState); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectionGetHeartbeatInterval( + uint16 *interval) { + CAF_CM_FUNCNAME_VALIDATE("connectionGetHeartbeatInterval"); + CAF_CM_VALIDATE_PTR(interval); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + *interval = amqp_get_heartbeat(_connectionState); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectionGetLastError( + const char **error) { + CAF_CM_FUNCNAME_VALIDATE("connectionGetLastError"); + CAF_CM_VALIDATE_PTR(error); + + CAF_CM_LOCK_UNLOCK; + + *error = amqp_error_string2(_lastStatus); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::channelClose( + const amqp_channel_t& channel) { + CAF_CM_FUNCNAME_VALIDATE("channelClose"); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + _openChannels.erase(channel); + + return closeChannel(channel); +} + +AMQPStatus CAmqpConnection::channelCloseOk( + const amqp_channel_t& channel) { + CAF_CM_FUNCNAME_VALIDATE("channelCloseOk"); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_channel_close_ok_t method = {}; + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_CHANNEL_CLOSE_OK_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::receive( + const amqp_channel_t& channel, + SmartPtrCAmqpFrame& frame, + const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("receive"); + + frame = SmartPtrCAmqpFrame(); + AMQPStatus rc = AMQP_ERROR_OK; + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + //amqp_maybe_release_buffers(_connectionState); + + int32 status = AMQP_STATUS_OK; + CChannelFrames::iterator iter = _channelFrames->find(channel); + if ((_channelFrames->end() == iter) || iter->second.empty()) { + CAmqpFrames frames; + SmartPtrCAmqpFrame frame; + status = receiveFrame(_connectionState, frame); + if ((AMQP_STATUS_TIMEOUT == status) && (timeout > 0)) { + CAF_CM_UNLOCK_LOCK; + CThreadUtils::sleep(timeout); + } + + while (AMQP_STATUS_OK == status) { + CAF_CM_VALIDATE_SMARTPTR(frame); + frames.push_back(frame); + status = receiveFrame(_connectionState, frame); + } + _lastStatus = status; + + addFrames(frames, _channelFrames); + } + + switch (status) { + case AMQP_STATUS_OK: + case AMQP_STATUS_TIMEOUT: { + iter = _channelFrames->find(channel); + if ((_channelFrames->end() == iter) || iter->second.empty()) { + rc = AMQP_ERROR_TIMEOUT; + } else { + frame = iter->second.front(); + iter->second.pop_front(); + } + } + break; + + case AMQP_STATUS_CONNECTION_CLOSED: { + if (! _isConnectionLost) { + CAF_CM_LOG_ERROR_VA1("Connection closed... restarting listener - %s", + amqp_error_string2(status)); + _isConnectionLost = true; + restartListener(amqp_error_string2(status)); + } + rc = AMQP_ERROR_IO_INTERRUPTED; + } + break; + + case AMQP_STATUS_SOCKET_ERROR: { // Enhance the logic to restart listener after certain number of errors. + if (! _isConnectionLost) { + CAF_CM_LOG_ERROR_VA1("SOCKET_ERROR... restarting listener - %s", + amqp_error_string2(status)); + _isConnectionLost = true; + restartListener(amqp_error_string2(status)); + } + rc = AMQP_ERROR_IO_INTERRUPTED; + } + break; + + default: { + CAF_CM_LOG_ERROR_VA1("Received error status - %s", + amqp_error_string2(status)); + } + break; + } + + if (! frame.IsNull()) { + frame->log("Returned"); + } + + return rc; +} + +AMQPStatus CAmqpConnection::channelOpen( + SmartPtrCAmqpChannel& chan) { + CAF_CM_FUNCNAME("channelOpen"); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + _curChannel++; + const amqp_channel_t channel = _curChannel; + + CAF_CM_LOG_DEBUG_VA1("Calling amqp_channel_open - %d", channel); + + amqp_channel_open_t method = {}; + method.out_of_band = amqp_empty_bytes; + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_CHANNEL_OPEN_METHOD, &method); + + chan.CreateInstance(); + chan->initialize(this, channel); + + if (! _openChannels.insert(channel).second) { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Inserted duplicated channel - %d", channel); + } + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicAck( + const amqp_channel_t& channel, + const uint64 deliveryTag, + const bool multiple) { + CAF_CM_FUNCNAME_VALIDATE("basicAck"); + + CAF_CM_LOG_DEBUG_VA1( + "Calling amqp_basic_ack - channel: %d", channel); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + _lastStatus = AmqpCommon::validateStatus( + "amqp_basic_ack", + amqp_basic_ack( + _connectionState, + channel, + deliveryTag, + multiple ? TRUE : FALSE)); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicCancel( + const amqp_channel_t& channel, + const std::string& consumerTag, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("basicCancel"); + CAF_CM_VALIDATE_STRING(consumerTag); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_basic_cancel - channel: %d, consumerTag: %s", + channel, consumerTag.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_basic_cancel_t method = {}; + AmqpCommon::strToAmqpBytes(consumerTag, method.consumer_tag, _cachedStrings); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_BASIC_CANCEL_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicConsume( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("basicConsume"); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_LOG_DEBUG_VA3( + "Calling amqp_basic_consume - channel: %d, queue: %s, consumerTag: %s", + channel, queue.c_str(), + (consumerTag.empty() ? "NULL" : consumerTag.c_str())); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_basic_consume_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::strToAmqpBytes(consumerTag, method.consumer_tag, _cachedStrings); + AmqpCommon::boolToAmqpBool(noLocal, method.no_local); + AmqpCommon::boolToAmqpBool(noAck, method.no_ack); + AmqpCommon::boolToAmqpBool(exclusive, method.exclusive); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::cpTableSafely(arguments, method.arguments); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_BASIC_CONSUME_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicGet( + const amqp_channel_t& channel, + const std::string& queue, + const bool noAck) { + CAF_CM_FUNCNAME_VALIDATE("basicGet"); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_basic_get - channel: %d, queue: %s", + channel, queue.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + AmqpCommon::validateRpcReply( + "amqp_basic_get", + amqp_basic_get( + _connectionState, + channel, + amqp_cstring_bytes(queue.c_str()), + noAck ? TRUE : FALSE)); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicPublish( + const amqp_channel_t& channel, + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const amqp_basic_properties_t *basicProps, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME_VALIDATE("basicPublish"); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + CAF_CM_VALIDATE_PTR(basicProps); + CAF_CM_VALIDATE_SMARTPTR(body); + + CAF_CM_LOG_DEBUG_VA3( + "Calling amqp_basic_publish - channel: %d, exchange: %s, routingKey: %s", + channel, exchange.c_str(), routingKey.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_bytes_t bodyRaw; + bodyRaw.bytes = body->getNonConstPtr(); + bodyRaw.len = body->getByteCount(); + + _lastStatus = AmqpCommon::validateStatus( + "amqp_basic_publish", + amqp_basic_publish( + _connectionState, + channel, + amqp_cstring_bytes(exchange.c_str()), + amqp_cstring_bytes(routingKey.c_str()), + mandatory ? TRUE : FALSE, + immediate ? TRUE : FALSE, + basicProps, + bodyRaw)); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicRecover( + const amqp_channel_t& channel, + const bool requeue) { + CAF_CM_FUNCNAME_VALIDATE("basicRecover"); + + CAF_CM_LOG_DEBUG_VA1( + "Calling amqp_basic_recover - channel: %d", channel); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_basic_recover_t method = {}; + AmqpCommon::boolToAmqpBool(requeue, method.requeue); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_BASIC_RECOVER_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::basicQos( + const amqp_channel_t& channel, + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global) { + CAF_CM_FUNCNAME_VALIDATE("basicQos"); + + CAF_CM_LOG_DEBUG_VA1( + "Calling amqp_basic_qos - channel: %d", channel); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_basic_qos_t method = {}; + method.prefetch_size = prefetchSize; + method.prefetch_count = prefetchCount; + AmqpCommon::boolToAmqpBool(global, method.global); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_BASIC_QOS_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::exchangeDeclare( + const amqp_channel_t& channel, + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("exchangeDeclare"); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(type); + + CAF_CM_LOG_DEBUG_VA3( + "Calling amqp_exchange_declare - channel: %d, exchange: %s, type: %s", + channel, exchange.c_str(), type.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + const bool autoDelete = false; + + amqp_exchange_declare_t method = {}; + AmqpCommon::strToAmqpBytes(exchange, method.exchange, _cachedStrings); + AmqpCommon::strToAmqpBytes(type, method.type, _cachedStrings); + AmqpCommon::boolToAmqpBool(passive, method.passive); + AmqpCommon::boolToAmqpBool(durable, method.durable); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::cpTableSafely(arguments, method.arguments); + AmqpCommon::boolToAmqpBool(autoDelete, method.auto_delete); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_EXCHANGE_DECLARE_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::exchangeDelete( + const amqp_channel_t& channel, + const std::string& exchange, + const bool ifUnused, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("exchangeDelete"); + CAF_CM_VALIDATE_STRING(exchange); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_exchange_delete - channel: %d, exchange: %s", + channel, exchange.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_exchange_delete_t method = {}; + AmqpCommon::strToAmqpBytes(exchange, method.exchange, _cachedStrings); + AmqpCommon::boolToAmqpBool(ifUnused, method.if_unused); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_EXCHANGE_DELETE_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::queueBind( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueBind"); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + + CAF_CM_LOG_DEBUG_VA4( + "Calling amqp_queue_bind - channel: %d, queue: %s, exchange: %s, routingKey: %s", + channel, queue.c_str(), exchange.c_str(), routingKey.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + CAF_CM_VALIDATE_BOOL(_address->getProtocol() != PROTOCOL_TUNNEL); + validateOpenChannel(channel); + + amqp_queue_bind_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::strToAmqpBytes(exchange, method.exchange, _cachedStrings); + AmqpCommon::strToAmqpBytes(routingKey, method.routing_key, _cachedStrings); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::cpTableSafely(arguments, method.arguments); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_QUEUE_BIND_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::queueDeclare( + const amqp_channel_t& channel, + const std::string& queue, + const bool passive, + const bool durable, + const bool exclusive, + const bool autoDelete, + const bool noWait, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueDeclare"); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_queue_declare - channel: %d, queue: %s", + channel, queue.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + CAF_CM_VALIDATE_BOOL(_address->getProtocol() != PROTOCOL_TUNNEL); + validateOpenChannel(channel); + + amqp_queue_declare_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::boolToAmqpBool(passive, method.passive); + AmqpCommon::boolToAmqpBool(durable, method.durable); + AmqpCommon::boolToAmqpBool(exclusive, method.exclusive); + AmqpCommon::boolToAmqpBool(autoDelete, method.auto_delete); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::cpTableSafely(arguments, method.arguments); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_QUEUE_DECLARE_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::queueDelete( + const amqp_channel_t& channel, + const std::string& queue, + const bool ifUnused, + const bool ifEmpty, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("queueDelete"); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_queue_delete - channel: %d, queue: %s", + channel, queue.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + CAF_CM_VALIDATE_BOOL(_address->getProtocol() != PROTOCOL_TUNNEL); + validateOpenChannel(channel); + + amqp_queue_delete_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::boolToAmqpBool(ifUnused, method.if_unused); + AmqpCommon::boolToAmqpBool(ifEmpty, method.if_empty); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_QUEUE_DELETE_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::queuePurge( + const amqp_channel_t& channel, + const std::string& queue, + const bool noWait) { + CAF_CM_FUNCNAME_VALIDATE("queuePurge"); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_queue_purge - channel: %d, queue: %s", + channel, queue.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + validateOpenChannel(channel); + + amqp_queue_purge_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::boolToAmqpBool(noWait, method.nowait); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_QUEUE_PURGE_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::queueUnbind( + const amqp_channel_t& channel, + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const amqp_table_t *arguments) { + CAF_CM_FUNCNAME_VALIDATE("queueUnbind"); + CAF_CM_VALIDATE_STRING(queue); + CAF_CM_VALIDATE_STRING(exchange); + CAF_CM_VALIDATE_STRING(routingKey); + + CAF_CM_LOG_DEBUG_VA4( + "Calling amqp_queue_unbind - channel: %d, queue: %s, exchange: %s, routingKey: %s", + channel, queue.c_str(), exchange.c_str(), routingKey.c_str()); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + CAF_CM_VALIDATE_BOOL(_address->getProtocol() != PROTOCOL_TUNNEL); + validateOpenChannel(channel); + + amqp_queue_unbind_t method = {}; + AmqpCommon::strToAmqpBytes(queue, method.queue, _cachedStrings); + AmqpCommon::strToAmqpBytes(exchange, method.exchange, _cachedStrings); + AmqpCommon::strToAmqpBytes(routingKey, method.routing_key, _cachedStrings); + AmqpCommon::cpTableSafely(arguments, method.arguments); + AmqpCommon::sendMethod(_connectionState, channel, + AMQP_QUEUE_UNBIND_METHOD, &method); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::createConnection() { + CAF_CM_FUNCNAME_VALIDATE("createConnection"); + CAF_CM_VALIDATE_NULLPTR(_connectionState); + CAF_CM_VALIDATE_NULLPTR(_socket); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_DISCONNECTED); + + CAF_CM_LOG_DEBUG_VA0( + "Calling amqp_new_connection/amqp_tcp_socket_new"); + + _connectionState = amqp_new_connection(); + CAF_CM_VALIDATE_PTR(_connectionState); + + _socket = amqp_tcp_socket_new(_connectionState); + CAF_CM_VALIDATE_PTR(_socket); + + _connectionStateEnum = AMQP_STATE_INITIALIZED; + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::createSslConnection() { + CAF_CM_FUNCNAME_VALIDATE("createSslConnection"); + CAF_CM_VALIDATE_NULLPTR(_connectionState); + CAF_CM_VALIDATE_NULLPTR(_socket); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_DISCONNECTED); + CAF_CM_VALIDATE_SMARTPTR(_certInfo); + + CAF_CM_LOG_DEBUG_VA0( + "Calling amqp_new_connection/amqp_ssl_socket_new"); + + _connectionState = amqp_new_connection(); + CAF_CM_VALIDATE_PTR(_connectionState); + + _socket = amqp_ssl_socket_new(_connectionState); + CAF_CM_VALIDATE_PTR(_socket); + + CAF_CM_LOG_DEBUG_VA0( + "Disable peer verification (amqp_ssl_socket_set_verify_peer)"); + + amqp_ssl_socket_set_verify_peer(_socket, false); + + CAF_CM_LOG_DEBUG_VA0( + "Disable hostname verification (amqp_ssl_socket_set_verify_hostname)"); + + amqp_ssl_socket_set_verify_hostname(_socket, false); + + CAF_CM_LOG_DEBUG_VA0( + "Setting ssl protocol >= 1.2 (amqp_ssl_socket_set_ssl_versions)"); + + amqp_ssl_socket_set_ssl_versions (_socket, AMQP_TLSv1_2, AMQP_TLSvLATEST); + + CAF_CM_LOG_DEBUG_VA1( + "Calling amqp_ssl_socket_set_cacert - caCertPath: %s", + _certInfo->getCaCertPath().c_str()); + + _lastStatus = AmqpCommon::validateStatusRequired( + "amqp_ssl_socket_set_cacert", + amqp_ssl_socket_set_cacert( + _socket, + _certInfo->getCaCertPath().c_str())); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_ssl_socket_set_key - clientCert: %s, clientKey: %s", + _certInfo->getClientCertPath().c_str(), _certInfo->getClientKeyPath().c_str()); + + _lastStatus = AmqpCommon::validateStatusRequired( + "amqp_ssl_socket_set_key", + amqp_ssl_socket_set_key( + _socket, + _certInfo->getClientCertPath().c_str(), + _certInfo->getClientKeyPath().c_str())); + + _connectionStateEnum = AMQP_STATE_INITIALIZED; + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::connectConnection() { + CAF_CM_FUNCNAME("connectConnection"); + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_PTR(_socket); + CAF_CM_VALIDATE_SMARTPTR(_address); + CAF_CM_VALIDATE_SMARTPTR(_auth); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_INITIALIZED); + + CAF_CM_LOG_DEBUG_VA3( + "Calling amqp_socket_open_noblock - protocol: %s, host: %s, port: %d", + _address->getProtocolStr().c_str(), _address->getHost().c_str(), + _address->getPort()); + + struct timeval timeout; + struct timeval *pTimeout = NULL; + + if (_secondsToWait) { + memset(&timeout, 0, sizeof(timeval)); + timeout.tv_sec = _secondsToWait; + pTimeout = &timeout; + } + + uint16 retries = _retries; + do { + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_socket_open_noblock - retries: %d, wait: %d", + retries, _secondsToWait); + if (retries == 1 ) { + // Throw an exception if the last attempt fails + _lastStatus = AmqpCommon::validateStatusRequired( + "amqp_socket_open_noblock", + amqp_socket_open_noblock( + _socket, + _address->getHost().c_str(), + _address->getPort(), + pTimeout)); + } + else { + _lastStatus = AmqpCommon::validateStatus( + "amqp_socket_open_noblock", + amqp_socket_open_noblock( + _socket, + _address->getHost().c_str(), + _address->getPort(), + pTimeout)); + } + } while (_lastStatus != AMQP_STATUS_OK && --retries); + + CAF_CM_LOG_DEBUG_VA2( + "Calling amqp_login - virtualHost: %s, username: %s", + _address->getVirtualHost().c_str(), _auth->getUsername().c_str()); + + _lastStatus = AmqpCommon::validateRpcReply( + "amqp_login", + amqp_login( + _connectionState, + _address->getVirtualHost().c_str(), + _channelMax, + _frameMax, + _heartbeat, + AMQP_SASL_METHOD_PLAIN, + _auth->getUsername().c_str(), + _auth->getPassword().empty() ? "" :_auth->getPassword().c_str())); + + CAF_CM_LOG_DEBUG_VA2( + "Called amqp_login - virtualHost: %s, username: %s", + _address->getVirtualHost().c_str(), _auth->getUsername().c_str()); + + if (0 == _lastStatus) { + _connectionStateEnum = AMQP_STATE_CONNECTED; + } else { + CAF_CM_EXCEPTION_VA3(E_FAIL, + "Failed to login - error: %s, vhost: %s, username: %s", + amqp_error_string2(_lastStatus), + _address->getVirtualHost().c_str(), + _auth->getUsername().c_str()); + } + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::closeConnection() { + CAF_CM_FUNCNAME_VALIDATE("closeConnection"); + + if ((_connectionStateEnum == AMQP_STATE_INITIALIZED) || + (_connectionStateEnum == AMQP_STATE_CONNECTING) || + (_connectionStateEnum == AMQP_STATE_CONNECTED)) { + CAF_CM_VALIDATE_SMARTPTR(_address); + CAF_CM_VALIDATE_PTR(_connectionState); + + CAF_CM_LOG_DEBUG_VA4( + "Calling amqp_connection_close/amqp_destroy_connection - protocol: %s, host: %s, port: %d, virtualHost: %s", + _address->getProtocolStr().c_str(), _address->getHost().c_str(), + _address->getPort(), _address->getVirtualHost().c_str()); + + for (COpenChannels::const_iterator iter = _openChannels.begin(); + iter != _openChannels.end(); iter++) { + const amqp_channel_t channel = *iter; + closeChannel(channel); + } + + AmqpCommon::validateRpcReply( + "amqp_connection_close", + amqp_connection_close(_connectionState, AMQP_REPLY_SUCCESS)); + + _lastStatus = AmqpCommon::validateStatus( + "amqp_destroy_connection", + amqp_destroy_connection(_connectionState)); + } + + _connectionState = NULL; + _socket = NULL; + _curChannel = 0; + _connectionStateEnum = AMQP_STATE_DISCONNECTED; + _channelFrames = NULL; + _openChannels.clear(); + + return AMQP_ERROR_OK; +} + +AMQPStatus CAmqpConnection::closeChannel( + const amqp_channel_t& channel) { + CAF_CM_FUNCNAME_VALIDATE("closeChannel"); + CAF_CM_VALIDATE_PTR(_connectionState); + CAF_CM_VALIDATE_BOOL(_connectionStateEnum == AMQP_STATE_CONNECTED); + + CAF_CM_LOG_DEBUG_VA1("Calling amqp_channel_close - channel: %d", channel); + + AmqpCommon::validateRpcReply( + "amqp_channel_close", + amqp_channel_close( + _connectionState, + channel, + AMQP_REPLY_SUCCESS)); + + return AMQP_ERROR_OK; +} + +int32 CAmqpConnection::receiveFrame( + const amqp_connection_state_t& connectionState, + SmartPtrCAmqpFrame& frame) const { + CAF_CM_FUNCNAME_VALIDATE("receiveFrame"); + CAF_CM_VALIDATE_PTR(connectionState); + + frame = SmartPtrCAmqpFrame(); + + timeval tv; + tv.tv_sec = 0; + tv.tv_usec = 0; + + amqp_frame_t decoded_frame; + int32 status = amqp_simple_wait_frame_noblock( + connectionState, + &decoded_frame, + &tv); + + if (AMQP_STATUS_OK == status) { + frame.CreateInstance(); + frame->initialize(decoded_frame); + frame->log("Received"); + + if (AMQP_FRAME_METHOD == frame->getFrameType()) { + const amqp_method_t* amqpMethod = frame->getPayloadAsMethod(); + if (AMQP_CONNECTION_CLOSE_METHOD == amqpMethod->id) { + status = AMQP_STATUS_CONNECTION_CLOSED; + } + } + } + + return status; +} + +void CAmqpConnection::addFrames( + const CAmqpFrames& frames, + const SmartPtrCChannelFrames& channelFrames) const { + for (CAmqpFrames::const_iterator iter = frames.begin(); + iter != frames.end(); iter++) { + const SmartPtrCAmqpFrame frame = *iter; + + CChannelFrames::iterator fndIter = channelFrames->find(frame->getChannel()); + if (channelFrames->end() == fndIter) { + channelFrames->insert(std::make_pair( + frame->getChannel(), CAmqpFrames())); + fndIter = channelFrames->find(frame->getChannel()); + } + fndIter->second.push_back(frame); + } +} + +void CAmqpConnection::validateOpenChannel( + const amqp_channel_t& channel) const { + CAF_CM_FUNCNAME("validateOpenChannel"); + + if (_openChannels.end() == _openChannels.find(channel)) { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Channel not found - %d", channel); + } +} + +bool CAmqpConnection::isDataAvail( + const amqp_connection_state_t& connectionState) const { + CAF_CM_FUNCNAME_VALIDATE("isDataAvail"); + CAF_CM_VALIDATE_PTR(connectionState); + + return (amqp_frames_enqueued(connectionState)) || + (amqp_data_in_buffer(connectionState)); +} + +void CAmqpConnection::restartListener( + const std::string& reason) const { + CAF_CM_FUNCNAME_VALIDATE("restartListener"); + CAF_CM_VALIDATE_STRING(reason); + + const std::string monitorDir = AppConfigUtils::getRequiredString("monitor_dir"); + const std::string monitorDirExp = CStringUtils::expandEnv(monitorDir); + + FileSystemUtils::saveTextFile(monitorDirExp, "restartListener.txt", reason); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpFrame.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpFrame.cpp new file mode 100644 index 000000000..0d9149b79 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CAmqpFrame.cpp @@ -0,0 +1,144 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "amqpClient/CAmqpFrame.h" + +using namespace Caf::AmqpClient; + +CAmqpFrame::CAmqpFrame() : + _isInitialized(false), + _frameType(0), + _channel(0), + _propertiesClassId(0), + _propertiesBodySize(0), + _propertiesDecoded(NULL), + CAF_CM_INIT_LOG("CAmqpFrame") { + _method.decoded = NULL; + _method.id = 0; + _bodyFragment.bytes = NULL; + _bodyFragment.len = 0; +} + +CAmqpFrame::~CAmqpFrame() { +} + +void CAmqpFrame::initialize( + const amqp_frame_t& frame) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _channel = frame.channel; + _frameType = frame.frame_type; + + switch (_frameType) { + case AMQP_FRAME_METHOD: { + _method = frame.payload.method; + } + break; + + case AMQP_FRAME_HEADER: { + _propertiesClassId = frame.payload.properties.class_id; + _propertiesBodySize = frame.payload.properties.body_size; + CAF_CM_VALIDATE_NOTZERO(static_cast(_propertiesBodySize)); + CAF_CM_VALIDATE_PTR(frame.payload.properties.decoded); + + _propertiesDecoded = static_cast( + frame.payload.properties.decoded); + } + break; + + case AMQP_FRAME_BODY: { + _bodyFragment = frame.payload.body_fragment; + } + break; + + default: + CAF_CM_LOG_ERROR_VA1("Unknown frame type - %d", frame.frame_type); + } + + _isInitialized = true; +} + +uint8_t CAmqpFrame::getFrameType() const { + CAF_CM_FUNCNAME_VALIDATE("getFrameType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _frameType; +} + +amqp_channel_t CAmqpFrame::getChannel() const { + CAF_CM_FUNCNAME_VALIDATE("getChannel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _channel; +} + +const amqp_method_t* const CAmqpFrame::getPayloadAsMethod() const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadAsMethod"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_frameType == AMQP_FRAME_METHOD); + return &_method; +} + +uint16_t CAmqpFrame::getHeaderClassId() const { + CAF_CM_FUNCNAME_VALIDATE("getHeaderClassId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_frameType == AMQP_FRAME_HEADER); + return _propertiesClassId; +} + +uint64_t CAmqpFrame::getHeaderBodySize() const { + CAF_CM_FUNCNAME_VALIDATE("getHeaderBodySize"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_frameType == AMQP_FRAME_HEADER); + return _propertiesBodySize; +} + +const amqp_basic_properties_t* const CAmqpFrame::getHeaderProperties() const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadAsMethod"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_frameType == AMQP_FRAME_HEADER); + return _propertiesDecoded; +} + +const amqp_bytes_t* const CAmqpFrame::getBodyFragment() const { + CAF_CM_FUNCNAME_VALIDATE("getBodyFragment"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_frameType == AMQP_FRAME_BODY); + return &_bodyFragment; +} + +void CAmqpFrame::log( + const std::string& prefix) const { + CAF_CM_FUNCNAME_VALIDATE("log"); + CAF_CM_VALIDATE_STRING(prefix); + + switch (_frameType) { + case AMQP_FRAME_METHOD: + CAF_CM_LOG_DEBUG_VA4( + "%s - type: AMQP_FRAME_METHOD, channel: %d, methodId: 0x%08x, methodName: %s", + prefix.c_str(), _channel, _method.id, + amqp_method_name(_method.id)); + break; + + case AMQP_FRAME_HEADER: + CAF_CM_LOG_DEBUG_VA4( + "%s - type: AMQP_FRAME_HEADER, channel: %d, classId: 0x%04x, bodySize: %d", + prefix.c_str(), _channel, _propertiesClassId, + _propertiesBodySize); + break; + + case AMQP_FRAME_BODY: + CAF_CM_LOG_DEBUG_VA3( + "%s - type: AMQP_FRAME_BODY, channel: %d, bodyLen: %d", + prefix.c_str(), _channel, _bodyFragment.len); +// AmqpCommon::dumpMessageBody(_bodyFragment.bytes, _bodyFragment.len); + break; + + default: + CAF_CM_LOG_ERROR_VA1("Unknown frame type - %d", _frameType); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CertInfo.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CertInfo.cpp new file mode 100644 index 000000000..cd031b3de --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CertInfo.cpp @@ -0,0 +1,52 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "amqpClient/api/CertInfo.h" + +using namespace Caf::AmqpClient; + +CertInfo::CertInfo() : + _isInitialized(false), + CAF_CM_INIT_LOG("CertInfo") {} + +CertInfo::~CertInfo() {} + +void CertInfo::initialize( + const std::string& caCertPath, + const std::string& clientCertPath, + const std::string& clientKeyPath) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(caCertPath); + CAF_CM_VALIDATE_STRING(clientCertPath); + CAF_CM_VALIDATE_STRING(clientKeyPath); + + _caCertPath = caCertPath; + _clientCertPath = clientCertPath; + _clientKeyPath = clientKeyPath; + + _isInitialized = true; +} + +std::string CertInfo::getCaCertPath() const { + CAF_CM_FUNCNAME_VALIDATE("getCaCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _caCertPath; +} + +std::string CertInfo::getClientCertPath() const { + CAF_CM_FUNCNAME_VALIDATE("getClientCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _clientCertPath; +} + +std::string CertInfo::getClientKeyPath() const { + CAF_CM_FUNCNAME_VALIDATE("getClientKeyPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _clientKeyPath; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CommandAssembler.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CommandAssembler.cpp new file mode 100644 index 000000000..657b6dcfe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/CommandAssembler.cpp @@ -0,0 +1,168 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/amqpImpl/IContentHeader.h" +#include "amqpClient/amqpImpl/IMethod.h" +#include "amqpClient/CommandAssembler.h" +#include "Exception/CCafException.h" + +using namespace Caf::AmqpClient; + +CommandAssembler::CommandAssembler() : + _isInitialized(false), + _state(EXPECTING_METHOD), + _remainingBodyBytes(0), + _bodyLength(0), + CAF_CM_INIT("CommandAssembler") { +} + +CommandAssembler::~CommandAssembler() { +} + +void CommandAssembler::init() { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +bool CommandAssembler::handleFrame(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME("handleFrame"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(frame); + + switch (_state) { + case EXPECTING_METHOD: + consumeMethodFrame(frame); + break; + + case EXPECTING_CONTENT_HEADER: + consumeHeaderFrame(frame); + break; + + case EXPECTING_CONTENT_BODY: + consumeBodyFrame(frame); + break; + + default: + CAF_CM_EXCEPTIONEX_VA2( + IllegalStateException, + 0, + "Bad command state [channel=%d][state=%d]", + frame->getChannel(), + _state); + break; + } + return isComplete(); +} + +bool CommandAssembler::isComplete() { + CAF_CM_FUNCNAME_VALIDATE("isComplete"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return (_state == COMPLETE); +} + +SmartPtrIMethod CommandAssembler::getMethod() { + CAF_CM_FUNCNAME_VALIDATE("getMethod"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _method; +} + +SmartPtrCDynamicByteArray CommandAssembler::getContentBody() { + CAF_CM_FUNCNAME_VALIDATE("getContentBody"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return coalesceContentBody(); +} + +SmartPtrIContentHeader CommandAssembler::getContentHeader() { + CAF_CM_FUNCNAME_VALIDATE("getContentHeader"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _contentHeader; +} + +void CommandAssembler::consumeBodyFrame(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME("consumeBodyFrame"); + if (frame->getFrameType() == AMQP_FRAME_BODY) { + const amqp_bytes_t * const fragment = frame->getBodyFragment(); + _remainingBodyBytes -= static_cast(fragment->len); + updateContentBodyState(); + appendBodyFragment(fragment); + } else { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnexpectedFrameException, + 0, + "Expected an AMQP body frame. Received type %d", + frame->getFrameType()); + } +} + +void CommandAssembler::consumeHeaderFrame(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME("consumeHeaderFrame"); + if (frame->getFrameType() == AMQP_FRAME_HEADER) { + _contentHeader = AMQPImpl::headerFromFrame(frame); + _remainingBodyBytes = static_cast(_contentHeader->getBodySize()); + updateContentBodyState(); + } else { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnexpectedFrameException, + 0, + "Expected an AMQP header frame. Received type %d", + frame->getFrameType()); + } +} + +void CommandAssembler::consumeMethodFrame(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME("consumeMethodFrame"); + if (frame->getFrameType() == AMQP_FRAME_METHOD) { + _method = AMQPImpl::methodFromFrame(frame->getPayloadAsMethod()); + _state = _method->hasContent() ? EXPECTING_CONTENT_HEADER : COMPLETE; + } else { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnexpectedFrameException, + 0, + "Expected an AMQP method frame. Received type %d", + frame->getFrameType()); + } +} + +void CommandAssembler::updateContentBodyState() { + _state = (_remainingBodyBytes > 0) ? EXPECTING_CONTENT_BODY : COMPLETE; +} + +void CommandAssembler::appendBodyFragment(const amqp_bytes_t * const fragment) { + if (fragment && fragment->len) { + SmartPtrCDynamicByteArray fragmentData; + fragmentData.CreateInstance(); + fragmentData->allocateBytes(fragment->len); + fragmentData->memCpy(fragment->bytes, fragment->len); + _bodyCollection.push_back(fragmentData); + _bodyLength += static_cast(fragment->len); + } +} + +SmartPtrCDynamicByteArray CommandAssembler::coalesceContentBody() { + SmartPtrCDynamicByteArray body; + body.CreateInstance(); + if (_bodyLength) { + if (_bodyCollection.size() == 1) { + body = _bodyCollection.front(); + } else { + body->allocateBytes(_bodyLength); + for (TSmartIterator fragment(_bodyCollection); + fragment; + fragment++) { + body->memAppend(fragment->getPtr(), fragment->getByteCount()); + *fragment = NULL; + } + } + _bodyCollection.clear(); + _bodyCollection.push_back(body); + } + return body; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp new file mode 100644 index 000000000..b4782b3c0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionFactoryImpl.cpp @@ -0,0 +1,214 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/AMQConnection.h" +#include "amqpClient/api/Address.h" +#include "amqpClient/api/CertInfo.h" +#include "amqpClient/api/Connection.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpClient/ConnectionFactoryImpl.h" + +using namespace Caf::AmqpClient; + +SmartPtrConnectionFactory AMQPCLIENT_LINKAGE Caf::AmqpClient::createConnectionFactory() { + SmartPtrConnectionFactoryImpl factory; + factory.CreateInstance(); + return factory; +} + +ConnectionFactoryImpl::ConnectionFactoryImpl() : + _protocol(DEFAULT_PROTOCOL), + _host(DEFAULT_HOST), + _port(USE_DEFAULT_PORT), + _virtualHost(DEFAULT_VHOST), + _username(DEFAULT_USER), + _password(DEFAULT_PASS), + _requestedChannelMax(DEFAULT_CHANNEL_MAX), + _requestedFrameMax(DEFAULT_FRAME_MAX), + _requestedHeartbeat(DEFAULT_HEARTBEAT), + _connectionTimeout(DEFAULT_CONNECTION_TIMEOUT), + _consumerThreadCount(DEFAULT_CONSUMER_THREAD_COUNT), + _retries(DEFAULT_CONNECTION_RETRIES), + _secondsToWait(DEFAULT_CONNECTION_SECONDS_TO_WAIT), + CAF_CM_INIT("ConnectionFactoryImpl") { +} + +ConnectionFactoryImpl::~ConnectionFactoryImpl() { +} + +std::string ConnectionFactoryImpl::getProtocol() const { + return _protocol; +} + +void ConnectionFactoryImpl::setProtocol(const std::string& protocol) { + _protocol = protocol; +} + +std::string ConnectionFactoryImpl::getHost() const { + return _host; +} + +void ConnectionFactoryImpl::setHost(const std::string& host) { + _host = host; +} + +uint32 ConnectionFactoryImpl::getPort() const { + return portOrDefault(_port); +} + +void ConnectionFactoryImpl::setPort(const uint32 port) { + _port = port; +} + +std::string ConnectionFactoryImpl::getVirtualHost() const { + return _virtualHost; +} + +void ConnectionFactoryImpl::setVirtualHost(const std::string& virtualHost) { + _virtualHost = virtualHost; +} + +std::string ConnectionFactoryImpl::getUsername() const { + return _username; +} + +void ConnectionFactoryImpl::setUsername(const std::string& username) { + _username = username; +} + +std::string ConnectionFactoryImpl::getPassword() const { + return _password; +} + +void ConnectionFactoryImpl::setPassword(const std::string& password) { + _password = password; +} + +std::string ConnectionFactoryImpl::getCaCertPath() const { + return _caCertPath; +} + +void ConnectionFactoryImpl::setCaCertPath(const std::string& caCertPath) { + _caCertPath = caCertPath; +} + +std::string ConnectionFactoryImpl::getClientCertPath() const { + return _clientCertPath; +} + +void ConnectionFactoryImpl::setClientCertPath(const std::string& clientCertPath) { + _clientCertPath = clientCertPath; +} + +std::string ConnectionFactoryImpl::getClientKeyPath() const { + return _clientKeyPath; +} + +void ConnectionFactoryImpl::setClientKeyPath(const std::string& clientKeyPath) { + _clientKeyPath = clientKeyPath; +} + +uint32 ConnectionFactoryImpl::getRequestedChannelMax() const { + return _requestedChannelMax; +} + +void ConnectionFactoryImpl::setRequestedChannelMax(const uint32 requestedChannelMax) { + _requestedChannelMax = requestedChannelMax; +} + +uint32 ConnectionFactoryImpl::getRequestedFrameMax() const { + return _requestedFrameMax; +} + +void ConnectionFactoryImpl::setRequestedFrameMax(const uint32 requestedFrameMax) { + _requestedFrameMax = requestedFrameMax; +} + +uint32 ConnectionFactoryImpl::getRequestedHeartbeat() const { + return _requestedHeartbeat; +} + +void ConnectionFactoryImpl::setRequestedHeartbeat(const uint32 requestedHeartbeat) { + _requestedHeartbeat = requestedHeartbeat; +} + +uint32 ConnectionFactoryImpl::getConnectionTimeout() const { + return _connectionTimeout; +} + +void ConnectionFactoryImpl::setConnectionTimeout(const uint32 connectionTimeout) { + _connectionTimeout = connectionTimeout; +} + +uint32 ConnectionFactoryImpl::getConsumerThreadCount() const { + return _consumerThreadCount; +} + +void ConnectionFactoryImpl::setConsumerThreadCount(const uint32 threadCount) { + CAF_CM_FUNCNAME_VALIDATE("setConsumerThreadCount"); + CAF_CM_VALIDATE_NOTZERO(threadCount); + _consumerThreadCount = threadCount; +} + +uint16 ConnectionFactoryImpl::getRetries() const { + return _retries; +} + +void ConnectionFactoryImpl::setRetries(const uint16 retries) { + _retries = retries; +} + +uint16 ConnectionFactoryImpl::getSecondsToWait() const { + return _secondsToWait; +} + +void ConnectionFactoryImpl::setSecondsToWait(const uint16 seconds) { + _secondsToWait = seconds; +} + +SmartPtrConnection ConnectionFactoryImpl::newConnection() { + SmartPtrAddress address; + address.CreateInstance(); + address->initialize(getProtocol(), getHost(), getPort(), getVirtualHost()); + + SmartPtrCertInfo certInfo; + if (! getCaCertPath().empty() && + ! getClientCertPath().empty() && + ! getClientKeyPath().empty()) { + certInfo.CreateInstance(); + certInfo->initialize(getCaCertPath(), getClientCertPath(), getClientKeyPath()); + } + + return newConnection(address, certInfo); +} + +SmartPtrConnection ConnectionFactoryImpl::newConnection( + const SmartPtrAddress& address, + const SmartPtrCertInfo& certInfo) { + SmartPtrAMQConnection conn; + conn.CreateInstance(); + conn->init( + _username, + _password, + address, + certInfo, + _requestedFrameMax, + _requestedChannelMax, + _requestedHeartbeat, + _connectionTimeout, + _consumerThreadCount, + _retries, + _secondsToWait); + conn->start(); + return conn; +} + +uint32 ConnectionFactoryImpl::portOrDefault(const uint32 port) const { + return (USE_DEFAULT_PORT == port) ? DEFAULT_AMQP_PORT : port; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionWeakReference.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionWeakReference.cpp new file mode 100644 index 000000000..cac13c682 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConnectionWeakReference.cpp @@ -0,0 +1,70 @@ +/* + * Created on: May 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/ConnectionWeakReference.h" +#include "Exception/CCafException.h" + +using namespace Caf::AmqpClient; + +ConnectionWeakReference::ConnectionWeakReference() : + _connection(NULL), + CAF_CM_INIT("ConnectionWeakReference") { + CAF_CM_INIT_THREADSAFE; +} + +ConnectionWeakReference::~ConnectionWeakReference() { +} + +void ConnectionWeakReference::setReference(IConnectionInt* connection) { + CAF_CM_FUNCNAME_VALIDATE("setReference"); + CAF_CM_VALIDATE_PTR(connection); + CAF_CM_LOCK_UNLOCK; + _connection = connection; +} + +void ConnectionWeakReference::clearReference() { + CAF_CM_LOCK_UNLOCK; + _connection = NULL; +} + +AMQPStatus ConnectionWeakReference::amqpConnectionOpenChannel(SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME("amqpConnectionOpenChannel"); + CAF_CM_LOCK_UNLOCK; + AMQPStatus status = AMQP_ERROR_OK; + if (_connection) { + status = _connection->amqpConnectionOpenChannel(channel); + } else { + CAF_CM_EXCEPTIONEX_VA0( + NullPointerException, + 0, + "The weak reference is not set"); + } + return status; +} + +void ConnectionWeakReference::notifyChannelClosedByServer(const uint16 channelNumber) { + CAF_CM_FUNCNAME("notifyChannelClosedByServer"); + CAF_CM_LOCK_UNLOCK; + if (_connection) { + _connection->notifyChannelClosedByServer(channelNumber); + } else { + CAF_CM_EXCEPTIONEX_VA0( + NullPointerException, + 0, + "The weak reference is not set"); + } +} + +void ConnectionWeakReference::channelCloseChannel(Channel *channel) { + // It's okay for the weak reference to be unset in this call + if (_connection) { + _connection->channelCloseChannel(channel); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerDispatcher.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerDispatcher.cpp new file mode 100644 index 000000000..bb30fb631 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerDispatcher.cpp @@ -0,0 +1,341 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/ConsumerWorkService.h" +#include "amqpClient/api/Consumer.h" +#include "amqpClient/api/Envelope.h" +#include "amqpClient/ConsumerDispatcher.h" +#include "Exception/CCafException.h" + +using namespace Caf::AmqpClient; + +ConsumerDispatcher::ConsumerDispatcher() : + _isInitialized(false), + _isShuttingDown(false), + CAF_CM_INIT_LOG("ConsumerDispatcher") { + CAF_CM_INIT_THREADSAFE; +} + +ConsumerDispatcher::~ConsumerDispatcher() { +} + +void ConsumerDispatcher::init(const SmartPtrConsumerWorkService& workService) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(workService); + _workService = workService; + _isInitialized = true; +} + +void ConsumerDispatcher::quiesce() { + CAF_CM_LOCK_UNLOCK; + _isShuttingDown = true; +} + +void ConsumerDispatcher::lock() { + CAF_CM_LOCK; +} + +void ConsumerDispatcher::unlock() { + CAF_CM_UNLOCK; +} + +void ConsumerDispatcher::addConsumer( + const std::string& consumerTag, + const SmartPtrConsumer& consumer) { + CAF_CM_FUNCNAME("addConsumer"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(consumerTag); + CAF_CM_VALIDATE_SMARTPTR(consumer); + + SmartPtrDispatcherTask consumerTask; + consumerTask.CreateInstance(); + consumerTask->init(consumerTag, consumer); + if (_consumers.insert( + ConsumerMap::value_type( + consumerTag, + ConsumerItem(consumer, consumerTask))).second) { + _workService->addWork(consumerTask); + } else { + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "A consumer with consumer tag '%s' is already registered", + consumerTag.c_str()); + } +} + +void ConsumerDispatcher::removeConsumer( + const std::string& consumerTag) { + CAF_CM_FUNCNAME_VALIDATE("removeConsumer"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(consumerTag); + + ConsumerMap::iterator consumer = _consumers.find(consumerTag); + if (consumer != _consumers.end()) { + (consumer->second).second->term(); + _consumers.erase(consumer); + } +} + +SmartPtrConsumer ConsumerDispatcher::getConsumer( + const std::string& consumerTag) { + CAF_CM_FUNCNAME_VALIDATE("getConsumer"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(consumerTag); + SmartPtrConsumer result; + ConsumerMap::iterator consumer = _consumers.find(consumerTag); + if (consumer != _consumers.end()) { + result = (consumer->second).first; + } + return result; +} + +void ConsumerDispatcher::handleShutdown(SmartPtrCCafException exception) { + CAF_CM_FUNCNAME("handleShutdown"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + for (TMapIterator consumerItem(_consumers); + consumerItem; + consumerItem++) { + try { + consumerItem->second->term(); + consumerItem->first->handleShutdown(consumerItem.getKey(), exception); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + _consumers.clear(); +} + +void ConsumerDispatcher::handleConsumeOk(const std::string& consumerTag) { + CAF_CM_FUNCNAME("handleConsumeOk"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + try { + if (!_isShuttingDown) { + SmartPtrDispatcherWorkItem workItem; + workItem.CreateInstance(); + workItem->init(DISPATCH_ITEM_METHOD_HANDLE_CONSUME_OK); + getConsumerItem(consumerTag).second->addWorkItem(workItem); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void ConsumerDispatcher::handleCancelOk(const std::string& consumerTag) { + CAF_CM_FUNCNAME("handleCancelOk"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + try { + if (!_isShuttingDown) { + SmartPtrDispatcherWorkItem workItem; + workItem.CreateInstance(); + workItem->init(DISPATCH_ITEM_METHOD_HANDLE_CANCEL_OK); + getConsumerItem(consumerTag).second->addWorkItem(workItem); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void ConsumerDispatcher::handleRecoverOk() { + CAF_CM_FUNCNAME("handleRecoverOk"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + try { + if (!_isShuttingDown) { + for (TMapIterator consumerItem(_consumers); + consumerItem; + consumerItem++) { + if (!_isShuttingDown) { + SmartPtrDispatcherWorkItem workItem; + workItem.CreateInstance(); + workItem->init(DISPATCH_ITEM_METHOD_HANDLE_RECOVER_OK); + consumerItem->second->addWorkItem(workItem); + } + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void ConsumerDispatcher::handleDelivery( + const std::string& consumerTag, + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME("handleDelivery"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + try { + if (!_isShuttingDown) { + SmartPtrDispatcherWorkItem workItem; + workItem.CreateInstance(); + workItem->init( + DISPATCH_ITEM_METHOD_HANDLE_DELIVERY, + envelope, + properties, + body); + getConsumerItem(consumerTag).second->addWorkItem(workItem); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +ConsumerDispatcher::ConsumerItem ConsumerDispatcher::getConsumerItem(const std::string& consumerTag) { + CAF_CM_FUNCNAME("getConsumerItem"); + ConsumerMap::const_iterator consumerItem = _consumers.find(consumerTag); + if (consumerItem == _consumers.end()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Consumer '%s' is not in the collection", + consumerTag.c_str()); + } + return consumerItem->second; +} + +#if (1) // DispatcherWorkItem +ConsumerDispatcher::DispatcherWorkItem::DispatcherWorkItem() : + _method(DISPATCH_ITEM_METHOD_TERMINATE) { +} + +void ConsumerDispatcher::DispatcherWorkItem::init( + const DispatchItemMethod method) { + _method = method; +} + +void ConsumerDispatcher::DispatcherWorkItem::init( + const DispatchItemMethod method, + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + _method = method; + _envelope = envelope; + _properties = properties; + _body = body; +} + +ConsumerDispatcher::DispatchItemMethod ConsumerDispatcher::DispatcherWorkItem::getMethod() const { + return _method; +} + +SmartPtrEnvelope ConsumerDispatcher::DispatcherWorkItem::getEnvelope() const { + return _envelope; +} + +AmqpContentHeaders::SmartPtrBasicProperties ConsumerDispatcher::DispatcherWorkItem::getProperties() const { + return _properties; +} + +SmartPtrCDynamicByteArray ConsumerDispatcher::DispatcherWorkItem::getBody() const { + return _body; +} +#endif + +#if (1) // DispatcherTask +ConsumerDispatcher::DispatcherTask::DispatcherTask() : + _workItemQueue(NULL) { +} + +ConsumerDispatcher::DispatcherTask::~DispatcherTask() { + if (_workItemQueue) { + g_async_queue_unref(_workItemQueue); + } +} + +void ConsumerDispatcher::DispatcherTask::init( + const std::string& consumerTag, + const SmartPtrConsumer& consumer) { + _consumerTag = consumerTag; + _consumer = consumer; + _workItemQueue = g_async_queue_new_full(FreeWorkItem); +} + +void ConsumerDispatcher::DispatcherTask::term() { + SmartPtrDispatcherWorkItem workItem; + workItem.CreateInstance(); + workItem->init(DISPATCH_ITEM_METHOD_TERMINATE); + addWorkItem(workItem); +} + +void ConsumerDispatcher::DispatcherTask::addWorkItem( + const ConsumerDispatcher::SmartPtrDispatcherWorkItem& workItem) { + g_async_queue_push(_workItemQueue, workItem.GetAddRefedInterface()); +} + +bool ConsumerDispatcher::DispatcherTask::run() { + uint32 itemsProcessed = 0; + bool isTerminated = false; + + gpointer data = g_async_queue_try_pop(_workItemQueue); + while (data) { + DispatcherWorkItem *workItemPtr = + reinterpret_cast(data); + SmartPtrDispatcherWorkItem workItem(workItemPtr); + workItemPtr->Release(); + data = NULL; + + switch (workItem->getMethod()) { + case DISPATCH_ITEM_METHOD_HANDLE_CONSUME_OK: + _consumer->handleConsumeOk(_consumerTag); + break; + + case DISPATCH_ITEM_METHOD_HANDLE_CANCEL_OK: + _consumer->handleCancelOk(_consumerTag); + break; + + case DISPATCH_ITEM_METHOD_HANDLE_RECOVER_OK: + _consumer->handleRecoverOk(_consumerTag); + break; + + case DISPATCH_ITEM_METHOD_HANDLE_DELIVERY: + _consumer->handleDelivery( + _consumerTag, + workItemPtr->getEnvelope(), + workItemPtr->getProperties(), + workItemPtr->getBody()); + break; + + case DISPATCH_ITEM_METHOD_TERMINATE: + isTerminated = true; + break; + } + + if (!isTerminated && (++itemsProcessed < DEFAULT_CONSUMER_THREAD_MAX_DELIVERY_COUNT)) { + data = g_async_queue_try_pop(_workItemQueue); + } + } + + return isTerminated; +} + +void ConsumerDispatcher::DispatcherTask::FreeWorkItem(gpointer data) { + CAF_CM_STATIC_FUNC_LOG_ONLY("ConsumerDispatcher::DispatcherTask","FreeWorkItem"); + DispatcherWorkItem *workItemPtr = + reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA1("Clearing workItem [method=%d]", workItemPtr->getMethod()); + workItemPtr->Release(); +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerWorkService.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerWorkService.cpp new file mode 100644 index 000000000..f5533596a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/ConsumerWorkService.cpp @@ -0,0 +1,49 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CManagedThreadPool.h" +#include "amqpClient/ConsumerWorkService.h" + +using namespace Caf::AmqpClient; + +ConsumerWorkService::ConsumerWorkService() : + _isInitialized(false), + CAF_CM_INIT_LOG("ConsumerWorkService") { +} + +ConsumerWorkService::~ConsumerWorkService() { + CAF_CM_FUNCNAME("~ConsumerWorkService"); + try { + if (_threadPool) { + _threadPool->term(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void ConsumerWorkService::init(const SmartPtrCManagedThreadPool& threadPool) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_threadPool); + _threadPool = threadPool; +} + +void ConsumerWorkService::addWork(const CManagedThreadPool::SmartPtrIThreadTask& task) { + CAF_CM_FUNCNAME_VALIDATE("addWork"); + CAF_CM_PRECOND_ISINITIALIZED(_threadPool); + _threadPool->enqueue(task); +} + +void ConsumerWorkService::notifyConnectionClosed() { + if (!_threadPool.IsNull()) { + _threadPool->term(); + _threadPool = NULL; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpClient.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpClient.cpp new file mode 100644 index 000000000..1792279d1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpClient.cpp @@ -0,0 +1,34 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "amqpClient/api/amqpClient.h" + +namespace Caf { +namespace AmqpClient { + const char* DEFAULT_USER = "guest"; + const char* DEFAULT_PASS ="guest"; + const char* DEFAULT_VHOST = "/"; + const char* DEFAULT_PROTOCOL = "amqp"; + const char* DEFAULT_HOST = "localhost"; +}} + +#ifdef WIN32 +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + return TRUE; +} +#endif + +/** + * @todo Make number of frames processed per thread slice configurable + * @todo Make # threads in the connection thrad pool configurable + * @todo Make thread pool refresh rate configurable + * @todo Create stats module so we can figure out how to turn performance + */ +class amqpClientTodo { +}; diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQExceptions.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQExceptions.cpp new file mode 100644 index 000000000..fbf74bde0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQExceptions.cpp @@ -0,0 +1,34 @@ +/* + * Created on: May 3, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "amqpClient/api/AMQExceptions.h" + +using namespace Caf::AmqpClient::AmqpExceptions; + +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpTimeoutException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpNoMemoryException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpInvalidHandleException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpInvalidArgumentException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpWrongStateException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpTooManyChannelsException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpQueueFullException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpFrameTooLargeException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpIoErrorException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpProtocolErrorException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpUnimplementedException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(AmqpIoInterruptedException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(UnexpectedFrameException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(UnknownClassOrMethodException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ConnectionClosedException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ChannelClosedException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ConnectionUnexpectedCloseException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ConnectionClosedByIOException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ChannelClosedByServerException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ChannelClosedByShutdownException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ChannelClosedByUserException); diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp new file mode 100644 index 000000000..f4abf6f6a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.cpp @@ -0,0 +1,93 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/amqpImpl/IContentHeader.h" +#include "amqpClient/amqpImpl/IMethod.h" +#include "Exception/CCafException.h" +#include "AMQPImpl.h" +#include "amqpImplInt.h" + +namespace Caf { namespace AmqpClient { +typedef Caf::AmqpClient::SmartPtrIMethod (*FN_CREATOR)(); +typedef std::map MethodCreatorMap; +typedef MethodCreatorMap::value_type creatorEntry; +}} + +using namespace Caf::AmqpClient; + +const creatorEntry creatorEntries[] = { + creatorEntry(AMQP_BASIC_GET_OK_METHOD, BasicGetOkMethod::Creator), + creatorEntry(AMQP_BASIC_GET_EMPTY_METHOD, BasicGetEmptyMethod::Creator), + creatorEntry(AMQP_BASIC_CONSUME_OK_METHOD, BasicConsumeOkMethod::Creator), + creatorEntry(AMQP_BASIC_DELIVER_METHOD, BasicDeliverMethod::Creator), + creatorEntry(AMQP_BASIC_CANCEL_OK_METHOD, BasicCancelOkMethod::Creator), + creatorEntry(AMQP_BASIC_RETURN_METHOD, BasicReturnMethod::Creator), + creatorEntry(AMQP_BASIC_RECOVER_OK_METHOD, BasicRecoverOkMethod::Creator), + creatorEntry(AMQP_BASIC_QOS_OK_METHOD, BasicQosOkMethod::Creator), + creatorEntry(AMQP_CHANNEL_OPEN_OK_METHOD, ChannelOpenOkMethod::Creator), + creatorEntry(AMQP_CHANNEL_CLOSE_OK_METHOD, ChannelCloseOkFromServerMethod::Creator), + creatorEntry(AMQP_CHANNEL_CLOSE_METHOD, ChannelCloseMethod::Creator), + creatorEntry(AMQP_EXCHANGE_DECLARE_OK_METHOD, ExchangeDeclareOkMethod::Creator), + creatorEntry(AMQP_EXCHANGE_DELETE_OK_METHOD, ExchangeDeleteOkMethod::Creator), + creatorEntry(AMQP_QUEUE_DECLARE_OK_METHOD, QueueDeclareOkMethod::Creator), + creatorEntry(AMQP_QUEUE_DELETE_OK_METHOD, QueueDeleteOkMethod::Creator), + creatorEntry(AMQP_QUEUE_PURGE_OK_METHOD, QueuePurgeOkMethod::Creator), + creatorEntry(AMQP_QUEUE_BIND_OK_METHOD, QueueBindOkMethod::Creator), + creatorEntry(AMQP_QUEUE_UNBIND_OK_METHOD, QueueUnbindOkMethod::Creator) + }; + +const MethodCreatorMap creatorMap( + creatorEntries, + creatorEntries + (sizeof(creatorEntries)/sizeof(creatorEntries[0]))); + +SmartPtrIMethod AMQPImpl::methodFromFrame(const amqp_method_t * const method) { + CAF_CM_STATIC_FUNC("AMQPImpl", "methodFromFrame"); + CAF_CM_VALIDATE_PTR(method); + + SmartPtrIMethod methodObj; + MethodCreatorMap::const_iterator methodCreator = creatorMap.find(method->id); + if (methodCreator != creatorMap.end()) { + methodObj = (*(methodCreator->second))(); + } else { + const uint16 classId = (uint16)((method->id & 0xffff0000) >> 16); + const uint16 methodId = (uint16)(method->id & 0x0000ffff); + CAF_CM_EXCEPTIONEX_VA2( + AmqpExceptions::UnknownClassOrMethodException, + 0, + "[class=0x%04X][id=0x%04X]", + classId, + methodId); + } + methodObj->init(method); + return methodObj; +} + +SmartPtrIContentHeader AMQPImpl::headerFromFrame( + const SmartPtrCAmqpFrame& frame) { + CAF_CM_STATIC_FUNC("AMQPImpl", "headerFromFrame"); + CAF_CM_VALIDATE_PTR(frame); + + SmartPtrIContentHeader header; + if (frame->getHeaderClassId() == AMQP_BASIC_CLASS) { + SmartPtrBasicProperties propsObj; + propsObj.CreateInstance(); + propsObj->init(frame); + header = propsObj; + } else { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnknownClassOrMethodException, + 0, + "[class=0x%04X]", + frame->getHeaderClassId()); + } + + return header; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.h new file mode 100644 index 000000000..274727588 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AMQPImpl.h @@ -0,0 +1,42 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPIMPL_H_ +#define AMQPIMPL_H_ + + +#include "amqpClient/amqpImpl/IContentHeader.h" +#include "amqpClient/amqpImpl/IMethod.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief A set of helpers to convert c-api data structures into C++ objects + */ +class AMQPImpl { +public: + /** + * @brief Convert a c-api method structure into the appropriate IMethod object + * @param method c-api method data + * @return IMethod object + */ + static SmartPtrIMethod methodFromFrame(const amqp_method_t * const method); + + /** + * @brief Convert a c-api properties structure into the appropriate IContentHedaer object + * @param properties c-api properties data + * @return IContentHeader object + */ + static SmartPtrIContentHeader headerFromFrame(const SmartPtrCAmqpFrame& frame); +}; + +}} + +#endif /* AMQPIMPL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpClientImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpClientImpl.cpp new file mode 100644 index 000000000..d3b25d282 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpClientImpl.cpp @@ -0,0 +1,181 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/amqpImpl/FieldImpl.h" +#include "amqpClient/api/amqpClient.h" +#include "Exception/CCafException.h" + +using namespace Caf; +using namespace Caf::AmqpClient; + +void tableAddField( + const std::string key, + const AmqpClient::Field::AmqpFieldType type, + GVariant* variant, + AmqpClient::SmartPtrTable& table) { + CAF_CM_STATIC_FUNC_LOG("AmqpClient", "tableAddField"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_VALIDATE_PTR(variant); + CAF_CM_VALIDATE_SMARTPTR(table); + + AmqpClient::SmartPtrFieldImpl field; + field.CreateInstance(); + field->setTypeAndValue(type, variant); + if (!table->insert(std::make_pair(key, field)).second) { + g_variant_unref(variant); + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "Duplicate table entry '%s'", + key.c_str()); + } +} + +void AmqpClient::tableAddBoolean( + const std::string key, + const bool val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_BOOLEAN, + g_variant_new_boolean(val), + table); +} + +void AmqpClient::tableAddInt8( + const std::string key, + const int8 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_I8, + g_variant_new_byte(val), + table); +} + +void AmqpClient::tableAddUint8( + const std::string key, + const uint8 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_U8, + g_variant_new_byte(val), + table); +} + +void AmqpClient::tableAddInt16( + const std::string key, + const int16 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_I16, + g_variant_new_int16(val), + table); +} + +void AmqpClient::tableAddUint16( + const std::string key, + const uint16 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_U16, + g_variant_new_uint16(val), + table); +} + +void AmqpClient::tableAddInt32( + const std::string key, + const int32 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_I32, + g_variant_new_int32(val), + table); +} + +void AmqpClient::tableAddUint32( + const std::string key, + const uint32 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_U32, + g_variant_new_uint32(val), + table); +} + +void AmqpClient::tableAddInt64( + const std::string key, + const int64 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_I64, + g_variant_new_int64(val), + table); +} + +void AmqpClient::tableAddUint64( + const std::string key, + const uint64 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_U64, + g_variant_new_uint64(val), + table); +} + +void AmqpClient::tableAddFloat( + const std::string key, + const float val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_F32, + g_variant_new_double(val), + table); +} + +void AmqpClient::tableAddDouble( + const std::string key, + const double val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_F64, + g_variant_new_double(val), + table); +} + +void AmqpClient::tableAddUtf8( + const std::string key, + const std::string& val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_UTF8, + g_variant_new_string(val.c_str()), + table); +} + +void AmqpClient::tableAddTimestamp( + const std::string key, + const uint64 val, + SmartPtrTable& table) { + tableAddField( + key, + AmqpClient::Field::AMQP_FIELD_TYPE_TIMESTAMP, + g_variant_new_uint64(val), + table); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpContentHeadersImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpContentHeadersImpl.cpp new file mode 100644 index 000000000..0fc59888c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/AmqpContentHeadersImpl.cpp @@ -0,0 +1,76 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "amqpClient/api/amqpClient.h" + +using namespace Caf::AmqpClient; + +const uint32 AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG = 0x8000; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG = 0x4000; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG = 0x2000; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG = 0x1000; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG = 0x800; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG = 0x400; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG = 0x200; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG = 0x100; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG = 0x80; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG = 0x40; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG = 0x20; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG = 0x10; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG = 0x8; +const uint32 AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG = 0x4; + +AmqpContentHeaders::SmartPtrBasicProperties AmqpContentHeaders::createBasicProperties() { + Caf::AmqpClient::SmartPtrBasicProperties props; + props.CreateInstance(); + props->init(); + SmartPtrBasicProperties result; + result.QueryInterface(props); + return result; +} + +AmqpContentHeaders::SmartPtrBasicProperties AmqpContentHeaders::createBasicProperties( + const uint32 flags, + const std::string& contentType, + const std::string& contentEncoding, + const SmartPtrTable& headers, + const uint8 deliveryMode, + const uint8 priority, + const std::string& correlationId, + const std::string& replyTo, + const std::string& expiration, + const std::string& messageId, + const uint64 timestamp, + const std::string& type, + const std::string& userId, + const std::string& appId, + const std::string& clusterId) { + Caf::AmqpClient::SmartPtrBasicProperties props; + props.CreateInstance(); + props->init( + flags, + contentType, + contentEncoding, + headers, + deliveryMode, + priority, + correlationId, + replyTo, + expiration, + messageId, + timestamp, + type, + userId, + appId, + clusterId); + SmartPtrBasicProperties result; + result.QueryInterface(props); + return result; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.cpp new file mode 100644 index 000000000..41e0b4353 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicAckMethod.cpp @@ -0,0 +1,47 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/BasicAckMethod.h" + +using namespace Caf::AmqpClient; + +BasicAckMethod::BasicAckMethod() : + _isInitialized(false), + _deliveryTag(0), + _ackMultiple(false), + CAF_CM_INIT("BasicAckMethod") { +} + +BasicAckMethod::~BasicAckMethod() { +} + +void BasicAckMethod::init( + const uint64 deliveryTag, + const bool ackMultiple) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _deliveryTag = deliveryTag; + _ackMultiple = ackMultiple; + _isInitialized = true; +} + +std::string BasicAckMethod::getMethodName() const { + return "basic.ack"; +} + +AMQPStatus BasicAckMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicAck( + channel, + _deliveryTag, + _ackMultiple); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.cpp new file mode 100644 index 000000000..d860d9acf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelMethod.cpp @@ -0,0 +1,41 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/BasicCancelMethod.h" + +using namespace Caf::AmqpClient; + +BasicCancelMethod::BasicCancelMethod() : + _isInitialized(false), + CAF_CM_INIT("BasicCancelMethod") { +} + +BasicCancelMethod::~BasicCancelMethod() { +} + +void BasicCancelMethod::init( + const std::string& consumerTag) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _consumerTag = consumerTag; + _isInitialized = true; +} + +std::string BasicCancelMethod::getMethodName() const { + return "basic.cancel"; +} + +AMQPStatus BasicCancelMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicCancel(channel, _consumerTag, false); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.cpp new file mode 100644 index 000000000..2f224ee1b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.cpp @@ -0,0 +1,31 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicCancelOkMethod.h" + +using namespace Caf::AmqpClient; + +BasicCancelOkMethod::BasicCancelOkMethod() : + CAF_CM_INIT("BasicCancelOkMethod") { +} + +BasicCancelOkMethod::~BasicCancelOkMethod() { +} + +void BasicCancelOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_CANCEL_OK_METHOD == method->id); + const amqp_basic_cancel_ok_t * const decoded = + reinterpret_cast(method->decoded); + _consumerTag = AMQUtil::amqpBytesToString(&decoded->consumer_tag); +} + +std::string BasicCancelOkMethod::getConsumerTag() { + return _consumerTag; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.h new file mode 100644 index 000000000..0288a01a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicCancelOkMethod.h @@ -0,0 +1,47 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICCANCELOKMETHOD_H_ +#define BASICCANCELOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.cancel-ok + */ +class BasicCancelOkMethod : + public TMethodImpl, + public AmqpMethods::Basic::CancelOk { + METHOD_DECL( + AmqpMethods::Basic::CancelOk, + AMQP_BASIC_CANCEL_OK_METHOD, + "basic.cancel-ok", + false) + +public: + BasicCancelOkMethod(); + virtual ~BasicCancelOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::CancelOk + std::string getConsumerTag(); + +private: + std::string _consumerTag; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicCancelOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicCancelOkMethod); + +}} + +#endif /* BASICCANCELOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.cpp new file mode 100644 index 000000000..55063d545 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeMethod.cpp @@ -0,0 +1,61 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/amqpClient.h" +#include "amqpClient/amqpImpl/BasicConsumeMethod.h" + +using namespace Caf::AmqpClient; + +BasicConsumeMethod::BasicConsumeMethod() : + _isInitialized(false), + _noLocal(false), + _noAck(false), + _exclusive(false), + CAF_CM_INIT("BasicConsumeMethod") { +} + +BasicConsumeMethod::~BasicConsumeMethod() { +} + +void BasicConsumeMethod::init( + const std::string& queue, + const std::string& consumerTag, + const bool noLocal, + const bool noAck, + const bool exclusive, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _queue = queue; + _consumerTag = consumerTag; + _noLocal = noLocal; + _noAck = noAck; + _exclusive = exclusive; + _isInitialized = true; +} + +std::string BasicConsumeMethod::getMethodName() const { + return "basic.consume"; +} + +AMQPStatus BasicConsumeMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicConsume( + channel, + _queue, + _consumerTag, + _noLocal, + _noAck, + _exclusive, + false, + NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.cpp new file mode 100644 index 000000000..f0ce92314 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.cpp @@ -0,0 +1,31 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicConsumeOkMethod.h" + +using namespace Caf::AmqpClient; + +BasicConsumeOkMethod::BasicConsumeOkMethod() : + CAF_CM_INIT("BasicConsumeOkMethod") { +} + +BasicConsumeOkMethod::~BasicConsumeOkMethod() { +} + +void BasicConsumeOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_CONSUME_OK_METHOD == method->id); + const amqp_basic_consume_ok_t * const decoded = + reinterpret_cast(method->decoded); + _consumerTag = AMQUtil::amqpBytesToString(&decoded->consumer_tag); +} + +std::string BasicConsumeOkMethod::getConsumerTag() { + return _consumerTag; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.h new file mode 100644 index 000000000..569d2fba4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicConsumeOkMethod.h @@ -0,0 +1,47 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICCONSUMEOKMETHOD_H_ +#define BASICCONSUMEOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.consume-ok + */ +class BasicConsumeOkMethod : + public TMethodImpl, + public AmqpMethods::Basic::ConsumeOk { + METHOD_DECL( + AmqpMethods::Basic::ConsumeOk, + AMQP_BASIC_CONSUME_OK_METHOD, + "basic.consume-ok", + false) + +public: + BasicConsumeOkMethod(); + virtual ~BasicConsumeOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::ConsumeOk + std::string getConsumerTag(); + +private: + std::string _consumerTag; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicConsumeOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicConsumeOkMethod); + +}} + +#endif /* BASICCONSUMEOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.cpp new file mode 100644 index 000000000..78148ee6c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.cpp @@ -0,0 +1,53 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicDeliverMethod.h" + +using namespace Caf::AmqpClient; + +BasicDeliverMethod::BasicDeliverMethod() : + _deliveryTag(0), + _redelivered(false), + CAF_CM_INIT("BasicDeliverMethod") { +} + +BasicDeliverMethod::~BasicDeliverMethod() { +} + +void BasicDeliverMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_DELIVER_METHOD == method->id); + const amqp_basic_deliver_t * const decoded = + reinterpret_cast(method->decoded); + _consumerTag = AMQUtil::amqpBytesToString(&decoded->consumer_tag); + _deliveryTag = decoded->delivery_tag; + _exchange = AMQUtil::amqpBytesToString(&decoded->exchange); + _redelivered = decoded->redelivered; + _routingKey = AMQUtil::amqpBytesToString(&decoded->routing_key); +} + +std::string BasicDeliverMethod::getConsumerTag() { + return _consumerTag; +} + +uint64 BasicDeliverMethod::getDeliveryTag() { + return _deliveryTag; +} + +std::string BasicDeliverMethod::getExchange() { + return _exchange; +} + +bool BasicDeliverMethod::getRedelivered() { + return _redelivered; +} + +std::string BasicDeliverMethod::getRoutingKey() { + return _routingKey; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.h new file mode 100644 index 000000000..415dce072 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicDeliverMethod.h @@ -0,0 +1,55 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICDELIVERMETHOD_H_ +#define BASICDELIVERMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.deliver + */ +class BasicDeliverMethod : + public TMethodImpl, + public AmqpMethods::Basic::Deliver { + METHOD_DECL( + AmqpMethods::Basic::Deliver, + AMQP_BASIC_DELIVER_METHOD, + "basic.deliver", + true) + +public: + BasicDeliverMethod(); + virtual ~BasicDeliverMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::Deliver + std::string getConsumerTag(); + uint64 getDeliveryTag(); + std::string getExchange(); + bool getRedelivered(); + std::string getRoutingKey(); + +private: + std::string _consumerTag; + uint64 _deliveryTag; + std::string _exchange; + bool _redelivered; + std::string _routingKey; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicDeliverMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicDeliverMethod); + +}} + +#endif /* BASICDELIVERMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.cpp new file mode 100644 index 000000000..c4a805fd4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.cpp @@ -0,0 +1,24 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicGetEmptyMethod.h" + +using namespace Caf::AmqpClient; + +BasicGetEmptyMethod::BasicGetEmptyMethod() : + CAF_CM_INIT("BasicGetEmptyMethod") { +} + +BasicGetEmptyMethod::~BasicGetEmptyMethod() { +} + +void BasicGetEmptyMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_GET_EMPTY_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.h new file mode 100644 index 000000000..f9bfeb527 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetEmptyMethod.h @@ -0,0 +1,45 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICGETEMPTYMETHOD_H_ +#define BASICGETEMPTYMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.get-empty + */ +class BasicGetEmptyMethod : + public TMethodImpl, + public AmqpMethods::Basic::GetEmpty { + METHOD_DECL( + AmqpMethods::Basic::GetEmpty, + AMQP_BASIC_GET_EMPTY_METHOD, + "basic.get-empty", + false) + +public: + BasicGetEmptyMethod(); + virtual ~BasicGetEmptyMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::GetEmpty + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicGetEmptyMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicGetEmptyMethod); + +}} + +#endif /* BASICGETEMPTYMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.cpp new file mode 100644 index 000000000..47d981b66 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetMethod.cpp @@ -0,0 +1,44 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/BasicGetMethod.h" + +using namespace Caf::AmqpClient; + +BasicGetMethod::BasicGetMethod() : + _isInitialized(false), + _noAck(false), + CAF_CM_INIT("BasicGetMethod") { +} + +BasicGetMethod::~BasicGetMethod() { +} + +void BasicGetMethod::init( + const std::string& queue, + const bool noAck) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _queue = queue; + _noAck = noAck; + _isInitialized = true; +} + +std::string BasicGetMethod::getMethodName() const { + return "basic.get"; +} + +AMQPStatus BasicGetMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicGet(channel, _queue, _noAck); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.cpp new file mode 100644 index 000000000..29081e379 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.cpp @@ -0,0 +1,54 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicGetOkMethod.h" + +using namespace Caf::AmqpClient; + +BasicGetOkMethod::BasicGetOkMethod() : + _deliveryTag(0), + _messageCount(0), + _redelivered(false), + CAF_CM_INIT("BasicGetOkMethod") { +} + +BasicGetOkMethod::~BasicGetOkMethod() { +} + +void BasicGetOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_GET_OK_METHOD == method->id); + const amqp_basic_get_ok_t * const decoded = + reinterpret_cast(method->decoded); + _deliveryTag = decoded->delivery_tag; + _exchange = AMQUtil::amqpBytesToString(&decoded->exchange); + _messageCount = decoded->message_count; + _redelivered = decoded->redelivered; + _routingKey = AMQUtil::amqpBytesToString(&decoded->routing_key); +} + +uint64 BasicGetOkMethod::getDeliveryTag() { + return _deliveryTag; +} + +std::string BasicGetOkMethod::getExchange() { + return _exchange; +} + +uint32 BasicGetOkMethod::getMessageCount() { + return _messageCount; +} + +bool BasicGetOkMethod::getRedelivered() { + return _redelivered; +} + +std::string BasicGetOkMethod::getRoutingKey() { + return _routingKey; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.h new file mode 100644 index 000000000..a41e981cb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicGetOkMethod.h @@ -0,0 +1,57 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICGETOKMETHOD_H_ +#define BASICGETOKMETHOD_H_ + +#include "amqpClient/api/AmqpMethods.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.get-ok + */ +class BasicGetOkMethod : + public TMethodImpl, + public AmqpMethods::Basic::GetOk { + METHOD_DECL( + AmqpMethods::Basic::GetOk, + AMQP_BASIC_GET_OK_METHOD, + "basic.get-ok", + true) + +public: + BasicGetOkMethod(); + virtual ~BasicGetOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::GetOk + uint64 getDeliveryTag(); + std::string getExchange(); + uint32 getMessageCount(); + bool getRedelivered(); + std::string getRoutingKey(); + +private: + uint64 _deliveryTag; + std::string _exchange; + uint32 _messageCount; + bool _redelivered; + std::string _routingKey; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicGetOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicGetOkMethod); + +}} + +#endif /* BASICGETOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicProperties.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicProperties.cpp new file mode 100644 index 000000000..f0da9da5d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicProperties.cpp @@ -0,0 +1,488 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpFrame.h" +#include "amqpClient/api/amqpClient.h" +#include "Exception/CCafException.h" +#include "amqpClient/amqpImpl/BasicProperties.h" + +using namespace Caf::AmqpClient; + +BasicProperties::BasicProperties() : + _isInitialized(false), + _flags(0), + _bodySize(0), + _deliveryMode(0), + _priority(0), + _timestamp(0), + CAF_CM_INIT("BasicProperties") { +} + +BasicProperties::~BasicProperties() { +} + +void BasicProperties::init() { + _isInitialized = true; +} + +void BasicProperties::init( + const uint32 flags, + const std::string& contentType, + const std::string& contentEncoding, + const SmartPtrTable& headers, + const uint8 deliveryMode, + const uint8 priority, + const std::string& correlationId, + const std::string& replyTo, + const std::string& expiration, + const std::string& messageId, + const uint64 timestamp, + const std::string& type, + const std::string& userId, + const std::string& appId, + const std::string& clusterId) { + CAF_CM_FUNCNAME_VALIDATE("init"); + + _flags = flags; + if (flags & AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG) { + CAF_CM_VALIDATE_STRING(contentType); + _contentType = contentType; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG) { + CAF_CM_VALIDATE_STRING(contentEncoding); + _contentEncoding = contentEncoding; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG) { + CAF_CM_VALIDATE_SMARTPTR(headers); + _headers = headers; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG) { + _deliveryMode = deliveryMode; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG) { + _priority = priority; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG) { + _correlationId = correlationId; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG) { + _replyTo = replyTo; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG) { + _expiration = expiration; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG) { + _messageId = messageId; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG) { + _timestamp = timestamp; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG) { + _type = type; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG) { + _userId = userId; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG) { + _appId = appId; + } + if (flags & AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG) { + _clusterId = clusterId; + } + _isInitialized = true; +} + +void BasicProperties::init(const SmartPtrCAmqpFrame& frame) { + CAF_CM_FUNCNAME("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(frame); + + if (frame->getFrameType() != AMQP_FRAME_HEADER) { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnexpectedFrameException, + 0, + "Expected an AMQP header frame. Received type %d", + frame->getFrameType()); + } + + if (frame->getHeaderClassId() != AMQP_BASIC_CLASS) { + CAF_CM_EXCEPTIONEX_VA1( + AmqpExceptions::UnknownClassOrMethodException, + 0, + "[class=0x%04X]", + frame->getHeaderClassId()); + } + + const amqp_basic_properties_t * const decoded = frame->getHeaderProperties(); + _bodySize = frame->getHeaderBodySize(); + const amqp_flags_t flags = decoded->_flags; + + if (flags & AMQP_BASIC_CONTENT_TYPE_FLAG) { + _contentType = AMQUtil::amqpBytesToString(&decoded->content_type); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG; + } + if (flags & AMQP_BASIC_CONTENT_ENCODING_FLAG) { + _contentEncoding = AMQUtil::amqpBytesToString(&decoded->content_encoding); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG; + } + if (flags & AMQP_BASIC_HEADERS_FLAG) { + _headers = AMQUtil::amqpApiTableToTableObj(&decoded->headers); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG; + } + if (flags & AMQP_BASIC_DELIVERY_MODE_FLAG) { + _deliveryMode = decoded->delivery_mode; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG; + } + if (flags & AMQP_BASIC_PRIORITY_FLAG) { + _priority = decoded->priority; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG; + } + if (flags & AMQP_BASIC_CORRELATION_ID_FLAG) { + _correlationId = AMQUtil::amqpBytesToString(&decoded->correlation_id); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG; + } + if (flags & AMQP_BASIC_REPLY_TO_FLAG) { + _replyTo = AMQUtil::amqpBytesToString(&decoded->reply_to); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG; + } + if (flags & AMQP_BASIC_EXPIRATION_FLAG) { + _expiration = AMQUtil::amqpBytesToString(&decoded->expiration); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG; + } + if (flags & AMQP_BASIC_MESSAGE_ID_FLAG) { + _messageId = AMQUtil::amqpBytesToString(&decoded->message_id); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG; + } + if (flags & AMQP_BASIC_TIMESTAMP_FLAG) { + _timestamp = decoded->timestamp; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG; + } + if (flags & AMQP_BASIC_TYPE_FLAG) { + _type = AMQUtil::amqpBytesToString(&decoded->type); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG; + } + if (flags & AMQP_BASIC_USER_ID_FLAG) { + _userId = AMQUtil::amqpBytesToString(&decoded->user_id); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG; + } + if (flags & AMQP_BASIC_APP_ID_FLAG) { + _appId = AMQUtil::amqpBytesToString(&decoded->app_id); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG; + } + if (flags & AMQP_BASIC_CLUSTER_ID_FLAG) { + _clusterId = AMQUtil::amqpBytesToString(&decoded->cluster_id); + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG; + } + _isInitialized = true; +} + +bool BasicProperties::areHeadersAvailable() { + return (_flags & AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG); +} + +void BasicProperties::getAsApiProperties(amqp_basic_properties_t& properties) { + CAF_CM_FUNCNAME_VALIDATE("getAsApiProperties"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + memset(&properties, 0, sizeof(properties)); + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG) { + properties.content_type.len = _contentType.length(); + properties.content_type.bytes = const_cast(_contentType.c_str()); + properties._flags |= AMQP_BASIC_CONTENT_TYPE_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG) { + properties.content_encoding.len = _contentEncoding.length(); + properties.content_encoding.bytes = const_cast(_contentEncoding.c_str()); + properties._flags |= AMQP_BASIC_CONTENT_ENCODING_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG) { + AMQUtil::amqpTableObjToApiTable(_headers, properties.headers); + properties._flags |= AMQP_BASIC_HEADERS_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG) { + properties.delivery_mode = _deliveryMode; + properties._flags |= AMQP_BASIC_DELIVERY_MODE_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG) { + properties.priority = _priority; + properties._flags |= AMQP_BASIC_PRIORITY_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG) { + properties.correlation_id.len = _correlationId.length(); + properties.correlation_id.bytes = const_cast(_correlationId.c_str()); + properties._flags |= AMQP_BASIC_CORRELATION_ID_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG) { + properties.reply_to.len = _replyTo.length(); + properties.reply_to.bytes = const_cast(_replyTo.c_str()); + properties._flags |= AMQP_BASIC_REPLY_TO_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG) { + properties.expiration.len = _expiration.length(); + properties.expiration.bytes = const_cast(_expiration.c_str()); + properties._flags |= AMQP_BASIC_EXPIRATION_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG) { + properties.message_id.len = _messageId.length(); + properties.message_id.bytes = const_cast(_messageId.c_str()); + properties._flags |= AMQP_BASIC_MESSAGE_ID_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG) { + properties.timestamp = _timestamp; + properties._flags |= AMQP_BASIC_TIMESTAMP_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG) { + properties.type.len = _type.length(); + properties.type.bytes = const_cast(_type.c_str()); + properties._flags |= AMQP_BASIC_TYPE_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG) { + properties.user_id.len = _userId.length(); + properties.user_id.bytes = const_cast(_userId.c_str()); + properties._flags |= AMQP_BASIC_USER_ID_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG) { + properties.app_id.len = _appId.length(); + properties.app_id.bytes = const_cast(_appId.c_str()); + properties._flags |= AMQP_BASIC_APP_ID_FLAG; + } + if (_flags & AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG) { + properties.cluster_id.len = _clusterId.length(); + properties.cluster_id.bytes = const_cast(_clusterId.c_str()); + properties._flags |= AMQP_BASIC_CLUSTER_ID_FLAG; + } +} + +uint16 BasicProperties::getClassId() { + return AMQP_BASIC_CLASS; +} + +std::string BasicProperties::getClassName() { + return "basic"; +} + +uint64 BasicProperties::getBodySize() { + return _bodySize; +} + +uint32 BasicProperties::getFlags() { + CAF_CM_FUNCNAME_VALIDATE("getFlags"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _flags; +} + +std::string BasicProperties::getContentType() { + CAF_CM_FUNCNAME_VALIDATE("getContentType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG, + "contentType"); + return _contentType; +} + +std::string BasicProperties::getContentEncoding() { + CAF_CM_FUNCNAME_VALIDATE("getContentType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG, + "contentEncoding"); + return _contentEncoding; +} + +SmartPtrTable BasicProperties::getHeaders() { + CAF_CM_FUNCNAME_VALIDATE("getHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG, + "headers"); + return _headers; +} + +uint8 BasicProperties::getDeliveryMode() { + CAF_CM_FUNCNAME_VALIDATE("getDeliveryMode"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG, + "deliveryMode"); + return _deliveryMode; +} + +uint8 BasicProperties::getPriority() { + CAF_CM_FUNCNAME_VALIDATE("getPriority"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG, + "priority"); + return _priority; +} + +std::string BasicProperties::getCorrelationId() { + CAF_CM_FUNCNAME_VALIDATE("getCorrelationId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG, + "correlationId"); + return _correlationId; +} + +std::string BasicProperties::getReplyTo() { + CAF_CM_FUNCNAME_VALIDATE("getReplyTo"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG, + "replyTo"); + return _replyTo; +} + +std::string BasicProperties::getExpiration() { + CAF_CM_FUNCNAME_VALIDATE("getExpiration"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG, + "expiration"); + return _expiration; +} + +std::string BasicProperties::getMessageId() { + CAF_CM_FUNCNAME_VALIDATE("getMessageId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG, + "messageId"); + return _messageId; +} + +uint64 BasicProperties::getTimestamp() { + CAF_CM_FUNCNAME_VALIDATE("getTimestamp"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG, + "timestamp"); + return _timestamp; +} + +std::string BasicProperties::getType() { + CAF_CM_FUNCNAME_VALIDATE("getType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG, + "type"); + return _type; +} + +std::string BasicProperties::getUserId() { + CAF_CM_FUNCNAME_VALIDATE("getUserId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG, + "userId"); + return _userId; +} + +std::string BasicProperties::getAppId() { + CAF_CM_FUNCNAME_VALIDATE("getAppId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG, + "appId"); + return _appId; +} + +std::string BasicProperties::getClusterId() { + CAF_CM_FUNCNAME_VALIDATE("getClusterId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + ValidatePropertyIsSet( + AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG, + "clusterId"); + return _clusterId; +} + +void BasicProperties::setContentType(const std::string& contentType) { + _contentType = contentType; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG; +} + +void BasicProperties::setContentEncoding(const std::string& contentEncoding) { + _contentEncoding = contentEncoding; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG; +} + +void BasicProperties::setHeaders(const SmartPtrTable& headers) { + if (headers) { + _headers = headers; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG; + } +} + +void BasicProperties::setDeliveryMode(const uint8 deliveryMode) { + _deliveryMode = deliveryMode; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG; +} + +void BasicProperties::setPriority(const uint8 priority) { + _priority = priority; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_PRIORITY_FLAG; +} + +void BasicProperties::setCorrelationId(const std::string& correlationId) { + _correlationId = correlationId; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG; +} + +void BasicProperties::setReplyTo(const std::string& replyTo) { + _replyTo = replyTo; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG; +} + +void BasicProperties::setExpiration(const std::string& expiration) { + _expiration = expiration; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG; +} + +void BasicProperties::setMessageId(const std::string& messageId) { + _messageId = messageId; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG; +} + +void BasicProperties::setTimestamp(const uint64 timestamp) { + _timestamp = timestamp; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG; +} + +void BasicProperties::setType(const std::string& type) { + _type = type; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG; +} + +void BasicProperties::setUserId(const std::string& userId) { + _userId = userId; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG; +} + +void BasicProperties::setAppId(const std::string& appId) { + _appId = appId; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG; +} + +void BasicProperties::setClusterId(const std::string& clusterId) { + _clusterId = clusterId; + _flags |= AmqpContentHeaders::BASIC_PROPERTY_CLUSTER_ID_FLAG; +} + +void BasicProperties::ValidatePropertyIsSet( + const uint32 flag, + const char* propertyName) { + CAF_CM_FUNCNAME("ValidatePropertyIsSet"); + if (!(_flags & flag)) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "The property '%s' is not set", + propertyName); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.cpp new file mode 100644 index 000000000..634cc03c4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicPublishMethod.cpp @@ -0,0 +1,98 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/amqpImpl/BasicPublishMethod.h" + +using namespace Caf::AmqpClient; + +struct MethodBodyFreeData { + SmartPtrCDynamicByteArray body; +}; + +BasicPublishMethod::BasicPublishMethod() : + _isInitialized(false), + _mandatory(false), + _immediate(false), + CAF_CM_INIT("BasicPublishMethod") { +} + +BasicPublishMethod::~BasicPublishMethod() { +} + +void BasicPublishMethod::init( + const std::string& exchange, + const std::string& routingKey, + bool mandatory, + bool immediate, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _exchange = exchange; + _routingKey = routingKey; + _mandatory = mandatory; + _immediate = immediate; + _properties = properties; + _body = body; + _isInitialized = true; +} + +std::string BasicPublishMethod::getMethodName() const { + return "basic.publish"; +} + +AMQPStatus BasicPublishMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + AMQPStatus status = AMQP_ERROR_OK; + + amqp_basic_properties_t properties; + try { + if (_properties) { + SmartPtrBasicProperties propertiesClass; + propertiesClass.QueryInterface(_properties); + propertiesClass->getAsApiProperties(properties); + } else { + memset(&properties, 0, sizeof(properties)); + } + + status = AmqpUtil::AMQP_BasicPublish( + channel, + _exchange, + _routingKey, + _mandatory, + _immediate, + &properties, + _body); + } + CAF_CM_CATCH_ALL; + if (properties.headers.entries) { + AMQUtil::amqpFreeApiTable(&properties.headers); + } + CAF_CM_THROWEXCEPTION; + return status; +} + + + + + + + + + + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.cpp new file mode 100644 index 000000000..79246edc6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosMethod.cpp @@ -0,0 +1,51 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/BasicQosMethod.h" + +using namespace Caf::AmqpClient; + +BasicQosMethod::BasicQosMethod() : + _isInitialized(false), + _prefetchSize(0), + _prefetchCount(0), + _global(false), + CAF_CM_INIT("BasicQosMethod") { +} + +BasicQosMethod::~BasicQosMethod() { +} + +void BasicQosMethod::init( + const uint32 prefetchSize, + const uint16 prefetchCount, + const bool global) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _prefetchSize = prefetchSize; + _prefetchCount = prefetchCount; + _global = global; + _isInitialized = true; +} + +std::string BasicQosMethod::getMethodName() const { + return "basic.qos"; +} + +AMQPStatus BasicQosMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicQos( + channel, + _prefetchSize, + _prefetchCount, + _global); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.cpp new file mode 100644 index 000000000..7d57ad382 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.cpp @@ -0,0 +1,24 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicQosOkMethod.h" + +using namespace Caf::AmqpClient; + +BasicQosOkMethod::BasicQosOkMethod() : + CAF_CM_INIT("BasicQosOkMethod") { +} + +BasicQosOkMethod::~BasicQosOkMethod() { +} + +void BasicQosOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_QOS_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.h new file mode 100644 index 000000000..9e3b99165 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicQosOkMethod.h @@ -0,0 +1,45 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICQOSOKMETHOD_H_ +#define BASICQOSOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.qos-ok + */ +class BasicQosOkMethod : + public TMethodImpl, + public AmqpMethods::Basic::QosOk { + METHOD_DECL( + AmqpMethods::Basic::QosOk, + AMQP_BASIC_QOS_OK_METHOD, + "basic.qos-ok", + false) + +public: + BasicQosOkMethod(); + virtual ~BasicQosOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::QosOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicQosOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicQosOkMethod); + +}} + +#endif /* BASICQOSOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.cpp new file mode 100644 index 000000000..98349b36b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverMethod.cpp @@ -0,0 +1,43 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/BasicRecoverMethod.h" + +using namespace Caf::AmqpClient; + +BasicRecoverMethod::BasicRecoverMethod() : + _isInitialized(false), + _requeue(false), + CAF_CM_INIT("BasicRecoverMethod") { +} + +BasicRecoverMethod::~BasicRecoverMethod() { +} + +void BasicRecoverMethod::init( + const bool requeue) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _requeue = requeue; + _isInitialized = true; +} + +std::string BasicRecoverMethod::getMethodName() const { + return "basic.recover"; +} + +AMQPStatus BasicRecoverMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_BasicRecover( + channel, + _requeue); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.cpp new file mode 100644 index 000000000..b5ceea7e3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.cpp @@ -0,0 +1,24 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicRecoverOkMethod.h" + +using namespace Caf::AmqpClient; + +BasicRecoverOkMethod::BasicRecoverOkMethod() : + CAF_CM_INIT("BasicRecoverOkMethod") { +} + +BasicRecoverOkMethod::~BasicRecoverOkMethod() { +} + +void BasicRecoverOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_RECOVER_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.h new file mode 100644 index 000000000..b58eec813 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRecoverOkMethod.h @@ -0,0 +1,45 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICRECOVEROKMETHOD_H_ +#define BASICRECOVEROKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.recover-ok + */ +class BasicRecoverOkMethod : + public TMethodImpl, + public AmqpMethods::Basic::RecoverOk { + METHOD_DECL( + AmqpMethods::Basic::RecoverOk, + AMQP_BASIC_RECOVER_OK_METHOD, + "basic.recover-ok", + false) + +public: + BasicRecoverOkMethod(); + virtual ~BasicRecoverOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::BasicRecoverOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicRecoverOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicRecoverOkMethod); + +}} + +#endif /* BASICRECOVEROKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.cpp new file mode 100644 index 000000000..429aef42c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicRejectMethod.cpp @@ -0,0 +1,47 @@ +/* + * Created on: Aug 1, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/BasicRejectMethod.h" + +using namespace Caf::AmqpClient; + +BasicRejectMethod::BasicRejectMethod() : + _isInitialized(false), + _deliveryTag(0), + _requeue(false), + CAF_CM_INIT("BasicRejectMethod") { +} + +BasicRejectMethod::~BasicRejectMethod() { +} + +void BasicRejectMethod::init( + const uint64 deliveryTag, + const bool requeue) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _deliveryTag = deliveryTag; + _requeue = requeue; + _isInitialized = true; +} + +std::string BasicRejectMethod::getMethodName() const { + return "basic.Reject"; +} + +AMQPStatus BasicRejectMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); +// return AMQP_BasicReject( +// channel, +// _deliveryTag, +// _requeue); + return AMQP_ERROR_UNIMPLEMENTED; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.cpp new file mode 100644 index 000000000..320ae6f59 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.cpp @@ -0,0 +1,47 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "BasicReturnMethod.h" + +using namespace Caf::AmqpClient; + +BasicReturnMethod::BasicReturnMethod() : + _replyCode(0), + CAF_CM_INIT("BasicReturnMethod") { +} + +BasicReturnMethod::~BasicReturnMethod() { +} + +void BasicReturnMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_BASIC_RETURN_METHOD == method->id); + const amqp_basic_return_t * const decoded = + reinterpret_cast(method->decoded); + _replyCode = decoded->reply_code; + _replyText = AMQUtil::amqpBytesToString(&decoded->reply_text); + _exchange = AMQUtil::amqpBytesToString(&decoded->exchange); + _routingKey = AMQUtil::amqpBytesToString(&decoded->routing_key); +} + +uint16 BasicReturnMethod::getReplyCode() { + return _replyCode; +} + +std::string BasicReturnMethod::getReplyText() { + return _replyText; +} + +std::string BasicReturnMethod::getExchange() { + return _exchange; +} + +std::string BasicReturnMethod::getRoutingKey() { + return _routingKey; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.h new file mode 100644 index 000000000..dd1f0e4fa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/BasicReturnMethod.h @@ -0,0 +1,53 @@ +/* + * Created on: May 21, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BASICRETURNMETHOD_H_ +#define BASICRETURNMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP basic.return + */ +class BasicReturnMethod : + public TMethodImpl, + public AmqpMethods::Basic::Return { + METHOD_DECL( + AmqpMethods::Basic::Return, + AMQP_BASIC_RETURN_METHOD, + "basic.return", + true) + +public: + BasicReturnMethod(); + virtual ~BasicReturnMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Basic::Return + uint16 getReplyCode(); + std::string getReplyText(); + std::string getExchange(); + std::string getRoutingKey(); + +private: + uint16 _replyCode; + std::string _replyText; + std::string _exchange; + std::string _routingKey; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(BasicReturnMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(BasicReturnMethod); + +}} + +#endif /* BASICRETURNMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.cpp new file mode 100644 index 000000000..9d5527394 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.cpp @@ -0,0 +1,49 @@ +/* + * Created on: May 17, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "ChannelCloseMethod.h" + +using namespace Caf::AmqpClient; + +ChannelCloseMethod::ChannelCloseMethod() : + _replyCode(0), + _classId(0), + _methodId(0), + CAF_CM_INIT("ChannelCloseMethod") { +} + +ChannelCloseMethod::~ChannelCloseMethod() { +} + +void ChannelCloseMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_CHANNEL_CLOSE_METHOD == method->id); + const amqp_channel_close_t * const decoded = + reinterpret_cast(method->decoded); + _replyCode = decoded->reply_code; + _replyText = AMQUtil::amqpBytesToString(&decoded->reply_text); + _classId = decoded->class_id; + _methodId = decoded->method_id; +} + +uint16 ChannelCloseMethod::getReplyCode() { + return _replyCode; +} + +std::string ChannelCloseMethod::getReplyText() { + return _replyText; +} + +uint16 ChannelCloseMethod::getClassId() { + return _classId; +} + +uint16 ChannelCloseMethod::getMethodId() { + return _methodId; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.h new file mode 100644 index 000000000..be3d58a3a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseMethod.h @@ -0,0 +1,53 @@ +/* + * Created on: May 17, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CHANNELCLOSEMETHOD_H_ +#define CHANNELCLOSEMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementaiton of AMQP channel.close + */ +class ChannelCloseMethod : + public TMethodImpl, + public AmqpMethods::Channel::Close { + METHOD_DECL( + AmqpMethods::Channel::Close, + AMQP_CHANNEL_CLOSE_METHOD, + "channel.close", + false) + +public: + ChannelCloseMethod(); + virtual ~ChannelCloseMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Channel::Close + uint16 getReplyCode(); + std::string getReplyText(); + uint16 getClassId(); + uint16 getMethodId(); + +private: + uint16 _replyCode; + std::string _replyText; + uint16 _classId; + uint16 _methodId; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChannelCloseMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(ChannelCloseMethod); + +}} + +#endif /* CHANNELCLOSEMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.cpp new file mode 100644 index 000000000..40e7d46af --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.cpp @@ -0,0 +1,24 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "ChannelCloseOkFromServerMethod.h" + +using namespace Caf::AmqpClient; + +ChannelCloseOkFromServerMethod::ChannelCloseOkFromServerMethod() : + CAF_CM_INIT("ChannelCloseOkFromServerMethod") { +} + +ChannelCloseOkFromServerMethod::~ChannelCloseOkFromServerMethod() { +} + +void ChannelCloseOkFromServerMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_CHANNEL_CLOSE_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.h new file mode 100644 index 000000000..f1e33e967 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkFromServerMethod.h @@ -0,0 +1,44 @@ +/* + * Created on: May 22, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CHANNELCLOSEOKFROMSERVERMETHOD_H_ +#define CHANNELCLOSEOKFROMSERVERMETHOD_H_ + +namespace Caf { namespace AmqpClient { +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP channel.close-ok (received from server) + */ +class ChannelCloseOkFromServerMethod : + public TMethodImpl, + public AmqpMethods::Channel::CloseOk { + METHOD_DECL( + AmqpMethods::Channel::CloseOk, + AMQP_CHANNEL_CLOSE_OK_METHOD, + "channel.close-ok", + false) + +public: + ChannelCloseOkFromServerMethod(); + virtual ~ChannelCloseOkFromServerMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Channel::CloseOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChannelCloseOkFromServerMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(ChannelCloseOkFromServerMethod); + +}} + +#endif /* CHANNELCLOSEOKFROMSERVERMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.cpp new file mode 100644 index 000000000..4f0a61160 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelCloseOkMethod.cpp @@ -0,0 +1,38 @@ +/* + * Created on: May 17, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/ChannelCloseOkMethod.h" + +using namespace Caf::AmqpClient; + +ChannelCloseOkMethod::ChannelCloseOkMethod() : + _isInitialized(false), + CAF_CM_INIT("ChannelCloseOkMethod") { +} + +ChannelCloseOkMethod::~ChannelCloseOkMethod() { +} + +void ChannelCloseOkMethod::init() { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; +} + +std::string ChannelCloseOkMethod::getMethodName() const { + return "channel.close-ok"; +} + +AMQPStatus ChannelCloseOkMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpChannel::AMQP_ChannelCloseOk(channel); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.cpp new file mode 100644 index 000000000..4eb4dd127 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.cpp @@ -0,0 +1,36 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "ChannelOpenOkMethod.h" + +using namespace Caf::AmqpClient; + +ChannelOpenOkMethod::ChannelOpenOkMethod() : + CAF_CM_INIT("ChannelOpenOkMethod") { +} + +ChannelOpenOkMethod::~ChannelOpenOkMethod() { +} + +void ChannelOpenOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_CHANNEL_OPEN_OK_METHOD == method->id); + const amqp_bytes_t * const bytes = + reinterpret_cast(method->decoded); + _channelId.CreateInstance(); + if (bytes->len) { + _channelId->memCpy(bytes->bytes, bytes->len); + } +} + +SmartPtrCDynamicByteArray ChannelOpenOkMethod::getChannelId() { + return _channelId; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.h new file mode 100644 index 000000000..dc09de1c2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ChannelOpenOkMethod.h @@ -0,0 +1,49 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CHANNELOPENOKMETHOD_H_ +#define CHANNELOPENOKMETHOD_H_ + + +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { namespace AmqpClient { +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP channel.open-ok + */ +class ChannelOpenOkMethod : + public TMethodImpl, + public AmqpMethods::Channel::OpenOk { + METHOD_DECL( + AmqpMethods::Channel::OpenOk, + AMQP_CHANNEL_OPEN_OK_METHOD, + "channel.open-ok", + false) + +public: + ChannelOpenOkMethod(); + virtual ~ChannelOpenOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Channel::OpenOk + SmartPtrCDynamicByteArray getChannelId(); + +private: + SmartPtrCDynamicByteArray _channelId; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChannelOpenOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(ChannelOpenOkMethod); + +}} + +#endif /* CHANNELOPENOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.cpp new file mode 100644 index 000000000..c79c427bc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/EnvelopeImpl.cpp @@ -0,0 +1,57 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "amqpClient/amqpImpl/EnvelopeImpl.h" + +using namespace Caf::AmqpClient; + +EnvelopeImpl::EnvelopeImpl() : + _isInitialized(false), + _deliveryTag(0), + _redelivered(false), + CAF_CM_INIT("EnvelopeImpl") { +} + +EnvelopeImpl::~EnvelopeImpl() { +} + +void EnvelopeImpl::init( + const uint64 deliveryTag, + const bool redeliver, + const std::string& exchange, + const std::string& routingKey) { + _deliveryTag = deliveryTag; + _redelivered = redeliver; + _exchange = exchange; + _routingKey = routingKey; + _isInitialized = true; +} + +uint64 EnvelopeImpl::getDeliveryTag() { + CAF_CM_FUNCNAME_VALIDATE("getDeliveryTag"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _deliveryTag; +} + +bool EnvelopeImpl::getRedelivered() { + CAF_CM_FUNCNAME_VALIDATE("getRedelivered"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _redelivered; +} + +std::string EnvelopeImpl::getExchange() { + CAF_CM_FUNCNAME_VALIDATE("getExchange"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _exchange; +} + +std::string EnvelopeImpl::getRoutingKey() { + CAF_CM_FUNCNAME_VALIDATE("getRoutingKey"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _routingKey; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.cpp new file mode 100644 index 000000000..750d21301 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareMethod.cpp @@ -0,0 +1,58 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/amqpClient.h" +#include "amqpClient/amqpImpl/ExchangeDeclareMethod.h" + +using namespace Caf::AmqpClient; + +ExchangeDeclareMethod::ExchangeDeclareMethod() : + _isInitialized(false), + _passive(false), + _durable(false), + CAF_CM_INIT("ExchangeDeclareMethod") { +} + +ExchangeDeclareMethod::~ExchangeDeclareMethod() { +} + +void ExchangeDeclareMethod::init( + const std::string& exchange, + const std::string& type, + const bool passive, + const bool durable, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _exchange = exchange; + _type = type; + _passive = false; + _durable = durable; + _isInitialized = true; +} + +std::string ExchangeDeclareMethod::getMethodName() const { + return "exchange.declare"; +} + +AMQPStatus ExchangeDeclareMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_ExchangeDeclare( + channel, + _exchange, + _type, + false, + _durable, + false, + NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.cpp new file mode 100644 index 000000000..079a96b6e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.cpp @@ -0,0 +1,24 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "ExchangeDeclareOkMethod.h" + +using namespace Caf::AmqpClient; + +ExchangeDeclareOkMethod::ExchangeDeclareOkMethod() : + CAF_CM_INIT("ExchangeDeclareOkMethod") { +} + +ExchangeDeclareOkMethod::~ExchangeDeclareOkMethod() { +} + +void ExchangeDeclareOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_EXCHANGE_DECLARE_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.h new file mode 100644 index 000000000..40313a83c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeclareOkMethod.h @@ -0,0 +1,45 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef EXCHANGEDECLAREOKMETHOD_H_ +#define EXCHANGEDECLAREOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP exchange.declare-ok + */ +class ExchangeDeclareOkMethod : + public TMethodImpl, + public AmqpMethods::Exchange::DeclareOk { + METHOD_DECL( + AmqpMethods::Exchange::DeclareOk, + AMQP_EXCHANGE_DECLARE_OK_METHOD, + "exchange.declare-ok", + false) + +public: + ExchangeDeclareOkMethod(); + virtual ~ExchangeDeclareOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::DeclareOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ExchangeDeclareOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(ExchangeDeclareOkMethod); + +}} + +#endif /* EXCHANGEDECLAREOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.cpp new file mode 100644 index 000000000..90e9280d2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteMethod.cpp @@ -0,0 +1,47 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/ExchangeDeleteMethod.h" + +using namespace Caf::AmqpClient; + +ExchangeDeleteMethod::ExchangeDeleteMethod() : + _isInitialized(false), + _ifUnused(false), + CAF_CM_INIT("ExchangeDeleteMethod") { +} + +ExchangeDeleteMethod::~ExchangeDeleteMethod() { +} + +void ExchangeDeleteMethod::init( + const std::string& exchange, + const bool ifUnused) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _exchange = exchange; + _ifUnused = ifUnused; + _isInitialized = true; +} + +std::string ExchangeDeleteMethod::getMethodName() const { + return "exchange.delete"; +} + +AMQPStatus ExchangeDeleteMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_ExchangeDelete( + channel, + _exchange, + _ifUnused, + false); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.cpp new file mode 100644 index 000000000..ba57792f3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.cpp @@ -0,0 +1,24 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "ExchangeDeleteOkMethod.h" + +using namespace Caf::AmqpClient; + +ExchangeDeleteOkMethod::ExchangeDeleteOkMethod() : + CAF_CM_INIT("ExchangeDeleteOkMethod") { +} + +ExchangeDeleteOkMethod::~ExchangeDeleteOkMethod() { +} + +void ExchangeDeleteOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_EXCHANGE_DELETE_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.h new file mode 100644 index 000000000..72ef69275 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/ExchangeDeleteOkMethod.h @@ -0,0 +1,45 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef EXCHANGEDELETEOKMETHOD_H_ +#define EXCHANGEDELETEOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP exchange.delete-ok + */ +class ExchangeDeleteOkMethod : + public TMethodImpl, + public AmqpMethods::Exchange::DeleteOk { + METHOD_DECL( + AmqpMethods::Exchange::DeleteOk, + AMQP_EXCHANGE_DELETE_OK_METHOD, + "exchange.delete-ok", + false) + +public: + ExchangeDeleteOkMethod(); + virtual ~ExchangeDeleteOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::DeclareOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ExchangeDeleteOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(ExchangeDeleteOkMethod); + +}} + +#endif /* EXCHANGEDELETEOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/FieldImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/FieldImpl.cpp new file mode 100644 index 000000000..ea9e484f2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/FieldImpl.cpp @@ -0,0 +1,38 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "amqpClient/amqpImpl/FieldImpl.h" + +using namespace Caf::AmqpClient; + +FieldImpl::FieldImpl() : + _type(AMQP_FIELD_TYPE_NOTSET), + _value(NULL) { +} + +FieldImpl::~FieldImpl() { + if (_value) { + g_variant_unref(_value); + } +} + +Field::AmqpFieldType FieldImpl::getAmqpType() const { + return _type; +} + +GVariant* FieldImpl::getValue() const { + return _value; +} + +void FieldImpl::setTypeAndValue(AmqpFieldType type, GVariant* value) { + if (_value) { + g_variant_unref(_value); + } + _type = type; + _value = g_variant_ref_sink(value); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.cpp new file mode 100644 index 000000000..620243440 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/GetResponseImpl.cpp @@ -0,0 +1,62 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/Envelope.h" +#include "amqpClient/amqpImpl/GetResponseImpl.h" + +using namespace Caf::AmqpClient; + +GetResponseImpl::GetResponseImpl() : + _isInitialized(false), + _messageCount(0), + CAF_CM_INIT("GetResponseImpl") { +} + +GetResponseImpl::~GetResponseImpl() { +} + +void GetResponseImpl::init( + const SmartPtrEnvelope& envelope, + const AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body, + const uint32 messageCount) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _envelope = envelope; + _properties = properties; + _body = body; + _messageCount = messageCount; + _isInitialized = true; +} + +SmartPtrEnvelope GetResponseImpl::getEnvelope() { + CAF_CM_FUNCNAME_VALIDATE("getEnvelope"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _envelope; +} + +AmqpContentHeaders::SmartPtrBasicProperties GetResponseImpl::getProperties() { + CAF_CM_FUNCNAME_VALIDATE("getProperties"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _properties; +} + +SmartPtrCDynamicByteArray GetResponseImpl::getBody() { + CAF_CM_FUNCNAME_VALIDATE("getBody"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _body; +} + +uint32 GetResponseImpl::getMessageCount() { + CAF_CM_FUNCNAME_VALIDATE("getMessageCount"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _messageCount; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.cpp new file mode 100644 index 000000000..a5440b58b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindMethod.cpp @@ -0,0 +1,53 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/amqpClient.h" +#include "amqpClient/amqpImpl/QueueBindMethod.h" + +using namespace Caf::AmqpClient; + +QueueBindMethod::QueueBindMethod() : + _isInitialized(false), + CAF_CM_INIT("QueueBindMethod") { +} + +QueueBindMethod::~QueueBindMethod() { +} + +void QueueBindMethod::init( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _queue = queue; + _exchange = exchange; + _routingKey = routingKey; + _isInitialized = true; +} + +std::string QueueBindMethod::getMethodName() const { + return "queue.bind"; +} + +AMQPStatus QueueBindMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_QueueBind( + channel, + _queue, + _exchange, + _routingKey, + false, + NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.cpp new file mode 100644 index 000000000..8dc64ac4e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.cpp @@ -0,0 +1,24 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueBindOkMethod.h" + +using namespace Caf::AmqpClient; + +QueueBindOkMethod::QueueBindOkMethod() : + CAF_CM_INIT("QueueBindOkMethod") { +} + +QueueBindOkMethod::~QueueBindOkMethod() { +} + +void QueueBindOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_QUEUE_BIND_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.h new file mode 100644 index 000000000..a5935854b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueBindOkMethod.h @@ -0,0 +1,45 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QUEUEBINDOKMETHOD_H_ +#define QUEUEBINDOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.bind-ok + */ +class QueueBindOkMethod : + public TMethodImpl, + public AmqpMethods::Queue::BindOk { + METHOD_DECL( + AmqpMethods::Queue::BindOk, + AMQP_QUEUE_BIND_OK_METHOD, + "queue.bind-ok", + false) + +public: + QueueBindOkMethod(); + virtual ~QueueBindOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::BindOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueBindOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(QueueBindOkMethod); + +}} + +#endif /* QUEUEBINDOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.cpp new file mode 100644 index 000000000..99531142b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareMethod.cpp @@ -0,0 +1,86 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/amqpClient.h" +#include "amqpClient/amqpImpl/QueueDeclareMethod.h" + +using namespace Caf::AmqpClient; + +QueueDeclareMethod::QueueDeclareMethod() : + _isInitialized(false), + _passive(false), + _durable(false), + _exclusive(false), + _autoDelete(false), + _noWait(false), + CAF_CM_INIT("QueueDeclareMethod") { +} + +QueueDeclareMethod::~QueueDeclareMethod() { +} + +void QueueDeclareMethod::init() { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + init( + "", + false, + true, + true, + SmartPtrTable()); +} + +void QueueDeclareMethod::init( + const std::string& queue, + bool durable, + bool exclusive, + bool autoDelete, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _queue = queue; + _passive = false; + _durable = durable; + _exclusive = exclusive; + _autoDelete = autoDelete; + _noWait = false; + _isInitialized = true; +} + +void QueueDeclareMethod::initPassive( + const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("initPassive"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _queue = queue; + _passive = true; + _noWait = false; + _isInitialized = true; +} + +std::string QueueDeclareMethod::getMethodName() const { + return "queue.declare"; +} + +AMQPStatus QueueDeclareMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_QueueDeclare( + channel, + _queue, + _passive, + _durable, + _exclusive, + _autoDelete, + _noWait, + NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.cpp new file mode 100644 index 000000000..20c6eb1bc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.cpp @@ -0,0 +1,43 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueDeclareOkMethod.h" + +using namespace Caf::AmqpClient; + +QueueDeclareOkMethod::QueueDeclareOkMethod() : + _messageCount(0), + _consumerCount(0), + CAF_CM_INIT("QueueDeclareOkMethod") { +} + +QueueDeclareOkMethod::~QueueDeclareOkMethod() { +} + +void QueueDeclareOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_QUEUE_DECLARE_OK_METHOD == method->id); + const amqp_queue_declare_ok_t * const decoded = + reinterpret_cast(method->decoded); + _queueName = AMQUtil::amqpBytesToString(&decoded->queue); + _messageCount = decoded->message_count; + _consumerCount = decoded->consumer_count; +} + +std::string QueueDeclareOkMethod::getQueueName() { + return _queueName; +} + +uint32 QueueDeclareOkMethod::getMessageCount() { + return _messageCount; +} + +uint32 QueueDeclareOkMethod::getConsumerCount() { + return _consumerCount; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.h new file mode 100644 index 000000000..800694876 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeclareOkMethod.h @@ -0,0 +1,51 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QUEUEDECLAREOKMETHOD_H_ +#define QUEUEDECLAREOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.declare-ok + */ +class QueueDeclareOkMethod : + public TMethodImpl, + public AmqpMethods::Queue::DeclareOk { + METHOD_DECL( + AmqpMethods::Queue::DeclareOk, + AMQP_QUEUE_DECLARE_OK_METHOD, + "queue.declare-ok", + false) + +public: + QueueDeclareOkMethod(); + virtual ~QueueDeclareOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::DeclareOk + std::string getQueueName(); + uint32 getMessageCount(); + uint32 getConsumerCount(); + +private: + std::string _queueName; + uint32 _messageCount; + uint32 _consumerCount; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueDeclareOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(QueueDeclareOkMethod); + +}} + +#endif /* QUEUEDECLAREOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.cpp new file mode 100644 index 000000000..7ef0db0d6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteMethod.cpp @@ -0,0 +1,51 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/QueueDeleteMethod.h" + +using namespace Caf::AmqpClient; + +QueueDeleteMethod::QueueDeleteMethod() : + _isInitialized(false), + _ifUnused(false), + _ifEmpty(false), + CAF_CM_INIT("QueueDeleteMethod") { +} + +QueueDeleteMethod::~QueueDeleteMethod() { +} + +void QueueDeleteMethod::init( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _queue = queue; + _ifUnused = ifUnused; + _ifEmpty = ifEmpty; + _isInitialized = true; +} + +std::string QueueDeleteMethod::getMethodName() const { + return "queue.delete"; +} + +AMQPStatus QueueDeleteMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_QueueDelete( + channel, + _queue, + _ifUnused, + _ifEmpty, + false); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.cpp new file mode 100644 index 000000000..581f037f4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.cpp @@ -0,0 +1,32 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueDeleteOkMethod.h" + +using namespace Caf::AmqpClient; + +QueueDeleteOkMethod::QueueDeleteOkMethod() : + _messageCount(0), + CAF_CM_INIT("QueueDeleteOkMethod") { +} + +QueueDeleteOkMethod::~QueueDeleteOkMethod() { +} + +void QueueDeleteOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_QUEUE_DELETE_OK_METHOD == method->id); + const amqp_queue_delete_ok_t * const decoded = + reinterpret_cast(method->decoded); + _messageCount = decoded->message_count; +} + +uint32 QueueDeleteOkMethod::getMessageCount() { + return _messageCount; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.h new file mode 100644 index 000000000..4593cde2e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueDeleteOkMethod.h @@ -0,0 +1,47 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QUEUEDELETEOKMETHOD_H_ +#define QUEUEDELETEOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.delete-ok + */ +class QueueDeleteOkMethod : + public TMethodImpl, + public AmqpMethods::Queue::DeleteOk { + METHOD_DECL( + AmqpMethods::Queue::DeleteOk, + AMQP_QUEUE_DELETE_OK_METHOD, + "queue.delete-ok", + false) + +public: + QueueDeleteOkMethod(); + virtual ~QueueDeleteOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::DeclareOk + uint32 getMessageCount(); + +private: + uint32 _messageCount; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueDeleteOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(QueueDeleteOkMethod); + +}} + +#endif /* QUEUEDELETEOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.cpp new file mode 100644 index 000000000..03e5e2b1a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeMethod.cpp @@ -0,0 +1,43 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/amqpImpl/QueuePurgeMethod.h" + +using namespace Caf::AmqpClient; + +QueuePurgeMethod::QueuePurgeMethod() : + _isInitialized(false), + CAF_CM_INIT("QueuePurgeMethod") { +} + +QueuePurgeMethod::~QueuePurgeMethod() { +} + +void QueuePurgeMethod::init( + const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _queue = queue; + _isInitialized = true; +} + +std::string QueuePurgeMethod::getMethodName() const { + return "queue.purge"; +} + +AMQPStatus QueuePurgeMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_QueuePurge( + channel, + _queue, + false); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.cpp new file mode 100644 index 000000000..640e323f5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.cpp @@ -0,0 +1,32 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueuePurgeOkMethod.h" + +using namespace Caf::AmqpClient; + +QueuePurgeOkMethod::QueuePurgeOkMethod() : + _messageCount(0), + CAF_CM_INIT("QueuePurgeOkMethod") { +} + +QueuePurgeOkMethod::~QueuePurgeOkMethod() { +} + +void QueuePurgeOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_QUEUE_PURGE_OK_METHOD == method->id); + const amqp_queue_purge_ok_t * const decoded = + reinterpret_cast(method->decoded); + _messageCount = decoded->message_count; +} + +uint32 QueuePurgeOkMethod::getMessageCount() { + return _messageCount; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.h new file mode 100644 index 000000000..a1faa37b3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueuePurgeOkMethod.h @@ -0,0 +1,47 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QueuePurgeOKMETHOD_H_ +#define QueuePurgeOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.purge-ok + */ +class QueuePurgeOkMethod : + public TMethodImpl, + public AmqpMethods::Queue::PurgeOk { + METHOD_DECL( + AmqpMethods::Queue::PurgeOk, + AMQP_QUEUE_PURGE_OK_METHOD, + "queue.purge-ok", + false) + +public: + QueuePurgeOkMethod(); + virtual ~QueuePurgeOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::PurgeOk + uint32 getMessageCount(); + +private: + uint32 _messageCount; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueuePurgeOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(QueuePurgeOkMethod); + +}} + +#endif /* QueuePurgeOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.cpp new file mode 100644 index 000000000..f16e9af02 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindMethod.cpp @@ -0,0 +1,51 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/CAmqpChannel.h" +#include "amqpClient/api/amqpClient.h" +#include "amqpClient/amqpImpl/QueueUnbindMethod.h" + +using namespace Caf::AmqpClient; + +QueueUnbindMethod::QueueUnbindMethod() : + _isInitialized(false), + CAF_CM_INIT("QueueUnbindMethod") { +} + +QueueUnbindMethod::~QueueUnbindMethod() { +} + +void QueueUnbindMethod::init( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const SmartPtrTable& arguments) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _queue = queue; + _exchange = exchange; + _routingKey = routingKey; + _isInitialized = true; +} + +std::string QueueUnbindMethod::getMethodName() const { + return "queue.unbind"; +} + +AMQPStatus QueueUnbindMethod::send(const SmartPtrCAmqpChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return AmqpUtil::AMQP_QueueUnbind( + channel, + _queue, + _exchange, + _routingKey, + NULL); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.cpp new file mode 100644 index 000000000..ab35454cb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.cpp @@ -0,0 +1,24 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "QueueUnbindOkMethod.h" + +using namespace Caf::AmqpClient; + +QueueUnbindOkMethod::QueueUnbindOkMethod() : + CAF_CM_INIT("QueueUnbindOkMethod") { +} + +QueueUnbindOkMethod::~QueueUnbindOkMethod() { +} + +void QueueUnbindOkMethod::init(const amqp_method_t * const method) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_PTR(method); + CAF_CM_ASSERT(AMQP_QUEUE_UNBIND_OK_METHOD == method->id); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.h new file mode 100644 index 000000000..215bfe7ca --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/QueueUnbindOkMethod.h @@ -0,0 +1,45 @@ +/* + * Created on: May 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef QUEUEUNBINDOKMETHOD_H_ +#define QUEUEUNBINDOKMETHOD_H_ + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Implementation of AMQP queue.ubind-ok + */ +class QueueUnbindOkMethod : + public TMethodImpl, + public AmqpMethods::Queue::UnbindOk { + METHOD_DECL( + AmqpMethods::Queue::UnbindOk, + AMQP_QUEUE_UNBIND_OK_METHOD, + "queue.unbind-ok", + false) + +public: + QueueUnbindOkMethod(); + virtual ~QueueUnbindOkMethod(); + +public: // IMethod + void init(const amqp_method_t * const method); + +public: // AmqpMethods::Queue::UnbindOk + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(QueueUnbindOkMethod); +}; +CAF_DECLARE_SMART_QI_POINTER(QueueUnbindOkMethod); + +}} + +#endif /* QUEUEUNBINDOKMETHOD_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/TMethodImpl.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/TMethodImpl.h new file mode 100644 index 000000000..0c327ec8c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/TMethodImpl.h @@ -0,0 +1,62 @@ +/* + * Created on: May 11, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef TMETHODIMPL_H_ +#define TMETHODIMPL_H_ + + +#include "amqpClient/amqpImpl/IMethod.h" + +namespace Caf { namespace AmqpClient { + +/** + * @author mdonahue + * @ingroup AmqpApiImpl + * @remark LIBRARY IMPLEMENTATION - NOT PART OF THE PUBLIC API + * @brief Template implementing the static creator function for AMQP method implementations + */ +template +class TMethodImpl : public IMethod { +public: + /** + * @brief Create the method object + * @return the method object + */ + static SmartPtrIMethod Creator(); +}; + +template +SmartPtrIMethod TMethodImpl::Creator() { + TCafSmartPtr > method; + method.CreateInstance(); + return method; +} + +}} + +#define METHOD_DECL(_amqpImpl_, _num_, _name_, _has_content_) \ + CAF_BEGIN_QI() \ + CAF_QI_ENTRY(IMethod) \ + CAF_QI_ENTRY(_amqpImpl_) \ + CAF_END_QI() \ + public: \ + bool hasContent() { \ + return _has_content_; \ + } \ + uint16 getProtocolClassId() { \ + return (uint16)((_num_ & 0xffff0000) >> 16); \ + } \ + \ + uint16 getProtocolMethodId() { \ + return (uint16)(_num_ & 0x0000ffff); \ + } \ + \ + virtual std::string getProtocolMethodName() { \ + return _name_; \ + } + +#endif /* TMETHODIMPL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/amqpImplInt.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/amqpImplInt.h new file mode 100644 index 000000000..c3ede0b9a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/amqpImplInt.h @@ -0,0 +1,40 @@ + /* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPMETHODIMPLINT_H_ +#define AMQPMETHODIMPLINT_H_ + +using namespace Caf::AmqpClient; + +#include "TMethodImpl.h" + +#include "AMQPImpl.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "BasicGetOkMethod.h" +#include "BasicGetEmptyMethod.h" +#include "BasicConsumeOkMethod.h" +#include "BasicDeliverMethod.h" +#include "BasicCancelOkMethod.h" +#include "BasicReturnMethod.h" +#include "BasicRecoverOkMethod.h" +#include "BasicQosOkMethod.h" + +#include "ChannelOpenOkMethod.h" +#include "ChannelCloseMethod.h" +#include "ChannelCloseOkFromServerMethod.h" + +#include "ExchangeDeclareOkMethod.h" +#include "ExchangeDeleteOkMethod.h" + +#include "QueueDeclareOkMethod.h" +#include "QueueDeleteOkMethod.h" +#include "QueuePurgeOkMethod.h" +#include "QueueBindOkMethod.h" +#include "QueueUnbindOkMethod.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/stdafx.h new file mode 100644 index 000000000..ea16853e6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/amqpImpl/stdafx.h @@ -0,0 +1,15 @@ +/* + * Created on: May 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPIMPL_STDAFX_H_ +#define AMQPIMPL_STDAFX_H_ + +#include "../stdafx.h" +#include "../AMQUtil.h" +#include "amqpImplInt.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/stdafx.h new file mode 100644 index 000000000..a354867f7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpClient/stdafx.h @@ -0,0 +1,59 @@ +/* + * Created on: May 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#include "amqpClient/AmqpClientLink.h" +#include + + +//extern "C" { +#include +#include +#include +//} + +#if !defined(sun) +#include +#include +#include +#endif /* !sun */ + +#define AMQP_HANDLE_INVALID NULL; + +// Forward-declare because the connection creates the channel +// and the channel hangs onto the connection. +namespace Caf { namespace AmqpClient { +CAF_DECLARE_CLASS_AND_SMART_POINTER(CAmqpConnection); +CAF_DECLARE_CLASS_AND_SMART_POINTER(CAmqpChannel); +}} + +#include "AmqpCommon.h" +#include "amqpClient/CAmqpChannel.h" + +#include "AmqpConnection.h" +#include "AmqpAuthPlain.h" +#include "AmqpChannel.h" +#include "AmqpUtil.h" +#include "amqpImpl/amqpImplInt.h" + +/** + * @defgroup AmqpApiImpl AMQP API Implementation + * Documentation for the implementation of the AMQP API. + *

+ * These classes, methods and constants cannot be used directly by application code. + */ + +/** + * @mainpage + * Documentation of the CAF AMQP Client Library. + *

+ * This library allows applications to interact with an AMQP broker as a + * client using first-class C++ objects representing AMQP entities and operations. + */ +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AbstractConnectionFactory.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AbstractConnectionFactory.cpp new file mode 100644 index 000000000..87a1a5cd4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AbstractConnectionFactory.cpp @@ -0,0 +1,207 @@ +/* + * Created on: May 24, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/api/Connection.h" +#include "amqpCore/ConnectionListener.h" +#include "amqpCore/SimpleConnection.h" +#include "amqpCore/AbstractConnectionFactory.h" + +using namespace Caf::AmqpIntegration; + +AbstractConnectionFactory::AbstractConnectionFactory() : + _isInitialized(false), + CAF_CM_INIT("AbstractConnectionFactory") { +} + +AbstractConnectionFactory::~AbstractConnectionFactory() { +} + +void AbstractConnectionFactory::init( + const AmqpClient::SmartPtrConnectionFactory& amqpConnectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(amqpConnectionFactory); + _amqpConnectionFactory = amqpConnectionFactory; + _connectionListener.CreateInstance(); + _isInitialized = true; +} + +void AbstractConnectionFactory::setProtocol(const std::string& protocol) { + CAF_CM_FUNCNAME_VALIDATE("setProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setProtocol(protocol); +} + +void AbstractConnectionFactory::setHost(const std::string& host) { + CAF_CM_FUNCNAME_VALIDATE("setHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setHost(host); +} + +void AbstractConnectionFactory::setPort(const uint32 port) { + CAF_CM_FUNCNAME_VALIDATE("setPort"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setPort(port); +} + +void AbstractConnectionFactory::setVirtualHost(const std::string& virtualHost) { + CAF_CM_FUNCNAME_VALIDATE("setVirtualHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setVirtualHost(virtualHost); +} + +void AbstractConnectionFactory::setUsername(const std::string& username) { + CAF_CM_FUNCNAME_VALIDATE("setUsername"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setUsername(username); +} + +void AbstractConnectionFactory::setPassword(const std::string& password) { + CAF_CM_FUNCNAME_VALIDATE("setPassword"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setPassword(password); +} + +void AbstractConnectionFactory::setCaCertPath(const std::string& caCertPath) { + CAF_CM_FUNCNAME_VALIDATE("setCaCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setCaCertPath(caCertPath); +} + +void AbstractConnectionFactory::setClientCertPath(const std::string& clientCertPath) { + CAF_CM_FUNCNAME_VALIDATE("setClientCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setClientCertPath(clientCertPath); +} + +void AbstractConnectionFactory::setClientKeyPath(const std::string& clientKeyPath) { + CAF_CM_FUNCNAME_VALIDATE("setClientKeyPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setClientKeyPath(clientKeyPath); +} + +void AbstractConnectionFactory::setConnectionTimeout(const uint32 connectionTimeout) { + CAF_CM_FUNCNAME_VALIDATE("setConnectionTimeout"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setConnectionTimeout(connectionTimeout); +} + +void AbstractConnectionFactory::setRetries(const uint16 retries) { + CAF_CM_FUNCNAME_VALIDATE("setRetries"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setRetries(retries); +} + +void AbstractConnectionFactory::setSecondsToWait(const uint16 seconds) { + CAF_CM_FUNCNAME_VALIDATE("setSecondsToWait"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _amqpConnectionFactory->setSecondsToWait(seconds); +} + +std::string AbstractConnectionFactory::getDefaultProtocol() { + return Caf::AmqpClient::DEFAULT_PROTOCOL; +} + +std::string AbstractConnectionFactory::getDefaultHostName() { + return g_get_host_name(); +} + +SmartPtrConnection AbstractConnectionFactory::createBareConnection() { + CAF_CM_FUNCNAME_VALIDATE("createBareConnection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + SmartPtrSimpleConnection connection; + connection.CreateInstance(); + connection->init(_amqpConnectionFactory->newConnection()); + return connection; +} + +SmartPtrConnectionListener AbstractConnectionFactory::getConnectionListener() { + return _connectionListener; +} + + +void AbstractConnectionFactory::setConnectionListeners( + const std::deque& listeners) { + CAF_CM_FUNCNAME_VALIDATE("setConnectionListeners"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _connectionListener->setDelegates(listeners); +} + +void AbstractConnectionFactory::addConnectionListener( + const SmartPtrConnectionListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("addConnectionListener"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _connectionListener->addDelegate(listener); +} + +std::string AbstractConnectionFactory::getProtocol() { + CAF_CM_FUNCNAME_VALIDATE("getProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getProtocol(); +} + +std::string AbstractConnectionFactory::getHost() { + CAF_CM_FUNCNAME_VALIDATE("getHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getHost(); +} + +uint32 AbstractConnectionFactory::getPort() { + CAF_CM_FUNCNAME_VALIDATE("getPort"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getPort(); +} + +std::string AbstractConnectionFactory::getVirtualHost() { + CAF_CM_FUNCNAME_VALIDATE("getVirtualHost"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getVirtualHost(); +} + +std::string AbstractConnectionFactory::getUsername() { + CAF_CM_FUNCNAME_VALIDATE("getUsername"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getUsername(); +} + +std::string AbstractConnectionFactory::getPassword() { + CAF_CM_FUNCNAME_VALIDATE("getPassword"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getPassword(); +} + +std::string AbstractConnectionFactory::getCaCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getCaCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getCaCertPath(); +} + +std::string AbstractConnectionFactory::getClientCertPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientCertPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getClientCertPath(); +} + +std::string AbstractConnectionFactory::getClientKeyPath() { + CAF_CM_FUNCNAME_VALIDATE("getClientKeyPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getClientKeyPath(); +} + +uint16 AbstractConnectionFactory::getRetries() { + CAF_CM_FUNCNAME_VALIDATE("getRetries"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getRetries(); +} + +uint16 AbstractConnectionFactory::getSecondsToWait() { + CAF_CM_FUNCNAME_VALIDATE("getSecondsToWait"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _amqpConnectionFactory->getSecondsToWait(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpHeaderMapper.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpHeaderMapper.cpp new file mode 100644 index 000000000..6482a4971 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpHeaderMapper.cpp @@ -0,0 +1,31 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "amqpCore/AmqpHeaderMapper.h" + +using namespace Caf::AmqpIntegration; + +const std::string AmqpHeaderMapper::PREFIX = "amqp_"; +const std::string AmqpHeaderMapper::APP_ID = AmqpHeaderMapper::PREFIX + "appId"; +const std::string AmqpHeaderMapper::CLUSTER_ID = AmqpHeaderMapper::PREFIX + "clusterId"; +const std::string AmqpHeaderMapper::CONTENT_ENCODING = AmqpHeaderMapper::PREFIX + "contentEncoding"; +const std::string AmqpHeaderMapper::CONTENT_TYPE = AmqpHeaderMapper::PREFIX + "contentType"; +const std::string AmqpHeaderMapper::CORRELATION_ID = AmqpHeaderMapper::PREFIX + "correlationId"; +const std::string AmqpHeaderMapper::DELIVERY_MODE = AmqpHeaderMapper::PREFIX + "deliveryMode"; +const std::string AmqpHeaderMapper::DELIVERY_TAG = AmqpHeaderMapper::PREFIX + "deliveryTag"; +const std::string AmqpHeaderMapper::EXPIRATION = AmqpHeaderMapper::PREFIX + "expiration"; +const std::string AmqpHeaderMapper::MESSAGE_COUNT = AmqpHeaderMapper::PREFIX + "messageCount"; +const std::string AmqpHeaderMapper::MESSAGE_ID = AmqpHeaderMapper::PREFIX + "messageId"; +const std::string AmqpHeaderMapper::RECEIVED_EXCHANGE = AmqpHeaderMapper::PREFIX + "receivedExchange"; +const std::string AmqpHeaderMapper::RECEIVED_ROUTING_KEY = AmqpHeaderMapper::PREFIX + "receivedRoutingKey"; +const std::string AmqpHeaderMapper::REDELIVERED = AmqpHeaderMapper::PREFIX + "redelivered"; +const std::string AmqpHeaderMapper::REPLY_TO = AmqpHeaderMapper::PREFIX + "replyTo"; +const std::string AmqpHeaderMapper::TIMESTAMP = AmqpHeaderMapper::PREFIX + "timestamp"; +const std::string AmqpHeaderMapper::TYPE = AmqpHeaderMapper::PREFIX + "type"; +const std::string AmqpHeaderMapper::USER_ID = AmqpHeaderMapper::PREFIX + "userId"; + diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreDefines.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreDefines.h new file mode 100644 index 000000000..82e9c86d0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreDefines.h @@ -0,0 +1,28 @@ +/* + * Created on: Jul 31, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCOREDEFINES_H_ +#define AMQPINTEGRATIONCOREDEFINES_H_ + +namespace Caf { namespace AmqpIntegration { +/** + * @brief Message acknowledgment mode flags + */ +typedef enum { + /** @brief No acks will be sent. AMQP broker will assume all messages are acked. */ + ACKNOWLEDGEMODE_NONE, + + /** @brief The listener must acknowledge all messages by calling Channel.basicAck() */ + ACKNOWLEDGEMODE_MANUAL, + + /** @brief The container will acknowledge messages automatically. */ + ACKNOWLEDGEMODE_AUTO +} AcknowledgeMode; + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreFunc.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreFunc.h new file mode 100644 index 000000000..66f078e8f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationCoreFunc.h @@ -0,0 +1,109 @@ +/* + * Created on: Jun 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCOREFUNC_H_ +#define AMQPINTEGRATIONCOREFUNC_H_ + + + +#include "amqpCore/Binding.h" +#include "amqpCore/Exchange.h" +#include "amqpCore/Queue.h" + +namespace Caf { + +/** @brief CAF AMQP Integration */ +namespace AmqpIntegration { + +/** + * @brief Create a #Caf::AmqpIntegration::Queue object + *

+ * durable will be set to true; + * exclusive and autoDelete will be set to false. + * @param name the name of the queue + * @return the queue object + */ +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE createQueue( + const std::string& name); + +/** + * @brief Create a #Caf::AmqpIntegration::Queue object + *

+ * exclusive and autoDelete will be set to false. + * @param name the name of the queue + * @param durable true to make the queue durable else false + * @return the queue object + */ +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE createQueue( + const std::string& name, + const bool durable); + +/** + * @brief Create a #Caf::AmqpIntegration::Queue object + * @param name the name of the queue or blank for a server-generated name + * @param durable true to make the queue durable else false + * @param exclusive true to make the queue exclusive else false + * @param autoDelete true to make the queue auto-delete else false + * @return the queue object + */ +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE createQueue( + const std::string& name, + const bool durable, + const bool exclusive, + const bool autoDelete); + + +/** + * @brief Create a #Caf::AmqpIntegration::Exchange object representing a direct exchange + * @param name the name of the exchange + * @param durable true to make the exchange durable else false + */ +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE createDirectExchange( + const std::string& name, + const bool durable = true); + +/** + * @brief Create a #Caf::AmqpIntegration::Exchange object representing a topic exchange + * @param name the name of the exchange + * @param durable true to make the exchange durable else false + */ +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE createTopicExchange( + const std::string& name, + const bool durable = true); + +/** + * @brief Create a #Caf::AmqpIntegration::Exchange object representing a headers exchange + * @param name the name of the exchange + * @param durable true to make the exchange durable else false + */ +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE createHeadersExchange( + const std::string& name, + const bool durable = true); + +/** + * @brief Create a #Caf::AmqpIntegration::Exchange object representing a fanout exchange + * @param name the name of the exchange + * @param durable true to make the exchange durable else false + */ +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE createFanoutExchange( + const std::string& name, + const bool durable = true); + +/** + * @brief Create a #Caf::AmqpIntegration::Binding object + * @param queue the queue name + * @param exchange the exchange name + * @param routingKey the routing key + */ +SmartPtrBinding AMQPINTEGRATIONCORE_LINKAGE createBinding( + const std::string queue, + const std::string exchange, + const std::string routingKey); + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.cpp new file mode 100644 index 000000000..ebd767c25 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.cpp @@ -0,0 +1,16 @@ +/* + * Created on: Jul 18, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "AmqpIntegrationExceptions.h" + +using namespace Caf::AmqpIntegration::AmqpIntExceptions; + +AMQP_CM_DEFINE_EXCEPTION_CLASS(ReplyRequiredException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ChannelResolutionException); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ExpressionResultNull); +AMQP_CM_DEFINE_EXCEPTION_CLASS(ExpressionResultWrongType); diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.h new file mode 100644 index 000000000..8fc67b283 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpIntegrationExceptions.h @@ -0,0 +1,34 @@ +/* + * Created on: Jul 18, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AMQPINTEGRATIONEXCEPTIONS_H_ +#define AMQPINTEGRATIONCORE_AMQPINTEGRATIONEXCEPTIONS_H_ + +#include "amqpClient/api/AMQExceptions.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief Exceptions defined by this library + */ +namespace AmqpIntExceptions { + +/** @brief A reply was required but was not produced */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ReplyRequiredException); + +/** @brief Thrown by a ChannelResolver when it cannot resolve a channel name */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ChannelResolutionException); + +/** @brief Thrown if an expression failed to return a result */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ExpressionResultNull); + +/** @brief Thrown if an expression resolved to an incorrect result type */ +AMQP_CM_DECLARE_EXCEPTION_CLASS(ExpressionResultWrongType); + +}}} + +#endif /* AMQPINTEGRATIONCORE_AMQPINTEGRATIONEXCEPTIONS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpMessageListenerSource.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpMessageListenerSource.cpp new file mode 100644 index 000000000..1c610ab9f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpMessageListenerSource.cpp @@ -0,0 +1,102 @@ +/* + * Created on: Aug 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Core/CIntMessage.h" +#include "Integration/Dependencies/CPollerMetadata.h" +#include "Integration/IIntMessage.h" +#include "amqpCore/AmqpHeaderMapper.h" +#include "amqpCore/AmqpMessageListenerSource.h" +#include "Exception/CCafException.h" + +using namespace Caf::AmqpIntegration; + +AmqpMessageListenerSource::AmqpMessageListenerSource() : + _isInitialized(false), + _messageQueue(NULL), + CAF_CM_INIT("AmqpMessageListenerSource") { +} + +AmqpMessageListenerSource::~AmqpMessageListenerSource() { +} + +void AmqpMessageListenerSource::init( + const SmartPtrAmqpHeaderMapper& headerMapper, + const SmartPtrCPollerMetadata& pollerMetadata) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(pollerMetadata); + // headerMapper is optional + + _headerMapper = headerMapper; + _messageQueue = g_async_queue_new_full(QueueItemDestroyFunc); + setPollerMetadata(pollerMetadata); + _isInitialized = true; +} +void AmqpMessageListenerSource::onMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("onMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + SmartPtrIIntMessage queuedMessage = message; + if (_headerMapper) { + SmartPtrCIntMessage filteredMessage; + filteredMessage.CreateInstance(); + filteredMessage->initialize( + queuedMessage->getPayload(), + _headerMapper->filterHeaders(queuedMessage->getHeaders()), + NULL); + queuedMessage = filteredMessage; + } + g_async_queue_push( + _messageQueue, + queuedMessage.GetAddRefedInterface()); +} + +bool AmqpMessageListenerSource::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME("doSend"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOTIMPL, + "This is not a sending channel: %s", _id.c_str()); + return false; +} + +SmartPtrIIntMessage AmqpMessageListenerSource::doReceive(const int32 timeout) { + CAF_CM_FUNCNAME("doReceive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + gpointer data = NULL; + if (timeout < 0) { + // blocking + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Infinite blocking is not supported for a polled channel: %s", _id.c_str()); + //data = g_async_queue_pop(_messageQueue); + } else if (timeout == 0) { + // immediate + data = g_async_queue_try_pop(_messageQueue); + } else { + // timed + guint64 microTimeout = static_cast(timeout) * 1000; + data = g_async_queue_timeout_pop(_messageQueue, microTimeout); + } + + SmartPtrIIntMessage message; + if (data) { + IIntMessage *messagePtr = reinterpret_cast(data); + message = messagePtr; + messagePtr->Release(); + } + return message; +} + +void AmqpMessageListenerSource::QueueItemDestroyFunc(gpointer data) { + reinterpret_cast(data)->Release(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpOutboundEndpoint.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpOutboundEndpoint.cpp new file mode 100644 index 000000000..d9ee9f256 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AmqpOutboundEndpoint.cpp @@ -0,0 +1,297 @@ +/* + * Created on: Jul 16, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppConfig.h" +#include "Common/IAppContext.h" +#include "IVariant.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "amqpCore/AmqpTemplate.h" +#include "amqpCore/DefaultAmqpHeaderMapper.h" +#include "Exception/CCafException.h" +#include "amqpCore/AmqpOutboundEndpoint.h" +#include "Integration/Core/MessageHeaders.h" + +using namespace Caf::AmqpIntegration; + +AmqpOutboundEndpoint::AmqpOutboundEndpoint() : + _isInitialized(false), + _id(CAFCOMMON_GUID_NULL), + _expectReply(false), + _requiresReply(false), + CAF_CM_INIT("AmqpOutboundEndpoint") { +} + +AmqpOutboundEndpoint::~AmqpOutboundEndpoint() { +} + +void AmqpOutboundEndpoint::init( + SmartPtrAmqpTemplate amqpTemplate, + SmartPtrIAppConfig appConfig, + SmartPtrIAppContext appContext) { + CAF_CM_FUNCNAME("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(amqpTemplate); + CAF_CM_VALIDATE_SMARTPTR(appConfig); + CAF_CM_VALIDATE_SMARTPTR(appContext); + + _amqpTemplate = amqpTemplate; + if (!_exchangeName.length() && !_exchangeNameExpression.length()) { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "exchange-name or exchange-name-expression must be set before calling init()"); + } + if (!_routingKey.length() && !_routingKeyExpression.length()) { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "routing-key or routing-key-expression must be set before calling init()"); + } + ::UuidCreate(&_id); + + if (_exchangeNameExpression.length()) { + _exchangeNameHandler.CreateInstance(); + _exchangeNameHandler->init(appConfig, appContext, _exchangeNameExpression); + } + + if (_routingKeyExpression.length()) { + _routingKeyHandler.CreateInstance(); + _routingKeyHandler->init(appConfig, appContext, _routingKeyExpression); + } + + if (_requestHeaderMapperExpression.length()) { + SmartPtrDefaultAmqpHeaderMapper mapper; + mapper.CreateInstance(); + mapper->init(_requestHeaderMapperExpression); + _requestHeaderMapper = mapper; + } + + _isInitialized = true; +} + +void AmqpOutboundEndpoint::setExchangeName(const std::string& exchangeName) { + _exchangeName = exchangeName; +} + +void AmqpOutboundEndpoint::setExchangeNameExpression(const std::string& exchangeNameExpression) { + _exchangeNameExpression = exchangeNameExpression; +} + +void AmqpOutboundEndpoint::setRoutingKey(const std::string& routingKey) { + _routingKey = routingKey; +} + +void AmqpOutboundEndpoint::setRoutingKeyExpression(const std::string& routingKeyExpression) { + _routingKeyExpression = routingKeyExpression; +} +void AmqpOutboundEndpoint::setMappedRequestHeadersExpression(const std::string& expression) { + _requestHeaderMapperExpression = expression; +} + +void AmqpOutboundEndpoint::setExpectReply(const bool expectReply) { + _expectReply = expectReply; +} + +void AmqpOutboundEndpoint::setRequiresReply(const bool requiresReply) { + _requiresReply = requiresReply; +} + +void AmqpOutboundEndpoint::setComponentName(const std::string& name) { + _componentName = name; +} + +void AmqpOutboundEndpoint::setChannelResolver(SmartPtrIChannelResolver channelResolver) { + _channelResolver = channelResolver; +} + +UUID AmqpOutboundEndpoint::getHandlerId() const { + CAF_CM_FUNCNAME_VALIDATE("getHandlerId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _id; +} + +void AmqpOutboundEndpoint::handleMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + SmartPtrIIntMessage result = handleRequestMessage(message); + if (result) { + IIntMessage::SmartPtrCHeaders requestHeaders = message->getHeaders(); + handleResult(result, requestHeaders); + } else if (_requiresReply) { + std::stringstream msg; + msg << "No reply produced by handler '"; + if (_componentName.length()) { + msg << _componentName; + } else { + msg << BasePlatform::UuidToString(_id); + } + msg << "', and its 'requiresReply' property is set to true."; + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ReplyRequiredException, + 0, + msg.str().c_str()); + } +} + +SmartPtrIIntMessage AmqpOutboundEndpoint::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return NULL; +} + +void AmqpOutboundEndpoint::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); +} + +SmartPtrIIntMessage AmqpOutboundEndpoint::handleRequestMessage( + SmartPtrIIntMessage requestMessage) { + SmartPtrIIntMessage reply; + std::string exchangeName = _exchangeName; + std::string routingKey = _routingKey; + if (_expectReply) { + reply = sendAndReceive(exchangeName, routingKey, requestMessage); + } else { + send(exchangeName, routingKey, requestMessage); + } + return reply; +} + +void AmqpOutboundEndpoint::handleResult( + SmartPtrIIntMessage resultMessage, + IIntMessage::SmartPtrCHeaders requestHeaders) { + SmartPtrIIntMessage reply = createReplyMessage(resultMessage, requestHeaders); + sendReplyMessage( + reply, + resultMessage->findRequiredHeader(MessageHeaders::_sREPLY_CHANNEL)->toString()); +} + +void AmqpOutboundEndpoint::send( + const std::string& exchangeName, + const std::string& routingKey, + SmartPtrIIntMessage requestMessage) { + CAF_CM_FUNCNAME("send"); + + std::string resolvedExchange = exchangeName; + std::string resolvedRoutingKey = routingKey; + SmartPtrIVariant evalResult; + if (_exchangeNameHandler) { + evalResult = _exchangeNameHandler->evaluate(requestMessage); + if (evalResult) { + resolvedExchange = evalResult->toString(); + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ExpressionResultNull, + 0, + "The exchange name was not resolved"); + } + } + + if (_routingKeyHandler) { + evalResult = _routingKeyHandler->evaluate(requestMessage); + if (evalResult) { + resolvedRoutingKey = evalResult->toString(); + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ExpressionResultNull, + 0, + "The routing key was not resolved"); + } + } + + _amqpTemplate->send( + resolvedExchange, + resolvedRoutingKey, + requestMessage, + _requestHeaderMapper); +} + +SmartPtrIIntMessage AmqpOutboundEndpoint::sendAndReceive( + const std::string& exchangeName, + const std::string& routingKey, + SmartPtrIIntMessage requestMessage) { + CAF_CM_FUNCNAME("sendAndReceive"); + + std::string resolvedExchange = exchangeName; + std::string resolvedRoutingKey = routingKey; + SmartPtrIVariant evalResult; + if (_exchangeNameHandler) { + evalResult = _exchangeNameHandler->evaluate(requestMessage); + if (evalResult) { + resolvedExchange = evalResult->toString(); + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ExpressionResultNull, + 0, + "The exchange name was not resolved"); + } + } + + if (_routingKeyHandler) { + evalResult = _routingKeyHandler->evaluate(requestMessage); + if (evalResult) { + resolvedRoutingKey = evalResult->toString(); + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ExpressionResultNull, + 0, + "The routing key was not resolved"); + } + } + + return _amqpTemplate->sendAndReceive( + resolvedExchange, + resolvedRoutingKey, + requestMessage, + _requestHeaderMapper, + _responseHeaderMapper); +} + +SmartPtrIIntMessage AmqpOutboundEndpoint::createReplyMessage( + SmartPtrIIntMessage reply, + IIntMessage::SmartPtrCHeaders requestHeaders) { + SmartPtrCIntMessage replyMessage; + replyMessage.CreateInstance(); + replyMessage->initialize( + reply->getPayload(), + reply->getHeaders(), + requestHeaders); + return replyMessage; +} + +void AmqpOutboundEndpoint::sendReplyMessage( + SmartPtrIIntMessage reply, + const std::string& replyChannelHeaderValue) { + CAF_CM_FUNCNAME("sendReplyMessage"); + + if (_outputChannel) { + _outputChannel->send(reply); + } else if (replyChannelHeaderValue.length()) { + if (_channelResolver) { + SmartPtrIMessageChannel channel = + _channelResolver->resolveChannelName(replyChannelHeaderValue); + channel->send(reply); + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ChannelResolutionException, + 0, + "No ChannelResolver is available"); + } + } else { + CAF_CM_EXCEPTIONEX_VA0( + AmqpIntExceptions::ChannelResolutionException, + 0, + "No output-channel or replyChannel header available"); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.cpp new file mode 100644 index 000000000..c47a92009 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.cpp @@ -0,0 +1,22 @@ +/* + * Created on: Aug 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/api/Channel.h" +#include "AutoChannelClose.h" + +using namespace Caf::AmqpIntegration; + +AutoChannelClose::AutoChannelClose(AmqpClient::SmartPtrChannel channel) : + _channel(channel) {} + +AutoChannelClose::~AutoChannelClose() { + if (_channel) { + _channel->close(); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.h new file mode 100644 index 000000000..8e0addac8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/AutoChannelClose.h @@ -0,0 +1,39 @@ +/* + * Created on: Jun 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_AUTOCHANNELCLOSE_H_ +#define AMQPINTEGRATIONCORE_AUTOCHANNELCLOSE_H_ + + +#include "amqpClient/api/Channel.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @ingroup IntObjImpl + * @brief A helper class to automatically close a channel + *

+ * This class is helpful to mimic try/catch/finally logic in the code. + * Simply declare an instance on the stack, initialized with the channel. + * When the instance goes out of scope it will close the channel. + */ +class AMQPINTEGRATIONCORE_LINKAGE AutoChannelClose { +public: + /** + * @brief Construct the instance with the given channel + * @param channel the channel to auto-close + */ + AutoChannelClose(AmqpClient::SmartPtrChannel channel); + ~AutoChannelClose(); + +private: + AmqpClient::SmartPtrChannel _channel; +}; + +}} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingImpl.cpp new file mode 100644 index 000000000..d83e9bb66 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BindingImpl.cpp @@ -0,0 +1,50 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpCore/Binding.h" +#include "amqpCore/BindingImpl.h" + +using namespace Caf::AmqpIntegration; + +BindingImpl::BindingImpl() { +} + +BindingImpl::~BindingImpl() { +} + +void BindingImpl::init( + const std::string queue, + const std::string exchange, + const std::string routingKey) { + _queue = queue; + _exchange = exchange; + _routingKey = routingKey; +} + +std::string BindingImpl::getQueue() const { + return _queue; +} + +std::string BindingImpl::getExchange() const { + return _exchange; +} + +std::string BindingImpl::getRoutingKey() const { + return _routingKey; +} + +SmartPtrBinding AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createBinding( + const std::string queue, + const std::string exchange, + const std::string routingKey) { + SmartPtrBindingImpl binding; + binding.CreateInstance(); + binding->init(queue, exchange, routingKey); + return binding; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BlockingQueueConsumer.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BlockingQueueConsumer.cpp new file mode 100644 index 000000000..662796d28 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/BlockingQueueConsumer.cpp @@ -0,0 +1,455 @@ +/* + * Created on: Jul 30, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/Channel.h" +#include "amqpClient/api/Envelope.h" +#include "amqpCore/AmqpHeaderMapper.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpCore/BlockingQueueConsumer.h" +#include "Integration/Core/CIntException.h" +#include "Exception/CCafException.h" + +using namespace Caf::AmqpIntegration; + +#if (1) // BlockingQueueConsumer +BlockingQueueConsumer::BlockingQueueConsumer() : + _isInitialized(false), + _isRunning(false), + _isCanceled(false), + _deliveryQueue(NULL), + _acknowledgeMode(ACKNOWLEDGEMODE_NONE), + _prefetchCount(0), + CAF_CM_INIT_LOG("BlockingQueueConsumer") { + _parentLock.CreateInstance(); + _parentLock->initialize(); +} + +BlockingQueueConsumer::~BlockingQueueConsumer() { + if (_deliveryQueue) { + g_async_queue_unref(_deliveryQueue); + } +} + +void BlockingQueueConsumer::init( + SmartPtrConnectionFactory connectionFactory, + SmartPtrAmqpHeaderMapper headerMapper, + AcknowledgeMode acknowledgeMode, + uint32 prefetchCount, + const std::string& queue) { + CAF_CM_FUNCNAME("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(connectionFactory); + CAF_CM_VALIDATE_INTERFACE(headerMapper); + CAF_CM_VALIDATE_STRING(queue); + + CAF_CM_ASSERT(acknowledgeMode != ACKNOWLEDGEMODE_MANUAL); + + _connectionFactory = connectionFactory; + _headerMapper = headerMapper; + _acknowledgeMode = acknowledgeMode; + _prefetchCount = prefetchCount; + _queue = queue; + _deliveryQueue = g_async_queue_new_full(destroyQueueItem); + _isInitialized = true; +} + +AmqpClient::SmartPtrChannel BlockingQueueConsumer::getChannel() { + CAF_CM_FUNCNAME("getChannel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + return _channel; +} + +std::string BlockingQueueConsumer::getConsumerTag() { + CAF_CM_FUNCNAME("getConsumerTag"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + return _consumer->getConsumerTag(); +} + +SmartPtrIIntMessage BlockingQueueConsumer::nextMessage() { + CAF_CM_FUNCNAME("nextMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + + // simulate a blocking pop from the queue + gpointer data = g_async_queue_try_pop(_deliveryQueue); + while (!data && !_isCanceled) { + CThreadUtils::sleep(100); + data = g_async_queue_try_pop(_deliveryQueue); + } + + checkShutdown(); + SmartPtrIIntMessage message; + if (data) { + Delivery *deliveryPtr = reinterpret_cast(data); + SmartPtrDelivery delivery(deliveryPtr); + deliveryPtr->Release(); + message = handle(delivery); + } + return message; +} + +SmartPtrIIntMessage BlockingQueueConsumer::nextMessage(int32 timeout) { + CAF_CM_FUNCNAME("nextMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + + guint64 microTimeout = static_cast(timeout) * 1000; + gpointer data = g_async_queue_timeout_pop(_deliveryQueue, microTimeout); + + checkShutdown(); + SmartPtrIIntMessage message; + if (data) { + Delivery *deliveryPtr = reinterpret_cast(data); + SmartPtrDelivery delivery(deliveryPtr); + deliveryPtr->Release(); + message = handle(delivery); + } + return message; +} + +bool BlockingQueueConsumer::commitIfNecessary() { + CAF_CM_FUNCNAME("commitIfNecessary"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + + bool result = false; + std::set deliveryTags; + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + deliveryTags = _deliveryTags; + } + + try { + if (deliveryTags.size()) { + result = true; + if (_acknowledgeMode == ACKNOWLEDGEMODE_AUTO) { + std::set::const_reverse_iterator tag = deliveryTags.rbegin(); + CAF_CM_ASSERT(tag != deliveryTags.rend()); + CAF_CM_LOG_DEBUG_VA2( + "basicAck [tag=%Ld][tag count=%d]", + *tag, + deliveryTags.size()); + _channel->basicAck(*tag, true); + } + } + } + CAF_CM_CATCH_ALL; + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + _deliveryTags.clear(); + } + CAF_CM_THROWEXCEPTION; + return result; +} + +void BlockingQueueConsumer::rollbackOnExceptionIfNecessary(SmartPtrCCafException& ex) { + CAF_CM_FUNCNAME("rollbackOnExceptionIfNecessary"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(_isRunning); + + if (_acknowledgeMode == ACKNOWLEDGEMODE_AUTO) { + std::set deliveryTags; + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + deliveryTags = _deliveryTags; + } + + CAF_CM_LOG_DEBUG_VA2( + "Rejecting %d messages on app exception: %s", + deliveryTags.size(), + ex->getMsg().c_str()); + + try { + for (TConstIterator > tag(deliveryTags); tag; tag++) { +#ifdef FIXED + _channel->basicReject(*tag, true); +#endif + } + } + CAF_CM_CATCH_ALL; + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + _deliveryTags.clear(); + } + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_ERROR_VA1( + "App exception overridden by rollback exception: " + "%s", + ex->getFullMsg().c_str()); + ex = NULL; + CAF_CM_THROWEXCEPTION; + } + } +} + +void BlockingQueueConsumer::checkShutdown() { + CAF_CM_LOCK_UNLOCK1(_parentLock); + if (_shutdownException) { + _shutdownException->throwAddRefedSelf(); + } +} + +void BlockingQueueConsumer::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(!_isRunning); + + CAF_CM_LOG_DEBUG_VA0("Starting consumer"); + _isCanceled = false; + _connection = _connectionFactory->createConnection(); + _channel = _connection->createChannel(); + + try { + _consumer.CreateInstance(); + _consumer->init(this); + + // Set the prefetchCount if ack mode is not NONE (broker-auto) + if (_acknowledgeMode != ACKNOWLEDGEMODE_NONE) { + _channel->basicQos(0, _prefetchCount, false); + } + + if (_connectionFactory->getProtocol().compare("tunnel") != 0) { + // Verify that the queue exists + try { + _channel->queueDeclarePassive(_queue); + } catch (AmqpClient::AmqpExceptions::AmqpIoErrorException *ex) { + std::string exMsg = ex->getMsg(); + ex->Release(); + CAF_CM_EXCEPTIONEX_VA1( + FatalListenerStartupException, + 0, + "Cannot prepare queue for listener. " + "Either the queue does not exist or the broker will not allow us to use it. %s", + exMsg.c_str()); + } + } + CAF_CM_LOG_DEBUG_VA1("Starting on queue '%s'", _queue.c_str()); + _channel->basicConsume( + _queue, + _acknowledgeMode == ACKNOWLEDGEMODE_NONE, + _consumer); + CAF_CM_LOG_DEBUG_VA1("Started on queue '%s'", _queue.c_str()); + + _isRunning = true; + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_CRIT_CAFEXCEPTION; + if (_channel) { + _channel->close(); + _channel = NULL; + } + if (_connection) { + _connection->close(); + _connection = NULL; + } + } + CAF_CM_THROWEXCEPTION; +} + +void BlockingQueueConsumer::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isCanceled = true; + + try { + std::string consumerTag = _consumer ? _consumer->getConsumerTag() : std::string(); + if (_channel && consumerTag.length()) { + if (_channel->isOpen()) { + CAF_CM_LOG_DEBUG_VA1( + "Canceling consumer '%s'", + consumerTag.c_str()); + _channel->basicCancel(consumerTag); + + // If we are not using broker auto-ack then re-queue the messages + if (_acknowledgeMode != ACKNOWLEDGEMODE_NONE) { + _channel->basicRecover(true); + } + + // Wait for the cancelOk response + CAF_CM_LOG_DEBUG_VA0("Waiting for consumer handler to receive cancel.ok"); + uint64 start = CDateTimeUtils::getTimeMs(); + while (CDateTimeUtils::calcRemainingTime(start, timeoutMs)) { + gpointer data = g_async_queue_try_pop(_deliveryQueue); + if (data) { + Delivery *delivery = reinterpret_cast(data); + if (!delivery->envelope) { + break; + } + delivery->Release(); + } + } + } + } + } + CAF_CM_CATCH_ALL; + + SmartPtrCCafException savedException; + if (CAF_CM_ISEXCEPTION) { + savedException = CAF_CM_GETEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + + try { + if (_channel) { + _channel->close(); + _channel = NULL; + } + if (_connection) { + _connection->close(); + _connection = NULL; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + _consumer = NULL; + _isRunning = false; + _isCanceled = false; + + if (_shutdownException) { + _shutdownException = NULL; + } + + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + _deliveryTags.clear(); + } + + if (savedException) { + savedException->throwAddRefedSelf(); + } +} + +bool BlockingQueueConsumer::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _isRunning; +} + +SmartPtrIIntMessage BlockingQueueConsumer::handle(SmartPtrDelivery delivery) { + CAF_CM_FUNCNAME_VALIDATE("handle"); + CAF_CM_VALIDATE_INTERFACE(delivery); + + IIntMessage::SmartPtrCHeaders headers = _headerMapper->toHeaders( + delivery->properties, + delivery->envelope); + SmartPtrCIntMessage message; + message.CreateInstance(); + message->initialize(delivery->body, headers, NULL); + { + CAF_CM_LOCK_UNLOCK1(_parentLock); + _deliveryTags.insert(delivery->envelope->getDeliveryTag()); + } + return message; +} + +void BlockingQueueConsumer::destroyQueueItem(gpointer data) { + reinterpret_cast(data)->Release(); +} +#endif + +#if (1) // BlockingQueueConsumer::InternalConsumer +BlockingQueueConsumer::InternalConsumer::InternalConsumer() : + _deliveryQueue(NULL), + CAF_CM_INIT_LOG("InternalConsumer") { +} + +BlockingQueueConsumer::InternalConsumer::~InternalConsumer() { + if (_deliveryQueue) { + g_async_queue_unref(_deliveryQueue); + } +} + +void BlockingQueueConsumer::InternalConsumer::init( + BlockingQueueConsumer* parent) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_VALIDATE_PTR(parent); + _parent = parent; + _deliveryQueue = _parent->_deliveryQueue; + g_async_queue_ref(_deliveryQueue); +} + +void BlockingQueueConsumer::InternalConsumer::handleConsumeOk( + const std::string& consumerTag) { + CAF_CM_FUNCNAME_VALIDATE("handleConsumeOk"); + _consumerTag = consumerTag; + CAF_CM_LOG_DEBUG_VA1("Received ConsumeOk - consumer='%s'", _consumerTag.c_str()); +} + +void BlockingQueueConsumer::InternalConsumer::handleCancelOk( + const std::string& consumerTag) { + CAF_CM_FUNCNAME_VALIDATE("handleCancelOk"); + CAF_CM_LOG_DEBUG_VA1("Received CancelOk - consumer='%s'", consumerTag.c_str()); + BlockingQueueConsumer::SmartPtrDelivery delivery; + delivery.CreateInstance(); + g_async_queue_push( + _deliveryQueue, + delivery.GetAddRefedInterface()); +} + +void BlockingQueueConsumer::InternalConsumer::handleRecoverOk( + const std::string& consumerTag) { +} + +void BlockingQueueConsumer::InternalConsumer::handleDelivery( + const std::string& consumerTag, + const AmqpClient::SmartPtrEnvelope& envelope, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME_VALIDATE("handleDelivery"); + CAF_CM_VALIDATE_SMARTPTR(_parent); + + if (_parent->_isCanceled) { + CAF_CM_LOG_DEBUG_VA0("Received message but parent is canceled."); + } else { + BlockingQueueConsumer::SmartPtrDelivery delivery; + delivery.CreateInstance(); + delivery->envelope = envelope; + delivery->properties = properties; + delivery->body = body; + g_async_queue_push( + _deliveryQueue, + delivery.GetAddRefedInterface()); + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA4( + "Received message [exchange='%s'][rk='%s'][tag=%Lu][len=%d]", + envelope->getExchange().c_str(), + envelope->getRoutingKey().c_str(), + envelope->getDeliveryTag(), + body->getByteCount()); + } + } +} + +void BlockingQueueConsumer::InternalConsumer::handleShutdown( + const std::string& consumerTag, + SmartPtrCCafException& reason) { + CAF_CM_FUNCNAME_VALIDATE("handleShutdown"); + CAF_CM_VALIDATE_SMARTPTR(_parent); + CAF_CM_LOG_DEBUG_VA1( + "Received shutdown signal - consumer='%s'", + consumerTag.c_str()); + CAF_CM_LOCK_UNLOCK1(_parent->_parentLock); + _parent->_shutdownException = reason; + _parent->_deliveryTags.clear(); + _parent = NULL; +} + +std::string BlockingQueueConsumer::InternalConsumer::getConsumerTag() { + return _consumerTag; +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachedChannelHandler.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachedChannelHandler.cpp new file mode 100644 index 000000000..b2921c2c8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachedChannelHandler.cpp @@ -0,0 +1,382 @@ +/* + * Created on: Jun 1, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Exception/CCafException.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/AmqpMethods.h" +#include "amqpClient/api/Channel.h" +#include "amqpClient/api/Consumer.h" +#include "amqpClient/api/GetResponse.h" +#include "amqpClient/api/ReturnListener.h" +#include "amqpClient/api/amqpClient.h" +#include "amqpCore/CachingConnectionFactory.h" + +using namespace Caf::AmqpIntegration; + +CachingConnectionFactory::CachedChannelHandler::CachedChannelHandler() : + _parent(NULL), + CAF_CM_INIT_LOG("CachingConnectionFactory::CachedChannelHandler") { + CAF_CM_INIT_THREADSAFE; +} + +CachingConnectionFactory::CachedChannelHandler::~CachedChannelHandler() { +} + +void CachingConnectionFactory::CachedChannelHandler::init( + CachingConnectionFactory *parent, + AmqpClient::SmartPtrChannel channel) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_VALIDATE_PTR(parent); + CAF_CM_VALIDATE_SMARTPTR(channel); + + _parent = parent; + _channel = channel; +} + +void CachingConnectionFactory::CachedChannelHandler::logicalClose() { + if (_channel && !_channel->isOpen()) { + _channel = NULL; + } else { + // Allow for multiple close calls - if this channel is already + // in the cached channels container then noop else add it + // to the cached channel collection + TSmartConstIterator proxy(*(_parent->_cachedChannels)); + while (proxy) { + if (*proxy == this) { + break; + } + proxy++; + } + if (!proxy) { + _parent->_cachedChannels->push_back(this); + } + } +} + +void CachingConnectionFactory::CachedChannelHandler::physicalClose() { + if (_channel && _channel->isOpen()) { + _channel->close(); + _channel = NULL; + } +} + +void CachingConnectionFactory::CachedChannelHandler::checkChannel() { + if (!_channel || !_channel->isOpen()) { + _channel = _parent->createBareChannel(); + } +} + +void CachingConnectionFactory::CachedChannelHandler::postProcessCall(SmartPtrCCafException exception) { + CAF_CM_FUNCNAME_VALIDATE("postProcessCall"); + if (exception) { + if (!_channel || !_channel->isOpen()) { + CAF_CM_LOG_DEBUG_VA0("Detected closed channel on exception. Re-initializing"); + _channel = _parent->createBareChannel(); + } + exception->throwAddRefedSelf(); + } +} + +AmqpClient::SmartPtrChannel +CachingConnectionFactory::CachedChannelHandler::getTargetChannel() { + CAF_CM_LOCK_UNLOCK; + return _channel; +} + +void CachingConnectionFactory::CachedChannelHandler::close() { + CAF_CM_LOCK_UNLOCK; + bool shouldPhysicallyClose = true; + if (_parent->_isActive) { + CAF_CM_LOCK_UNLOCK1(_parent->_cachedChannelsMonitor); + if (_parent->_cachedChannels->size() < _parent->getChannelCacheSize()) { + logicalClose(); + shouldPhysicallyClose = false; + } + } + + if (shouldPhysicallyClose) { + physicalClose(); + } +} + +bool CachingConnectionFactory::CachedChannelHandler::isOpen() { + CAF_CM_LOCK_UNLOCK; + return (_channel && _channel->isOpen()); +} + +uint16 CachingConnectionFactory::CachedChannelHandler::getChannelNumber() { + CAF_CM_LOCK_UNLOCK; + checkChannel(); + return _channel->getChannelNumber(); +} + +void CachingConnectionFactory::CachedChannelHandler::basicAck( + const uint64 deliveryTag, + const bool ackMultiple) { + CAF_CM_FUNCNAME("basicAck"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + try { + _channel->basicAck(deliveryTag, ackMultiple); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); +} + +AmqpClient::SmartPtrGetResponse +CachingConnectionFactory::CachedChannelHandler::basicGet( + const std::string& queue, + const bool noAck) { + CAF_CM_FUNCNAME("basicAck"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::SmartPtrGetResponse response; + try { + response = _channel->basicGet(queue, noAck); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return response; +} + +void CachingConnectionFactory::CachedChannelHandler::basicPublish( + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME("basicPublish"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + try { + _channel->basicPublish(exchange, routingKey, properties, body); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); +} + +void CachingConnectionFactory::CachedChannelHandler::basicPublish( + const std::string& exchange, + const std::string& routingKey, + const bool mandatory, + const bool immediate, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + CAF_CM_FUNCNAME("basicPublish"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + try { + _channel->basicPublish( + exchange, + routingKey, + mandatory, + immediate, + properties, + body); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); +} + +AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk +CachingConnectionFactory::CachedChannelHandler::basicConsume( + const std::string& queue, + const AmqpClient::SmartPtrConsumer& consumer) { + CAF_CM_FUNCNAME("basicConsume"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk consumeOk; + try { + consumeOk = _channel->basicConsume(queue, consumer); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return consumeOk; +} + +AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk +CachingConnectionFactory::CachedChannelHandler::basicConsume( + const std::string& queue, + const bool noAck, + const AmqpClient::SmartPtrConsumer& consumer) { + CAF_CM_FUNCNAME("basicConsume"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk consumeOk; + try { + consumeOk = _channel->basicConsume(queue, noAck, consumer); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return consumeOk; +} + +AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk +CachingConnectionFactory::CachedChannelHandler::basicConsume( + const std::string& queue, + const std::string& consumerTag, + const bool noAck, + const bool noLocal, + const bool exclusive, + const AmqpClient::SmartPtrConsumer& consumer, + const AmqpClient::SmartPtrTable& arguments) { + CAF_CM_FUNCNAME("basicConsume"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk consumeOk; + try { + consumeOk = _channel->basicConsume( + queue, + consumerTag, + noAck, + noLocal, + exclusive, + consumer, + arguments); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return consumeOk; +} + +AmqpClient::AmqpMethods::Basic::SmartPtrCancelOk +CachingConnectionFactory::CachedChannelHandler::basicCancel( + const std::string& consumerTag) { + CAF_CM_FUNCNAME("basicCancel"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::AmqpMethods::Basic::SmartPtrCancelOk cancelOk; + try { + cancelOk = _channel->basicCancel(consumerTag); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return cancelOk; +} + +AmqpClient::AmqpMethods::Basic::SmartPtrRecoverOk +CachingConnectionFactory::CachedChannelHandler::basicRecover( + const bool requeue) { + CAF_CM_FUNCNAME("basicRecover"); + CAF_CM_LOCK_UNLOCK; + checkChannel(); + AmqpClient::AmqpMethods::Basic::SmartPtrRecoverOk recoverOk; + try { + recoverOk = _channel->basicRecover(requeue); + } + CAF_CM_CATCH_ALL; + postProcessCall(CAF_CM_GETEXCEPTION); + return recoverOk; +} + +AmqpClient::AmqpMethods::Basic::SmartPtrQosOk +CachingConnectionFactory::CachedChannelHandler::basicQos( + const uint32 prefetchSize, + const uint32 prefetchCount, + const bool global) { + return _channel->basicQos(prefetchSize, prefetchCount, global); +} + +void CachingConnectionFactory::CachedChannelHandler::basicReject( + const uint64 deliveryTag, + const bool requeue) { + return _channel->basicReject(deliveryTag, requeue); +} + +AmqpClient::AmqpMethods::Exchange::SmartPtrDeclareOk +CachingConnectionFactory::CachedChannelHandler::exchangeDeclare( + const std::string& exchange, + const std::string& type, + const bool durable, + const AmqpClient::SmartPtrTable& arguments) { + return _channel->exchangeDeclare(exchange, type, durable, arguments); +} + +AmqpClient::AmqpMethods::Exchange::SmartPtrDeleteOk +CachingConnectionFactory::CachedChannelHandler::exchangeDelete( + const std::string& exchange, + const bool ifUnused) { + return _channel->exchangeDelete(exchange, ifUnused); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk +CachingConnectionFactory::CachedChannelHandler::queueDeclare() { + return _channel->queueDeclare(); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk +CachingConnectionFactory::CachedChannelHandler::queueDeclare( + const std::string& queue, + const bool durable, + const bool exclusive, + const bool autoDelete, + const AmqpClient::SmartPtrTable& arguments) { + return _channel->queueDeclare( + queue, + durable, + exclusive, + autoDelete, + arguments); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk +CachingConnectionFactory::CachedChannelHandler::queueDeclarePassive( + const std::string& queue) { + return _channel->queueDeclarePassive(queue); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrDeleteOk +CachingConnectionFactory::CachedChannelHandler::queueDelete( + const std::string& queue, + const bool ifUnused, + const bool ifEmpty) { + return _channel->queueDelete(queue, ifUnused, ifEmpty); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrPurgeOk +CachingConnectionFactory::CachedChannelHandler::queuePurge( + const std::string& queue) { + return _channel->queuePurge(queue); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrBindOk +CachingConnectionFactory::CachedChannelHandler::queueBind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::SmartPtrTable& arguments) { + return _channel->queueBind( + queue, + exchange, + routingKey, + arguments); +} + +AmqpClient::AmqpMethods::Queue::SmartPtrUnbindOk +CachingConnectionFactory::CachedChannelHandler::queueUnbind( + const std::string& queue, + const std::string& exchange, + const std::string& routingKey, + const AmqpClient::SmartPtrTable& arguments) { + return _channel->queueUnbind( + queue, + exchange, + routingKey, + arguments); +} + +void CachingConnectionFactory::CachedChannelHandler::addReturnListener( + const AmqpClient::SmartPtrReturnListener& listener) { + return _channel->addReturnListener(listener); +} + +bool CachingConnectionFactory::CachedChannelHandler::removeReturnListener( + const AmqpClient::SmartPtrReturnListener& listener) { + return _channel->removeReturnListener(listener); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachingConnectionFactory.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachingConnectionFactory.cpp new file mode 100644 index 000000000..dd562b70d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CachingConnectionFactory.cpp @@ -0,0 +1,218 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/api/Channel.h" +#include "amqpClient/api/Connection.h" +#include "amqpCore/ChannelProxy.h" +#include "amqpCore/ConnectionListener.h" +#include "amqpCore/CachingConnectionFactory.h" + +using namespace Caf::AmqpIntegration; + +CachingConnectionFactory::CachingConnectionFactory() : + _isInitialized(false), + _isActive(true), + _channelCacheSize(2), + CAF_CM_INIT_LOG("CachingConnectionFactory") { + _connectionMonitor.CreateInstance(); + _connectionMonitor->initialize(); + + _cachedChannelsMonitor.CreateInstance(); + _cachedChannelsMonitor->initialize(); +} + +CachingConnectionFactory::~CachingConnectionFactory() { + CAF_CM_FUNCNAME("~CachingConnectionFactory"); + if (_connection) { + try { + try { + _connection->close(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + if (_cachedChannels) { + CAF_CM_LOCK_UNLOCK1(_cachedChannelsMonitor); + _cachedChannels->clear(); + _cachedChannels = NULL; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } +} + +void CachingConnectionFactory::init() { + init(std::string(),std::string()); +} + +void CachingConnectionFactory::init( + const std::string& protocol, + const std::string& host, + const uint32 port) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + AbstractConnectionFactory::init(AmqpClient::createConnectionFactory()); + setConnectionTimeout(10000); + std::string locProtocol = protocol; + if (locProtocol.empty()) { + locProtocol = getDefaultProtocol(); + } + std::string hostname = host; + if (hostname.empty()) { + hostname = getDefaultHostName(); + } + setHost(hostname); + setPort(port); + _cachedChannels.CreateInstance(); + _isInitialized = true; +} + +void CachingConnectionFactory::init( + const std::string& protocol, + const std::string& host) { + init(protocol, host, AmqpClient::DEFAULT_AMQP_PORT); +} + +void CachingConnectionFactory::init( + const uint32 port) { + init(std::string(), std::string(), port); +} + +void CachingConnectionFactory::init( + const AmqpClient::SmartPtrConnectionFactory& amqpConnectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + AbstractConnectionFactory::init(amqpConnectionFactory); + _cachedChannels.CreateInstance(); + _isInitialized = true; +} + +void CachingConnectionFactory::destroy() { + CAF_CM_FUNCNAME_VALIDATE("destroy"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // This method ends up calling reset() during _connection->destroy() which + // sets _connection to NULL. To prevent the wheels from disappearing from + // underneath the _connection, store a temporary reference to it. + SmartPtrChannelCachingConnectionProxy connectionRef = _connection; + CAF_CM_LOCK_UNLOCK1(_connectionMonitor); + if (_connection) { + _connection->destroy(); + _connection = NULL; + } + reset(); +} + +uint32 CachingConnectionFactory::getChannelCacheSize() { + return _channelCacheSize; +} + +AmqpClient::SmartPtrChannel CachingConnectionFactory::getChannel() { + CAF_CM_FUNCNAME_VALIDATE("getChannel"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + AmqpClient::SmartPtrChannel channel; + { + CAF_CM_LOCK_UNLOCK1(_cachedChannelsMonitor); + if (_cachedChannels->size()) { + channel = _cachedChannels->front(); + _cachedChannels->pop_front(); + } + } + if (channel) { + CAF_CM_LOG_DEBUG_VA1("found cached rabbit channel #%d", channel->getChannelNumber()); + } else { + channel = newCachedChannelProxy(); + } + return channel; +} + +void CachingConnectionFactory::setConnectionListeners( + const std::deque& listeners) { + CAF_CM_FUNCNAME_VALIDATE("setConnectionListeners"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + AbstractConnectionFactory::setConnectionListeners(listeners); + if (_connection) { + getConnectionListener()->onCreate(_connection); + } +} + +void CachingConnectionFactory::setChannelCacheSize(uint32 cacheSize) { + CAF_CM_FUNCNAME("setChannelCacheSize"); + CAF_CM_ASSERT(cacheSize >= 1); + _channelCacheSize = cacheSize; +} + +void CachingConnectionFactory::addConnectionListener( + const SmartPtrConnectionListener& listener) { + CAF_CM_FUNCNAME_VALIDATE("addConnectionListener"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(listener); + AbstractConnectionFactory::addConnectionListener(listener); + if (_connection) { + listener->onCreate(_connection); + } +} + +SmartPtrConnection CachingConnectionFactory::createConnection() { + CAF_CM_FUNCNAME_VALIDATE("createConnection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_LOCK_UNLOCK1(_connectionMonitor); + if (!_connection) { + _connection.CreateInstance(); + _connection->init(createBareConnection(), this); + getConnectionListener()->onCreate(_connection); + } + return _connection; +} + +void CachingConnectionFactory::reset() { + CAF_CM_FUNCNAME("reset"); + _isActive = false; + CAF_CM_LOCK_UNLOCK1(_cachedChannelsMonitor); + for (TSmartIterator channel(*_cachedChannels); + channel; + channel++) { + try { + AmqpClient::SmartPtrChannel target = channel->getTargetChannel(); + if (target) { + target->close(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + try { + _cachedChannels->clear(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + _isActive = true; + _connection = NULL; +} + +SmartPtrChannelProxy CachingConnectionFactory::newCachedChannelProxy(){ + AmqpClient::SmartPtrChannel channel = createBareChannel(); + SmartPtrCachedChannelHandler proxy; + proxy.CreateInstance(); + proxy->init(this, channel); + return proxy; +} + +AmqpClient::SmartPtrChannel CachingConnectionFactory::createBareChannel() { + if (!_connection || !_connection->isOpen()) { + _connection = NULL; + createConnection(); + } + return _connection->createBareChannel(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ChannelCachingConnectionProxy.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ChannelCachingConnectionProxy.cpp new file mode 100644 index 000000000..33f385700 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ChannelCachingConnectionProxy.cpp @@ -0,0 +1,68 @@ +/* + * Created on: Jun 1, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/api/Channel.h" +#include "amqpClient/api/Connection.h" +#include "amqpCore/CachingConnectionFactory.h" + +using namespace Caf::AmqpIntegration; + +CachingConnectionFactory::ChannelCachingConnectionProxy::ChannelCachingConnectionProxy() : + _parent(NULL), + CAF_CM_INIT_LOG("CachingConnectionFactory::ChannelCachingConnectionProxy") { +} + +CachingConnectionFactory::ChannelCachingConnectionProxy::~ChannelCachingConnectionProxy() { + _target = NULL; + _parent = NULL; +} + +void CachingConnectionFactory::ChannelCachingConnectionProxy::init( + SmartPtrConnection connection, + CachingConnectionFactory *parent) { + _target = connection; + _parent = parent; +} + +void CachingConnectionFactory::ChannelCachingConnectionProxy::destroy() { + CAF_CM_FUNCNAME("destroy"); + if (_target) { + _parent->getConnectionListener()->onClose(_target); + try { + _target->close(); + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; + try { + _parent->reset(); + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; + } + _target = NULL; +} + +SmartPtrConnection CachingConnectionFactory::ChannelCachingConnectionProxy::getTargetConnection() { + return _target; +} + +AmqpClient::SmartPtrChannel CachingConnectionFactory::ChannelCachingConnectionProxy::createChannel() { + return _parent->getChannel(); +} + +void CachingConnectionFactory::ChannelCachingConnectionProxy::close() { +} + +bool CachingConnectionFactory::ChannelCachingConnectionProxy::isOpen() { + return _target && _target->isOpen(); +} + +AmqpClient::SmartPtrChannel CachingConnectionFactory::ChannelCachingConnectionProxy::createBareChannel() { + return _target->createChannel(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CompositeConnectionListener.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CompositeConnectionListener.cpp new file mode 100644 index 000000000..40e45dffb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/CompositeConnectionListener.cpp @@ -0,0 +1,64 @@ +/* + * Created on: Jun 2, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/api/Connection.h" +#include "amqpCore/CompositeConnectionListener.h" + +using namespace Caf::AmqpIntegration; + +CompositeConnectionListener::CompositeConnectionListener() : + CAF_CM_INIT_LOG("CompositeConnectionListener") { +} + +CompositeConnectionListener::~CompositeConnectionListener() { +} + +void CompositeConnectionListener::setDelegates( + const ListenerDeque& delegates) { + _delegates = delegates; +} + +void CompositeConnectionListener::addDelegate( + const SmartPtrConnectionListener& delegate) { + CAF_CM_FUNCNAME_VALIDATE("addDelegate"); + CAF_CM_VALIDATE_SMARTPTR(delegate); + _delegates.push_back(delegate); +} + +void CompositeConnectionListener::onCreate( + const SmartPtrConnection& connection) { + CAF_CM_FUNCNAME("onCreate"); + CAF_CM_VALIDATE_SMARTPTR(connection); + for (TSmartIterator delegate(_delegates); + delegate; + delegate++) { + try { + delegate->onCreate(connection); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } +} + +void CompositeConnectionListener::onClose( + const SmartPtrConnection& connection) { + CAF_CM_FUNCNAME("onClose"); + CAF_CM_VALIDATE_SMARTPTR(connection); + for (TSmartIterator delegate(_delegates); + delegate; + delegate++) { + try { + delegate->onClose(connection); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.cpp new file mode 100644 index 000000000..ff300153d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/DefaultAmqpHeaderMapper.cpp @@ -0,0 +1,293 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Common/CVariant.h" +#include "Integration/IIntMessage.h" +#include "amqpClient/api/Envelope.h" +#include "amqpClient/api/amqpClient.h" +#include "amqpCore/DefaultAmqpHeaderMapper.h" +#include "Integration/Core/CIntMessageHeaders.h" +#include "Exception/CCafException.h" +#include "HeaderUtils.h" + +using namespace Caf::AmqpIntegration; + +DefaultAmqpHeaderMapper::DefaultAmqpHeaderMapper() : + _isInitialized(false), + CAF_CM_INIT("DefaultAmqpHeaderMapper") { +} + +DefaultAmqpHeaderMapper::~DefaultAmqpHeaderMapper() { +} + +void DefaultAmqpHeaderMapper::init(const std::string& userHeaderRegex) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + if (!userHeaderRegex.empty()) { + _userHeaderRegex.CreateInstance(); + _userHeaderRegex->initialize(userHeaderRegex); + } + + _isInitialized = true; +} + +AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties +DefaultAmqpHeaderMapper::fromHeaders( + IIntMessage::SmartPtrCHeaders headers) { + CAF_CM_FUNCNAME("fromHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties; + properties = AmqpClient::AmqpContentHeaders::createBasicProperties(); + + SmartPtrCVariant variant; + variant = HeaderUtils::getHeaderString(headers, APP_ID); + if (variant) { + properties->setAppId(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderString(headers, CONTENT_ENCODING); + if (variant) { + properties->setContentEncoding(g_variant_get_string(variant->get(), NULL)); + } else { + properties->setContentEncoding("UTF8"); + } + variant = HeaderUtils::getHeaderString(headers, CONTENT_TYPE); + if (variant) { + properties->setContentType(g_variant_get_string(variant->get(), NULL)); + } else { + properties->setContentType("text/plain"); + } + variant = HeaderUtils::getHeaderString(headers, CORRELATION_ID); + if (variant) { + properties->setCorrelationId(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderUint8(headers, DELIVERY_MODE); + if (variant) { + properties->setDeliveryMode(g_variant_get_byte(variant->get())); + } + variant = HeaderUtils::getHeaderString(headers, EXPIRATION); + if (variant) { + properties->setExpiration(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderString(headers, MESSAGE_ID); + if (variant) { + properties->setMessageId(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderString(headers, REPLY_TO); + if (variant) { + properties->setReplyTo(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderUint64(headers, TIMESTAMP); + if (variant) { + properties->setTimestamp(g_variant_get_uint64(variant->get())); + } + variant = HeaderUtils::getHeaderString(headers, TYPE); + if (variant) { + properties->setType(g_variant_get_string(variant->get(), NULL)); + } + variant = HeaderUtils::getHeaderString(headers, USER_ID); + if (variant) { + properties->setUserId(g_variant_get_string(variant->get(), NULL)); + } + + // map user-defined headers + if (_userHeaderRegex) { + AmqpClient::SmartPtrTable propertyHeaders; + propertyHeaders.CreateInstance(); + for (IIntMessage::CHeaders::const_iterator headerIter = headers->begin(); + headerIter != headers->end(); + headerIter++) { + const std::string headerName = headerIter->first; + if (_userHeaderRegex->isMatched(headerName)) { + const SmartPtrIVariant headerValue = headerIter->second.first; + CAF_CM_VALIDATE_SMARTPTR(headerValue); + GVariant *headerVal = headerValue->get(); + if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_STRING)) { + AmqpClient::tableAddUtf8( + headerName, + headerValue->toString(), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_BOOLEAN)) { + AmqpClient::tableAddBoolean( + headerName, + g_variant_get_boolean(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_BYTE)) { + AmqpClient::tableAddUint8( + headerName, + g_variant_get_byte(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_INT16)) { + AmqpClient::tableAddInt16( + headerName, + g_variant_get_int16(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_UINT16)) { + AmqpClient::tableAddUint16( + headerName, + g_variant_get_uint16(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_INT32)) { + AmqpClient::tableAddInt32( + headerName, + g_variant_get_int32(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_UINT32)) { + AmqpClient::tableAddUint32( + headerName, + g_variant_get_uint32(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_INT64)) { + AmqpClient::tableAddInt64( + headerName, + g_variant_get_int64(headerVal), + propertyHeaders); + } else if (g_variant_is_of_type(headerVal, G_VARIANT_TYPE_UINT64)) { + AmqpClient::tableAddUint64( + headerName, + g_variant_get_uint64(headerVal), + propertyHeaders); + } else { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "Unsupported GVariant conversion. [name='%s'][type='%s']", + headerName.c_str(), + g_variant_get_type_string(headerVal)); + } + } + } + if (propertyHeaders->size()) { + properties->setHeaders(propertyHeaders); + } + } + return properties; +} + +IIntMessage::SmartPtrCHeaders + DefaultAmqpHeaderMapper::toHeaders( + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties properties, + AmqpClient::SmartPtrEnvelope envelope) { + CAF_CM_FUNCNAME_VALIDATE("toHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CIntMessageHeaders messageHeaders; + messageHeaders.insertUint64(DELIVERY_TAG, envelope->getDeliveryTag()); + messageHeaders.insertString(RECEIVED_ROUTING_KEY, envelope->getRoutingKey()); + messageHeaders.insertBool(REDELIVERED, envelope->getRedelivered()); + + // The exchange name can be empty, meaning the default exchange + messageHeaders.insertStringOpt(RECEIVED_EXCHANGE, envelope->getExchange()); + + const uint32 flags = properties->getFlags(); + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_APP_ID_FLAG) { + messageHeaders.insertString(APP_ID, properties->getAppId()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_CONTENT_ENCODING_FLAG) { + messageHeaders.insertString(CONTENT_ENCODING, properties->getContentEncoding()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_CONTENT_TYPE_FLAG) { + messageHeaders.insertString(CONTENT_TYPE, properties->getContentType()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_CORRELATION_ID_FLAG) { + messageHeaders.insertString(CORRELATION_ID, properties->getCorrelationId()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_DEVLIVERY_MODE_FLAG) { + messageHeaders.insertUint8(DELIVERY_MODE, properties->getDeliveryMode()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_EXPIRATION_FLAG) { + messageHeaders.insertString(EXPIRATION, properties->getExpiration()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_MESSAGE_ID_FLAG) { + messageHeaders.insertString(MESSAGE_ID, properties->getMessageId()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_REPLY_TO_FLAG) { + messageHeaders.insertString(REPLY_TO, properties->getReplyTo()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_TIMESTAMP_FLAG) { + messageHeaders.insertUint64(TIMESTAMP, properties->getTimestamp()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_TYPE_FLAG) { + messageHeaders.insertString(TYPE, properties->getType()); + } + if (flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_USER_ID_FLAG) { + messageHeaders.insertString(USER_ID, properties->getUserId()); + } + if ((flags & AmqpClient::AmqpContentHeaders::BASIC_PROPERTY_HEADERS_FLAG) && + _userHeaderRegex) { + AmqpClient::SmartPtrTable table = properties->getHeaders(); + for (TSmartConstMapIterator field(*table); + field; + field++) { + const std::string fieldName = field.getKey(); + if (_userHeaderRegex->isMatched(fieldName)) { + GVariant *fieldVar = field->getValue(); + switch (field->getAmqpType()) { + case AmqpClient::Field::AMQP_FIELD_TYPE_UTF8: + messageHeaders.insertString(fieldName, g_variant_get_string(fieldVar, NULL)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_BOOLEAN: + messageHeaders.insertBool(fieldName, g_variant_get_boolean(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_I8: + case AmqpClient::Field::AMQP_FIELD_TYPE_U8: + messageHeaders.insertUint8(fieldName, g_variant_get_byte(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_I16: + messageHeaders.insertInt16(fieldName, g_variant_get_int16(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_U16: + messageHeaders.insertUint16(fieldName, g_variant_get_uint16(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_I32: + messageHeaders.insertInt32(fieldName, g_variant_get_int32(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_U32: + messageHeaders.insertUint32(fieldName, g_variant_get_uint32(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_I64: + messageHeaders.insertInt64(fieldName, g_variant_get_int64(fieldVar)); + break; + case AmqpClient::Field::AMQP_FIELD_TYPE_U64: + case AmqpClient::Field::AMQP_FIELD_TYPE_TIMESTAMP: + messageHeaders.insertUint64(fieldName, g_variant_get_uint64(fieldVar)); + break; + default: + break; + } + } + } + } + + return messageHeaders.getHeaders(); +} + +IIntMessage::SmartPtrCHeaders DefaultAmqpHeaderMapper::filterHeaders( + IIntMessage::SmartPtrCHeaders headers) { + CAF_CM_FUNCNAME_VALIDATE("filterHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + IIntMessage::SmartPtrCHeaders filteredHeaders; + filteredHeaders.CreateInstance(); + + if (_userHeaderRegex) { + for (IIntMessage::CHeaders::const_iterator headerIter = headers->begin(); + headerIter != headers->end(); + headerIter++) { + const std::string headerName = headerIter->first; + if (_userHeaderRegex->isMatched(headerName)) { + filteredHeaders->insert( + IIntMessage::CHeaders::value_type( + headerName, + std::make_pair(headerIter->second.first, headerIter->second.second))); + } + } + } + return filteredHeaders; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeImpl.cpp new file mode 100644 index 000000000..1ccdfbbba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/ExchangeImpl.cpp @@ -0,0 +1,128 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpCore/Exchange.h" +#include "amqpCore/ExchangeImpl.h" + +using namespace Caf::AmqpIntegration; + +const char *ExchangeTypes::DIRECT = "direct"; +const char *ExchangeTypes::TOPIC = "topic"; +const char *ExchangeTypes::HEADERS = "headers"; +const char *ExchangeTypes::FANOUT = "fanout"; + +AbstractExchange::AbstractExchange() : + _isDurable(true) { +} + +AbstractExchange::~AbstractExchange() { +} + +void AbstractExchange::init( + const std::string& name, + const bool isDurable) { + _name = name; + _isDurable = isDurable; +} + +std::string AbstractExchange::getName() const { + return _name; +} + +bool AbstractExchange::isDurable() const { + return _isDurable; +} + +DirectExchange::DirectExchange() { +} + +void DirectExchange::init( + const std::string name, + const bool durable) { + AbstractExchange::init(name, durable); +} + +std::string DirectExchange::getType() const { + return ExchangeTypes::DIRECT; +} + +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createDirectExchange( + const std::string& name, + const bool durable) { + SmartPtrDirectExchange exchange; + exchange.CreateInstance(); + exchange->init(name, durable); + return exchange; +} + +TopicExchange::TopicExchange() { +} + +void TopicExchange::init( + const std::string name, + const bool durable) { + AbstractExchange::init(name, durable); +} + +std::string TopicExchange::getType() const { + return ExchangeTypes::TOPIC; +} + +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createTopicExchange( + const std::string& name, + const bool durable) { + SmartPtrTopicExchange exchange; + exchange.CreateInstance(); + exchange->init(name, durable); + return exchange; +} + +HeadersExchange::HeadersExchange() { +} + +void HeadersExchange::init( + const std::string name, + const bool durable) { + AbstractExchange::init(name, durable); +} + +std::string HeadersExchange::getType() const { + return ExchangeTypes::HEADERS; +} + +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createHeadersExchange( + const std::string& name, + const bool durable) { + SmartPtrHeadersExchange exchange; + exchange.CreateInstance(); + exchange->init(name, durable); + return exchange; +} + +FanoutExchange::FanoutExchange() { +} + +void FanoutExchange::init( + const std::string name, + const bool durable) { + AbstractExchange::init(name, durable); +} + +std::string FanoutExchange::getType() const { + return ExchangeTypes::FANOUT; +} + +SmartPtrExchange AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createFanoutExchange( + const std::string& name, + const bool durable) { + SmartPtrFanoutExchange exchange; + exchange.CreateInstance(); + exchange->init(name, durable); + return exchange; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.cpp new file mode 100644 index 000000000..dc015685c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.cpp @@ -0,0 +1,114 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CVariant.h" +#include "Integration/IIntMessage.h" +#include "HeaderUtils.h" + +using namespace Caf::AmqpIntegration; + +SmartPtrCVariant HeaderUtils::getHeaderString( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + variant = CVariant::createString(header->second.first->toString()); + } + return variant; +} + +SmartPtrCVariant HeaderUtils::getHeaderUint8( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_BYTE)) { + variant = CVariant::createUint8(g_variant_get_byte(header->second.first->get())); + } else { + variant = CVariant::createUint8( + CStringConv::fromString(header->second.first->toString())); + } + } + return variant; +} + +SmartPtrCVariant HeaderUtils::getHeaderUint16( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT16)) { + variant = CVariant::createUint16(g_variant_get_uint16(header->second.first->get())); + } else { + variant = CVariant::createUint16( + CStringConv::fromString(header->second.first->toString())); + } + } + return variant; +} + +SmartPtrCVariant HeaderUtils::getHeaderUint32( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT32)) { + variant = CVariant::createUint32(g_variant_get_uint32(header->second.first->get())); + } else { + variant = CVariant::createUint32( + CStringConv::fromString(header->second.first->toString())); + } + } + return variant; +} + +SmartPtrCVariant HeaderUtils::getHeaderUint64( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT64)) { + variant = CVariant::createUint64(g_variant_get_uint64(header->second.first->get())); + } else { + variant = CVariant::createUint64( + CStringConv::fromString(header->second.first->toString())); + } + } + return variant; +} + +SmartPtrCVariant HeaderUtils::getHeaderBool( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + SmartPtrCVariant variant; + IIntMessage::CHeaders::const_iterator header = + headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_BOOLEAN)) { + variant = CVariant::createBool(g_variant_get_boolean(header->second.first->get())); + } else { + const std::string val = header->second.first->toString(); + variant = CVariant::createBool( + (val == "0") || + (g_ascii_strncasecmp(val.c_str(), "false", val.length()) == 0) + ? false : true); + } + } + return variant; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.h new file mode 100644 index 000000000..09ffcda3c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/HeaderUtils.h @@ -0,0 +1,84 @@ +/* + * Created on: Jun 6, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORE_HEADERUTILS_H_ +#define AMQPINTEGRATIONCORE_HEADERUTILS_H_ + +#include "Common/CVariant.h" +#include "Integration/IIntMessage.h" + +namespace Caf { namespace AmqpIntegration { + +/** + * @brief A collection of helper functions + */ +class AMQPINTEGRATIONCORE_LINKAGE HeaderUtils { +public: + /** + * @brief Extract a header value as text + * @param headers message headers + * @param tag value name + * @return the value as a variant String + */ + static SmartPtrCVariant getHeaderString( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + /** + * @brief Extract a header value as an unsigned 8-bit integer + * @param headers message headers + * @param tag value name + * @return the value as a variant Uint8 + */ + static SmartPtrCVariant getHeaderUint8( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + /** + * @brief Extract a header value as an unsigned 16-bit integer + * @param headers message headers + * @param tag value name + * @return the value as a variant Uint16 + */ + static SmartPtrCVariant getHeaderUint16( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + /** + * @brief Extract a header value as an unsigned 32-bit integer + * @param headers message headers + * @param tag value name + * @return the value as a variant Uint32 + */ + static SmartPtrCVariant getHeaderUint32( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + /** + * @brief Extract a header value as an unsigned 64-bit integer + * @param headers message headers + * @param tag value name + * @return the value as a variant Uint64 + */ + static SmartPtrCVariant getHeaderUint64( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + /** + * @brief Extract a header value as a boolean + * @param headers message headers + * @param tag value name + * @return the value as a variant Bool + */ + static SmartPtrCVariant getHeaderBool( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); +}; + +}} + +#endif /* AMQPINTEGRATIONCORE_HEADERUTILS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueImpl.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueImpl.cpp new file mode 100644 index 000000000..828ddfd98 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/QueueImpl.cpp @@ -0,0 +1,87 @@ +/* + * Created on: Jun 14, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpCore/Queue.h" +#include "amqpCore/QueueImpl.h" + +using namespace Caf::AmqpIntegration; + +QueueImpl::QueueImpl() : + _durable(false), + _exclusive(false), + _autoDelete(false) { +} + +QueueImpl::~QueueImpl() { +} + +void QueueImpl::init(const std::string& name) { + init(name, true, false, false); +} + +void QueueImpl::init( + const std::string& name, + const bool durable) { + init(name, durable, false, false); +} + +void QueueImpl::init( + const std::string& name, + const bool durable, + const bool exclusive, + const bool autoDelete) { + _name = name; + _durable = durable; + _exclusive = exclusive; + _autoDelete = autoDelete; +} + +std::string QueueImpl::getName() const { + return _name; +} + +bool QueueImpl::isDurable() const { + return _durable; +} + +bool QueueImpl::isExclusive() const { + return _exclusive; +} + +bool QueueImpl::isAutoDelete() const { + return _autoDelete; +} + +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createQueue( + const std::string& name) { + SmartPtrQueueImpl queue; + queue.CreateInstance(); + queue->init(name); + return queue; +} + +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createQueue( + const std::string& name, + const bool durable) { + SmartPtrQueueImpl queue; + queue.CreateInstance(); + queue->init(name, durable); + return queue; +} + +SmartPtrQueue AMQPINTEGRATIONCORE_LINKAGE Caf::AmqpIntegration::createQueue( + const std::string& name, + const bool durable, + const bool exclusive, + const bool autoDelete) { + SmartPtrQueueImpl queue; + queue.CreateInstance(); + queue->init(name, durable, exclusive, autoDelete); + return queue; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitAdmin.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitAdmin.cpp new file mode 100644 index 000000000..0acf40998 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitAdmin.cpp @@ -0,0 +1,316 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CVariant.h" +#include "amqpClient/api/AmqpMethods.h" +#include "amqpClient/api/Channel.h" +#include "amqpCore/Binding.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpCore/Exchange.h" +#include "amqpCore/Queue.h" +#include "amqpCore/RabbitAdmin.h" + +using namespace Caf::AmqpIntegration; + +RabbitAdmin::RabbitAdmin() : + _isInitialized(false), + CAF_CM_INIT_LOG("RabbitAdmin") { +} + +RabbitAdmin::~RabbitAdmin() { + CAF_CM_FUNCNAME("~RabbitAdmin"); + try { + if (_rabbitTemplate) { + _rabbitTemplate->term(); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void RabbitAdmin::init(SmartPtrConnectionFactory connectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(connectionFactory); + _rabbitTemplate.CreateInstance(); + _rabbitTemplate->init(connectionFactory); + _isInitialized = true; +} + +void RabbitAdmin::term() { + CAF_CM_FUNCNAME_VALIDATE("term"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _rabbitTemplate->term(); + _rabbitTemplate = NULL; +} + +void RabbitAdmin::declareExchange(SmartPtrExchange exchange) { + CAF_CM_FUNCNAME_VALIDATE("declareExchange"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(exchange); + SmartPtrDeclareExchangeExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute(executor, exchange.GetNonAddRefedInterface()); +} + +bool RabbitAdmin::deleteExchange(const std::string& exchange) { + CAF_CM_FUNCNAME_VALIDATE("deleteExchange"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(exchange); + SmartPtrDeleteExchangeExecutor executor; + executor.CreateInstance(); + gpointer result = _rabbitTemplate->execute( + executor, + const_cast(exchange.c_str())); + return result != NULL; +} + +SmartPtrQueue RabbitAdmin::declareQueue() { + CAF_CM_FUNCNAME_VALIDATE("declareQueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + SmartPtrDeclareQueueExecutor executor; + executor.CreateInstance(); + gpointer result = _rabbitTemplate->execute(executor, NULL); + CAF_CM_VALIDATE_PTR(result); + Queue *queuePtr = reinterpret_cast(result); + SmartPtrQueue queue(queuePtr); + queuePtr->Release(); + return queue; +} + +void RabbitAdmin::declareQueue(SmartPtrQueue queue) { + CAF_CM_FUNCNAME_VALIDATE("declareQueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + SmartPtrDeclareQueueExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute(executor, queue.GetNonAddRefedInterface()); +} + +bool RabbitAdmin::deleteQueue(const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("deleteQueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + SmartPtrDeleteQueueExecutor executor; + executor.CreateInstance(); + gpointer result = _rabbitTemplate->execute( + executor, + const_cast(queue.c_str())); + return result != NULL; +} + +void RabbitAdmin::deleteQueue( + const std::string& queue, + const bool unused, + const bool empty) { + CAF_CM_FUNCNAME_VALIDATE("deleteQueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + SmartPtrCVariant args[3]; + args[0] = CVariant::createString(queue); + args[1] = CVariant::createBool(unused); + args[2] = CVariant::createBool(empty); + SmartPtrDeleteQueueExExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute(executor, args); +} + +void RabbitAdmin::purgeQueue(const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("purgeQueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + SmartPtrPurgeQueueExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute( + executor, + const_cast(queue.c_str())); +} + +void RabbitAdmin::declareBinding(SmartPtrBinding binding) { + CAF_CM_FUNCNAME_VALIDATE("declareBinding"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(binding); + SmartPtrDeclareBindingExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute( + executor, + binding.GetNonAddRefedInterface()); +} + +void RabbitAdmin::removeBinding(SmartPtrBinding binding) { + CAF_CM_FUNCNAME_VALIDATE("removeBinding"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(binding); + SmartPtrRemoveBindingExecutor executor; + executor.CreateInstance(); + _rabbitTemplate->execute( + executor, + binding.GetNonAddRefedInterface()); +} + +gpointer RabbitAdmin::DeclareExchangeExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeclareExchangeExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + Exchange *exchange = reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA3( + "declaring exchange '%s' type '%s' durable=%d", + exchange->getName().c_str(), + exchange->getType().c_str(), + exchange->isDurable()); + channel->exchangeDeclare( + exchange->getName(), + exchange->getType(), + exchange->isDurable()); + return NULL; +} + +gpointer RabbitAdmin::DeleteExchangeExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeleteExchangeExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + const char *exchange = reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA1( + "deleting exchange '%s'", + exchange); + gpointer result = NULL; + try { + channel->exchangeDelete(exchange, false); + result = reinterpret_cast(0x01); + } catch (AmqpClient::AmqpExceptions::ChannelClosedByServerException *ex) { + ex->Release(); + } + return NULL; +} + +gpointer RabbitAdmin::DeclareQueueExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeclareQueueExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + + gpointer result = NULL; + if (data) { + Queue *queue = reinterpret_cast(data); + const std::string queueName = queue->getName(); + if (queueName.find("amq.", 0) == 0) { + CAF_CM_LOG_ERROR_VA1( + "Cannot declare queue '%s' because it's name begins with 'amq.'", + queueName.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA4( + "declaring queue '%s' [durable=%d][exclusive=%d][autoDelete=%d]", + queueName.c_str(), + queue->isDurable(), + queue->isExclusive(), + queue->isAutoDelete()); + + channel->queueDeclare( + queue->getName(), + queue->isDurable(), + queue->isExclusive(), + queue->isAutoDelete()); + } + } else { + AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk declareOk = + channel->queueDeclare(); + SmartPtrQueue queue = createQueue( + declareOk->getQueueName(), + false, + true, + true); + result = queue.GetAddRefedInterface(); + } + return result; +} + +gpointer RabbitAdmin::DeleteQueueExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeleteQueueExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + const char *queue = reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA1( + "deleting queue '%s'", + queue); + gpointer result = NULL; + try { + channel->queueDelete(queue, false, false); + result = reinterpret_cast(0x01); + } catch (AmqpClient::AmqpExceptions::ChannelClosedByServerException *ex) { + ex->Release(); + } + return result; +} + +gpointer RabbitAdmin::DeleteQueueExExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeleteQueueExExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + SmartPtrCVariant *args = reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA3( + "deleting queue '%s' [unused=%d][empty=%d]", + g_variant_get_string(args[0]->get(), NULL), + g_variant_get_boolean(args[1]->get()), + g_variant_get_boolean(args[2]->get())); + channel->queueDelete( + g_variant_get_string(args[0]->get(), NULL), + g_variant_get_boolean(args[1]->get()), + g_variant_get_boolean(args[2]->get())); + return NULL; +} + +gpointer RabbitAdmin::PurgeQueueExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::PurgeQueueExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + const char *queue = reinterpret_cast(data); + CAF_CM_LOG_DEBUG_VA1( + "purging queue '%s'", + queue); + channel->queuePurge(queue); + return NULL; +} + +gpointer RabbitAdmin::DeclareBindingExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::DeclareBindingExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + Binding *binding = reinterpret_cast(data); + channel->queueBind( + binding->getQueue(), + binding->getExchange(), + binding->getRoutingKey()); + return NULL; +} + +gpointer RabbitAdmin::RemoveBindingExecutor::execute( + AmqpClient::SmartPtrChannel channel, + gpointer data) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RabbitAdmin::RemoveBindingExecutor", "execute"); + CAF_CM_VALIDATE_SMARTPTR(channel); + CAF_CM_VALIDATE_PTR(data); + Binding *binding = reinterpret_cast(data); + channel->queueUnbind( + binding->getQueue(), + binding->getExchange(), + binding->getRoutingKey()); + return NULL; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitTemplate.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitTemplate.cpp new file mode 100644 index 000000000..2308d3643 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/RabbitTemplate.cpp @@ -0,0 +1,339 @@ +/* + * Created on: Jun 5, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/amqpImpl/BasicProperties.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "amqpClient/api/AmqpMethods.h" +#include "amqpClient/api/Channel.h" +#include "amqpClient/api/Envelope.h" +#include "amqpClient/api/GetResponse.h" +#include "amqpCore/AmqpHeaderMapper.h" +#include "amqpCore/AmqpTemplate.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpCore/DefaultAmqpHeaderMapper.h" +#include "amqpCore/RabbitTemplate.h" +#include "Exception/CCafException.h" +#include "AutoChannelClose.h" + +using namespace Caf::AmqpIntegration; + +std::string RabbitTemplate::DEFAULT_EXCHANGE = ""; +std::string RabbitTemplate::DEFAULT_ROUTING_KEY = ""; +int32 RabbitTemplate::DEFAULT_REPLY_TIMEOUT = 5000; + +RabbitTemplate::RabbitTemplate() : + _isInitialized(false), + _exchange(DEFAULT_EXCHANGE), + _routingKey(DEFAULT_ROUTING_KEY), + _replyTimeout(DEFAULT_REPLY_TIMEOUT), + CAF_CM_INIT_LOG("RabbitTemplate") { +} + +RabbitTemplate::~RabbitTemplate() { + CAF_CM_FUNCNAME("~RabbitTemplate"); + try { + term(); + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; +} + +void RabbitTemplate::init(SmartPtrConnectionFactory connectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(connectionFactory); + SmartPtrDefaultAmqpHeaderMapper defaultMapper; + defaultMapper.CreateInstance(); + defaultMapper->init(); + _headerMapper = defaultMapper; + _connectionFactory = connectionFactory; + _connection = _connectionFactory->createConnection(); + _isInitialized = true; +} + +void RabbitTemplate::term() { + if (_connection) { + _connection->close(); + _connection = NULL; + } +} + +void RabbitTemplate::setExchange(const std::string& exchange) { + _exchange = exchange; +} + +void RabbitTemplate::setRoutingKey(const std::string& routingKey) { + _routingKey = routingKey; +} + +void RabbitTemplate::setQueue(const std::string& queue) { + _queue = queue; +} + +void RabbitTemplate::setReplyTimeout(const uint32 replyTimeout) { + _replyTimeout = replyTimeout; +} + +void RabbitTemplate::setHeaderMapper(const SmartPtrAmqpHeaderMapper& headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("setHeaderMapper"); + CAF_CM_VALIDATE_SMARTPTR(headerMapper); + _headerMapper = headerMapper; +} + +void RabbitTemplate::send( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + send( + _exchange, + _routingKey, + message, + headerMapper); +} + +void RabbitTemplate::send( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + send( + _exchange, + routingKey, + message, + headerMapper); +} + +void RabbitTemplate::send( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + AmqpClient::SmartPtrChannel channel = _connection->createChannel(); + AutoChannelClose closer(channel); + doSend(channel, exchange, routingKey, message, headerMapper); +} + +SmartPtrIIntMessage RabbitTemplate::receive(SmartPtrAmqpHeaderMapper headerMapper) { + return receive(_queue, headerMapper); +} + +SmartPtrIIntMessage RabbitTemplate::receive( + const std::string& queueName, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("receive"); + CAF_CM_VALIDATE_STRING(queueName); + + SmartPtrCIntMessage message; + AmqpClient::SmartPtrChannel channel = _connection->createChannel(); + AutoChannelClose closer(channel); + AmqpClient::SmartPtrGetResponse response = channel->basicGet(queueName, true); + if (response) { + if (!headerMapper) { + headerMapper = _headerMapper; + } + IIntMessage::SmartPtrCHeaders headers = + headerMapper->toHeaders( + response->getProperties(), + response->getEnvelope()); + message.CreateInstance(); + message->initialize(response->getBody(), headers, + IIntMessage::SmartPtrCHeaders()); + } + return message; +} + +SmartPtrIIntMessage RabbitTemplate::sendAndReceive( + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + return sendAndReceive( + _exchange, + _routingKey, + message, + requestHeaderMapper, + responseHeaderMapper); +} + +SmartPtrIIntMessage RabbitTemplate::sendAndReceive( + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + return sendAndReceive( + _exchange, + routingKey, + message, + requestHeaderMapper, + responseHeaderMapper); +} + +SmartPtrIIntMessage RabbitTemplate::sendAndReceive( + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + AmqpClient::SmartPtrChannel channel = _connection->createChannel(); + AutoChannelClose closer(channel); + return doSendAndReceive( + channel, + exchange, + routingKey, + message, + requestHeaderMapper, + responseHeaderMapper); +} + +gpointer RabbitTemplate::execute(SmartPtrExecutor executor, gpointer data) { + CAF_CM_FUNCNAME_VALIDATE("execute"); + CAF_CM_VALIDATE_INTERFACE(executor); + AmqpClient::SmartPtrChannel channel = _connection->createChannel(); + CAF_CM_VALIDATE_SMARTPTR(channel); + AutoChannelClose closer(channel); + return executor->execute(channel, data); +} + +void RabbitTemplate::doSend( + AmqpClient::SmartPtrChannel channel, + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper headerMapper) { + CAF_CM_FUNCNAME_VALIDATE("doSend"); + CAF_CM_LOG_DEBUG_VA2( + "Publishing message on exchange [%s], routingKey= [%s]", + exchange.c_str(), + routingKey.c_str()); + + if (!headerMapper) { + headerMapper = _headerMapper; + } + + AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties props = headerMapper->fromHeaders(message->getHeaders()); + channel->basicPublish( + exchange, + routingKey, + false, + false, + props, + message->getPayload()); +} + +SmartPtrIIntMessage RabbitTemplate::doSendAndReceive( + AmqpClient::SmartPtrChannel channel, + const std::string& exchange, + const std::string& routingKey, + SmartPtrIIntMessage message, + SmartPtrAmqpHeaderMapper requestHeaderMapper, + SmartPtrAmqpHeaderMapper responseHeaderMapper) { + CAF_CM_FUNCNAME("doSendAndReceive"); + + if (!requestHeaderMapper) { + requestHeaderMapper = _headerMapper; + } + if (!responseHeaderMapper) { + responseHeaderMapper = _headerMapper; + } + + IIntMessage::SmartPtrCHeaders headers = message->getHeaders(); + if (headers->find(AmqpHeaderMapper::REPLY_TO) != headers->end()) { + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + 0, + "Send-and-receive methods can only be used if the message " + "does not already have a %s property", + AmqpHeaderMapper::REPLY_TO.c_str()); + } + + // Declare a temporary queue and set the replyTo + AmqpClient::AmqpMethods::Queue::SmartPtrDeclareOk queueDeclareOk = + channel->queueDeclare(); + headers->insert( + std::make_pair( + AmqpHeaderMapper::REPLY_TO, + std::make_pair( + CVariant::createString(queueDeclareOk->getQueueName()), SmartPtrICafObject()))); + + // Create an inter-thread RPC mechanism to capture the response + SmartPtrSynchronousHandoff handoff; + handoff.CreateInstance(); + + // Spin up a consumer to wait for the response + SmartPtrDefaultConsumer consumer; + consumer.CreateInstance(); + consumer->init(responseHeaderMapper, handoff); + const std::string consumerTag = CStringUtils::createRandomUuid(); + const bool noAck = false; + const bool noLocal = true; + const bool exclusive = true; + AmqpClient::AmqpMethods::Basic::SmartPtrConsumeOk consumeOk = + channel->basicConsume( + queueDeclareOk->getQueueName(), + consumerTag, + noAck, + noLocal, + exclusive, + consumer); + + // Send the message + doSend(channel, exchange, routingKey, message, requestHeaderMapper); + + // Wait for the reply + SmartPtrIIntMessage reply = handoff->get(_replyTimeout); + + // Cancel the consumer + channel->basicCancel(consumerTag); + + return reply; +} + +RabbitTemplate::DefaultConsumer::DefaultConsumer() { +} + +RabbitTemplate::DefaultConsumer::~DefaultConsumer() { +} + +void RabbitTemplate::DefaultConsumer::init( + SmartPtrAmqpHeaderMapper mapper, + SmartPtrSynchronousHandoff handoff) { + _mapper = mapper; + _handoff = handoff; +} + +void RabbitTemplate::DefaultConsumer::handleDelivery( + const std::string& consumerTag, + const AmqpClient::SmartPtrEnvelope& envelope, + const AmqpClient::AmqpContentHeaders::SmartPtrBasicProperties& properties, + const SmartPtrCDynamicByteArray& body) { + const IIntMessage::SmartPtrCHeaders headers = + _mapper->toHeaders(properties, envelope); + SmartPtrCIntMessage message; + message.CreateInstance(); + message->initialize(body, headers, IIntMessage::SmartPtrCHeaders()); + _handoff->set(message); +} + +void RabbitTemplate::DefaultConsumer::handleConsumeOk( + const std::string& consumerTag) { +} + +void RabbitTemplate::DefaultConsumer::handleCancelOk( + const std::string& consumerTag) { +} + +void RabbitTemplate::DefaultConsumer::handleRecoverOk( + const std::string& consumerTag) { +} + +void RabbitTemplate::DefaultConsumer::handleShutdown( + const std::string& consumerTag, + SmartPtrCCafException& reason) { +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleConnection.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleConnection.cpp new file mode 100644 index 000000000..f7ae62c4b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleConnection.cpp @@ -0,0 +1,43 @@ +/* + * Created on: May 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "amqpClient/api/Channel.h" +#include "amqpCore/SimpleConnection.h" + +using namespace Caf::AmqpIntegration; + +SimpleConnection::SimpleConnection() : + CAF_CM_INIT("SimpleConnection") { +} + +SimpleConnection::~SimpleConnection() { +} + +void SimpleConnection::init(const AmqpClient::SmartPtrConnection& delegate) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_delegate); + CAF_CM_VALIDATE_SMARTPTR(delegate); + _delegate = delegate; +} + +AmqpClient::SmartPtrChannel SimpleConnection::createChannel() { + CAF_CM_FUNCNAME_VALIDATE("createChannel"); + CAF_CM_PRECOND_ISINITIALIZED(_delegate); + return _delegate->createChannel(); +} + +void SimpleConnection::close() { + CAF_CM_FUNCNAME_VALIDATE("close"); + CAF_CM_PRECOND_ISINITIALIZED(_delegate); + _delegate->close(); +} + +bool SimpleConnection::isOpen() { + return _delegate && _delegate->isOpen(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleMessageListenerContainer.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleMessageListenerContainer.cpp new file mode 100644 index 000000000..c05634965 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/SimpleMessageListenerContainer.cpp @@ -0,0 +1,414 @@ +/* + * Created on: Aug 1, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IIntMessage.h" +#include "Integration/IThrowable.h" +#include "amqpClient/api/Channel.h" +#include "amqpCore/BlockingQueueConsumer.h" +#include "amqpClient/api/ConnectionFactory.h" +#include "amqpCore/DefaultAmqpHeaderMapper.h" +#include "amqpCore/MessageListener.h" +#include "amqpCore/SimpleMessageListenerContainer.h" +#include "Integration/Core/CIntException.h" +#include "Exception/CCafException.h" + +using namespace Caf::AmqpIntegration; + +SimpleMessageListenerContainer::SimpleMessageListenerContainer() : + _isInitialized(false), + _isRunning(false), + _isActive(false), + _debugTrace(true), + _acknowledgeMode(ACKNOWLEDGEMODE_NONE), + _receiveTimeout(5000), + _prefetchCount(0), + _txSize(1), + _recoveryInterval(30000), + CAF_CM_INIT_LOG("SimpleMessageListenerContainer") { +} + +SimpleMessageListenerContainer::~SimpleMessageListenerContainer() { +} + +void SimpleMessageListenerContainer::init() { + init(_connectionFactory); +} + +void SimpleMessageListenerContainer::init( + SmartPtrConnectionFactory connectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(_connectionFactory); + _connectionFactory = connectionFactory; + validateConfig(); + _isInitialized = true; + +} +void SimpleMessageListenerContainer::setAcknowledgeMode( + AcknowledgeMode acknowledgeMode) { + CAF_CM_FUNCNAME_VALIDATE("setAcknowledgeMode"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _acknowledgeMode = acknowledgeMode; +} + +void SimpleMessageListenerContainer::setPrefetchCount( + const uint32 prefetchCount) { + CAF_CM_FUNCNAME_VALIDATE("setPrefetchCount"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _prefetchCount = prefetchCount; +} + +void SimpleMessageListenerContainer::setReceiveTimeout( + const uint32 receiveTimeout) { + CAF_CM_FUNCNAME_VALIDATE("setReceiveTimeout"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_NOTZERO(receiveTimeout); + _receiveTimeout = receiveTimeout; +} + +void SimpleMessageListenerContainer::setRecoveryInterval( + const uint32 recoveryInterval) { + CAF_CM_FUNCNAME_VALIDATE("setRecoveryInterval"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_NOTZERO(recoveryInterval); + _recoveryInterval = recoveryInterval; +} + +void SimpleMessageListenerContainer::setTxSize( + const uint32 txSize) { + CAF_CM_FUNCNAME_VALIDATE("setTxSize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_NOTZERO(txSize); + _txSize = txSize; +} + +void SimpleMessageListenerContainer::setQueue( + const std::string& queue) { + CAF_CM_FUNCNAME_VALIDATE("setQueue"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(queue); + _queue = queue; +} + +void SimpleMessageListenerContainer::setConnectionFactory( + SmartPtrConnectionFactory connectionFactory) { + CAF_CM_FUNCNAME_VALIDATE("setConnectionFactory"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(connectionFactory); + _connectionFactory = connectionFactory; +} + +void SimpleMessageListenerContainer::setMessagerListener( + SmartPtrMessageListener messageListener) { + CAF_CM_FUNCNAME_VALIDATE("setMessageListener"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageListener); + _messageListener = messageListener; +} + +SmartPtrMessageListener SimpleMessageListenerContainer::getMessageListener() { + return _messageListener; +} + +void SimpleMessageListenerContainer::start(const uint32 timeout) { + CAF_CM_FUNCNAME("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_ASSERT(!_isRunning); + _isActive = true; + + CAF_CM_LOG_DEBUG_VA0("Starting Rabbit listener container"); + + _startupException.CreateInstance(); + + // There is no point in prefetching less than the transaction size because + // the consumer will stall since the broker will not receive an ack for delivered + // messages + const uint32 actualPrefetchCount = _prefetchCount > _txSize ? _prefetchCount : _txSize; + CAF_CM_LOG_DEBUG_VA3( + "Config: [prefetchCount=%d][txSize=%d][actualPrefetchCount=%d]", + _prefetchCount, + _txSize, + actualPrefetchCount); + + // At this level simply allow all headers to pass through. + // The message listener consuming the message will have + // an opportunity to filter the headers. + SmartPtrDefaultAmqpHeaderMapper headerMapper; + headerMapper.CreateInstance(); + headerMapper->init(".*"); + + _consumer.CreateInstance(); + _consumer->init( + _connectionFactory, + headerMapper, + _acknowledgeMode, + actualPrefetchCount, + _queue); + + SmartPtrAsyncMessageProcessingConsumer processor; + processor.CreateInstance(); + processor->init( + this, + _consumer, + _startupException, + timeout, + _recoveryInterval); + + _executor.CreateInstance(); + _executor->initialize(processor, processor); + _executor->execute(timeout); + + // Wait for the consumer to start or fail + const uint64 remainingTime = CDateTimeUtils::calcRemainingTime( + CDateTimeUtils::getTimeMs(), + timeout); + if (remainingTime) { + SmartPtrCCafException ex = _startupException->get(static_cast(remainingTime)); + if (ex) { + CAF_CM_LOG_CRIT_VA0("Fatal exception on listener startup"); + ex->throwAddRefedSelf(); + } + } else { + try { + _executor->cancel(timeout); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + CAF_CM_EXCEPTIONEX_VA0( + TimeoutException, + 0, + "The timeout value specified is not int32 enough to determine " + "if the consumer has started. Increase the timeout value."); + } + + _startupException = NULL; + _isRunning = true; +} + +void SimpleMessageListenerContainer::stop(const uint32 timeout) { + CAF_CM_FUNCNAME("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isActive = false; + if (_isRunning) { + try { + _executor->cancel(timeout); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + _isRunning = false; +} + +bool SimpleMessageListenerContainer::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _isRunning; +} + +void SimpleMessageListenerContainer::validateConfig() { + CAF_CM_FUNCNAME_VALIDATE("validateConfig"); + CAF_CM_VALIDATE_INTERFACE(_connectionFactory); + CAF_CM_VALIDATE_INTERFACE(_messageListener); + CAF_CM_VALIDATE_STRING(_queue); + CAF_CM_VALIDATE_NOTZERO(_receiveTimeout); + CAF_CM_VALIDATE_NOTZERO(_recoveryInterval); + CAF_CM_VALIDATE_NOTZERO(_txSize); +} + +bool SimpleMessageListenerContainer::isActive() { + return _isActive; +} + +bool SimpleMessageListenerContainer::receiveAndExecute( + SmartPtrBlockingQueueConsumer consumer) { + CAF_CM_FUNCNAME("receiveAndExecute"); + AmqpClient::SmartPtrChannel channel = _consumer->getChannel(); + for (uint32 i = 0; i < _txSize; ++i) { + if (_debugTrace) { + CAF_CM_LOG_DEBUG_VA0("Waiting for message from consumer"); + } + SmartPtrIIntMessage message = _consumer->nextMessage(_receiveTimeout); + if (!message) { + break; + } + + try { + executeListener(channel, message); + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + SmartPtrCCafException ex = CAF_CM_GETEXCEPTION; + CAF_CM_CLEAREXCEPTION; + _consumer->rollbackOnExceptionIfNecessary(ex); + ex->throwAddRefedSelf(); + } + } + + return _consumer->commitIfNecessary(); +} + +void SimpleMessageListenerContainer::executeListener( + AmqpClient::SmartPtrChannel channel, + SmartPtrIIntMessage message) { + doInvokeListener(message); +} + +void SimpleMessageListenerContainer::doInvokeListener( + SmartPtrIIntMessage message) { + CAF_CM_FUNCNAME("doInvokeListener"); + try { + _messageListener->onMessage(message); + } catch (ListenerExecutionFailedException *ex) { + // noop - let 'er rip + ex->throwSelf(); + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + const std::string orig = CAF_CM_EXCEPTION_GET_FULLMSG; + CAF_CM_CLEAREXCEPTION; + CAF_CM_EXCEPTIONEX_VA1( + ListenerExecutionFailedException, + 0, + "Listener threw exception: %s", + orig.c_str()); + } +} + +void SimpleMessageListenerContainer::restart() { + CAF_CM_FUNCNAME_VALIDATE("restart"); + CAF_CM_LOG_DEBUG_VA0("Restarting Rabbit listener container"); + _isRunning = false; + start(30000); +} + +#if (1) // AsyncMessageProcessingConsumer +SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::AsyncMessageProcessingConsumer() : + _parent(NULL), + _timeout(0), + _recoveryInterval(0), + _isCanceled(false), + CAF_CM_INIT_LOG("SimpleMessageListenerContainer::AsyncMessageProcessingConsumer") { +} + +SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::~AsyncMessageProcessingConsumer() { +} + +void SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::init( + SimpleMessageListenerContainer *parent, + SmartPtrBlockingQueueConsumer consumer, + SmartPtrStartupExceptionHandoff startupException, + const uint32 timeout, + const uint32 recoveryInterval) { + _parent = parent; + _consumer = consumer; + _startupException = startupException; + _timeout = timeout; + _recoveryInterval = recoveryInterval; +} + +void SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::run() { + CAF_CM_FUNCNAME("run"); + bool isAborted = false; + + try { + try { + _consumer->start(_timeout); + _startupException->set(NULL); + _startupException = NULL; + } catch (FatalListenerStartupException *ex) { + ex->throwSelf(); + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + _startupException->set(NULL); + _startupException = NULL; + CAF_CM_LOG_ERROR_CAFEXCEPTION; + handleStartupFailure(); + CAF_CM_THROWEXCEPTION; + } + + bool isContinuable = false; + while (!_isCanceled && (_parent->isActive() || isContinuable)) { + try { + isContinuable = _parent->receiveAndExecute(_consumer); + } catch (ListenerExecutionFailedException *ex) { + // ignore + _logger.log( + log4cpp::Priority::ERROR, + _cm_funcName_, + __LINE__, + ex); + ex->Release(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_ERROR_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; + } + } catch (FatalListenerStartupException *ex) { + CAF_CM_LOG_ERROR_VA1( + "Consumer received fatal exception on startup: %s", + ex->getFullMsg().c_str()); + ex->Release(); + isAborted = true; + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_WARN_VA1( + "Consumer raised exception. Processing will restart if the connection " + "factory supports it. Exception: %s", + (CAF_CM_EXCEPTION_GET_FULLMSG).c_str()); + CAF_CM_CLEAREXCEPTION; + } + + if (_startupException) { + _startupException->set(NULL); + _startupException = NULL; + } + + if (_isCanceled) { + CAF_CM_LOG_DEBUG_VA0("Canceling due to TaskContainer->cancel()"); + } else { + if (!_parent->isActive() || isAborted) { + CAF_CM_LOG_DEBUG_VA0("Canceling consumer"); + try { + _consumer->stop(_timeout); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_ERROR_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + if (isAborted) { + CAF_CM_LOG_INFO_VA0("Stopping parent container because of aborted consumer"); + _parent->stop(_timeout); + } + } else { + CAF_CM_LOG_INFO_VA0("Restarting consumer"); + _parent->restart(); + } + } +} + +void SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::cancel() { + _isCanceled = true; +} + +void SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::handleError( + const SmartPtrIThrowable& throwable, + const SmartPtrIIntMessage& message) const { +} + +void SimpleMessageListenerContainer::AsyncMessageProcessingConsumer::handleStartupFailure() { + uint64 start = CDateTimeUtils::getTimeMs(); + while (!_isCanceled && CDateTimeUtils::calcRemainingTime(start, _recoveryInterval)) { + CThreadUtils::sleep(100); + } +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/amqpIntegrationCoreLink.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/amqpIntegrationCoreLink.h new file mode 100644 index 000000000..a4e11abe4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/amqpIntegrationCoreLink.h @@ -0,0 +1,30 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AMQPINTEGRATIONCORELINK_H_ +#define AMQPINTEGRATIONCORELINK_H_ + +#ifndef AMQPINTEGRATIONCORE_LINKAGE + #ifdef WIN32 + #ifdef AMQP_CLIENT + #define AMQPINTEGRATIONCORE_LINKAGE __declspec(dllexport) + #else + #define AMQPINTEGRATIONCORE_LINKAGE __declspec(dllimport) + #endif + #else + #define AMQPINTEGRATIONCORE_LINKAGE + #endif +#endif + +#include "AmqpIntegrationCoreDefines.h" +#include "AmqpIntegrationCoreFunc.h" +#include "AmqpIntegrationExceptions.h" +#include "amqpCore/AmqpOutboundEndpoint.h" +#include "AutoChannelClose.h" +#include "HeaderUtils.h" + +#endif /* AMQPINTEGRATIONCORELINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/stdafx.h new file mode 100644 index 000000000..35338cdb2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpCore/src/amqpCore/stdafx.h @@ -0,0 +1,25 @@ +/* + * Created on: Jun 12, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifndef AMQPINTEGRATIONCORE_LINKAGE +#ifdef WIN32 +#define AMQPINTEGRATIONCORE_LINKAGE __declspec(dllexport) +#else +#define AMQPINTEGRATIONCORE_LINKAGE +#endif +#endif + +#include +#include +#include "AmqpIntegrationCoreFunc.h" +#include "AmqpIntegrationCoreDefines.h" +#include "AmqpIntegrationExceptions.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/include/AmqpListenerWorker.h b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/include/AmqpListenerWorker.h new file mode 100644 index 000000000..52c9e9ef8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/include/AmqpListenerWorker.h @@ -0,0 +1,36 @@ +/* + * Created on: Aug 20, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AmqpListenerWorker_h +#define AmqpListenerWorker_h + +#include "Common/CThreadSignal.h" +#include "Common/IWork.h" + +namespace Caf { + +class AmqpListenerWorker : + public IWork +{ +public: + AmqpListenerWorker(); + virtual ~AmqpListenerWorker(); + + void doWork(); + void stopWork(); + +private: + CThreadSignal _stopSignal; + CAF_THREADSIGNAL_CREATE; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(AmqpListenerWorker); +}; +CAF_DECLARE_SMART_POINTER(AmqpListenerWorker); +} + +#endif /* AmqpListenerWorker_h */ diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/AmqpListenerWorker.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/AmqpListenerWorker.cpp new file mode 100644 index 000000000..0728a6eb2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/AmqpListenerWorker.cpp @@ -0,0 +1,109 @@ +/* + * Created on: Aug 20, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ +// NOTE: windows.h defines macros for min and max. Specifying NOMINMAX to prevent +// macro definition. Must be specified before windows.h is included. +#define NOMINMAX + +#include "stdafx.h" + +#include "Integration/Core/CIntegrationAppContext.h" +#include "AmqpListenerWorker.h" +#include "Common/CLoggingUtils.h" +#include "amqpClient/api/AMQExceptions.h" + +using namespace Caf; + +AmqpListenerWorker::AmqpListenerWorker() : + CAF_CM_INIT_LOG("AmqpListenerWorker") { + CAF_THREADSIGNAL_INIT; + _stopSignal.initialize("AmqpListenerWorker::stopSignal"); +} + +AmqpListenerWorker::~AmqpListenerWorker() { +} + +void AmqpListenerWorker::doWork() { + CAF_CM_FUNCNAME("run"); + + const std::string monitorDir = AppConfigUtils::getRequiredString("monitor_dir"); + const std::string listenerConfiguredStage2Path = FileSystemUtils::buildPath( + monitorDir, "listenerConfiguredStage2.txt"); + if (FileSystemUtils::doesFileExist(listenerConfiguredStage2Path)) { + uint32 intShutdownTimeout = AppConfigUtils::getOptionalUint32( + "communication_amqp", + "shutdown_timeout"); + intShutdownTimeout = std::max(intShutdownTimeout, static_cast(5000)); + + SmartPtrCIntegrationAppContext intAppContext; + try { + CLoggingUtils::setStartupConfigFile( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogConfigFile), + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogDir)); + + uint32 intStartupTimeout = AppConfigUtils::getOptionalUint32( + "communication_amqp", + "startup_timeout"); + intStartupTimeout = std::max(intStartupTimeout, static_cast(5000)); + + uint32 connectionRetryInterval = AppConfigUtils::getOptionalUint32( + "communication_amqp", + "connection_retry_interval"); + connectionRetryInterval = std::max(connectionRetryInterval, static_cast(5000)); + + bool isSignaled = false; + do { + try { + CAF_CM_LOG_DEBUG_VA0("***** Initializing context"); + intAppContext.CreateInstance(); + intAppContext->initialize( + intStartupTimeout, + AppConfigUtils::getRequiredString("communication_amqp", "context_file")); + CAF_CM_LOG_DEBUG_VA0("***** Started. Waiting for stop signal."); + { + CAF_THREADSIGNAL_LOCK_UNLOCK; + _stopSignal.wait(CAF_THREADSIGNAL_MUTEX, 0); + } + CAF_CM_LOG_DEBUG_VA0("***** Received stop signal."); + break; + } catch (AmqpClient::AmqpExceptions::AmqpTimeoutException *ex) { + _logger.log( + log4cpp::Priority::WARN, + _cm_funcName_, + __LINE__, + ex); + ex->Release(); + CThreadUtils::sleep(connectionRetryInterval); + } + CAF_CM_CATCH_ALL; + CAF_CM_THROWEXCEPTION; + { + CAF_THREADSIGNAL_LOCK_UNLOCK; + isSignaled = _stopSignal.waitOrTimeout(CAF_THREADSIGNAL_MUTEX, 100); + } + } while (!isSignaled); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + try { + if (intAppContext) { + intAppContext->terminate(intShutdownTimeout); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; + } else { + CAF_CM_LOG_WARN_VA0("Listener not configured"); + } +} + +void AmqpListenerWorker::stopWork() { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_LOG_DEBUG_VA0("***** Setting stop signal."); + _stopSignal.signal(); +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/amqpListenerMain.cpp b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/amqpListenerMain.cpp new file mode 100644 index 000000000..a1ef73d88 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/amqpListenerMain.cpp @@ -0,0 +1,179 @@ +/* + * Created on: Aug 20, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "AmqpListenerWorker.h" +#include "Common/CLoggingUtils.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#ifndef WIN32 +#include +#endif + +bool _gDaemonized = true; +bool _gSysLogInfos = false; +SmartPtrAmqpListenerWorker _gAmqpListenerWorker; + +using namespace Caf; + +#ifndef WIN32 +extern "C" void TermHandler(int32 signum); +#endif + +int32 main(int32 argc, char** argv) { + HRESULT hr = CafInitialize::init(); + if (hr != S_OK) { +#ifndef WIN32 + ::syslog(LOG_ERR, "CommAmqpListener: CafInitialize::init() failed 0x%08X.", hr); +#endif + ::fprintf(stderr, "CommAmqpListener: CafInitialize::init() failed 0x%08X\n", hr); + return 1; + } + + CafInitialize::serviceConfig(); + + CAF_CM_STATIC_FUNC_LOG( "CommAmqpListener", "main" ); + SmartPtrIAppConfig appConfig; + try { + std::string appConfigEnv; + CEnvironmentUtils::readEnvironmentVar("CAF_APPCONFIG", appConfigEnv); + if (appConfigEnv.empty()) { + Cdeqstr deqstr; + deqstr.push_back("cafenv-appconfig"); + deqstr.push_back("persistence-appconfig"); + deqstr.push_back("CommAmqpListener-appconfig"); + deqstr.push_back("custom-appconfig"); + appConfig = getAppConfig(deqstr); + } else { + appConfig = getAppConfig(); + } + } catch(CCafException *ex) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "CommAmqpListener: getAppConfig() failed . %s", + ex->getFullMsg().c_str()); +#endif + ::fprintf( + stderr, + "CommAmqpListener: getAppConfig() failed . %s\n", + ex->getFullMsg().c_str()); + ex->Release(); + } catch (std::exception ex) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "CommAmqpListener: getAppConfig() failed . %s", + ex.what()); +#endif + ::fprintf( + stderr, + "CommAmqpListener: getAppConfig() failed . %s\n", + ex.what()); + } catch (...) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "CommAmqpListener: getAppConfig() failed . unknown exception"); +#endif + ::fprintf( + stderr, + "CommAmqpListener: getAppConfig() failed . unknown exception\n"); + } + + if (!appConfig) { + CafInitialize::term(); + return 1; + } + + int32 iRc = 0; + + try { + _gAmqpListenerWorker.CreateInstance(); + + const uint32 maxStrLen = 4096; + if ((argc < 1) || (NULL == argv) || (NULL == argv[0]) || (::strnlen(argv[0], maxStrLen) >= maxStrLen)) { + CAF_CM_EXCEPTION_VA0(E_INVALIDARG, "argc/argv are invalid"); + } + +#ifdef WIN32 + CWinService::initialize(_gAmqpListenerWorker); + CWinService::execute(argc, argv); +#else + const std::string procPath(reinterpret_cast(argv[0])); + Cdeqstr parts = CStringUtils::split(procPath, G_DIR_SEPARATOR); + std::string procName = "CommAmqpListener"; + if (parts.size()) { + procName = parts.back(); + } + + CDaemonUtils::MakeDaemon( + argc, + argv, + procPath, + procName, + TermHandler, + _gDaemonized, + _gSysLogInfos); + + CLoggingUtils::setStartupConfigFile( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogConfigFile), + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogDir)); + + _gAmqpListenerWorker->doWork(); +#endif + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + if (CAF_CM_ISEXCEPTION) { + const std::string msg = CAF_CM_EXCEPTION_GET_FULLMSG; +#ifndef WIN32 + ::syslog( + LOG_ERR, + "CommAmqpListener: %s", + msg.c_str()); +#endif + + ::fprintf( + stderr, + "CommAmqpListener: %s\n", + msg.c_str()); + iRc = 1; + } + CAF_CM_CLEAREXCEPTION; + _gAmqpListenerWorker = NULL; + CafInitialize::term(); + return iRc; +} + +extern "C" void TermHandler(int32 signum) { + CAF_CM_STATIC_FUNC_LOG_ONLY( "CommAmqpListener", "TermHandler" ); + + CAF_CM_ENTER { + switch (signum) { + case SIGTERM: + CAF_CM_LOG_INFO_VA0( "Received SIGTERM" ); + if (_gAmqpListenerWorker) { + _gAmqpListenerWorker->stopWork(); + } + break; + case SIGINT: + CAF_CM_LOG_INFO_VA0( "Received SIGINT" ); + if (_gAmqpListenerWorker) { + _gAmqpListenerWorker->stopWork(); + } + break; + default: + CAF_CM_LOG_ERROR_VA1( "Ignoring Unexpected signal %d", signum); + break; + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/stdafx.h new file mode 100644 index 000000000..d56857bb5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Communication/amqpListener/src/stdafx.h @@ -0,0 +1,19 @@ +/* + * Created on: Aug 20, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h +#define stdafx_h + +#include +#include + +#ifdef WIN32 +#include "CWinService.h" +#endif + + +#endif /* stdafx_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BaseDefines.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BaseDefines.h new file mode 100644 index 000000000..31cf47341 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BaseDefines.h @@ -0,0 +1,73 @@ +/* + * Author: mdonahue + * Created: Jan 12, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef SYS_INC_BASEDEFINES_H_ +#define SYS_INC_BASEDEFINES_H_ + +#ifdef ECM_SUB_SYSTEM +#error "The ECM_SUB_SYSTEM define has been deprecated. Use CAF_SUB_SYSTEM instead." +#endif + +#ifdef WIN32 +// Disable compiler warning 4275: non dll-interface used as base for dll-interface class +#pragma warning(disable: 4275) +#endif + +#include + +const gboolean GLIB_FALSE = (gboolean)0; +const gboolean GLIB_TRUE = !GLIB_FALSE; + +// Windows includes +#if defined( WIN32 ) + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + + #ifndef _WIN32_WINNT + #define _WIN32_WINNT 0x0502 + #endif + + #include +#endif + +#include +#if defined( WIN32 ) + typedef __int8 int8; + typedef unsigned __int8 uint8; + typedef __int16 int16; + typedef unsigned __int16 uint16; + typedef __int32 int32; + typedef unsigned __int32 uint32; + typedef __int64 int64; + typedef unsigned __int64 uint64; + + struct timezone + { + int32 tz_minuteswest; + int32 tz_dsttime; + }; + +#else + #include + + typedef signed char int8; + typedef unsigned char uint8; + typedef int16_t int16; + typedef uint16_t uint16; + typedef int32_t int32; + typedef uint32_t uint32; + typedef int64_t int64; + typedef uint64_t uint64; +#endif + +#include +#include + +#include "BasePlatformLink.h" + +#endif /* SYS_INC_BASEDEFINES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BasePlatformInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BasePlatformInc.h new file mode 100644 index 000000000..3f8de88db --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BasePlatformInc.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BasePlatformInc_h_ +#define BasePlatformInc_h_ + +#ifndef BASEPLATFORM_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define BASEPLATFORM_LINKAGE __declspec(dllexport) + #else + #define BASEPLATFORM_LINKAGE __declspec(dllimport) + #endif + #else + #define BASEPLATFORM_LINKAGE + #endif +#endif + +#include "PlatformTypes.h" +#include "PlatformDefines.h" +#include "PlatformErrors.h" +#include "PlatformIID.h" +#include "PlatformStringFunc.h" +#include "ICafObject.h" +#include "TCafObject.h" +#include "TCafQIObject.h" +#include "TCafSmartPtr.h" +#include "TCafStackObject.h" + +CAF_DECLARE_SMART_INTERFACE_POINTER(ICafObject); + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BasePlatformLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BasePlatformLink.h new file mode 100644 index 000000000..d21ca9e4c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/BasePlatformLink.h @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef BasePlatformLink_h_ +#define BasePlatformLink_h_ + +#include "BasePlatformInc.h" + +#include +#include +#include +#include +#include + +namespace Caf { + +// Basic string containers +typedef std::deque Cdeqstr; +typedef std::set Csetstr; +typedef std::vector Cvecstr; +typedef std::map Cmapstrstr; +typedef std::multimap Cmmapstrstr; +CAF_DECLARE_SMART_POINTER(Cdeqstr); +CAF_DECLARE_SMART_POINTER(Csetstr); +CAF_DECLARE_SMART_POINTER(Cvecstr); +CAF_DECLARE_SMART_POINTER(Cmapstrstr); +CAF_DECLARE_SMART_POINTER(Cmmapstrstr); + +// GUID containers +typedef std::vector Cvecguid; +typedef std::deque Cdeqguid; +CAF_DECLARE_SMART_POINTER(Cvecguid); +CAF_DECLARE_SMART_POINTER(Cdeqguid); + +struct SGuidLessThan +{ + bool operator()(const GUID clhs, const GUID crhs) const + { + return ::memcmp(&clhs, &crhs, sizeof(GUID)) < 0; + } +}; + +typedef std::set Csetguid; +CAF_DECLARE_SMART_POINTER(Csetguid); + +// class to extract first part of a pair +template +struct select1st +{ + typename T::first_type operator()(const T & p) const { return p.first; } +}; + +// template function to make use of select1st easy. +// T is a container whose value_type is a pair +template +select1st make_select1st(const T &) { return select1st(); }; + +// class to extract second part of a pair +template +struct select2nd +{ + typename T::second_type operator()(const T & p) const { return p.second; } +}; + +// template function to make use of select2nd easy. +// T is a container whose value_type is a pair +template +select2nd make_select2nd(const T &) { return select2nd(); }; + +} + +#ifdef WIN32 +#include "PlatformApi.h" +#endif + +#endif + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Collections.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Collections.h new file mode 100644 index 000000000..82a7f0e34 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Collections.h @@ -0,0 +1,14 @@ +/* + * Author: mdonahue + * Created: Jan 25, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef ITERATORS_H_ +#define ITERATORS_H_ + +#include "../src/Collections/Iterators/IteratorsInc.h" +#include "../src/Collections/Graphs/GraphsInc.h" + +#endif /* ITERATORS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CApplicationContext.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CApplicationContext.h new file mode 100644 index 000000000..a3dca08b5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CApplicationContext.h @@ -0,0 +1,114 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CApplicationContext_h_ +#define CApplicationContext_h_ + + +#include "Common/IAppContext.h" + +#include "IBean.h" + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER( CApplicationContext); + +class COMMONAGGREGATOR_LINKAGE CApplicationContext : public IAppContext { +private: + // Bean constructor arguments + struct CBeanCtorArg { + typedef enum { + NOT_SET, + REFERENCE, + VALUE + } ARG_TYPE; + + CBeanCtorArg(const ARG_TYPE type, const std::string& value) : + _type(type), + _value(value) {} + + ARG_TYPE _type; + std::string _value; + }; + + // key=constructor-arg index + typedef std::map CBeanCtorArgCollection; + + struct CBeanNode { + CBeanNode() : + _isInitialized(false) {} + + std::string _id; + std::string _class; + SmartPtrIBean _bean; + CBeanCtorArgCollection _ctorArgs; + Cmapstrstr _properties; + bool _isInitialized; + }; + CAF_DECLARE_SMART_POINTER(CBeanNode); + + struct CBeanNodeLess { + bool operator()( + const SmartPtrCBeanNode& lhs, + const SmartPtrCBeanNode& rhs) const { + return std::less()(lhs->_id, rhs->_id); + } + }; + + typedef TEdgeListGraph CBeanGraph; + + // key=bean id + typedef std::map CBeanCollection; + +public: + CApplicationContext(); + virtual ~CApplicationContext(); + +public: + void initialize(); + void initialize(const Cdeqstr& filenameCollection); + + void terminate(); + + SmartPtrCBeans getBeans() const; + +public: // IApplicationContext + SmartPtrIBean getBean(const std::string& name) const; + +private: + bool m_isInitialized; + CBeanCollection _beanCollection; + CBeanGraph::ClistVertexEdges _beanTopologySort; + Cdeqstr _filenameCollection; + +private: + std::string getDefaultBeanConfigFile() const; + + void parseBeanConfig( + const std::string& beanConfigFile, + CBeanCollection& beanCollection) const; + + void createBeanGraph( + CBeanCollection& beanCollection, + CBeanGraph& beanGraph, + CBeanGraph::ClistVertexEdges& beanTopologySort) const; + + void initializeBeans( + CBeanCollection& beanCollection, + CBeanGraph::ClistVertexEdges& beanTopologySort) const; + + void terminateBeans(CBeanGraph::ClistVertexEdges& beanTopologySort) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CApplicationContext); +}; + +} + +#endif // #ifndef CApplicationContext_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoCondition.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoCondition.h new file mode 100644 index 000000000..a03c511f0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoCondition.h @@ -0,0 +1,45 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAUTOCONDITION_H_ +#define CAUTOCONDITION_H_ + +#include "Common/CAutoCondition.h" + +#include "Common/CAutoMutex.h" + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoCondition { +public: + CAutoCondition(); + ~CAutoCondition(); + + void initialize(const std::string& name); + bool isInitialized() const; + + void close(); + + std::string getName() const; + + void signal(); + void wait(SmartPtrCAutoMutex& mutex); + bool waitUntil(SmartPtrCAutoMutex& mutex, gint64 endTime); + +private: + GCond _condition; + std::string _name; + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoCondition); +}; +CAF_DECLARE_SMART_POINTER(CAutoCondition); +} + +#endif /* CAUTOCONDITION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoMutex.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoMutex.h new file mode 100644 index 000000000..c5576c5a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoMutex.h @@ -0,0 +1,38 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAUTOMUTEX_H_ +#define CAUTOMUTEX_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoMutex { +public: + CAutoMutex(); + ~CAutoMutex(); + + void initialize(); + bool isInitialized() const; + + void lock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0); + void unlock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0); + + GMutex* getNonConstPtr(); + +private: + GMutex _mutex; + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoMutex); +}; +CAF_DECLARE_SMART_POINTER(CAutoMutex); + +} + +#endif /* CAUTOMUTEX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoRecMutex.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoRecMutex.h new file mode 100644 index 000000000..f13f0c4ee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CAutoRecMutex.h @@ -0,0 +1,38 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAUTORECMUTEX_H_ +#define CAUTORECMUTEX_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoRecMutex { +public: + CAutoRecMutex(); + ~CAutoRecMutex(); + + void initialize(); + bool isInitialized() const; + + void lock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0); + void unlock(const char* className = NULL, const char* funcName = NULL, const int32 lineNumber = 0); + + GRecMutex* getNonConstPtr(); + +private: + GRecMutex _mutex; + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoRecMutex); +}; +CAF_DECLARE_SMART_POINTER(CAutoRecMutex); + +} + +#endif /* CAUTORECMUTEX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CCafRegex.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CCafRegex.h new file mode 100644 index 000000000..23b4a86bb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CCafRegex.h @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCAFREGEX_H_ +#define CCAFREGEX_H_ + +#include "Common/CCafRegex.h" + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CCafRegex { +public: + CCafRegex(); + virtual ~CCafRegex(); + +public: + void initialize(const std::string& regex); + + bool isMatched(const std::string& source); + + std::map matchNames( + const std::string& source, + const std::set& names); + + std::deque matchName( + const std::string& source, + const std::string& name); + + std::string match( + const std::string& source, + const int32 matchNum); + + std::string replaceLiteral( + const std::string& source, + const std::string& replacement); + +public: + static std::string replaceLiteral( + const std::string& regex, + const std::string& source, + const std::string& replacement); + +private: + bool _isInitialized; + GRegex* _gRegex; + std::string _regex; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCafRegex); +}; + +CAF_DECLARE_SMART_POINTER(CCafRegex); + +} + +#endif /* CCAFREGEX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CCmdLineOptions.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CCmdLineOptions.h new file mode 100644 index 000000000..6ea7e3fbe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CCmdLineOptions.h @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCmdLineOptions_h_ +#define CCmdLineOptions_h_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CCmdLineOptions { +private: + typedef std::map CStringOptions; + typedef std::map CIntOptions; + typedef std::map CBoolOptions; + +public: + CCmdLineOptions(); + virtual ~CCmdLineOptions(); + +public: + void initialize(const std::string& cmdDescription, const uint32 maxOptions); + void parse(int32 argc, char* argv[]); + + void addStringOption(const std::string& longName, const char shortName, const std::string& optionDescription); + void addIntOption(const std::string& longName, const char shortName, const std::string& optionDescription); + void addBoolOption(const std::string& longName, const char shortName, const std::string& optionDescription); + + std::string findStringOption(const std::string& longName); + int32 findIntOption(const std::string& longName); + bool findBoolOption(const std::string& longName); + +private: + bool _isInitialized; + uint32 _optionCnt; + std::string _cmdDescription; + + uint32 _maxOptions; + GOptionEntry* _gOptions; + + CStringOptions _stringOptions; + CIntOptions _intOptions; + CBoolOptions _boolOptions; + + // Temporary for storing longNames and optionDescription for addFooOption() methods above. + std::vector _longNames, _optionDescriptions; + +private: + void checkOptionCnt( + const std::string& longName, + const uint32 optionCnt, + const uint32 maxOptions) const; + void populateOption( + GOptionEntry& optionEntry, + const std::string& longName, + const char shortName, + const std::string& optionDescription); + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCmdLineOptions); +}; + +CAF_DECLARE_SMART_POINTER( CCmdLineOptions); + +} + +#endif // #ifndef CCmdLineOptions_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CConfigParams.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CConfigParams.h new file mode 100644 index 000000000..42fe2fa60 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CConfigParams.h @@ -0,0 +1,68 @@ +/* + * Author: mdonahue + * Created: Jan 17, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCONFIGPARAMS_H_ +#define CCONFIGPARAMS_H_ + +#include "Common/IConfigParams.h" + +namespace Caf { + +/* + * This class wraps a GHashTable object where the key is a const char* and + * the value is a GVariant*. + * + * The key and value pointers inserted must exist for the lifetime of this object. + * Use the EKeyManagement and EValueMangement flags to control how this + * object destroys the contained hash table. + * + */ +class COMMONAGGREGATOR_LINKAGE CConfigParams : public IConfigParams { +public: + typedef enum { + EKeysUnmanaged, // Set if the caller will manage the lifetime of the keys + EKeysManaged // Set if this object is to detroy the keys upon destruction + } EKeyManagement; + + typedef enum { + EValuesUnmanaged, // Set if the caller will manage the lifetime of the values + EValuesManaged // Set if this object is to detroy the values upon destruction + } EValueManagement; + + CConfigParams(); + virtual ~CConfigParams(); + + void initialize( + const std::string& sectionName, + EKeyManagement keyManagement, + EValueManagement valueManagement); + +public: // IConfigParams + GVariant* lookup( + const char* key, + const EParamDisposition disposition = PARAM_REQUIRED) const; + + std::string getSectionName() const; + + void insert(const char* key, GVariant* value); + +private: + static void destroyKeyCallback(gpointer ptr); + static void destroyValueCallback(gpointer ptr); + +private: + std::string _sectionName; + GHashTable* _table; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CConfigParams); +}; + +CAF_DECLARE_SMART_POINTER(CConfigParams); + +} + +#endif /* CCONFIGPARAMS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CConfigParamsChain.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CConfigParamsChain.h new file mode 100644 index 000000000..3e8d6b041 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CConfigParamsChain.h @@ -0,0 +1,47 @@ +/* + * Author: mdonahue + * Created: Jan 17, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCONFIGPARAMSCHAIN_H_ +#define CCONFIGPARAMSCHAIN_H_ + +#include "Common/IConfigParams.h" + +#include "Common/CConfigParams.h" + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CConfigParamsChain : public IConfigParams { +public: + CConfigParamsChain(); + virtual ~CConfigParamsChain(); + + void initialize(CConfigParams::EKeyManagement keyManagement, + CConfigParams::EValueManagement valueManagement, + const SmartPtrIConfigParams& baseParams); + + void insert(const char* key, GVariant* value); + +public: // IConfigParams + GVariant* lookup(const char* key, const EParamDisposition disposition = PARAM_REQUIRED) const; + + std::string getSectionName() const; + +private: + static void destroyValueCallback(gpointer ptr); + +private: + SmartPtrCConfigParams _theseParams; + SmartPtrIConfigParams _baseParams; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CConfigParamsChain); +}; + +CAF_DECLARE_SMART_POINTER(CConfigParamsChain); + +} + +#endif /* CCONFIGPARAMSCHAIN_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CFileLock.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CFileLock.h new file mode 100644 index 000000000..e1d4655c4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CFileLock.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CFileLock_h_ +#define CFileLock_h_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CFileLock +{ +public: + enum ELockLevel + { + UNLOCK, + SHARED_LOCK, + EXCLUSIVE_LOCK + }; + +public: + // Ctor + CFileLock(); + + // dtor + ~CFileLock(); + + // initialize the lock for the specified file + void initialize(int32 iFileDescriptor); + + // initialize the lock for the specified file + void initialize(const char * cszFileName, bool bCreateFile = true); + + // Set the lock to the specified scope + void setLockLevel(ELockLevel eLockLevel, bool bDowngradeLock = false); + + // Set the lock to the specified if possible + bool attemptSetLockLevel(ELockLevel eLockLevel, bool bDowngradeLock = false); + + // Get the current lock level + ELockLevel getLockLevel() const; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CFileLock); + + bool _isInitialized; + bool _isFileDescriptorLocal; + int32 _fileDescriptor; + ELockLevel _lockLevel; +}; + +CAF_DECLARE_SMART_POINTER(CFileLock); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CIniFile.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CIniFile.h new file mode 100644 index 000000000..8b08647a8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CIniFile.h @@ -0,0 +1,118 @@ +/* + * Author: bwilliams + * Created: May 18, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CINIFILE_H_ +#define CINIFILE_H_ + + +#include "Common/CCafRegex.h" + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CIniFile { +public: + struct SIniEntry { + std::string _name; + std::string _valueRaw; + std::string _valueExpanded; + }; + CAF_DECLARE_SMART_POINTER(SIniEntry); + + struct SIniSection { + std::string _sectionName; + std::deque _entryCollection; + }; + CAF_DECLARE_SMART_POINTER(SIniSection); + +public: + CIniFile(); + virtual ~CIniFile(); + +public: + void initialize(const std::string& configFilePath); + + std::deque getSectionCollection(); + + std::deque getEntryCollection( + const std::string& sectionName); + + SmartPtrSIniEntry findOptionalEntry( + const std::string& sectionName, + const std::string& keyName); + + SmartPtrSIniEntry findRequiredEntry( + const std::string& sectionName, + const std::string& keyName); + + std::string findOptionalString( + const std::string& sectionName, + const std::string& keyName); + + std::string findRequiredString( + const std::string& sectionName, + const std::string& keyName); + + std::string findOptionalRawString( + const std::string& sectionName, + const std::string& keyName); + + std::string findRequiredRawString( + const std::string& sectionName, + const std::string& keyName); + + void log(); + + void setValue( + const std::string& sectionName, + const std::string& keyName, + const std::string& value); + + void deleteValue( + const std::string& sectionName, + const std::string& keyName); + +private: + struct SReplacement { + SmartPtrCCafRegex _regex; + std::string _value; + }; + CAF_DECLARE_SMART_POINTER(SReplacement); + +private: + std::deque parse( + const std::string& configFilePath) const; + + SmartPtrSReplacement createReplacement( + const std::string& keyName, + const std::string& value) const; + + SmartPtrSIniEntry createIniEntry( + const std::string& keyName, + const std::string& valueRaw, + const std::string& valueExpanded) const; + + void parseValuePath( + const std::string& valuePath, + std::string& valueName, + std::string& valueValue); + +private: + bool _isInitialized; + std::string _configFilePath; + std::deque _sectionCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CIniFile); +}; + +CAF_DECLARE_SMART_POINTER(CIniFile); + +} + +#endif /* CINIFILE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CLoggingSetter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CLoggingSetter.h new file mode 100644 index 000000000..cd1a4a5b2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CLoggingSetter.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CLoggingSetter_h_ +#define CLoggingSetter_h_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CLoggingSetter { +public: + CLoggingSetter(); + virtual ~CLoggingSetter(); + +public: + void initialize(const std::string& logDir); + +private: + bool _isInitialized; + bool _remapLoggingLocation; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CLoggingSetter); +}; + +CAF_DECLARE_SMART_POINTER(CLoggingSetter); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CLoggingUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CLoggingUtils.h new file mode 100644 index 000000000..66bfc4e35 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CLoggingUtils.h @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CLoggingUtils_H_ +#define CLoggingUtils_H_ + +#ifndef WIN32 +#include +#include "Common/CLoggingUtils.h" +#endif + +namespace Caf { + +class CLoggingUtils; +CAF_DECLARE_SMART_POINTER(CLoggingUtils); + +class COMMONAGGREGATOR_LINKAGE CLoggingUtils { +private: + typedef std::map PropertyMap; + +public: + static bool isConsoleAppenderUsed(); + static void setStartupConfigFile( + const std::string& configFile = "log4cpp_config", + const std::string& logDir = std::string()); + static std::string getConfigFile(); + static void resetConfigFile(); + static void setLogDir(const std::string& logDir); + +public: + CLoggingUtils(); + +private: + static SmartPtrCLoggingUtils getInstance(); + + static void loadConfig(const std::string& configFile); + + void loadProperties(); + +private: + static GRecMutex _sOpMutex; + static SmartPtrCLoggingUtils _sInstance; + + std::string _configFile; + PropertyMap _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CLoggingUtils); +}; + +} + +#endif /* CLoggingUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CManagedThreadPool.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CManagedThreadPool.h new file mode 100644 index 000000000..44362edfd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CManagedThreadPool.h @@ -0,0 +1,125 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMANAGEDTHREADPOOL_H_ +#define CMANAGEDTHREADPOOL_H_ + + +#include "ICafObject.h" + +namespace Caf { + +/** + * @author mdonahue + * @brief This class wraps a GThreadPool and makes it a bit more friendly to use. It + * also allows tasks to partially complete and be requeued. + * The shutdown behavior is to wait for all active tasks to finish. Inactive + * (unscheduled) tasks will be aborted. + */ +class COMMONAGGREGATOR_LINKAGE CManagedThreadPool { +public: + /** + * @brief Interface for task objects + */ + struct __declspec(novtable) IThreadTask : public ICafObject { + /** + * @brief execute task + * @retval true the task has completed its work and will be removed from the pool + * @retval false the task has not completed its work and will be requeued in the pool + */ + virtual bool run() = 0; + }; + CAF_DECLARE_SMART_INTERFACE_POINTER(IThreadTask); + typedef std::deque TaskDeque; + +public: + CManagedThreadPool(); + virtual ~CManagedThreadPool(); + + /** + * @brief initialize the thread pool + * @param poolName a friendly name for the pool to aid in debugging + * @param threadCount the number of task threads + * @param taskUpdateInterval optional task queue refresh rate in milliseconds + */ + void init( + const std::string& poolName, + uint32 threadCount, + uint32 taskUpdateInterval = 0); + + /** + * @brief terminate the thread pool + * All active tasks will be allowed to finish before this method returns + */ + void term(); + + /** + * @brief add a task to the pool + * @param task the task to add + */ + void enqueue(const SmartPtrIThreadTask& task); + + /** + * @brief add a collection of tasks to the pool + * @param tasks the tasks to add + */ + void enqueue(const TaskDeque& tasks); + + /** @brief A simple structure to report some statistics + * + */ + struct Stats { + /** The number of tasks under management */ + uint32 taskCount; + + /** The number of tasks waiting to be assigned to threads for execution */ + uint32 inactiveTaskCount; + + /** The number of tasks assigned to threads for execution */ + uint32 activeTaskCount; + + /** The number of tasks that have completed execution */ + uint32 completeTaskCount; + + /** The number of tasks that have executed but need to be requeued */ + uint32 incompleteTaskCount; + }; + + /** @return the current statistics */ + Stats getStats() const; + +private: + static gpointer poolWorkerFunc(gpointer context); + static void taskWorkerFunc(gpointer threadContext, gpointer NOT_USED); + +private: + void runPool(); + +private: + /** Default task update interval in milliseconds */ + static uint32 DEFAULT_TASK_UPDATE_INTERVAL; + +private: + bool _isInitialized; + volatile bool _isShuttingDown; + std::string _poolName; + GThreadPool *_threadPool; + typedef std::set TaskSet; + TaskSet _tasks; + GThread* _workerThread; + uint32 _taskUpdateInterval; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CManagedThreadPool); +}; +CAF_DECLARE_SMART_POINTER(CManagedThreadPool); + +} + +#endif /* CMANAGEDTHREADPOOL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CThreadPool.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CThreadPool.h new file mode 100644 index 000000000..aace4677f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CThreadPool.h @@ -0,0 +1,77 @@ +/* + * CThreadPool.h + * + * Created on: May 9, 2012 + * Author: mdonahue + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CTHREADPOOL_H_ +#define CTHREADPOOL_H_ + + +#include "ICafObject.h" + +#include "Common/CManagedThreadPool.h" + +namespace Caf { + +/** + * @author mdonahue + * @brief This class wraps a GThreadPool and makes it a bit more friendly to use. + * This class wraps up a GThreadPool as a lifetime-managed object that can be shared. + * The shutdown behavior is to wait for all tasks to finish. + */ +class COMMONAGGREGATOR_LINKAGE CThreadPool { +public: + /** + * @brief This is the interface for tasks queued in this thread pool + */ + struct __declspec(novtable) IThreadTask : public ICafObject { + /** + * @brief execute task + * @param userData the userData passed into the thread pool init() method + */ + virtual void run(gpointer userData) = 0; + }; + CAF_DECLARE_SMART_INTERFACE_POINTER(IThreadTask); + +public: + CThreadPool(); + virtual ~CThreadPool(); + + /** + * @brief Initialize the thread pool + * @param userData opaque data to be passed to each thread + * @param maxThreads the number of threads to create + */ + void init(gpointer userData, gint maxThreads); + + /** + * @brief Terminate the thread pool + * All tasks will be allowed to finish before this method returns + */ + void term(); + + /** + * @brief Add a task to the thread pool + * @param task interface to the task to add + */ + void addTask(const SmartPtrIThreadTask& task); + +private: + static void ThreadFunc(gpointer data, gpointer userData); + +private: + bool _isInitialized; + GThreadPool *_threadPool; + gpointer _userData; + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CThreadPool); +}; +CAF_DECLARE_SMART_POINTER(CThreadPool); + +} + +#endif /* CTHREADPOOL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CThreadSignal.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CThreadSignal.h new file mode 100644 index 000000000..29d48aa4c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CThreadSignal.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CThreadSignal_h_ +#define CThreadSignal_h_ + +#include "Common/CThreadSignal.h" + +#include "Common/CAutoMutex.h" +#include "Common/CAutoCondition.h" + +namespace Caf { + +// Class-level thread safety macros +#define CAF_THREADSIGNAL_CREATE \ + private: \ + mutable SmartPtrCAutoMutex _threadsync_mutex_ + +#define CAF_THREADSIGNAL_INIT \ + _threadsync_mutex_.CreateInstance(); \ + _threadsync_mutex_->initialize() + +#define CAF_THREADSIGNAL_MUTEX \ + _threadsync_mutex_ + +#define CAF_THREADSIGNAL_LOCK_UNLOCK \ + Caf::CAutoMutexLockUnlock _threadsync_auto_lock(CAF_THREADSIGNAL_MUTEX) + +#define CAF_THREADSIGNAL_LOCK_UNLOCK_LOG \ + Caf::CAutoMutexLockUnlock _threadsync_auto_lock(CAF_THREADSIGNAL_MUTEX, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME) + +class COMMONAGGREGATOR_LINKAGE CThreadSignal { +public: + CThreadSignal(); + virtual ~CThreadSignal(); + +public: + void initialize(const std::string& conditionName); + bool isInitialized() const; + void signal(); + void wait(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs); + bool waitOrTimeout(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs); + std::string getName() const; + void close(); + +private: + bool _isInitialized; + CAutoCondition _condition; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CThreadSignal); +}; + +CAF_DECLARE_SMART_POINTER( CThreadSignal); + +} + +#endif // #ifndef CThreadSignal_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CVariant.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CVariant.h new file mode 100644 index 000000000..7e40b5642 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/CVariant.h @@ -0,0 +1,65 @@ +/* + * Created on: Jun 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CVARIANT_H_ +#define CVARIANT_H_ + + +#include "IVariant.h" + +namespace Caf { + +/** + * @brief A class that holds a GVariant* to manage its lifetime + */ +CAF_DECLARE_CLASS_AND_SMART_POINTER(CVariant); + +class COMMONAGGREGATOR_LINKAGE CVariant : public IVariant { +public: + CVariant(); + virtual ~CVariant(); + + void set(GVariant *variant); + +public: // IVariant + GVariant *get() const; + + std::string toString() const; + + bool isString() const; + bool isBool() const; + bool isUint8() const; + bool isInt16() const; + bool isUint16() const; + bool isInt32() const; + bool isUint32() const; + bool isInt64() const; + bool isUint64() const; + +public: + static SmartPtrCVariant createString(const std::string& value); + static SmartPtrCVariant createBool(const bool value); + static SmartPtrCVariant createUint8(const uint8 value); + static SmartPtrCVariant createInt16(const int16 value); + static SmartPtrCVariant createUint16(const uint16 value); + static SmartPtrCVariant createInt32(const int32 value); + static SmartPtrCVariant createUint32(const uint32 value); + static SmartPtrCVariant createInt64(const int64 value); + static SmartPtrCVariant createUint64(const uint64 value); + +private: + bool isType(const GVariantType * varType) const; + +private: + GVariant *_variant; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CVariant); +}; + +} + +#endif /* CVARIANT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppConfig.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppConfig.h new file mode 100644 index 000000000..5eb3fc885 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppConfig.h @@ -0,0 +1,84 @@ +/* + * Author: mdonahue + * Created: Jan 19, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef IAPPCONFIG_H_ +#define IAPPCONFIG_H_ + +#include "Common/IConfigParams.h" + +#include "ICafObject.h" +#include "Common/IAppConfig.h" + +namespace Caf { + +struct __declspec(novtable) +IAppConfig : public ICafObject { + CAF_DECL_UUID("e57f2252-ce11-4d15-9338-aa928333f7a3") + + virtual SmartPtrIConfigParams getParameters(const std::string& sectionName) = 0; + + virtual bool getString( + const std::string& sectionName, + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getUint32( + const std::string& sectionName, + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getInt32( + const std::string& sectionName, + const std::string& parameterName, + int32& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getBoolean( + const std::string& sectionName, + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getGlobalString( + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getGlobalUint32( + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getGlobalInt32( + const std::string& parameterName, + int32& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual bool getGlobalBoolean( + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition = IConfigParams::PARAM_REQUIRED) = 0; + + virtual std::string resolveValue(const std::string& value) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IAppConfig); + +SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfig(); + +SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfig(const std::string& configFile); + +SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfig(const Cdeqstr& configFileCollection); + +SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfigAppend(const std::string& configFile); + +SmartPtrIAppConfig COMMONAGGREGATOR_LINKAGE getAppConfigAppend(const Cdeqstr& configFileCollection); +} + +#endif /* IAPPCONFIG_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppConfigWrite.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppConfigWrite.h new file mode 100644 index 000000000..f4b56cce6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppConfigWrite.h @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: Jan 28, 2015 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef IAPPCONFIGWRITE_H_ +#define IAPPCONFIGWRITE_H_ + +#include "Common/IAppConfigWrite.h" + +#include "ICafObject.h" + +namespace Caf { + +struct __declspec(novtable) +IAppConfigWrite : public ICafObject { + CAF_DECL_UUID("3cf708c6-b92d-46c3-83d8-edeccecf5ba4") + + virtual void setString( + const std::string& sectionName, + const std::string& parameterName, + const std::string& value) = 0; + + virtual void setUint32( + const std::string& sectionName, + const std::string& parameterName, + const uint32& value) = 0; + + virtual void setInt32( + const std::string& sectionName, + const std::string& parameterName, + const int32& value) = 0; + + virtual void setBoolean( + const std::string& sectionName, + const std::string& parameterName, + const bool& value) = 0; + + virtual void setGlobalString( + const std::string& parameterName, + const std::string& value) = 0; + + virtual void setGlobalUint32( + const std::string& parameterName, + const uint32& value) = 0; + + virtual void setGlobalInt32( + const std::string& parameterName, + const int32& value) = 0; + + virtual void setGlobalBoolean( + const std::string& parameterName, + const bool& value) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IAppConfigWrite); + +SmartPtrIAppConfigWrite COMMONAGGREGATOR_LINKAGE getAppConfigWrite(); + +SmartPtrIAppConfigWrite COMMONAGGREGATOR_LINKAGE getAppConfigWrite(const std::string& configFile); + +SmartPtrIAppConfigWrite COMMONAGGREGATOR_LINKAGE getAppConfigWrite(const Cdeqstr& configFileCollection); +} + +#endif /* IAPPCONFIGWRITE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppContext.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppContext.h new file mode 100644 index 000000000..1f8decdbf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IAppContext.h @@ -0,0 +1,33 @@ +/* + * Author: mdonahue + * Created: Jan 28, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef IAPPLICATIONCONTEXT_H_ +#define IAPPLICATIONCONTEXT_H_ + + + +#include "ICafObject.h" + +#include "IBean.h" + +namespace Caf { + +struct __declspec(novtable) +IAppContext : public ICafObject { + CAF_DECL_UUID("f1d65e47-0f12-4301-861c-6a8c90099dae") + + // key=bean id + typedef std::map CBeans; + CAF_DECLARE_SMART_POINTER(CBeans); + + virtual SmartPtrIBean getBean(const std::string& name) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IAppContext); +} + +#endif /* IAPPLICATIONCONTEXT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IConfigParams.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IConfigParams.h new file mode 100644 index 000000000..eef9ccc70 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IConfigParams.h @@ -0,0 +1,36 @@ +/* + * Author: mdonahue + * Created: Jan 17, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef ICONFIGPARAMS_H_ +#define ICONFIGPARAMS_H_ + +#include "Common/IConfigParams.h" + +namespace Caf { + +struct __declspec(novtable) +IConfigParams : public ICafObject +{ + typedef enum { + PARAM_REQUIRED, + PARAM_OPTIONAL + } EParamDisposition; + + virtual GVariant* lookup( + const char* key, + const EParamDisposition disposition = PARAM_REQUIRED) const = 0; + + virtual std::string getSectionName() const = 0; + + virtual void insert(const char* key, GVariant* value) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IConfigParams); + +} + +#endif /* ICONFIGPARAMS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IWork.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IWork.h new file mode 100644 index 000000000..950ea43ff --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Common/IWork.h @@ -0,0 +1,31 @@ +/* + * Author: bwilliams + * Created: June 29, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _CommonAggregator_IWork_h_ +#define _CommonAggregator_IWork_h_ + + +#include "ICafObject.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IWork : public ICafObject { + CAF_DECL_UUID("76c269db-691f-439d-b47d-87ce55639c8f") + +public: // Read operations + virtual void doWork() = 0; + virtual void stopWork() = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IWork); + +} + +#endif // #ifndef _CommonAggregator_IWork_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonDefines.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonDefines.h new file mode 100644 index 000000000..c110e0bfa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonDefines.h @@ -0,0 +1,33 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef COMMON_SYS_INC_COMMONDEFINES_H_ +#define COMMON_SYS_INC_COMMONDEFINES_H_ + +#include + +namespace Caf { +} + +// Aggregator +#include "../src/Common/CommonAggregatorLink.h" + +//////////////////////////////////////////////////////////////////////// +// endian ordering repair macros +//////////////////////////////////////////////////////////////////////// +#define CAF_FIX_16BIT_ENDIAN(x) x = (((x) >> 8) & 0xff) | ((x) << 8) +#define CAF_FIX_32BIT_ENDIAN(x) x = (((x) >> 24) & 0xff) | (((x) >> 8) & 0xff00) | (((x) & 0xff00) << 8) | ((x) << 24) +#define CAF_FIX_64BIT_ENDIAN(x) x = (((x) >> 56) & 0xff) | (((x) >> 40) & 0xff00) | (((x) >> 24) & 0xff0000) | \ + (((x) >> 8) & 0xff000000) | (((x) & 0xff000000) << 8) | \ + (((x) & 0xff0000) << 24) | (((x) & 0xff00) << 40) | \ + ((x) << 56) + +#define CAF_FIX_GUID_ENDIAN(guid) CAF_FIX_32BIT_ENDIAN(guid.Data1); \ + CAF_FIX_16BIT_ENDIAN(guid.Data2); \ + CAF_FIX_16BIT_ENDIAN(guid.Data3) + +#endif /* COMMON_SYS_INC_COMMONDEFINES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonGlobals.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonGlobals.h new file mode 100644 index 000000000..403017de7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/CommonGlobals.h @@ -0,0 +1,50 @@ +#ifndef CommonGlobals_h_ +#define CommonGlobals_h_ + +#include "FrameworkLink.h" + +namespace Caf { + extern FRAMEWORK_LINKAGE const char* _sConfigTmpDir; + extern FRAMEWORK_LINKAGE const char* _sConfigInputDir; + extern FRAMEWORK_LINKAGE const char* _sConfigOutputDir; + extern FRAMEWORK_LINKAGE const char* _sConfigSchemaCacheDir; + extern FRAMEWORK_LINKAGE const char* _sConfigProviderRegDir; + extern FRAMEWORK_LINKAGE const char* _sConfigInstallDir; + extern FRAMEWORK_LINKAGE const char* _sConfigInvokersDir; + extern FRAMEWORK_LINKAGE const char* _sConfigProvidersDir; + extern FRAMEWORK_LINKAGE const char* _sConfigCommonPackagesDir; + extern FRAMEWORK_LINKAGE const char* _sConfigWorkingDir; + extern FRAMEWORK_LINKAGE const char* _sConfigPrivateKeyFile; + extern FRAMEWORK_LINKAGE const char* _sConfigCertFile; + + extern FRAMEWORK_LINKAGE const char* _sProviderHostArea; + extern FRAMEWORK_LINKAGE const char* _sManagementAgentArea; + + extern FRAMEWORK_LINKAGE const char* _sSchemaSummaryFilename; + extern FRAMEWORK_LINKAGE const char* _sProviderResponseFilename; + extern FRAMEWORK_LINKAGE const char* _sStdoutFilename; + extern FRAMEWORK_LINKAGE const char* _sStderrFilename; + + extern FRAMEWORK_LINKAGE const char* _sPayloadRequestFilename; + extern FRAMEWORK_LINKAGE const char* _sResponseFilename; + extern FRAMEWORK_LINKAGE const char* _sErrorResponseFilename; + extern FRAMEWORK_LINKAGE const char* _sProviderRequestFilename; + extern FRAMEWORK_LINKAGE const char* _sInfraErrFilename; + + // AppConfig common parameter names + extern FRAMEWORK_LINKAGE const char* _sAppConfigGlobalParamRootDir; + extern FRAMEWORK_LINKAGE const char* _sAppConfigGlobalParamDataDir; + extern FRAMEWORK_LINKAGE const char* _sAppConfigGlobalParamLogDir; + extern FRAMEWORK_LINKAGE const char* _sAppConfigGlobalParamLogConfigFile; + extern FRAMEWORK_LINKAGE const char* _sAppConfigGlobalParamInputDir; + extern FRAMEWORK_LINKAGE const char* _sAppConfigGlobalParamOutputDir; + extern FRAMEWORK_LINKAGE const char* _sAppConfigGlobalParamDbDir; + extern FRAMEWORK_LINKAGE const char* _sAppConfigGlobalThreadStackSizeKb; + + extern FRAMEWORK_LINKAGE const GUID CAFCOMMON_GUID_NULL; + + extern FRAMEWORK_LINKAGE const char* CAFCOMMON_PATH_DELIM; + extern FRAMEWORK_LINKAGE const char CAFCOMMON_PATH_DELIM_CHAR; +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAddInCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAddInCollectionDoc.h new file mode 100644 index 000000000..8584c77a3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAddInCollectionDoc.h @@ -0,0 +1,45 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CAddInCollectionDoc_h_ +#define CAddInCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type AddInCollection +class CAFCORETYPESDOC_LINKAGE CAddInCollectionDoc { +public: + CAddInCollectionDoc(); + virtual ~CAddInCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque addInCollection = std::deque()); + +public: + /// Accessor for the AddIn + std::deque getAddInCollection() const; + +private: + bool _isInitialized; + + std::deque _addInCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CAddInCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAddInCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAddInsDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAddInsDoc.h new file mode 100644 index 000000000..c65b6de3d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAddInsDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CAddInsDoc_h_ +#define CAddInsDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAddInCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type AddIns +class CAFCORETYPESDOC_LINKAGE CAddInsDoc { +public: + CAddInsDoc(); + virtual ~CAddInsDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque addInCollection = std::deque()); + +public: + /// Accessor for the AddInCollection + std::deque getAddInCollection() const; + +private: + bool _isInitialized; + + std::deque _addInCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CAddInsDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAddInsDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h new file mode 100644 index 000000000..80004fe8d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CAttachmentCollectionDoc_h_ +#define CAttachmentCollectionDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h" + +namespace Caf { + +/// A simple container for objects of type AttachmentCollection +class CAFCORETYPESDOC_LINKAGE CAttachmentCollectionDoc { +public: + CAttachmentCollectionDoc(); + virtual ~CAttachmentCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque attachment = std::deque(), + const std::deque inlineAttachment = std::deque()); + +public: + /// Accessor for the Attachment + std::deque getAttachment() const; + + /// Accessor for the InlineAttachment + std::deque getInlineAttachment() const; + +private: + bool _isInitialized; + + std::deque _attachment; + std::deque _inlineAttachment; + +private: + CAF_CM_DECLARE_NOCOPY(CAttachmentCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAttachmentCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentDoc.h new file mode 100644 index 000000000..549f0b5a4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentDoc.h @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CAttachmentDoc_h_ +#define CAttachmentDoc_h_ + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +namespace Caf { + +/// A simple container for objects of type Attachment +class CAFCORETYPESDOC_LINKAGE CAttachmentDoc { +public: + CAttachmentDoc(); + virtual ~CAttachmentDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string type, + const std::string uri, + const bool isReference, + const CMS_POLICY cmsPolicy = CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED); + +public: + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Type + std::string getType() const; + + /// Accessor for the Uri + std::string getUri() const; + + /// Accessor for the IsReference + bool getIsReference() const; + + /// Accessor for the CMS Policy + CMS_POLICY getCmsPolicy() const; + +private: + bool _isInitialized; + + std::string _name; + std::string _type; + std::string _uri; + bool _isReference; + CMS_POLICY _cmsPolicy; + +private: + CAF_CM_DECLARE_NOCOPY(CAttachmentDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAttachmentDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h new file mode 100644 index 000000000..a48f5868c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h @@ -0,0 +1,45 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CAttachmentNameCollectionDoc_h_ +#define CAttachmentNameCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type AttachmentNameCollection +class CAFCORETYPESDOC_LINKAGE CAttachmentNameCollectionDoc { +public: + CAttachmentNameCollectionDoc(); + virtual ~CAttachmentNameCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque name = std::deque()); + +public: + /// Accessor for the Name + std::deque getName() const; + +private: + bool _isInitialized; + + std::deque _name; + +private: + CAF_CM_DECLARE_NOCOPY(CAttachmentNameCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAttachmentNameCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h new file mode 100644 index 000000000..e65f2b399 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CAuthnAuthzCollectionDoc_h_ +#define CAuthnAuthzCollectionDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h" + +namespace Caf { + +/// Set of logging levels for different components +class CAFCORETYPESDOC_LINKAGE CAuthnAuthzCollectionDoc { +public: + CAuthnAuthzCollectionDoc(); + virtual ~CAuthnAuthzCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque authnAuthz = std::deque()); + +public: + /// Used to change the logging level for a specific component + std::deque getAuthnAuthz() const; + +private: + bool _isInitialized; + + std::deque _authnAuthz; + +private: + CAF_CM_DECLARE_NOCOPY(CAuthnAuthzCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAuthnAuthzCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h new file mode 100644 index 000000000..3a8445a27 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: May 24, 2015 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CAuthnAuthzDoc_h_ +#define CAuthnAuthzDoc_h_ + +namespace Caf { + +/// A simple container for objects of type AuthnAuthz +class CAFCORETYPESDOC_LINKAGE CAuthnAuthzDoc { +public: + CAuthnAuthzDoc(); + virtual ~CAuthnAuthzDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string type, + const std::string value, + const std::string name = std::string(), + const int32 sequenceNumber = 0); + +public: + /// Accessor for the Type + std::string getType() const; + + /// Accessor for the Value + std::string getValue() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the SequenceNumber + int32 getSequenceNumber() const; + +private: + bool _isInitialized; + + std::string _type; + std::string _value; + std::string _name; + int32 _sequenceNumber; + +private: + CAF_CM_DECLARE_NOCOPY(CAuthnAuthzDoc); +}; + +CAF_DECLARE_SMART_POINTER(CAuthnAuthzDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CClassFiltersDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CClassFiltersDoc.h new file mode 100644 index 000000000..5c73a2cb9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CClassFiltersDoc.h @@ -0,0 +1,50 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CClassFiltersDoc_h_ +#define CClassFiltersDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ClassFilters +class CAFCORETYPESDOC_LINKAGE CClassFiltersDoc { +public: + CClassFiltersDoc(); + virtual ~CClassFiltersDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string dialect = std::string(), + const std::deque classFilter = std::deque()); + +public: + /// Accessor for the Dialect + std::string getDialect() const; + + /// Accessor for the ClassFilter + std::deque getClassFilter() const; + +private: + bool _isInitialized; + + std::string _dialect; + std::deque _classFilter; + +private: + CAF_CM_DECLARE_NOCOPY(CClassFiltersDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassFiltersDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CClassSpecifierDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CClassSpecifierDoc.h new file mode 100644 index 000000000..cfbd93e4d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CClassSpecifierDoc.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CClassSpecifierDoc_h_ +#define CClassSpecifierDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CClassFiltersDoc.h" +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" + +namespace Caf { + +/// A simple container for objects of type ClassSpecifier +class CAFCORETYPESDOC_LINKAGE CClassSpecifierDoc { +public: + CClassSpecifierDoc(); + virtual ~CClassSpecifierDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass = SmartPtrCFullyQualifiedClassGroupDoc(), + const SmartPtrCClassFiltersDoc classFilters = SmartPtrCClassFiltersDoc()); + +public: + /// Accessor for the FullyQualifiedClass + SmartPtrCFullyQualifiedClassGroupDoc getFullyQualifiedClass() const; + + /// Accessor for the ClassFilters + SmartPtrCClassFiltersDoc getClassFilters() const; + +private: + bool _isInitialized; + + SmartPtrCFullyQualifiedClassGroupDoc _fullyQualifiedClass; + SmartPtrCClassFiltersDoc _classFilters; + +private: + CAF_CM_DECLARE_NOCOPY(CClassSpecifierDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassSpecifierDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h new file mode 100644 index 000000000..c3c6ad273 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CFullyQualifiedClassGroupDoc_h_ +#define CFullyQualifiedClassGroupDoc_h_ + +namespace Caf { + +/// A simple container for objects of type FullyQualifiedClassGroup +class CAFCORETYPESDOC_LINKAGE CFullyQualifiedClassGroupDoc { +public: + CFullyQualifiedClassGroupDoc(); + virtual ~CFullyQualifiedClassGroupDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion); + +public: + /// Accessor for the ClassNamespace + std::string getClassNamespace() const; + + /// Accessor for the ClassName + std::string getClassName() const; + + /// Accessor for the ClassVersion + std::string getClassVersion() const; + +private: + bool _isInitialized; + + std::string _classNamespace; + std::string _className; + std::string _classVersion; + +private: + CAF_CM_DECLARE_NOCOPY(CFullyQualifiedClassGroupDoc); +}; + +CAF_DECLARE_SMART_POINTER(CFullyQualifiedClassGroupDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.h new file mode 100644 index 000000000..89850f053 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CInlineAttachmentCollectionDoc_h_ +#define CInlineAttachmentCollectionDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h" + +namespace Caf { + +/// A simple container for objects of type InlineAttachmentCollection +class CAFCORETYPESDOC_LINKAGE CInlineAttachmentCollectionDoc { +public: + CInlineAttachmentCollectionDoc(); + virtual ~CInlineAttachmentCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque attachment = std::deque()); + +public: + /// Accessor for the InlineAttachment + std::deque getInlineAttachment() const; + +private: + bool _isInitialized; + + std::deque _attachment; + +private: + CAF_CM_DECLARE_NOCOPY(CInlineAttachmentCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInlineAttachmentCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h new file mode 100644 index 000000000..719acd2f2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CInlineAttachmentDoc_h_ +#define CInlineAttachmentDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InlineAttachment +class CAFCORETYPESDOC_LINKAGE CInlineAttachmentDoc { +public: + CInlineAttachmentDoc(); + virtual ~CInlineAttachmentDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string type, + const std::string value); + +public: + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Type + std::string getType() const; + + /// Accessor for the Value + std::string getValue() const; + +private: + bool _isInitialized; + + std::string _name; + std::string _type; + std::string _value; + +private: + CAF_CM_DECLARE_NOCOPY(CInlineAttachmentDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInlineAttachmentDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h new file mode 100644 index 000000000..f86c18e76 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CLoggingLevelCollectionDoc_h_ +#define CLoggingLevelCollectionDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h" + +namespace Caf { + +/// Set of logging levels for different components +class CAFCORETYPESDOC_LINKAGE CLoggingLevelCollectionDoc { +public: + CLoggingLevelCollectionDoc(); + virtual ~CLoggingLevelCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque loggingLevel = std::deque()); + +public: + /// Used to change the logging level for a specific component + std::deque getLoggingLevel() const; + +private: + bool _isInitialized; + + std::deque _loggingLevel; + +private: + CAF_CM_DECLARE_NOCOPY(CLoggingLevelCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CLoggingLevelCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h new file mode 100644 index 000000000..ab5788eeb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h @@ -0,0 +1,52 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CLoggingLevelElemDoc_h_ +#define CLoggingLevelElemDoc_h_ + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +namespace Caf { + +/// Logging level for a component +class CAFCORETYPESDOC_LINKAGE CLoggingLevelElemDoc { +public: + CLoggingLevelElemDoc(); + virtual ~CLoggingLevelElemDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const LOGGINGCOMPONENT_TYPE component = LOGGINGCOMPONENT_NONE, + const LOGGINGLEVEL_TYPE level = LOGGINGLEVEL_NONE); + +public: + /// The logging level applies to this component + LOGGINGCOMPONENT_TYPE getComponent() const; + + /// Set the logging level to this value + LOGGINGLEVEL_TYPE getLevel() const; + +private: + LOGGINGCOMPONENT_TYPE _component; + LOGGINGLEVEL_TYPE _level; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CLoggingLevelElemDoc); +}; + +CAF_DECLARE_SMART_POINTER(CLoggingLevelElemDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/COperationDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/COperationDoc.h new file mode 100644 index 000000000..2e685eca2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/COperationDoc.h @@ -0,0 +1,53 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef COperationDoc_h_ +#define COperationDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type Operation +class CAFCORETYPESDOC_LINKAGE COperationDoc { +public: + COperationDoc(); + virtual ~COperationDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const SmartPtrCParameterCollectionDoc parameterCollection = SmartPtrCParameterCollectionDoc()); + +public: + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the ParameterCollection + SmartPtrCParameterCollectionDoc getParameterCollection() const; + +private: + bool _isInitialized; + + std::string _name; + SmartPtrCParameterCollectionDoc _parameterCollection; + +private: + CAF_CM_DECLARE_NOCOPY(COperationDoc); +}; + +CAF_DECLARE_SMART_POINTER(COperationDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CParameterCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CParameterCollectionDoc.h new file mode 100644 index 000000000..d0ccc19be --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CParameterCollectionDoc.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CParameterCollectionDoc_h_ +#define CParameterCollectionDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestParameterDoc.h" + +namespace Caf { + +/// A simple container for objects of type ParameterCollection +class CAFCORETYPESDOC_LINKAGE CParameterCollectionDoc { +public: + CParameterCollectionDoc(); + virtual ~CParameterCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque parameter = std::deque(), + const std::deque instanceParameter = std::deque()); + +public: + /// Accessor for the Parameter + std::deque getParameter() const; + + /// Accessor for the InstanceParameter + std::deque getInstanceParameter() const; + +private: + bool _isInitialized; + + std::deque _parameter; + std::deque _instanceParameter; + +private: + CAF_CM_DECLARE_NOCOPY(CParameterCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CParameterCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h new file mode 100644 index 000000000..62f445e30 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CPropertyCollectionDoc_h_ +#define CPropertyCollectionDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" + +namespace Caf { + +/// A simple container for objects of type PropertyCollection +class CAFCORETYPESDOC_LINKAGE CPropertyCollectionDoc { +public: + CPropertyCollectionDoc(); + virtual ~CPropertyCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque property = std::deque()); + +public: + /// Accessor for the Property + std::deque getProperty() const; + +private: + bool _isInitialized; + + std::deque _property; + +private: + CAF_CM_DECLARE_NOCOPY(CPropertyCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPropertyCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CPropertyDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CPropertyDoc.h new file mode 100644 index 000000000..10b4ea46b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CPropertyDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CPropertyDoc_h_ +#define CPropertyDoc_h_ + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +namespace Caf { + +/// A simple container for objects of type Property +class CAFCORETYPESDOC_LINKAGE CPropertyDoc { +public: + CPropertyDoc(); + virtual ~CPropertyDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const PROPERTY_TYPE type, + const std::deque value = std::deque()); + +public: + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Type + PROPERTY_TYPE getType() const; + + /// Accessor for the Value + std::deque getValue() const; + +private: + PROPERTY_TYPE _type; + + bool _isInitialized; + std::string _name; + std::deque _value; + +private: + CAF_CM_DECLARE_NOCOPY(CPropertyDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPropertyDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h new file mode 100644 index 000000000..ad4abd4df --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProtocolCollectionDoc_h_ +#define CProtocolCollectionDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CProtocolDoc.h" + +namespace Caf { + +/// Set of protocol +class CAFCORETYPESDOC_LINKAGE CProtocolCollectionDoc { +public: + CProtocolCollectionDoc(); + virtual ~CProtocolCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque protocol = std::deque()); + +public: + /// Used to change the logging level for a specific component + std::deque getProtocol() const; + +private: + bool _isInitialized; + + std::deque _protocol; + +private: + CAF_CM_DECLARE_NOCOPY(CProtocolCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProtocolCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CProtocolDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CProtocolDoc.h new file mode 100644 index 000000000..77814227e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CProtocolDoc.h @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProtocolDoc_h_ +#define CProtocolDoc_h_ + +namespace Caf { + +/// A simple container for objects of Protocol +class CAFCORETYPESDOC_LINKAGE CProtocolDoc { +public: + CProtocolDoc(); + virtual ~CProtocolDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string uri, + const std::string name = std::string(), + const int32 sequenceNumber = 0); + +public: + /// Accessor for the Uri + std::string getUri() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Value + int32 getSequenceNumber() const; + +private: + int32 _sequenceNumber; + bool _isInitialized; + + std::string _uri; + std::string _name; + +private: + CAF_CM_DECLARE_NOCOPY(CProtocolDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProtocolDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestConfigDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestConfigDoc.h new file mode 100644 index 000000000..1cce1a0ad --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestConfigDoc.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CRequestConfigDoc_h_ +#define CRequestConfigDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAddInsDoc.h" +#include "Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type RequestConfig +class CAFCORETYPESDOC_LINKAGE CRequestConfigDoc { +public: + CRequestConfigDoc(); + virtual ~CRequestConfigDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string responseFormatType, + const SmartPtrCAddInsDoc requestProcessorAddIns = SmartPtrCAddInsDoc(), + const SmartPtrCAddInsDoc responseProcessorAddIns = SmartPtrCAddInsDoc(), + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollection = SmartPtrCLoggingLevelCollectionDoc()); + +public: + /// Accessor for the ResponseFormatType + std::string getResponseFormatType() const; + + /// Accessor for the RequestProcessorAddIns + SmartPtrCAddInsDoc getRequestProcessorAddIns() const; + + /// Accessor for the ResponseProcessorAddIns + SmartPtrCAddInsDoc getResponseProcessorAddIns() const; + + /// Accessor for the LoggingLevelCollection + SmartPtrCLoggingLevelCollectionDoc getLoggingLevelCollection() const; + +private: + bool _isInitialized; + + std::string _responseFormatType; + SmartPtrCAddInsDoc _requestProcessorAddIns; + SmartPtrCAddInsDoc _responseProcessorAddIns; + SmartPtrCLoggingLevelCollectionDoc _loggingLevelCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CRequestConfigDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRequestConfigDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestHeaderDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestHeaderDoc.h new file mode 100644 index 000000000..49dc87131 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestHeaderDoc.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CRequestHeaderDoc_h_ +#define CRequestHeaderDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestConfigDoc.h" + +namespace Caf { + +/// A simple container for objects of type RequestHeader +class CAFCORETYPESDOC_LINKAGE CRequestHeaderDoc { +public: + CRequestHeaderDoc(); + virtual ~CRequestHeaderDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCRequestConfigDoc requestConfig, + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollection = SmartPtrCAuthnAuthzCollectionDoc(), + const SmartPtrCProtocolCollectionDoc protocolCollection = SmartPtrCProtocolCollectionDoc(), + const SmartPtrCPropertyCollectionDoc echoPropertyBag = SmartPtrCPropertyCollectionDoc(), + const std::string version = "1.0", + const std::string createdDateTime = CDateTimeUtils::getCurrentDateTime(), + const UUID sessionId = CAFCOMMON_GUID_NULL); + +public: + /// Accessor for the RequestConfig + SmartPtrCRequestConfigDoc getRequestConfig() const; + + /// Accessor for the Authentication / Authorization Collection + SmartPtrCAuthnAuthzCollectionDoc getAuthnAuthzCollection() const; + + /// Accessor for the Protocol Collection + SmartPtrCProtocolCollectionDoc getProtocolCollection() const; + + /// Accessor for the EchoPropertyBag + SmartPtrCPropertyCollectionDoc getEchoPropertyBag() const; + + /// Accessor for the version + std::string getVersion() const; + + /// Accessor for the date/time when the request was created + std::string getCreatedDateTime() const; + + /// Accessor for the session ID + UUID getSessionId() const; + +private: + bool _isInitialized; + + SmartPtrCRequestConfigDoc _requestConfig; + SmartPtrCAuthnAuthzCollectionDoc _authnAuthzCollection; + SmartPtrCProtocolCollectionDoc _protocolCollection; + SmartPtrCPropertyCollectionDoc _echoPropertyBag; + std::string _version; + std::string _createdDateTime; + UUID _sessionId; + +private: + CAF_CM_DECLARE_NOCOPY(CRequestHeaderDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRequestHeaderDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h new file mode 100644 index 000000000..06a78fba8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CRequestInstanceParameterDoc_h_ +#define CRequestInstanceParameterDoc_h_ + +namespace Caf { + +/// A simple container for objects of type RequestInstanceParameter +class CAFCORETYPESDOC_LINKAGE CRequestInstanceParameterDoc { +public: + CRequestInstanceParameterDoc(); + virtual ~CRequestInstanceParameterDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const std::deque value); + +public: + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the ClassNamespace + std::string getClassNamespace() const; + + /// Accessor for the ClassName + std::string getClassName() const; + + /// Accessor for the ClassVersion + std::string getClassVersion() const; + + /// Accessor for the Value + std::deque getValue() const; + +private: + bool _isInitialized; + + std::string _name; + std::string _classNamespace; + std::string _className; + std::string _classVersion; + std::deque _value; + +private: + CAF_CM_DECLARE_NOCOPY(CRequestInstanceParameterDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRequestInstanceParameterDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestParameterDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestParameterDoc.h new file mode 100644 index 000000000..009e26f7e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CRequestParameterDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CRequestParameterDoc_h_ +#define CRequestParameterDoc_h_ + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +namespace Caf { + +/// A simple container for objects of type RequestParameter +class CAFCORETYPESDOC_LINKAGE CRequestParameterDoc { +public: + CRequestParameterDoc(); + virtual ~CRequestParameterDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const PARAMETER_TYPE type, + const std::deque value); + +public: + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Type + PARAMETER_TYPE getType() const; + + /// Accessor for the Value + std::deque getValue() const; + +private: + PARAMETER_TYPE _type; + + bool _isInitialized; + std::string _name; + std::deque _value; + +private: + CAF_CM_DECLARE_NOCOPY(CRequestParameterDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRequestParameterDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CStatisticsDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CStatisticsDoc.h new file mode 100644 index 000000000..6143bf0e5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CStatisticsDoc.h @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CStatisticsDoc_h_ +#define CStatisticsDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type Statistics +class CAFCORETYPESDOC_LINKAGE CStatisticsDoc { +public: + CStatisticsDoc(); + virtual ~CStatisticsDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCPropertyCollectionDoc propertyCollection, + const int32 providerJobNum, + const int32 providerJobTotal, + const int32 providerJobDurationSecs, + const int32 pmeNum, + const int32 pmeTotal, + const int32 pmeDurationSecs); + +public: + /// Accessor for the PropertyCollection + SmartPtrCPropertyCollectionDoc getPropertyCollection() const; + + /// Accessor for the ProviderJobNum + int32 getProviderJobNum() const; + + /// Accessor for the ProviderJobTotal + int32 getProviderJobTotal() const; + + /// Accessor for the ProviderJobDurationSecs + int32 getProviderJobDurationSecs() const; + + /// Accessor for the PmeNum + int32 getPmeNum() const; + + /// Accessor for the PmeTotal + int32 getPmeTotal() const; + + /// Accessor for the PmeDurationSecs + int32 getPmeDurationSecs() const; + +private: + SmartPtrCPropertyCollectionDoc _propertyCollection; + int32 _providerJobNum; + int32 _providerJobTotal; + int32 _providerJobDurationSecs; + int32 _pmeNum; + int32 _pmeTotal; + int32 _pmeDurationSecs; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CStatisticsDoc); +}; + +CAF_DECLARE_SMART_POINTER(CStatisticsDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CafCoreTypesDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CafCoreTypesDocLink.h new file mode 100644 index 000000000..064dcfef1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CafCoreTypesDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CafCoreTypesDoc_Link_h_ +#define CafCoreTypesDoc_Link_h_ + +#ifndef CAFCORETYPESDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define CAFCORETYPESDOC_LINKAGE __declspec(dllexport) + #else + #define CAFCORETYPESDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define CAFCORETYPESDOC_LINKAGE + #endif +#endif + + +#endif /* CafCoreTypesDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h new file mode 100644 index 000000000..59a826141 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h @@ -0,0 +1,69 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAFCORETYPESDOCTYPES_H_ +#define CAFCORETYPESDOCTYPES_H_ + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +namespace Caf { + typedef enum { + PROPERTY_NONE, + PROPERTY_STRING, + PROPERTY_SINT32, + PROPERTY_UINT32, + PROPERTY_SINT64, + PROPERTY_UINT64, + PROPERTY_DECIMAL, + PROPERTY_DOUBLE, + PROPERTY_BOOLEAN, + PROPERTY_DATETIME + } PROPERTY_TYPE; + + typedef enum { + PARAMETER_NONE, + PARAMETER_STRING, + PARAMETER_SINT32, + PARAMETER_UINT32, + PARAMETER_SINT64, + PARAMETER_UINT64, + PARAMETER_DECIMAL, + PARAMETER_DOUBLE, + PARAMETER_BOOLEAN, + PARAMETER_DATETIME + } PARAMETER_TYPE; + + typedef enum { + LOGGINGLEVEL_NONE, + LOGGINGLEVEL_DEBUG, + LOGGINGLEVEL_INFO, + LOGGINGLEVEL_WARN, + LOGGINGLEVEL_ERROR, + LOGGINGLEVEL_CRITICAL + } LOGGINGLEVEL_TYPE; + + typedef enum { + LOGGINGCOMPONENT_NONE, + LOGGINGCOMPONENT_COMMUNICATIONS, + LOGGINGCOMPONENT_MANAGEMENTAGENT, + LOGGINGCOMPONENT_UINT32, + LOGGINGCOMPONENT_PROVIDERFRAMEWORK, + LOGGINGCOMPONENT_PROVIDER + } LOGGINGCOMPONENT_TYPE; + + typedef enum { + CMS_POLICY_NONE, + CMS_POLICY_CAF_ENCRYPTED, + CMS_POLICY_CAF_SIGNED, + CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED, + CMS_POLICY_APP_SIGNED, + CMS_POLICY_APP_ENCRYPTED, + CMS_POLICY_APP_ENCRYPTED_AND_SIGNED + } CMS_POLICY; +} + +#endif /* CAFCORETYPESDOCTYPES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CFullPackageElemDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CFullPackageElemDoc.h new file mode 100644 index 000000000..2d956eb8b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CFullPackageElemDoc.h @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CFullPackageElemDoc_h_ +#define CFullPackageElemDoc_h_ + + +#include "Doc/CafInstallRequestDoc/CPackageDefnDoc.h" + +namespace Caf { + +/// A simple container for objects of type FullPackageElem +class CAFINSTALLREQUESTDOC_LINKAGE CFullPackageElemDoc { +public: + CFullPackageElemDoc(); + virtual ~CFullPackageElemDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const int32 index, + const std::string packageNamespace, + const std::string packageName, + const std::string packageVersion, + const SmartPtrCPackageDefnDoc installPackage, + const SmartPtrCPackageDefnDoc uninstallPackage); + +public: + /// Accessor for the Index + int32 getIndex() const; + + /// Accessor for the PackageNamespace + std::string getPackageNamespace() const; + + /// Accessor for the PackageName + std::string getPackageName() const; + + /// Accessor for the PackageVersion + std::string getPackageVersion() const; + + /// Accessor for the InstallPackage + SmartPtrCPackageDefnDoc getInstallPackage() const; + + /// Accessor for the UninstallPackage + SmartPtrCPackageDefnDoc getUninstallPackage() const; + +private: + int32 _index; + std::string _packageNamespace; + std::string _packageName; + std::string _packageVersion; + SmartPtrCPackageDefnDoc _installPackage; + SmartPtrCPackageDefnDoc _uninstallPackage; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CFullPackageElemDoc); +}; + +CAF_DECLARE_SMART_POINTER(CFullPackageElemDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h new file mode 100644 index 000000000..452998cc2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CGetInventoryJobDoc_h_ +#define CGetInventoryJobDoc_h_ + +namespace Caf { + +/// A simple container for objects of type GetInventoryJob +class CAFINSTALLREQUESTDOC_LINKAGE CGetInventoryJobDoc { +public: + CGetInventoryJobDoc(); + virtual ~CGetInventoryJobDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId); + +public: + /// Accessor for the JobId + UUID getJobId() const; + +private: + UUID _jobId; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CGetInventoryJobDoc); +}; + +CAF_DECLARE_SMART_POINTER(CGetInventoryJobDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallBatchDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallBatchDoc.h new file mode 100644 index 000000000..1c00c10df --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallBatchDoc.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CInstallBatchDoc_h_ +#define CInstallBatchDoc_h_ + + +#include "Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" + +namespace Caf { + +/// A simple container for objects of type InstallBatch +class CAFINSTALLREQUESTDOC_LINKAGE CInstallBatchDoc { +public: + CInstallBatchDoc(); + virtual ~CInstallBatchDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCGetInventoryJobDoc getInventory, + const SmartPtrCInstallProviderJobDoc installProvider, + const SmartPtrCUninstallProviderJobDoc uninstallProvider); + +public: + /// Accessor for the GetInventory + SmartPtrCGetInventoryJobDoc getGetInventory() const; + + /// Accessor for the InstallProvider + SmartPtrCInstallProviderJobDoc getInstallProvider() const; + + /// Accessor for the UninstallProvider + SmartPtrCUninstallProviderJobDoc getUninstallProvider() const; + +private: + bool _isInitialized; + + SmartPtrCGetInventoryJobDoc _getInventory; + SmartPtrCInstallProviderJobDoc _installProvider; + SmartPtrCUninstallProviderJobDoc _uninstallProvider; + +private: + CAF_CM_DECLARE_NOCOPY(CInstallBatchDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstallBatchDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h new file mode 100644 index 000000000..1cc005849 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CInstallPackageSpecDoc_h_ +#define CInstallPackageSpecDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type InstallPackageSpec +class CAFINSTALLREQUESTDOC_LINKAGE CInstallPackageSpecDoc { +public: + CInstallPackageSpecDoc(); + virtual ~CInstallPackageSpecDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string packageNamespace, + const std::string packageName, + const std::string packageVersion, + const std::string startupAttachmentName, + const std::string packageAttachmentName, + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection, + const SmartPtrCAttachmentCollectionDoc attachmentCollection, + const std::string arguments); + +public: + /// Accessor for the PackageNamespace + std::string getPackageNamespace() const; + + /// Accessor for the PackageName + std::string getPackageName() const; + + /// Accessor for the PackageVersion + std::string getPackageVersion() const; + + /// Accessor for the StartupAttachmentName + std::string getStartupAttachmentName() const; + + /// Accessor for the PackageAttachmentName + std::string getPackageAttachmentName() const; + + /// Accessor for the AttachmentNameCollection + SmartPtrCAttachmentNameCollectionDoc getSupportingAttachmentNameCollection() const; + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const; + + /// Accessor for the Arguments + std::string getArguments() const; + +private: + bool _isInitialized; + + std::string _packageNamespace; + std::string _packageName; + std::string _packageVersion; + std::string _startupAttachmentName; + std::string _packageAttachmentName; + SmartPtrCAttachmentNameCollectionDoc _attachmentNameCollection; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + std::string _arguments; + +private: + CAF_CM_DECLARE_NOCOPY(CInstallPackageSpecDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstallPackageSpecDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h new file mode 100644 index 000000000..3d8fffc5e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CInstallProviderJobDoc_h_ +#define CInstallProviderJobDoc_h_ + + +#include "Doc/CafInstallRequestDoc/CFullPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" + +namespace Caf { + +/// A simple container for objects of type InstallProviderJob +class CAFINSTALLREQUESTDOC_LINKAGE CInstallProviderJobDoc { +public: + CInstallProviderJobDoc(); + virtual ~CInstallProviderJobDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID jobId, + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const PACKAGE_OS_TYPE packageOSType, + const std::deque packageCollection); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the JobId + UUID getJobId() const; + + /// Accessor for the ProviderNamespace + std::string getProviderNamespace() const; + + /// Accessor for the ProviderName + std::string getProviderName() const; + + /// Accessor for the ProviderVersion + std::string getProviderVersion() const; + + /// Accessor for the PackageOSType + PACKAGE_OS_TYPE getPackageOSType() const; + + /// Accessor for the PackageVal + std::deque getPackageCollection() const; + +private: + UUID _clientId; + UUID _jobId; + std::string _providerNamespace; + std::string _providerName; + std::string _providerVersion; + PACKAGE_OS_TYPE _packageOSType; + std::deque _packageCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CInstallProviderJobDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstallProviderJobDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h new file mode 100644 index 000000000..1b6020ce2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CInstallProviderSpecDoc_h_ +#define CInstallProviderSpecDoc_h_ + + +#include "Doc/CafInstallRequestDoc/CMinPackageElemDoc.h" + +namespace Caf { + +/// A simple container for objects of type InstallProviderSpec +class CAFINSTALLREQUESTDOC_LINKAGE CInstallProviderSpecDoc { +public: + CInstallProviderSpecDoc(); + virtual ~CInstallProviderSpecDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const std::deque packageCollection); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the ProviderNamespace + std::string getProviderNamespace() const; + + /// Accessor for the ProviderName + std::string getProviderName() const; + + /// Accessor for the ProviderVersion + std::string getProviderVersion() const; + + /// Accessor for the PackageVal + std::deque getPackageCollection() const; + +private: + UUID _clientId; + std::string _providerNamespace; + std::string _providerName; + std::string _providerVersion; + std::deque _packageCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CInstallProviderSpecDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstallProviderSpecDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallRequestDoc.h new file mode 100644 index 000000000..2caf9a3e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CInstallRequestDoc.h @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CInstallRequestDoc_h_ +#define CInstallRequestDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallBatchDoc.h" + +namespace Caf { + +/// A simple container for objects of type InstallRequest +class CAFINSTALLREQUESTDOC_LINKAGE CInstallRequestDoc { +public: + CInstallRequestDoc(); + virtual ~CInstallRequestDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCInstallBatchDoc batch, + const SmartPtrCAttachmentCollectionDoc attachmentCollection); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Accessor for the RequestHeader + SmartPtrCRequestHeaderDoc getRequestHeader() const; + + /// Accessor for the Batch + SmartPtrCInstallBatchDoc getBatch() const; + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const; + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCRequestHeaderDoc _requestHeader; + SmartPtrCInstallBatchDoc _batch; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CInstallRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstallRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CMinPackageElemDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CMinPackageElemDoc.h new file mode 100644 index 000000000..ea9ae0122 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CMinPackageElemDoc.h @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMinPackageElemDoc_h_ +#define CMinPackageElemDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MinPackageElem +class CAFINSTALLREQUESTDOC_LINKAGE CMinPackageElemDoc { +public: + CMinPackageElemDoc(); + virtual ~CMinPackageElemDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const int32 index, + const std::string packageNamespace, + const std::string packageName, + const std::string packageVersion); + +public: + /// Accessor for the Index + int32 getIndex() const; + + /// Accessor for the PackageNamespace + std::string getPackageNamespace() const; + + /// Accessor for the PackageName + std::string getPackageName() const; + + /// Accessor for the PackageVersion + std::string getPackageVersion() const; + +private: + int32 _index; + std::string _packageNamespace; + std::string _packageName; + std::string _packageVersion; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMinPackageElemDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMinPackageElemDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CPackageDefnDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CPackageDefnDoc.h new file mode 100644 index 000000000..bdcdbc87b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CPackageDefnDoc.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CPackageDefnDoc_h_ +#define CPackageDefnDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type PackageDefn +class CAFINSTALLREQUESTDOC_LINKAGE CPackageDefnDoc { +public: + CPackageDefnDoc(); + virtual ~CPackageDefnDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string startupAttachmentName, + const std::string packageAttachmentName, + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection, + const std::string arguments); + +public: + /// Accessor for the StartupAttachmentName + std::string getStartupAttachmentName() const; + + /// Accessor for the PackageAttachmentName + std::string getPackageAttachmentName() const; + + /// Accessor for the AttachmentNameCollection + SmartPtrCAttachmentNameCollectionDoc getSupportingAttachmentNameCollection() const; + + /// Accessor for the Arguments + std::string getArguments() const; + +private: + bool _isInitialized; + + std::string _startupAttachmentName; + std::string _packageAttachmentName; + SmartPtrCAttachmentNameCollectionDoc _attachmentNameCollection; + std::string _arguments; + +private: + CAF_CM_DECLARE_NOCOPY(CPackageDefnDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPackageDefnDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h new file mode 100644 index 000000000..5162014ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CUninstallProviderJobDoc_h_ +#define CUninstallProviderJobDoc_h_ + +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" + +namespace Caf { + +/// A simple container for objects of type UninstallProviderJob +class CAFINSTALLREQUESTDOC_LINKAGE CUninstallProviderJobDoc { +public: + CUninstallProviderJobDoc(); + virtual ~CUninstallProviderJobDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID jobId, + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const PACKAGE_OS_TYPE packageOSType); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the JobId + UUID getJobId() const; + + /// Accessor for the ProviderNamespace + std::string getProviderNamespace() const; + + /// Accessor for the ProviderName + std::string getProviderName() const; + + /// Accessor for the ProviderVersion + std::string getProviderVersion() const; + + /// Accessor for the PackageOSType + PACKAGE_OS_TYPE getPackageOSType() const; + +private: + UUID _clientId; + UUID _jobId; + std::string _providerNamespace; + std::string _providerName; + std::string _providerVersion; + PACKAGE_OS_TYPE _packageOSType; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CUninstallProviderJobDoc); +}; + +CAF_DECLARE_SMART_POINTER(CUninstallProviderJobDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CafInstallRequestDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CafInstallRequestDocLink.h new file mode 100644 index 000000000..83dd480ac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CafInstallRequestDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CafInstallRequestDoc_Link_h_ +#define CafInstallRequestDoc_Link_h_ + +#ifndef CAFINSTALLREQUESTDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define CAFINSTALLREQUESTDOC_LINKAGE __declspec(dllexport) + #else + #define CAFINSTALLREQUESTDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define CAFINSTALLREQUESTDOC_LINKAGE + #endif +#endif + + +#endif /* CafInstallRequestDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h new file mode 100644 index 000000000..411387384 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h @@ -0,0 +1,22 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAFINSTALLREQUESTDOCTYPES_H_ +#define CAFINSTALLREQUESTDOCTYPES_H_ + +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" + +namespace Caf { + typedef enum { + PACKAGE_OS_NONE, + PACKAGE_OS_ALL, + PACKAGE_OS_NIX, + PACKAGE_OS_WIN + } PACKAGE_OS_TYPE; +} + +#endif /* CAFINSTALLREQUESTTYPES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagRequestDoc/CDiagRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagRequestDoc/CDiagRequestDoc.h new file mode 100644 index 000000000..2a9bb61da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagRequestDoc/CDiagRequestDoc.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDiagRequestDoc_h_ +#define CDiagRequestDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/DiagTypesDoc/CDiagBatchDoc.h" + +namespace Caf { + +/// A simple container for objects of type DiagRequest +class DIAGREQUESTDOC_LINKAGE CDiagRequestDoc { +public: + CDiagRequestDoc(); + virtual ~CDiagRequestDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCDiagBatchDoc batch); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Accessor for the RequestHeader + SmartPtrCRequestHeaderDoc getRequestHeader() const; + + /// Accessor for the Batch + SmartPtrCDiagBatchDoc getBatch() const; + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCRequestHeaderDoc _requestHeader; + SmartPtrCDiagBatchDoc _batch; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagRequestDoc/DiagRequestDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagRequestDoc/DiagRequestDocLink.h new file mode 100644 index 000000000..3c6652829 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagRequestDoc/DiagRequestDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef DiagRequestDoc_Link_h_ +#define DiagRequestDoc_Link_h_ + +#ifndef DIAGREQUESTDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define DIAGREQUESTDOC_LINKAGE __declspec(dllexport) + #else + #define DIAGREQUESTDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define DIAGREQUESTDOC_LINKAGE + #endif +#endif + + +#endif /* DiagRequestDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagBatchDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagBatchDoc.h new file mode 100644 index 000000000..6483d732a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagBatchDoc.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDiagBatchDoc_h_ +#define CDiagBatchDoc_h_ + + +#include "Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h" +#include "Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h" +#include "Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type DiagBatch +class DIAGTYPESDOC_LINKAGE CDiagBatchDoc { +public: + CDiagBatchDoc(); + virtual ~CDiagBatchDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCDiagCollectInstancesDoc collectInstances, + const SmartPtrCDiagSetValueCollectionDoc setValueCollection, + const SmartPtrCDiagDeleteValueCollectionDoc deleteValueCollection); + +public: + /// Accessor for the CollectInstances + SmartPtrCDiagCollectInstancesDoc getCollectInstances() const; + + /// Accessor for the SetValueCollection + SmartPtrCDiagSetValueCollectionDoc getSetValueCollection() const; + + /// Accessor for the DeleteValueCollection + SmartPtrCDiagDeleteValueCollectionDoc getDeleteValueCollection() const; + +private: + bool _isInitialized; + + SmartPtrCDiagCollectInstancesDoc _collectInstances; + SmartPtrCDiagSetValueCollectionDoc _setValueCollection; + SmartPtrCDiagDeleteValueCollectionDoc _deleteValueCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagBatchDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagBatchDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h new file mode 100644 index 000000000..2a403f130 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDiagCollectInstancesDoc_h_ +#define CDiagCollectInstancesDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DiagCollectInstances +class DIAGTYPESDOC_LINKAGE CDiagCollectInstancesDoc { +public: + CDiagCollectInstancesDoc(); + virtual ~CDiagCollectInstancesDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId); + +public: + /// Accessor for the JobId + UUID getJobId() const; + +private: + UUID _jobId; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagCollectInstancesDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagCollectInstancesDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h new file mode 100644 index 000000000..cc96d89e5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDiagDeleteValueCollectionDoc_h_ +#define CDiagDeleteValueCollectionDoc_h_ + + +#include "Doc/DiagTypesDoc/CDiagDeleteValueDoc.h" + +namespace Caf { + +/// A simple container for objects of type DiagDeleteValueCollection +class DIAGTYPESDOC_LINKAGE CDiagDeleteValueCollectionDoc { +public: + CDiagDeleteValueCollectionDoc(); + virtual ~CDiagDeleteValueCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque deleteValueCollection); + +public: + /// Accessor for the DeleteValue + std::deque getDeleteValueCollection() const; + +private: + bool _isInitialized; + + std::deque _deleteValueCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagDeleteValueCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagDeleteValueCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagDeleteValueDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagDeleteValueDoc.h new file mode 100644 index 000000000..85e203a47 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagDeleteValueDoc.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDiagDeleteValueDoc_h_ +#define CDiagDeleteValueDoc_h_ + +namespace Caf { + +/// A simple container for objects of type DiagDeleteValue +class DIAGTYPESDOC_LINKAGE CDiagDeleteValueDoc { +public: + CDiagDeleteValueDoc(); + virtual ~CDiagDeleteValueDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId, + const std::string fileAlias, + const std::string valueName); + +public: + /// Accessor for the JobId + UUID getJobId() const; + + /// Accessor for the FileAlias + std::string getFileAlias() const; + + /// Accessor for the ValueName + std::string getValueName() const; + +private: + UUID _jobId; + std::string _fileAlias; + std::string _valueName; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagDeleteValueDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagDeleteValueDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h new file mode 100644 index 000000000..ca5505fce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDiagSetValueCollectionDoc_h_ +#define CDiagSetValueCollectionDoc_h_ + + +#include "Doc/DiagTypesDoc/CDiagSetValueDoc.h" + +namespace Caf { + +/// A simple container for objects of type DiagSetValueCollection +class DIAGTYPESDOC_LINKAGE CDiagSetValueCollectionDoc { +public: + CDiagSetValueCollectionDoc(); + virtual ~CDiagSetValueCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque setValueCollection); + +public: + /// Accessor for the SetValue + std::deque getSetValueCollection() const; + +private: + bool _isInitialized; + + std::deque _setValueCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagSetValueCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagSetValueCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagSetValueDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagSetValueDoc.h new file mode 100644 index 000000000..f07f04a68 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/CDiagSetValueDoc.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDiagSetValueDoc_h_ +#define CDiagSetValueDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" + +namespace Caf { + +/// A simple container for objects of type DiagSetValue +class DIAGTYPESDOC_LINKAGE CDiagSetValueDoc { +public: + CDiagSetValueDoc(); + virtual ~CDiagSetValueDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId, + const std::string fileAlias, + const SmartPtrCPropertyDoc value); + +public: + /// Accessor for the JobId + UUID getJobId() const; + + /// Accessor for the FileAlias + std::string getFileAlias() const; + + /// Accessor for the Value + SmartPtrCPropertyDoc getValue() const; + +private: + UUID _jobId; + std::string _fileAlias; + SmartPtrCPropertyDoc _value; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CDiagSetValueDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDiagSetValueDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/DiagTypesDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/DiagTypesDocLink.h new file mode 100644 index 000000000..493768505 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DiagTypesDoc/DiagTypesDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef DiagTypesDoc_Link_h_ +#define DiagTypesDoc_Link_h_ + +#ifndef DIAGTYPESDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define DIAGTYPESDOC_LINKAGE __declspec(dllexport) + #else + #define DIAGTYPESDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define DIAGTYPESDOC_LINKAGE + #endif +#endif + + +#endif /* DiagTypesDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocUtils/EnumConvertersXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocUtils/EnumConvertersXml.h new file mode 100644 index 000000000..af074631c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocUtils/EnumConvertersXml.h @@ -0,0 +1,91 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef EnumConvertersXml_h_ +#define EnumConvertersXml_h_ + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +namespace Caf { + + namespace EnumConvertersXml { + /// Converts the parameter type to a string + std::string DOCUTILS_LINKAGE convertParameterTypeToString( + const PARAMETER_TYPE parameterType); + + /// Converts the string to a parameter type + PARAMETER_TYPE DOCUTILS_LINKAGE convertStringToParameterType( + const std::string parameterType); + + /// Converts the property type to a string + std::string DOCUTILS_LINKAGE convertPropertyTypeToString( + const PROPERTY_TYPE propertyType); + + /// Converts the string to a property type + PROPERTY_TYPE DOCUTILS_LINKAGE convertStringToPropertyType( + const std::string propertyType); + + /// Converts the validator type to a string + std::string DOCUTILS_LINKAGE convertValidatorTypeToString( + const VALIDATOR_TYPE validatorType); + + /// Converts the string to a validator type + VALIDATOR_TYPE DOCUTILS_LINKAGE convertStringToValidatorType( + const std::string validatorType); + + /// Converts the operator type to a string + std::string DOCUTILS_LINKAGE convertOperatorTypeToString( + const OPERATOR_TYPE operatorType); + + /// Converts the string to a operator type + OPERATOR_TYPE DOCUTILS_LINKAGE convertStringToOperatorType( + const std::string operatorType); + + /// Converts the arity type to a string + std::string DOCUTILS_LINKAGE convertArityTypeToString( + const ARITY_TYPE arityType); + + /// Converts the string to an arity type + ARITY_TYPE DOCUTILS_LINKAGE convertStringToArityType( + const std::string arityType); + + /// Converts the parameter type to a string + std::string DOCUTILS_LINKAGE convertPackageOSTypeToString( + const PACKAGE_OS_TYPE packageOSType); + + /// Converts the string to a parameter type + PACKAGE_OS_TYPE DOCUTILS_LINKAGE convertStringToPackageOSType( + const std::string packageOSType); + + /// Converts the logging level enum type to a string + std::string DOCUTILS_LINKAGE convertLoggingLevelTypeToString( + const LOGGINGLEVEL_TYPE loggingLevelType); + + /// Converts the string to a logging level enum + LOGGINGLEVEL_TYPE DOCUTILS_LINKAGE convertStringToLoggingLevelType( + const std::string loggingLevelType); + + /// Converts the logging component enum type to a string + std::string DOCUTILS_LINKAGE convertLoggingComponentTypeToString( + const LOGGINGCOMPONENT_TYPE loggingComponentType); + + /// Converts the string to a logging component enum type + LOGGINGCOMPONENT_TYPE DOCUTILS_LINKAGE convertStringToLoggingComponentType( + const std::string loggingComponentType); + + std::string DOCUTILS_LINKAGE convertCmsPolicyToString( + const CMS_POLICY cmsPolicy); + + CMS_POLICY DOCUTILS_LINKAGE convertStringToCmsPolicy( + const std::string cmsPolicy); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.h new file mode 100644 index 000000000..658f1eff5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AddInCollectionXml_h_ +#define AddInCollectionXml_h_ + + +#include "Doc/CafCoreTypesDoc/CAddInCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the AddInCollection class to/from XML + namespace AddInCollectionXml { + + /// Adds the AddInCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAddInCollectionDoc addInCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AddInCollectionDoc from the XML. + SmartPtrCAddInCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AddInsXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AddInsXml.h new file mode 100644 index 000000000..675d46001 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AddInsXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AddInsXml_h_ +#define AddInsXml_h_ + + +#include "Doc/CafCoreTypesDoc/CAddInsDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the AddIns class to/from XML + namespace AddInsXml { + + /// Adds the AddInsDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAddInsDoc addInsDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AddInsDoc from the XML. + SmartPtrCAddInsDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h new file mode 100644 index 000000000..78ec3f967 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AttachmentCollectionXml_h_ +#define AttachmentCollectionXml_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the AttachmentCollection class to/from XML + namespace AttachmentCollectionXml { + + /// Adds the AttachmentCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AttachmentCollectionDoc from the XML. + SmartPtrCAttachmentCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h new file mode 100644 index 000000000..479202dad --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AttachmentNameCollectionXml_h_ +#define AttachmentNameCollectionXml_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the AttachmentNameCollection class to/from XML + namespace AttachmentNameCollectionXml { + + /// Adds the AttachmentNameCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AttachmentNameCollectionDoc from the XML. + SmartPtrCAttachmentNameCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentXml.h new file mode 100644 index 000000000..eee7cf6fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AttachmentXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AttachmentXml_h_ +#define AttachmentXml_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Attachment class to/from XML + namespace AttachmentXml { + + /// Adds the AttachmentDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAttachmentDoc attachmentDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AttachmentDoc from the XML. + SmartPtrCAttachmentDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.h new file mode 100644 index 000000000..b2369dfca --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AuthnAuthzCollectionXml_h_ +#define AuthnAuthzCollectionXml_h_ + + +#include "Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the AuthnAuthzCollection class to/from XML + namespace AuthnAuthzCollectionXml { + + /// Adds the AuthnAuthzCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AuthnAuthzCollectionDoc from the XML. + SmartPtrCAuthnAuthzCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.h new file mode 100644 index 000000000..74fdf444e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef AuthnAuthzXml_h_ +#define AuthnAuthzXml_h_ + + +#include "Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the AuthnAuthz class to/from XML + namespace AuthnAuthzXml { + + /// Adds the AuthnAuthzDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCAuthnAuthzDoc authnAuthzDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the AuthnAuthzDoc from the XML. + SmartPtrCAuthnAuthzDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h new file mode 100644 index 000000000..d951566da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CafCoreTypesXml_Link_h_ +#define CafCoreTypesXml_Link_h_ + +#ifndef CAFCORETYPESXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define CAFCORETYPESXML_LINKAGE __declspec(dllexport) + #else + #define CAFCORETYPESXML_LINKAGE __declspec(dllimport) + #endif + #else + #define CAFCORETYPESXML_LINKAGE + #endif +#endif + + +#endif /* CafCoreTypesXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.h new file mode 100644 index 000000000..972e307d5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassFiltersXml_h_ +#define ClassFiltersXml_h_ + + +#include "Doc/CafCoreTypesDoc/CClassFiltersDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ClassFilters class to/from XML + namespace ClassFiltersXml { + + /// Adds the ClassFiltersDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCClassFiltersDoc classFiltersDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassFiltersDoc from the XML. + SmartPtrCClassFiltersDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.h new file mode 100644 index 000000000..41d79fc85 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassSpecifierXml_h_ +#define ClassSpecifierXml_h_ + + +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ClassSpecifier class to/from XML + namespace ClassSpecifierXml { + + /// Adds the ClassSpecifierDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCClassSpecifierDoc classSpecifierDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassSpecifierDoc from the XML. + SmartPtrCClassSpecifierDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.h new file mode 100644 index 000000000..665f68e26 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef FullyQualifiedClassGroupXml_h_ +#define FullyQualifiedClassGroupXml_h_ + + +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the FullyQualifiedClassGroup class to/from XML + namespace FullyQualifiedClassGroupXml { + + /// Adds the FullyQualifiedClassGroupDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassGroupDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the FullyQualifiedClassGroupDoc from the XML. + SmartPtrCFullyQualifiedClassGroupDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.h new file mode 100644 index 000000000..72c663ced --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef LoggingLevelCollectionXml_h_ +#define LoggingLevelCollectionXml_h_ + + +#include "Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the LoggingLevelCollection class to/from XML + namespace LoggingLevelCollectionXml { + + /// Adds the LoggingLevelCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the LoggingLevelCollectionDoc from the XML. + SmartPtrCLoggingLevelCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.h new file mode 100644 index 000000000..03f982df8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef LoggingLevelElemXml_h_ +#define LoggingLevelElemXml_h_ + + +#include "Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the LoggingLevelElem class to/from XML + namespace LoggingLevelElemXml { + + /// Adds the LoggingLevelElemDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCLoggingLevelElemDoc loggingLevelElemDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the LoggingLevelElemDoc from the XML. + SmartPtrCLoggingLevelElemDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/OperationXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/OperationXml.h new file mode 100644 index 000000000..3b04d6f7f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/OperationXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef OperationXml_h_ +#define OperationXml_h_ + + +#include "Doc/CafCoreTypesDoc/COperationDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Operation class to/from XML + namespace OperationXml { + + /// Adds the OperationDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCOperationDoc operationDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the OperationDoc from the XML. + SmartPtrCOperationDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h new file mode 100644 index 000000000..a9f7b6ceb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ParameterCollectionXml_h_ +#define ParameterCollectionXml_h_ + + +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ParameterCollection class to/from XML + namespace ParameterCollectionXml { + + /// Adds the ParameterCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCParameterCollectionDoc parameterCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ParameterCollectionDoc from the XML. + SmartPtrCParameterCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h new file mode 100644 index 000000000..8e5e7b88c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PropertyCollectionXml_h_ +#define PropertyCollectionXml_h_ + + +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the PropertyCollection class to/from XML + namespace PropertyCollectionXml { + + /// Adds the PropertyCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCPropertyCollectionDoc propertyCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PropertyCollectionDoc from the XML. + SmartPtrCPropertyCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/PropertyXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/PropertyXml.h new file mode 100644 index 000000000..57858933c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/PropertyXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PropertyXml_h_ +#define PropertyXml_h_ + + +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Property class to/from XML + namespace PropertyXml { + + /// Adds the PropertyDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCPropertyDoc propertyDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PropertyDoc from the XML. + SmartPtrCPropertyDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.h new file mode 100644 index 000000000..8ea8782a6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProtocolCollectionXml_h_ +#define ProtocolCollectionXml_h_ + + +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProtocolCollection class to/from XML + namespace ProtocolCollectionXml { + + /// Adds the ProtocolCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCProtocolCollectionDoc protocolCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProtocolCollectionDoc from the XML. + SmartPtrCProtocolCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ProtocolXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ProtocolXml.h new file mode 100644 index 000000000..45d345633 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/ProtocolXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProtocolXml_h_ +#define ProtocolXml_h_ + + +#include "Doc/CafCoreTypesDoc/CProtocolDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Protocol class to/from XML + namespace ProtocolXml { + + /// Adds the ProtocolDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCProtocolDoc protocolDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProtocolDoc from the XML. + SmartPtrCProtocolDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.h new file mode 100644 index 000000000..488d67b53 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RequestConfigXml_h_ +#define RequestConfigXml_h_ + + +#include "Doc/CafCoreTypesDoc/CRequestConfigDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the RequestConfig class to/from XML + namespace RequestConfigXml { + + /// Adds the RequestConfigDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCRequestConfigDoc requestConfigDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RequestConfigDoc from the XML. + SmartPtrCRequestConfigDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h new file mode 100644 index 000000000..b1abe884e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RequestHeaderXml_h_ +#define RequestHeaderXml_h_ + + +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the RequestHeader class to/from XML + namespace RequestHeaderXml { + + /// Adds the RequestHeaderDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCRequestHeaderDoc requestHeaderDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RequestHeaderDoc from the XML. + SmartPtrCRequestHeaderDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.h new file mode 100644 index 000000000..7aae4c5e4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RequestInstanceParameterXml_h_ +#define RequestInstanceParameterXml_h_ + + +#include "Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the RequestInstanceParameter class to/from XML + namespace RequestInstanceParameterXml { + + /// Adds the RequestInstanceParameterDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCRequestInstanceParameterDoc requestInstanceParameterDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RequestInstanceParameterDoc from the XML. + SmartPtrCRequestInstanceParameterDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.h new file mode 100644 index 000000000..240edcdce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RequestParameterXml_h_ +#define RequestParameterXml_h_ + + +#include "Doc/CafCoreTypesDoc/CRequestParameterDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the RequestParameter class to/from XML + namespace RequestParameterXml { + + /// Adds the RequestParameterDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCRequestParameterDoc requestParameterDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RequestParameterDoc from the XML. + SmartPtrCRequestParameterDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestXml.h new file mode 100644 index 000000000..2e18d7ce2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/RequestXml.h @@ -0,0 +1,31 @@ +/* + * Author: bwilliams + * Created: Nov 21, 2014 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef RequestXml_h_ +#define RequestXml_h_ + + +#include "Xml/XmlUtils/CXmlElement.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" + +namespace Caf { + + namespace RequestXml { + + SmartPtrCXmlElement CAFCORETYPESXML_LINKAGE parseString( + const std::string& xml, + const std::string& rootName); + + SmartPtrCXmlElement CAFCORETYPESXML_LINKAGE parseFile( + const std::string& xml, + const std::string& rootName); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/StatisticsXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/StatisticsXml.h new file mode 100644 index 000000000..f967ddf20 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafCoreTypesXml/StatisticsXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef StatisticsXml_h_ +#define StatisticsXml_h_ + + +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Statistics class to/from XML + namespace StatisticsXml { + + /// Adds the StatisticsDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCStatisticsDoc statisticsDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the StatisticsDoc from the XML. + SmartPtrCStatisticsDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h new file mode 100644 index 000000000..18fb92511 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CafInstallRequestXml_Link_h_ +#define CafInstallRequestXml_Link_h_ + +#ifndef CAFINSTALLREQUESTXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define CAFINSTALLREQUESTXML_LINKAGE __declspec(dllexport) + #else + #define CAFINSTALLREQUESTXML_LINKAGE __declspec(dllimport) + #endif + #else + #define CAFINSTALLREQUESTXML_LINKAGE + #endif +#endif + + +#endif /* CafInstallRequestXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h new file mode 100644 index 000000000..8ac1f5ad3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CafInstallRequestXmlRoots_h_ +#define CafInstallRequestXmlRoots_h_ + + +#include "Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallRequestDoc.h" + +namespace Caf { + + namespace XmlRoots { + + /// Saves the InstallRequestDoc to a string. + std::string CAFINSTALLREQUESTXML_LINKAGE saveInstallRequestToString( + const SmartPtrCInstallRequestDoc installRequestDoc); + + /// Parses the InstallPackageSpecDoc from the string. + SmartPtrCInstallRequestDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallRequestFromString( + const std::string xml); + + /// Saves the InstallRequestDoc to a file. + void CAFINSTALLREQUESTXML_LINKAGE saveInstallRequestToFile( + const SmartPtrCInstallRequestDoc installRequestDoc, + const std::string filePath); + + /// Parses the InstallPackageSpecDoc from the file. + SmartPtrCInstallRequestDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallRequestFromFile( + const std::string filePath); + + /// Saves the InstallProviderSpecDoc to a string. + std::string CAFINSTALLREQUESTXML_LINKAGE saveInstallProviderSpecToString( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc); + + /// Parses the InstallPackageSpecDoc from the string. + SmartPtrCInstallProviderSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallProviderSpecFromString( + const std::string xml); + + /// Saves the InstallProviderSpecDoc to a file. + void CAFINSTALLREQUESTXML_LINKAGE saveInstallProviderSpecToFile( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc, + const std::string filePath); + + /// Parses the InstallPackageSpecDoc from the file. + SmartPtrCInstallProviderSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallProviderSpecFromFile( + const std::string filePath); + + /// Saves the InstallPackageSpecDoc to a string. + std::string CAFINSTALLREQUESTXML_LINKAGE saveInstallPackageSpecToString( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc); + + /// Parses the InstallPackageSpecDoc from the string. + SmartPtrCInstallPackageSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallPackageSpecFromString( + const std::string xml); + + /// Saves the InstallPackageSpecDoc to a file. + void CAFINSTALLREQUESTXML_LINKAGE saveInstallPackageSpecToFile( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc, + const std::string filePath); + + /// Parses the InstallPackageSpecDoc from the file. + SmartPtrCInstallPackageSpecDoc CAFINSTALLREQUESTXML_LINKAGE parseInstallPackageSpecFromFile( + const std::string filePath); + } +} + +#endif /* CafInstallRequestXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.h new file mode 100644 index 000000000..ce50f3b1c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef FullPackageElemXml_h_ +#define FullPackageElemXml_h_ + + +#include "Doc/CafInstallRequestDoc/CFullPackageElemDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the FullPackageElem class to/from XML + namespace FullPackageElemXml { + + /// Adds the FullPackageElemDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCFullPackageElemDoc fullPackageElemDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the FullPackageElemDoc from the XML. + SmartPtrCFullPackageElemDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.h new file mode 100644 index 000000000..9b5858de2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef GetInventoryJobXml_h_ +#define GetInventoryJobXml_h_ + + +#include "Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the GetInventoryJob class to/from XML + namespace GetInventoryJobXml { + + /// Adds the GetInventoryJobDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCGetInventoryJobDoc getInventoryJobDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the GetInventoryJobDoc from the XML. + SmartPtrCGetInventoryJobDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.h new file mode 100644 index 000000000..179781b66 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstallBatchXml_h_ +#define InstallBatchXml_h_ + + +#include "Doc/CafInstallRequestDoc/CInstallBatchDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the InstallBatch class to/from XML + namespace InstallBatchXml { + + /// Adds the InstallBatchDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCInstallBatchDoc installBatchDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstallBatchDoc from the XML. + SmartPtrCInstallBatchDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.h new file mode 100644 index 000000000..cebc2b4d7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstallPackageSpecXml_h_ +#define InstallPackageSpecXml_h_ + + +#include "Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the InstallPackageSpec class to/from XML + namespace InstallPackageSpecXml { + + /// Adds the InstallPackageSpecDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstallPackageSpecDoc from the XML. + SmartPtrCInstallPackageSpecDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h new file mode 100644 index 000000000..89d88b445 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstallProviderJobXml_h_ +#define InstallProviderJobXml_h_ + + +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the InstallProviderJob class to/from XML + namespace InstallProviderJobXml { + + /// Adds the InstallProviderJobDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCInstallProviderJobDoc installProviderJobDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstallProviderJobDoc from the XML. + SmartPtrCInstallProviderJobDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.h new file mode 100644 index 000000000..88bd6841a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstallProviderSpecXml_h_ +#define InstallProviderSpecXml_h_ + + +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the InstallProviderSpec class to/from XML + namespace InstallProviderSpecXml { + + /// Adds the InstallProviderSpecDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstallProviderSpecDoc from the XML. + SmartPtrCInstallProviderSpecDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.h new file mode 100644 index 000000000..6f1e8a110 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstallRequestXml_h_ +#define InstallRequestXml_h_ + + +#include "Doc/CafInstallRequestDoc/CInstallRequestDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the InstallRequest class to/from XML + namespace InstallRequestXml { + + /// Adds the InstallRequestDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCInstallRequestDoc installRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstallRequestDoc from the XML. + SmartPtrCInstallRequestDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.h new file mode 100644 index 000000000..77883d97c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MinPackageElemXml_h_ +#define MinPackageElemXml_h_ + + +#include "Doc/CafInstallRequestDoc/CMinPackageElemDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MinPackageElem class to/from XML + namespace MinPackageElemXml { + + /// Adds the MinPackageElemDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCMinPackageElemDoc minPackageElemDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MinPackageElemDoc from the XML. + SmartPtrCMinPackageElemDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.h new file mode 100644 index 000000000..4e0a39769 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PackageDefnXml_h_ +#define PackageDefnXml_h_ + + +#include "Doc/CafInstallRequestDoc/CPackageDefnDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the PackageDefn class to/from XML + namespace PackageDefnXml { + + /// Adds the PackageDefnDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCPackageDefnDoc packageDefnDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PackageDefnDoc from the XML. + SmartPtrCPackageDefnDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h new file mode 100644 index 000000000..afd958eee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef UninstallProviderJobXml_h_ +#define UninstallProviderJobXml_h_ + + +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the UninstallProviderJob class to/from XML + namespace UninstallProviderJobXml { + + /// Adds the UninstallProviderJobDoc into the XML. + void CAFINSTALLREQUESTXML_LINKAGE add( + const SmartPtrCUninstallProviderJobDoc uninstallProviderJobDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the UninstallProviderJobDoc from the XML. + SmartPtrCUninstallProviderJobDoc CAFINSTALLREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXml.h new file mode 100644 index 000000000..84625b486 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagRequestXml_h_ +#define DiagRequestXml_h_ + + +#include "Doc/DiagRequestDoc/CDiagRequestDoc.h" + +#include "Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DiagRequest class to/from XML + namespace DiagRequestXml { + + /// Adds the DiagRequestDoc into the XML. + void DIAGREQUESTXML_LINKAGE add( + const SmartPtrCDiagRequestDoc diagRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagRequestDoc from the XML. + SmartPtrCDiagRequestDoc DIAGREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h new file mode 100644 index 000000000..f73050c95 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagRequestXml_Link_h_ +#define DiagRequestXml_Link_h_ + +#ifndef DIAGREQUESTXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define DIAGREQUESTXML_LINKAGE __declspec(dllexport) + #else + #define DIAGREQUESTXML_LINKAGE __declspec(dllimport) + #endif + #else + #define DIAGREQUESTXML_LINKAGE + #endif +#endif + + +#endif /* DiagRequestXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.h new file mode 100644 index 000000000..4ddc782d4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.h @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagRequestXmlRoots_h_ +#define DiagRequestXmlRoots_h_ + + +#include "Doc/DiagRequestDoc/CDiagRequestDoc.h" + +#include "Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h" + +namespace Caf { + + namespace XmlRoots { + + /// Saves the DiagRequestDoc to a string. + std::string DIAGREQUESTXML_LINKAGE saveDiagRequestToString( + const SmartPtrCDiagRequestDoc diagRequestDoc); + + /// Parses the DiagRequestDoc from the string. + SmartPtrCDiagRequestDoc DIAGREQUESTXML_LINKAGE parseDiagRequestFromString( + const std::string xml); + + /// Saves the DiagRequestDoc to a file. + void DIAGREQUESTXML_LINKAGE saveDiagRequestToFile( + const SmartPtrCDiagRequestDoc diagRequestDoc, + const std::string filePath); + + /// Parses the DiagRequestDoc from the file. + SmartPtrCDiagRequestDoc DIAGREQUESTXML_LINKAGE parseDiagRequestFromFile( + const std::string filePath); + } +} + +#endif /* DiagRequestXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagBatchXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagBatchXml.h new file mode 100644 index 000000000..d12a9bad8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagBatchXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagBatchXml_h_ +#define DiagBatchXml_h_ + + +#include "Doc/DiagTypesDoc/CDiagBatchDoc.h" + +#include "Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DiagBatch class to/from XML + namespace DiagBatchXml { + + /// Adds the DiagBatchDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagBatchDoc diagBatchDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagBatchDoc from the XML. + SmartPtrCDiagBatchDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.h new file mode 100644 index 000000000..97430bab8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagCollectInstancesXml_h_ +#define DiagCollectInstancesXml_h_ + + +#include "Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h" + +#include "Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DiagCollectInstances class to/from XML + namespace DiagCollectInstancesXml { + + /// Adds the DiagCollectInstancesDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagCollectInstancesDoc diagCollectInstancesDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagCollectInstancesDoc from the XML. + SmartPtrCDiagCollectInstancesDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.h new file mode 100644 index 000000000..0835538b0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagDeleteValueCollectionXml_h_ +#define DiagDeleteValueCollectionXml_h_ + + +#include "Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h" + +#include "Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DiagDeleteValueCollection class to/from XML + namespace DiagDeleteValueCollectionXml { + + /// Adds the DiagDeleteValueCollectionDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagDeleteValueCollectionDoc diagDeleteValueCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagDeleteValueCollectionDoc from the XML. + SmartPtrCDiagDeleteValueCollectionDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.h new file mode 100644 index 000000000..732387e81 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagDeleteValueXml_h_ +#define DiagDeleteValueXml_h_ + + +#include "Doc/DiagTypesDoc/CDiagDeleteValueDoc.h" + +#include "Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DiagDeleteValue class to/from XML + namespace DiagDeleteValueXml { + + /// Adds the DiagDeleteValueDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagDeleteValueDoc diagDeleteValueDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagDeleteValueDoc from the XML. + SmartPtrCDiagDeleteValueDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.h new file mode 100644 index 000000000..5564b77ea --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagSetValueCollectionXml_h_ +#define DiagSetValueCollectionXml_h_ + + +#include "Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h" + +#include "Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DiagSetValueCollection class to/from XML + namespace DiagSetValueCollectionXml { + + /// Adds the DiagSetValueCollectionDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagSetValueCollectionDoc diagSetValueCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagSetValueCollectionDoc from the XML. + SmartPtrCDiagSetValueCollectionDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagSetValueXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagSetValueXml.h new file mode 100644 index 000000000..083ca98f7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagSetValueXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagSetValueXml_h_ +#define DiagSetValueXml_h_ + + +#include "Doc/DiagTypesDoc/CDiagSetValueDoc.h" + +#include "Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DiagSetValue class to/from XML + namespace DiagSetValueXml { + + /// Adds the DiagSetValueDoc into the XML. + void DIAGTYPESXML_LINKAGE add( + const SmartPtrCDiagSetValueDoc diagSetValueDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DiagSetValueDoc from the XML. + SmartPtrCDiagSetValueDoc DIAGTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h new file mode 100644 index 000000000..aa379d22e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DiagTypesXml_Link_h_ +#define DiagTypesXml_Link_h_ + +#ifndef DIAGTYPESXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define DIAGTYPESXML_LINKAGE __declspec(dllexport) + #else + #define DIAGTYPESXML_LINKAGE __declspec(dllimport) + #endif + #else + #define DIAGTYPESXML_LINKAGE + #endif +#endif + + +#endif /* DiagTypesXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.h new file mode 100644 index 000000000..73743490c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtRequestXml_h_ +#define MgmtRequestXml_h_ + + +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" + +#include "Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MgmtRequest class to/from XML + namespace MgmtRequestXml { + + /// Adds the MgmtRequestDoc into the XML. + void MGMTREQUESTXML_LINKAGE add( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtRequestDoc from the XML. + SmartPtrCMgmtRequestDoc MGMTREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h new file mode 100644 index 000000000..36a725b32 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtRequestXml_Link_h_ +#define MgmtRequestXml_Link_h_ + +#ifndef MGMTREQUESTXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MGMTREQUESTXML_LINKAGE __declspec(dllexport) + #else + #define MGMTREQUESTXML_LINKAGE __declspec(dllimport) + #endif + #else + #define MGMTREQUESTXML_LINKAGE + #endif +#endif + + +#endif /* MgmtRequestXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.h new file mode 100644 index 000000000..43b5d2906 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.h @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtRequestXmlRoots_h_ +#define MgmtRequestXmlRoots_h_ + + +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" + +#include "Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h" + +namespace Caf { + + namespace XmlRoots { + + /// Saves the MgmtRequestDoc to a string. + std::string MGMTREQUESTXML_LINKAGE saveMgmtRequestToString( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc); + + /// Parses the MgmtRequestDoc from the string. + SmartPtrCMgmtRequestDoc MGMTREQUESTXML_LINKAGE parseMgmtRequestFromString( + const std::string xml); + + /// Saves the MgmtRequestDoc to a file. + void MGMTREQUESTXML_LINKAGE saveMgmtRequestToFile( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc, + const std::string filePath); + + /// Parses the MgmtRequestDoc from the file. + SmartPtrCMgmtRequestDoc MGMTREQUESTXML_LINKAGE parseMgmtRequestFromFile( + const std::string filePath); + } +} + +#endif /* MgmtRequestXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h new file mode 100644 index 000000000..c769982ec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtBatchXml_h_ +#define MgmtBatchXml_h_ + + +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" + +#include "Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MgmtBatch class to/from XML + namespace MgmtBatchXml { + + /// Adds the MgmtBatchDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtBatchDoc mgmtBatchDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtBatchDoc from the XML. + SmartPtrCMgmtBatchDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.h new file mode 100644 index 000000000..f73d59ef9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtCollectInstancesCollectionXml_h_ +#define MgmtCollectInstancesCollectionXml_h_ + + +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" + +#include "Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MgmtCollectInstancesCollection class to/from XML + namespace MgmtCollectInstancesCollectionXml { + + /// Adds the MgmtCollectInstancesCollectionDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtCollectInstancesCollectionDoc from the XML. + SmartPtrCMgmtCollectInstancesCollectionDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.h new file mode 100644 index 000000000..550b6c3f5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtCollectInstancesXml_h_ +#define MgmtCollectInstancesXml_h_ + + +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" + +#include "Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MgmtCollectInstances class to/from XML + namespace MgmtCollectInstancesXml { + + /// Adds the MgmtCollectInstancesDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstancesDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtCollectInstancesDoc from the XML. + SmartPtrCMgmtCollectInstancesDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.h new file mode 100644 index 000000000..264b9c3f2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtCollectSchemaXml_h_ +#define MgmtCollectSchemaXml_h_ + + +#include "Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h" + +#include "Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MgmtCollectSchema class to/from XML + namespace MgmtCollectSchemaXml { + + /// Adds the MgmtCollectSchemaDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtCollectSchemaDoc mgmtCollectSchemaDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtCollectSchemaDoc from the XML. + SmartPtrCMgmtCollectSchemaDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.h new file mode 100644 index 000000000..617b5006e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtInvokeOperationCollectionXml_h_ +#define MgmtInvokeOperationCollectionXml_h_ + + +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" + +#include "Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MgmtInvokeOperationCollection class to/from XML + namespace MgmtInvokeOperationCollectionXml { + + /// Adds the MgmtInvokeOperationCollectionDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtInvokeOperationCollectionDoc from the XML. + SmartPtrCMgmtInvokeOperationCollectionDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.h new file mode 100644 index 000000000..6bc1dd171 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtInvokeOperationXml_h_ +#define MgmtInvokeOperationXml_h_ + + +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" + +#include "Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MgmtInvokeOperation class to/from XML + namespace MgmtInvokeOperationXml { + + /// Adds the MgmtInvokeOperationDoc into the XML. + void MGMTTYPESXML_LINKAGE add( + const SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperationDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MgmtInvokeOperationDoc from the XML. + SmartPtrCMgmtInvokeOperationDoc MGMTTYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h new file mode 100644 index 000000000..d71e69f3a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MgmtTypesXml_Link_h_ +#define MgmtTypesXml_Link_h_ + +#ifndef MGMTTYPESXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MGMTTYPESXML_LINKAGE __declspec(dllexport) + #else + #define MGMTTYPESXML_LINKAGE __declspec(dllimport) + #endif + #else + #define MGMTTYPESXML_LINKAGE + #endif +#endif + + +#endif /* MgmtTypesXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.h new file mode 100644 index 000000000..40e0fb211 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtBatchCollectionXml_h_ +#define MultiPmeMgmtBatchCollectionXml_h_ + + +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h" + +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MultiPmeMgmtBatchCollection class to/from XML + namespace MultiPmeMgmtBatchCollectionXml { + + /// Adds the MultiPmeMgmtBatchCollectionDoc into the XML. + void MULTIPMEMGMTREQUESTXML_LINKAGE add( + const SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeMgmtBatchCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MultiPmeMgmtBatchCollectionDoc from the XML. + SmartPtrCMultiPmeMgmtBatchCollectionDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.h new file mode 100644 index 000000000..e50e4f441 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtBatchXml_h_ +#define MultiPmeMgmtBatchXml_h_ + + +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h" + +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MultiPmeMgmtBatch class to/from XML + namespace MultiPmeMgmtBatchXml { + + /// Adds the MultiPmeMgmtBatchDoc into the XML. + void MULTIPMEMGMTREQUESTXML_LINKAGE add( + const SmartPtrCMultiPmeMgmtBatchDoc multiPmeMgmtBatchDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MultiPmeMgmtBatchDoc from the XML. + SmartPtrCMultiPmeMgmtBatchDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.h new file mode 100644 index 000000000..4743b050b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtRequestXml_h_ +#define MultiPmeMgmtRequestXml_h_ + + +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h" + +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MultiPmeMgmtRequest class to/from XML + namespace MultiPmeMgmtRequestXml { + + /// Adds the MultiPmeMgmtRequestDoc into the XML. + void MULTIPMEMGMTREQUESTXML_LINKAGE add( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MultiPmeMgmtRequestDoc from the XML. + SmartPtrCMultiPmeMgmtRequestDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h new file mode 100644 index 000000000..33c5754dc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtRequestXml_Link_h_ +#define MultiPmeMgmtRequestXml_Link_h_ + +#ifndef MULTIPMEMGMTREQUESTXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MULTIPMEMGMTREQUESTXML_LINKAGE __declspec(dllexport) + #else + #define MULTIPMEMGMTREQUESTXML_LINKAGE __declspec(dllimport) + #endif + #else + #define MULTIPMEMGMTREQUESTXML_LINKAGE + #endif +#endif + + +#endif /* MultiPmeMgmtRequestXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.h new file mode 100644 index 000000000..4436137ce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.h @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MultiPmeMgmtRequestXmlRoots_h_ +#define MultiPmeMgmtRequestXmlRoots_h_ + + +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h" + +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h" + +namespace Caf { + + namespace XmlRoots { + + /// Saves the MultiPmeMgmtRequestDoc to a string. + std::string MULTIPMEMGMTREQUESTXML_LINKAGE saveMultiPmeMgmtRequestToString( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc); + + /// Parses the MultiPmeMgmtRequestDoc from the string. + SmartPtrCMultiPmeMgmtRequestDoc MULTIPMEMGMTREQUESTXML_LINKAGE parseMultiPmeMgmtRequestFromString( + const std::string xml); + + /// Saves the MultiPmeMgmtRequestDoc to a file. + void MULTIPMEMGMTREQUESTXML_LINKAGE saveMultiPmeMgmtRequestToFile( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc, + const std::string filePath); + + /// Parses the MultiPmeMgmtRequestDoc from the file. + SmartPtrCMultiPmeMgmtRequestDoc MULTIPMEMGMTREQUESTXML_LINKAGE parseMultiPmeMgmtRequestFromFile( + const std::string filePath); + } +} + +#endif /* MultiPmeMgmtRequestXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.h new file mode 100644 index 000000000..54fad83d1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PmeIdCollectionXml_h_ +#define PmeIdCollectionXml_h_ + + +#include "Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h" + +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the PmeIdCollection class to/from XML + namespace PmeIdCollectionXml { + + /// Adds the PmeIdCollectionDoc into the XML. + void MULTIPMEMGMTREQUESTXML_LINKAGE add( + const SmartPtrCPmeIdCollectionDoc pmeIdCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PmeIdCollectionDoc from the XML. + SmartPtrCPmeIdCollectionDoc MULTIPMEMGMTREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.h new file mode 100644 index 000000000..84f38f775 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PayloadEnvelopeXml_h_ +#define PayloadEnvelopeXml_h_ + + +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" + +#include "Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the PayloadEnvelope class to/from XML + namespace PayloadEnvelopeXml { + + /// Adds the PayloadEnvelopeDoc into the XML. + void PAYLOADENVELOPEXML_LINKAGE add( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PayloadEnvelopeDoc from the XML. + SmartPtrCPayloadEnvelopeDoc PAYLOADENVELOPEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h new file mode 100644 index 000000000..b7b23ddf1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PayloadEnvelopeXml_Link_h_ +#define PayloadEnvelopeXml_Link_h_ + +#ifndef PAYLOADENVELOPEXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PAYLOADENVELOPEXML_LINKAGE __declspec(dllexport) + #else + #define PAYLOADENVELOPEXML_LINKAGE __declspec(dllimport) + #endif + #else + #define PAYLOADENVELOPEXML_LINKAGE + #endif +#endif + + +#endif /* PayloadEnvelopeXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.h new file mode 100644 index 000000000..79f79d6a7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.h @@ -0,0 +1,42 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PayloadEnvelopeXmlRoots_h_ +#define PayloadEnvelopeXmlRoots_h_ + +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" + +#include "Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h" +#include "Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.h" + +namespace Caf { + + namespace XmlRoots { + /// Saves the PayloadEnvelopeDoc to a string. + std::string PAYLOADENVELOPEXML_LINKAGE savePayloadEnvelopeToString( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc); + + /// Parses the PayloadEnvelopeDoc from the string. + SmartPtrCPayloadEnvelopeDoc PAYLOADENVELOPEXML_LINKAGE parsePayloadEnvelopeFromString( + const std::string xml); + + /// Saves the PayloadEnvelopeDoc to a file. + void PAYLOADENVELOPEXML_LINKAGE savePayloadEnvelopeToFile( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc, + const std::string filePath); + + /// Parses the PayloadEnvelopeDoc from the file. + SmartPtrCPayloadEnvelopeDoc PAYLOADENVELOPEXML_LINKAGE parsePayloadEnvelopeFromFile( + const std::string filePath); + } +} + +#endif /* PayloadEnvelopeXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/CertCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/CertCollectionXml.h new file mode 100644 index 000000000..82f4e8024 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/CertCollectionXml.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CertCollectionXml_h_ +#define CertCollectionXml_h_ + + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the CertCollection class to/from XML + namespace CertCollectionXml { + + /// Adds the CertCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCCertCollectionDoc certCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CertCollectionDoc from the XML. + SmartPtrCCertCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/CertPathCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/CertPathCollectionXml.h new file mode 100644 index 000000000..c066457f9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/CertPathCollectionXml.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CertPathCollectionXml_h_ +#define CertPathCollectionXml_h_ + + +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the CertPathCollection class to/from XML + namespace CertPathCollectionXml { + + /// Adds the CertPathCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCCertPathCollectionDoc certPathCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CertPathCollectionDoc from the XML. + SmartPtrCCertPathCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/LocalSecurityXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/LocalSecurityXml.h new file mode 100644 index 000000000..8ce8ac170 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/LocalSecurityXml.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef LocalSecurityXml_h_ +#define LocalSecurityXml_h_ + + +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" + +#include "Doc/DocXml/PersistenceXml/PersistenceXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the LocalSecurity class to/from XML + namespace LocalSecurityXml { + + /// Adds the LocalSecurityDoc into the XML. + void PERSISTENCEXML_LINKAGE add( + const SmartPtrCLocalSecurityDoc localSecurityDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the LocalSecurityDoc from the XML. + SmartPtrCLocalSecurityDoc PERSISTENCEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.h new file mode 100644 index 000000000..2c2331978 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef PersistenceProtocolCollectionXml_h_ +#define PersistenceProtocolCollectionXml_h_ + + +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the PersistenceProtocolCollection class to/from XML + namespace PersistenceProtocolCollectionXml { + + /// Adds the PersistenceProtocolCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PersistenceProtocolCollectionDoc from the XML. + SmartPtrCPersistenceProtocolCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.h new file mode 100644 index 000000000..9808d7098 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef PersistenceProtocolXml_h_ +#define PersistenceProtocolXml_h_ + + +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" + +#include "Doc/DocXml/PersistenceXml/PersistenceXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the PersistenceProtocol class to/from XML + namespace PersistenceProtocolXml { + + /// Adds the PersistenceProtocolDoc into the XML. + void PERSISTENCEXML_LINKAGE add( + const SmartPtrCPersistenceProtocolDoc persistenceProtocolDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PersistenceProtocolDoc from the XML. + SmartPtrCPersistenceProtocolDoc PERSISTENCEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXml.h new file mode 100644 index 000000000..265578b42 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXml.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef PersistenceXml_h_ +#define PersistenceXml_h_ + + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" + +#include "Doc/DocXml/PersistenceXml/PersistenceXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Persistence class to/from XML + namespace PersistenceXml { + + /// Adds the PersistenceDoc into the XML. + void PERSISTENCEXML_LINKAGE add( + const SmartPtrCPersistenceDoc persistenceDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PersistenceDoc from the XML. + SmartPtrCPersistenceDoc PERSISTENCEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXmlLink.h new file mode 100644 index 000000000..c1c2ca98a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXmlLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef PersistenceXml_Link_h_ +#define PersistenceXml_Link_h_ + +#ifndef PERSISTENCEXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PERSISTENCEXML_LINKAGE __declspec(dllexport) + #else + #define PERSISTENCEXML_LINKAGE __declspec(dllimport) + #endif + #else + #define PERSISTENCEXML_LINKAGE + #endif +#endif + + +#endif /* PersistenceXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h new file mode 100644 index 000000000..094cce174 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h @@ -0,0 +1,39 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef PersistenceXmlRoots_h_ +#define PersistenceXmlRoots_h_ + + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" + +#include "Doc/DocXml/PersistenceXml/PersistenceXmlLink.h" + +namespace Caf { + + namespace XmlRoots { + /// Saves the PersistenceDoc to a string. + std::string PERSISTENCEXML_LINKAGE savePersistenceToString( + const SmartPtrCPersistenceDoc persistenceDoc); + + /// Parses the PersistenceDoc from the string. + SmartPtrCPersistenceDoc PERSISTENCEXML_LINKAGE parsePersistenceFromString( + const std::string xml); + + /// Saves the PersistenceDoc to a file. + void PERSISTENCEXML_LINKAGE savePersistenceToFile( + const SmartPtrCPersistenceDoc persistenceDoc, + const std::string filePath); + + /// Parses the PersistenceDoc from the file. + SmartPtrCPersistenceDoc PERSISTENCEXML_LINKAGE parsePersistenceFromFile( + const std::string filePath); + } +} + +#endif /* PersistenceXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.h new file mode 100644 index 000000000..1c78f9ad2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef RemoteSecurityCollectionXml_h_ +#define RemoteSecurityCollectionXml_h_ + + +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the RemoteSecurityCollection class to/from XML + namespace RemoteSecurityCollectionXml { + + /// Adds the RemoteSecurityCollectionDoc into the XML. + void CAFCORETYPESXML_LINKAGE add( + const SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RemoteSecurityCollectionDoc from the XML. + SmartPtrCRemoteSecurityCollectionDoc CAFCORETYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/RemoteSecurityXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/RemoteSecurityXml.h new file mode 100644 index 000000000..5c2ac7a4b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/PersistenceXml/RemoteSecurityXml.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef RemoteSecurityXml_h_ +#define RemoteSecurityXml_h_ + + +#include "Doc/PersistenceDoc/CRemoteSecurityDoc.h" + +#include "Doc/DocXml/PersistenceXml/PersistenceXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the RemoteSecurity class to/from XML + namespace RemoteSecurityXml { + + /// Adds the RemoteSecurityDoc into the XML. + void PERSISTENCEXML_LINKAGE add( + const SmartPtrCRemoteSecurityDoc remoteSecurityDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RemoteSecurityDoc from the XML. + SmartPtrCRemoteSecurityDoc PERSISTENCEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.h new file mode 100644 index 000000000..7b52afe9b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassCollectionXml_h_ +#define ClassCollectionXml_h_ + + +#include "Doc/ProviderInfraDoc/CClassCollectionDoc.h" + +#include "Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ClassCollection class to/from XML + namespace ClassCollectionXml { + + /// Adds the ClassCollectionDoc into the XML. + void PROVIDERINFRAXML_LINKAGE add( + const SmartPtrCClassCollectionDoc classCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassCollectionDoc from the XML. + SmartPtrCClassCollectionDoc PROVIDERINFRAXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h new file mode 100644 index 000000000..ac3fa2287 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderInfraXml_Link_h_ +#define ProviderInfraXml_Link_h_ + +#ifndef PROVIDERINFRAXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PROVIDERINFRAXML_LINKAGE __declspec(dllexport) + #else + #define PROVIDERINFRAXML_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERINFRAXML_LINKAGE + #endif +#endif + + +#endif /* ProviderInfraXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h new file mode 100644 index 000000000..a25184aac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderInfraXmlRoots_h_ +#define ProviderInfraXmlRoots_h_ + + +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" + +#include "Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h" +#include "Doc/ProviderInfraDoc/CSchemaSummaryDoc.h" + +namespace Caf { + + namespace XmlRoots { + + /// Saves the ProviderRegDoc to a string. + std::string PROVIDERINFRAXML_LINKAGE saveProviderRegToString( + const SmartPtrCProviderRegDoc providerRegDoc); + + /// Parses the SchemaSummaryDoc from the string. + SmartPtrCProviderRegDoc PROVIDERINFRAXML_LINKAGE parseProviderRegFromString( + const std::string xml); + + /// Saves the ProviderRegDoc to a file. + void PROVIDERINFRAXML_LINKAGE saveProviderRegToFile( + const SmartPtrCProviderRegDoc providerRegDoc, + const std::string filePath); + + /// Parses the SchemaSummaryDoc from the file. + SmartPtrCProviderRegDoc PROVIDERINFRAXML_LINKAGE parseProviderRegFromFile( + const std::string filePath); + + /// Saves the SchemaSummaryDoc to a string. + std::string PROVIDERINFRAXML_LINKAGE saveSchemaSummaryToString( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc); + + /// Parses the SchemaSummaryDoc from the string. + SmartPtrCSchemaSummaryDoc PROVIDERINFRAXML_LINKAGE parseSchemaSummaryFromString( + const std::string xml); + + /// Saves the SchemaSummaryDoc to a file. + void PROVIDERINFRAXML_LINKAGE saveSchemaSummaryToFile( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc, + const std::string filePath); + + /// Parses the SchemaSummaryDoc from the file. + SmartPtrCSchemaSummaryDoc PROVIDERINFRAXML_LINKAGE parseSchemaSummaryFromFile( + const std::string filePath); + } +} + +#endif /* ProviderInfraXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderRegXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderRegXml.h new file mode 100644 index 000000000..6f1f48650 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/ProviderRegXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRegXml_h_ +#define ProviderRegXml_h_ + + +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" + +#include "Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderReg class to/from XML + namespace ProviderRegXml { + + /// Adds the ProviderRegDoc into the XML. + void PROVIDERINFRAXML_LINKAGE add( + const SmartPtrCProviderRegDoc providerRegDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderRegDoc from the XML. + SmartPtrCProviderRegDoc PROVIDERINFRAXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.h new file mode 100644 index 000000000..265aa7e9d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef SchemaSummaryXml_h_ +#define SchemaSummaryXml_h_ + + +#include "Doc/ProviderInfraDoc/CSchemaSummaryDoc.h" + +#include "Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the SchemaSummary class to/from XML + namespace SchemaSummaryXml { + + /// Adds the SchemaSummaryDoc into the XML. + void PROVIDERINFRAXML_LINKAGE add( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the SchemaSummaryDoc from the XML. + SmartPtrCSchemaSummaryDoc PROVIDERINFRAXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.h new file mode 100644 index 000000000..7b8079d9e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderBatchXml_h_ +#define ProviderBatchXml_h_ + + +#include "Doc/ProviderRequestDoc/CProviderBatchDoc.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderBatch class to/from XML + namespace ProviderBatchXml { + + /// Adds the ProviderBatchDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderBatchDoc providerBatchDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderBatchDoc from the XML. + SmartPtrCProviderBatchDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.h new file mode 100644 index 000000000..65f423634 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderCollectInstancesCollectionXml_h_ +#define ProviderCollectInstancesCollectionXml_h_ + + +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderCollectInstancesCollection class to/from XML + namespace ProviderCollectInstancesCollectionXml { + + /// Adds the ProviderCollectInstancesCollectionDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderCollectInstancesCollectionDoc providerCollectInstancesCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderCollectInstancesCollectionDoc from the XML. + SmartPtrCProviderCollectInstancesCollectionDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.h new file mode 100644 index 000000000..fb9439976 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderCollectInstancesXml_h_ +#define ProviderCollectInstancesXml_h_ + + +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderCollectInstances class to/from XML + namespace ProviderCollectInstancesXml { + + /// Adds the ProviderCollectInstancesDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderCollectInstancesDoc providerCollectInstancesDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderCollectInstancesDoc from the XML. + SmartPtrCProviderCollectInstancesDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.h new file mode 100644 index 000000000..e686b4b37 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderCollectSchemaRequestXml_h_ +#define ProviderCollectSchemaRequestXml_h_ + + +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderCollectSchemaRequest class to/from XML + namespace ProviderCollectSchemaRequestXml { + + /// Adds the ProviderCollectSchemaRequestDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderCollectSchemaRequestDoc from the XML. + SmartPtrCProviderCollectSchemaRequestDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.h new file mode 100644 index 000000000..072f54b21 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderInvokeOperationCollectionXml_h_ +#define ProviderInvokeOperationCollectionXml_h_ + + +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderInvokeOperationCollection class to/from XML + namespace ProviderInvokeOperationCollectionXml { + + /// Adds the ProviderInvokeOperationCollectionDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderInvokeOperationCollectionDoc providerInvokeOperationCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderInvokeOperationCollectionDoc from the XML. + SmartPtrCProviderInvokeOperationCollectionDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.h new file mode 100644 index 000000000..a195fa4c9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderInvokeOperationXml_h_ +#define ProviderInvokeOperationXml_h_ + + +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderInvokeOperation class to/from XML + namespace ProviderInvokeOperationXml { + + /// Adds the ProviderInvokeOperationDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderInvokeOperationDoc providerInvokeOperationDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderInvokeOperationDoc from the XML. + SmartPtrCProviderInvokeOperationDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.h new file mode 100644 index 000000000..264bef874 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestConfigXml_h_ +#define ProviderRequestConfigXml_h_ + + +#include "Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderRequestConfig class to/from XML + namespace ProviderRequestConfigXml { + + /// Adds the ProviderRequestConfigDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderRequestConfigDoc providerRequestConfigDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderRequestConfigDoc from the XML. + SmartPtrCProviderRequestConfigDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.h new file mode 100644 index 000000000..2f22d027f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestHeaderXml_h_ +#define ProviderRequestHeaderXml_h_ + + +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderRequestHeader class to/from XML + namespace ProviderRequestHeaderXml { + + /// Adds the ProviderRequestHeaderDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderRequestHeaderDoc providerRequestHeaderDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderRequestHeaderDoc from the XML. + SmartPtrCProviderRequestHeaderDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.h new file mode 100644 index 000000000..1aae79e17 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestXml_h_ +#define ProviderRequestXml_h_ + + +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderRequest class to/from XML + namespace ProviderRequestXml { + + /// Adds the ProviderRequestDoc into the XML. + void PROVIDERREQUESTXML_LINKAGE add( + const SmartPtrCProviderRequestDoc providerRequestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderRequestDoc from the XML. + SmartPtrCProviderRequestDoc PROVIDERREQUESTXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h new file mode 100644 index 000000000..bcfb910c7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestXml_Link_h_ +#define ProviderRequestXml_Link_h_ + +#ifndef PROVIDERREQUESTXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PROVIDERREQUESTXML_LINKAGE __declspec(dllexport) + #else + #define PROVIDERREQUESTXML_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERREQUESTXML_LINKAGE + #endif +#endif + + +#endif /* ProviderRequestXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h new file mode 100644 index 000000000..404ab56be --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderRequestXmlRoots_h_ +#define ProviderRequestXmlRoots_h_ + + +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" + +namespace Caf { + + namespace XmlRoots { + + /// Saves the ProviderCollectSchemaRequestDoc to a string. + std::string PROVIDERREQUESTXML_LINKAGE saveProviderCollectSchemaRequestToString( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc); + + /// Parses the ProviderCollectSchemaRequestDoc from the string. + SmartPtrCProviderCollectSchemaRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderCollectSchemaRequestFromString( + const std::string xml); + + /// Saves the ProviderCollectSchemaRequestDoc to a file. + void PROVIDERREQUESTXML_LINKAGE saveProviderCollectSchemaRequestToFile( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc, + const std::string filePath); + + /// Parses the ProviderCollectSchemaRequestDoc from the file. + SmartPtrCProviderCollectSchemaRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderCollectSchemaRequestFromFile( + const std::string filePath); + + /// Saves the ProviderRequestDoc to a string. + std::string PROVIDERREQUESTXML_LINKAGE saveProviderRequestToString( + const SmartPtrCProviderRequestDoc providerRequestDoc); + + /// Parses the ProviderCollectSchemaRequestDoc from the string. + SmartPtrCProviderRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderRequestFromString( + const std::string xml); + + /// Saves the ProviderRequestDoc to a file. + void PROVIDERREQUESTXML_LINKAGE saveProviderRequestToFile( + const SmartPtrCProviderRequestDoc providerRequestDoc, + const std::string filePath); + + /// Parses the ProviderCollectSchemaRequestDoc from the file. + SmartPtrCProviderRequestDoc PROVIDERREQUESTXML_LINKAGE parseProviderRequestFromFile( + const std::string filePath); + } +} + +#endif /* ProviderRequestXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/CdifXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/CdifXml.h new file mode 100644 index 000000000..0a245e34d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/CdifXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CdifXml_h_ +#define CdifXml_h_ + + +#include "Doc/ProviderResultsDoc/CCdifDoc.h" + +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Cdif class to/from XML + namespace CdifXml { + + /// Adds the CdifDoc into the XML. + void PROVIDERRESULTSXML_LINKAGE add( + const SmartPtrCCdifDoc cdifDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CdifDoc from the XML. + SmartPtrCCdifDoc PROVIDERRESULTSXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.h new file mode 100644 index 000000000..f0ac18ed7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DefinitionObjectCollectionXml_h_ +#define DefinitionObjectCollectionXml_h_ + + +#include "Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h" + +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DefinitionObjectCollection class to/from XML + namespace DefinitionObjectCollectionXml { + + /// Adds the DefinitionObjectCollectionDoc into the XML. + void PROVIDERRESULTSXML_LINKAGE add( + const SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DefinitionObjectCollectionDoc from the XML. + SmartPtrCDefinitionObjectCollectionDoc PROVIDERRESULTSXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h new file mode 100644 index 000000000..6bea774c4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderResultsXml_Link_h_ +#define ProviderResultsXml_Link_h_ + +#ifndef PROVIDERRESULTSXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PROVIDERRESULTSXML_LINKAGE __declspec(dllexport) + #else + #define PROVIDERRESULTSXML_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERRESULTSXML_LINKAGE + #endif +#endif + + +#endif /* ProviderResultsXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h new file mode 100644 index 000000000..389bd3543 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderResultsXmlRoots_h_ +#define ProviderResultsXmlRoots_h_ + + +#include "Doc/ProviderResultsDoc/CCdifDoc.h" + +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" + +namespace Caf { + + namespace XmlRoots { + + /// Saves the SchemaDoc to a string. + std::string PROVIDERRESULTSXML_LINKAGE saveSchemaToString( + const SmartPtrCSchemaDoc schemaDoc); + + /// Parses the DefinitionObjectCollectionDoc from the string. + SmartPtrCSchemaDoc PROVIDERRESULTSXML_LINKAGE parseSchemaFromString( + const std::string xml); + + /// Saves the SchemaDoc to a file. + void PROVIDERRESULTSXML_LINKAGE saveSchemaToFile( + const SmartPtrCSchemaDoc schemaDoc, + const std::string filePath); + + /// Parses the DefinitionObjectCollectionDoc from the file. + SmartPtrCSchemaDoc PROVIDERRESULTSXML_LINKAGE parseSchemaFromFile( + const std::string filePath); + + /// Saves the CdifDoc to a string. + std::string PROVIDERRESULTSXML_LINKAGE saveCdifToString( + const SmartPtrCCdifDoc cdifDoc); + + /// Parses the DefinitionObjectCollectionDoc from the string. + SmartPtrCCdifDoc PROVIDERRESULTSXML_LINKAGE parseCdifFromString( + const std::string xml); + + /// Saves the CdifDoc to a file. + void PROVIDERRESULTSXML_LINKAGE saveCdifToFile( + const SmartPtrCCdifDoc cdifDoc, + const std::string filePath); + + /// Parses the DefinitionObjectCollectionDoc from the file. + SmartPtrCCdifDoc PROVIDERRESULTSXML_LINKAGE parseCdifFromFile( + const std::string filePath); + } +} + +#endif /* ProviderResultsXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.h new file mode 100644 index 000000000..dcdc00659 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RequestIdentifierXml_h_ +#define RequestIdentifierXml_h_ + + +#include "Doc/ProviderResultsDoc/CRequestIdentifierDoc.h" + +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the RequestIdentifier class to/from XML + namespace RequestIdentifierXml { + + /// Adds the RequestIdentifierDoc into the XML. + void PROVIDERRESULTSXML_LINKAGE add( + const SmartPtrCRequestIdentifierDoc requestIdentifierDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RequestIdentifierDoc from the XML. + SmartPtrCRequestIdentifierDoc PROVIDERRESULTSXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/SchemaXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/SchemaXml.h new file mode 100644 index 000000000..f7ba69276 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ProviderResultsXml/SchemaXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef SchemaXml_h_ +#define SchemaXml_h_ + + +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" + +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Schema class to/from XML + namespace SchemaXml { + + /// Adds the SchemaDoc into the XML. + void PROVIDERRESULTSXML_LINKAGE add( + const SmartPtrCSchemaDoc schemaDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the SchemaDoc from the XML. + SmartPtrCSchemaDoc PROVIDERRESULTSXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ErrorResponseXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ErrorResponseXml.h new file mode 100644 index 000000000..fc973e2c8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ErrorResponseXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ErrorResponseXml_h_ +#define ErrorResponseXml_h_ + + +#include "Doc/ResponseDoc/CErrorResponseDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ErrorResponse class to/from XML + namespace ErrorResponseXml { + + /// Adds the ErrorResponseDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCErrorResponseDoc errorResponseDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ErrorResponseDoc from the XML. + SmartPtrCErrorResponseDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventKeyCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventKeyCollectionXml.h new file mode 100644 index 000000000..b828d1b9c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventKeyCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef EventKeyCollectionXml_h_ +#define EventKeyCollectionXml_h_ + + +#include "Doc/ResponseDoc/CEventKeyCollectionDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the EventKeyCollection class to/from XML + namespace EventKeyCollectionXml { + + /// Adds the EventKeyCollectionDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCEventKeyCollectionDoc eventKeyCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the EventKeyCollectionDoc from the XML. + SmartPtrCEventKeyCollectionDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventKeyXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventKeyXml.h new file mode 100644 index 000000000..5818b974f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventKeyXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef EventKeyXml_h_ +#define EventKeyXml_h_ + + +#include "Doc/ResponseDoc/CEventKeyDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the EventKey class to/from XML + namespace EventKeyXml { + + /// Adds the EventKeyDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCEventKeyDoc eventKeyDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the EventKeyDoc from the XML. + SmartPtrCEventKeyDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventManifestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventManifestXml.h new file mode 100644 index 000000000..c4303273b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/EventManifestXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef EventManifestXml_h_ +#define EventManifestXml_h_ + + +#include "Doc/ResponseDoc/CEventManifestDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the EventManifest class to/from XML + namespace EventManifestXml { + + /// Adds the EventManifestDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCEventManifestDoc eventManifestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the EventManifestDoc from the XML. + SmartPtrCEventManifestDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ManifestCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ManifestCollectionXml.h new file mode 100644 index 000000000..be002178f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ManifestCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ManifestCollectionXml_h_ +#define ManifestCollectionXml_h_ + + +#include "Doc/ResponseDoc/CManifestCollectionDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ManifestCollection class to/from XML + namespace ManifestCollectionXml { + + /// Adds the ManifestCollectionDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCManifestCollectionDoc manifestCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ManifestCollectionDoc from the XML. + SmartPtrCManifestCollectionDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ManifestXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ManifestXml.h new file mode 100644 index 000000000..8bebe6a26 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ManifestXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ManifestXml_h_ +#define ManifestXml_h_ + + +#include "Doc/ResponseDoc/CManifestDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Manifest class to/from XML + namespace ManifestXml { + + /// Adds the ManifestDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCManifestDoc manifestDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ManifestDoc from the XML. + SmartPtrCManifestDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ProviderEventResponseXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ProviderEventResponseXml.h new file mode 100644 index 000000000..208da4851 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ProviderEventResponseXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderEventResponseXml_h_ +#define ProviderEventResponseXml_h_ + + +#include "Doc/ResponseDoc/CProviderEventResponseDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderEventResponse class to/from XML + namespace ProviderEventResponseXml { + + /// Adds the ProviderEventResponseDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderEventResponseDoc from the XML. + SmartPtrCProviderEventResponseDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ProviderResponseXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ProviderResponseXml.h new file mode 100644 index 000000000..558993c59 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ProviderResponseXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ProviderResponseXml_h_ +#define ProviderResponseXml_h_ + + +#include "Doc/ResponseDoc/CProviderResponseDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ProviderResponse class to/from XML + namespace ProviderResponseXml { + + /// Adds the ProviderResponseDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCProviderResponseDoc providerResponseDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ProviderResponseDoc from the XML. + SmartPtrCProviderResponseDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseHeaderXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseHeaderXml.h new file mode 100644 index 000000000..105c8e48e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseHeaderXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ResponseHeaderXml_h_ +#define ResponseHeaderXml_h_ + + +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ResponseHeader class to/from XML + namespace ResponseHeaderXml { + + /// Adds the ResponseHeaderDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCResponseHeaderDoc responseHeaderDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ResponseHeaderDoc from the XML. + SmartPtrCResponseHeaderDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXml.h new file mode 100644 index 000000000..88dfbdbba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ResponseXml_h_ +#define ResponseXml_h_ + + +#include "Doc/ResponseDoc/CResponseDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Response class to/from XML + namespace ResponseXml { + + /// Adds the ResponseDoc into the XML. + void RESPONSEXML_LINKAGE add( + const SmartPtrCResponseDoc responseDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ResponseDoc from the XML. + SmartPtrCResponseDoc RESPONSEXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXmlLink.h new file mode 100644 index 000000000..a55bacca5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ResponseXml_Link_h_ +#define ResponseXml_Link_h_ + +#ifndef RESPONSEXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define RESPONSEXML_LINKAGE __declspec(dllexport) + #else + #define RESPONSEXML_LINKAGE __declspec(dllimport) + #endif + #else + #define RESPONSEXML_LINKAGE + #endif +#endif + + +#endif /* ResponseXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXmlRoots.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXmlRoots.h new file mode 100644 index 000000000..9fe5ea53c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/ResponseXml/ResponseXmlRoots.h @@ -0,0 +1,97 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ResponseXmlRoots_h_ +#define ResponseXmlRoots_h_ + + +#include "Doc/ResponseDoc/CErrorResponseDoc.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Doc/ResponseDoc/CProviderEventResponseDoc.h" +#include "Doc/ResponseDoc/CProviderResponseDoc.h" +#include "Doc/ResponseDoc/CResponseDoc.h" + +namespace Caf { + + namespace XmlRoots { + + /// Saves the ErrorResponseDoc to a string. + std::string RESPONSEXML_LINKAGE saveErrorResponseToString( + const SmartPtrCErrorResponseDoc errorResponseDoc); + + /// Parses the ErrorResponseDoc from the string. + SmartPtrCErrorResponseDoc RESPONSEXML_LINKAGE parseErrorResponseFromString( + const std::string xml); + + /// Saves the ErrorResponseDoc to a file. + void RESPONSEXML_LINKAGE saveErrorResponseToFile( + const SmartPtrCErrorResponseDoc errorResponseDoc, + const std::string filePath); + + /// Parses the ErrorResponseDoc from the file. + SmartPtrCErrorResponseDoc RESPONSEXML_LINKAGE parseErrorResponseFromFile( + const std::string filePath); + + /// Saves the ProviderResponseDoc to a string. + std::string RESPONSEXML_LINKAGE saveProviderResponseToString( + const SmartPtrCProviderResponseDoc providerResponseDoc); + + /// Parses the ErrorResponseDoc from the string. + SmartPtrCProviderResponseDoc RESPONSEXML_LINKAGE parseProviderResponseFromString( + const std::string xml); + + /// Saves the ProviderResponseDoc to a file. + void RESPONSEXML_LINKAGE saveProviderResponseToFile( + const SmartPtrCProviderResponseDoc providerResponseDoc, + const std::string filePath); + + /// Parses the ErrorResponseDoc from the file. + SmartPtrCProviderResponseDoc RESPONSEXML_LINKAGE parseProviderResponseFromFile( + const std::string filePath); + + /// Saves the ResponseDoc to a string. + std::string RESPONSEXML_LINKAGE saveResponseToString( + const SmartPtrCResponseDoc responseDoc); + + /// Parses the ErrorResponseDoc from the string. + SmartPtrCResponseDoc RESPONSEXML_LINKAGE parseResponseFromString( + const std::string xml); + + /// Saves the ResponseDoc to a file. + void RESPONSEXML_LINKAGE saveResponseToFile( + const SmartPtrCResponseDoc responseDoc, + const std::string filePath); + + /// Parses the ErrorResponseDoc from the file. + SmartPtrCResponseDoc RESPONSEXML_LINKAGE parseResponseFromFile( + const std::string filePath); + + /// Saves the ProviderEventResponseDoc to a string. + std::string RESPONSEXML_LINKAGE saveProviderEventResponseToString( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc); + + /// Parses the ErrorResponseDoc from the string. + SmartPtrCProviderEventResponseDoc RESPONSEXML_LINKAGE parseProviderEventResponseFromString( + const std::string xml); + + /// Saves the ProviderEventResponseDoc to a file. + void RESPONSEXML_LINKAGE saveProviderEventResponseToFile( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc, + const std::string filePath); + + /// Parses the ErrorResponseDoc from the file. + SmartPtrCProviderEventResponseDoc RESPONSEXML_LINKAGE parseProviderEventResponseFromFile( + const std::string filePath); + } +} + +#endif /* ResponseXmlRoots_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.h new file mode 100644 index 000000000..ff923d419 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ActionClassInstanceCollectionXml_h_ +#define ActionClassInstanceCollectionXml_h_ + + +#include "Doc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ActionClassInstanceCollection class to/from XML + namespace ActionClassInstanceCollectionXml { + + /// Adds the ActionClassInstanceCollectionDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCActionClassInstanceCollectionDoc actionClassInstanceCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ActionClassInstanceCollectionDoc from the XML. + SmartPtrCActionClassInstanceCollectionDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.h new file mode 100644 index 000000000..215642e48 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ActionClassInstanceXml_h_ +#define ActionClassInstanceXml_h_ + + +#include "Doc/SchemaTypesDoc/CActionClassInstanceDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ActionClassInstance class to/from XML + namespace ActionClassInstanceXml { + + /// Adds the ActionClassInstanceDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCActionClassInstanceDoc actionClassInstanceDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ActionClassInstanceDoc from the XML. + SmartPtrCActionClassInstanceDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassXml.h new file mode 100644 index 000000000..ae777559c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ActionClassXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ActionClassXml_h_ +#define ActionClassXml_h_ + + +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ActionClass class to/from XML + namespace ActionClassXml { + + /// Adds the ActionClassDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCActionClassDoc actionClassDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ActionClassDoc from the XML. + SmartPtrCActionClassDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h new file mode 100644 index 000000000..14016c727 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassCardinalityXml_h_ +#define ClassCardinalityXml_h_ + + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ClassCardinality class to/from XML + namespace ClassCardinalityXml { + + /// Adds the ClassCardinalityDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCClassCardinalityDoc classCardinalityDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassCardinalityDoc from the XML. + SmartPtrCClassCardinalityDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassFieldXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassFieldXml.h new file mode 100644 index 000000000..1fd2eb9f8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassFieldXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassFieldXml_h_ +#define ClassFieldXml_h_ + + +#include "Doc/SchemaTypesDoc/CClassFieldDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ClassField class to/from XML + namespace ClassFieldXml { + + /// Adds the ClassFieldDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCClassFieldDoc classFieldDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassFieldDoc from the XML. + SmartPtrCClassFieldDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h new file mode 100644 index 000000000..b318476c7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassIdentifierXml_h_ +#define ClassIdentifierXml_h_ + + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ClassIdentifier class to/from XML + namespace ClassIdentifierXml { + + /// Adds the ClassIdentifierDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCClassIdentifierDoc classIdentifierDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassIdentifierDoc from the XML. + SmartPtrCClassIdentifierDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.h new file mode 100644 index 000000000..28e28ff2f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassInstancePropertyXml_h_ +#define ClassInstancePropertyXml_h_ + + +#include "Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ClassInstanceProperty class to/from XML + namespace ClassInstancePropertyXml { + + /// Adds the ClassInstancePropertyDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCClassInstancePropertyDoc classInstancePropertyDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassInstancePropertyDoc from the XML. + SmartPtrCClassInstancePropertyDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.h new file mode 100644 index 000000000..022c50c33 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef ClassPropertyXml_h_ +#define ClassPropertyXml_h_ + + +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the ClassProperty class to/from XML + namespace ClassPropertyXml { + + /// Adds the ClassPropertyDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCClassPropertyDoc classPropertyDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the ClassPropertyDoc from the XML. + SmartPtrCClassPropertyDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h new file mode 100644 index 000000000..8d997852c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CmdlMetadataXml_h_ +#define CmdlMetadataXml_h_ + + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the CmdlMetadata class to/from XML + namespace CmdlMetadataXml { + + /// Adds the CmdlMetadataDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CmdlMetadataDoc from the XML. + SmartPtrCCmdlMetadataDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h new file mode 100644 index 000000000..0488cba9c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CmdlUnionXml_h_ +#define CmdlUnionXml_h_ + + +#include "Doc/SchemaTypesDoc/CCmdlUnionDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the CmdlUnion class to/from XML + namespace CmdlUnionXml { + + /// Adds the CmdlUnionDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCCmdlUnionDoc cmdlUnionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CmdlUnionDoc from the XML. + SmartPtrCCmdlUnionDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CollectMethodXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CollectMethodXml.h new file mode 100644 index 000000000..1e8581ad6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/CollectMethodXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef CollectMethodXml_h_ +#define CollectMethodXml_h_ + + +#include "Doc/SchemaTypesDoc/CCollectMethodDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the CollectMethod class to/from XML + namespace CollectMethodXml { + + /// Adds the CollectMethodDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCCollectMethodDoc collectMethodDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the CollectMethodDoc from the XML. + SmartPtrCCollectMethodDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.h new file mode 100644 index 000000000..8d4c31e44 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DataClassInstanceCollectionXml_h_ +#define DataClassInstanceCollectionXml_h_ + + +#include "Doc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DataClassInstanceCollection class to/from XML + namespace DataClassInstanceCollectionXml { + + /// Adds the DataClassInstanceCollectionDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCDataClassInstanceCollectionDoc dataClassInstanceCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DataClassInstanceCollectionDoc from the XML. + SmartPtrCDataClassInstanceCollectionDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.h new file mode 100644 index 000000000..3e5110084 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DataClassInstanceXml_h_ +#define DataClassInstanceXml_h_ + + +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DataClassInstance class to/from XML + namespace DataClassInstanceXml { + + /// Adds the DataClassInstanceDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCDataClassInstanceDoc dataClassInstanceDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DataClassInstanceDoc from the XML. + SmartPtrCDataClassInstanceDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.h new file mode 100644 index 000000000..670f6b87d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DataClassPropertyXml_h_ +#define DataClassPropertyXml_h_ + + +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DataClassProperty class to/from XML + namespace DataClassPropertyXml { + + /// Adds the DataClassPropertyDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCDataClassPropertyDoc dataClassPropertyDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DataClassPropertyDoc from the XML. + SmartPtrCDataClassPropertyDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.h new file mode 100644 index 000000000..6bd2eeb2d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DataClassSubInstanceXml_h_ +#define DataClassSubInstanceXml_h_ + + +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DataClassSubInstance class to/from XML + namespace DataClassSubInstanceXml { + + /// Adds the DataClassSubInstanceDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstanceDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DataClassSubInstanceDoc from the XML. + SmartPtrCDataClassSubInstanceDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassXml.h new file mode 100644 index 000000000..beedd07ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/DataClassXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DataClassXml_h_ +#define DataClassXml_h_ + + +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the DataClass class to/from XML + namespace DataClassXml { + + /// Adds the DataClassDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCDataClassDoc dataClassDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the DataClassDoc from the XML. + SmartPtrCDataClassDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.h new file mode 100644 index 000000000..8ee07a676 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstanceOperationCollectionXml_h_ +#define InstanceOperationCollectionXml_h_ + + +#include "Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the InstanceOperationCollection class to/from XML + namespace InstanceOperationCollectionXml { + + /// Adds the InstanceOperationCollectionDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstanceOperationCollectionDoc from the XML. + SmartPtrCInstanceOperationCollectionDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.h new file mode 100644 index 000000000..2b446ee26 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstanceOperationXml_h_ +#define InstanceOperationXml_h_ + + +#include "Doc/SchemaTypesDoc/CInstanceOperationDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the InstanceOperation class to/from XML + namespace InstanceOperationXml { + + /// Adds the InstanceOperationDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCInstanceOperationDoc instanceOperationDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstanceOperationDoc from the XML. + SmartPtrCInstanceOperationDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.h new file mode 100644 index 000000000..1d54c6fa3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef InstanceParameterXml_h_ +#define InstanceParameterXml_h_ + + +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the InstanceParameter class to/from XML + namespace InstanceParameterXml { + + /// Adds the InstanceParameterDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCInstanceParameterDoc instanceParameterDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the InstanceParameterDoc from the XML. + SmartPtrCInstanceParameterDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/JoinTypeXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/JoinTypeXml.h new file mode 100644 index 000000000..d3cdfa484 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/JoinTypeXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef JoinTypeXml_h_ +#define JoinTypeXml_h_ + + +#include "Doc/SchemaTypesDoc/CJoinTypeDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the JoinType class to/from XML + namespace JoinTypeXml { + + /// Adds the JoinTypeDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCJoinTypeDoc joinTypeDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the JoinTypeDoc from the XML. + SmartPtrCJoinTypeDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.h new file mode 100644 index 000000000..64b2886bd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef LogicalRelationshipXml_h_ +#define LogicalRelationshipXml_h_ + + +#include "Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the LogicalRelationship class to/from XML + namespace LogicalRelationshipXml { + + /// Adds the LogicalRelationshipDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCLogicalRelationshipDoc logicalRelationshipDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the LogicalRelationshipDoc from the XML. + SmartPtrCLogicalRelationshipDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/MethodParameterXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/MethodParameterXml.h new file mode 100644 index 000000000..a0230faf3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/MethodParameterXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MethodParameterXml_h_ +#define MethodParameterXml_h_ + + +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the MethodParameter class to/from XML + namespace MethodParameterXml { + + /// Adds the MethodParameterDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCMethodParameterDoc methodParameterDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MethodParameterDoc from the XML. + SmartPtrCMethodParameterDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/MethodXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/MethodXml.h new file mode 100644 index 000000000..15e72bdd0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/MethodXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef MethodXml_h_ +#define MethodXml_h_ + + +#include "Doc/SchemaTypesDoc/CMethodDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Method class to/from XML + namespace MethodXml { + + /// Adds the MethodDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCMethodDoc methodDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the MethodDoc from the XML. + SmartPtrCMethodDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.h new file mode 100644 index 000000000..838f7eda0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef PhysicalRelationshipXml_h_ +#define PhysicalRelationshipXml_h_ + + +#include "Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the PhysicalRelationship class to/from XML + namespace PhysicalRelationshipXml { + + /// Adds the PhysicalRelationshipDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCPhysicalRelationshipDoc physicalRelationshipDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the PhysicalRelationshipDoc from the XML. + SmartPtrCPhysicalRelationshipDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/RelationshipXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/RelationshipXml.h new file mode 100644 index 000000000..02003b980 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/RelationshipXml.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef RelationshipXml_h_ +#define RelationshipXml_h_ + + +#include "Doc/SchemaTypesDoc/CRelationshipDoc.h" + +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + + /// Streams the Relationship class to/from XML + namespace RelationshipXml { + + /// Adds the RelationshipDoc into the XML. + void SCHEMATYPESXML_LINKAGE add( + const SmartPtrCRelationshipDoc relationshipDoc, + const SmartPtrCXmlElement thisXml); + + /// Parses the RelationshipDoc from the XML. + SmartPtrCRelationshipDoc SCHEMATYPESXML_LINKAGE parse( + const SmartPtrCXmlElement thisXml); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h new file mode 100644 index 000000000..36374c5ac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef SchemaTypesXml_Link_h_ +#define SchemaTypesXml_Link_h_ + +#ifndef SCHEMATYPESXML_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define SCHEMATYPESXML_LINKAGE __declspec(dllexport) + #else + #define SCHEMATYPESXML_LINKAGE __declspec(dllimport) + #endif + #else + #define SCHEMATYPESXML_LINKAGE + #endif +#endif + + +#endif /* SchemaTypesXml_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtRequestDoc/CMgmtRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtRequestDoc/CMgmtRequestDoc.h new file mode 100644 index 000000000..c86b7bce5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtRequestDoc/CMgmtRequestDoc.h @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMgmtRequestDoc_h_ +#define CMgmtRequestDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" + +namespace Caf { + +/// A simple container for objects of type MgmtRequest +class MGMTREQUESTDOC_LINKAGE CMgmtRequestDoc { +public: + CMgmtRequestDoc(); + virtual ~CMgmtRequestDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCMgmtBatchDoc batch, + const SmartPtrCAttachmentCollectionDoc attachmentCollection); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Accessor for the RequestHeader + SmartPtrCRequestHeaderDoc getRequestHeader() const; + + /// Accessor for the Batch + SmartPtrCMgmtBatchDoc getBatch() const; + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const; + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCRequestHeaderDoc _requestHeader; + SmartPtrCMgmtBatchDoc _batch; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtRequestDoc/MgmtRequestDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtRequestDoc/MgmtRequestDocLink.h new file mode 100644 index 000000000..069a8b579 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtRequestDoc/MgmtRequestDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef MgmtRequestDoc_Link_h_ +#define MgmtRequestDoc_Link_h_ + +#ifndef MGMTREQUESTDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MGMTREQUESTDOC_LINKAGE __declspec(dllexport) + #else + #define MGMTREQUESTDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define MGMTREQUESTDOC_LINKAGE + #endif +#endif + + +#endif /* MgmtRequestDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtBatchDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtBatchDoc.h new file mode 100644 index 000000000..76ca16a80 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtBatchDoc.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMgmtBatchDoc_h_ +#define CMgmtBatchDoc_h_ + + +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type MgmtBatch +class MGMTTYPESDOC_LINKAGE CMgmtBatchDoc { +public: + CMgmtBatchDoc(); + virtual ~CMgmtBatchDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCMgmtCollectSchemaDoc collectSchema, + const SmartPtrCMgmtCollectInstancesCollectionDoc collectInstancesCollection, + const SmartPtrCMgmtInvokeOperationCollectionDoc invokeOperationCollection); + +public: + /// Accessor for the CollectSchema + SmartPtrCMgmtCollectSchemaDoc getCollectSchema() const; + + /// Accessor for the CollectInstancesCollection + SmartPtrCMgmtCollectInstancesCollectionDoc getCollectInstancesCollection() const; + + /// Accessor for the InvokeOperationCollection + SmartPtrCMgmtInvokeOperationCollectionDoc getInvokeOperationCollection() const; + +private: + bool _isInitialized; + + SmartPtrCMgmtCollectSchemaDoc _collectSchema; + SmartPtrCMgmtCollectInstancesCollectionDoc _collectInstancesCollection; + SmartPtrCMgmtInvokeOperationCollectionDoc _invokeOperationCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtBatchDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtBatchDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h new file mode 100644 index 000000000..3544ca4c0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMgmtCollectInstancesCollectionDoc_h_ +#define CMgmtCollectInstancesCollectionDoc_h_ + + +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" + +namespace Caf { + +/// A simple container for objects of type MgmtCollectInstancesCollection +class MGMTTYPESDOC_LINKAGE CMgmtCollectInstancesCollectionDoc { +public: + CMgmtCollectInstancesCollectionDoc(); + virtual ~CMgmtCollectInstancesCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque collectInstancesCollection); + +public: + /// Accessor for the CollectInstances + std::deque getCollectInstancesCollection() const; + +private: + bool _isInitialized; + + std::deque _collectInstancesCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtCollectInstancesCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtCollectInstancesCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h new file mode 100644 index 000000000..a70a50178 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMgmtCollectInstancesDoc_h_ +#define CMgmtCollectInstancesDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type MgmtCollectInstances +class MGMTTYPESDOC_LINKAGE CMgmtCollectInstancesDoc { +public: + CMgmtCollectInstancesDoc(); + virtual ~CMgmtCollectInstancesDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId, + const SmartPtrCClassSpecifierDoc classSpecifier, + const SmartPtrCParameterCollectionDoc parameterCollection); + +public: + /// Accessor for the JobId + UUID getJobId() const; + + /// Accessor for the ClassSpecifier + SmartPtrCClassSpecifierDoc getClassSpecifier() const; + + /// Accessor for the ParameterCollection + SmartPtrCParameterCollectionDoc getParameterCollection() const; + +private: + UUID _jobId; + SmartPtrCClassSpecifierDoc _classSpecifier; + SmartPtrCParameterCollectionDoc _parameterCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtCollectInstancesDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtCollectInstancesDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h new file mode 100644 index 000000000..74fd5c020 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMgmtCollectSchemaDoc_h_ +#define CMgmtCollectSchemaDoc_h_ + +namespace Caf { + +/// A simple container for objects of type MgmtCollectSchema +class MGMTTYPESDOC_LINKAGE CMgmtCollectSchemaDoc { +public: + CMgmtCollectSchemaDoc(); + virtual ~CMgmtCollectSchemaDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId); + +public: + /// Accessor for the JobId + UUID getJobId() const; + +private: + UUID _jobId; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtCollectSchemaDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtCollectSchemaDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h new file mode 100644 index 000000000..25c7b85a3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMgmtInvokeOperationCollectionDoc_h_ +#define CMgmtInvokeOperationCollectionDoc_h_ + + +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" + +namespace Caf { + +/// A simple container for objects of type MgmtInvokeOperationCollection +class MGMTTYPESDOC_LINKAGE CMgmtInvokeOperationCollectionDoc { +public: + CMgmtInvokeOperationCollectionDoc(); + virtual ~CMgmtInvokeOperationCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque invokeOperationCollection); + +public: + /// Accessor for the InvokeOperation + std::deque getInvokeOperationCollection() const; + +private: + bool _isInitialized; + + std::deque _invokeOperationCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtInvokeOperationCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtInvokeOperationCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h new file mode 100644 index 000000000..e03325d8c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMgmtInvokeOperationDoc_h_ +#define CMgmtInvokeOperationDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" + +namespace Caf { + +/// A simple container for objects of type MgmtInvokeOperation +class MGMTTYPESDOC_LINKAGE CMgmtInvokeOperationDoc { +public: + CMgmtInvokeOperationDoc(); + virtual ~CMgmtInvokeOperationDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID jobId, + const SmartPtrCClassSpecifierDoc classSpecifier, + const SmartPtrCOperationDoc operation); + +public: + /// Accessor for the JobId + UUID getJobId() const; + + /// Accessor for the ClassSpecifier + SmartPtrCClassSpecifierDoc getClassSpecifier() const; + + /// Accessor for the Operation + SmartPtrCOperationDoc getOperation() const; + +private: + UUID _jobId; + SmartPtrCClassSpecifierDoc _classSpecifier; + SmartPtrCOperationDoc _operation; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMgmtInvokeOperationDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMgmtInvokeOperationDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/MgmtTypesDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/MgmtTypesDocLink.h new file mode 100644 index 000000000..1bcd3e3f8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MgmtTypesDoc/MgmtTypesDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef MgmtTypesDoc_Link_h_ +#define MgmtTypesDoc_Link_h_ + +#ifndef MGMTTYPESDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MGMTTYPESDOC_LINKAGE __declspec(dllexport) + #else + #define MGMTTYPESDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define MGMTTYPESDOC_LINKAGE + #endif +#endif + + +#endif /* MgmtTypesDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h new file mode 100644 index 000000000..a22398bdc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMultiPmeMgmtBatchCollectionDoc_h_ +#define CMultiPmeMgmtBatchCollectionDoc_h_ + + +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h" + +namespace Caf { + +/// A simple container for objects of type MultiPmeMgmtBatchCollection +class MULTIPMEMGMTREQUESTDOC_LINKAGE CMultiPmeMgmtBatchCollectionDoc { +public: + CMultiPmeMgmtBatchCollectionDoc(); + virtual ~CMultiPmeMgmtBatchCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque multiPmeBatch); + +public: + /// Accessor for the MultiPmeBatch + std::deque getMultiPmeBatch() const; + +private: + bool _isInitialized; + + std::deque _multiPmeBatch; + +private: + CAF_CM_DECLARE_NOCOPY(CMultiPmeMgmtBatchCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMultiPmeMgmtBatchCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h new file mode 100644 index 000000000..252daef4e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMultiPmeMgmtBatchDoc_h_ +#define CMultiPmeMgmtBatchDoc_h_ + + +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type MultiPmeMgmtBatch +class MULTIPMEMGMTREQUESTDOC_LINKAGE CMultiPmeMgmtBatchDoc { +public: + CMultiPmeMgmtBatchDoc(); + virtual ~CMultiPmeMgmtBatchDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCPmeIdCollectionDoc pmeIdCollection, + const SmartPtrCMgmtBatchDoc batch); + +public: + /// Accessor for the PmeIdCollection + SmartPtrCPmeIdCollectionDoc getPmeIdCollection() const; + + /// Accessor for the Batch + SmartPtrCMgmtBatchDoc getBatch() const; + +private: + bool _isInitialized; + + SmartPtrCPmeIdCollectionDoc _pmeIdCollection; + SmartPtrCMgmtBatchDoc _batch; + +private: + CAF_CM_DECLARE_NOCOPY(CMultiPmeMgmtBatchDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMultiPmeMgmtBatchDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h new file mode 100644 index 000000000..1211d3dc9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMultiPmeMgmtRequestDoc_h_ +#define CMultiPmeMgmtRequestDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type MultiPmeMgmtRequest +class MULTIPMEMGMTREQUESTDOC_LINKAGE CMultiPmeMgmtRequestDoc { +public: + CMultiPmeMgmtRequestDoc(); + virtual ~CMultiPmeMgmtRequestDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeBatchCollection); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the RequestHeader + SmartPtrCRequestHeaderDoc getRequestHeader() const; + + /// Accessor for the MultiPmeBatchCollection + SmartPtrCMultiPmeMgmtBatchCollectionDoc getMultiPmeBatchCollection() const; + +private: + UUID _clientId; + UUID _requestId; + SmartPtrCRequestHeaderDoc _requestHeader; + SmartPtrCMultiPmeMgmtBatchCollectionDoc _multiPmeBatchCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMultiPmeMgmtRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMultiPmeMgmtRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h new file mode 100644 index 000000000..cec3188da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h @@ -0,0 +1,45 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CPmeIdCollectionDoc_h_ +#define CPmeIdCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type PmeIdCollection +class MULTIPMEMGMTREQUESTDOC_LINKAGE CPmeIdCollectionDoc { +public: + CPmeIdCollectionDoc(); + virtual ~CPmeIdCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque pmeIdCollection); + +public: + /// Accessor for the PmeId + std::deque getPmeIdCollection() const; + +private: + bool _isInitialized; + + std::deque _pmeIdCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CPmeIdCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPmeIdCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/MultiPmeMgmtRequestDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/MultiPmeMgmtRequestDocLink.h new file mode 100644 index 000000000..c0d62af69 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/MultiPmeMgmtRequestDoc/MultiPmeMgmtRequestDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef MultiPmeMgmtRequestDoc_Link_h_ +#define MultiPmeMgmtRequestDoc_Link_h_ + +#ifndef MULTIPMEMGMTREQUESTDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MULTIPMEMGMTREQUESTDOC_LINKAGE __declspec(dllexport) + #else + #define MULTIPMEMGMTREQUESTDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define MULTIPMEMGMTREQUESTDOC_LINKAGE + #endif +#endif + + +#endif /* MultiPmeMgmtRequestDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h new file mode 100644 index 000000000..2f3a145eb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CPayloadEnvelopeDoc_h_ +#define CPayloadEnvelopeDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type PayloadEnvelope +class PAYLOADENVELOPEDOC_LINKAGE CPayloadEnvelopeDoc { +public: + CPayloadEnvelopeDoc(); + virtual ~CPayloadEnvelopeDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID& clientId, + const UUID& requestId, + const std::string& pmeId, + const std::string& payloadType, + const std::string& payloadVersion, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const SmartPtrCProtocolCollectionDoc& protocolCollection = SmartPtrCProtocolCollectionDoc(), + const SmartPtrCPropertyCollectionDoc& headerCollection = SmartPtrCPropertyCollectionDoc(), + const std::string version = "1.0"); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Accessor for the PayloadType + std::string getPayloadType() const; + + /// Accessor for the PayloadVersion + std::string getPayloadVersion() const; + + /// Accessor for the Protocol Collection + SmartPtrCProtocolCollectionDoc getProtocolCollection() const; + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const; + + /// Accessor for the Headers + SmartPtrCPropertyCollectionDoc getHeaderCollection() const; + + /// Accessor for the version + std::string getVersion() const; + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + std::string _payloadType; + std::string _payloadVersion; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + SmartPtrCProtocolCollectionDoc _protocolCollection; + SmartPtrCPropertyCollectionDoc _headerCollection; + std::string _version; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CPayloadEnvelopeDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPayloadEnvelopeDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PayloadEnvelopeDoc/PayloadEnvelopeDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PayloadEnvelopeDoc/PayloadEnvelopeDocLink.h new file mode 100644 index 000000000..f75aed98b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PayloadEnvelopeDoc/PayloadEnvelopeDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef PayloadEnvelopeDoc_Link_h_ +#define PayloadEnvelopeDoc_Link_h_ + +#ifndef PAYLOADENVELOPEDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PAYLOADENVELOPEDOC_LINKAGE __declspec(dllexport) + #else + #define PAYLOADENVELOPEDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define PAYLOADENVELOPEDOC_LINKAGE + #endif +#endif + + +#endif /* PayloadEnvelopeDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CCertCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CCertCollectionDoc.h new file mode 100644 index 000000000..fa34c7982 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CCertCollectionDoc.h @@ -0,0 +1,45 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CCertCollectionDoc_h_ +#define CCertCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CertCollection +class PERSISTENCEDOC_LINKAGE CCertCollectionDoc { +public: + CCertCollectionDoc(); + virtual ~CCertCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque certCollection = std::deque()); + +public: + /// Accessor for the Cert + std::deque getCert() const; + +private: + bool _isInitialized; + + std::deque _certCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CCertCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCertCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CCertPathCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CCertPathCollectionDoc.h new file mode 100644 index 000000000..6f43ac105 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CCertPathCollectionDoc.h @@ -0,0 +1,45 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CCertPathCollectionDoc_h_ +#define CCertPathCollectionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CertPathCollection +class PERSISTENCEDOC_LINKAGE CCertPathCollectionDoc { +public: + CCertPathCollectionDoc(); + virtual ~CCertPathCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque certPathCollection = std::deque()); + +public: + /// Accessor for the Cert + std::deque getCertPath() const; + +private: + bool _isInitialized; + + std::deque _certPathCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CCertPathCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCertPathCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CLocalSecurityDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CLocalSecurityDoc.h new file mode 100644 index 000000000..c69384311 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CLocalSecurityDoc.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CLocalSecurityDoc_h_ +#define CLocalSecurityDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CLocalSecurityDoc +class PERSISTENCEDOC_LINKAGE CLocalSecurityDoc { +public: + CLocalSecurityDoc(); + virtual ~CLocalSecurityDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string& localId = std::string(), + const std::string& privateKey = std::string(), + const std::string& cert = std::string(), + const std::string& privateKeyPath = std::string(), + const std::string& certPath = std::string()); + +public: + /// Accessor for the LocalId + std::string getLocalId() const; + + /// Accessor for the PrivateKey + std::string getPrivateKey() const; + + /// Accessor for the Cert + std::string getCert() const; + + /// Accessor for the PrivateKeyPath + std::string getPrivateKeyPath() const; + + /// Accessor for the CertPath + std::string getCertPath() const; + +private: + std::string _localId; + std::string _privateKey; + std::string _cert; + + std::string _privateKeyPath; + std::string _certPath; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CLocalSecurityDoc); +}; + +CAF_DECLARE_SMART_POINTER(CLocalSecurityDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceDoc.h new file mode 100644 index 000000000..9caed9acd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceDoc.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CPersistenceDoc_h_ +#define CPersistenceDoc_h_ + + +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type PersistenceEnvelope +class PERSISTENCEDOC_LINKAGE CPersistenceDoc { +public: + CPersistenceDoc(); + virtual ~CPersistenceDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCLocalSecurityDoc& localSecurity = SmartPtrCLocalSecurityDoc(), + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollection = SmartPtrCRemoteSecurityCollectionDoc(), + const SmartPtrCPersistenceProtocolCollectionDoc& persistenceProtocolCollection = SmartPtrCPersistenceProtocolCollectionDoc(), + const std::string version = "1.0"); + +public: + /// Accessor for the LocalSecurity + SmartPtrCLocalSecurityDoc getLocalSecurity() const; + + /// Accessor for the Protocol Collection + SmartPtrCRemoteSecurityCollectionDoc getRemoteSecurityCollection() const; + + /// Accessor for the PersistenceProtocol + SmartPtrCPersistenceProtocolCollectionDoc getPersistenceProtocolCollection() const; + + /// Accessor for the version + std::string getVersion() const; + +private: + SmartPtrCLocalSecurityDoc _localSecurity; + SmartPtrCRemoteSecurityCollectionDoc _remoteSecurityCollection; + SmartPtrCPersistenceProtocolCollectionDoc _persistenceProtocolCollection; + std::string _version; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CPersistenceDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPersistenceDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h new file mode 100644 index 000000000..7548e3871 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CPersistenceProtocolCollectionDoc_h_ +#define CPersistenceProtocolCollectionDoc_h_ + + +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" + +namespace Caf { + +/// A simple container for objects of type PersistenceProtocolCollection +class PERSISTENCEDOC_LINKAGE CPersistenceProtocolCollectionDoc { +public: + CPersistenceProtocolCollectionDoc(); + virtual ~CPersistenceProtocolCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque persistenceProtocol = std::deque()); + +public: + /// Accessor for the PersistenceProtocol + std::deque getPersistenceProtocol() const; + +private: + bool _isInitialized; + + std::deque _persistenceProtocol; + +private: + CAF_CM_DECLARE_NOCOPY(CPersistenceProtocolCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPersistenceProtocolCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceProtocolDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceProtocolDoc.h new file mode 100644 index 000000000..eea8401ef --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CPersistenceProtocolDoc.h @@ -0,0 +1,104 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CPersistenceProtocolDoc_h_ +#define CPersistenceProtocolDoc_h_ + + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type CPersistenceProtocolDoc +class PERSISTENCEDOC_LINKAGE CPersistenceProtocolDoc { +public: + CPersistenceProtocolDoc(); + virtual ~CPersistenceProtocolDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string& protocolName = std::string(), + const std::string& uri = std::string(), + const std::string& uriAmqp = std::string(), + const std::string& uriTunnel = std::string(), + const std::string& tlsCert = std::string(), + const std::string& tlsProtocol = std::string(), + const Cdeqstr& tlsCipherCollection = Cdeqstr(), + const SmartPtrCCertCollectionDoc& tlsCertCollection = SmartPtrCCertCollectionDoc(), + const std::string& uriAmqpPath = std::string(), + const std::string& uriTunnelPath = std::string(), + const std::string& tlsCertPath = std::string(), + const SmartPtrCCertPathCollectionDoc& tlsCertPathCollection = SmartPtrCCertPathCollectionDoc()); + +public: + /// Accessor for the ProtocolName + std::string getProtocolName() const; + + /// Accessor for the Uri + std::string getUri() const; + + /// Accessor for the UriAmqp + std::string getUriAmqp() const; + + /// Accessor for the UriTunnel + std::string getUriTunnel() const; + + /// Accessor for the TlsCert + std::string getTlsCert() const; + + /// Accessor for the TlsProtocol + std::string getTlsProtocol() const; + + /// Accessor for the tlsCipherCollection + Cdeqstr getTlsCipherCollection() const; + + /// Accessor for the TlsCertCollection + SmartPtrCCertCollectionDoc getTlsCertCollection() const; + + /// Accessor for the UriAmqpPath + std::string getUriAmqpPath() const; + + /// Accessor for the UriTunnelPath + std::string getUriTunnelPath() const; + + /// Accessor for the TlsCertPath + std::string getTlsCertPath() const; + + /// Accessor for the TlsCertPathCollection + SmartPtrCCertPathCollectionDoc getTlsCertPathCollection() const; + +private: + std::string _protocolName; + std::string _uri; + std::string _uriAmqp; + std::string _uriTunnel; + std::string _tlsCert; + std::string _tlsProtocol; + Cdeqstr _tlsCipherCollection; + SmartPtrCCertCollectionDoc _tlsCertCollection; + + std::string _uriAmqpPath; + std::string _uriTunnelPath; + std::string _tlsCertPath; + SmartPtrCCertPathCollectionDoc _tlsCertPathCollection; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CPersistenceProtocolDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPersistenceProtocolDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h new file mode 100644 index 000000000..48076b8df --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CRemoteSecurityCollectionDoc_h_ +#define CRemoteSecurityCollectionDoc_h_ + + +#include "Doc/PersistenceDoc/CRemoteSecurityDoc.h" + +namespace Caf { + +/// A simple container for objects of type RemoteSecurityCollection +class PERSISTENCEDOC_LINKAGE CRemoteSecurityCollectionDoc { +public: + CRemoteSecurityCollectionDoc(); + virtual ~CRemoteSecurityCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque remoteSecurity = std::deque()); + +public: + /// Accessor for the RemoteSecurity + std::deque getRemoteSecurity() const; + +private: + bool _isInitialized; + + std::deque _remoteSecurity; + +private: + CAF_CM_DECLARE_NOCOPY(CRemoteSecurityCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRemoteSecurityCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CRemoteSecurityDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CRemoteSecurityDoc.h new file mode 100644 index 000000000..96e8c436a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/CRemoteSecurityDoc.h @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CRemoteSecurityDoc_h_ +#define CRemoteSecurityDoc_h_ + + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type CRemoteSecurityDoc +class PERSISTENCEDOC_LINKAGE CRemoteSecurityDoc { +public: + CRemoteSecurityDoc(); + virtual ~CRemoteSecurityDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string& remoteId = std::string(), + const std::string& protocolName = std::string(), + const std::string& cmsCert = std::string(), + const std::string& cmsCipherName = std::string(), + const SmartPtrCCertCollectionDoc& cmsCertCollection = SmartPtrCCertCollectionDoc(), + const std::string& cmsCertPath = std::string(), + const SmartPtrCCertPathCollectionDoc& cmsCertPathCollection = SmartPtrCCertPathCollectionDoc()); + +public: + /// Accessor for the RemoteId + std::string getRemoteId() const; + + /// Accessor for the ProtocolName + std::string getProtocolName() const; + + /// Accessor for the cmsCert + std::string getCmsCert() const; + + /// Accessor for the CmsCipher + std::string getCmsCipherName() const; + + /// Accessor for the CertCollection + SmartPtrCCertCollectionDoc getCmsCertCollection() const; + + /// Accessor for the cmsCertPath + std::string getCmsCertPath() const; + + /// Accessor for the CertPathCollection + SmartPtrCCertPathCollectionDoc getCmsCertPathCollection() const; + +private: + std::string _remoteId; + std::string _protocolName; + std::string _cmsCert; + std::string _cmsCipherName; + SmartPtrCCertCollectionDoc _cmsCertCollection; + + std::string _cmsCertPath; + SmartPtrCCertPathCollectionDoc _cmsCertPathCollection; + + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CRemoteSecurityDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRemoteSecurityDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/PersistenceDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/PersistenceDocLink.h new file mode 100644 index 000000000..b96c6567c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/PersistenceDoc/PersistenceDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef PersistenceDoc_Link_h_ +#define PersistenceDoc_Link_h_ + +#ifndef PERSISTENCEDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PERSISTENCEDOC_LINKAGE __declspec(dllexport) + #else + #define PERSISTENCEDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define PERSISTENCEDOC_LINKAGE + #endif +#endif + + +#endif /* PersistenceDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CClassCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CClassCollectionDoc.h new file mode 100644 index 000000000..909caad9f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CClassCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CClassCollectionDoc_h_ +#define CClassCollectionDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" + +namespace Caf { + +/// A simple container for objects of type ClassCollection +class PROVIDERINFRADOC_LINKAGE CClassCollectionDoc { +public: + CClassCollectionDoc(); + virtual ~CClassCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque fullyQualifiedClass); + +public: + /// Accessor for the FullyQualifiedClass + std::deque getFullyQualifiedClass() const; + +private: + bool _isInitialized; + + std::deque _fullyQualifiedClass; + +private: + CAF_CM_DECLARE_NOCOPY(CClassCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CProviderRegDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CProviderRegDoc.h new file mode 100644 index 000000000..c18ddc219 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CProviderRegDoc.h @@ -0,0 +1,69 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderRegDoc_h_ +#define CProviderRegDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ProviderReg +class PROVIDERINFRADOC_LINKAGE CProviderRegDoc { +public: + CProviderRegDoc(); + virtual ~CProviderRegDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const int32 staleSec, + const bool isSchemaVisible, + const std::string invokerRelPath); + +public: + /// Accessor for the ProviderNamespace + std::string getProviderNamespace() const; + + /// Accessor for the ProviderName + std::string getProviderName() const; + + /// Accessor for the ProviderVersion + std::string getProviderVersion() const; + + /// Accessor for the StaleSec + int32 getStaleSec() const; + + /// Accessor for the IsSchemaVisible + bool getIsSchemaVisible() const; + + /// Accessor for the InvokerRelPath + std::string getInvokerRelPath() const; + +private: + std::string _providerNamespace; + std::string _providerName; + std::string _providerVersion; + int32 _staleSec; + bool _isSchemaVisible; + std::string _invokerRelPath; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderRegDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderRegDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CSchemaSummaryDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CSchemaSummaryDoc.h new file mode 100644 index 000000000..81ee08b68 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/CSchemaSummaryDoc.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CSchemaSummaryDoc_h_ +#define CSchemaSummaryDoc_h_ + + +#include "Doc/ProviderInfraDoc/CClassCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type SchemaSummary +class PROVIDERINFRADOC_LINKAGE CSchemaSummaryDoc { +public: + CSchemaSummaryDoc(); + virtual ~CSchemaSummaryDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const SmartPtrCClassCollectionDoc classCollection, + const std::string invokerPath); + +public: + /// Accessor for the ProviderNamespace + std::string getProviderNamespace() const; + + /// Accessor for the ProviderName + std::string getProviderName() const; + + /// Accessor for the ProviderVersion + std::string getProviderVersion() const; + + /// Accessor for the ClassCollection + SmartPtrCClassCollectionDoc getClassCollection() const; + + /// Accessor for the InvokerPath + std::string getInvokerPath() const; + +private: + bool _isInitialized; + + std::string _providerNamespace; + std::string _providerName; + std::string _providerVersion; + SmartPtrCClassCollectionDoc _classCollection; + std::string _invokerPath; + +private: + CAF_CM_DECLARE_NOCOPY(CSchemaSummaryDoc); +}; + +CAF_DECLARE_SMART_POINTER(CSchemaSummaryDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/ProviderInfraDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/ProviderInfraDocLink.h new file mode 100644 index 000000000..6e507a4a4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderInfraDoc/ProviderInfraDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef ProviderInfraDoc_Link_h_ +#define ProviderInfraDoc_Link_h_ + +#ifndef PROVIDERINFRADOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PROVIDERINFRADOC_LINKAGE __declspec(dllexport) + #else + #define PROVIDERINFRADOC_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERINFRADOC_LINKAGE + #endif +#endif + + +#endif /* ProviderInfraDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderBatchDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderBatchDoc.h new file mode 100644 index 000000000..970317ae3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderBatchDoc.h @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderBatchDoc_h_ +#define CProviderBatchDoc_h_ + + +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderBatch +class PROVIDERREQUESTDOC_LINKAGE CProviderBatchDoc { +public: + CProviderBatchDoc(); + virtual ~CProviderBatchDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string outputDir, + const SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollection, + const SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollection); + +public: + /// Accessor for the OutputDir + std::string getOutputDir() const; + + /// Accessor for the CollectInstancesCollection + SmartPtrCProviderCollectInstancesCollectionDoc getCollectInstancesCollection() const; + + /// Accessor for the InvokeOperationCollection + SmartPtrCProviderInvokeOperationCollectionDoc getInvokeOperationCollection() const; + +private: + bool _isInitialized; + + std::string _outputDir; + SmartPtrCProviderCollectInstancesCollectionDoc _collectInstancesCollection; + SmartPtrCProviderInvokeOperationCollectionDoc _invokeOperationCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderBatchDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderBatchDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h new file mode 100644 index 000000000..f0152894b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderCollectInstancesCollectionDoc_h_ +#define CProviderCollectInstancesCollectionDoc_h_ + + +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderCollectInstancesCollection +class PROVIDERREQUESTDOC_LINKAGE CProviderCollectInstancesCollectionDoc { +public: + CProviderCollectInstancesCollectionDoc(); + virtual ~CProviderCollectInstancesCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque collectInstances); + +public: + /// Accessor for the CollectInstances + std::deque getCollectInstances() const; + +private: + bool _isInitialized; + + std::deque _collectInstances; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderCollectInstancesCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderCollectInstancesCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h new file mode 100644 index 000000000..a07b4289b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderCollectInstancesDoc_h_ +#define CProviderCollectInstancesDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderCollectInstances +class PROVIDERREQUESTDOC_LINKAGE CProviderCollectInstancesDoc { +public: + CProviderCollectInstancesDoc(); + virtual ~CProviderCollectInstancesDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const UUID jobId, + const std::string outputDir, + const SmartPtrCParameterCollectionDoc parameterCollection); + +public: + /// Accessor for the ClassNamespace + std::string getClassNamespace() const; + + /// Accessor for the ClassName + std::string getClassName() const; + + /// Accessor for the ClassVersion + std::string getClassVersion() const; + + /// Accessor for the JobId + UUID getJobId() const; + + /// Accessor for the OutputDir + std::string getOutputDir() const; + + /// Accessor for the ParameterCollection + SmartPtrCParameterCollectionDoc getParameterCollection() const; + +private: + std::string _classNamespace; + std::string _className; + std::string _classVersion; + UUID _jobId; + std::string _outputDir; + SmartPtrCParameterCollectionDoc _parameterCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderCollectInstancesDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderCollectInstancesDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h new file mode 100644 index 000000000..995134f3d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderCollectSchemaRequestDoc_h_ +#define CProviderCollectSchemaRequestDoc_h_ + + +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderCollectSchemaRequest +class PROVIDERREQUESTDOC_LINKAGE CProviderCollectSchemaRequestDoc { +public: + CProviderCollectSchemaRequestDoc(); + virtual ~CProviderCollectSchemaRequestDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const UUID jobId, + const std::string outputDir, + const SmartPtrCProviderRequestHeaderDoc requestHeader); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Accessor for the JobId + UUID getJobId() const; + + /// Accessor for the OutputDir + std::string getOutputDir() const; + + /// Accessor for the RequestHeader + SmartPtrCProviderRequestHeaderDoc getRequestHeader() const; + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + UUID _jobId; + std::string _outputDir; + SmartPtrCProviderRequestHeaderDoc _requestHeader; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderCollectSchemaRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderCollectSchemaRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h new file mode 100644 index 000000000..ce7377a59 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderInvokeOperationCollectionDoc_h_ +#define CProviderInvokeOperationCollectionDoc_h_ + + +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderInvokeOperationCollection +class PROVIDERREQUESTDOC_LINKAGE CProviderInvokeOperationCollectionDoc { +public: + CProviderInvokeOperationCollectionDoc(); + virtual ~CProviderInvokeOperationCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque invokeOperation); + +public: + /// Accessor for the InvokeOperation + std::deque getInvokeOperation() const; + +private: + bool _isInitialized; + + std::deque _invokeOperation; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderInvokeOperationCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderInvokeOperationCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h new file mode 100644 index 000000000..a56bb6aab --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderInvokeOperationDoc_h_ +#define CProviderInvokeOperationDoc_h_ + + +#include "Doc/CafCoreTypesDoc/COperationDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderInvokeOperation +class PROVIDERREQUESTDOC_LINKAGE CProviderInvokeOperationDoc { +public: + CProviderInvokeOperationDoc(); + virtual ~CProviderInvokeOperationDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const UUID jobId, + const std::string outputDir, + const SmartPtrCOperationDoc operation); + +public: + /// Accessor for the ClassNamespace + std::string getClassNamespace() const; + + /// Accessor for the ClassName + std::string getClassName() const; + + /// Accessor for the ClassVersion + std::string getClassVersion() const; + + /// Accessor for the JobId + UUID getJobId() const; + + /// Accessor for the OutputDir + std::string getOutputDir() const; + + /// Accessor for the Operation + SmartPtrCOperationDoc getOperation() const; + +private: + std::string _classNamespace; + std::string _className; + std::string _classVersion; + UUID _jobId; + std::string _outputDir; + SmartPtrCOperationDoc _operation; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderInvokeOperationDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderInvokeOperationDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h new file mode 100644 index 000000000..b78e8e00a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h @@ -0,0 +1,53 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderRequestConfigDoc_h_ +#define CProviderRequestConfigDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderRequestConfig +class PROVIDERREQUESTDOC_LINKAGE CProviderRequestConfigDoc { +public: + CProviderRequestConfigDoc(); + virtual ~CProviderRequestConfigDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string responseFormatType, + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollection); + +public: + /// Accessor for the ResponseFormatType + std::string getResponseFormatType() const; + + /// Accessor for the LoggingLevelCollection + SmartPtrCLoggingLevelCollectionDoc getLoggingLevelCollection() const; + +private: + bool _isInitialized; + + std::string _responseFormatType; + SmartPtrCLoggingLevelCollectionDoc _loggingLevelCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderRequestConfigDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderRequestConfigDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestDoc.h new file mode 100644 index 000000000..971b5de31 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestDoc.h @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderRequestDoc_h_ +#define CProviderRequestDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderBatchDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderRequest +class PROVIDERREQUESTDOC_LINKAGE CProviderRequestDoc { +public: + CProviderRequestDoc(); + virtual ~CProviderRequestDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCProviderRequestHeaderDoc requestHeader, + const SmartPtrCProviderBatchDoc batch, + const SmartPtrCAttachmentCollectionDoc attachmentCollection); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Accessor for the RequestHeader + SmartPtrCProviderRequestHeaderDoc getRequestHeader() const; + + /// Accessor for the Batch + SmartPtrCProviderBatchDoc getBatch() const; + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const; + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCProviderRequestHeaderDoc _requestHeader; + SmartPtrCProviderBatchDoc _batch; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderRequestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderRequestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h new file mode 100644 index 000000000..7d29edf4f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderRequestHeaderDoc_h_ +#define CProviderRequestHeaderDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderRequestHeader +class PROVIDERREQUESTDOC_LINKAGE CProviderRequestHeaderDoc { +public: + CProviderRequestHeaderDoc(); + virtual ~CProviderRequestHeaderDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCProviderRequestConfigDoc requestConfig, + const SmartPtrCPropertyCollectionDoc echoPropertyBag); + +public: + /// Accessor for the RequestConfig + SmartPtrCProviderRequestConfigDoc getRequestConfig() const; + + /// Accessor for the EchoPropertyBag + SmartPtrCPropertyCollectionDoc getEchoPropertyBag() const; + +private: + bool _isInitialized; + + SmartPtrCProviderRequestConfigDoc _requestConfig; + SmartPtrCPropertyCollectionDoc _echoPropertyBag; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderRequestHeaderDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderRequestHeaderDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/ProviderRequestDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/ProviderRequestDocLink.h new file mode 100644 index 000000000..958532b9b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderRequestDoc/ProviderRequestDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef ProviderRequestDoc_Link_h_ +#define ProviderRequestDoc_Link_h_ + +#ifndef PROVIDERREQUESTDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PROVIDERREQUESTDOC_LINKAGE __declspec(dllexport) + #else + #define PROVIDERREQUESTDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERREQUESTDOC_LINKAGE + #endif +#endif + + +#endif /* ProviderRequestDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CCdifDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CCdifDoc.h new file mode 100644 index 000000000..418ce689c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CCdifDoc.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CCdifDoc_h_ +#define CCdifDoc_h_ + + +#include "Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h" +#include "Doc/ProviderResultsDoc/CRequestIdentifierDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" + +namespace Caf { + +/// A simple container for objects of type Cdif +class PROVIDERRESULTSDOC_LINKAGE CCdifDoc { +public: + CCdifDoc(); + virtual ~CCdifDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const SmartPtrCRequestIdentifierDoc requestIdentifier, + const SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollection, + const SmartPtrCSchemaDoc schema); + +public: + /// Accessor for the RequestIdentifier + SmartPtrCRequestIdentifierDoc getRequestIdentifier() const; + + /// Accessor for the DefinitionObjectCollection + SmartPtrCDefinitionObjectCollectionDoc getDefinitionObjectCollection() const; + + /// Accessor for the Schema + SmartPtrCSchemaDoc getSchema() const; + +private: + bool _isInitialized; + + SmartPtrCRequestIdentifierDoc _requestIdentifier; + SmartPtrCDefinitionObjectCollectionDoc _definitionObjectCollection; + SmartPtrCSchemaDoc _schema; + +private: + CAF_CM_DECLARE_NOCOPY(CCdifDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCdifDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h new file mode 100644 index 000000000..a73204809 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h @@ -0,0 +1,45 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDefinitionObjectCollectionDoc_h_ +#define CDefinitionObjectCollectionDoc_h_ + +namespace Caf { + +/// Set of elements containing data returned as a result of a provider collection or action +class PROVIDERRESULTSDOC_LINKAGE CDefinitionObjectCollectionDoc { +public: + CDefinitionObjectCollectionDoc(); + virtual ~CDefinitionObjectCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque value); + +public: + /// Accessor for the Value + std::deque getValue() const; + +private: + bool _isInitialized; + + std::deque _value; + +private: + CAF_CM_DECLARE_NOCOPY(CDefinitionObjectCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDefinitionObjectCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CRequestIdentifierDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CRequestIdentifierDoc.h new file mode 100644 index 000000000..18b548dc3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CRequestIdentifierDoc.h @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CRequestIdentifierDoc_h_ +#define CRequestIdentifierDoc_h_ + + +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" + +namespace Caf { + +/// Fields that allow client to determine which request resulted in this response document +class PROVIDERRESULTSDOC_LINKAGE CRequestIdentifierDoc { +public: + CRequestIdentifierDoc(); + virtual ~CRequestIdentifierDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const UUID jobId, + const SmartPtrCActionClassDoc actionClass, + const UUID sessionId); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Identifier of the specific job within the request + UUID getJobId() const; + + /// Accessor for the ActionClass + SmartPtrCActionClassDoc getActionClass() const; + + /// Client-configurable identifier that is opaque (not used) by the Common Agent Framework + UUID getSessionId() const; + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + UUID _jobId; + SmartPtrCActionClassDoc _actionClass; + UUID _sessionId; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CRequestIdentifierDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRequestIdentifierDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CSchemaDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CSchemaDoc.h new file mode 100644 index 000000000..e9bd90ea6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/CSchemaDoc.h @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CSchemaDoc_h_ +#define CSchemaDoc_h_ + + +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h" +#include "Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h" + +namespace Caf { + +/// Set of elements describing the objects that can be generated by the provider +class PROVIDERRESULTSDOC_LINKAGE CSchemaDoc { +public: + CSchemaDoc(); + virtual ~CSchemaDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque dataClassCollection, + const std::deque actionClassCollection, + const std::deque logicalRelationshipCollection = std::deque(), + const std::deque physicalRelationshipCollection = std::deque()); + +public: + /// Accessor for the DataClassCollection + std::deque getDataClassCollection() const; + + /// Accessor for the ActionClassCollection + std::deque getActionClassCollection() const; + + /// Accessor for the LogicalRelationshipCollection + std::deque getLogicalRelationshipCollection() const; + + /// Accessor for the PhysicalRelationshipCollection + std::deque getPhysicalRelationshipCollection() const; + +private: + bool _isInitialized; + + std::deque _dataClassCollection; + std::deque _actionClassCollection; + std::deque _logicalRelationshipCollection; + std::deque _physicalRelationshipCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CSchemaDoc); +}; + +CAF_DECLARE_SMART_POINTER(CSchemaDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/ProviderResultsDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/ProviderResultsDocLink.h new file mode 100644 index 000000000..6198c8c91 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ProviderResultsDoc/ProviderResultsDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef ProviderResultsDoc_Link_h_ +#define ProviderResultsDoc_Link_h_ + +#ifndef PROVIDERRESULTSDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define PROVIDERRESULTSDOC_LINKAGE __declspec(dllexport) + #else + #define PROVIDERRESULTSDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERRESULTSDOC_LINKAGE + #endif +#endif + + +#endif /* ProviderResultsDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CErrorResponseDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CErrorResponseDoc.h new file mode 100644 index 000000000..d53b41e2a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CErrorResponseDoc.h @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CErrorResponseDoc_h_ +#define CErrorResponseDoc_h_ + + +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" + +namespace Caf { + +/// A simple container for objects of type ErrorResponse +class RESPONSEDOC_LINKAGE CErrorResponseDoc { +public: + CErrorResponseDoc(); + virtual ~CErrorResponseDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const std::string errorMessage); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Accessor for the Response Header + SmartPtrCResponseHeaderDoc getResponseHeader() const; + + /// Accessor for the ErrorMessage + std::string getErrorMessage() const; + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCResponseHeaderDoc _responseHeader; + std::string _errorMessage; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CErrorResponseDoc); +}; + +CAF_DECLARE_SMART_POINTER(CErrorResponseDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventKeyCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventKeyCollectionDoc.h new file mode 100644 index 000000000..f61c7a145 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventKeyCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CEventKeyCollectionDoc_h_ +#define CEventKeyCollectionDoc_h_ + + +#include "Doc/ResponseDoc/CEventKeyDoc.h" + +namespace Caf { + +/// A simple container for objects of type EventKeyCollection +class RESPONSEDOC_LINKAGE CEventKeyCollectionDoc { +public: + CEventKeyCollectionDoc(); + virtual ~CEventKeyCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque eventKey); + +public: + /// Accessor for the EventKey + std::deque getEventKey() const; + +private: + bool _isInitialized; + + std::deque _eventKey; + +private: + CAF_CM_DECLARE_NOCOPY(CEventKeyCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CEventKeyCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventKeyDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventKeyDoc.h new file mode 100644 index 000000000..7e72cdb94 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventKeyDoc.h @@ -0,0 +1,50 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CEventKeyDoc_h_ +#define CEventKeyDoc_h_ + +namespace Caf { + +/// A simple container for objects of type EventKey +class RESPONSEDOC_LINKAGE CEventKeyDoc { +public: + CEventKeyDoc(); + virtual ~CEventKeyDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string value); + +public: + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Value + std::string getValue() const; + +private: + bool _isInitialized; + + std::string _name; + std::string _value; + +private: + CAF_CM_DECLARE_NOCOPY(CEventKeyDoc); +}; + +CAF_DECLARE_SMART_POINTER(CEventKeyDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventManifestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventManifestDoc.h new file mode 100644 index 000000000..0b1c45bee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CEventManifestDoc.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CEventManifestDoc_h_ +#define CEventManifestDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type EventManifest +class RESPONSEDOC_LINKAGE CEventManifestDoc { +public: + CEventManifestDoc(); + virtual ~CEventManifestDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const std::string operationName, + const SmartPtrCAttachmentCollectionDoc attachmentCollection); + +public: + /// Accessor for the ClassNamespace + std::string getClassNamespace() const; + + /// Accessor for the ClassName + std::string getClassName() const; + + /// Accessor for the ClassVersion + std::string getClassVersion() const; + + /// Accessor for the OperationName + std::string getOperationName() const; + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const; + +private: + bool _isInitialized; + + std::string _classNamespace; + std::string _className; + std::string _classVersion; + std::string _operationName; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CEventManifestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CEventManifestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CManifestCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CManifestCollectionDoc.h new file mode 100644 index 000000000..db4fadc39 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CManifestCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CManifestCollectionDoc_h_ +#define CManifestCollectionDoc_h_ + + +#include "Doc/ResponseDoc/CManifestDoc.h" + +namespace Caf { + +/// A simple container for objects of type ManifestCollection +class RESPONSEDOC_LINKAGE CManifestCollectionDoc { +public: + CManifestCollectionDoc(); + virtual ~CManifestCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque manifest); + +public: + /// Accessor for the Manifest + std::deque getManifest() const; + +private: + bool _isInitialized; + + std::deque _manifest; + +private: + CAF_CM_DECLARE_NOCOPY(CManifestCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CManifestCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CManifestDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CManifestDoc.h new file mode 100644 index 000000000..fcc7759b9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CManifestDoc.h @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CManifestDoc_h_ +#define CManifestDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type Manifest +class RESPONSEDOC_LINKAGE CManifestDoc { +public: + CManifestDoc(); + virtual ~CManifestDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const UUID jobId, + const std::string operationName, + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection); + +public: + /// Accessor for the ClassNamespace + std::string getClassNamespace() const; + + /// Accessor for the ClassName + std::string getClassName() const; + + /// Accessor for the ClassVersion + std::string getClassVersion() const; + + /// Accessor for the JobId + UUID getJobId() const; + + /// Accessor for the OperationName + std::string getOperationName() const; + + /// Accessor for the AttachmentNameCollection + SmartPtrCAttachmentNameCollectionDoc getAttachmentNameCollection() const; + +private: + std::string _classNamespace; + std::string _className; + std::string _classVersion; + UUID _jobId; + std::string _operationName; + SmartPtrCAttachmentNameCollectionDoc _attachmentNameCollection; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CManifestDoc); +}; + +CAF_DECLARE_SMART_POINTER(CManifestDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CProviderEventResponseDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CProviderEventResponseDoc.h new file mode 100644 index 000000000..4065f7720 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CProviderEventResponseDoc.h @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderEventResponseDoc_h_ +#define CProviderEventResponseDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" +#include "Doc/ResponseDoc/CEventKeyCollectionDoc.h" +#include "Doc/ResponseDoc/CEventManifestDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderEventResponse +class RESPONSEDOC_LINKAGE CProviderEventResponseDoc { +public: + CProviderEventResponseDoc(); + virtual ~CProviderEventResponseDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const SmartPtrCEventManifestDoc manifest, + const SmartPtrCEventKeyCollectionDoc eventKeyCollection, + const SmartPtrCStatisticsDoc statistics); + +public: + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Accessor for the ResponseHeader + SmartPtrCResponseHeaderDoc getResponseHeader() const; + + /// Accessor for the Manifest + SmartPtrCEventManifestDoc getManifest() const; + + /// Accessor for the EventKeyCollection + SmartPtrCEventKeyCollectionDoc getEventKeyCollection() const; + + /// Accessor for the Statistics + SmartPtrCStatisticsDoc getStatistics() const; + +private: + bool _isInitialized; + + std::string _pmeId; + SmartPtrCResponseHeaderDoc _responseHeader; + SmartPtrCEventManifestDoc _manifest; + SmartPtrCEventKeyCollectionDoc _eventKeyCollection; + SmartPtrCStatisticsDoc _statistics; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderEventResponseDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderEventResponseDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CProviderResponseDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CProviderResponseDoc.h new file mode 100644 index 000000000..2247a81aa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CProviderResponseDoc.h @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CProviderResponseDoc_h_ +#define CProviderResponseDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" + +namespace Caf { + +/// A simple container for objects of type ProviderResponse +class RESPONSEDOC_LINKAGE CProviderResponseDoc { +public: + CProviderResponseDoc(); + virtual ~CProviderResponseDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const SmartPtrCManifestDoc manifest, + const SmartPtrCAttachmentCollectionDoc attachmentCollection, + const SmartPtrCStatisticsDoc statistics); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Accessor for the ResponseHeader + SmartPtrCResponseHeaderDoc getResponseHeader() const; + + /// Accessor for the Manifest + SmartPtrCManifestDoc getManifest() const; + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const; + + /// Accessor for the Statistics + SmartPtrCStatisticsDoc getStatistics() const; + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCResponseHeaderDoc _responseHeader; + SmartPtrCManifestDoc _manifest; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + SmartPtrCStatisticsDoc _statistics; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CProviderResponseDoc); +}; + +CAF_DECLARE_SMART_POINTER(CProviderResponseDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CResponseDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CResponseDoc.h new file mode 100644 index 000000000..35f228bb0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CResponseDoc.h @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CResponseDoc_h_ +#define CResponseDoc_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" +#include "Doc/ResponseDoc/CManifestCollectionDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" + +namespace Caf { + +/// A simple container for objects of type Response +class RESPONSEDOC_LINKAGE CResponseDoc { +public: + CResponseDoc(); + virtual ~CResponseDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const SmartPtrCManifestCollectionDoc manifestCollection, + const SmartPtrCAttachmentCollectionDoc attachmentCollection, + const SmartPtrCStatisticsDoc statistics); + +public: + /// Accessor for the ClientId + UUID getClientId() const; + + /// Accessor for the RequestId + UUID getRequestId() const; + + /// Accessor for the PmeId + std::string getPmeId() const; + + /// Accessor for the ManifestCollection + SmartPtrCResponseHeaderDoc getResponseHeader() const; + + /// Accessor for the ManifestCollection + SmartPtrCManifestCollectionDoc getManifestCollection() const; + + /// Accessor for the AttachmentCollection + SmartPtrCAttachmentCollectionDoc getAttachmentCollection() const; + + /// Accessor for the Statistics + SmartPtrCStatisticsDoc getStatistics() const; + +private: + UUID _clientId; + UUID _requestId; + std::string _pmeId; + SmartPtrCResponseHeaderDoc _responseHeader; + SmartPtrCManifestCollectionDoc _manifestCollection; + SmartPtrCAttachmentCollectionDoc _attachmentCollection; + SmartPtrCStatisticsDoc _statistics; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CResponseDoc); +}; + +CAF_DECLARE_SMART_POINTER(CResponseDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CResponseHeaderDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CResponseHeaderDoc.h new file mode 100644 index 000000000..a91dc6d78 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/CResponseHeaderDoc.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CResponseHeaderDoc_h_ +#define CResponseHeaderDoc_h_ + +namespace Caf { + +/// A simple container for objects of type ResponseHeader +class RESPONSEDOC_LINKAGE CResponseHeaderDoc { +public: + CResponseHeaderDoc(); + virtual ~CResponseHeaderDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string version = "1.0", + const std::string createdDateTime = CDateTimeUtils::getCurrentDateTime(), + const uint32 sequenceNumber = 0, + const bool isFinalResponse = true, + const UUID sessionId = CAFCOMMON_GUID_NULL); + +public: + /// Accessor for the version + std::string getVersion() const; + + /// Accessor for the date/time when the request was created + std::string getCreatedDateTime() const; + + /// Accessor for the sequenceNumber + uint32 getSequenceNumber() const; + + /// Accessor for the version + bool getIsFinalResponse() const; + + /// Accessor for the session ID + UUID getSessionId() const; + +private: + std::string _version; + std::string _createdDateTime; + uint32 _sequenceNumber; + bool _isFinalResponse; + UUID _sessionId; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CResponseHeaderDoc); +}; + +CAF_DECLARE_SMART_POINTER(CResponseHeaderDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/ResponseDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/ResponseDocLink.h new file mode 100644 index 000000000..bf73e00d6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/ResponseDoc/ResponseDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef ResponseDoc_Link_h_ +#define ResponseDoc_Link_h_ + +#ifndef RESPONSEDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define RESPONSEDOC_LINKAGE __declspec(dllexport) + #else + #define RESPONSEDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define RESPONSEDOC_LINKAGE + #endif +#endif + + +#endif /* ResponseDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassDoc.h new file mode 100644 index 000000000..46526846a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassDoc.h @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CActionClassDoc_h_ +#define CActionClassDoc_h_ + + +#include "Doc/SchemaTypesDoc/CCollectMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" + +namespace Caf { + +/// Definition of an action class that may be generated by the provider +class SCHEMATYPESDOC_LINKAGE CActionClassDoc { +public: + CActionClassDoc(); + virtual ~CActionClassDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const SmartPtrCCollectMethodDoc collectMethod, + const std::deque methodCollection, + const std::string displayName = std::string(), + const std::string description = std::string()); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + + /// Accessor for the CollectMethod + SmartPtrCCollectMethodDoc getCollectMethod() const; + + /// Accessor for the Method + std::deque getMethodCollection() const; + + /// A hint as to what this class should be called when displaying it to a human + std::string getDisplayName() const; + + /// A phrase to describe the class for mouse-over text, etc + std::string getDescription() const; + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + SmartPtrCCollectMethodDoc _collectMethod; + std::deque _methodCollection; + std::string _displayName; + std::string _description; + +private: + CAF_CM_DECLARE_NOCOPY(CActionClassDoc); +}; + +CAF_DECLARE_SMART_POINTER(CActionClassDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.h new file mode 100644 index 000000000..3e05f0f54 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CActionClassInstanceCollectionDoc_h_ +#define CActionClassInstanceCollectionDoc_h_ + + +#include "Doc/SchemaTypesDoc/CActionClassInstanceDoc.h" + +namespace Caf { + +/// A simple container for objects of type ActionClassInstanceCollection +class SCHEMATYPESDOC_LINKAGE CActionClassInstanceCollectionDoc { +public: + CActionClassInstanceCollectionDoc(); + virtual ~CActionClassInstanceCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque actionClassInstanceCollection); + +public: + /// Accessor for the ActionClassInstance + std::deque getActionClassInstanceCollection() const; + +private: + bool _isInitialized; + + std::deque _actionClassInstanceCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CActionClassInstanceCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CActionClassInstanceCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassInstanceDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassInstanceDoc.h new file mode 100644 index 000000000..4b41baf62 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CActionClassInstanceDoc.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CActionClassInstanceDoc_h_ +#define CActionClassInstanceDoc_h_ + + +#include "Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h" + +namespace Caf { + +/// A simple container for objects of type ActionClassInstance +class SCHEMATYPESDOC_LINKAGE CActionClassInstanceDoc { +public: + CActionClassInstanceDoc(); + virtual ~CActionClassInstanceDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const SmartPtrCInstanceOperationCollectionDoc instanceOperationCollection); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + + /// Accessor for the InstanceOperationCollection + SmartPtrCInstanceOperationCollectionDoc getInstanceOperationCollection() const; + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + SmartPtrCInstanceOperationCollectionDoc _instanceOperationCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CActionClassInstanceDoc); +}; + +CAF_DECLARE_SMART_POINTER(CActionClassInstanceDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassCardinalityDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassCardinalityDoc.h new file mode 100644 index 000000000..46c689b1e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassCardinalityDoc.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CClassCardinalityDoc_h_ +#define CClassCardinalityDoc_h_ + +namespace Caf { + +/// Class description of one end of a relationship +class SCHEMATYPESDOC_LINKAGE CClassCardinalityDoc { +public: + CClassCardinalityDoc(); + virtual ~CClassCardinalityDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::string cardinality); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + + /// Cardinality of one end relationship, i.e. has one, has many, etc + std::string getCardinality() const; + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + std::string _cardinality; + +private: + CAF_CM_DECLARE_NOCOPY(CClassCardinalityDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassCardinalityDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassFieldDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassFieldDoc.h new file mode 100644 index 000000000..60517e6b5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassFieldDoc.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CClassFieldDoc_h_ +#define CClassFieldDoc_h_ + +namespace Caf { + +/// Description of a class and the field used to identify one end of a relationship +class SCHEMATYPESDOC_LINKAGE CClassFieldDoc { +public: + CClassFieldDoc(); + virtual ~CClassFieldDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::string field); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + + /// Description of a class field used to identify one end of a relationship + std::string getField() const; + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + std::string _field; + +private: + CAF_CM_DECLARE_NOCOPY(CClassFieldDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassFieldDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassIdentifierDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassIdentifierDoc.h new file mode 100644 index 000000000..42fa3d897 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassIdentifierDoc.h @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CClassIdentifierDoc_h_ +#define CClassIdentifierDoc_h_ + +namespace Caf { + +/// Tuple of values to uniquely identify a class +class SCHEMATYPESDOC_LINKAGE CClassIdentifierDoc { +public: + CClassIdentifierDoc(); + virtual ~CClassIdentifierDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + +private: + CAF_CM_DECLARE_NOCOPY(CClassIdentifierDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassIdentifierDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h new file mode 100644 index 000000000..0140a46e6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CClassInstancePropertyDoc_h_ +#define CClassInstancePropertyDoc_h_ + + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" + +namespace Caf { + +/// Definition of an attribute (field) of a class +class SCHEMATYPESDOC_LINKAGE CClassInstancePropertyDoc { +public: + CClassInstancePropertyDoc(); + virtual ~CClassInstancePropertyDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::deque type, + const bool required = false, + const bool transientVal = false, + const bool list = false, + const std::string displayName = std::string(), + const std::string description = std::string()); + +public: + /// Property name + std::string getName() const; + + /// Accessor for the Type + std::deque getType() const; + + /// Whether this is a required property, i.e. this property must always be non-empty + bool getRequired() const; + + /// Accessor for the TransientVal + bool getTransientVal() const; + + /// Indicates whether to expect a list of properties in the provider response + bool getList() const; + + /// A hint as to what this property should be called when displaying it to a human + std::string getDisplayName() const; + + /// A phrase to describe the property for mouse-over text, etc + std::string getDescription() const; + +private: + std::string _name; + std::deque _type; + bool _required; + bool _transientVal; + bool _list; + std::string _displayName; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CClassInstancePropertyDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassInstancePropertyDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassPropertyDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassPropertyDoc.h new file mode 100644 index 000000000..24745480a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CClassPropertyDoc.h @@ -0,0 +1,112 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CClassPropertyDoc_h_ +#define CClassPropertyDoc_h_ + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +namespace Caf { + +/// Definition of an attribute (field) of a class +class SCHEMATYPESDOC_LINKAGE CClassPropertyDoc { +public: + CClassPropertyDoc(); + virtual ~CClassPropertyDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const PROPERTY_TYPE type, + const std::deque value, + const bool required = false, + const bool key = false, + const bool list = false, + const bool caseSensitive = false, + const bool transientVal = false, + const std::string defaultVal = std::string(), + const VALIDATOR_TYPE validator = VALIDATOR_NONE, + const std::string upperRange = std::string(), + const std::string lowerRange = std::string(), + const std::string displayName = std::string(), + const std::string description = std::string()); + +public: + /// Property name + std::string getName() const; + + /// Describes the data type of the property + PROPERTY_TYPE getType() const; + + /// The contents of a validator used on this property + std::deque getValue() const; + + /// Whether this is a required property, i.e. this property must always be non-empty + bool getRequired() const; + + /// Indicates this property may be used as a key identifying field + bool getKey() const; + + /// Indicates whether to expect a list of properties in the provider response + bool getList() const; + + /// Indicates whether a string field should be treated in a case-sensitive manner + bool getCaseSensitive() const; + + /// Accessor for the TransientVal + bool getTransientVal() const; + + /// Accessor for the DefaultVal + std::string getDefaultVal() const; + + /// The type of validator described in the 'value' sub-elements + VALIDATOR_TYPE getValidator() const; + + /// If a 'range' validator is in use, this describes the upper limit of allowable values for the property. QUESTIONABLE: how do we determine inclusive or exclusive range + std::string getUpperRange() const; + + /// If a 'range' validator is in use, this describes the lower limit of allowable values for the property. QUESTIONABLE: how do we determine inclusive or exclusive range + std::string getLowerRange() const; + + /// A hint as to what this property should be called when displaying it to a human + std::string getDisplayName() const; + + /// A phrase to describe the property for mouse-over text, etc + std::string getDescription() const; + +private: + std::string _name; + PROPERTY_TYPE _type; + std::deque _value; + bool _required; + bool _key; + bool _list; + bool _caseSensitive; + bool _transientVal; + std::string _defaultVal; + VALIDATOR_TYPE _validator; + std::string _upperRange; + std::string _lowerRange; + std::string _displayName; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CClassPropertyDoc); +}; + +CAF_DECLARE_SMART_POINTER(CClassPropertyDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCmdlMetadataDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCmdlMetadataDoc.h new file mode 100644 index 000000000..b8944e7ee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCmdlMetadataDoc.h @@ -0,0 +1,50 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CCmdlMetadataDoc_h_ +#define CCmdlMetadataDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CmdlMetadata +class SCHEMATYPESDOC_LINKAGE CCmdlMetadataDoc { +public: + CCmdlMetadataDoc(); + virtual ~CCmdlMetadataDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string value); + +public: + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Value + std::string getValue() const; + +private: + bool _isInitialized; + + std::string _name; + std::string _value; + +private: + CAF_CM_DECLARE_NOCOPY(CCmdlMetadataDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCmdlMetadataDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCmdlUnionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCmdlUnionDoc.h new file mode 100644 index 000000000..994044b4c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCmdlUnionDoc.h @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CCmdlUnionDoc_h_ +#define CCmdlUnionDoc_h_ + +namespace Caf { + +/// A simple container for objects of type CmdlUnion +class SCHEMATYPESDOC_LINKAGE CCmdlUnionDoc { +public: + CCmdlUnionDoc(); + virtual ~CCmdlUnionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + +private: + CAF_CM_DECLARE_NOCOPY(CCmdlUnionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCmdlUnionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCollectMethodDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCollectMethodDoc.h new file mode 100644 index 000000000..efa48502b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CCollectMethodDoc.h @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CCollectMethodDoc_h_ +#define CCollectMethodDoc_h_ + + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" + +namespace Caf { + +/// Definition of a collection method on a class +class SCHEMATYPESDOC_LINKAGE CCollectMethodDoc { +public: + CCollectMethodDoc(); + virtual ~CCollectMethodDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::deque parameterCollection = std::deque(), + const std::deque instanceParameterCollection = std::deque(), + const std::deque returnValCollection = std::deque(), + const std::deque eventValCollection = std::deque(), + const std::deque errorCollection = std::deque()); + +public: + /// name of the collection method + std::string getName() const; + + /// Definition of a parameter that passes simple types to the collection method + std::deque getParameterCollection() const; + + /// Definition of a parameter passing data class instances to the collection method + std::deque getInstanceParameterCollection() const; + + /// Accessor for the ReturnVal + std::deque getReturnValCollection() const; + + /// Accessor for the EventVal + std::deque getEventValCollection() const; + + /// A class that may be returned to indicate an error occurred during the processing of the collection method + std::deque getErrorCollection() const; + +private: + bool _isInitialized; + + std::string _name; + std::deque _parameterCollection; + std::deque _instanceParameterCollection; + std::deque _returnValCollection; + std::deque _eventValCollection; + std::deque _errorCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CCollectMethodDoc); +}; + +CAF_DECLARE_SMART_POINTER(CCollectMethodDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassDoc.h new file mode 100644 index 000000000..8cc703c91 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassDoc.h @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDataClassDoc_h_ +#define CDataClassDoc_h_ + + +#include "Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h" +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" + +namespace Caf { + +/// Definition of a data class that may be generated by the provider +class SCHEMATYPESDOC_LINKAGE CDataClassDoc { +public: + CDataClassDoc(); + virtual ~CDataClassDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque propertyCollection = std::deque(), + const std::deque instancePropertyCollection = std::deque(), + const bool unique = false, + const bool transientVal = false, + const std::string displayName = std::string(), + const std::string description = std::string()); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + + /// Accessor for the Property + std::deque getPropertyCollection() const; + + /// Accessor for the InstanceProperty + std::deque getInstancePropertyCollection() const; + + /// Indicates whether the key properties of this class are enough to guarantee uniqueness from other classes of the same type + bool getUnique() const; + + /// Accessor for the TransientVal + bool getTransientVal() const; + + /// A hint as to what this class should be called when displaying it to a human + std::string getDisplayName() const; + + /// A phrase to describe the class for mouse-over text, etc + std::string getDescription() const; + +private: + std::string _namespaceVal; + std::string _name; + std::string _version; + std::deque _propertyCollection; + std::deque _instancePropertyCollection; + bool _unique; + bool _transientVal; + std::string _displayName; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CDataClassDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDataClassDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.h new file mode 100644 index 000000000..4d2570ce4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDataClassInstanceCollectionDoc_h_ +#define CDataClassInstanceCollectionDoc_h_ + + +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" + +namespace Caf { + +/// A simple container for objects of type DataClassInstanceCollection +class SCHEMATYPESDOC_LINKAGE CDataClassInstanceCollectionDoc { +public: + CDataClassInstanceCollectionDoc(); + virtual ~CDataClassInstanceCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque dataClassInstanceCollection = std::deque()); + +public: + /// Accessor for the DataClassInstance + std::deque getDataClassInstanceCollection() const; + +private: + bool _isInitialized; + + std::deque _dataClassInstanceCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CDataClassInstanceCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDataClassInstanceCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassInstanceDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassInstanceDoc.h new file mode 100644 index 000000000..904067fde --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassInstanceDoc.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDataClassInstanceDoc_h_ +#define CDataClassInstanceDoc_h_ + + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CCmdlUnionDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" + +namespace Caf { + +/// A simple container for objects of type DataClassInstance +class SCHEMATYPESDOC_LINKAGE CDataClassInstanceDoc { +public: + CDataClassInstanceDoc(); + virtual ~CDataClassInstanceDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque cmdlMetadataCollection, + const std::deque propertyCollection, + const std::deque instancePropertyCollection, + const SmartPtrCCmdlUnionDoc cmdlUnion); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + + /// Accessor for the CmdlMetadata + std::deque getCmdlMetadataCollection() const; + + /// Accessor for the Property + std::deque getPropertyCollection() const; + + /// Accessor for the InstanceProperty + std::deque getInstancePropertyCollection() const; + + /// Accessor for the CmdlUnion + SmartPtrCCmdlUnionDoc getCmdlUnion() const; + +private: + bool _isInitialized; + + std::string _namespaceVal; + std::string _name; + std::string _version; + std::deque _cmdlMetadataCollection; + std::deque _propertyCollection; + std::deque _instancePropertyCollection; + SmartPtrCCmdlUnionDoc _cmdlUnion; + +private: + CAF_CM_DECLARE_NOCOPY(CDataClassInstanceDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDataClassInstanceDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassPropertyDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassPropertyDoc.h new file mode 100644 index 000000000..ee0a80e96 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassPropertyDoc.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDataClassPropertyDoc_h_ +#define CDataClassPropertyDoc_h_ + + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" + +namespace Caf { + +/// A simple container for objects of type DataClassProperty +class SCHEMATYPESDOC_LINKAGE CDataClassPropertyDoc { +public: + CDataClassPropertyDoc(); + virtual ~CDataClassPropertyDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::deque cmdlMetadata, + const std::string value); + +public: + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the CmdlMetadata + std::deque getCmdlMetadata() const; + + /// Accessor for the Value + std::string getValue() const; + +private: + bool _isInitialized; + + std::string _name; + std::deque _cmdlMetadata; + std::string _value; + +private: + CAF_CM_DECLARE_NOCOPY(CDataClassPropertyDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDataClassPropertyDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h new file mode 100644 index 000000000..83126730b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CDataClassSubInstanceDoc_h_ +#define CDataClassSubInstanceDoc_h_ + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CCmdlUnionDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CDataClassSubInstanceDoc); + +/// A simple container for objects of type DataClassSubInstance +class SCHEMATYPESDOC_LINKAGE CDataClassSubInstanceDoc { +public: + CDataClassSubInstanceDoc(); + virtual ~CDataClassSubInstanceDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::deque cmdlMetadataCollection, + const std::deque propertyCollection, + const std::deque instancePropertyCollection, + const SmartPtrCCmdlUnionDoc cmdlUnion); + +public: + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the CmdlMetadata + std::deque getCmdlMetadataCollection() const; + + /// Accessor for the Property + std::deque getPropertyCollection() const; + + /// Accessor for the InstanceProperty + std::deque getInstancePropertyCollection() const; + + /// Accessor for the CmdlUnion + SmartPtrCCmdlUnionDoc getCmdlUnion() const; + +private: + bool _isInitialized; + + std::string _name; + std::deque _cmdlMetadataCollection; + std::deque _propertyCollection; + std::deque _instancePropertyCollection; + SmartPtrCCmdlUnionDoc _cmdlUnion; + +private: + CAF_CM_DECLARE_NOCOPY(CDataClassSubInstanceDoc); +}; + +CAF_DECLARE_SMART_POINTER(CDataClassSubInstanceDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h new file mode 100644 index 000000000..7eb403d4c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CInstanceOperationCollectionDoc_h_ +#define CInstanceOperationCollectionDoc_h_ + + +#include "Doc/SchemaTypesDoc/CInstanceOperationDoc.h" + +namespace Caf { + +/// A simple container for objects of type InstanceOperationCollection +class SCHEMATYPESDOC_LINKAGE CInstanceOperationCollectionDoc { +public: + CInstanceOperationCollectionDoc(); + virtual ~CInstanceOperationCollectionDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::deque instanceOperationCollection); + +public: + /// Accessor for the InstanceOperation + std::deque getInstanceOperationCollection() const; + +private: + bool _isInitialized; + + std::deque _instanceOperationCollection; + +private: + CAF_CM_DECLARE_NOCOPY(CInstanceOperationCollectionDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstanceOperationCollectionDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceOperationDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceOperationDoc.h new file mode 100644 index 000000000..33081b6de --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceOperationDoc.h @@ -0,0 +1,50 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CInstanceOperationDoc_h_ +#define CInstanceOperationDoc_h_ + +namespace Caf { + +/// A simple container for objects of type InstanceOperation +class SCHEMATYPESDOC_LINKAGE CInstanceOperationDoc { +public: + CInstanceOperationDoc(); + virtual ~CInstanceOperationDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string operationName, + const std::string moniker); + +public: + /// Accessor for the OperationName + std::string getOperationName() const; + + /// Accessor for the Moniker + std::string getMoniker() const; + +private: + bool _isInitialized; + + std::string _operationName; + std::string _moniker; + +private: + CAF_CM_DECLARE_NOCOPY(CInstanceOperationDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstanceOperationDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceParameterDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceParameterDoc.h new file mode 100644 index 000000000..c7ea21986 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CInstanceParameterDoc.h @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CInstanceParameterDoc_h_ +#define CInstanceParameterDoc_h_ + +namespace Caf { + +/// A parameter containing a data class instance used by a method to control the outcome +class SCHEMATYPESDOC_LINKAGE CInstanceParameterDoc { +public: + CInstanceParameterDoc(); + virtual ~CInstanceParameterDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::string instanceNamespace, + const std::string instanceName, + const std::string instanceVersion, + const bool isOptional = false, + const bool isList = false, + const std::string displayName = std::string(), + const std::string description = std::string()); + +public: + /// Name of parameter + std::string getName() const; + + /// Namespace of instance object type + std::string getInstanceNamespace() const; + + /// Name of instance object type + std::string getInstanceName() const; + + /// Version of instance object type + std::string getInstanceVersion() const; + + /// Indicates this parameter need not be passed + bool getIsOptional() const; + + /// Indicates whether to expect a list of values as opposed to a single value (the default if this attribute is not present) + bool getIsList() const; + + /// Human-readable version of the parameter name + std::string getDisplayName() const; + + /// Short description of what the parameter is for + std::string getDescription() const; + +private: + std::string _name; + std::string _instanceNamespace; + std::string _instanceName; + std::string _instanceVersion; + bool _isOptional; + bool _isList; + std::string _displayName; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CInstanceParameterDoc); +}; + +CAF_DECLARE_SMART_POINTER(CInstanceParameterDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CJoinTypeDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CJoinTypeDoc.h new file mode 100644 index 000000000..17fb2b41e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CJoinTypeDoc.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CJoinTypeDoc_h_ +#define CJoinTypeDoc_h_ + + +#include "Doc/SchemaTypesDoc/CClassFieldDoc.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +namespace Caf { + +/// A simple container for objects of type JoinType +class SCHEMATYPESDOC_LINKAGE CJoinTypeDoc { +public: + CJoinTypeDoc(); + virtual ~CJoinTypeDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const OPERATOR_TYPE operand, + const SmartPtrCClassFieldDoc dataClassLeft, + const SmartPtrCClassFieldDoc dataClassRight, + const std::string description); + +public: + /// Defines the operand used to join the class fields. Restricted to '=' for now + OPERATOR_TYPE getOperand() const; + + /// Identifies the fields on classes that uniquely identify relationship + SmartPtrCClassFieldDoc getDataClassLeft() const; + + /// Identifies the fields on classes that uniquely identify relationship + SmartPtrCClassFieldDoc getDataClassRight() const; + + /// A short human-readable description of the join + std::string getDescription() const; + +private: + OPERATOR_TYPE _operand; + SmartPtrCClassFieldDoc _dataClassLeft; + SmartPtrCClassFieldDoc _dataClassRight; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CJoinTypeDoc); +}; + +CAF_DECLARE_SMART_POINTER(CJoinTypeDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h new file mode 100644 index 000000000..9b9d1d6d4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CLogicalRelationshipDoc_h_ +#define CLogicalRelationshipDoc_h_ + + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" +#include "Doc/SchemaTypesDoc/CJoinTypeDoc.h" + +namespace Caf { + +/// Definition of a relationship between classes that can be described by identifying the fields on the classes that uniquely identify the relationship +class SCHEMATYPESDOC_LINKAGE CLogicalRelationshipDoc { +public: + CLogicalRelationshipDoc(); + virtual ~CLogicalRelationshipDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const ARITY_TYPE arity, + const SmartPtrCClassCardinalityDoc dataClassLeft, + const SmartPtrCClassCardinalityDoc dataClassRight, + const std::deque joinCollection, + const std::string description = std::string()); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + + /// Accessor for the Arity + ARITY_TYPE getArity() const; + + /// Accessor for the DataClassLeft + SmartPtrCClassCardinalityDoc getDataClassLeft() const; + + /// Accessor for the DataClassRight + SmartPtrCClassCardinalityDoc getDataClassRight() const; + + /// Defines a join condition of the relationship + std::deque getJoinCollection() const; + + /// Accessor for the Description + std::string getDescription() const; + +private: + std::string _namespaceVal; + std::string _name; + std::string _version; + ARITY_TYPE _arity; + SmartPtrCClassCardinalityDoc _dataClassLeft; + SmartPtrCClassCardinalityDoc _dataClassRight; + std::deque _joinCollection; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CLogicalRelationshipDoc); +}; + +CAF_DECLARE_SMART_POINTER(CLogicalRelationshipDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CMethodDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CMethodDoc.h new file mode 100644 index 000000000..1654b0697 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CMethodDoc.h @@ -0,0 +1,85 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMethodDoc_h_ +#define CMethodDoc_h_ + + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" + +namespace Caf { + +/// Definition of a method on a class +class SCHEMATYPESDOC_LINKAGE CMethodDoc { +public: + CMethodDoc(); + virtual ~CMethodDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const std::deque parameterCollection = std::deque(), + const std::deque instanceParameterCollection = std::deque(), + const std::deque returnValCollection = std::deque(), + const std::deque eventValCollection = std::deque(), + const std::deque errorCollection = std::deque(), + const std::string displayName = std::string(), + const std::string description = std::string()); + +public: + /// name of the method + std::string getName() const; + + /// Definition of a parameter that passes simple types to the method + std::deque getParameterCollection() const; + + /// Definition of a parameter that passes data class instances to the method + std::deque getInstanceParameterCollection() const; + + /// Accessor for the ReturnVal + std::deque getReturnValCollection() const; + + /// Accessor for the EventVal + std::deque getEventValCollection() const; + + /// A class that may be returned to indicate an error occurred during the processing of the collection method + std::deque getErrorCollection() const; + + /// Human-readable version of the method name + std::string getDisplayName() const; + + /// A short phrase describing the purpose of the method + std::string getDescription() const; + +private: + bool _isInitialized; + + std::string _name; + std::deque _parameterCollection; + std::deque _instanceParameterCollection; + std::deque _returnValCollection; + std::deque _eventValCollection; + std::deque _errorCollection; + std::string _displayName; + std::string _description; + +private: + CAF_CM_DECLARE_NOCOPY(CMethodDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMethodDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CMethodParameterDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CMethodParameterDoc.h new file mode 100644 index 000000000..607d5a27e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CMethodParameterDoc.h @@ -0,0 +1,76 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CMethodParameterDoc_h_ +#define CMethodParameterDoc_h_ + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +namespace Caf { + +/// A parameter containing a simple type used by a method to control the outcome +class SCHEMATYPESDOC_LINKAGE CMethodParameterDoc { +public: + CMethodParameterDoc(); + virtual ~CMethodParameterDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string name, + const PARAMETER_TYPE type, + const bool isOptional = false, + const bool isList = false, + const std::string defaultVal = std::string(), + const std::string displayName = std::string(), + const std::string description = std::string()); + +public: + /// Name of parameter + std::string getName() const; + + /// Describes the data type of the property + PARAMETER_TYPE getType() const; + + /// Indicates this parameter need not be passed + bool getIsOptional() const; + + /// Indicates whether to expect a list of values as opposed to a single value (the default if this attribute is not present) + bool getIsList() const; + + /// Accessor for the DefaultVal + std::string getDefaultVal() const; + + /// Human-readable version of the parameter name + std::string getDisplayName() const; + + /// Short description of what the parameter is for + std::string getDescription() const; + +private: + std::string _name; + PARAMETER_TYPE _type; + bool _isOptional; + bool _isList; + std::string _defaultVal; + std::string _displayName; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CMethodParameterDoc); +}; + +CAF_DECLARE_SMART_POINTER(CMethodParameterDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h new file mode 100644 index 000000000..1904f22df --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CPhysicalRelationshipDoc_h_ +#define CPhysicalRelationshipDoc_h_ + + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +namespace Caf { + +/// Describes a relationship between dataclass where the key information from data class instances comprising the relationship are listed in an instance of this class +class SCHEMATYPESDOC_LINKAGE CPhysicalRelationshipDoc { +public: + CPhysicalRelationshipDoc(); + virtual ~CPhysicalRelationshipDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const ARITY_TYPE arity, + const SmartPtrCClassCardinalityDoc dataClassLeft, + const SmartPtrCClassCardinalityDoc dataClassRight, + const std::string description = std::string()); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + + /// Accessor for the Arity + ARITY_TYPE getArity() const; + + /// Accessor for the DataClassLeft + SmartPtrCClassCardinalityDoc getDataClassLeft() const; + + /// Accessor for the DataClassRight + SmartPtrCClassCardinalityDoc getDataClassRight() const; + + /// Accessor for the Description + std::string getDescription() const; + +private: + std::string _namespaceVal; + std::string _name; + std::string _version; + ARITY_TYPE _arity; + SmartPtrCClassCardinalityDoc _dataClassLeft; + SmartPtrCClassCardinalityDoc _dataClassRight; + std::string _description; + bool _isInitialized; + +private: + CAF_CM_DECLARE_NOCOPY(CPhysicalRelationshipDoc); +}; + +CAF_DECLARE_SMART_POINTER(CPhysicalRelationshipDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CRelationshipDoc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CRelationshipDoc.h new file mode 100644 index 000000000..057d14948 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/CRelationshipDoc.h @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#ifndef CRelationshipDoc_h_ +#define CRelationshipDoc_h_ + + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +namespace Caf { + +/// Definition of a relationship between data classes +class SCHEMATYPESDOC_LINKAGE CRelationshipDoc { +public: + CRelationshipDoc(); + virtual ~CRelationshipDoc(); + +public: + /// Initializes the object with everything required by this + /// container. Once initialized, this object cannot + /// be changed (i.e. it is immutable). + void initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const ARITY_TYPE arity, + const SmartPtrCClassCardinalityDoc dataClassLeft, + const SmartPtrCClassCardinalityDoc dataClassRight, + const std::string description = std::string()); + +public: + /// Accessor for the NamespaceVal + std::string getNamespaceVal() const; + + /// Accessor for the Name + std::string getName() const; + + /// Accessor for the Version + std::string getVersion() const; + + /// Number of parts (sides) to relationship. Restricted to a two-sided relationship for now + ARITY_TYPE getArity() const; + + /// Identifies the two classes that make up the relationship + SmartPtrCClassCardinalityDoc getDataClassLeft() const; + + /// Identifies the two classes that make up the relationship + SmartPtrCClassCardinalityDoc getDataClassRight() const; + + /// A short human-readable description of the relationship + std::string getDescription() const; + +private: + std::string _namespaceVal; + std::string _name; + std::string _version; + ARITY_TYPE _arity; + SmartPtrCClassCardinalityDoc _dataClassLeft; + SmartPtrCClassCardinalityDoc _dataClassRight; + std::string _description; + bool _isInitialized; + + +private: + CAF_CM_DECLARE_NOCOPY(CRelationshipDoc); +}; + +CAF_DECLARE_SMART_POINTER(CRelationshipDoc); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/SchemaTypesDocLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/SchemaTypesDocLink.h new file mode 100644 index 000000000..d817b550d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/SchemaTypesDocLink.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef SchemaTypesDoc_Link_h_ +#define SchemaTypesDoc_Link_h_ + +#ifndef SCHEMATYPESDOC_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define SCHEMATYPESDOC_LINKAGE __declspec(dllexport) + #else + #define SCHEMATYPESDOC_LINKAGE __declspec(dllimport) + #endif + #else + #define SCHEMATYPESDOC_LINKAGE + #endif +#endif + + +#endif /* SchemaTypesDoc_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/SchemaTypesDocTypes.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/SchemaTypesDocTypes.h new file mode 100644 index 000000000..8c56d8b84 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Doc/SchemaTypesDoc/SchemaTypesDocTypes.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef SCHEMATYPESDOCTYPES_H_ +#define SCHEMATYPESDOCTYPES_H_ + +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +namespace Caf { + typedef enum { + OPERATOR_NONE, + OPERATOR_EQUAL + } OPERATOR_TYPE; + + typedef enum { + ARITY_NONE, + ARITY_UNSIGNED_BYTE = 2 + } ARITY_TYPE; + + typedef enum { + VALIDATOR_NONE, + VALIDATOR_ENUM, + VALIDATOR_RANGE, + VALIDATOR_REGEX, + VALIDATOR_CUSTOM + } VALIDATOR_TYPE; +} + +#endif /* SCHEMATYPESDOCTYPES_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocContracts.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocContracts.h new file mode 100644 index 000000000..ad0baad53 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocContracts.h @@ -0,0 +1,26 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef DocContracts_h_ +#define DocContracts_h_ + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocLink.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocLink.h" +#include "Doc/DiagTypesDoc/DiagTypesDocLink.h" +#include "Doc/DiagRequestDoc/DiagRequestDocLink.h" +#include "Doc/MgmtTypesDoc/MgmtTypesDocLink.h" +#include "Doc/MgmtRequestDoc/MgmtRequestDocLink.h" +#include "Doc/PayloadEnvelopeDoc/PayloadEnvelopeDocLink.h" +#include "Doc/PersistenceDoc/PersistenceDocLink.h" +#include "Doc/ProviderInfraDoc/ProviderInfraDocLink.h" +#include "Doc/ProviderRequestDoc/ProviderRequestDocLink.h" +#include "Doc/ProviderResultsDoc/ProviderResultsDocLink.h" +#include "Doc/ResponseDoc/ResponseDocLink.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocLink.h" +#include "Doc/MultiPmeMgmtRequestDoc/MultiPmeMgmtRequestDocLink.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocUtils.h new file mode 100644 index 000000000..faa176b20 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocUtils.h @@ -0,0 +1,16 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef COMMON_SYS_INC_DOCUTILS_H_ +#define COMMON_SYS_INC_DOCUTILS_H_ + +#include +#include + +#include "../src/Doc/DocUtils/DocUtilsLink.h" + +#endif /* COMMON_SYS_INC_DOCUTILS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocXml.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocXml.h new file mode 100644 index 000000000..a37224995 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/DocXml.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef COMMON_SYS_INC_DOCXML_H_ +#define COMMON_SYS_INC_DOCXML_H_ + +#include +#include + +#include "Doc/DocXml/CafCoreTypesXml/CafCoreTypesXmlLink.h" +#include "Doc/DocXml/SchemaTypesXml/SchemaTypesXmlLink.h" +#include "Doc/DocXml/DiagTypesXml/DiagTypesXmlLink.h" +#include "Doc/DocXml/DiagRequestXml/DiagRequestXmlLink.h" +#include "Doc/DocXml/MgmtTypesXml/MgmtTypesXmlLink.h" +#include "Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h" +#include "Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlLink.h" +#include "Doc/DocXml/PersistenceXml/PersistenceXmlLink.h" +#include "Doc/DocXml/ProviderInfraXml/ProviderInfraXmlLink.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlLink.h" +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h" +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlLink.h" +#include "Doc/DocXml/MgmtRequestXml/MgmtRequestXmlLink.h" + +#endif /* COMMON_SYS_INC_DOCXML_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Exception/CCafException.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Exception/CCafException.h new file mode 100644 index 000000000..11ebfb4c5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Exception/CCafException.h @@ -0,0 +1,81 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCAFEXCEPTION_H_ +#define CCAFEXCEPTION_H_ + + +#include "ICafObject.h" + +namespace Caf { + +class EXCEPTION_LINKAGE CCafException : public ICafObject { +public: + CCafException(); + + CCafException(const std::string& exceptionClassName); + + virtual ~CCafException(); + + virtual void throwSelf(); + + virtual void throwAddRefedSelf(); + + void AddRef(); + + void Release(); + + void QueryInterface(const IID&, void**); + + void populate( + const std::string& message, + const HRESULT errorCode, + const std::string& className, + const std::string& funcName); + + void populateVA(const HRESULT errorCode, + const std::string& className, + const std::string& funcName, + const char* format, + ...); + + bool isPopulated() const; + + std::string getExceptionClassName() const; + + virtual std::string getMsg() const; + + std::string getClassName() const; + + std::string getFuncName() const; + + HRESULT getError() const; + + std::deque* getBacktrace() const; + + virtual std::string getFullMsg() const; + +private: + gint _refCnt; + bool _isPopulated; + +protected: + std::string _exceptionClassName; + HRESULT _errorCode; + std::string _message; + std::string _className; + std::string _funcName; + std::deque* _backtrace; + + CCafException(const CCafException&); + CCafException& operator=(const CCafException&); +}; +CAF_DECLARE_SMART_POINTER(CCafException); + +} + +#endif /* CCAFEXCEPTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/FrameworkLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/FrameworkLink.h new file mode 100644 index 000000000..57cd9abed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/FrameworkLink.h @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef FrameworkLink_h_ +#define FrameworkLink_h_ + +#ifndef FRAMEWORK_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define FRAMEWORK_LINKAGE __declspec(dllexport) + #else + #define FRAMEWORK_LINKAGE __declspec(dllimport) + #endif + #else + #define FRAMEWORK_LINKAGE + #endif +#endif + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/IBean.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/IBean.h new file mode 100644 index 000000000..a6c04a5d3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/IBean.h @@ -0,0 +1,56 @@ +/* + * Author: bwilliams + * Created: Jan 26, 2011 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _FxContracts_IBean_h_ +#define _FxContracts_IBean_h_ + + +#include "ICafObject.h" + +namespace Caf { + +CAF_FORWARD_DECLARE_SMART_INTERFACE(IBean); + +/// TODO - describe interface +struct __declspec(novtable) +IBean : public ICafObject { + CAF_DECL_UUID("860C6E41-76E4-404b-913F-C330EE864DCD") + + struct CArg { + CArg(const SmartPtrIBean& ref) : + _reference(ref), + _type(REFERENCE) {} + CArg(const std::string& val) : + _value(val), + _type(VALUE) {} + + typedef enum { + REFERENCE, + VALUE + } ARG_TYPE; + + SmartPtrIBean _reference; + std::string _value; + ARG_TYPE _type; + + private: + CArg(); + }; + + typedef std::deque Cargs; + typedef Cmapstrstr Cprops; + + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) = 0; + + virtual void terminateBean() = 0; +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/ICafObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/ICafObject.h new file mode 100644 index 000000000..d4dbe253b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/ICafObject.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _ICafObject_H_ +#define _ICafObject_H_ + +/** + * @brief + * The base interface all classes must support in order to support lifetime management + * and interface retrieval. + *

+ * Object lifetime is managed through the AddRef() and Release() methods. Pointers + * to supported interfaces on the object - in the form of TCafSmartPtr - are + * retrieved using the QueryInterface() method. + *

+ * Interfaces and classes are candidates for QueryInterface() if they declare + * a unique identifier for the interface or class. The identifier is a + * UUID and is declared using the CAF_DECL_UUID macro. + *

+ * Example interface declaration: + *

+ * 
+ * struct __declspcec(novtable) IMyInterface {
+ *
+ * 	CAF_DECL_UUID("6AECA0A4-C6B1-4A43-9769-C5A8F56F0B52")
+ *
+ * 	virtual void Foo() = 0;
+ * };
+ * 
+ * 
+ */ +struct __declspec(novtable) ICafObject { + CAF_DECL_UUID("d285ff70-2314-11e0-ac64-0800200c9a66") + + /** @brief Increment the object's reference count */ + virtual void AddRef() = 0; + + /** + * @brief Decrement the object's reference count + *

+ * The object will be destroyed when the count reaches zero. + */ + virtual void Release() = 0; + + /** + * @brief Retrieve an interface on the object + * @param IID the interface's UUID + * @param ppv the address into which the retrieve interface's pointer + * will be stored + */ + virtual void QueryInterface(const IID&, void** ppv) = 0; +}; + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/IVariant.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/IVariant.h new file mode 100644 index 000000000..72049eafb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/IVariant.h @@ -0,0 +1,33 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _FxContracts_IVARIANT_H_ +#define _FxContracts_IVARIANT_H_ + + +#include "ICafObject.h" + +namespace Caf { +struct __declspec(novtable) IVariant : public ICafObject { + CAF_DECL_UUID("05AC7CB8-BBD4-4B3B-AB80-29002DD73747") + + virtual GVariant *get() const = 0; + virtual std::string toString() const = 0; + virtual bool isString() const = 0; + virtual bool isBool() const = 0; + virtual bool isUint8() const = 0; + virtual bool isInt16() const = 0; + virtual bool isUint16() const = 0; + virtual bool isInt32() const = 0; + virtual bool isUint32() const = 0; + virtual bool isInt64() const = 0; + virtual bool isUint64() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IVariant); +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration.h new file mode 100644 index 000000000..6063fcd4f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration.h @@ -0,0 +1,21 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef COMMON_SYS_INC_INTEGRATION_H_ +#define COMMON_SYS_INC_INTEGRATION_H_ + +#include + +// Dependencies + +// Interfaces +#include "Integration/IThrowable.h" + +#include "Integration/Caf/IntegrationCafLink.h" +#include "Integration/Core/IntegrationCoreLink.h" + +#endif /* COMMON_SYS_INC_INTEGRATION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CBeanPropertiesHelper.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CBeanPropertiesHelper.h new file mode 100644 index 000000000..204a9754c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CBeanPropertiesHelper.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CBeanPropertiesHelper_h_ +#define CBeanPropertiesHelper_h_ + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CBeanPropertiesHelper); + +class INTEGRATIONCAF_LINKAGE CBeanPropertiesHelper { +public: + static SmartPtrCBeanPropertiesHelper create( + const IBean::Cprops& properties); + +public: + CBeanPropertiesHelper(); + virtual ~CBeanPropertiesHelper(); + +public: + void initialize( + const IBean::Cprops& properties); + +public: + std::string getRequiredString( + const std::string& key) const; + + std::string getOptionalString( + const std::string& key, + const std::string& defaultVal = std::string()) const; + + bool getRequiredBool( + const std::string& key) const; + + bool getOptionalBool( + const std::string& key, + const bool defaultVal = false) const; + +private: + bool m_isInitialized; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CBeanPropertiesHelper); +}; + +} + +#endif // #ifndef CBeanPropertiesHelper_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageCreator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageCreator.h new file mode 100644 index 000000000..d4e290241 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageCreator.h @@ -0,0 +1,114 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCafMessageCreator_h_ +#define CCafMessageCreator_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallRequestDoc.h" +#include "Doc/DiagRequestDoc/CDiagRequestDoc.h" +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Doc/ResponseDoc/CErrorResponseDoc.h" +#include "Doc/ResponseDoc/CResponseDoc.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessageCreator); + +class INTEGRATIONCAF_LINKAGE CCafMessageCreator { +public: + static SmartPtrIIntMessage createPayloadEnvelope( + const SmartPtrCResponseDoc& response, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage createPayloadEnvelope( + const SmartPtrCErrorResponseDoc& errorResponse, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage createPayloadEnvelope( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage createPayloadEnvelope( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const std::deque& attachmentCollection, + const IIntMessage::SmartPtrCHeaders& newHeaders = IIntMessage::SmartPtrCHeaders(), + const IIntMessage::SmartPtrCHeaders& origHeaders = IIntMessage::SmartPtrCHeaders()); + +public: + static SmartPtrIIntMessage createFromProviderResponse( + const SmartPtrCDynamicByteArray& providerResponse, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + +public: + static SmartPtrIIntMessage create( + const SmartPtrCDynamicByteArray payload, + const std::deque& attachmentCollection, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + +public: + static SmartPtrIIntMessage create( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage create( + const SmartPtrCDiagRequestDoc& diagRequest, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage create( + const SmartPtrCInstallRequestDoc& installRequest, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage create( + const SmartPtrCProviderRegDoc& providerReg, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage create( + const SmartPtrCProviderCollectSchemaRequestDoc& providerCollectSchemaRequest, + const std::string& relFilename, + const std::string& relDirectory, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + + static SmartPtrIIntMessage create( + const SmartPtrCProviderRequestDoc& providerRequest, + const std::string& relFilename, + const std::string& relDirectory, + const std::string& providerUri, + const IIntMessage::SmartPtrCHeaders& headers = IIntMessage::SmartPtrCHeaders()); + +private: + static SmartPtrIIntMessage createPayloadEnvelope( + const std::string& payloadType, + const std::string& payloadStr, + const UUID& clientId, + const UUID& requestId, + const std::string& pmeId, + const std::string& payloadVersion, + const IIntMessage::SmartPtrCHeaders& newHeaders = IIntMessage::SmartPtrCHeaders(), + const IIntMessage::SmartPtrCHeaders& origHeaders = IIntMessage::SmartPtrCHeaders(), + const SmartPtrCAttachmentCollectionDoc& attachmentCollection = SmartPtrCAttachmentCollectionDoc(), + const SmartPtrCProtocolCollectionDoc& protocolCollection = SmartPtrCProtocolCollectionDoc()); + +private: + CAF_CM_DECLARE_NOCREATE(CCafMessageCreator); +}; + +} + +#endif // #ifndef CCafMessageCreator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageHeaders.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageHeaders.h new file mode 100644 index 000000000..ddaeef449 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageHeaders.h @@ -0,0 +1,138 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCafMessageHeaders_h_ +#define CCafMessageHeaders_h_ + + +#include "IVariant.h" +#include "Integration/IIntMessage.h" + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessageHeaders); + +class INTEGRATIONCAF_LINKAGE CCafMessageHeaders { +public: + static SmartPtrCCafMessageHeaders create( + const IIntMessage::SmartPtrCHeaders& headers); + +public: + CCafMessageHeaders(); + virtual ~CCafMessageHeaders(); + +public: + IIntMessage::SmartPtrCHeaders getHeaders() const; + +public: + std::string getPayloadType() const; + + std::string getPayloadTypeOpt( + const std::string& defaultVal = std::string()) const; + +public: + std::string getVersion() const; + + std::string getVersionOpt( + const std::string& defaultVal = "1.0") const; + +public: + UUID getClientId() const; + std::string getClientIdStr() const; + + UUID getClientIdOpt( + const UUID defaultVal = CAFCOMMON_GUID_NULL) const; + std::string getClientIdStrOpt( + const std::string& defaultVal = std::string()) const; + +public: + UUID getRequestId() const; + std::string getRequestIdStr() const; + + UUID getRequestIdOpt( + const UUID defaultVal = CAFCOMMON_GUID_NULL) const; + std::string getRequestIdStrOpt( + const std::string& defaultVal = std::string()) const; + +public: + std::string getPmeId() const; + + std::string getPmeIdOpt( + const std::string& defaultVal = std::string()) const; + +public: + UUID getSessionId() const; + std::string getSessionIdStr() const; + + UUID getSessionIdOpt( + const UUID defaultVal = CAFCOMMON_GUID_NULL) const; + std::string getSessionIdStrOpt( + const std::string& defaultVal = std::string()) const; + +public: + std::string getRelDirectory() const; + + std::string getRelDirectoryOpt( + const std::string& defaultVal = std::string()) const; + +public: + std::string getRelFilename() const; + + std::string getRelFilenameOpt( + const std::string& defaultVal) const; + +public: + std::string getProviderUri() const; + + std::string getProviderUriOpt( + const std::string& defaultVal) const; + +public: + std::string getFlowDirection() const; + + std::string getFlowDirectionOpt( + const std::string& defaultVal) const; + +public: + std::string getRequiredStr( + const std::string& key) const; + + std::string getOptionalStr( + const std::string& key, + const std::string& defaultVal = std::string()) const; + + bool getRequiredBool( + const std::string& key) const; + + bool getOptionalBool( + const std::string& key, + const bool defaultVal = false) const; + +private: + void initialize( + const IIntMessage::SmartPtrCHeaders& headers); + +private: + SmartPtrIVariant findOptionalHeader( + const std::string& key) const; + + SmartPtrIVariant findRequiredHeader( + const std::string& key) const; + +private: + bool _isInitialized; + IIntMessage::SmartPtrCHeaders _headers; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCafMessageHeaders); +}; + +} + +#endif // #ifndef CCafMessageHeaders_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageHeadersWriter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageHeadersWriter.h new file mode 100644 index 000000000..778e37a0d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessageHeadersWriter.h @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCafMessageHeadersWriter_h_ +#define CCafMessageHeadersWriter_h_ + + +#include "Integration/IIntMessage.h" + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessageHeadersWriter); + +class INTEGRATIONCAF_LINKAGE CCafMessageHeadersWriter { +public: + static SmartPtrCCafMessageHeadersWriter create(); + +public: + CCafMessageHeadersWriter(); + virtual ~CCafMessageHeadersWriter(); + +public: + IIntMessage::SmartPtrCHeaders getHeaders() const; + +public: + void setPayloadType(const std::string& payloadType); + + void setVersion(const std::string& version); + + void setPayloadVersion(const std::string& payloadVersion); + + void setClientId(const UUID& clientId); + + void setClientId(const std::string& clientIdStr); + + void setRequestId(const UUID& requestId); + + void setRequestId(const std::string& requestIdStr); + + void setPmeId(const std::string& pmeId); + + void setSessionId(const UUID& sessionId); + + void setSessionId(const std::string& sessionId); + + void setRelDirectory(const std::string& relDirectory); + + void setRelFilename(const std::string& relFilename); + + void setProviderUri(const std::string& providerUri); + + void setIsThrowable(const bool& isThrowable); + + void setIsMultiPart(const bool& isMultiPart); + + void setProtocol(const std::string& protocol); + + void setProtocolAddress(const std::string& protocolAddress); + + void setFlowDirection(const std::string& flowDirection); + +public: + void insertString( + const std::string& key, + const std::string& value); + + void insertBool( + const std::string& key, + const bool& value); + +private: + void initialize(); + +private: + bool _isInitialized; + IIntMessage::SmartPtrCHeaders _headers; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CCafMessageHeadersWriter); +}; + +} + +#endif // #ifndef CCafMessageHeadersWriter_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessagePayload.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessagePayload.h new file mode 100644 index 000000000..5f7c64322 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessagePayload.h @@ -0,0 +1,93 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCafMessagePayload_h_ +#define CCafMessagePayload_h_ + +#include + +#include "Integration/Caf/CCafMessagePayload.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/ResponseDoc/CEventKeyDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessagePayload); + +class INTEGRATIONCAF_LINKAGE CCafMessagePayload { +public: + static SmartPtrCCafMessagePayload create( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType = std::string()); + + static SmartPtrCCafMessagePayload createFromFile( + const std::string& payloadFile, + const std::string& payloadType = std::string()); + + static SmartPtrCCafMessagePayload createFromStr( + const std::string& payloadStr, + const std::string& payloadType = std::string()); + +public: + static SmartPtrCDynamicByteArray createBufferFromStr( + const std::string& payloadStr); + + static SmartPtrCDynamicByteArray createBufferFromFile( + const std::string& payloadFile); + +public: + static void saveToFile( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadPath); + + static std::string saveToStr( + const SmartPtrCDynamicByteArray& payload); + +public: + CCafMessagePayload(); + virtual ~CCafMessagePayload(); + +public: + std::string getPayloadStr() const; + + SmartPtrCDynamicByteArray getPayload() const; + +public: + std::string getVersion() const; + +public: + SmartPtrCRequestHeaderDoc getRequestHeader() const; + + SmartPtrCManifestDoc getManifest() const; + + std::deque getEventKeyCollection() const; + +private: + void initialize( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType = std::string(), + const std::string& encoding = "xml"); + +private: + bool _isInitialized; + + std::string _encoding; + SmartPtrCDynamicByteArray _payload; + std::string _payloadStr; + SmartPtrCXmlElement _payloadXml; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CCafMessagePayload); +}; + +} + +#endif // #ifndef CCafMessagePayload_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessagePayloadParser.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessagePayloadParser.h new file mode 100644 index 000000000..d6a8613ae --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/CCafMessagePayloadParser.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCafMessagePayloadParser_h_ +#define CCafMessagePayloadParser_h_ + + +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallRequestDoc.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CCafMessagePayloadParser); + +class INTEGRATIONCAF_LINKAGE CCafMessagePayloadParser { +public: + static SmartPtrCPayloadEnvelopeDoc getPayloadEnvelope( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCInstallProviderJobDoc getInstallProviderJob( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCUninstallProviderJobDoc getUninstallProviderJob( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCProviderRequestDoc getProviderRequest( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCProviderRegDoc getProviderReg( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCInstallRequestDoc getInstallRequest( + const SmartPtrCDynamicByteArray& payload); + + static SmartPtrCMgmtRequestDoc getMgmtRequest( + const SmartPtrCDynamicByteArray& payload); + +private: + static SmartPtrCXmlElement bufferToXml( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType = std::string()); + + static std::string bufferToStr( + const SmartPtrCDynamicByteArray& payload); + +private: + CAF_CM_DECLARE_NOCREATE(CCafMessagePayloadParser); +}; + +} + +#endif // #ifndef CCafMessagePayloadParser_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/IntegrationCafLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/IntegrationCafLink.h new file mode 100644 index 000000000..b17c5710e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Caf/IntegrationCafLink.h @@ -0,0 +1,23 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef INTEGRATIONCAFLINK_H_ +#define INTEGRATIONCAFLINK_H_ + +#ifndef INTEGRATIONCAF_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define INTEGRATIONCAF_LINKAGE __declspec(dllexport) + #else + #define INTEGRATIONCAF_LINKAGE __declspec(dllimport) + #endif + #else + #define INTEGRATIONCAF_LINKAGE + #endif +#endif + +#endif /* INTEGRATIONCAFLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractMessageChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractMessageChannel.h new file mode 100644 index 000000000..7a4dfd709 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractMessageChannel.h @@ -0,0 +1,63 @@ +/* + * Created on: Jan 26, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CABSTRACTMESSAGECHANNEL_H_ +#define CABSTRACTMESSAGECHANNEL_H_ + +#include "Integration/IChannelInterceptorSupport.h" +#include "Integration/IChannelInterceptor.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/Core/IntegrationCoreLink.h" + +namespace Caf { +/** + * Base class for {@link IMessageChannel} implementations providing common + * properties and method implementations including {@link IChannelInterceptor interceptors}. + */ +class INTEGRATIONCORE_LINKAGE CAbstractMessageChannel : + public IMessageChannel, + public IChannelInterceptorSupport { +public: + CAbstractMessageChannel(); + virtual ~CAbstractMessageChannel(); + +public: // IMessageChannel + bool send( + const SmartPtrIIntMessage& message); + + bool send( + const SmartPtrIIntMessage& message, + const int32 timeout); + +public: // IChannelInterceptorSupport + void setInterceptors( + const IChannelInterceptorSupport::InterceptorCollection& interceptors); + +protected: + /** + * Subclasses must implement this method. A non-negative timeout indicates + * how int32 to wait if the channel is at capacity. If the value is 0 it must + * return immediately with or without success. A negative timeout value + * indicates that the method should block until either the message is accepted + * or the blocking thread is interrupted. + */ + virtual bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout) = 0; + +protected: + std::list getInterceptors() const; + +private: + std::list _interceptors; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAbstractMessageChannel); +}; +} + +#endif /* CABSTRACTMESSAGECHANNEL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractMessageRouter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractMessageRouter.h new file mode 100644 index 000000000..d77211cd6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractMessageRouter.h @@ -0,0 +1,53 @@ +/* + * Created on: Aug 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAbstractMessageRouter_h +#define CAbstractMessageRouter_h + + +#include "Integration/IMessageRouter.h" + +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CAbstractMessageRouter : public IMessageRouter { +public: + CAbstractMessageRouter(); + virtual ~CAbstractMessageRouter(); + + void init(); + + void init( + const SmartPtrIMessageChannel& defaultOutputChannel, + const bool ignoreSendFailures, + const int32 sendTimeout); + + virtual void routeMessage( + const SmartPtrIIntMessage& message); + +protected: + typedef std::deque ChannelCollection; + virtual ChannelCollection getTargetChannels( + const SmartPtrIIntMessage& message) = 0; + +private: + SmartPtrIMessageChannel _defaultOutputChannel; + bool _ignoreSendFailures; + int32 _sendTimeout; + +private: + bool _isInitialized; + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CAbstractMessageRouter); +}; + +} + +#endif /* CAbstractMessageRouter_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractPollableChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractPollableChannel.h new file mode 100644 index 000000000..793a86c96 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CAbstractPollableChannel.h @@ -0,0 +1,57 @@ +/* + * Created on: Jan 26, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CABSTRACTPOLLABLECHANNEL_H_ +#define CABSTRACTPOLLABLECHANNEL_H_ + +#include "Integration/Core/CAbstractMessageChannel.h" + +#include "Integration/Dependencies/CPollerMetadata.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" + +#include "Integration/IPollableChannel.h" + +namespace Caf { + +/** + * Base class for pollable channels + */ +class INTEGRATIONCORE_LINKAGE CAbstractPollableChannel : + public CAbstractMessageChannel, + public IPollableChannel { +public: + CAbstractPollableChannel(); + virtual ~CAbstractPollableChannel(); + +public: + SmartPtrIIntMessage receive(); + SmartPtrIIntMessage receive(const int32 timeout); + SmartPtrCPollerMetadata getPollerMetadata() const; + +protected: + /** + * Subclasses must implement this method. A non-negative timeout indicates + * how int32 to wait if the channel is empty (if the value is 0, it must + * return immediately with or without success). A negative timeout value + * indicates that the method should block until either a message is + * available or the blocking thread is interrupted. + */ + virtual SmartPtrIIntMessage doReceive(const int32 timeout) = 0; + + void setPollerMetadata(const SmartPtrCPollerMetadata& pollerMetadata); + + void setPollerMetadata(const SmartPtrIDocument& pollerDoc); + +private: + SmartPtrCPollerMetadata _pollerMetadata; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAbstractPollableChannel); +}; +} + +#endif /* CABSTRACTPOLLABLECHANNEL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CBroadcastingDispatcher.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CBroadcastingDispatcher.h new file mode 100644 index 000000000..a92f98e26 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CBroadcastingDispatcher.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CBroadcastingDispatcher_h_ +#define CBroadcastingDispatcher_h_ + + +#include "Integration/IMessageDispatcher.h" + +#include "Integration/IErrorHandler.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageHandler.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class INTEGRATIONCORE_LINKAGE CBroadcastingDispatcher : + public IMessageDispatcher { +public: + CBroadcastingDispatcher(); + virtual ~CBroadcastingDispatcher(); + +public: + void initialize( + const SmartPtrIErrorHandler& errorHandler); + +public: // IMessageDispatcher + void addHandler( + const SmartPtrIMessageHandler& messageHandler); + + void removeHandler( + const SmartPtrIMessageHandler& messageHandler); + + bool dispatch( + const SmartPtrIIntMessage& message); + +private: + typedef std::map CIntMessageHandlerCollection; + CAF_DECLARE_SMART_POINTER(CIntMessageHandlerCollection); + +private: + bool _isInitialized; + SmartPtrIErrorHandler _errorHandler; + SmartPtrCIntMessageHandlerCollection _messageHandlerCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CBroadcastingDispatcher); +}; + +CAF_DECLARE_SMART_POINTER(CBroadcastingDispatcher); + +} + +#endif // #ifndef CBroadcastingDispatcher_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CChannelInterceptorAdapter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CChannelInterceptorAdapter.h new file mode 100644 index 000000000..0f67ee51c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CChannelInterceptorAdapter.h @@ -0,0 +1,51 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCHANNELINTERCEPTORADAPTER_H_ +#define CCHANNELINTERCEPTORADAPTER_H_ + + +#include "Integration/IChannelInterceptor.h" + +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" + +namespace Caf { + +/** + * A {@link IChannelInterceptor} with no-op method implementations so that + * subclasses do not have to implement all of th einterface's methods. + */ +class INTEGRATIONCORE_LINKAGE CChannelInterceptorAdapter : public IChannelInterceptor { +public: + CChannelInterceptorAdapter(); + virtual ~CChannelInterceptorAdapter(); + +public: // IChannelInterceptor + virtual SmartPtrIIntMessage& preSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel); + + virtual void postSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel, + bool sent); + + virtual bool preReceive( + SmartPtrIMessageChannel& channel); + + virtual SmartPtrIIntMessage& postReceive( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel); + +private: + CAF_CM_DECLARE_NOCOPY(CChannelInterceptorAdapter); +}; + +} + +#endif /* CCHANNELINTERCEPTORADAPTER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CChannelResolver.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CChannelResolver.h new file mode 100644 index 000000000..6eb981171 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CChannelResolver.h @@ -0,0 +1,49 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CChannelResolver_h_ +#define CChannelResolver_h_ + + +#include "Integration/IChannelResolver.h" + +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageChannel.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CChannelResolver : + public IChannelResolver { +public: + CChannelResolver(); + virtual ~CChannelResolver(); + +public: + void initialize( + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection); + +public: // IChannelResolver + SmartPtrIMessageChannel resolveChannelName( + const std::string& channelName) const; + + SmartPtrIIntegrationObject resolveChannelNameToObject( + const std::string& channelName) const; + +private: + bool _isInitialized; + SmartPtrCIntegrationObjectCollection _integrationObjectCollection; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CChannelResolver); +}; + +CAF_DECLARE_SMART_POINTER(CChannelResolver); + +} + +#endif // #ifndef CChannelResolver_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CDocument.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CDocument.h new file mode 100644 index 000000000..31ee39413 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CDocument.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CDocument_h_ +#define CDocument_h_ + + +#include "Integration/IDocument.h" + +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CDocument : + public IDocument { +public: + CDocument(); + virtual ~CDocument(); + +public: + void initialize(const SmartPtrCXmlElement& xmlElement); + SmartPtrCXmlElement getXmlElement() const; + +public: // IDocument + std::string findRequiredAttribute(const std::string& name) const; + std::string findOptionalAttribute(const std::string& name) const; + SmartPtrIDocument findRequiredChild(const std::string& name) const; + SmartPtrIDocument findOptionalChild(const std::string& name) const; + SmartPtrCAttributeCollection getAllAttributes() const; + SmartPtrCChildCollection getAllChildren() const; + SmartPtrCOrderedChildCollection getAllChildrenInOrder() const; + std::string getName() const; + std::string getValue() const; + std::string getPath() const; + +public: // IDocument Save operations + void saveToFile(const std::string& filename) const; + std::string saveToString() const; + std::string saveToStringRaw() const; + +private: + bool _isInitialized; + SmartPtrCXmlElement _xmlElement; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CDocument); +}; + +CAF_DECLARE_SMART_POINTER(CDocument); +} + +#endif // #ifndef CDocument_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CErrorHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CErrorHandler.h new file mode 100644 index 000000000..5d2f5331d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CErrorHandler.h @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CErrorHandler_h_ +#define CErrorHandler_h_ + + +#include "Integration/IErrorHandler.h" + +#include "Integration/IChannelResolver.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IThrowable.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CErrorHandler : + public IErrorHandler { +public: + CErrorHandler(); + virtual ~CErrorHandler(); + +public: + void initialize( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrIMessageChannel& errorMessageChannel); + +public: // IErrorHandler + void handleError( + const SmartPtrIThrowable& throwable, + const SmartPtrIIntMessage& message) const; + +private: + bool _isInitialized; + SmartPtrIChannelResolver _channelResolver; + SmartPtrIMessageChannel _errorMessageChannel; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CErrorHandler); +}; + +CAF_DECLARE_SMART_POINTER(CErrorHandler); +} + +#endif // #ifndef CErrorHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CExpressionHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CExpressionHandler.h new file mode 100644 index 000000000..eb0be8fce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CExpressionHandler.h @@ -0,0 +1,53 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CEXPRESSIONHANDLER_H_ +#define CEXPRESSIONHANDLER_H_ + + +#include "Common/IAppConfig.h" +#include "Common/IAppContext.h" +#include "IVariant.h" +#include "Integration/IExpressionInvoker.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CExpressionHandler { +public: + CExpressionHandler(); + virtual ~CExpressionHandler(); + + void init( + const SmartPtrIAppConfig& appConfig, + const SmartPtrIAppContext& appContext, + const std::string& expression); + + SmartPtrIVariant evaluate(const SmartPtrIIntMessage& message); + + std::string getBeanName() const; + + std::string getMethodName() const; + + Cdeqstr getMethodParameters() const; + + std::string toString() const; + +private: + bool _isInitialized; + SmartPtrIExpressionInvoker _invoker; + std::string _beanName; + std::string _methodName; + Cdeqstr _methodParams; + + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CExpressionHandler); +}; +CAF_DECLARE_SMART_POINTER(CExpressionHandler); + +} + +#endif /* CEXPRESSIONHANDLER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntException.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntException.h new file mode 100644 index 000000000..09489c96c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntException.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CIntException_h_ +#define CIntException_h_ + +#include "Exception/CCafException.h" + +#include "Integration/IThrowable.h" +#include "Integration/Core/CIntException.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CIntException : + public IThrowable { +public: + CIntException(); + virtual ~CIntException(); + +public: + void initialize(const CCafException* cafException); + +public: // IThrowable + std::string getExceptionClassName() const; + std::string getMsg() const; + std::string getClassName() const; + std::string getFuncName() const; + HRESULT getError() const; + std::deque* getBacktrace() const; + std::string getFullMsg() const; + +private: + bool _isInitialized; + std::string _exceptionClassName; + HRESULT _errorCode; + std::string _message; + std::string _className; + std::string _funcName; + std::deque* _backtrace; + std::string _fullMsg; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CIntException); +}; + +CAF_DECLARE_SMART_POINTER(CIntException); + +#define CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(_exclass_) \ +class INTEGRATIONCORE_LINKAGE _exclass_ : public Caf::CCafException { \ +public: \ + _exclass_(); \ + virtual ~_exclass_(); \ + void throwSelf(); \ +private: \ + _exclass_(const _exclass_ &); \ + _exclass_ & operator=(const _exclass_ &); \ +}; + +// Exceptions specific to integration +CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(FatalListenerStartupException) + +CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(ListenerExecutionFailedException) + +CAF_CM_DECLARE_INTEGRATION_EXCEPTION_CLASS(MessageDeliveryException) + +} + +#endif // #ifndef CIntException_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntMessage.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntMessage.h new file mode 100644 index 000000000..4406753ce --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntMessage.h @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CIntMessage_h_ +#define CIntMessage_h_ + + +#include "Integration/IIntMessage.h" + +#include "ICafObject.h" +#include "IVariant.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CIntMessage : + public IIntMessage { +public: + static SmartPtrCHeaders mergeHeaders( + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders); + +public: + CIntMessage(); + virtual ~CIntMessage(); + +public: + void initializeStr( + const std::string& payloadStr, + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders); + + void initialize( + const SmartPtrCDynamicByteArray& payload, + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders); + +public: // IIntMessage + SmartPtrCDynamicByteArray getPayload() const; + + std::string getPayloadStr() const; + + UUID getMessageId() const; + + std::string getMessageIdStr() const; + + SmartPtrCHeaders getHeaders() const; + + SmartPtrIVariant findOptionalHeader( + const std::string& key) const; + + SmartPtrIVariant findRequiredHeader( + const std::string& key) const; + + std::string findOptionalHeaderAsString( + const std::string& key) const; + + std::string findRequiredHeaderAsString( + const std::string& key) const; + + SmartPtrICafObject findOptionalObjectHeader( + const std::string& key) const; + + SmartPtrICafObject findRequiredObjectHeader( + const std::string& key) const; + +private: + bool _isInitialized; + UUID _messageId; + SmartPtrCDynamicByteArray _payload; + SmartPtrCHeaders _headers; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CIntMessage); +}; + +CAF_DECLARE_SMART_POINTER(CIntMessage); + +} + +#endif // #ifndef _IntegrationContracts_CIntMessage_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntMessageHeaders.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntMessageHeaders.h new file mode 100644 index 000000000..8829e5fe0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntMessageHeaders.h @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CIntMessageHeaders_h_ +#define CIntMessageHeaders_h_ + +#include "Integration/Core/CIntMessageHeaders.h" + +#include "ICafObject.h" +#include "IVariant.h" +#include "Integration/IIntMessage.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CIntMessageHeaders { +public: + CIntMessageHeaders(); + virtual ~CIntMessageHeaders(); + +public: + IIntMessage::SmartPtrCHeaders getHeaders() const; + + void clear(); + + void insertString( + const std::string& key, + const std::string& value); + + void insertStringOpt( + const std::string& key, + const std::string& value); + + void insertInt64( + const std::string& key, + const int64& value); + + void insertUint64( + const std::string& key, + const uint64& value); + + void insertInt32( + const std::string& key, + const int32& value); + + void insertUint32( + const std::string& key, + const uint32& value); + + void insertInt16( + const std::string& key, + const int16& value); + + void insertUint16( + const std::string& key, + const uint16& value); + + void insertUint8( + const std::string& key, + const uint8& value); + + void insertBool( + const std::string& key, + const bool& value); + + void insertVariant( + const std::string& key, + const SmartPtrIVariant& variant); + + void insertObject( + const std::string& key, + const SmartPtrICafObject& cafObject); + +private: + IIntMessage::SmartPtrCHeaders _headers; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CIntMessageHeaders); +}; + +CAF_DECLARE_SMART_POINTER(CIntMessageHeaders); + +} + +#endif // #ifndef _IntegrationContracts_CIntMessageHeaders_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntegrationAppContext.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntegrationAppContext.h new file mode 100644 index 000000000..3665121e5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CIntegrationAppContext.h @@ -0,0 +1,141 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CIntegrationAppContext_h_ +#define CIntegrationAppContext_h_ + + + +#include "Common/IAppContext.h" + +#include "Common/CApplicationContext.h" +#include "IBean.h" +#include "Integration/Core/CChannelResolver.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" +#include "Integration/IMessageChannel.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IIntegrationAppContext.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CIntegrationAppContext : + public IIntegrationAppContext, + public IAppContext, + public IChannelResolver { +public: + CIntegrationAppContext(); + virtual ~CIntegrationAppContext(); + +public: + void initialize(const uint32 timeoutMs); + void initialize(const uint32 timeoutMs, const std::string& beanConfigPath); + void initializeTwoPhase(const uint32 timeoutMs, const std::string& beanConfigPath); + void terminate(const uint32 timeoutMs); + +public: // IIntegrationAppContext + void startLifecycleBeans(); + SmartPtrIIntegrationObject getIntegrationObject(const std::string& id) const; + void getIntegrationObject(const IID& iid, void **ppv) const; + SmartPtrCObjectCollection getIntegrationObjects(const IID& iid) const; + +public: // IAppContext + SmartPtrIBean getBean(const std::string& name) const; + +public: // IChannelResolver + SmartPtrIMessageChannel resolveChannelName( + const std::string& channelName) const; + + SmartPtrIIntegrationObject resolveChannelNameToObject( + const std::string& channelName) const; + +private: + typedef std::multimap LifecycleBeans; + +private: + void initializeRaw( + const uint32 timeoutMs, + const std::string& beanConfigPath, + const bool startLifecycleBeans); + + SmartPtrCIntegrationObjectCollection assign( + const IAppContext::SmartPtrCBeans& contextBeans, + const Cdeqstr& beanConfigPathCollection) const; + + void injectChannelInterceptors( + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection) const; + + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection, + const SmartPtrCChannelResolver& channelResolver) const; + + void startStop( + const LifecycleBeans& lifecycleBeans, + const uint32 timeoutMs, + const bool isStart) const; + + SmartPtrCXmlElement getBeanConfigRoot() const; + + void addBuiltIn( + const std::string& beanId, + const IAppContext::SmartPtrCBeans& beans, + SmartPtrCIntegrationObjectCollection& integrationObjectCollection) const; + + std::string getDefaultBeanConfigPath() const; + + Cdeqstr getBeanConfigFiles( + const std::string& beanConfigPath) const; + +private: + class CIntegrationAppContextWeakReference : public IIntegrationAppContext { + public: + CIntegrationAppContextWeakReference(); + + void set(CIntegrationAppContext *context); + + SmartPtrIIntegrationObject getIntegrationObject( + const std::string& id) const; + + void getIntegrationObject( + const IID& iid, + void **ppv) const; + + IIntegrationAppContext::SmartPtrCObjectCollection getIntegrationObjects( + const IID& iid) const; + + private: + CIntegrationAppContext *_context; + CAF_CM_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CIntegrationAppContextWeakReference); + }; + CAF_DECLARE_SMART_POINTER(CIntegrationAppContextWeakReference); + +private: + bool _isInitialized; + bool _isIntegrationObjectCollectionReady; + bool _lifecycleBeansStarted; + uint32 _timeoutMs; + SmartPtrCApplicationContext _applicationContext; + SmartPtrCChannelResolver _channelResolver; + SmartPtrCIntegrationObjectCollection _integrationObjectCollection; + SmartPtrCIntegrationAppContextWeakReference _weakSelfReference; + LifecycleBeans _lifecycleBeans; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CIntegrationAppContext); +}; + +CAF_DECLARE_SMART_POINTER(CIntegrationAppContext); + +} + +#endif // #ifndef CIntegrationAppContext_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessageHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessageHandler.h new file mode 100644 index 000000000..bdf489377 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessageHandler.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessageHandler_h_ +#define CMessageHandler_h_ + + +#include "Integration/IMessageHandler.h" + +#include "ICafObject.h" +#include "Integration/IErrorProcessor.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IMessageProcessor.h" +#include "Integration/IMessageRouter.h" +#include "Integration/IMessageSplitter.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CMessageHandler : public IMessageHandler { +public: + CMessageHandler(); + virtual ~CMessageHandler(); + +public: + void initialize( + const std::string& inputId, + const SmartPtrIMessageChannel& outputMessageChannel, + const SmartPtrICafObject& messageHandlerObj); + +public: + std::string getInputId() const; + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + +private: + bool _isInitialized; + std::string _inputId; + SmartPtrIIntMessage _savedMessage; + + SmartPtrIMessageChannel _outputMessageChannel; + SmartPtrITransformer _transformer; + SmartPtrIMessageProcessor _messageProcessor; + SmartPtrIErrorProcessor _errorProcessor; + SmartPtrIMessageSplitter _messageSplitter; + SmartPtrIMessageRouter _messageRouter; + SmartPtrIMessageHandler _messageHandler; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CMessageHandler); +}; + +CAF_DECLARE_SMART_POINTER(CMessageHandler); + +} + +#endif // #ifndef CMessageHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessageHeaderUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessageHeaderUtils.h new file mode 100644 index 000000000..4107c6c9a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessageHeaderUtils.h @@ -0,0 +1,77 @@ +/* + * Created on: Nov 19, 2014 + * Author: bwilliams + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef CMessageHeaderUtils_h_ +#define CMessageHeaderUtils_h_ + + +#include "Integration/IIntMessage.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CMessageHeaderUtils { +public: + static std::string getStringReq( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static std::string getStringOpt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint8 getUint8Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint8 getUint8Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint16 getUint16Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint16 getUint16Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint32 getUint32Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint32 getUint32Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint64 getUint64Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static uint64 getUint64Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static bool getBoolReq( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static bool getBoolOpt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag); + + static void log( + const IIntMessage::SmartPtrCHeaders& headers, + const log4cpp::Priority::PriorityLevel priorityLevel = log4cpp::Priority::DEBUG); + +private: + CAF_CM_DECLARE_NOCREATE(CMessageHeaderUtils); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessagingTemplate.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessagingTemplate.h new file mode 100644 index 000000000..6016dd646 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessagingTemplate.h @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessagingTemplate_h_ +#define CMessagingTemplate_h_ + + +#include "Integration/ILifecycle.h" + +#include "ICafObject.h" +#include "Integration/Core/CMessageHandler.h" +#include "Integration/Core/CMessagingTemplateHandler.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IPollableChannel.h" +#include "Integration/ISubscribableChannel.h" +#include "Integration/ITaskExecutor.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CMessagingTemplate : + public ILifecycle { +public: + CMessagingTemplate(); + virtual ~CMessagingTemplate(); + +public: + void initialize( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrIIntegrationObject& inputIntegrationObject, + const SmartPtrIMessageChannel& errorMessageChannel, + const SmartPtrIMessageChannel& outputMessageChannel, + const SmartPtrICafObject& messageHandlerObj); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +private: + bool _isInitialized; + bool _isRunning; + std::string _inputId; + + SmartPtrISubscribableChannel _inputSubscribableChannel; + SmartPtrCMessagingTemplateHandler _messagingTemplateHandler; + SmartPtrITaskExecutor _taskExecutor; + +private: + SmartPtrITaskExecutor createTaskExecutor( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrCMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIMessageChannel& errorMessageChannel) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CMessagingTemplate); +}; + +CAF_DECLARE_SMART_POINTER(CMessagingTemplate); + +} + +#endif // #ifndef CMessagingTemplate_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessagingTemplateHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessagingTemplateHandler.h new file mode 100644 index 000000000..4e5635892 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CMessagingTemplateHandler.h @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessagingTemplateHandler_h_ +#define CMessagingTemplateHandler_h_ + + +#include "Integration/IMessageHandler.h" + +#include "Integration/IIntMessage.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CMessagingTemplateHandler : + public IMessageHandler { +public: + CMessagingTemplateHandler(); + virtual ~CMessagingTemplateHandler(); + +public: + void initialize( + const SmartPtrIMessageHandler& messageHandler); + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + +private: + bool _isInitialized; + + SmartPtrIMessageHandler _messageHandler; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CMessagingTemplateHandler); +}; + +CAF_DECLARE_SMART_POINTER(CMessagingTemplateHandler); + +} + +#endif // #ifndef CMessagingTemplateHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSimpleAsyncTaskExecutor.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSimpleAsyncTaskExecutor.h new file mode 100644 index 000000000..16542b964 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSimpleAsyncTaskExecutor.h @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CSimpleAsyncTaskExecutor_h_ +#define CSimpleAsyncTaskExecutor_h_ + +#include "Common/CThreadSignal.h" + +#include "Integration/Core/CSimpleAsyncTaskExecutorState.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IRunnable.h" + +#include "Integration/ITaskExecutor.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CSimpleAsyncTaskExecutor : + public ITaskExecutor { +public: + CSimpleAsyncTaskExecutor(); + virtual ~CSimpleAsyncTaskExecutor(); + +public: + void initialize( + const SmartPtrIRunnable& runnable, + const SmartPtrIErrorHandler& errorHandler); + +public: // ITaskExecutor + void execute(const uint32 timeoutMs); + void cancel(const uint32 timeoutMs); + ETaskState getState() const; + +private: + static void* threadFunc(void* data); + +private: + bool _isInitialized; + GThread* _thread; + SmartPtrCSimpleAsyncTaskExecutorState _state; + typedef std::pair CThreadData; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_THREADSIGNAL_CREATE; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CSimpleAsyncTaskExecutor); +}; + +CAF_DECLARE_SMART_POINTER(CSimpleAsyncTaskExecutor); + +} + +#endif // #ifndef CSimpleAsyncTaskExecutor_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSimpleAsyncTaskExecutorState.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSimpleAsyncTaskExecutorState.h new file mode 100644 index 000000000..a88e4bf40 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSimpleAsyncTaskExecutorState.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CSimpleAsyncTaskExecutorState_h_ +#define CSimpleAsyncTaskExecutorState_h_ + +#include "Common/CThreadSignal.h" + +#include "Common/CAutoMutex.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IRunnable.h" +#include "Integration/ITaskExecutor.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CSimpleAsyncTaskExecutorState { +public: + CSimpleAsyncTaskExecutorState(); + virtual ~CSimpleAsyncTaskExecutorState(); + +public: + void initialize( + const SmartPtrIRunnable& runnable, + const SmartPtrIErrorHandler& errorHandler); + + SmartPtrIRunnable getRunnable() const; + SmartPtrIErrorHandler getErrorHandler() const; + + ITaskExecutor::ETaskState getState() const; + std::string getStateStr() const; + void setState(const ITaskExecutor::ETaskState runnableState); + + bool getHasThreadExited(); + void setThreadExited(); + + void signalStart(); + void waitForStart(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs); + + void signalStop(); + void waitForStop(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs); + +private: + bool _isInitialized; + bool _hasThreadExited; + ITaskExecutor::ETaskState _runnableState; + SmartPtrIRunnable _runnable; + SmartPtrIErrorHandler _errorHandler; + std::string _exceptionMessage; + + CThreadSignal _threadSignalStart; + CThreadSignal _threadSignalStop; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CSimpleAsyncTaskExecutorState); +}; + +CAF_DECLARE_SMART_POINTER(CSimpleAsyncTaskExecutorState); + +} + +#endif // #ifndef CSimpleAsyncTaskExecutorState_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSourcePollingChannelAdapter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSourcePollingChannelAdapter.h new file mode 100644 index 000000000..14c224ec6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CSourcePollingChannelAdapter.h @@ -0,0 +1,70 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CSourcePollingChannelAdapter_h_ +#define CSourcePollingChannelAdapter_h_ + +#include "Common/CThreadSignal.h" + +#include "Integration/Dependencies/CPollerMetadata.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IMessageHandler.h" +#include "Integration/IPollableChannel.h" + +#include "Integration/IRunnable.h" + +namespace Caf { + +class INTEGRATIONCORE_LINKAGE CSourcePollingChannelAdapter : + public IRunnable { +public: + CSourcePollingChannelAdapter(); + virtual ~CSourcePollingChannelAdapter(); + +public: + void initialize( + const SmartPtrIMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIErrorHandler& errorHandler); + + void initialize( + const SmartPtrIMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIErrorHandler& errorHandler, + const int32 timeout); + +public: // IRunnable + void run(); + void cancel(); + +private: + bool getIsCancelled() const; + +private: + bool _isInitialized; + bool _isCancelled; + bool _isTimeoutSet; + int32 _timeout; + SmartPtrIMessageHandler _messageHandler; + SmartPtrIPollableChannel _inputPollableChannel; + SmartPtrIErrorHandler _errorHandler; + SmartPtrCPollerMetadata _pollerMetadata; + CThreadSignal _threadSignalCancel; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_THREADSIGNAL_CREATE; + CAF_CM_DECLARE_NOCOPY(CSourcePollingChannelAdapter); +}; + +CAF_DECLARE_SMART_POINTER(CSourcePollingChannelAdapter); + +} + +#endif // #ifndef CSourcePollingChannelAdapter_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CUnicastingDispatcher.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CUnicastingDispatcher.h new file mode 100644 index 000000000..0feb9fb24 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/CUnicastingDispatcher.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CUnicastingDispatcher_h_ +#define CUnicastingDispatcher_h_ + + +#include "Integration/IMessageDispatcher.h" + +#include "Integration/Core/CBroadcastingDispatcher.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageHandler.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class INTEGRATIONCORE_LINKAGE CUnicastingDispatcher : + public IMessageDispatcher { +public: + CUnicastingDispatcher(); + virtual ~CUnicastingDispatcher(); + +public: + void initialize( + const SmartPtrIErrorHandler& errorHandler); + +public: // IMessageDispatcher + void addHandler( + const SmartPtrIMessageHandler& messageHandler); + + void removeHandler( + const SmartPtrIMessageHandler& messageHandler); + + bool dispatch( + const SmartPtrIIntMessage& message); + +private: + typedef std::map CIntMessageHandlerCollection; + CAF_DECLARE_SMART_POINTER(CIntMessageHandlerCollection); + +private: + bool _isInitialized; + SmartPtrIErrorHandler _errorHandler; + SmartPtrCIntMessageHandlerCollection _messageHandlerCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CUnicastingDispatcher); +}; + +CAF_DECLARE_SMART_POINTER(CUnicastingDispatcher); + +} + +#endif // #ifndef CUnicastingDispatcher_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/FileHeaders.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/FileHeaders.h new file mode 100644 index 000000000..16c4ce55c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/FileHeaders.h @@ -0,0 +1,19 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef FileHeadersInc_h_ +#define FileHeadersInc_h_ + +namespace Caf { + namespace FileHeaders { + extern INTEGRATIONCORE_LINKAGE const char* _sFILENAME; + extern INTEGRATIONCORE_LINKAGE const char* _sORIGINAL_FILE; + } +} + +#endif // #ifndef FileHeadersInc_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/IntegrationCoreLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/IntegrationCoreLink.h new file mode 100644 index 000000000..fab1c840b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/IntegrationCoreLink.h @@ -0,0 +1,23 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef INTEGRATIONCORELINK_H_ +#define INTEGRATIONCORELINK_H_ + +#ifndef INTEGRATIONCORE_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define INTEGRATIONCORE_LINKAGE __declspec(dllexport) + #else + #define INTEGRATIONCORE_LINKAGE __declspec(dllimport) + #endif + #else + #define INTEGRATIONCORE_LINKAGE + #endif +#endif + +#endif /* INTEGRATIONCORELINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/MessageHeaders.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/MessageHeaders.h new file mode 100644 index 000000000..9d3b6fb22 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Core/MessageHeaders.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef MessageHeadersInc_h_ +#define MessageHeadersInc_h_ + +namespace Caf { + namespace MessageHeaders { + // UUID stored as a string + extern INTEGRATIONCORE_LINKAGE const char* _sID; + + // int64 + extern INTEGRATIONCORE_LINKAGE const char* _sTIMESTAMP; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sCORRELATION_ID; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sREPLY_CHANNEL; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sERROR_CHANNEL; + + // int64 + extern INTEGRATIONCORE_LINKAGE const char* _sEXPIRATION_DATE; + + // int32 + extern INTEGRATIONCORE_LINKAGE const char* _sPRIORITY; + + // int32 + extern INTEGRATIONCORE_LINKAGE const char* _sSEQUENCE_NUMBER; + + // int32 + extern INTEGRATIONCORE_LINKAGE const char* _sSEQUENCE_SIZE; + + extern INTEGRATIONCORE_LINKAGE const char* _sIS_THROWABLE; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sREQUEST_ID; + + // boolean + extern INTEGRATIONCORE_LINKAGE const char* _sMULTIPART; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sMULTIPART_WORKING_DIR; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sMESSAGE_TYPE; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sPROTOCOL_TYPE; + + // string + extern INTEGRATIONCORE_LINKAGE const char* _sPROTOCOL_CONNSTR; + } +}; + +#endif // #ifndef MessageHeadersInc_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Dependencies/CPollerMetadata.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Dependencies/CPollerMetadata.h new file mode 100644 index 000000000..8311cf875 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/Dependencies/CPollerMetadata.h @@ -0,0 +1,47 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_CPollerMetadata_h_ +#define _IntegrationContracts_CPollerMetadata_h_ + +namespace Caf { + +class CPollerMetadata { +public: + CPollerMetadata() : + _maxMessagesPerPoll(0), + _fixedRate(0) {} + +public: + uint32 getMaxMessagesPerPoll() const { + return _maxMessagesPerPoll; + } + void putMaxMessagesPerPoll(const uint32& maxMessagesPerPoll) { + _maxMessagesPerPoll = maxMessagesPerPoll; + } + + uint32 getFixedRate() const { + return _fixedRate; + } + void putFixedRate(const uint32& fixedRate) { + _fixedRate = fixedRate; + } + +private: + uint32 _maxMessagesPerPoll; + uint32 _fixedRate; + +private: + CPollerMetadata (const CPollerMetadata&); + CPollerMetadata & operator=(const CPollerMetadata&); +}; + +CAF_DECLARE_SMART_POINTER(CPollerMetadata); + +} + +#endif // #ifndef _IntegrationContracts_CPollerMetadata_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptor.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptor.h new file mode 100644 index 000000000..266da2a4e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptor.h @@ -0,0 +1,64 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ICHANNELINTERCEPTOR_H_ +#define _IntegrationContracts_ICHANNELINTERCEPTOR_H_ + + +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" + +namespace Caf { + +struct __declspec(novtable) + IChannelInterceptor : public ICafObject +{ + CAF_DECL_UUID("5002EA10-769B-44A0-AA6B-18ED91B57655") + + /** + * Invoked before the message is sent to the channel. + * The message may be modified if necessary. + * If this method returns null then the + * actual send invocation will not occur. + */ + virtual SmartPtrIIntMessage& preSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel) = 0; + + /** + * Invoked immediately after the send invocation. The + * boolean value argument represents the return value of + * that invocation. + */ + virtual void postSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel, + bool sent) = 0; + + /** + * Invoked as soon as receive is called and before a message + * is actually retrieved. If the return value is 'false' then + * no message will be retrieved. This only applies to PollableChannels. + */ + virtual bool preReceive( + SmartPtrIMessageChannel& channel) = 0; + + /** + * Invoked immediately after a message has been retrieved but + * before it is returned to the caller. The message may be modified + * if necessary. This only applies to PollableChannels. + */ + virtual SmartPtrIIntMessage& postReceive( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IChannelInterceptor); + +} + +#endif /* _IntegrationContracts_ICHANNELINTERCEPTOR_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptorInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptorInstance.h new file mode 100644 index 000000000..b03ceb0f4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptorInstance.h @@ -0,0 +1,26 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ICHANNELINTERCEPTORINSTANCE_H_ +#define _IntegrationContracts_ICHANNELINTERCEPTORINSTANCE_H_ + +namespace Caf { + +struct __declspec(novtable) + IChannelInterceptorInstance : public ICafObject +{ + CAF_DECL_UUID("566C38A8-FF13-4E31-814E-A18130C009F6") + + virtual uint32 getOrder() const = 0; + + virtual bool isChannelIdMatched(const std::string& channelId) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IChannelInterceptorInstance); + +} +#endif /* _IntegrationContracts_ICHANNELINTERCEPTORINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptorSupport.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptorSupport.h new file mode 100644 index 000000000..c1d2cee1a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelInterceptorSupport.h @@ -0,0 +1,31 @@ +/* + * Created on: Jan 26, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ICHANNELINTERCEPTORSUPPORT_H_ +#define _IntegrationContracts_ICHANNELINTERCEPTORSUPPORT_H_ + + +#include "ICafObject.h" + +#include "Integration/IChannelInterceptor.h" + +namespace Caf { + +struct __declspec(novtable) +IChannelInterceptorSupport : public ICafObject { + CAF_DECL_UUID("C8F3CBAF-B1EB-4AD8-920C-EFE5EE25638A") + + typedef std::list InterceptorCollection; + virtual void setInterceptors( + const InterceptorCollection& interceptors) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IChannelInterceptorSupport); + +} + +#endif /* _IntegrationContracts_ICHANNELINTERCEPTORSUPPORT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelResolver.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelResolver.h new file mode 100644 index 000000000..279a5331e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IChannelResolver.h @@ -0,0 +1,35 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IChannelResolver_h_ +#define _IntegrationContracts_IChannelResolver_h_ + + +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageChannel.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IChannelResolver : public ICafObject +{ + CAF_DECL_UUID("32361862-a312-4cab-a978-45b7059ca102") + + virtual SmartPtrIMessageChannel resolveChannelName( + const std::string& channelName) const = 0; + + virtual SmartPtrIIntegrationObject resolveChannelNameToObject( + const std::string& channelName) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IChannelResolver); + +} + +#endif // #ifndef _IntegrationContracts_IChannelResolver_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IDocument.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IDocument.h new file mode 100644 index 000000000..01a2b8e5e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IDocument.h @@ -0,0 +1,50 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IDocument_h_ +#define _IntegrationContracts_IDocument_h_ + +namespace Caf { + +CAF_FORWARD_DECLARE_SMART_INTERFACE(IDocument); + +/// TODO - describe interface +struct __declspec(novtable) + IDocument : public ICafObject +{ + CAF_DECL_UUID("aa95ea11-3ca0-4863-b267-88d38246ff67") + +public: // Read operations + typedef std::map CAttributeCollection; + typedef std::multimap CChildCollection; + typedef std::deque COrderedChildCollection; + CAF_DECLARE_SMART_POINTER(CAttributeCollection); + CAF_DECLARE_SMART_POINTER(CChildCollection); + CAF_DECLARE_SMART_POINTER(COrderedChildCollection); + +public: // Read operations + virtual std::string findRequiredAttribute(const std::string& name) const = 0; + virtual std::string findOptionalAttribute(const std::string& name) const = 0; + virtual SmartPtrIDocument findRequiredChild(const std::string& name) const = 0; + virtual SmartPtrIDocument findOptionalChild(const std::string& name) const = 0; + virtual SmartPtrCAttributeCollection getAllAttributes() const = 0; + virtual SmartPtrCChildCollection getAllChildren() const = 0; + virtual SmartPtrCOrderedChildCollection getAllChildrenInOrder() const = 0; + virtual std::string getName() const = 0; + virtual std::string getValue() const = 0; + virtual std::string getPath() const = 0; + +public: // Save operations + virtual void saveToFile(const std::string& filename) const = 0; + virtual std::string saveToString() const = 0; + virtual std::string saveToStringRaw() const = 0; +}; + +} + +#endif // #ifndef _IntegrationContracts_IDocument_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IErrorHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IErrorHandler.h new file mode 100644 index 000000000..8905c797b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IErrorHandler.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IErrorHandler_h_ +#define _IntegrationContracts_IErrorHandler_h_ + + +#include "Integration/IIntMessage.h" +#include "Integration/IThrowable.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IErrorHandler : public ICafObject +{ + CAF_DECL_UUID("da0e8646-43fb-4d43-a31b-f736c3978d48") + +public: // Read operations + virtual void handleError( + const SmartPtrIThrowable& throwable, + const SmartPtrIIntMessage& message) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IErrorHandler); + +} + +#endif // #ifndef _IntegrationContracts_IErrorHandler_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IErrorProcessor.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IErrorProcessor.h new file mode 100644 index 000000000..337b6e35a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IErrorProcessor.h @@ -0,0 +1,31 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IErrorProcessor_h_ +#define _IntegrationContracts_IErrorProcessor_h_ + + +#include "Integration/IIntMessage.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IErrorProcessor : public ICafObject +{ + CAF_DECL_UUID("7ed3c23c-609a-4e42-9463-ed98da222d0a") + + virtual SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IErrorProcessor); + +} + +#endif // #ifndef _IntegrationContracts_IErrorProcessor_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IExpressionInvoker.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IExpressionInvoker.h new file mode 100644 index 000000000..c91c26188 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IExpressionInvoker.h @@ -0,0 +1,29 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IEXPRESSIONINVOKER_H_ +#define _IntegrationContracts_IEXPRESSIONINVOKER_H_ + + +#include "IVariant.h" +#include "Integration/IIntMessage.h" + +namespace Caf { + +struct __declspec(novtable) IExpressionInvoker : public ICafObject +{ + CAF_DECL_UUID("EF1DC19E-4DE0-416C-A7CB-D1695FF8D52A") + + virtual SmartPtrIVariant invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message) = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IExpressionInvoker); +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntMessage.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntMessage.h new file mode 100644 index 000000000..5b9324b5a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntMessage.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IIntMessage_h_ +#define _IntegrationContracts_IIntMessage_h_ + + +#include "ICafObject.h" + +#include "IVariant.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IIntMessage : public ICafObject { + CAF_DECL_UUID("c9abc77a-ebd1-4203-911f-1b37d9b17d8e") + + // + // Routines dealing with the message + // + virtual UUID getMessageId() const = 0; + + virtual std::string getMessageIdStr() const = 0; + + // + // Routines dealing with the payload + // + typedef std::map > CHeaders; + CAF_DECLARE_SMART_POINTER(CHeaders); + + virtual SmartPtrCDynamicByteArray getPayload() const = 0; + + virtual std::string getPayloadStr() const = 0; + + // + // Routines dealing with the headers + // + virtual SmartPtrCHeaders getHeaders() const = 0; + + virtual SmartPtrIVariant findOptionalHeader( + const std::string& key) const = 0; + + virtual SmartPtrIVariant findRequiredHeader( + const std::string& key) const = 0; + + virtual std::string findOptionalHeaderAsString( + const std::string& key) const = 0; + + virtual std::string findRequiredHeaderAsString( + const std::string& key) const = 0; + + virtual SmartPtrICafObject findOptionalObjectHeader( + const std::string& key) const = 0; + + virtual SmartPtrICafObject findRequiredObjectHeader( + const std::string& key) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntMessage); + +typedef std::deque CMessageCollection; +CAF_DECLARE_SMART_POINTER(CMessageCollection); + +} + +#endif // #ifndef _IntegrationContracts_IIntMessage_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationAppContext.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationAppContext.h new file mode 100644 index 000000000..db7b68a44 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationAppContext.h @@ -0,0 +1,38 @@ +/* + * Created on: Jun 13, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IINTEGRATIONAPPCONTEXT_H_ +#define _IntegrationContracts_IINTEGRATIONAPPCONTEXT_H_ + + +#include "ICafObject.h" + +#include "Integration/IIntegrationObject.h" + +namespace Caf { + +struct __declspec(novtable) IIntegrationAppContext : public ICafObject { + CAF_DECL_UUID("CC12C628-50C1-4E74-998D-3A9C961FA06F") + + virtual SmartPtrIIntegrationObject getIntegrationObject( + const std::string& id) const = 0; + + virtual void getIntegrationObject( + const IID& iid, + void **ppv) const = 0; + + typedef std::deque CObjectCollection; + CAF_DECLARE_SMART_POINTER(CObjectCollection); + + virtual SmartPtrCObjectCollection getIntegrationObjects(const IID& iid) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntegrationAppContext); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationAppContextAware.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationAppContextAware.h new file mode 100644 index 000000000..c8fa153a5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationAppContextAware.h @@ -0,0 +1,28 @@ +/* + * Created on: Jun 13, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IINTEGRATIONAPPCONTEXTAWARE_H_ +#define _IntegrationContracts_IINTEGRATIONAPPCONTEXTAWARE_H_ + + +#include "ICafObject.h" + +#include "Integration/IIntegrationAppContext.h" + +namespace Caf { + +struct __declspec(novtable) IIntegrationAppContextAware : public ICafObject { + CAF_DECL_UUID("9BC34EB5-AEFF-4384-86DE-421DE89AB6E8") + + virtual void setIntegrationAppContext( + SmartPtrIIntegrationAppContext context) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntegrationAppContextAware); +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationComponent.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationComponent.h new file mode 100644 index 000000000..18867421b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationComponent.h @@ -0,0 +1,35 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IIntegrationComponent_h_ +#define _IntegrationContracts_IIntegrationComponent_h_ + + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IIntegrationComponent : public ICafObject +{ + CAF_DECL_UUID("087e1494-4abe-4bb6-ae49-48f4510e057f") + + virtual bool isResponsible( + const SmartPtrIDocument& configSection) const = 0; + + virtual SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntegrationComponent); + +} + +#endif // #ifndef _IntegrationContracts_IIntegrationComponent_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationComponentInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationComponentInstance.h new file mode 100644 index 000000000..6e5d675d2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationComponentInstance.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IIntegrationComponentInstance_h_ +#define _IntegrationContracts_IIntegrationComponentInstance_h_ + + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IIntegrationComponentInstance : public ICafObject +{ + CAF_DECL_UUID("70053165-1e46-4893-8e27-0e6ee8675c44") + + virtual void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntegrationComponentInstance); + +} + +#endif // #ifndef _IntegrationContracts_IIntegrationComponent_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationObject.h new file mode 100644 index 000000000..54b846336 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IIntegrationObject.h @@ -0,0 +1,38 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IIntegrationObject_h_ +#define _IntegrationContracts_IIntegrationObject_h_ + + +#include "Integration/IDocument.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IIntegrationObject : public ICafObject +{ + CAF_DECL_UUID("295fa2c8-01a7-4102-b13e-8fcac00b3e5f") + + virtual void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) = 0; + + virtual std::string getId() const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IIntegrationObject); + +typedef std::map CIntegrationObjectCollection; +CAF_DECLARE_SMART_POINTER(CIntegrationObjectCollection); + +} + +#endif // #ifndef _IntegrationContracts_IIntegrationObject_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ILifecycle.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ILifecycle.h new file mode 100644 index 000000000..74c930ed0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ILifecycle.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ILifecycle_h_ +#define _IntegrationContracts_ILifecycle_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + ILifecycle : public ICafObject +{ + CAF_DECL_UUID("180845f8-c956-46b3-8a1b-ef5061cc927a") + + virtual void start(const uint32 timeoutMs) = 0; + virtual void stop(const uint32 timeoutMs) = 0; + virtual bool isRunning() const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(ILifecycle); + +} + +#endif // #ifndef _IntegrationContracts_ILifecycle_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageChannel.h new file mode 100644 index 000000000..35b75e288 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageChannel.h @@ -0,0 +1,35 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageChannel_h_ +#define _IntegrationContracts_IMessageChannel_h_ + + +#include "Integration/IIntMessage.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageChannel : public ICafObject +{ + CAF_DECL_UUID("d5192d01-9c26-4c1c-8966-66d7a108bcbf") + + virtual bool send( + const SmartPtrIIntMessage& message) = 0; + + virtual bool send( + const SmartPtrIIntMessage& message, + const int32 timeout) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageChannel); + +} + +#endif // #ifndef _IntegrationContracts_IMessageChannel_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageDispatcher.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageDispatcher.h new file mode 100644 index 000000000..5e4d35afe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageDispatcher.h @@ -0,0 +1,38 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageDispatcher_h_ +#define _IntegrationContracts_IMessageDispatcher_h_ + + +#include "Integration/IIntMessage.h" +#include "Integration/IMessageHandler.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageDispatcher : public ICafObject +{ + CAF_DECL_UUID("639d8ead-6406-4c41-9a36-74d065f5dd6b") + + virtual void addHandler( + const SmartPtrIMessageHandler& messageHandler) = 0; + + virtual void removeHandler( + const SmartPtrIMessageHandler& messageHandler) = 0; + + virtual bool dispatch( + const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageDispatcher); + +} + +#endif // #ifndef _IntegrationContracts_IMessageDispatcher_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageHandler.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageHandler.h new file mode 100644 index 000000000..240e3c417 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageHandler.h @@ -0,0 +1,35 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageHandler_h_ +#define _IntegrationContracts_IMessageHandler_h_ + + +#include "Integration/IIntMessage.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageHandler : public ICafObject +{ + CAF_DECL_UUID("39a78b6f-f326-4739-b8ad-9e90a827745a") + + virtual void handleMessage( + const SmartPtrIIntMessage& message) = 0; + + virtual SmartPtrIIntMessage getSavedMessage() const = 0; + + virtual void clearSavedMessage() = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageHandler); + +} + +#endif // #ifndef _IntegrationContracts_IMessageHandler_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageProcessor.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageProcessor.h new file mode 100644 index 000000000..345605ed5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageProcessor.h @@ -0,0 +1,31 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageProcessor_h_ +#define _IntegrationContracts_IMessageProcessor_h_ + + +#include "Integration/IIntMessage.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageProcessor : public ICafObject +{ + CAF_DECL_UUID("68770787-c44e-457e-bf8d-20c64d37bfee") + + virtual SmartPtrIIntMessage processMessage( + const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageProcessor); + +} + +#endif // #ifndef _IntegrationContracts_IMessageProcessor_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageProducer.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageProducer.h new file mode 100644 index 000000000..8775135b3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageProducer.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageProducer_h_ +#define _IntegrationContracts_IMessageProducer_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageProducer : public ICafObject +{ + CAF_DECL_UUID("14430bc5-8556-48f8-b37f-c2f24a50d8dd") + + virtual bool isMessageProducer() const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageProducer); + +} + +#endif // #ifndef _IntegrationContracts_IMessageProducer_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageRouter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageRouter.h new file mode 100644 index 000000000..1db505f6e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageRouter.h @@ -0,0 +1,30 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageRouter_h_ +#define _IntegrationContracts_IMessageRouter_h_ + + +#include "Integration/IIntMessage.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageRouter : public ICafObject +{ + CAF_DECL_UUID("27ed0739-e527-469b-882f-196d532be0bd") + + virtual void routeMessage(const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageRouter); + +} + +#endif // #ifndef _IntegrationContracts_IMessageRouter_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageSplitter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageSplitter.h new file mode 100644 index 000000000..e32a8e76a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IMessageSplitter.h @@ -0,0 +1,34 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IMessageSplitter_h_ +#define _IntegrationContracts_IMessageSplitter_h_ + + +#include "Integration/IIntMessage.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IMessageSplitter : public ICafObject +{ + CAF_DECL_UUID("89a25ba3-113d-4efc-af46-522feda304ac") + + typedef std::deque CMessageCollection; + CAF_DECLARE_SMART_POINTER(CMessageCollection); + + virtual SmartPtrCMessageCollection splitMessage( + const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IMessageSplitter); + +} + +#endif // #ifndef _IntegrationContracts_IMessageSplitter_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IPhased.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IPhased.h new file mode 100644 index 000000000..b8fea1669 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IPhased.h @@ -0,0 +1,25 @@ +/* + * Created on: Aug 6, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IPhased_h +#define _IntegrationContracts_IPhased_h + + +#include "ICafObject.h" + +namespace Caf { + +struct __declspec(novtable) IPhased : public ICafObject { + CAF_DECL_UUID("CAE354D0-E212-4030-8CB7-23C92D59C6A3") + + virtual int32 getPhase() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(IPhased); + +}; + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IPollableChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IPollableChannel.h new file mode 100644 index 000000000..92cd2b216 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IPollableChannel.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IPollableChannel_h_ +#define _IntegrationContracts_IPollableChannel_h_ + + +#include "Integration/Dependencies/CPollerMetadata.h" +#include "Integration/IIntMessage.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IPollableChannel : public ICafObject +{ + CAF_DECL_UUID("a7ce8841-f37d-489a-a299-e148c5ff6b11") + + virtual SmartPtrIIntMessage receive() = 0; + virtual SmartPtrIIntMessage receive(const int32 timeout) = 0; + virtual SmartPtrCPollerMetadata getPollerMetadata() const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IPollableChannel); + +} + +#endif // #ifndef _IntegrationContracts_IPollableChannel_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IRunnable.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IRunnable.h new file mode 100644 index 000000000..f857a51a6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IRunnable.h @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_IRunnable_h_ +#define _IntegrationContracts_IRunnable_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + IRunnable : public ICafObject +{ + CAF_DECL_UUID("a3ad671c-3d04-4eba-aaa4-8dcc9c43c959") + + virtual void run() = 0; + virtual void cancel() = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IRunnable); + +} + +#endif // #ifndef _IntegrationContracts_IRunnable_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ISmartLifecycle.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ISmartLifecycle.h new file mode 100644 index 000000000..ada080173 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ISmartLifecycle.h @@ -0,0 +1,25 @@ +/* + * Created on: Aug 6, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ISmartLifecycle_h +#define _IntegrationContracts_ISmartLifecycle_h + + +#include "Integration/ILifecycle.h" + +namespace Caf { + +struct __declspec(novtable) ISmartLifecycle : public ILifecycle { + CAF_DECL_UUID("312B7430-659F-48A1-AAAE-AE44D349132C") + + virtual bool isAutoStartup() const = 0; +}; +CAF_DECLARE_SMART_INTERFACE_POINTER(ISmartLifecycle); + +}; + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ISubscribableChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ISubscribableChannel.h new file mode 100644 index 000000000..a846fcc39 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ISubscribableChannel.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ISubscribableChannel_h_ +#define _IntegrationContracts_ISubscribableChannel_h_ + + +#include "Integration/IMessageHandler.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + ISubscribableChannel : public ICafObject +{ + CAF_DECL_UUID("14d7e980-1b98-4453-b27e-8c058fb705b9") + + virtual void subscribe( + const SmartPtrIMessageHandler& messageHandler) = 0; + virtual void unsubscribe( + const SmartPtrIMessageHandler& messageHandler) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(ISubscribableChannel); + +} + +#endif // #ifndef _IntegrationContracts_ISubscribableChannel_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ITaskExecutor.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ITaskExecutor.h new file mode 100644 index 000000000..e13163f4b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ITaskExecutor.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ITaskExecutor_h_ +#define _IntegrationContracts_ITaskExecutor_h_ + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + ITaskExecutor : public ICafObject +{ + CAF_DECL_UUID("4ab38314-fd31-49fc-bfce-173abc53f1a8") + + typedef enum { + ETaskStateNotStarted, + ETaskStateStarted, + ETaskStateStopping, + ETaskStateFinished, + ETaskStateFailed + } ETaskState; + + virtual void execute(const uint32 timeoutMs) = 0; + virtual void cancel(const uint32 timeoutMs) = 0; + virtual ETaskState getState() const = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(ITaskExecutor); + +} + +#endif // #ifndef _IntegrationContracts_ITaskExecutor_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IThrowable.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IThrowable.h new file mode 100644 index 000000000..9e5d8d529 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/IThrowable.h @@ -0,0 +1,35 @@ +/* + * Author: bwilliams + * Created: Oct. 25, 2011 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _FxContracts_IThrowable_h_ +#define _FxContracts_IThrowable_h_ + + +#include "ICafObject.h" + +namespace Caf { + +CAF_FORWARD_DECLARE_SMART_INTERFACE(IThrowable); + +/// TODO - describe interface +struct __declspec(novtable) +IThrowable : public ICafObject { + CAF_DECL_UUID("5bced55d-06b7-4c4b-b805-90b51311dc9b") + + virtual std::string getExceptionClassName() const = 0; + virtual std::string getMsg() const = 0; + virtual std::string getClassName() const = 0; + virtual std::string getFuncName() const = 0; + virtual HRESULT getError() const = 0; + virtual std::string getFullMsg() const = 0; +}; + +} + +#endif + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ITransformer.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ITransformer.h new file mode 100644 index 000000000..59cf86afc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Integration/ITransformer.h @@ -0,0 +1,31 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IntegrationContracts_ITransformer_h_ +#define _IntegrationContracts_ITransformer_h_ + + +#include "Integration/IIntMessage.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) + ITransformer : public ICafObject +{ + CAF_DECL_UUID("1f2a6ecb-f842-4e09-82a8-89eaf64ec98b") + + virtual SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(ITransformer); + +} + +#endif // #ifndef _IntegrationContracts_ITransformer_h_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/DynamicArrayInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/DynamicArrayInc.h new file mode 100644 index 000000000..a8d3207fd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/DynamicArrayInc.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////////////////// +// +// Author: Michael Donahue +// +// Created: 05/03/2004 +// +// Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef DynamicArrayInc_h_ +#define DynamicArrayInc_h_ + +#include "Memory/DynamicArray/SDynamicArrayMallocAllocator.h" + +namespace Caf { + +template +class TDynamicArray; + +template +class TCharAdapter; + +template +class TWCharAdapter; + +template +class TByteAdapter; + +typedef TDynamicArray CDynamicByteArray; +typedef TCharAdapter > > CDynamicCharArray; +typedef TWCharAdapter > > CDynamicWCharArray; + +} + +#include "Memory/DynamicArray/TDynamicArray.h" +#include "Memory/DynamicArray/TByteAdapter.h" +#include "Memory/DynamicArray/TCharAdapter.h" +#include "Memory/DynamicArray/TWCharAdapter.h" + +namespace Caf { + +CAF_DECLARE_SMART_POINTER(CDynamicByteArray); +CAF_DECLARE_SMART_POINTER(CDynamicCharArray); +CAF_DECLARE_SMART_POINTER(CDynamicWCharArray); + +} + +#endif // #ifdef DynamicArrayInc_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/SDynamicArrayMallocAllocator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/SDynamicArrayMallocAllocator.h new file mode 100644 index 000000000..4bdeecd22 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/SDynamicArrayMallocAllocator.h @@ -0,0 +1,29 @@ +/* + * Author: mdonahue + * Created: Feb 15, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef SDYNAMICARRAYMALLOCALLOCATOR_H_ +#define SDYNAMICARRAYMALLOCALLOCATOR_H_ + +namespace Caf { + +struct SDynamicArrayMallocAllocator { + static void* allocMemory( const uint32 cdwAllocSize ) + { + return ::malloc( cdwAllocSize ); + } + + static void freeMemory( void* pvFree ) + { + if ( NULL != pvFree ) + { + ::free( pvFree ); + } + } +}; +} + +#endif /* SDYNAMICARRAYMALLOCALLOCATOR_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TByteAdapter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TByteAdapter.h new file mode 100644 index 000000000..55c55cb78 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TByteAdapter.h @@ -0,0 +1,104 @@ +////////////////////////////////////////////////////////////////////////////// +// +// $Workfile: TByteAdapter.h $ +// +// Author: Phil Smith +// +// Purpose: This template provides the ability to use a ${TDynamicArray} +// or a TStaticArray where a byte pointer is required. It +// provides a const byte* pointer conversion operator for use +// when read only access is required and a function to get the +// pointer for write access. Use the byte adapter as follows: +// TByteAdapter > +// +// Predefined character array objects CEcmCharArray and +// CEcmWCharArray which use the byte adapter have been provided +// in EcmCommonStaticMinDepInc.h. +// +// Created: Tuesday, August 20, 2002 10:00:00 AM +// +// Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +// Modification History: +// +// $Log: //wpbuild01/PvcsData/ECM_40/archives/ECM_41/WinNT/Source/CommonAgtCol/Cpp/EcmCommonStaticMinDep/TByteAdapter.h-arc $ +// +// Rev 1.4 17 Sep 2003 09:43:12 Michael.Donahue +// Implemented hooks for new library model +// +// Rev 1.3 31 Oct 2002 13:58:02 Greg.Burk +// Modified as per code review recomendations. +// +// Rev 1.2 15 Oct 2002 17:22:58 Phillip.Smith +// Documentation updates. +// +// Rev 1.0 09 Oct 2002 13:42:12 brian.williams +// Initial revision. +// +////////////////////////////////////////////////////////////////////////////// +#ifndef _TByteAdapter_H_ +#define _TByteAdapter_H_ + +namespace Caf { + +template +class TByteAdapter : public T +{ +public: + ////////////////////////////////////////////////////////////////////////// + // Default Constructor + ////////////////////////////////////////////////////////////////////////// + TByteAdapter(const wchar_t * pwszDesc = NULL) {} + + ////////////////////////////////////////////////////////////////////////// + // Destructor + ////////////////////////////////////////////////////////////////////////// + ~TByteAdapter() {} + + ////////////////////////////////////////////////////////////////////////// + // GetNonConstBytePtr + // + // Get non-const pointer to internal data converted to btye *. + // This function should be used only when you must get a pointer that is + // to be written to, and you should always call the ${TDynamicArray::Verify()} + // function after modifying the data pointed to by this pointer or passing + // the pointer to a function that modifies the data pointed to by this + // pointer. + ////////////////////////////////////////////////////////////////////////// + byte * getNonConstBytePtr() + { + this->verify(); + return reinterpret_cast(this->getNonConstPtr()); + } + + ////////////////////////////////////////////////////////////////////////// + // GetBytePtr + // + // Get const pointer to internal data converted to btye *. + ////////////////////////////////////////////////////////////////////////// + const byte * getBytePtr() const + { + this->verify(); + return reinterpret_cast(this->getPtr()); + } + + ////////////////////////////////////////////////////////////////////////// + // const byte Conversion Operator + // + // Get const pointer to internal data converted to btye *. + ////////////////////////////////////////////////////////////////////////// + operator const byte * () const + { + this->verify(); + return reinterpret_cast(this->getPtr()); + } + +private: + TByteAdapter(const TByteAdapter & crRhs); + TByteAdapter & operator=(const TByteAdapter & crRhs); +}; + +} + +#endif // _TByteAdapter_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TCharAdapter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TCharAdapter.h new file mode 100644 index 000000000..3e76e0b2c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TCharAdapter.h @@ -0,0 +1,401 @@ +////////////////////////////////////////////////////////////////////////////// +// +// $Workfile: TCharAdapter.h $ +// +// Author: Greg Burk +// +// Purpose: This template provides an adapter for TDynamicArray (or +// other types of "safe" array classes) that exposes functions +// that are useful when working with an array of type char. +// +// A typedef of this class is already defined and should be +// used instead of explicitly using this class. The typedef +// is CEcmCharArray. +// +// Created: Friday, October 18, 2002 1:50:32 PM +// +// Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +// Modification History: +// +// $Log: //wpbuild01/PvcsData/ECM_40/archives/ECM_41/WinNT/Source/CommonAgtCol/Cpp/EcmCommonStaticMinDep/TCharAdapter.h-arc $ +// +// Rev 1.3 10 Oct 2003 08:49:24 Michael.Donahue +// Fixed bug in StrCpy +// +// Rev 1.2 17 Sep 2003 09:43:12 Michael.Donahue +// Implemented hooks for new library model +// +// Rev 1.1 16 Jan 2003 11:17:52 Greg.Burk +// Made changes necessary to accomodate new CEcmBasicString class and changes to CEcmString. +// +// Rev 1.0 31 Oct 2002 10:43:06 Greg.Burk +// Initial Revision +// +////////////////////////////////////////////////////////////////////////////// +#ifndef _TCharAdapter_H_ +#define _TCharAdapter_H_ + +#include + +namespace Caf { + +template +class TCharAdapter : public T +{ +public: + ////////////////////////////////////////////////////////////////////////// + // Default Constructor + ////////////////////////////////////////////////////////////////////////// + TCharAdapter() {} + + ////////////////////////////////////////////////////////////////////////// + // Conversion Constructor + ////////////////////////////////////////////////////////////////////////// + TCharAdapter(const wchar_t * rhs) + { + wideToMultiByte(rhs); + } + + ////////////////////////////////////////////////////////////////////////// + // Conversion Constructor + ////////////////////////////////////////////////////////////////////////// + TCharAdapter(const char * rhs) + { + (*this) = rhs; + } + + ////////////////////////////////////////////////////////////////////////// + // Destructor + ////////////////////////////////////////////////////////////////////////// + ~TCharAdapter() {} + + ////////////////////////////////////////////////////////////////////////// + // Assignment operator + ////////////////////////////////////////////////////////////////////////// + TCharAdapter& operator=(const wchar_t * rhs) + { + wideToMultiByte(rhs); + return *this; + } + + ////////////////////////////////////////////////////////////////////////// + // Assignment operator + ////////////////////////////////////////////////////////////////////////// + TCharAdapter& operator=(const char * rhs) + { + const uint32 culLength = ::strlen(rhs); + + if(culLength > 0) + { + this->allocateELements(culLength); + strnCpy(rhs, culLength); + } + + return *this; + } + + ////////////////////////////////////////////////////////////////////////////// + // MakeLower() + // + // Converts all of the upper-case characters in this string to lower-case. + ////////////////////////////////////////////////////////////////////////////// + void makeLower() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->IsNull()) + { + strlwr(this->m_ptData); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // MakeUpper + // + // Converts all of the lower-case characters in this array to upper-case. + ////////////////////////////////////////////////////////////////////////// + void makeUpper() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->isNull()) + { + strupr(this->m_ptData); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // Reverse + // + // Reverses the characters in the array. + ////////////////////////////////////////////////////////////////////////// + void reverse() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->isNull()) + { + strrev( this->m_ptData ); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // StrLen + // + // Return the length of the string. + ////////////////////////////////////////////////////////////////////////// + size_t strLen() const + { + size_t stRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Delegate to CEcmCtr. + stRetVal = ::strlen(this->m_ptData); + + // Post-validation. + this->verifyLength(static_cast(stRetVal)); + + return stRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // StrCpy + // + // Make a copy of the string into the buffer. + ////////////////////////////////////////////////////////////////////////// + TCharAdapter & strCpy(const char * cpszSource) + { + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Get the length of the source string. + uint32 dwSourceLength = ::strlen(cpszSource); + + // Make sure the string will fit if we copy it. + this->verifyLength(dwSourceLength); + + // Copy the string into the buffer. + ::strcpy(this->m_ptData, cpszSource); + + // Post-validation. + this->verifySentinal(); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // StrnCpy + // + // Make a copy of the string into the buffer upto culCount characters. + ////////////////////////////////////////////////////////////////////////// + TCharAdapter & strnCpy(const char * cpszSource, const uint32 culCount) + { + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Make sure the string will fit if we copy it. + this->verifyLength(culCount); + + // Copy the string into the buffer. + ::strncpy(this->m_ptData, cpszSource, culCount); + + // Post-validation. + this->verifySentinal(); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // StrStr + // + // Find the substring cpszSubString in the array. Returns the pointer to + // the first occurance of the substring in the array or NULL if the + // substring is not found. + ////////////////////////////////////////////////////////////////////////// + const char * strStr(const char * cpszSubString) const + { + const char * cpszRetVal = NULL; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Find the substring. + cpszRetVal = ::strstr(this->m_ptData, cpszSubString); + + // Post-validation. + this->verifySentinal(); + + return cpszRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // StrCmp + // + // Compare the cpszString to this array. + ////////////////////////////////////////////////////////////////////////// + int32 strCmp(const char * cpszString) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + iRetVal = ::strcmp(this->m_ptData, cpszString); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // StriCmp + // + // Compare the cpszString to this array (case insensitive). + ////////////////////////////////////////////////////////////////////////// + int32 striCmp(const char * cpszString) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + iRetVal = stricmp(this->m_ptData, cpszString); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // StrnCmp + // + // Compare the cpszString to this array up to culCount characters. + ////////////////////////////////////////////////////////////////////////// + int32 strnCmp(const char * cpszString, const uint32 culCount) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->erifySentinal(); + this->verifyNotNull(); + + // Make sure the comparison can take place with in our array bounds. + this->verifyLength(culCount); + + // Compare the strings. + iRetVal = strncmp(this->m_ptData, cpszString, culCount); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // StrChr + // + // Find the first occurrence of the specified character in the string. + ////////////////////////////////////////////////////////////////////////// + const char * strChr(char cCharacter) const + { + const char * cpszRetVal = 0; + + // Pre-validation. + this->erifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + cpszRetVal = ::strchr(this->m_ptData, cCharacter); + + return cpszRetVal; + } + +private: + void wideToMultiByte(const wchar_t* cpwszSource) + { + // Calculate the length of the source. + const uint32 cdwSourceLen = cpwszSource ? ::wcslen( cpwszSource ) : 0; + + // Convert the wide strings to multibyte. + if( cdwSourceLen > 0 ) + { + // This appears to be allocating twice as much memory as is needed, but + // this is the way W2A is implemented and W2A seems to convert some + // strings that will not convert where the destination is the same + // length (in characters) as the source. + this->allocateElements( cdwSourceLen * sizeof( wchar_t ) ); + + int32 iRet; +#ifdef WIN32 + iRet = ::WideCharToMultiByte( + CP_ACP, + 0, + cpwszSource, + -1, + GetNonConstPtr(), + GetLength(), + NULL, + NULL ); +#else + iRet = ::wcstombs( this->getNonConstPtr(), + cpwszSource, + this->getByteCount() ); + // wcstombs returns -1 for error or the length + // not including the NULL, so we must increment + // to match the windows version + iRet++; +#endif + + if( 0 == iRet ) + { + this->freeArray(); + } + else + { + // + // Must ReAllocate in order to have the proper char length + // The char array was allocated based on wchar_t + // + // no need to include the NULL terminator + // returned by WideCharToMultiByte() + // + this->rellocateElements( iRet - 1 ); + } + } + else if( cpwszSource != NULL ) + { + // This chunk of code is important. If the source + // string is empty, return an empty string, not + // a NULL pointer! + this->allocateElements(0); + } + + // Verify array. + this->verifySentinal(); + } + +private: + TCharAdapter(const TCharAdapter & crRhs); + TCharAdapter & operator=(const TCharAdapter & crRhs); +}; + +} + +#endif // _TCharAdapter_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TDynamicArray.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TDynamicArray.h new file mode 100644 index 000000000..5683bab2d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TDynamicArray.h @@ -0,0 +1,1088 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Author: Greg Burk +// +// Purpose: This template provides a way to create an array that has +// certain safety features that help solve some of the problems +// often created by arrays in C++. You can create an array of +// any type. The safety features of this class include array +// bounds checking (indexes out of range), automatic +// initialization, and automatic destruction. It also provides +// some features to check the integrity of the array. This is +// especially useful when you get and pass the raw pointer to +// the array into a third party function (i.e. Windows API). +// +// The ${TDynamicArray::verify()} function is used for this +// purpose. It does two primary things: +// +// 1) When the array is allocated, some extra space is allocated +// for some sentinel bytes. These bytes are checked to make +// sure they are still intact when verify() is called. +// +// 2) When the array is allocated, the address of the memory +// that was allocated is stored and is XORed with a known +// bit pattern and the result is also stored. When verify() +// is called, this pattern is XORed again with the address +// and the result should be the original pattern. +// +// If either of the above checks fails, an exception is thrown. +// The primary weakness of this strategy is that the call to +// verify() is left up to the user. If the raw pointer is passed +// and something gets messed up, if verify() was not called, the +// problem won't be discovered until the next time a function +// that calls verify() (most do) is called. This will cause us +// to loose the context in which the problem occurred. +// +// Created: Wednesday, August 07, 2002 2:27:39 PM +// +// Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +////////////////////////////////////////////////////////////////////////////// +#ifndef _TDynamicArray_H_ +#define _TDynamicArray_H_ + +#include +#include "Exception/CCafException.h" + +namespace Caf { + +////////////////////////////////////////////////////////////////////////////// +// Define sentinel bit pattern. +////////////////////////////////////////////////////////////////////////////// +#ifdef __x86_64__ +static const uint64 gs_ulDynamicArraySentinelBitPattern = (0xAAAAAAAAAAAAAAAA); +#else +static const uint32 gs_ulDynamicArraySentinelBitPattern = (0xAAAAAAAA); +#endif +static const uint32 gs_ulDynamicArraySentinelElementCount = (3); + +template +class TDynamicArray { +public: + typedef T Type; + + ////////////////////////////////////////////////////////////////////////// + // Default Constructor + ////////////////////////////////////////////////////////////////////////// + TDynamicArray() : + CAF_CM_INIT("TDynamicArray"), + _sentinelBits(gs_ulDynamicArraySentinelBitPattern), + _isSentinelSet(false), + _elementCount(0), + _elementIndex(0), + _byteCount(0), + _data(NULL) { + // Initialize the sentinel buffers. + ::memset(_sentinelBytes, 0, sizeof(_sentinelBytes)); + } + + ////////////////////////////////////////////////////////////////////////// + // Destructor + ////////////////////////////////////////////////////////////////////////// + virtual ~TDynamicArray() { + CAF_CM_FUNCNAME("~TDynamicArray"); + try { + freeArray(); + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; + } + + ////////////////////////////////////////////////////////////////////////// + // PutDescription + // + // Assign description to object instance. + ////////////////////////////////////////////////////////////////////////// + void putDescription(const char * pszDesc) { + CAF_CM_FUNCNAME_VALIDATE("putDescription"); + CAF_CM_VALIDATE_STRINGPTRA(pszDesc); + _description = pszDesc; + } + + ////////////////////////////////////////////////////////////////////////// + // GetPtr + // + // Get const pointer to internal data + ////////////////////////////////////////////////////////////////////////// + const T * getPtr() const { + // Pre-validation. + verifySentinel(); + + // Get pointer. + const T * rc = _data; + + return rc; + } + + ////////////////////////////////////////////////////////////////////////// + // GetNonConstPtr + // + // Get non-const pointer to internal data. This function should be used + // only when you must get a pointer that is to be written to, and you + // should always call the ${TDynamicArray::verify()} function after modifying the data + // pointed to by this pointer or passing the pointer to a function that + // modifies the data pointed to by this pointer. + ////////////////////////////////////////////////////////////////////////// + T * getNonConstPtr() { + // Pre-validation. + verifySentinel(); + + // Get pointer. + T * rc = _data; + + return rc; + } + + ////////////////////////////////////////////////////////////////////////// + // const Conversion Operator + ////////////////////////////////////////////////////////////////////////// + operator const T *() const { + // Pre-validation. + verifySentinel(); + + // Get pointer. + const T * rc = _data; + + return rc; + } + + ////////////////////////////////////////////////////////////////////////// + // GetPtrAt + // + // Returns a const pointer to the internal array at a given index + ////////////////////////////////////////////////////////////////////////// + const T * getPtrAt(const uint32 elementIndex) const { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + verifyElementCount(elementIndex); + + // Get the pointer at the index specified. + const T * rc = &_data[elementIndex]; + + return rc; + } + + ////////////////////////////////////////////////////////////////////////// + // GetNonConstPtrAt + // + // Returns a non-const pointer to the internal array at a given index. + // This function should be used only when you must get a pointer that is + // to be written to, and you should always call the ${TDynamicArray::verify()} + // function after modifying the data pointed to by this pointer or passing + // the pointer to a function that modifies the data pointed to by this + // pointer. + ////////////////////////////////////////////////////////////////////////// + T * getNonConstPtrAt(const uint32 elementIndex) { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + verifyElementCount(elementIndex); + + // Get the pointer at the index specified. + T * rc = &_data[elementIndex]; + + return rc; + } + + ////////////////////////////////////////////////////////////////////////// + // GetAt + // + // Returns the array element at a given index + ////////////////////////////////////////////////////////////////////////// + T getAt(const uint32 elementIndex) const { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + verifyElementCount(elementIndex); + + // Get the pointer at the index specified. + T tRetVal = _data[elementIndex]; + + return tRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // getPtrAtCurrentPos + // + // Returns a const pointer to the internal array at the current position. + ////////////////////////////////////////////////////////////////////////// + const T * getPtrAtCurrentPos() const { + return getPtrAt(_elementIndex); + } + + ////////////////////////////////////////////////////////////////////////// + // getNonConstPtrAtCurrentPos + // + // Returns a non-const pointer to the internal array at the current position. + // This function should be used only when you must get a pointer that is + // to be written to, and you should always call the ${TDynamicArray::verify()} + // function after modifying the data pointed to by this pointer or passing + // the pointer to a function that modifies the data pointed to by this + // pointer. + ////////////////////////////////////////////////////////////////////////// + T * getNonConstPtrAtCurrentPos() { + return getNonConstPtrAt(_elementIndex); + } + + ////////////////////////////////////////////////////////////////////////// + // GetAtCurrentPos + // + // Returns the array element at the current position + ////////////////////////////////////////////////////////////////////////// + T getAtCurrentPos() const { + return getAt(_elementIndex); + } + + ////////////////////////////////////////////////////////////////////////// + // SetAt + // + // Sets the array element at a given index + ////////////////////////////////////////////////////////////////////////// + void setAt( + const uint32 elementIndex, + const T value) { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + verifyElementCount(elementIndex); + + // Set the pointer at the index specified. + _data[elementIndex] = value; + } + + ////////////////////////////////////////////////////////////////////////// + // getElementCount + // + // Returns the number of array elements. + ////////////////////////////////////////////////////////////////////////// + uint32 getElementCount() const { + return _elementCount; + } + + ////////////////////////////////////////////////////////////////////////// + // getByteCount + // + // Returns the size of the array in bytes. + ////////////////////////////////////////////////////////////////////////// + uint32 getByteCount() const { + return _byteCount; + } + + ////////////////////////////////////////////////////////////////////////// + // getByteCountSize + // + // Returns the size of the array in bytes. + ////////////////////////////////////////////////////////////////////////// + size_t getByteCountSize() const { + return static_cast(_byteCount); + } + + ////////////////////////////////////////////////////////////////////////// + // IsNull + // + // Returns true if the pointer to the internal array is null or false if + // the array is not null + ////////////////////////////////////////////////////////////////////////// + bool isNull() const { + return ((NULL == _data) ? true : false); + } + + ////////////////////////////////////////////////////////////////////////// + // verify + // + // Verifies that the array is still properly bound and in good shape. + ////////////////////////////////////////////////////////////////////////// + void verify() const { + // verify. + verifySentinel(); + } + + ////////////////////////////////////////////////////////////////////////// + // Allocate + // + // Allocates a new array on the heap (elementCount = number of elements) + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & allocateElements(const uint32 elementCount) { + // Free the previous array if it exists. + freeArray(); + + // Call internal allocation function to actually allocate the + // array buffer. + internalAllocate(elementCount); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // AllocateBytes + // + // Allocates a new array on the heap. + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & allocateBytes(const size_t byteCount) { + return allocateBytes(static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // AllocateBytes + // + // Allocates a new array on the heap. + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & allocateBytes(const uint32 byteCount) { + // Calculate actual number of array elements to allocate based on + // the byte length. + const uint32 elementCount = byteCountToElementCount(byteCount); + + // Delegate to Allocate(). + allocateElements(elementCount); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // ReAllocate + // + // Reallocates a array on the heap, keeping original contents. + // culLength = number of elements + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & reallocateElements(const uint32 elementCount) { + CAF_CM_FUNCNAME("reallocateElements"); + + // Declare variables to hold copy of original information. + uint32 origElementIndex = 0; + uint32 origByteCount = 0; + T * origData = NULL; + + try { + // Pre-validation. + verifySentinel(); + + // Create a temporary copy of the original buffer and length. + origElementIndex = _elementIndex; + origByteCount = _byteCount; + origData = _data; + + // Reset the data pointer, length, and byte length. + _data = NULL; + _elementCount = 0; + _elementIndex = 0; + _byteCount = 0; + + // Reset the sentinel set flag. + _isSentinelSet = false; + + // Call internal allocation function to actually allocate the + // array buffer. + internalAllocate(elementCount); + + // Copy the original into the new if it exists. + if((origData != NULL) && (origByteCount > 0)) { + // Calculate the number of bytes to copy. + const uint32 bytesToCopy = + (_byteCount < origByteCount) ? _byteCount : origByteCount; + + // Copy the bytes. + ::memcpy(_data, origData, bytesToCopy); + + const uint32 elementsToCopy = byteCountToElementCount(bytesToCopy); + _elementIndex = + (elementsToCopy < origElementIndex) ? elementsToCopy : origElementIndex; + } + + // verify the sentinel bytes. + verifySentinel(); + } + CAF_CM_CATCH_ALL; + + // Delete the original buffer if non-null. + if (origData) { + Allocator::freeMemory(origData); + } + + CAF_CM_THROWEXCEPTION; + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // Grow + // + // Increases the size of the array by the length + // (number of elements) supplied + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & grow(const uint32 elementCount) { + reallocateElements(_elementCount + elementCount); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // ReAllocateBytes + // + // Reallocates a array on the heap, keeping original contents. + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & reallocateBytes(const size_t byteCount) { + return reallocateBytes(static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // ReAllocateBytes + // + // Reallocates a array on the heap, keeping original contents. + ////////////////////////////////////////////////////////////////////////// + TDynamicArray & reallocateBytes(const uint32 byteCount) { + // Calculate actual number of array elements to allocate based + // on the byte length. + const uint32 elementCount = byteCountToElementCount(byteCount); + + // Delegate to ReAllocate() function. + reallocateElements(elementCount); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // Free + // + // Frees the memory for the array. + ////////////////////////////////////////////////////////////////////////// + void freeArray() { + // Free the buffer if it exists. + if (_data) { + verifySentinel(); + + // Zeroize the buffer for cryptographic purposes + ::memset(_data, 0, _byteCount); + + Allocator::freeMemory(_data); + _data = NULL; + + // Reset to initial value. + _sentinelBits = gs_ulDynamicArraySentinelBitPattern; + } + + // Reset the length and byte length. + _elementCount = 0; + _elementIndex = 0; + _byteCount = 0; + + // Reset the sentinel set flag. + _isSentinelSet = false; + } + + ////////////////////////////////////////////////////////////////////////// + // ArrayCpy + // + // Copies the array entries from crArray into this array. + ////////////////////////////////////////////////////////////////////////// + void arrayCpy(const TDynamicArray & crArray) { + // Make sure reference is not to this. + if (this != &crArray) { + // Pre-validation. + verifyNotNull(); + verifyByteCount(crArray.getByteCount()); + verifySentinel(); + crArray.verifySentinel(); + + // Reinitialize this array. + memSet(); + + // Copy the array. + memcpy(_data, crArray.getPtr(), crArray.getByteCount()); + + // Post-validation. + verifySentinel(); + } + } + + ////////////////////////////////////////////////////////////////////////// + // ArrayCmp + // + // Compare this array with crArray. Compares the entire array, so arrays + // must be equal size to evaluate to equal. + ////////////////////////////////////////////////////////////////////////// + int32 arrayCmp(const TDynamicArray & crArray) const { + int32 iRetVal = 0; + + // Make sure reference is not to this. + if (this != &crArray) { + // Pre-validation. + verifySentinel(); + crArray.verifySentinel(); + + // Make sure the arrays are the same length. + if ((_data == NULL) && (crArray._data == NULL)) { + iRetVal = 0; + } else if (getByteCount() == crArray.getByteCount()) { + // Compare the array. + iRetVal = ::memcmp(_data, crArray.getPtr(), getByteCount()); + } else { + iRetVal = (getByteCount() > crArray.getByteCount()) ? 1 : -1; + } + + // Post-validation. + verifySentinel(); + } + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // ArrayPrepend + // + // Prepend this array with the provided array. This call will grow the + // array by the size of the provided array. + ////////////////////////////////////////////////////////////////////////// + void arrayPrepend(const TDynamicArray & crArray) { + CAF_CM_FUNCNAME("arrayPrepend"); + + // Declare variables to hold copy of original information. + uint32 origByteCount = 0; + uint32 origElementCount = 0; + T * origData = NULL; + + try { + // Pre-validation. + verifySentinel(); + + // Create a temporary copy of the original buffer and length. + origData = _data; + origByteCount = _byteCount; + origElementCount = _elementCount; + + // Reset the data pointer, length, and byte length. + _data = NULL; + _elementCount = 0; + _elementIndex = 0; + _byteCount = 0; + + // Reset the sentinel set flag. + _isSentinelSet = false; + + // Call internal allocation function to actually allocate the + // array buffer. + internalAllocate(origElementCount + crArray.getElementCount()); + + // Get an intermediate pointer to the internal buffer. + T * tempData = _data; + + // Copy the provided data into the new buffer if it exists. + if((crArray.getPtr() != NULL) && (crArray.getByteCount() > 0)) { + // Copy the bytes. + ::memcpy(tempData, crArray.getPtr(), crArray.getByteCount()); + + // Advance the pointer to the end of the data just copied. + tempData += crArray.getElementCount(); + } + + // Copy the original into the new if it exists. + if((origData != NULL) && (origByteCount > 0)) { + // Copy the bytes. + ::memcpy(tempData, origData, origByteCount); + } + + // verify the sentinel bytes. + verifySentinel(); + } + CAF_CM_CATCH_ALL; + + // Delete the original buffer if non-null. + if (origData) { + Allocator::freeMemory(origData); + } + + CAF_CM_THROWEXCEPTION; + } + + ////////////////////////////////////////////////////////////////////////// + // ArrayAppend + // + // Append this array with the provided array. This call will grow the + // array by the size of the provided array. + ////////////////////////////////////////////////////////////////////////// + void arrayAppend(const TDynamicArray & crArray) { + CAF_CM_FUNCNAME("arrayAppend"); + + // Declare variables to hold copy of original information. + uint32 origByteCount = 0; + uint32 origElementCount = 0; + uint32 origElementIndex = 0; + T * origData = NULL; + + try { + // Pre-validation. + verifySentinel(); + + // Create a temporary copy of the original buffer and length. + origData = _data; + origByteCount = _byteCount; + origElementCount = _elementCount; + origElementIndex = _elementIndex; + + // Reset the data pointer, length, and byte length. + _data = NULL; + _elementCount = 0; + _elementIndex = 0; + _byteCount = 0; + + // Reset the sentinel set flag. + _isSentinelSet = false; + + // Call internal allocation function to actually allocate the + // array buffer. + internalAllocate(origElementCount + crArray.getElementCount()); + + // Get an intermediate pointer to the internal buffer. + T * tempData = _data; + + // Copy the original into the new if it exists. + if((origData != NULL) && (origByteCount > 0)) + { + // Copy the bytes. + ::memcpy(tempData, origData, origByteCount); + + // Advance the pointer to the end of the data just copied. + tempData += origElementCount; + } + + // Copy the provided data into the new buffer if it exists. + if((crArray.getPtr() != NULL) && (crArray.getByteCount() > 0)) { + // Copy the bytes. + ::memcpy(tempData, crArray.getPtr(), crArray.getByteCount()); + } + + _elementIndex = origElementIndex; + + // verify the sentinel bytes. + verifySentinel(); + } + CAF_CM_CATCH_ALL; + + // Delete the original buffer if non-null. + if (origData) { + Allocator::freeMemory(origData); + } + } + + ////////////////////////////////////////////////////////////////////////// + // MemSet + // + // Initializes the array by filling it with the fillValue. + ////////////////////////////////////////////////////////////////////////// + void memSet(const byte fillValue = 0) { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + + // Initialize the buffer. + ::memset(_data, fillValue, _byteCount); + _elementIndex = 0; + + // Post-validation. + verifySentinel(); + } + + ////////////////////////////////////////////////////////////////////////// + // MemCpy + // + // Copy the memory from sourceData into this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + void memCpy( + const void * sourceData, + const size_t byteCount) { + memCpy(sourceData, static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // MemCpy + // + // Copy the memory from sourceData into this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + void memCpy( + const void * sourceData, + const uint32 byteCount) { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + + // Make sure the data will fit if we copy it. + verifyByteCount(byteCount); + + // Copy the data. + ::memcpy(_data, sourceData, byteCount); + _elementIndex = 0; + + // Post-validation. + verifySentinel(); + } + + ////////////////////////////////////////////////////////////////////////// + // MemAppend + // + // Append the memory from sourceData into this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + void memAppend( + const void * sourceData, + const size_t byteCount) { + memAppend(sourceData, static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // MemAppend + // + // Append the memory from sourceData into this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + void memAppend( + const void * sourceData, + const uint32 byteCount) { + // Pre-validation. + verifyNotNull(); + verifySentinel(); + + // Make sure the data will fit if we copy it. + const uint32 startingByteCount = elementCountToByteCount(_elementIndex); + verifyByteCount(startingByteCount + byteCount); + + // Copy the data. + ::memcpy(_data + _elementIndex, sourceData, byteCount); + _elementIndex += byteCountToElementCount(byteCount); + + // Post-validation. + verifySentinel(); + } + + ////////////////////////////////////////////////////////////////////////// + // MemCmp + // + // Compare the memory from sourceData with this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + int32 memCmp( + const void * sourceData, + const size_t byteCount) { + return memCmp(sourceData, static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // MemCmp + // + // Compare the memory from sourceData with this array up to byteCount bytes. + ////////////////////////////////////////////////////////////////////////// + int32 memCmp( + const void * sourceData, + const uint32 byteCount) const { + CAF_CM_FUNCNAME_VALIDATE("memCmp"); + CAF_CM_VALIDATE_PTR(sourceData); + CAF_CM_VALIDATE_POSITIVE(byteCount); + + // Pre-validation. + verifySentinel(); + + // Make sure the comparison can take place within our array bounds. + verifyByteCount(byteCount); + + // Do comparison. + int32 iRetVal = 0; + if ((_data == NULL) && (sourceData == NULL)) { + iRetVal = 0; + } else { + iRetVal = ::memcmp(_data, sourceData, byteCount); + } + + // Post-validation. + verifySentinel(); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // MemiCmp + // + // Compare the memory from sourceData with this array up to byteCount bytes + // (case insensitive). + ////////////////////////////////////////////////////////////////////////// + int32 memiCmp( + const void * sourceData, + const size_t byteCount) { + return memiCmp(sourceData, static_cast(byteCount)); + } + + ////////////////////////////////////////////////////////////////////////// + // MemiCmp + // + // Compare the memory from sourceData with this array up to byteCount bytes + // (case insensitive). + ////////////////////////////////////////////////////////////////////////// + int32 memiCmp( + const void * sourceData, + const uint32 byteCount) const { + CAF_CM_FUNCNAME_VALIDATE("memiCmp"); + CAF_CM_VALIDATE_PTR(sourceData); + CAF_CM_VALIDATE_POSITIVE(byteCount); + + // Pre-validation. + verifySentinel(); + + // Make sure the comparison can take place within our array bounds. + verifyByteCount(byteCount); + + // Do comparison. + int32 iRetVal = 0; + if ((_data == NULL) && (sourceData == NULL)) { + iRetVal = 0; + } else { + iRetVal = memicmp(_data, sourceData, byteCount); + } + + // Post-validation. + verifySentinel(); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // incrementElementIndex + // + // Increments the current position of the index into the buffer. + ////////////////////////////////////////////////////////////////////////// + void incrementCurrentPos(const uint32 elementCount) { + CAF_CM_FUNCNAME("incrementCurrentPos"); + + if ((_elementIndex + elementCount) > _elementCount) { + CAF_CM_EXCEPTION_VA3(ERROR_INSUFFICIENT_BUFFER, + "Current position is longer than the total size for '%s' - currentPos: %d, totalLen: %d", + _description.c_str(), _elementIndex + elementCount, _elementCount); + } + + _elementIndex += elementCount; + } + + ////////////////////////////////////////////////////////////////////////// + // resetElementIndex + // + // Resets the current position of the index into the buffer. + ////////////////////////////////////////////////////////////////////////// + void resetCurrentPos() { + _elementIndex = 0; + } + + ////////////////////////////////////////////////////////////////////////// + // getByteCountFromCurrentPos + // + // Returns the size of the array in bytes from the current position. + ////////////////////////////////////////////////////////////////////////// + uint32 getByteCountFromCurrentPos() const { + const uint32 byteIndex = elementCountToByteCount(_elementIndex); + return (_byteCount - byteIndex); + } + +private: + ////////////////////////////////////////////////////////////////////////// + // internalAllocate (Private) + // + // Set the sentinel bytes at the end of the array. + ////////////////////////////////////////////////////////////////////////// + void internalAllocate(const uint32 elementCount) { + CAF_CM_FUNCNAME("internalAllocate"); + + // This function assumes the calling function has freed any pre- + // existing array. + CAF_CM_VALIDATE_NULLPTR(_data); + CAF_CM_VALIDATE_ZERO(_elementCount); + CAF_CM_VALIDATE_ZERO(_byteCount); + + // Allocate the new buffer. This buffer is + _data = static_cast(Allocator::allocMemory( + sizeof(T) * (elementCount + gs_ulDynamicArraySentinelElementCount))); + + // verify that the allocation succeeded. + if (!_data) { + CAF_CM_EXCEPTION_VA1(ERROR_OUTOFMEMORY, "Array allocation failed for '%s'", + _description.c_str()); + } + + // Set sentinel bits +#ifdef __x86_64__ + _sentinelBits = reinterpret_cast(_data) + ^ gs_ulDynamicArraySentinelBitPattern; +#else + _sentinelBits = reinterpret_cast(_data) ^ gs_ulDynamicArraySentinelBitPattern; +#endif + + // Initialize the new buffer. + ::memset(_data, 0, + ((elementCount + gs_ulDynamicArraySentinelElementCount) * sizeof(T))); + + // Set the length and byte length. + _elementCount = elementCount; + _elementIndex = 0; + _byteCount = elementCountToByteCount(elementCount); + + // Set the sentinel bytes. + setSentinel(); + + // verify the sentinel bytes. + verifySentinel(); + } + + ////////////////////////////////////////////////////////////////////////// + // SetSentinel (Private) + // + // Set the sentinel bytes at the end of the array. + ////////////////////////////////////////////////////////////////////////// + void setSentinel() { + // Set the sentinel characters. + for (uint32 ulIndex = 0; ulIndex < (2 * sizeof(T)); ++ulIndex) { + // Set the sentinel bytes at the end of the array. + reinterpret_cast(_data)[(_byteCount + ulIndex + sizeof(T))] = + ((ulIndex % 2) == 0) ? 0xFF : 0xDD; + + // Make a copy of the sentinel bytes for later comparison. + _sentinelBytes[ulIndex + sizeof(T)] = ((ulIndex % 2) == 0) ? 0xFF : 0xDD; + } + + // Set the flag indicating the sentinel is set. + _isSentinelSet = true; + } + + ////////////////////////////////////////////////////////////////////////// + // verifyByteCount (Private) + // + // Verifies that the byte length supplied is not longer than the array + // byte length. + ////////////////////////////////////////////////////////////////////////// + void verifyByteCount(const uint32 byteCount) const { + CAF_CM_FUNCNAME("verifyByteCount"); + + if (byteCount > _byteCount) { + CAF_CM_EXCEPTION_VA3(ERROR_INVALID_INDEX, "The byte length specified [%d] " + "exceeds the array length [%d] for '%s'", byteCount, _byteCount, + _description.c_str()); + } + } + + ////////////////////////////////////////////////////////////////////////// + // verifyElementCount (Private) + // + // Verifies that the index supplied does not go past end of the array. + ////////////////////////////////////////////////////////////////////////// + void verifyElementCount(const uint32 elementCount) const { + CAF_CM_FUNCNAME("verifyElementCount"); + + if (elementCount >= _elementCount) { + CAF_CM_EXCEPTION_VA3(ERROR_INVALID_INDEX, "The index specified [%d] is " + "beyond the array bounds [%d] for '%s'", elementCount, (_elementCount - 1), + _description.c_str()); + } + } + + uint32 byteCountToElementCount(const uint32 byteCount) const { + uint32 rc = 0; + if (byteCount > 0) { + rc = (byteCount / sizeof(T)) + (byteCount % sizeof(T)); + } + + return rc; + } + + uint32 elementCountToByteCount(const uint32 elementCount) const { + return (elementCount * sizeof(T)); + } + +protected: + ////////////////////////////////////////////////////////////////////////// + // verifySentinel (Private) + // + // Verifies that the sentinel bytes are still intact. + ////////////////////////////////////////////////////////////////////////// + void verifySentinel() const { + CAF_CM_FUNCNAME("verifySentinel"); + + if (_isSentinelSet) { +#ifdef __x86_64__ + if ((_sentinelBits ^ reinterpret_cast(_data)) + != gs_ulDynamicArraySentinelBitPattern) +#else + if ((_sentinelBits ^ reinterpret_cast(_data)) != + gs_ulDynamicArraySentinelBitPattern) +#endif + { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA, + "The sentinel BITS for array '%s' are no longer valid.", + _description.c_str()); + } else if (::memcmp(_sentinelBytes, + (reinterpret_cast(_data) + _byteCount), + sizeof(_sentinelBytes)) != 0) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA, + "The sential BYTES for array '%s' are no longer valid.", + _description.c_str()); + } + } else if (_sentinelBits != gs_ulDynamicArraySentinelBitPattern) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA, + "The sential BITS for array '%s' are no longer valid.", _description.c_str()); + } + } + + ////////////////////////////////////////////////////////////////////////// + // verifyNotNull (Private) + // + // Verifies that the data pointer is not null. + ////////////////////////////////////////////////////////////////////////// + void verifyNotNull() const { + CAF_CM_FUNCNAME("verifyNotNull"); + + if (NULL == _data) { + CAF_CM_EXCEPTION_VA1(E_POINTER, "The pointer to the array is null for '%s'", + _description.c_str()); + } + } + +private: + TDynamicArray(const TDynamicArray & crRhs); + TDynamicArray & operator=(const TDynamicArray & crRhs); + +#ifdef WIN32 + ////////////////////////////////////////////////////////////////////////// + // Operator[] (Private) + // + // We need to provide an implementation to satisfy the VC8 compiler + // even though we never intend this method to be called. + ////////////////////////////////////////////////////////////////////////// + T operator[](size_t) + { + // Yes, this code looks very wrong, however, DO NOT REMOVE it! + // It is here to supply an implementation that doesn't generate + // compiler warnings. This method will never be called. + T* tpRetVal = NULL; + return *tpRetVal; + } +#endif + +private: + CAF_CM_CREATE; + byte _sentinelBytes[gs_ulDynamicArraySentinelElementCount * sizeof(T)]; +#ifdef __x86_64__ + uint64 _sentinelBits; +#else + uint32 _sentinelBits; +#endif + bool _isSentinelSet; + + // NOTE: ...Count are not zero-relative, ...Index are zero-relative. + + // An element is the template type (e.g. wchar_t), so the element count + // is the number of these template types in the array. + uint32 _elementCount; + uint32 _elementIndex; + + // The number of bytes consumed by the array of template types. + uint32 _byteCount; + +protected: + std::string _description; + T * _data; +}; + +} + +#endif // _TDynamicArray_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TWCharAdapter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TWCharAdapter.h new file mode 100644 index 000000000..12005adba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Memory/DynamicArray/TWCharAdapter.h @@ -0,0 +1,370 @@ +////////////////////////////////////////////////////////////////////////////// +// +// $Workfile: TWCharAdapter.h $ +// +// Author: Greg Burk +// +// Purpose: This template provides an adapter for TDynamicArray (or +// other types of "safe" array classes) that exposes functions +// that are useful when working with an array of type wchar_t. +// +// A typedef of this class is already defined and should be +// used instead of explicitly using this class. The typedef +// is CEcmWCharArray. +// +// Created: Friday, October 18, 2002 1:59:49 PM +// +// Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +// Modification History: +// +// $Log: //wpbuild01/PvcsData/ECM_40/archives/ECM_41/WinNT/Source/CommonAgtCol/Cpp/EcmCommonStaticMinDep/TWCharAdapter.h-arc $ +// +// Rev 1.2 17 Sep 2003 09:43:16 Michael.Donahue +// Implemented hooks for new library model +// +// Rev 1.1 16 Jan 2003 11:17:54 Greg.Burk +// Made changes necessary to accomodate new CEcmBasicString class and changes to CEcmString. +// +// Rev 1.0 31 Oct 2002 10:43:08 Greg.Burk +// Initial Revision +// +////////////////////////////////////////////////////////////////////////////// +#ifndef _TWCharAdapter_H_ +#define _TWCharAdapter_H_ + +namespace Caf { + +template +class TWCharAdapter : public T +{ +public: + ////////////////////////////////////////////////////////////////////////// + // Default Constructor + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter() {} + + ////////////////////////////////////////////////////////////////////////// + // Conversion Constructor + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter(const char * rhs) + { + multiByteToWide(rhs); + } + + ////////////////////////////////////////////////////////////////////////// + // Conversion Constructor + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter(const wchar_t * rhs) + { + (*this) = rhs; + } + + ////////////////////////////////////////////////////////////////////////// + // Destructor + ////////////////////////////////////////////////////////////////////////// + ~TWCharAdapter() {} + + ////////////////////////////////////////////////////////////////////////// + // Assignment operator + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter& operator=(const char * rhs) + { + multiByteToWide(rhs); + return *this; + } + + ////////////////////////////////////////////////////////////////////////// + // Assignment operator + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter& operator=(const wchar_t * rhs) + { + const uint32 culLength = ::wcslen(rhs); + + if(culLength > 0) + { + this->allocateElements(culLength); + wcsnCpy(rhs, culLength); + } + return *this; + } + + ////////////////////////////////////////////////////////////////////////////// + // MakeLower() + // + // Converts all of the upper-case characters in this string to lower-case. + ////////////////////////////////////////////////////////////////////////////// + void makeLower() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->isNull()) + { + wcslwr(this->m_ptData); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // MakeUpper + // + // Converts all of the lower-case characters in this array to upper-case. + ////////////////////////////////////////////////////////////////////////// + void makeUpper() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->isNull()) + { + wcsupr(this->m_ptData); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // Reverse + // + // Reverses the characters in the array. + ////////////////////////////////////////////////////////////////////////// + void reverse() + { + // Pre-validation. + this->verifySentinal(); + + if(!this->isNull()) + { + wcsrev(this->m_ptData); + } + + // Post-validation. + this->verifySentinal(); + } + + ////////////////////////////////////////////////////////////////////////// + // WcsLen + // + // Return the length of the string. + ////////////////////////////////////////////////////////////////////////// + size_t wcsLen() const + { + size_t stRetVal = 0; + this->verifySentinal(); + this->verifyNotNull(); + stRetVal = ::wcslen(this->m_ptData, this->m_strDesc); + this->verifyLength(static_cast(stRetVal)); + return stRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // WcsCpy + // + // Make a copy of the string into the buffer. + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter & wcsCpy(const wchar_t * cpwszSource) + { + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Get the length of the source string. + uint32 dwSourceLength = ::wcslen(cpwszSource); + + // Make sure the string will fit if we copy it. + this->verifyLength(dwSourceLength); + + // Copy the string into the buffer. + ::wcscpy(this->m_ptData, cpwszSource); + + // Post-validation. + this->verifySentinal(); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // WcsnCpy + // + // Make a copy of the string into the buffer upto culCount characters. + ////////////////////////////////////////////////////////////////////////// + TWCharAdapter & wcsnCpy(const wchar_t * cpwszSource, const uint32 culCount) + { + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Make sure the string will fit if we copy it. + this->verifyLength(culCount); + + // Copy the string into the buffer. + ::wcsncpy(this->m_ptData, cpwszSource, culCount); + + // Post-validation. + this->verifySentinal(); + + return (*this); + } + + ////////////////////////////////////////////////////////////////////////// + // WcsStr + // + // Find the substring cpwszSubString in the array. Returns the pointer to + // the first occurance of the substring in the array or NULL if the + // substring is not found. + ////////////////////////////////////////////////////////////////////////// + const wchar_t * wcsStr(const wchar_t * cpwszSubString) const + { + wchar_t * pwszRetVal = NULL; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Find the substring. + pwszRetVal = ::wcsstr(this->m_ptData, cpwszSubString); + + // Post-validation. + this->verifySentinal(); + + return pwszRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // WcsCmp + // + // Compare the cpwszString to this array. + ////////////////////////////////////////////////////////////////////////// + int32 wcsCmp(const wchar_t * cpwszString) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + iRetVal = ::wcscmp(this->m_ptData, cpwszString); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // WcsiCmp + // + // Compare the cpwszString to this array (case insensitive). + ////////////////////////////////////////////////////////////////////////// + int32 wcsiCmp(const wchar_t * cpwszString) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + iRetVal = wcsicmp(this->m_ptData, cpwszString); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // WcsnCmp + // + // Compare the cpwszString to this array up to culCount characters. + ////////////////////////////////////////////////////////////////////////// + int32 wcsnCmp(const wchar_t * cpwszString, const uint32 culCount) const + { + int32 iRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Make sure the comparison can take place with in our array bounds. + this->verifyLength(culCount); + + // Compare the strings. + iRetVal = wcsncmp(this->m_ptData, cpwszString, culCount); + + return iRetVal; + } + + ////////////////////////////////////////////////////////////////////////// + // WcsChr + // + // Find the first occurrence of the specified character in the string. + ////////////////////////////////////////////////////////////////////////// + wchar_t * wcsChr(wchar_t wcCharacter) const + { + wchar_t * pwszRetVal = 0; + + // Pre-validation. + this->verifySentinal(); + this->verifyNotNull(); + + // Compare the strings. + pwszRetVal = ::wcschr(this->m_ptData, wcCharacter); + + return pwszRetVal; + } + +private: + void multiByteToWide(const char* cpszSource) + { + // Calculate the length of the source. + const uint32 cdwSourceLen = cpszSource ? ::strlen( cpszSource ) : 0; + + // Convert the multibyte strings to wide. + if( cdwSourceLen > 0 ) + { + this->allocateElements(cdwSourceLen); + int32 iRet; +#ifdef WIN32 + iRet = ::MultiByteToWideChar( + CP_ACP, + 0, + cpszSource, + cdwSourceLen, + GetNonConstPtr(), + GetLength() ); +#else + iRet = ::mbstowcs( this->getNonConstPtr(), cpszSource, cdwSourceLen ); + // mbstowcs returns -1 on error or the number of + // characters without the null terminator, so + // we can increase it by 1 for the null or to 0 for + // the error condition below + if ( 0 != iRet ) + iRet++; +#endif + + if( 0 == iRet ) + { + this->freeArray(); + } + } + else if( cpszSource != NULL ) + { + // This chunk of code is important. If the source + // string is empty, return an empty string, not + // a NULL pointer! + this->allocateElements(0); + } + + // Verify array. + this->verifySentinal(); + } + +private: + TWCharAdapter(const TWCharAdapter & crRhs); + TWCharAdapter & operator=(const TWCharAdapter & crRhs); +}; + +} + +#endif // _TWCharAdapter_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformDefines.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformDefines.h new file mode 100644 index 000000000..a04edea0a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformDefines.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef PLATFORM_DEFINES_H +#define PLATFORM_DEFINES_H + +#ifdef WIN32 + #ifdef _WIN64 + typedef uint64 SUBSYS_INTPTR; + const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffffffffffff; + #else + typedef uint32 SUBSYS_INTPTR; + const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffff; + #endif +#else + +#ifdef __x86_64__ +typedef uint64_t SUBSYS_INTPTR; +const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffffffffffff; +#else +typedef uint32_t SUBSYS_INTPTR; +const SUBSYS_INTPTR SUBSYS_INTPTR_INVALID = 0xffffffff; +#endif +const uint32 DLL_PROCESS_ATTACH = 1; +const uint32 DLL_PROCESS_DETACH = 2; + +#ifndef TRUE +#define TRUE true +#endif + +#ifndef FALSE +#define FALSE false +#endif + +#endif + +#endif // #ifndef PLATFORM_DEFINES_H diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformErrors.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformErrors.h new file mode 100644 index 000000000..0bd974556 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformErrors.h @@ -0,0 +1,171 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef PLATFORMERRORS_H_ +#define PLATFORMERRORS_H_ + +#ifdef WIN32 + +#include + +#else + +const HRESULT S_OK = 0; +const HRESULT S_FALSE = 1; +const HRESULT E_FAIL = 0x80004005; +const HRESULT E_NOTIMPL = 0x80004001; +const HRESULT E_INVALIDARG = 0x80070057; +const HRESULT E_OUTOFMEMORY = 0x8007000E; +const HRESULT E_POINTER = 0x80004003; +const HRESULT E_NOINTERFACE = 0x80004002; +const HRESULT E_UNEXPECTED = 0x8000FFFF; + +const HRESULT OLE_E_BLANK = 0x80040007; + +const HRESULT ERROR_SUCCESS = 0; +const HRESULT NO_ERROR = 0; +const HRESULT ERROR_INVALID_FUNCTION= 1; +const HRESULT ERROR_FILE_NOT_FOUND = 2; +const HRESULT ERROR_PATH_NOT_FOUND = 3; +const HRESULT ERROR_ACCESS_DENIED = 5; +const HRESULT ERROR_INVALID_HANDLE = 6; +const HRESULT ERROR_INVALID_DATA = 13; +const HRESULT ERROR_OUTOFMEMORY = 14; +const HRESULT ERROR_NOT_SAME_DEVICE= 17; +const HRESULT ERROR_HANDLE_EOF = 38; +const HRESULT ERROR_NOT_SUPPORTED = 50; +const HRESULT ERROR_FILE_EXISTS= 80; +const HRESULT ERROR_INVALID_PARAMETER = 87; +const HRESULT ERROR_BUFFER_OVERFLOW = 111; +const HRESULT ERROR_CALL_NOT_IMPLEMENTED = 120; +const HRESULT ERROR_INSUFFICIENT_BUFFER = 122; +const HRESULT ERROR_BAD_PATHNAME = 161; +const HRESULT ERROR_BUSY = 170; +const HRESULT ERROR_ALREADY_EXISTS= 183; +const HRESULT ERROR_NOT_FOUND = 1168; +const HRESULT ERROR_MORE_DATA = 234; +const HRESULT ERROR_NO_MORE_ITEMS = 259; +const HRESULT ERROR_SHUTDOWN_IN_PROGRESS = 1115; +const HRESULT ERROR_INVALID_INDEX = 1413; +const HRESULT ERROR_INTERNAL_ERROR = 1359; +const HRESULT ERROR_DISCARDED = 157; +const HRESULT ERROR_CLASS_ALREADY_EXISTS = 1410; +const HRESULT ERROR_CLASS_DOES_NOT_EXIST = 1411; +const HRESULT ERROR_TIMEOUT = 1460; +const HRESULT ERROR_UNSUPPORTED_TYPE = 1630; +const HRESULT ERROR_TAG_NOT_FOUND =2012; +const HRESULT ERROR_TAG_NOT_PRESENT =2013; +const HRESULT ERROR_DUPLICATE_TAG =2014; +const HRESULT ERROR_INVALID_STATE = 5023; +const HRESULT ERROR_FILE_READ_ONLY = 6009; +const HRESULT ERROR_REVISION_MISMATCH = 1306; +const HRESULT ERROR_ALREADY_INITIALIZED = 1247; + +const HRESULT DISP_E_BADVARTYPE = 0x80020008; +const HRESULT DISP_E_OVERFLOW = 0x8002000A; +const HRESULT DISP_E_TYPEMISMATCH = 0x80020005; +const HRESULT DISP_E_EXCEPTION = 0x80020009; +const HRESULT DISP_E_PARAMNOTOPTIONAL = 0x8002000F; +const HRESULT DISP_E_UNKNOWNNAME = 0x80020006; +const HRESULT DISP_E_BADPARAMCOUNT = 0x8002000E; +const HRESULT NTE_BAD_LEN = 0x80090004; + +const HRESULT RPC_S_OK = 0; +const HRESULT RPC_S_OUT_OF_MEMORY = ERROR_OUTOFMEMORY; +const HRESULT RPC_S_INVALID_STRING_BINDING = 1700; +const HRESULT RPC_S_WRONG_KIND_OF_BINDING = 1701; +const HRESULT RPC_S_INVALID_BINDING = 1702; +const HRESULT RPC_S_PROTSEQ_NOT_SUPPORTED = 1703; +const HRESULT RPC_S_INVALID_RPC_PROTSEQ = 1704; +const HRESULT RPC_S_INVALID_STRING_UUID = 1705; +const HRESULT RPC_S_INVALID_ENDPOINT_FORMAT = 1706; +const HRESULT RPC_S_INVALID_NET_ADDR = 1707; +const HRESULT RPC_S_NO_ENDPOINT_FOUND = 1708; +const HRESULT RPC_S_INVALID_TIMEOUT = 1709; +const HRESULT RPC_S_OBJECT_NOT_FOUND = 1710; +const HRESULT RPC_S_ALREADY_REGISTERED = 1711; +const HRESULT RPC_S_TYPE_ALREADY_REGISTERED = 1712; +const HRESULT RPC_S_ALREADY_LISTENING = 1713; +const HRESULT RPC_S_NO_PROTSEQS_REGISTERED = 1714; +const HRESULT RPC_S_NOT_LISTENING = 1715; +const HRESULT RPC_S_UNKNOWN_MGR_TYPE = 1716; +const HRESULT RPC_S_UNKNOWN_IF = 1717; +const HRESULT RPC_S_NO_BINDINGS = 1718; +const HRESULT RPC_S_NO_PROTSEQS = 1719; +const HRESULT RPC_S_CANT_CREATE_ENDPOINT = 1720; +const HRESULT RPC_S_OUT_OF_RESOURCES = 1721; +const HRESULT RPC_S_SERVER_UNAVAILABLE = 1722; +const HRESULT RPC_S_SERVER_TOO_BUSY = 1723; +const HRESULT RPC_S_INVALID_NETWORK_OPTIONS = 1724; +const HRESULT RPC_S_NO_CALL_ACTIVE = 1725; +const HRESULT RPC_S_CALL_FAILED = 1726; +const HRESULT RPC_S_CALL_FAILED_DNE = 1727; +const HRESULT RPC_S_PROTOCOL_ERROR = 1728; +const HRESULT RPC_S_UNSUPPORTED_TRANS_SYN = 1730; +const HRESULT RPC_S_UNSUPPORTED_TYPE = 1732; +const HRESULT RPC_S_INVALID_TAG = 1733; +const HRESULT RPC_S_INVALID_BOUND = 1734; +const HRESULT RPC_S_NO_ENTRY_NAME = 1735; +const HRESULT RPC_S_INVALID_NAME_SYNTAX = 1736; +const HRESULT RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737; +const HRESULT RPC_S_UUID_NO_ADDRESS = 1739; +const HRESULT RPC_S_DUPLICATE_ENDPOINT = 1740; +const HRESULT RPC_S_UNKNOWN_AUTHN_TYPE = 1741; +const HRESULT RPC_S_MAX_CALLS_TOO_SMALL = 1742; +const HRESULT RPC_S_STRING_TOO_LONG = 1743; +const HRESULT RPC_S_PROTSEQ_NOT_FOUND = 1744; +const HRESULT RPC_S_PROCNUM_OUT_OF_RANGE = 1745; +const HRESULT RPC_S_BINDING_HAS_NO_AUTH = 1746; +const HRESULT RPC_S_UNKNOWN_AUTHN_SERVICE = 1747; +const HRESULT RPC_S_UNKNOWN_AUTHN_LEVEL = 1748; +const HRESULT RPC_S_INVALID_AUTH_IDENTITY = 1749; +const HRESULT RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750; + +const HRESULT FACILITY_WINDOWS = 8; +const HRESULT FACILITY_URT = 19; +const HRESULT FACILITY_STORAGE = 3; +const HRESULT FACILITY_SSPI = 9; +const HRESULT FACILITY_SCARD = 16; +const HRESULT FACILITY_SETUPAPI = 15; +const HRESULT FACILITY_SECURITY = 9; +const HRESULT FACILITY_RPC = 1; +const HRESULT FACILITY_WIN32 = 7; +const HRESULT FACILITY_CONTROL = 10; +const HRESULT FACILITY_NULL = 0; +const HRESULT FACILITY_MSMQ = 14; +const HRESULT FACILITY_MEDIASERVER = 13; +const HRESULT FACILITY_INTERNET = 12; +const HRESULT FACILITY_ITF = 4; +const HRESULT FACILITY_DISPATCH = 2; +const HRESULT FACILITY_COMPLUS = 17; +const HRESULT FACILITY_CERT = 11; +const HRESULT FACILITY_ACS = 20; +const HRESULT FACILITY_AAF = 18; + +const HRESULT SEVERITY_SUCCESS = 0; +const HRESULT SEVERITY_ERROR = 1; + +#define HRESULT_FROM_WIN32(x) ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000))) + +#define SUCCEEDED(status) ((HRESULT)(status) >= 0) +#define FAILED(status) ((HRESULT)(status) < 0) +#define IS_ERROR(status) ((uint32)(status) >> 31 == SEVERITY_ERROR) + +#define HRESULT_CODE(hr) ((hr) & 0xFFFF) +#define SCODE_CODE(sc) ((sc) & 0xFFFF) + +#define HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1FFF) +#define SCODE_FACILITY(sc) (((sc) >> 16) & 0x1FFF) + +#define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1 +#define SCODE_SEVERITY(sc) (((sc) >> 31) & 0x1) + +#define MAKE_HRESULT(sev,fac,code) \ + ((HRESULT) (((uint32)(sev)<<31) | ((uint32)(fac)<<16) | ((uint32)(code))) ) +#define MAKE_SCODE(sev,fac,code) \ + ((HRESULT) (((uint32)(sev)<<31) | ((uint32)(fac)<<16) | ((uint32)(code))) ) + +#endif + +#endif /* PLATFORMERRORS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformIID.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformIID.h new file mode 100644 index 000000000..bbb61537d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformIID.h @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef PLATFORM_IID_H +#define PLATFORM_IID_H + +#ifndef WIN32 + + #include + #include + + struct GUID + { + // this must match the Windows GUID structure + uint32 Data1; // 4 bytes + uint16 Data2; // 2 bytes + uint16 Data3; // 2 bytes + byte Data4[8]; // 8 bytes + }; + + typedef GUID IID, UUID; + + inline bool IsEqualGUID(const GUID& rguid1, const GUID& rguid2) + { + return (!::memcmp(&rguid1,&rguid2,sizeof(GUID))); + } + + #define IsEqualIID(rguid1,rguid2) IsEqualGUID(rguid1,rguid2) + #define IsEqualUUID(rguid1,rguid2) IsEqualGUID(rguid1,rguid2) + + extern HRESULT UuidCreate(UUID* uuid); + +#endif + +namespace BasePlatform { +BASEPLATFORM_LINKAGE std::string UuidToString(const UUID& uuid); +BASEPLATFORM_LINKAGE HRESULT UuidFromString(const char* strGuid, UUID& uuid); + +// This mutex is used to guard the construction of the IIDs in the IIDOF macro +extern BASEPLATFORM_LINKAGE GMutex gs_BaseIIDInitMutex; +} + +#define CAF_DECL_UUID(iid) \ +public: \ +static const IID & IIDOF() \ +{ \ + static IID ms_oIID; \ + static bool m_bIsSet; \ + g_mutex_lock(&BasePlatform::gs_BaseIIDInitMutex); \ + if ( !m_bIsSet ) \ + { \ + BasePlatform::UuidFromString( iid , ms_oIID ); \ + m_bIsSet = true; \ + } \ + g_mutex_unlock(&BasePlatform::gs_BaseIIDInitMutex); \ + return ms_oIID; \ +} + +#define CAF_IIDOF(type_name) type_name::IIDOF() + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformStringFunc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformStringFunc.h new file mode 100644 index 000000000..8ec718843 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformStringFunc.h @@ -0,0 +1,17 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef PLATFORMSTRINGFUNC_H_ +#define PLATFORMSTRINGFUNC_H_ + +namespace BasePlatform { + + //extern std::wstring A2W(const std::string& str); + //extern std::string W2A(const std::wstring& str); +} + +#endif /* PLATFORMSTRINGFUNC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformTypes.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformTypes.h new file mode 100644 index 000000000..271159954 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/PlatformTypes.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef PLATFORM_TYPES_H +#define PLATFORM_TYPES_H + +#ifdef WIN32 + +#include + +#else +// #include +#include +#include +#if defined (__linux__) || defined (__APPLE__) + #include +#endif + +//typedef int32 RPC_STATUS; + +#define __declspec(value) +#define __stdcall +#define __cdecl +#define APIENTRY + +#define FAR + +typedef void * HINSTANCE; +typedef void * HMODULE; +typedef void * HANDLE; +typedef void * LPVOID; +typedef bool BOOL; +typedef uint8_t byte; +typedef int32_t HRESULT; +#endif + +#endif // PLATFORM_TYPES_H diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafObject.h new file mode 100644 index 000000000..a485e30f1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafObject.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ +#ifndef _TCafObject_h +#define _TCafObject_h + +template +class TCafObject : public Base { +public: + TCafObject() : _refCnt(0) {} + +public: // ICafObect Implementations + void AddRef() { + g_atomic_int_inc(&_refCnt); + } + + void Release() { + if (g_atomic_int_dec_and_test(&_refCnt)) { + delete this; + } + } + + void QueryInterface(const IID&, void**) { + throw std::runtime_error("QueryInterface not supported"); + } + +private: + gint _refCnt; + +private: + TCafObject(const TCafObject&); + TCafObject& operator=(const TCafObject&); +}; + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafQIObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafQIObject.h new file mode 100644 index 000000000..0b220d21a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafQIObject.h @@ -0,0 +1,89 @@ +/* + * Created: May 25, 2004 + * + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef TCAFQIOBJECT_H_ +#define TCAFQIOBJECT_H_ + +template +class TCafQIObject : public TCafObject +{ +public: + TCafQIObject () + { + } + + virtual ~TCafQIObject () + { + } + +public: + virtual void QueryInterface( const IID& criid, void** ppv ) + { + Base::_InternalQueryInterface( criid, ppv ); + } +}; + +//////////////////////////////////////////////////////////////////////// +// +// QI map +// +//////////////////////////////////////////////////////////////////////// +#define CAF_BEGIN_QI() \ +protected: \ + void _InternalQueryInterface (const IID &criid, void **ppv) \ + { \ + try \ + { \ + if (ppv) \ + { \ + *ppv = NULL; \ + bool bUseFirstInterface = (::IsEqualGUID(criid, CAF_IIDOF(::ICafObject)) != 0); \ + if (0); + +#define CAF_QI_ENTRY(Interface) \ + else if (bUseFirstInterface || ::IsEqualGUID(criid, CAF_IIDOF(Interface))) \ + *ppv = static_cast(this); + +#define CAF_QI_ENTRY2(Interface, IntermediateInterface) \ + else if (bUseFirstInterface || ::IsEqualGUID(criid, CAF_IIDOF(Interface))) \ + *ppv = static_cast(static_cast(this)); + +#define CAF_END_QI() \ + if (*ppv) \ + reinterpret_cast(this)->AddRef(); \ + } \ + } \ + catch (...) \ + { \ + } \ + } + +//////////////////////////////////////////////////////////////////////// +// +// Object Id - required for ISerializableObject +// +//////////////////////////////////////////////////////////////////////// +#define CAF_MAKE_OBJECT_ID(Factory, Class) \ + (std::string(Factory) + std::string(":") + std::string( #Class )) + +#define CAF_DECLARE_OBJECT_ID(Class, Factory) \ + public: \ + virtual std::string GetObjectId () const \ + { \ + return CAF_MAKE_OBJECT_ID(Factory, Class); \ + } + +// Declare a smart pointer to a class that supports QI after the class has been declared +#define CAF_DECLARE_SMART_QI_POINTER(ClassName) \ + typedef TCafSmartPtr > SmartPtr##ClassName; \ + typedef TCafSmartPtr > ConstPtr##ClassName + +// Forward declare a smart pointer to a class that supports QI +#define CAF_DECLARE_CLASS_AND_IMPQI_POINTER(ClassName) \ + class ClassName; \ + CAF_DECLARE_SMART_QI_POINTER(ClassName) + +#endif /* TCAFQIOBJECT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafSmartPtr.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafSmartPtr.h new file mode 100644 index 000000000..5bc4bb41f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafSmartPtr.h @@ -0,0 +1,399 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _TCafSmartPtr_H +#define _TCafSmartPtr_H + +#ifdef WIN32 +// Disable C4800 - performance warning forcing value to 'true' or 'false' +#pragma warning(disable: 4800) +#endif + +// Forward declarations for Subsystem calls +#ifndef SUBSYSTEMBASE_LINKAGE +#ifdef WIN32 +#ifdef FRAMEWORK_BUILD +#define SUBSYSTEMBASE_LINKAGE __declspec(dllexport) +#else +#define SUBSYSTEMBASE_LINKAGE __declspec(dllimport) +#endif +#else +#define SUBSYSTEMBASE_LINKAGE +#endif +#endif + +namespace Caf { +extern "C" void SUBSYSTEMBASE_LINKAGE CreateObject(const char* cszObjectId, const IID& criid, void** ppv); +//extern "C" void SUBSYSTEMBASE_LINKAGE CreateQIObject(const char* cszFactoryId, const char* cszClassName, const IID& criid, void** ppv); +} + +/** + * @brief Template to wrap any interface or class and provide lifetime management. + *

+ * Lifetime is managed through reference counting with counts stored in the object + * itself. The reference methods are AddRef() and Release(). When the reference + * count reaches zero the object will delete itself. + *

+ * Template instantiation:
+ * Cl is used for accessing the class. It may or may not be derived from + * #ICafObject.
+ * CreateCl is used for creating the class and reference counting. It must + * support the #ICafObject interface. + */ +// CreateCl is used for creation and reference counting and must support the +// ICafObject interface. Cl is used for accessing the class. +template +class TCafSmartPtr { +public: + typedef Cl class_type; + typedef CreateCl create_type; + +private: + typedef TCafSmartPtr SameSmartType; + +public: + // constructors/destructors + + // default constructor + TCafSmartPtr(void) : + m_pCl(0) { + } + + // homogeneous raw constructor + TCafSmartPtr(Cl *rhs) { + m_pCl = rhs; + if (m_pCreateCl) + m_pCreateCl->AddRef(); + } + + // derived class smart constructor + template + TCafSmartPtr(const TCafSmartPtr &rhs) { + m_pCl = rhs.GetNonAddRefedInterface(); + if (m_pCreateCl) + m_pCreateCl->AddRef(); + } + + // homogeneous smart constructor + TCafSmartPtr(const SameSmartType& rhs) { + m_pCl = rhs.m_pCl; + if (m_pCreateCl) + m_pCreateCl->AddRef(); + } + + // don't allow construction from bool + explicit TCafSmartPtr(const bool &rb) { + int32 CantConstructSmartPointerFromBool[0]; + } + + // destructor + ~TCafSmartPtr(void) { + if (m_pCreateCl) + m_pCreateCl->Release(); + } + +public: + // assignment operators + + // homogeneous raw assignment + SameSmartType &operator=(Cl *rhs) { + Attach(rhs); + return *this; + } + + // derived class smart assignment + template + SameSmartType &operator=(const TCafSmartPtr &rhs) { + Attach(rhs.GetNonAddRefedInterface()); + return *this; + } + + // homogeneous smart assignment + SameSmartType &operator=(const SameSmartType &rhs) { + Attach(rhs.m_pCl); + return *this; + } + + // don't allow assignment from bool + void operator=(bool &rb) { + int32 CantAssignSmartPointerFromBool[0]; + } + +private: + + // This helper class is used to ensure that the old smart object gets + // released in a safe manner. It is not safe to touch 'this' in any way + // whatsoever after releasing the old smart object because the release + // could set off a chain of destruction that results in this smart pointer + // being destroyed. Note that this includes the exception macros which + // reference the automatically-defined class name member variable. + class CSafeAutoRelease { + public: + CSafeAutoRelease(CreateCl *pOldCreateCl) : + m_pOldCreateCl(pOldCreateCl) { + } + ~CSafeAutoRelease() { + if (m_pOldCreateCl) + m_pOldCreateCl->Release(); + } + CreateCl *m_pOldCreateCl; + }; + +public: + /** + * @brief Retrieve an interface from a ICafObject pointer and assign the result to self + * @param piObj the object to be queried + * @param cbIsRequired if true then the operation must succeed else an + * exception will be thrown. If false then the self value will be NULL + * if the operation fails. + */ + void QueryInterface(ICafObject *piObj, const bool cbIsRequired = true) { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + + m_pCreateCl = NULL; + if (piObj) + piObj->QueryInterface(GetIID(), reinterpret_cast(&m_pCreateCl)); + if (cbIsRequired && !m_pCreateCl) + throw std::bad_cast(); + } + + /** + * @brief Retrieve an interface from another smart pointer and assign the result to self + * @param rhs the object to be queried + * @param cbIsRequired if true then the operation must succeed else an + * exception will be thrown. If false then the self value will be NULL + * if the operation fails. + */ + template + void QueryInterface(const TCafSmartPtr &rhs, const bool cbIsRequired = true) { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + + m_pCreateCl = NULL; + if (rhs) + rhs.QueryInterface(GetIID(), reinterpret_cast(&m_pCreateCl)); + if (cbIsRequired && !m_pCreateCl) + throw std::bad_cast(); + } + + // This function is provided so that the delegation can go through m_pCreateCl + // rather than m_pCl. This way, if this is a smart pointer to a class that + // derives from multiple interfaces the compiler will not get confused about + // which QueryInterface function to use. + void QueryInterface(const IID &criid, void **ppv) const { + *ppv = NULL; + m_pCreateCl->QueryInterface(criid, ppv); + } + + /** + * @brief Return the UUID of the object + * @return the UUID + */ + static const IID& GetIID() { + // Compiler bug workaround (see comments before COpaqueTemplate) + // return TEcmSmartPtr_GetIID(static_cast *>(NULL)); + return CAF_IIDOF(Cl); + } + +public: + // comparison operators + + bool operator==(const Cl *rhs) const { + return m_pCl == rhs; + } + + template + bool operator==(const TCafSmartPtr &rhs) const { + return m_pCl == rhs.GetNonAddRefedInterface(); + } + + bool operator!=(const Cl *rhs) const { + return m_pCl != rhs; + } + + template + bool operator!=(const TCafSmartPtr &rhs) const { + return m_pCl != rhs.GetNonAddRefedInterface(); + } + + bool operator<(const SameSmartType &rhs) const { + return (m_pCl < rhs.m_pCl); + } + +public: + // conversion + + // This takes the place of operator bool. + // It turns out that the presence of operator bool + // causes the compiler to "get lost" when compiling + // comparison operations such as if( spcPtr1 == spcPtr2)... + // + // This conversion operator will satisfy the compiler when + // compiling comparison operations. + class PseudoBool { + }; + operator PseudoBool *() const { + return (PseudoBool *) m_pCl; + } + +public: + // instance creation + /** + * @brief Create an instance of the CreateCl object + *

+ * The object will have an initial reference count of 1. + */ + void CreateInstance() { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + + //////////////////////////////////////////////////////////////////////// + // + // This code is used to verify that it is safe to use a union of Cl + // and CreateCl. An error indicates that it is *not* safe in which + // case the smart pointer cannot be used as defined. To solve this + // problem, eliminate the second template parameter from the smart + // pointer definition which will force Cl and CreateCl to be the + // same, e.g.: + // + // typedef TCafSmartPtr > SmartPtrClass; + // + //////////////////////////////////////////////////////////////////////// + Cl *pCl = static_cast(reinterpret_cast(0x4)); + if (pCl != reinterpret_cast(0x4)) + throw std::logic_error("Illegal use of TCafSmartPtr<> (See comments in TCafSmartPtr.h)"); + m_pCreateCl = new CreateCl; + if (!m_pCreateCl) + throw std::bad_alloc(); + m_pCreateCl->AddRef(); + } + + /** + * @brief Create an instance of a subsystem object + *

+ * Objects exposed as subsystems (#Caf::TCafSubSystemSmartCl) are identified + * by a string. The Cl and CreateCl template arguments would both be + * set to an interface on the subsystem object of interest. + *

+ * The object will have an initial reference count of 1. + */ + void CreateInstance(const char* cszObjectId) { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + Caf::CreateObject(cszObjectId, GetIID(), reinterpret_cast(&m_pCreateCl)); + } + +// void CreateInstance (const char *cszFactoryId, const char *cszClassName) +// { +// CSafeAutoRelease oAutoRelease(m_pCreateCl); +// Caf::CreateQIObject(cszFactoryId, cszClassName, GetIID(), reinterpret_cast(&m_pCreateCl)); +// } + +public: + // operations + Cl *GetAddRefedInterface() const { + if (!m_pCl) + throw std::runtime_error("TCafSmartPtr: m_pCl is NULL"); + if (m_pCreateCl) + m_pCreateCl->AddRef(); + return m_pCl; + } + + Cl *GetNonAddRefedInterface() const { + return m_pCl; + } + + Cl **GetReleasedInterfaceReference(void) { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + m_pCreateCl = NULL; + return &m_pCreateCl; + } + + Cl **GetNonReleasedInterfaceReference(void) { + return &m_pCreateCl; + } + + void **GetAsPPVArg(void) { + return (void**) GetReleasedInterfaceReference(); + } + + bool IsNull() const { + return m_pCl == 0; + } + + // the arrow operator simply returns the pointer + Cl *operator->() const { + if (!m_pCl) + throw std::runtime_error("TCafSmartPtr: m_pCl is NULL"); + return m_pCl; + } + + Cl &operator*() const { + if (!m_pCl) + throw std::runtime_error("TCafSmartPtr: m_pCl is NULL"); + return *m_pCl; + } + +private: + // m_pCreateCl is used for reference counting; m_pCl is used for object access. + union { + Cl *m_pCl; + CreateCl *m_pCreateCl; + }; + +private: + // homogeneous raw attachment + void Attach(Cl* rhs) { + CSafeAutoRelease oAutoRelease(m_pCreateCl); + m_pCl = rhs; + if (m_pCreateCl) + m_pCreateCl->AddRef(); + } +}; + +// These template functions will give you a reference to the +// underlying object wraped in a smart class +template +const Cl& ToObj(const TCafSmartPtr& spcT) { + return *(spcT.GetNonAddRefedInterface()); +} + +template +Cl& ToNonConstObj(const TCafSmartPtr& spcT) { + return *(spcT.GetNonAddRefedInterface()); +} + +//////////////////////////////////////////////////////////////////////// +// +// Declaration Macros +// +//////////////////////////////////////////////////////////////////////// + +// Declare a smart pointer after the class has been declared +#define CAF_DECLARE_SMART_POINTER(ClassName) \ + typedef TCafSmartPtr > SmartPtr##ClassName; \ +// typedef TCafSmartPtr > ConstPtr##ClassName + +// Forward declare a class smart pointer +#define CAF_DECLARE_CLASS_AND_SMART_POINTER(ClassName) \ + class ClassName; \ + CAF_DECLARE_SMART_POINTER(ClassName) + +// Forward declare a struct smart pointer +#define CAF_DECLARE_STRUCT_AND_SMART_POINTER(StructName) \ + struct StructName; \ + CAF_DECLARE_SMART_POINTER(StructName) + +// Helper macro - do not use directly +#define CAF_DECLARE_SMART_INTERFACE_HELPER(InterfaceName) \ + typedef TCafSmartPtr SmartPtr##InterfaceName; \ +// typedef TCafSmartPtr ConstPtr##InterfaceName + +// Declare a smart pointer to an interface in the interface header file +#define CAF_DECLARE_SMART_INTERFACE_POINTER(InterfaceName) \ + CAF_DECLARE_SMART_INTERFACE_HELPER(InterfaceName) + +// Forward declare a smart interface pointer +#define CAF_FORWARD_DECLARE_SMART_INTERFACE(InterfaceName) \ + struct InterfaceName; \ + CAF_DECLARE_SMART_INTERFACE_HELPER(InterfaceName) + +#endif // #ifndef _TCafSmartPtr_H diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafStackObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafStackObject.h new file mode 100644 index 000000000..1d19d3e62 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/TCafStackObject.h @@ -0,0 +1,34 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef TCAFSTACKOBJECT_H_ +#define TCAFSTACKOBJECT_H_ + +namespace Caf { + +template +class TCafStackObject : public Base { +public: + TCafStackObject() {} + virtual ~TCafStackObject() {} + +private: + virtual void AddRef() { + throw std::runtime_error("TCafStackObj::AddRef not supported"); + } + + virtual void Release() { + throw std::runtime_error("TCafStackObj::Release not supported"); + } + + virtual void QueryInterface(const IID&, void** ppv) { + throw std::runtime_error("TCafStackObj::QueryInterface not supported"); + } +}; + +} +#endif /* TCAFSTACKOBJECT_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Xml/MarkupParser/CMarkupParser.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Xml/MarkupParser/CMarkupParser.h new file mode 100644 index 000000000..12cff3a2b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Xml/MarkupParser/CMarkupParser.h @@ -0,0 +1,65 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMARKUPPARSER_H_ +#define CMARKUPPARSER_H_ + +#include +#include + +namespace Caf { + +/* + * Wrapper around glib GMarkupParser to store results in std containers + */ +namespace MarkupParser { + +// attribute name, value +typedef std::pair Attribute; +typedef std::list Attributes; + +struct AttributeName : public std::binary_function { + bool operator()(const Attribute& attr, const std::string& name) const { + return (attr.first.compare(name) == 0); + } +}; + +struct Element; +CAF_DECLARE_SMART_POINTER(Element); +struct Element { + Element() {} + std::string name; + std::string value; + Attributes attributes; + typedef std::list Children; + Children children; + + CAF_CM_DECLARE_NOCOPY(Element); +}; + +struct ElementName : public std::binary_function { + bool operator()(const SmartPtrElement& element, const std::string& name) const { + return (element->name.compare(name) == 0); + } +}; + +SmartPtrElement MARKUPPARSER_LINKAGE parseString(const std::string& xml); + +SmartPtrElement MARKUPPARSER_LINKAGE parseFile(const std::string& file); + +typedef Element::Children::iterator ChildIterator; +typedef Attributes::iterator AttributeIterator; + +ChildIterator MARKUPPARSER_LINKAGE findChild(SmartPtrElement& element, const std::string& name); + +AttributeIterator MARKUPPARSER_LINKAGE findAttribute(Attributes& attributes, const std::string& name); + +std::string MARKUPPARSER_LINKAGE getAttributeValue(SmartPtrElement& element, const std::string& name); + +}} + +#endif /* CMARKUPPARSER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Xml/XmlUtils/CXmlElement.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Xml/XmlUtils/CXmlElement.h new file mode 100644 index 000000000..c9e3456fc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/include/Xml/XmlUtils/CXmlElement.h @@ -0,0 +1,88 @@ +/* + * Author: mdonahue + * Created: Dec 3, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _CXmlElement_h +#define _CXmlElement_h + + +#include "Integration/IDocument.h" +#include "Xml/MarkupParser/CMarkupParser.h" + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CXmlElement); + +class XMLUTILS_LINKAGE CXmlElement { +public: + typedef std::map CAttributeCollection; + typedef std::multimap CElementCollection; + typedef std::deque COrderedElementCollection; + CAF_DECLARE_SMART_POINTER(CAttributeCollection); + CAF_DECLARE_SMART_POINTER(CElementCollection); + CAF_DECLARE_SMART_POINTER(COrderedElementCollection); + +public: + CXmlElement(); + virtual ~CXmlElement(); + +public: + void initialize(const MarkupParser::SmartPtrElement& element, const std::string& path); + MarkupParser::SmartPtrElement getInternalElement(); + +public: // Read operations + + std::string findRequiredAttribute(const std::string& name) const; + std::string findOptionalAttribute(const std::string& name) const; + SmartPtrCXmlElement findRequiredChild(const std::string& name) const; + SmartPtrCXmlElement findOptionalChild(const std::string& name) const; + SmartPtrCElementCollection findRequiredChildren(const std::string& name) const; + SmartPtrCElementCollection findOptionalChildren(const std::string& name) const; + SmartPtrCAttributeCollection getAllAttributes() const; + SmartPtrCElementCollection getAllChildren() const; + SmartPtrCOrderedElementCollection getAllChildrenInOrder() const; + std::string getName() const; + std::string getValue() const; + std::string getCDataValue() const; + std::string getPath() const; + +public: // Write operations + void addAttribute(const std::string& name, const std::string& value); + void removeAttribute(const std::string& name); + void setAttribute(const std::string& name, const std::string& value); + SmartPtrCXmlElement createAndAddElement(const std::string& name); + void addChild(const SmartPtrCXmlElement& xmlElement); + void removeChild(const std::string& name); + void setValue(const std::string& value); + void setCDataValue(const std::string& value); + void appendValue(const std::string& value); + void saveToFile(const std::string& filename) const; + std::string saveToString() const; + std::string saveToStringRaw() const; + +private: + static const std::string CDATA_BEG; + static const std::string CDATA_END; + +private: + bool _isInitialized; + mutable MarkupParser::SmartPtrElement _element; + std::string _path; + +private: + static void saveToString(const MarkupParser::SmartPtrElement& element, std::string& xml); + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CXmlElement); +}; + +CAF_DECLARE_SMART_POINTER(CXmlElement); + +} + +#endif /* _CXmlElement_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatform.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatform.cpp new file mode 100644 index 000000000..d75ee8be2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/BasePlatform.cpp @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#ifdef WIN32 + +extern "C" +{ + +BOOL APIENTRY DllMain(HMODULE, uint32, LPVOID) +{ + return TRUE; +} + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/GraphsInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/GraphsInc.h new file mode 100644 index 000000000..323d3ffd8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/GraphsInc.h @@ -0,0 +1,13 @@ +/* + * Created on: Sep 30, 2011 + * Author: mdonahue + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef GRAPHSINC_H_ +#define GRAPHSINC_H_ + +#include "TEdgeListGraph.h" + +#endif /* GRAPHSINC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/TEdgeListGraph.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/TEdgeListGraph.h new file mode 100644 index 000000000..47660034b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Graphs/TEdgeListGraph.h @@ -0,0 +1,497 @@ +/* + * Created on: Jul 09, 2003 + * Author: Scott VanCamp + * + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef TEDGELISTGRAPH_H_ +#define TEDGELISTGRAPH_H_ + +#include +#include "Exception/CCafException.h" +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// +// +// Simple graph that uses an edge list +// +// Since we may be using this graph with smart pointers I allow you to specify +// you own less than function. See +// for smart class less than template functions. +////////////////////////////////////////////////////////////////////////////// +using namespace Caf; + +template < class Item, class CustomLess = std::less< Item > > +class TEdgeListGraph +{ + private: + typedef TEdgeListGraph< Item, CustomLess > SameGraphType; + + public: + typedef std::set< Item, CustomLess> CsetVertexEdges; + typedef std::set< Item* > CsetptrVertexEdges; + typedef std::map< Item, CsetptrVertexEdges, CustomLess > CmapVertexEdgeList; + typedef std::list< Item > ClistVertexEdges; + + TEdgeListGraph() + : CAF_CM_INIT( "TEdgeListGraph" ) + { + } + + Item findVertex( const Item& crItemVertex ) const + { + return internalFindVertex(crItemVertex, _mapEdgeList); + } + + bool isVertexInGraph( const Item& crItemVertex ) const + { + return internalIsVertexInGraph(crItemVertex, _mapEdgeList); + } + + bool isEdgeInGraph(const Item& source, const Item& destination) const + { + return internalIsEdgeInGraph(source, destination, _mapEdgeList); + } + + void addVertex( const Item& crItemVertex ) + { + internalAddVertex(crItemVertex, _mapEdgeList); + } + + void removeVertices( const CsetVertexEdges& crsetParents) + { + internalRemoveVertices(crsetParents, _mapEdgeList); + } + + void removeVertex( const Item& crItemVertex ) + { + return internalRemoveVertex(crItemVertex, _mapEdgeList); + } + + void addEdge( const Item& crItemSource, const Item& crItemDestination ) + { + internalAddEdge(crItemSource, crItemDestination, _mapEdgeList); + } + + void removeEdge( const Item& crItemSource, const Item& crItemDestination ) + { + internalRemoveEdge(crItemSource, crItemDestination, _mapEdgeList); + } + + CsetVertexEdges getVertices() const + { + return internalGetVertices(_mapEdgeList); + } + + uint32 getNumberVertices() const + { + return static_cast(_mapEdgeList.size()); + } + + ////////////////////////////////////////////////////////////////////// + // + // getEdges() + // + // Does not recurse into the dependencies, returns the immediate items + // that the item depends on. + ////////////////////////////////////////////////////////////////////// + CsetVertexEdges getEdges( const Item& crItemVertex ) const + { + return internalGetEdges(crItemVertex, _mapEdgeList); + } + + ////////////////////////////////////////////////////////////////////// + // + // getParents() + // + // Returns the parents of a given vertex + // + ////////////////////////////////////////////////////////////////////// + CsetVertexEdges getParents( const Item& crItemVertex ) const + { + return internalGetParents(crItemVertex, _mapEdgeList); + } + + ////////////////////////////////////////////////////////////////////// + // + // getAllParents() + // Returns a set of all the parents of a particular vertex + // + ////////////////////////////////////////////////////////////////////// + CsetVertexEdges getAllParents( const Item& crItemVertex ) const + { + CsetVertexEdges oSetParents; + + // Get the Parents + internalGetAllParents( crItemVertex, _mapEdgeList, oSetParents ); + return oSetParents; + } + + void copyGraph(SameGraphType& copy) const + { + internalCopyGraph(*this, copy); + } + + ////////////////////////////////////////////////////////////////////// + // + // topologySort() + // Returns a topology sort of the entire graph. + // The returned list indicates vertices in sorted order + // + ////////////////////////////////////////////////////////////////////// + // Kahn, A. B. (1962), "Topological sorting of large networks", Communications of the ACM 5 (11): 558�562 + // + // L <- Empty list that will contain the sorted elements + // S <- Set of all nodes with no incoming edges + // while S is non-empty do + // remove a node n from S + // insert n into L + // for each node m with an edge e from n to m do + // remove edge e from the graph + // if m has no other incoming edges then + // insert m into S + // if graph has edges then + // output error message (graph has at least one cycle) + // else + // output message (proposed topologically sorted order: L) + ClistVertexEdges topologySort() const + { + CAF_CM_FUNCNAME("topologySort"); + ClistVertexEdges sortedList; + + // Work with a temporary copy of the graph + TEdgeListGraph graphCopy; + internalCopyGraph(*this, graphCopy); + CsetVertexEdges setNoParents; + + CsetVertexEdges vertices = graphCopy.getVertices(); + for (typename CsetVertexEdges::const_iterator vertex = vertices.begin(); + vertex != vertices.end(); + ++vertex) { + if (graphCopy.getParents(*vertex).size() == 0) { + setNoParents.insert(*vertex); + } + } + + while (setNoParents.size()) { + Item n = *(setNoParents.begin()); + setNoParents.erase(setNoParents.begin()); + sortedList.push_back(n); + CsetVertexEdges edges = graphCopy.getEdges(n); + for (typename CsetVertexEdges::const_iterator edge = edges.begin(); + edge != edges.end(); + ++edge) { + graphCopy.removeEdge(n, *edge); + + bool edgeFound = false; + CsetVertexEdges vertices = graphCopy.getVertices(); + for (typename CsetVertexEdges::const_iterator vertex = vertices.begin(); + !edgeFound && (vertex != vertices.end()); + ++vertex) { + edgeFound = graphCopy.isEdgeInGraph(*vertex, *edge); + } + + if (!edgeFound) { + setNoParents.insert(*edge); + } + } + } + + // Cycle check + vertices = graphCopy.getVertices(); + for (typename CsetVertexEdges::const_iterator vertex = vertices.begin(); + vertex != vertices.end(); + ++vertex) { + if (graphCopy.getEdges(*vertex).size()) { + CAF_CM_EXCEPTION_VA0(ERROR_INVALID_STATE, "The graph has at least one cycle"); + } + } + + return sortedList; + } + + private: + Item internalFindVertex( const Item& crItemVertex, const CmapVertexEdgeList& graph ) const + { + Item FoundVertex; + // Find the vertex + typename CmapVertexEdgeList::const_iterator imapVertex = graph.find( crItemVertex ); + if( imapVertex != graph.end() ) + { + FoundVertex = ( imapVertex->first ); + } + return FoundVertex; + } + + bool internalIsVertexInGraph( const Item& crItemVertex, const CmapVertexEdgeList& graph ) const + { + bool bVertexIsInGraph = false; + + // Find the vertex + typename CmapVertexEdgeList::const_iterator imapVertex = graph.find( crItemVertex ); + if( imapVertex != graph.end() ) + { + bVertexIsInGraph = true; + } + return bVertexIsInGraph; + } + + bool internalIsEdgeInGraph(const Item& source, const Item& destination, const CmapVertexEdgeList& graph) const + { + CsetVertexEdges edges = internalGetEdges(source, graph); + return (edges.end() != edges.find(destination)); + } + + + void internalAddVertex( const Item& crItemVertex, CmapVertexEdgeList& graph ) + { + CAF_CM_FUNCNAME("internalAddVertex"); + // Ensure that the Vertex doesn't already exist in the graph + // we do not allow duplicate Vertices to exist. + typename CmapVertexEdgeList::const_iterator imapEdgeList + = graph.find( crItemVertex ); + if ( graph.end() == imapEdgeList ) + { + graph.insert( std::make_pair( crItemVertex, CsetptrVertexEdges() ) ); + } + else + { + CAF_CM_EXCEPTION_VA0( + ERROR_DUPLICATE_TAG, + "Vertex already exists in the graph, cannot add duplicate Vertices"); + } + } + + void internalRemoveVertices( const CsetVertexEdges& crsetParents, CmapVertexEdgeList& graph) + { + for( typename CsetVertexEdges::const_iterator isetVertex = crsetParents.begin(); + isetVertex != crsetParents.end(); + ++isetVertex ) + { + internalRemoveVertex( *isetVertex, graph ); + } + } + + void internalRemoveVertex( const Item& crItemVertex, CmapVertexEdgeList& graph ) + { + CsetVertexEdges osetVerticesAffected; + + // Find the vertex + typename CmapVertexEdgeList::iterator imapVertex = graph.find( crItemVertex ); + if( imapVertex != graph.end() ) + { + // Get an Item pointer to the vertex that we wish to remove + Item* pItem = const_cast( &( imapVertex->first ) ); + + // Iterate over each vertex removing each reference to the vertex being removed + for( typename CmapVertexEdgeList::iterator imapEdgeList = graph.begin(); + imapEdgeList != graph.end(); + ++imapEdgeList ) + { + // Is the item in the edge list for the current vertex + typename CsetptrVertexEdges::iterator isetVertex = imapEdgeList->second.find( pItem ); + if( isetVertex != imapEdgeList->second.end() ) + { + // Remove the reference + imapEdgeList->second.erase( isetVertex ); + } + } + + // We no longer need the Item pointer + pItem = NULL; + + // Remove the vertex + graph.erase( imapVertex ); + } + } + + void internalAddEdge( const Item& crItemSource, const Item& crItemDestination, CmapVertexEdgeList& graph ) + { + CAF_CM_FUNCNAME("internalAddEdge"); + + // Ensure that you are not trying to add a dependency to yourself + if ( crItemSource == crItemDestination ) + { + CAF_CM_EXCEPTION_VA0( + ERROR_INVALID_DATA, + "Edges to yourself are not allowed, cannot add edge"); + } + + // Ensure that there is a source vertex + typename CmapVertexEdgeList::iterator imapSourceVertex = graph.find( crItemSource ); + if( imapSourceVertex == graph.end() ) + { + CAF_CM_EXCEPTION_VA0( + ERROR_TAG_NOT_FOUND, + "Unable to find source vertex, cannot add edge"); + } + + // Ensure that there is a destination vertex + typename CmapVertexEdgeList::iterator imapDestinationVertex = graph.find( crItemDestination ); + if( imapDestinationVertex == graph.end() ) + { + CAF_CM_EXCEPTION_VA0( + ERROR_TAG_NOT_FOUND, + "Unable to find destination vertex, cannot add edge"); + } + + // Create the edge + Item* pItem = const_cast( &( imapDestinationVertex->first ) ); + imapSourceVertex->second.insert( pItem ); + } + + void internalRemoveEdge( const Item& crItemSource, const Item& crItemDestination, CmapVertexEdgeList& graph ) + { + // Ensure that there is a source vertex + typename CmapVertexEdgeList::iterator imapSourceVertex = graph.find( crItemSource ); + if( imapSourceVertex != graph.end() ) + { + // Ensure that there is a destination vertex + typename CmapVertexEdgeList::iterator imapDestinationVertex = graph.find( crItemDestination ); + if( imapDestinationVertex != graph.end() ) + { + // Get a pointer to the edge + Item* pItem = const_cast( &( imapDestinationVertex->first ) ); + + // remove the edge + imapSourceVertex->second.erase( pItem ); + } + } + } + + CsetVertexEdges internalGetVertices(const CmapVertexEdgeList& graph) const + { + CsetVertexEdges osetVertices; + for( typename CmapVertexEdgeList::const_iterator imapEdgeList = graph.begin(); + imapEdgeList != graph.end(); + ++imapEdgeList ) + { + osetVertices.insert( imapEdgeList->first ); + } + return osetVertices; + } + + CsetVertexEdges internalGetEdges( const Item& crItemVertex, const CmapVertexEdgeList& graph ) const + { + CAF_CM_FUNCNAME("getEdges"); + CsetVertexEdges osetEdges; + + // Find the vertex + typename CmapVertexEdgeList::const_iterator imapVertex = graph.find( crItemVertex ); + if( imapVertex == graph.end() ) + { + CAF_CM_EXCEPTION_VA0( + ERROR_TAG_NOT_FOUND, + "Unable to find vertex. Cannot get edges"); + } + else + { + for( typename CsetptrVertexEdges::const_iterator isetEdge = imapVertex->second.begin(); + isetEdge != imapVertex->second.end(); + ++isetEdge ) + { + if( *isetEdge == NULL ) + { + CAF_CM_EXCEPTION_VA0( + E_FAIL, + "Invalid graph, an edge reported pointing to a invalid destination vertex"); + } + osetEdges.insert( **isetEdge ); + } + } + return osetEdges; + } + + CsetVertexEdges internalGetParents( + const Item& crItemVertex, + const CmapVertexEdgeList& graph) const + { + CsetVertexEdges oSetParents; + + // Find the vertex + typename CmapVertexEdgeList::const_iterator cimapVertex = graph.find( crItemVertex ); + if( cimapVertex != graph.end() ) + { + // Get an Item pointer to the vertex that we wish to get parents for + Item* pItem = const_cast( &( cimapVertex->first ) ); + + // Iterate over each vertex in the graph + for( typename CmapVertexEdgeList::const_iterator cimapEdgeList = graph.begin(); + cimapEdgeList != graph.end(); + ++cimapEdgeList ) + { + // Is the item in the edge list for the current vertex + typename CsetptrVertexEdges::const_iterator cisetVertex = cimapEdgeList->second.find( pItem ); + if( cisetVertex != cimapEdgeList->second.end() ) + { + // Add the vertex to the set of parents + oSetParents.insert( cimapEdgeList->first ); + } + } + + // We no longer need the Item pointer + pItem = NULL; + } + return oSetParents; + } + + void internalGetAllParents( + const Item& crItemVertex, + const CmapVertexEdgeList& graph, + CsetVertexEdges& roSetParents) const + { + // Find the vertex in the map + typename CmapVertexEdgeList::const_iterator imapVertex = graph.find( crItemVertex ); + if( imapVertex != graph.end() ) + { + // Get the parents of this vertex + CsetVertexEdges setCurrentParents = internalGetParents( crItemVertex, graph ); + + // For each parent found that we have not recorded yet find its parents + for( typename CsetVertexEdges::iterator isetCurrentParent = setCurrentParents.begin(); + isetCurrentParent != setCurrentParents.end(); + ++isetCurrentParent ) + { + // Have we recorded this current parent in the parent set? + typename CsetVertexEdges::iterator isetIsCurrentParentRecorded = roSetParents.find( *isetCurrentParent ); + if( isetIsCurrentParentRecorded == roSetParents.end() ) + { + // Since we have not recorded this vertex, record it and get its parents + roSetParents.insert( *isetCurrentParent ); + + // Since we have not recorded this parent, record it and get its parents + internalGetAllParents(*isetCurrentParent, graph, roSetParents ); + } + } + } + } + + void internalCopyGraph(const SameGraphType& source, SameGraphType& copy) const + { + CsetVertexEdges sourceVertices = source.getVertices(); + for (typename CsetVertexEdges::const_iterator vertex = sourceVertices.begin(); + vertex != sourceVertices.end(); + ++vertex) { + copy.addVertex(*vertex); + } + + for (typename CsetVertexEdges::const_iterator vertex = sourceVertices.begin(); + vertex != sourceVertices.end(); + ++vertex) { + CsetVertexEdges sourceEdges = source.getEdges(*vertex); + for (typename CsetVertexEdges::const_iterator edge = sourceEdges.begin(); + edge != sourceEdges.end(); + ++edge) { + copy.addEdge(*vertex, *edge); + } + } + } + + CmapVertexEdgeList _mapEdgeList; + CAF_CM_CREATE; +}; + +#endif /* TEDGELISTGRAPH_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/IteratorsInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/IteratorsInc.h new file mode 100644 index 000000000..b0f5b6421 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/IteratorsInc.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef IteratorsInc_h_ +#define IteratorsInc_h_ + +#include "TIterator.h" +#include "TMapIterator.h" + +#include "TConstIterator.h" +#include "TConstMapIterator.h" + +#include "TSmartIterator.h" +#include "TSmartMapIterator.h" + +#include "TSmartConstIterator.h" +#include "TSmartConstMapIterator.h" + +#include "TMultimapIterator.h" +#include "TConstMultimapIterator.h" + +#include "TSmartMultimapIterator.h" +#include "TSmartConstMultimapIterator.h" + +#endif // #ifndef IteratorsInc_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstIterator.h new file mode 100644 index 000000000..3439c194e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstIterator.h @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Purpose: Return a lightweight iterator for an arbitrary container. +// The iterator moves in the forward direction only; once +// it reaches the end you need a new one. I considered +// adding m_citerBegin to allow for a Reset method, but +// decided that it was better to have a "use once then +// throw away" iterator to prevent the misuse of passing +// the iterator around, possibly after the original +// container has gone away. This way use of the iterator +// is localized, much like the use of standard iterators. +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TConstIterator_h_ +#define TConstIterator_h_ + +namespace Caf { + +template +class TConstIterator +{ +public: + TConstIterator () + { + m_citerCurrent = m_citerEnd; + } + + TConstIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TConstIterator (const TConstIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TConstIterator &operator= (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + return *this; + } + + TConstIterator &operator= (const TConstIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const ValueType &operator* () + { + return *m_citerCurrent; + } + + const ValueType *operator-> () + { + return m_citerCurrent.operator->(); + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + operator bool () + { + return m_citerCurrent != m_citerEnd; + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; +} + +#endif // #ifndef TConstIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMapIterator.h new file mode 100644 index 000000000..1b8bcb77c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMapIterator.h @@ -0,0 +1,92 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TConstMapIterator_h_ +#define TConstMapIterator_h_ + +namespace Caf { + +template +class TConstMultimapIterator; + +template +class TConstMapIterator +{ +public: + TConstMapIterator () + { + m_citerCurrent = m_citerEnd; + } + + TConstMapIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TConstMapIterator (const TConstMapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TConstMapIterator &operator= (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + return *this; + } + + TConstMapIterator &operator= (const TConstMapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const ValueType &operator* () + { + return m_citerCurrent->second; + } + + const ValueType *operator-> () + { + return &m_citerCurrent->second; + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + const KeyType &getKey (void) + { + return m_citerCurrent->first; + } + + operator bool () + { + return m_citerCurrent != m_citerEnd; + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; +} + +#endif // #ifndef TConstMapIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMultimapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMultimapIterator.h new file mode 100644 index 000000000..83fee1924 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TConstMultimapIterator.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TCONSTMULTIMAPITERATOR_H_ +#define TCONSTMULTIMAPITERATOR_H_ + +namespace Caf { + +template +class TConstMultimapIterator +{ +public: + TConstMultimapIterator () + { + m_citerCurrent = m_citerEnd; + } + + TConstMultimapIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TConstMultimapIterator (const TConstMultimapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TConstMultimapIterator &operator= (const TConstMultimapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const KeyType &getKey (void) + { + return m_citerCurrent->first; + } + + const ValueType &operator* () + { + return m_citerCurrent->second; + } + + const ValueType *operator-> () + { + return &m_citerCurrent->second; + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + operator bool () + { + return (m_citerCurrent != m_citerEnd); + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; +} + +#endif // #ifdef TCONSTMULTIMAPITERATOR_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TIterator.h new file mode 100644 index 000000000..7c690992f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TIterator.h @@ -0,0 +1,84 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TIterator_h_ +#define TIterator_h_ + +namespace Caf { + +template +class TIterator +{ +public: + TIterator () + { + m_iterCurrent = m_iterEnd; + } + + TIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TIterator (const TIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TIterator &operator= (const Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + return *this; + } + + TIterator &operator= (const TIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + ValueType &operator* () + { + return *m_iterCurrent; + } + + ValueType *operator-> () + { + return m_iterCurrent.operator->(); + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + operator bool () + { + return m_iterCurrent != m_iterEnd; + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; +} + +#endif // #ifndef TIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMapIterator.h new file mode 100644 index 000000000..88b3ea4e6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMapIterator.h @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TMapIterator_h_ +#define TMapIterator_h_ + +namespace Caf { + +template class TMultimapIterator; + +template +class TMapIterator +{ +public: + TMapIterator () + { + m_iterCurrent = m_iterEnd; + } + + TMapIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TMapIterator (const TMapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TMapIterator &operator= (const Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + return *this; + } + + TMapIterator &operator= (const TMapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + ValueType &operator* () + { + return m_iterCurrent->second; + } + + ValueType *operator-> () + { + return &m_iterCurrent->second; + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + const KeyType &getKey (void) + { + return m_iterCurrent->first; + } + + operator bool () + { + return m_iterCurrent != m_iterEnd; + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; +} + +#endif // #ifndef TMapIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMultimapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMultimapIterator.h new file mode 100644 index 000000000..4229b4a7d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TMultimapIterator.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TMULTIMAPITERATOR_H_ +#define TMULTIMAPITERATOR_H_ + +namespace Caf { + +template +class TMultimapIterator +{ +public: + TMultimapIterator () + { + m_iterCurrent = m_iterEnd; + } + + TMultimapIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TMultimapIterator (const TMultimapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TMultimapIterator &operator= (const TMultimapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + const KeyType &getKey (void) + { + return m_iterCurrent->first; + } + + ValueType &operator* () + { + return m_iterCurrent->second; + } + + ValueType *operator-> () + { + return &m_iterCurrent->second; + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + operator bool () + { + return (m_iterCurrent != m_iterEnd); + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; +} + +#endif /* TMULTIMAPITERATOR_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstIterator.h new file mode 100644 index 000000000..4ba03b258 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstIterator.h @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Purpose: Variant of TConstIterator that deals with smart pointers +// transparently when the arrow operator is used. ONLY works with +// containers that hold smart pointers. +// +// Created: 10/22/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSmartConstIterator_h_ +#define TSmartConstIterator_h_ + +namespace Caf { + +template +class TSmartConstIterator +{ +public: + TSmartConstIterator () + { + m_citerCurrent = m_citerEnd; + } + + TSmartConstIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TSmartConstIterator (const TSmartConstIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TSmartConstIterator &operator= (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + return *this; + } + + TSmartConstIterator &operator= (const TSmartConstIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const SmartPtrType &operator* () + { + return *m_citerCurrent; + } + + const ValueType *operator-> () + { + return m_citerCurrent->operator->(); + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + operator bool () + { + return m_citerCurrent != m_citerEnd; + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; +} + +#endif // #ifndef TSmartConstIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMapIterator.h new file mode 100644 index 000000000..947c8b0ff --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMapIterator.h @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/22/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSmartConstMapIterator_h_ +#define TSmartConstMapIterator_h_ + +namespace Caf { + +template class TSmartConstMultimapIterator; + +template +class TSmartConstMapIterator +{ +public: + TSmartConstMapIterator () + { + m_citerCurrent = m_citerEnd; + } + + TSmartConstMapIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TSmartConstMapIterator (const TSmartConstMapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TSmartConstMapIterator &operator= (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + return *this; + } + + TSmartConstMapIterator &operator= (const TSmartConstMapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const SmartPtrType &operator* () + { + return m_citerCurrent->second; + } + + const ValueType *operator-> () + { + return m_citerCurrent->second.operator->(); + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + const KeyType &getKey (void) + { + return m_citerCurrent->first; + } + + operator bool () + { + return m_citerCurrent != m_citerEnd; + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; +} + +#endif // #ifndef TSmartConstMapIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMultimapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMultimapIterator.h new file mode 100644 index 000000000..ffdd30854 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartConstMultimapIterator.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSMARTCONSTMULTIMAPITERATOR_H_ +#define TSMARTCONSTMULTIMAPITERATOR_H_ + +namespace Caf { + +template +class TSmartConstMultimapIterator +{ +public: + TSmartConstMultimapIterator () + { + m_citerCurrent = m_citerEnd; + } + + TSmartConstMultimapIterator (const Container &rcContainer) + { + m_citerCurrent = rcContainer.begin(); + m_citerEnd = rcContainer.end(); + } + + TSmartConstMultimapIterator (const TSmartConstMultimapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + } + + TSmartConstMultimapIterator &operator= (const TSmartConstMultimapIterator &rhs) + { + m_citerCurrent = rhs.m_citerCurrent; + m_citerEnd = rhs.m_citerEnd; + return *this; + } + +public: + const KeyType &getKey (void) + { + return m_citerCurrent->first; + } + + const SmartPtrType &operator* () + { + return m_citerCurrent->second; + } + + const ValueType *operator-> () + { + return m_citerCurrent->second.operator->(); + } + + void operator++ () + { + ++m_citerCurrent; + } + + void operator++ (int32) + { + m_citerCurrent++; + } + + operator bool () + { + return (m_citerCurrent != m_citerEnd); + } + +private: + typename Container::const_iterator m_citerCurrent; + typename Container::const_iterator m_citerEnd; +}; + +} + +#endif /* TSMARTCONSTMULTIMAPITERATOR_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartIterator.h new file mode 100644 index 000000000..32aa665e5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartIterator.h @@ -0,0 +1,84 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSmartIterator_h_ +#define TSmartIterator_h_ + +namespace Caf { + +template +class TSmartIterator +{ +public: + TSmartIterator () + { + m_iterCurrent = m_iterEnd; + } + + TSmartIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TSmartIterator (const TSmartIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TSmartIterator &operator= (const Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + return *this; + } + + TSmartIterator &operator= (const TSmartIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + SmartPtrType &operator* () + { + return *m_iterCurrent; + } + + ValueType *operator-> () + { + return m_iterCurrent->operator->(); + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + operator bool () + { + return m_iterCurrent != m_iterEnd; + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; +} + +#endif // #ifndef TSmartIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMapIterator.h new file mode 100644 index 000000000..5a9d31b38 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMapIterator.h @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSmartMapIterator_h_ +#define TSmartMapIterator_h_ + +namespace Caf { + +template class TSmartMultimapIterator; + +template +class TSmartMapIterator +{ +public: + TSmartMapIterator () + { + m_iterCurrent = m_iterEnd; + } + + TSmartMapIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TSmartMapIterator (const TSmartMapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TSmartMapIterator &operator= (const Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + return *this; + } + + TSmartMapIterator &operator= (const TSmartMapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + SmartPtrType &operator* () + { + return m_iterCurrent->second; + } + + ValueType *operator-> () + { + return m_iterCurrent->second.operator->(); + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + const KeyType &getKey (void) + { + return m_iterCurrent->first; + } + + operator bool () + { + return m_iterCurrent != m_iterEnd; + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; +} + +#endif // #ifndef TSmartMapIterator_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMultimapIterator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMultimapIterator.h new file mode 100644 index 000000000..4fc9b87eb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Collections/Iterators/TSmartMultimapIterator.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// +// Author: J.P. Grossman +// +// Created: 10/16/2003 +// +// Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential +// -- VMware Confidential +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef TSMARTMULTIMAPITERATOR_H_ +#define TSMARTMULTIMAPITERATOR_H_ + +namespace Caf { + +template +class TSmartMultimapIterator +{ +public: + TSmartMultimapIterator () + { + m_iterCurrent = m_iterEnd; + } + + TSmartMultimapIterator (Container &rContainer) + { + m_iterCurrent = rContainer.begin(); + m_iterEnd = rContainer.end(); + } + + TSmartMultimapIterator (const TSmartMultimapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + } + + TSmartMultimapIterator &operator= (const TSmartMultimapIterator &rhs) + { + m_iterCurrent = rhs.m_iterCurrent; + m_iterEnd = rhs.m_iterEnd; + return *this; + } + +public: + const KeyType &getKey (void) + { + return m_iterCurrent->first; + } + + SmartPtrType &operator* () + { + return m_iterCurrent->second; + } + + ValueType *operator-> () + { + return m_iterCurrent->second.operator->(); + } + + void operator++ () + { + ++m_iterCurrent; + } + + void operator++ (int32) + { + m_iterCurrent++; + } + + operator bool () + { + return (m_iterCurrent != m_iterEnd); + } + +private: + typename Container::iterator m_iterCurrent; + typename Container::iterator m_iterEnd; +}; + +} + +#endif /* TSMARTMULTIMAPITERATOR_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.cpp new file mode 100644 index 000000000..1023db251 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.cpp @@ -0,0 +1,132 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/IAppConfig.h" +#include "AppConfigUtils.h" + +using namespace Caf; + +std::string AppConfigUtils::getRequiredString( + const std::string& parameterName) { + std::string rc; + getAppConfig()->getGlobalString(parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +uint32 AppConfigUtils::getRequiredUint32( + const std::string& parameterName) { + uint32 rc; + getAppConfig()->getGlobalUint32(parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +int32 AppConfigUtils::getRequiredInt32( + const std::string& parameterName) { + int32 rc; + getAppConfig()->getGlobalInt32(parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +bool AppConfigUtils::getRequiredBoolean( + const std::string& parameterName) { + bool rc; + getAppConfig()->getGlobalBoolean(parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +std::string AppConfigUtils::getOptionalString( + const std::string& parameterName) { + std::string rc; + getAppConfig()->getGlobalString(parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +uint32 AppConfigUtils::getOptionalUint32( + const std::string& parameterName) { + uint32 rc = 0; + getAppConfig()->getGlobalUint32(parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +int32 AppConfigUtils::getOptionalInt32( + const std::string& parameterName) { + int32 rc = 0; + getAppConfig()->getGlobalInt32(parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +bool AppConfigUtils::getOptionalBoolean( + const std::string& parameterName) { + bool rc = false; + getAppConfig()->getGlobalBoolean(parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +std::string AppConfigUtils::getRequiredString( + const std::string& sectionName, + const std::string& parameterName) { + std::string rc; + getAppConfig()->getString(sectionName, parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +uint32 AppConfigUtils::getRequiredUint32( + const std::string& sectionName, + const std::string& parameterName) { + uint32 rc; + getAppConfig()->getUint32(sectionName, parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +int32 AppConfigUtils::getRequiredInt32( + const std::string& sectionName, + const std::string& parameterName) { + int32 rc; + getAppConfig()->getInt32(sectionName, parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +bool AppConfigUtils::getRequiredBoolean( + const std::string& sectionName, + const std::string& parameterName) { + bool rc; + getAppConfig()->getBoolean(sectionName, parameterName, rc, IConfigParams::PARAM_REQUIRED); + return rc; +} + +std::string AppConfigUtils::getOptionalString( + const std::string& sectionName, + const std::string& parameterName) { + std::string rc; + getAppConfig()->getString(sectionName, parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +uint32 AppConfigUtils::getOptionalUint32( + const std::string& sectionName, + const std::string& parameterName) { + uint32 rc = 0; + getAppConfig()->getUint32(sectionName, parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +int32 AppConfigUtils::getOptionalInt32( + const std::string& sectionName, + const std::string& parameterName) { + int32 rc = 0; + getAppConfig()->getInt32(sectionName, parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} + +bool AppConfigUtils::getOptionalBoolean( + const std::string& sectionName, + const std::string& parameterName) { + bool rc = false; + getAppConfig()->getBoolean(sectionName, parameterName, rc, IConfigParams::PARAM_OPTIONAL); + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.h new file mode 100644 index 000000000..68b7746bf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/AppConfigUtils.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef AppConfigUtils_H_ +#define AppConfigUtils_H_ + +namespace Caf { + +namespace AppConfigUtils { + + std::string COMMONAGGREGATOR_LINKAGE getRequiredString(const std::string& parameterName); + uint32 COMMONAGGREGATOR_LINKAGE getRequiredUint32(const std::string& parameterName); + int32 COMMONAGGREGATOR_LINKAGE getRequiredInt32(const std::string& parameterName); + bool COMMONAGGREGATOR_LINKAGE getRequiredBoolean(const std::string& parameterName); + + std::string COMMONAGGREGATOR_LINKAGE getOptionalString(const std::string& parameterName); + uint32 COMMONAGGREGATOR_LINKAGE getOptionalUint32(const std::string& parameterName); + int32 COMMONAGGREGATOR_LINKAGE getOptionalInt32(const std::string& parameterName); + bool COMMONAGGREGATOR_LINKAGE getOptionalBoolean(const std::string& parameterName); + + std::string COMMONAGGREGATOR_LINKAGE getRequiredString( + const std::string& sectionName, + const std::string& parameterName); + uint32 COMMONAGGREGATOR_LINKAGE getRequiredUint32( + const std::string& sectionName, + const std::string& parameterName); + int32 COMMONAGGREGATOR_LINKAGE getRequiredInt32( + const std::string& sectionName, + const std::string& parameterName); + bool COMMONAGGREGATOR_LINKAGE getRequiredBoolean( + const std::string& sectionName, + const std::string& parameterName); + + std::string COMMONAGGREGATOR_LINKAGE getOptionalString( + const std::string& sectionName, + const std::string& parameterName); + uint32 COMMONAGGREGATOR_LINKAGE getOptionalUint32( + const std::string& sectionName, + const std::string& parameterName); + int32 COMMONAGGREGATOR_LINKAGE getOptionalInt32( + const std::string& sectionName, + const std::string& parameterName); + bool COMMONAGGREGATOR_LINKAGE getOptionalBoolean( + const std::string& sectionName, + const std::string& parameterName); +}; + +} + +#endif /* AppConfigUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.cpp new file mode 100644 index 000000000..52641d91d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.cpp @@ -0,0 +1,1059 @@ +/* + * Author: mdonahue + * Created: Jan 19, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CConfigParams.h" +#include "Common/CLoggingUtils.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfigWrite.h" +#include "Common/IAppConfig.h" +#include "Common/IConfigParams.h" +#include "CAppConfig.h" + +using namespace Caf; + +SmartPtrIAppConfig Caf::getAppConfig() { + return CAppConfig::getInstance(); +} + +SmartPtrIAppConfig Caf::getAppConfig(const std::string& configFile) { + return CAppConfig::getInstance(configFile); +} + +SmartPtrIAppConfig Caf::getAppConfig(const Cdeqstr& configFileCollection) { + return CAppConfig::getInstance(configFileCollection); +} + +SmartPtrIAppConfig Caf::getAppConfigAppend(const std::string& configFile) { + return CAppConfig::getInstanceAppend(configFile); +} + +SmartPtrIAppConfig Caf::getAppConfigAppend(const Cdeqstr& configFileCollection) { + return CAppConfig::getInstanceAppend(configFileCollection); +} + +SmartPtrIAppConfigWrite Caf::getAppConfigWrite() { + return CAppConfig::getInstanceWrite(); +} + +SmartPtrIAppConfigWrite Caf::getAppConfigWrite(const std::string& configFile) { + return CAppConfig::getInstanceWrite(configFile); +} + +SmartPtrIAppConfigWrite Caf::getAppConfigWrite(const Cdeqstr& configFileCollection) { + return CAppConfig::getInstanceWrite(configFileCollection); +} + +const char* CAppConfig::_sGlobalsSectionName = "globals"; +GRecMutex CAppConfig::_sOpMutex; +SmartPtrCAppConfig CAppConfig::_sInstance; + +CAppConfig::CAppConfig() : + _isInitialized(false), + _envPattern(NULL), + _varPattern(NULL), + CAF_CM_INIT("CAppConfig") { +} + +CAppConfig::~CAppConfig() { + for (CGlobalReplacements::iterator iter = _globalReplacements.begin(); iter + != _globalReplacements.end(); ++iter) { + g_regex_unref(iter->first); + } + + if (_envPattern) { + g_regex_unref(_envPattern); + } + + if (_varPattern) { + g_regex_unref(_varPattern); + } +} + +void CAppConfig::initialize() { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + + std::string appConfigEnv; + CEnvironmentUtils::readEnvironmentVar("CAF_APPCONFIG", appConfigEnv); + + if (appConfigEnv.empty()) { + CAF_CM_EXCEPTION_VA0(ERROR_TAG_NOT_FOUND, "CAF_APPCONFIG env var isn't set."); + } + + const Cdeqstr configFileCollection = CStringUtils::split(appConfigEnv, ';'); + + initialize(configFileCollection); +} + +void CAppConfig::initialize(const std::string& configFile) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(configFile); + + Cdeqstr configFileCollection; + configFileCollection.push_back(configFile); + + initialize(configFileCollection); +} + +void CAppConfig::initialize(const Cdeqstr& configFileCollection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL(configFileCollection); + + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + + for (TConstIterator strIter(configFileCollection); strIter; strIter++) { + const std::string configFile = *strIter; + const std::string configPath = calcConfigPath(configFile); + if (! configPath.empty()) { + _configFileCollection.push_back(configPath); + } + } + + // Add a pattern for environment variable lookup + _envPattern = g_regex_new( + "\\$\\{env\\:(.+)\\}", + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_UNGREEDY | G_REGEX_RAW), + (GRegexMatchFlags)0, + NULL); + + _varPattern = g_regex_new( + "\\$\\{var\\:(.+)\\}", + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_UNGREEDY | G_REGEX_RAW), + (GRegexMatchFlags)0, + NULL); + + _globals = internalLoadParameters(_sGlobalsSectionName); + validateGlobals(_globals); + + _isInitialized = true; +} + +void CAppConfig::append(const std::string& configFile) { + CAF_CM_FUNCNAME_VALIDATE("append"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(configFile); + + Cdeqstr configFileCollection; + configFileCollection.push_back(configFile); + + append(configFileCollection); +} + +void CAppConfig::append(const Cdeqstr& configFileCollection) { + CAF_CM_FUNCNAME_VALIDATE("append"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL(configFileCollection); + + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + + for (TConstIterator strIter(configFileCollection); strIter; strIter++) { + const std::string configFile = *strIter; + const std::string configPath = calcConfigPath(configFile); + if (! configPath.empty()) { + _configFileCollection.push_back(configPath); + } + } +} + +SmartPtrIConfigParams CAppConfig::getParameters(const std::string& sectionName) { + CAF_CM_FUNCNAME_VALIDATE("getParameters"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + + SmartPtrIConfigParams params; + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + CParamSections::const_iterator cachedSection = _cachedSections.find(sectionName); + if (_cachedSections.end() == cachedSection) { + if (::strcmp(sectionName.c_str(), _sGlobalsSectionName) == 0) { + params = _globals; + } else { + params = internalLoadParameters(sectionName); + _cachedSections.insert(CParamSections::value_type(sectionName, params)); + } + } else { + params = cachedSection->second; + } + + return params; +} + +bool CAppConfig::getString( + const std::string& sectionName, + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition) { + CAF_CM_FUNCNAME("getString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + bool paramFound = false; + SmartPtrIConfigParams params = getParameters(sectionName); + GVariant* param = params->lookup( + parameterName.c_str(), + IConfigParams::PARAM_OPTIONAL); + if (param) { + if (g_variant_is_of_type(param, G_VARIANT_TYPE_STRING)) { + value = g_variant_get_string(param, NULL); + paramFound = true; + } else { + CAF_CM_EXCEPTION_VA1(DISP_E_TYPEMISMATCH, "%s exists but is not a string.", parameterName.c_str()); + } + } else { + if (IConfigParams::PARAM_REQUIRED == disposition) { + CAF_CM_EXCEPTION_VA2(ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + parameterName.c_str(), + sectionName.c_str()); + } + } + + return paramFound; +} + +bool CAppConfig::getUint32( + const std::string& sectionName, + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition) { + CAF_CM_FUNCNAME("getUint32"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + bool paramFound = false; + + SmartPtrIConfigParams params = getParameters(sectionName); + GVariant* param = params->lookup( + parameterName.c_str(), + IConfigParams::PARAM_OPTIONAL); + if (param) { + if (g_variant_is_of_type(param, G_VARIANT_TYPE_INT32)) { + value = static_cast(g_variant_get_int32(param)); + paramFound = true; + } else { + std::string valueStr; + getString(sectionName, parameterName, valueStr, disposition); + value = CStringConv::fromString(valueStr); + } + } else { + if (IConfigParams::PARAM_REQUIRED == disposition) { + CAF_CM_EXCEPTION_VA2(ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + parameterName.c_str(), + sectionName.c_str()); + } + } + + return paramFound; +} + +bool CAppConfig::getInt32( + const std::string& sectionName, + const std::string& parameterName, + int32& value, + const IConfigParams::EParamDisposition disposition) { + CAF_CM_FUNCNAME("getInt32"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + bool paramFound = false; + + SmartPtrIConfigParams params = getParameters(sectionName); + GVariant* param = params->lookup( + parameterName.c_str(), + IConfigParams::PARAM_OPTIONAL); + if (param) { + if (g_variant_is_of_type(param, G_VARIANT_TYPE_INT32)) { + value = g_variant_get_int32(param); + paramFound = true; + } else { + std::string valueStr; + getString(sectionName, parameterName, valueStr, disposition); + value = CStringConv::fromString(valueStr); + } + } else { + if (IConfigParams::PARAM_REQUIRED == disposition) { + CAF_CM_EXCEPTION_VA2(ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + parameterName.c_str(), + sectionName.c_str()); + } + } + + return paramFound; +} + +bool CAppConfig::getBoolean( + const std::string& sectionName, + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition) { + CAF_CM_FUNCNAME("getBoolean"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + value = false; + + std::string tmpValue; + bool paramFound = getString( + sectionName, + parameterName, + tmpValue, + IConfigParams::PARAM_OPTIONAL); + + if (paramFound) { + if ("true" == tmpValue) { + value = true; + } else if ("false" == tmpValue) { + value = false; + } else { + CAF_CM_EXCEPTION_VA1(DISP_E_TYPEMISMATCH, "%s exists but is not a boolean (true or false).", parameterName.c_str()); + } + } else { + if (IConfigParams::PARAM_REQUIRED == disposition) { + CAF_CM_EXCEPTION_VA2(ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + parameterName.c_str(), + sectionName.c_str()); + } + } + + return paramFound; +} + +bool CAppConfig::getGlobalString( + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition) { + return getString(_sGlobalsSectionName, parameterName, value, disposition); +} + +bool CAppConfig::getGlobalUint32( + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition) { + return getUint32(_sGlobalsSectionName, parameterName, value, disposition); +} + +bool CAppConfig::getGlobalInt32( + const std::string& parameterName, + int32& value, + const IConfigParams::EParamDisposition disposition) { + return getInt32(_sGlobalsSectionName, parameterName, value, disposition); +} + +bool CAppConfig::getGlobalBoolean( + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition) { + return getBoolean(_sGlobalsSectionName, parameterName, value, disposition); +} + +void CAppConfig::setString( + const std::string& sectionName, + const std::string& parameterName, + const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("setString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_STRING(value); + + SmartPtrIConfigParams params = getParameters(sectionName); + params->insert(g_strdup(parameterName.c_str()), g_variant_new_string( + value.c_str())); +} + +void CAppConfig::setUint32( + const std::string& sectionName, + const std::string& parameterName, + const uint32& value) { + CAF_CM_FUNCNAME_VALIDATE("setUint32"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + SmartPtrIConfigParams params = getParameters(sectionName); + params->insert(g_strdup(parameterName.c_str()), g_variant_new_int32( + value)); +} + +void CAppConfig::setInt32( + const std::string& sectionName, + const std::string& parameterName, + const int32& value) { + CAF_CM_FUNCNAME_VALIDATE("setInt32"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + SmartPtrIConfigParams params = getParameters(sectionName); + params->insert(g_strdup(parameterName.c_str()), g_variant_new_int32( + value)); +} + +void CAppConfig::setBoolean( + const std::string& sectionName, + const std::string& parameterName, + const bool& value) { + CAF_CM_FUNCNAME_VALIDATE("setBoolean"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(parameterName); + + SmartPtrIConfigParams params = getParameters(sectionName); + params->insert(g_strdup(parameterName.c_str()), g_variant_new_boolean( + value)); +} + +void CAppConfig::setGlobalString( + const std::string& parameterName, + const std::string& value) { + setString(_sGlobalsSectionName, parameterName, value); +} + +void CAppConfig::setGlobalUint32( + const std::string& parameterName, + const uint32& value) { + setUint32(_sGlobalsSectionName, parameterName, value); +} + +void CAppConfig::setGlobalInt32( + const std::string& parameterName, + const int32& value) { + setInt32(_sGlobalsSectionName, parameterName, value); +} + +void CAppConfig::setGlobalBoolean( + const std::string& parameterName, + const bool& value) { + setBoolean(_sGlobalsSectionName, parameterName, value); +} + +std::string CAppConfig::resolveValue(const std::string& value) { + CAF_CM_FUNCNAME("resolveValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + std::string rc = value; + GMatchInfo *matchInfo = NULL; + GError* error = NULL; + + try { + if (value.length()) { + gchar *match = NULL; + if (g_regex_match( + _varPattern, + rc.c_str(), + G_REGEX_MATCH_NOTBOL, + &matchInfo)) { + match = g_match_info_fetch(matchInfo, 1); + CAF_CM_VALIDATE_STRINGPTRA(match); + std::string varName(match); + g_free(match); + match = NULL; + size_t pos = varName.find(':', 4); + std::string section = _sGlobalsSectionName; + if (pos != std::string::npos) { + section = varName.substr(0, pos); + varName = varName.substr(pos + 1, varName.length() - pos - 1); + } + + std::string configVal; + bool resolved = false; + // one of these will work - the other two will fail + try { + getString( + section, + varName, + configVal, + IConfigParams::PARAM_REQUIRED); + resolved = true; + } catch (CCafException *ex) { + if (ex->getError() == DISP_E_TYPEMISMATCH) { + ex->Release(); + } else { + throw ex; + } + } + + if (!resolved) { + try { + int32 uval = 0; + getInt32( + section, + varName, + uval, + IConfigParams::PARAM_REQUIRED); + configVal = CStringConv::toString(uval); + resolved = true; + } catch (CCafException *ex) { + if (ex->getError() == DISP_E_TYPEMISMATCH) { + ex->Release(); + } else { + throw ex; + } + } + } + + if (!resolved) { + try { + bool bval = false; + getBoolean( + section, + varName, + bval, + IConfigParams::PARAM_REQUIRED); + configVal = bval ? "true" : "false"; + resolved = true; + } catch (CCafException *ex) { + if (ex->getError() == DISP_E_TYPEMISMATCH) { + ex->Release(); + } else { + throw ex; + } + } + } + + if (!resolved) { + CAF_CM_EXCEPTION_VA1( + ERROR_INVALID_DATA, + "Unable to resolve %s", + value.c_str()); + } + + gchar *replaced = g_regex_replace_literal( + _varPattern, + rc.c_str(), + -1, + 0, + configVal.c_str(), + G_REGEX_MATCH_NOTBOL, + &error); + if (error) { + throw error; + } + rc = replaced; + g_free(replaced); + } + g_match_info_free(matchInfo); + matchInfo = NULL; + + if (g_regex_match( + _envPattern, + rc.c_str(), + G_REGEX_MATCH_NOTBOL, + &matchInfo)) { + match = g_match_info_fetch(matchInfo, 1); + CAF_CM_VALIDATE_STRINGPTRA(match); + std::string envVarName(match); + g_free(match); + match = NULL; + #ifdef WIN32 + char* dupbuf = NULL; + size_t duplen = 0; + errno_t duprc = ::_dupenv_s(&dupbuf, &duplen, envVarName.c_str()); + const std::string dupval(dupbuf && ::strlen(dupbuf) ? dupbuf : ""); + ::free(dupbuf); + dupbuf = NULL; + const char* envVarValue = dupval.c_str(); + #else + const char* envVarValue = ::getenv(envVarName.c_str()); + #endif + + if (envVarValue && ::strlen(envVarValue)) { + gchar* replaced = g_regex_replace_literal( + _envPattern, + rc.c_str(), + -1, + 0, + envVarValue, + G_REGEX_MATCH_NOTBOL, + &error); + if (error) { + throw error; + } + rc = replaced; + g_free(replaced); + } else { + CAF_CM_EXCEPTION_VA1( + ERROR_TAG_NOT_FOUND, + "Referenced environment variable is not set: %s", + envVarName.c_str()); + } + + } + g_match_info_free(matchInfo); + matchInfo = NULL; + } + } + CAF_CM_CATCH_ALL; + if (matchInfo) { + g_match_info_free(matchInfo); + } + CAF_CM_THROWEXCEPTION; + return rc; +} + +SmartPtrIAppConfig CAppConfig::getInstance() { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + if (!_sInstance) { + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(); + _sInstance = appConfig; + } + + return _sInstance; +} + +SmartPtrIAppConfig CAppConfig::getInstance(const std::string& configFile) { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + _sInstance = NULL; + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(configFile); + _sInstance = appConfig; + + return _sInstance; +} + +SmartPtrIAppConfig CAppConfig::getInstance(const Cdeqstr& configFileCollection) { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + _sInstance = NULL; + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(configFileCollection); + _sInstance = appConfig; + + return _sInstance; +} + +SmartPtrIAppConfig CAppConfig::getInstanceAppend( + const std::string& configFile) { + CAF_CM_STATIC_FUNC_VALIDATE("CAppConfig", "getInstanceAppend"); + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + CAF_CM_VALIDATE_SMARTPTR(_sInstance); + _sInstance->append(configFile); + + return _sInstance; +} + +SmartPtrIAppConfig CAppConfig::getInstanceAppend( + const Cdeqstr& configFileCollection) { + CAF_CM_STATIC_FUNC_VALIDATE("CAppConfig", "getInstanceAppend"); + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + CAF_CM_VALIDATE_SMARTPTR(_sInstance); + _sInstance->append(configFileCollection); + + return _sInstance; +} + +SmartPtrIAppConfigWrite CAppConfig::getInstanceWrite() { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + if (!_sInstance) { + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(); + _sInstance = appConfig; + } + + return _sInstance; +} + +SmartPtrIAppConfigWrite CAppConfig::getInstanceWrite(const std::string& configFile) { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + _sInstance = NULL; + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(configFile); + _sInstance = appConfig; + + return _sInstance; +} + +SmartPtrIAppConfigWrite CAppConfig::getInstanceWrite(const Cdeqstr& configFileCollection) { + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + _sInstance = NULL; + SmartPtrCAppConfig appConfig; + appConfig.CreateInstance(); + appConfig->initialize(configFileCollection); + _sInstance = appConfig; + + return _sInstance; +} + +SmartPtrIConfigParams CAppConfig::internalLoadParameters(const std::string& sectionName) { + CAF_CM_FUNCNAME_VALIDATE("internalLoadParameters"); + CAF_CM_VALIDATE_STRING(sectionName); + + // Always return at least an empty collection + SmartPtrCConfigParams configParams; + configParams.CreateInstance(); + configParams->initialize( + sectionName, + CConfigParams::EKeysManaged, + CConfigParams::EValuesManaged); + + for (TConstIterator strIter(_configFileCollection); strIter; strIter++) { + const std::string configFile = *strIter; + internalLoadParameters(sectionName, configFile, configParams); + } + + return configParams; +} + +void CAppConfig::internalLoadParameters( + const std::string& sectionName, + const std::string& configFileName, + const SmartPtrCConfigParams& configParams) { + CAF_CM_FUNCNAME("internalLoadParameters"); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(configFileName); + CAF_CM_VALIDATE_SMARTPTR(configParams); + + GKeyFile* configFile = NULL; + GError* configError = NULL; + gchar** keys = NULL; + gchar* sValue = NULL; + GMatchInfo* matchInfo = NULL; + gchar* match = NULL; + + try { + try { + configFile = g_key_file_new(); + g_key_file_load_from_file( + configFile, + configFileName.c_str(), + G_KEY_FILE_NONE, + &configError); + if (configError) { + throw configError; + } + + gsize numKeys = 0; + keys = g_key_file_get_keys( + configFile, + sectionName.c_str(), + &numKeys, + &configError); + + if (numKeys) { + bool isGlobals = (::strcmp(sectionName.c_str(), _sGlobalsSectionName) + == 0); + + for (gsize idx = 0; idx < numKeys; idx++) { + // There is no way to tell if a value is an integer or string. + // We want to insert the value as either string or int32 so + // try to read the value as an integer. If it cannot be read + // as an integer then insert it as a string. + gint iValue = g_key_file_get_integer( + configFile, + sectionName.c_str(), + keys[idx], + &configError); + if (!configError) { + configParams->insert(g_strdup(keys[idx]), g_variant_new_int32( + iValue)); + + if (isGlobals) { + // create a regular expression to apply against other + // values in other sections + std::string pattern("\\$\\{"); + pattern += keys[idx]; + pattern += "\\}"; + GRegex* regex = g_regex_new( + pattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_UNGREEDY | G_REGEX_RAW), + (GRegexMatchFlags)0, + &configError); + if (configError) { + throw configError; + } + + const std::string iValueStr = CStringConv::toString(iValue); + _globalReplacements.insert(CGlobalReplacements::value_type( + regex, iValueStr)); + } + } else { + if (G_KEY_FILE_ERROR_INVALID_VALUE != configError->code) { + throw configError; + } else { + g_error_free(configError); + configError = NULL; + sValue = g_key_file_get_string( + configFile, + sectionName.c_str(), + keys[idx], + &configError); + if (configError) { + throw configError; + } + + // Check the value to see if it references an environment variable + if (g_regex_match( + _envPattern, + sValue, + G_REGEX_MATCH_NOTBOL, + &matchInfo)) { + // Replace the reference with the env variable value + match = g_match_info_fetch(matchInfo, 1); + if (*match) { + std::string envVarName(match); + g_free(match); + match = NULL; + #ifdef WIN32 + char* dupbuf = NULL; + size_t duplen = 0; + errno_t duprc = ::_dupenv_s(&dupbuf, &duplen, envVarName.c_str()); + const std::string dupval(dupbuf && ::strlen(dupbuf) ? dupbuf : ""); + ::free(dupbuf); + dupbuf = NULL; + const char* envVarValue = dupval.c_str(); + #else + const char* envVarValue = ::getenv(envVarName.c_str()); + #endif + if (envVarValue && ::strlen(envVarValue)) { + gchar* newValue = g_regex_replace_literal( + _envPattern, + sValue, + -1, + 0, + envVarValue, + G_REGEX_MATCH_NOTBOL, + &configError); + if (configError) { + throw configError; + } + + g_free(sValue); + sValue = newValue; + } else { + CAF_CM_EXCEPTION_VA1(ERROR_TAG_NOT_FOUND, + "Referenced environment variable is not set: %s", + envVarName.c_str()); + } + } else { + CAF_CM_EXCEPTION_VA0(ERROR_INTERNAL_ERROR, + "${env:var} matched but subexpression #1 is null."); + } + } + g_match_info_free(matchInfo); + matchInfo = NULL; + + // Replace occurrences of ${global_var_name} with the appropriate global value + for (CGlobalReplacements::const_iterator pattern = + _globalReplacements.begin(); pattern + != _globalReplacements.end(); ++pattern) { + if (g_regex_match( + pattern->first, + sValue, + G_REGEX_MATCH_NOTBOL, + NULL)) { + gchar* newValue = g_regex_replace_literal( + pattern->first, + sValue, + -1, + 0, + pattern->second.c_str(), + G_REGEX_MATCH_NOTBOL, + &configError); + if (configError) { + throw configError; + } + + g_free(sValue); + sValue = newValue; + } + } + + // Add the variable to the collection + configParams->insert(g_strdup(keys[idx]), g_variant_new_string( + sValue)); + + if (isGlobals) { + // create a regular expression to apply against other + // values in other sections + std::string pattern("\\$\\{"); + pattern += keys[idx]; + pattern += "\\}"; + GRegex* regex = g_regex_new( + pattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_UNGREEDY | G_REGEX_RAW), + (GRegexMatchFlags)0, + &configError); + if (configError) { + throw configError; + } + + _globalReplacements.insert(CGlobalReplacements::value_type( + regex, sValue)); + } + } + + g_free(sValue); + sValue = NULL; + } + } + } + } catch (GError *e) { + CAF_CM_EXCEPTION_VA0(e->code, e->message); + } + } catch (CCafException *e) { + _cm_exception_ = e; + } + + if (configFile) { + g_key_file_free(configFile); + } + + if (configError) { + g_error_free(configError); + } + + if (keys) { + g_strfreev(keys); + } + + if (sValue) { + g_free(sValue); + } + + if (matchInfo) { + g_match_info_free(matchInfo); + } + + if (match) { + g_free(match); + } + + if (_cm_exception_) { + throw _cm_exception_; + } +} + +void CAppConfig::validateGlobals(const SmartPtrIConfigParams& globals) { + CAF_CM_FUNCNAME("validateGlobals"); + CAF_CM_VALIDATE_INTERFACE(globals); + + GVariant* log_dir = globals->lookup( + _sAppConfigGlobalParamLogDir, + IConfigParams::PARAM_REQUIRED); + CAF_CM_ASSERT(g_variant_is_of_type(log_dir, G_VARIANT_TYPE_STRING)); + const char* log_dir_val = g_variant_get_string(log_dir, NULL); + CAF_CM_VALIDATE_STRINGPTRA(log_dir_val); + + GVariant* log_file = globals->lookup( + _sAppConfigGlobalParamLogConfigFile, + IConfigParams::PARAM_REQUIRED); + CAF_CM_ASSERT(g_variant_is_of_type(log_file, G_VARIANT_TYPE_STRING)); + const char* log_file_val = g_variant_get_string(log_file, NULL); + CAF_CM_VALIDATE_STRINGPTRA(log_file_val); + CLoggingUtils::setStartupConfigFile(log_file_val); + + GVariant* thread_stack_size_kb = globals->lookup( + _sAppConfigGlobalThreadStackSizeKb, + IConfigParams::PARAM_REQUIRED); + CAF_CM_ASSERT(g_variant_is_of_type(thread_stack_size_kb, G_VARIANT_TYPE_INT32)); +} + +std::string CAppConfig::calcConfigPath( + const std::string& configFile) const { + CAF_CM_FUNCNAME_VALIDATE("calcConfigPath"); + CAF_CM_VALIDATE_STRING(configFile); + + std::string rc; + if (g_file_test(configFile.c_str(), G_FILE_TEST_IS_REGULAR)) { + rc = configFile; + } + + if (rc.empty()) { + const std::string currentConfigPath = calcCurrentConfigPath(configFile); + if (g_file_test(currentConfigPath.c_str(), G_FILE_TEST_IS_REGULAR)) { + rc = currentConfigPath; + } + } + + if (rc.empty()) { + const std::string pmeConfigPath = calcDefaultConfigPath("pme", configFile); + if (g_file_test(pmeConfigPath.c_str(), G_FILE_TEST_IS_REGULAR)) { + rc = pmeConfigPath; + } + } + + if (rc.empty()) { + const std::string clientConfigPath = calcDefaultConfigPath("client", configFile); + if (g_file_test(clientConfigPath.c_str(), G_FILE_TEST_IS_REGULAR)) { + rc = clientConfigPath; + } + } + + return rc; +} + +std::string CAppConfig::calcCurrentConfigPath( + const std::string& configFile) const { + CAF_CM_FUNCNAME_VALIDATE("calcCurrentConfigPath"); + CAF_CM_VALIDATE_STRING(configFile); + + const std::string currentDir = FileSystemUtils::getCurrentDir(); + const std::string configPath = FileSystemUtils::buildPath( + currentDir, configFile); + + return configPath; +} + +std::string CAppConfig::calcDefaultConfigPath( + const std::string& area, + const std::string& configFile) const { + CAF_CM_FUNCNAME_VALIDATE("calcDefaultConfigPath"); + CAF_CM_VALIDATE_STRING(area); + CAF_CM_VALIDATE_STRING(configFile); + + const std::string configDir = calcDefaultConfigDir(area); + const std::string configPath = FileSystemUtils::buildPath( + configDir, configFile); + + return configPath; +} + +#ifdef WIN32 +std::string CAppConfig::calcDefaultConfigDir( + const std::string& area) const { + CAF_CM_FUNCNAME("calcDefaultConfigDir"); + CAF_CM_VALIDATE_STRING(area); + + std::string programData; + CEnvironmentUtils::readEnvironmentVar("ProgramData", programData); + if (programData.empty()) { + CAF_CM_EXCEPTION_VA0(ERROR_TAG_NOT_FOUND, "ProgramData env var isn't set."); + } + + const std::string configDir = FileSystemUtils::buildPath( + programData, "VMware", "VMware CAF", area, "config"); + + return configDir; +} +#else +std::string CAppConfig::calcDefaultConfigDir( + const std::string& area) const { + CAF_CM_FUNCNAME_VALIDATE("calcDefaultConfigDir"); + CAF_CM_VALIDATE_STRING(area); + + const std::string configDir = FileSystemUtils::buildPath( + G_DIR_SEPARATOR_S, "etc", "vmware-caf", area, "config"); + + return configDir; +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.h new file mode 100644 index 000000000..4197821d0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAppConfig.h @@ -0,0 +1,196 @@ +/* + * Author: mdonahue + * Created: Jan 19, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAPPCONFIG_H_ +#define CAPPCONFIG_H_ + +#include "Common/IConfigParams.h" + +#include "Common/CConfigParams.h" + +#include "Common/IAppConfig.h" +#include "Common/IAppConfigWrite.h" + +namespace Caf { + +CAF_DECLARE_CLASS_AND_SMART_POINTER(CAppConfig); + +class COMMONAGGREGATOR_LINKAGE CAppConfig : + public IAppConfig, + public IAppConfigWrite { +public: // IAppConfig + + SmartPtrIConfigParams getParameters(const std::string& sectionName); + + bool + getString( + const std::string& sectionName, + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getUint32( + const std::string& sectionName, + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getInt32( + const std::string& sectionName, + const std::string& parameterName, + int32& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getBoolean( + const std::string& sectionName, + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getGlobalString( + const std::string& parameterName, + std::string& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getGlobalUint32( + const std::string& parameterName, + uint32& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getGlobalInt32( + const std::string& parameterName, + int32& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + bool + getGlobalBoolean( + const std::string& parameterName, + bool& value, + const IConfigParams::EParamDisposition disposition = + IConfigParams::PARAM_REQUIRED); + + std::string resolveValue(const std::string& value); + + static SmartPtrIAppConfig getInstance(); + + static SmartPtrIAppConfig getInstance(const std::string& configFile); + + static SmartPtrIAppConfig getInstance(const Cdeqstr& configFileCollection); + + static SmartPtrIAppConfig getInstanceAppend(const std::string& configFile); + + static SmartPtrIAppConfig getInstanceAppend(const Cdeqstr& configFileCollection); + +public: // IAppConfigWrite + void setString(const std::string& sectionName, + const std::string& parameterName, + const std::string& value); + + void setUint32(const std::string& sectionName, + const std::string& parameterName, + const uint32& value); + + void setInt32(const std::string& sectionName, + const std::string& parameterName, + const int32& value); + + void setBoolean(const std::string& sectionName, + const std::string& parameterName, + const bool& value); + + void setGlobalString(const std::string& parameterName, + const std::string& value); + + void setGlobalUint32(const std::string& parameterName, + const uint32& value); + + void setGlobalInt32(const std::string& parameterName, + const int32& value); + + void setGlobalBoolean(const std::string& parameterName, + const bool& value); + + static SmartPtrIAppConfigWrite getInstanceWrite(); + + static SmartPtrIAppConfigWrite getInstanceWrite(const std::string& configFile); + + static SmartPtrIAppConfigWrite getInstanceWrite(const Cdeqstr& configFileCollection); + +private: + CAppConfig(); + virtual ~CAppConfig(); + +private: + void initialize(); + void initialize(const std::string& configFile); + void initialize(const Cdeqstr& configFileCollection); + + void append(const std::string& configFile); + void append(const Cdeqstr& configFileCollection); + +private: + SmartPtrIConfigParams internalLoadParameters( + const std::string& sectionName); + + void internalLoadParameters( + const std::string& sectionName, + const std::string& configFileName, + const SmartPtrCConfigParams& configParams); + + void validateGlobals(const SmartPtrIConfigParams& globals); + +private: + std::string calcCurrentConfigPath( + const std::string& configFile) const; + + std::string calcConfigPath( + const std::string& configFilename) const; + + std::string calcDefaultConfigPath( + const std::string& area, + const std::string& configFile) const; + + std::string calcDefaultConfigDir( + const std::string& area) const; + +private: + static const char* _sGlobalsSectionName; + static GRecMutex _sOpMutex; + static SmartPtrCAppConfig _sInstance; + bool _isInitialized; + typedef std::map CParamSections; + CParamSections _cachedSections; + typedef std::map CGlobalReplacements; + CGlobalReplacements _globalReplacements; + GRegex* _envPattern; + GRegex* _varPattern; + SmartPtrIConfigParams _globals; + + Cdeqstr _configFileCollection; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAppConfig); + friend class TCafObject; +}; + +} + +#endif /* CAPPCONFIG_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CApplicationContext.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CApplicationContext.cpp new file mode 100644 index 000000000..bd869511f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CApplicationContext.cpp @@ -0,0 +1,498 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IBean.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Common/CApplicationContext.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" + +using namespace Caf; + +CApplicationContext::CApplicationContext(void) : + m_isInitialized(false), + CAF_CM_INIT_LOG("CApplicationContext") { +} + +CApplicationContext::~CApplicationContext(void) { +} + +void CApplicationContext::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(m_isInitialized); + + const std::string beanConfigFile = getDefaultBeanConfigFile(); + + Cdeqstr filenameCollection; + filenameCollection.push_front(beanConfigFile); + + initialize(filenameCollection); +} + +void CApplicationContext::initialize(const Cdeqstr& filenameCollection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STL(filenameCollection); + + for (TConstIterator filenameIter(filenameCollection); + filenameIter; filenameIter++) { + const std::string beanConfigFile = *filenameIter; + + parseBeanConfig( + beanConfigFile, + _beanCollection); + } + + CBeanGraph beanGraph; + createBeanGraph( + _beanCollection, + beanGraph, + _beanTopologySort); + + try { + initializeBeans( + _beanCollection, + _beanTopologySort); + } CAF_CM_CATCH_ALL; + + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CCafException *ex = CAF_CM_GETEXCEPTION; + ex->AddRef(); + CAF_CM_CLEAREXCEPTION; + try { + terminateBeans(_beanTopologySort); + } CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + _beanTopologySort.clear(); + _beanCollection.clear(); + CAF_CM_GETEXCEPTION = ex; + CAF_CM_THROWEXCEPTION; + } + + m_isInitialized = true; +} + +void CApplicationContext::terminate() { + CAF_CM_FUNCNAME_VALIDATE("terminate"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + + terminateBeans(_beanTopologySort); + _beanTopologySort.clear(); + _beanCollection.clear(); + _filenameCollection.clear(); +} + +IAppContext::SmartPtrCBeans CApplicationContext::getBeans() const { + CAF_CM_FUNCNAME_VALIDATE("getBeans"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + + SmartPtrCBeans beans; + beans.CreateInstance(); + for (TSmartConstMapIterator beanIter(_beanCollection); + beanIter; beanIter++) { + beans->insert(CBeans::value_type( + beanIter.getKey().c_str(), + beanIter->_bean)); + } + + return beans; +} + +SmartPtrIBean CApplicationContext::getBean(const std::string& beanId) const { + CAF_CM_FUNCNAME("getBean"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STRING(beanId); + + CBeanCollection::const_iterator iter = _beanCollection.find(beanId); + if (iter == _beanCollection.end()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Bean not found - %s", + beanId.c_str()); + } + + CAF_CM_LOG_DEBUG_VA1( + "Bean Found - %s", + beanId.c_str()); + return iter->second->_bean; +} + +std::string CApplicationContext::getDefaultBeanConfigFile() const { + CAF_CM_FUNCNAME("parseBeanConfig"); + + // Get the bean config file + const std::string beanConfigFile = + AppConfigUtils::getRequiredString("bean_config_file"); + if (!FileSystemUtils::doesFileExist(beanConfigFile)) { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "The bean config file [%s] does not exist.", + beanConfigFile.c_str()); + } + + return beanConfigFile; +} + +void CApplicationContext::parseBeanConfig( + const std::string& beanConfigFile, + CBeanCollection& beanCollection) const { + CAF_CM_FUNCNAME("parseBeanConfig"); + CAF_CM_VALIDATE_STRING(beanConfigFile); + CAF_CM_LOG_DEBUG_VA1("Parsing bean config file %s", beanConfigFile.c_str()); + + // We will look up class references early in the process to fail as early + // as possible and to make logging better. + // Parse the bean config file + CXmlElement::SmartPtrCElementCollection rootElements = + CXmlUtils::parseFile(beanConfigFile, "caf:beans")->getAllChildren(); + for (TSmartConstMultimapIterator rootChild(*rootElements); + rootChild; + rootChild++) { + + // if the child is a bean... + if (rootChild->getName() == "bean") { + // Syntactic sugar + const SmartPtrCXmlElement beanElement = *rootChild; + + // Bean attributes + const std::string beanId = beanElement->findRequiredAttribute("id"); + CAF_CM_LOG_DEBUG_VA1("Parsing bean [id=%s]", beanId.c_str()); + const std::string beanClass = beanElement->findRequiredAttribute("class"); + CAF_CM_LOG_DEBUG_VA2( + "Checking bean class [id=%s][class=%s]", + beanId.c_str(), + beanClass.c_str()); + if (!CEcmSubSystemRegistry::IsRegistered(beanClass)) { + CAF_CM_EXCEPTIONEX_VA3( + NoSuchElementException, + 0, + "Bean class %s is not registered. Fix the AppConfig file. " + "[bean id=%s][bean_config_file=%s]", + beanClass.c_str(), + beanId.c_str(), + beanConfigFile.c_str()); + } + + // get optional constructor args and properties + CBeanCtorArgCollection beanCtorArgs; + Cmapstrstr beanProperties; + CAF_CM_LOG_DEBUG_VA1("Parsing bean ctor args and properties [id=%s]", beanId.c_str()); + CXmlElement::SmartPtrCElementCollection beanElements = beanElement->getAllChildren(); + for (TSmartConstMultimapIterator beanChild(*beanElements); + beanChild; + beanChild++) { + if (beanChild->getName() == "property") { + // Syntactic sugar + const SmartPtrCXmlElement propArgElement = *beanChild; + + // property attributes + const std::string name = propArgElement->findRequiredAttribute("name"); + const std::string value = propArgElement->findRequiredAttribute("value"); + if (!beanProperties.insert(std::make_pair(name, value)).second) { + CAF_CM_EXCEPTIONEX_VA3( + DuplicateElementException, + 0, + "Bean property name is duplicated. " + "[bean id=%s][property name=%s][bean_config_file=%s]", + beanId.c_str(), + name.c_str(), + beanConfigFile.c_str()); + } + } + else if (beanChild->getName() == "constructor-arg") { + // Syntactic sugar + const SmartPtrCXmlElement ctorArgElement = *beanChild; + + // ctor attributes + const uint32 ctorArgIndex = CStringConv::fromString(ctorArgElement->findRequiredAttribute("index")); + CBeanCtorArg::ARG_TYPE ctorArgType = CBeanCtorArg::NOT_SET; + std::string ctorArgValue = ctorArgElement->findOptionalAttribute("value"); + if (ctorArgValue.length() > 0) { + ctorArgType = CBeanCtorArg::VALUE; + } else { + ctorArgValue = ctorArgElement->findOptionalAttribute("ref"); + if (ctorArgValue.length() > 0) { + ctorArgType = CBeanCtorArg::REFERENCE; + } else { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "Bean constructor argument must be of type value or ref and cannot be empty. " + "[bean id=%s][bean_config_file=%s]", + beanId.c_str(), + beanConfigFile.c_str()); + } + } + + if (!beanCtorArgs.insert( + CBeanCtorArgCollection::value_type( + ctorArgIndex, + CBeanCtorArg(ctorArgType, ctorArgValue))).second) { + CAF_CM_EXCEPTIONEX_VA3( + DuplicateElementException, + 0, + "Bean has a duplicate constructor-arg index. " + "[bean id=%s][bean_config_file=%s][arg-index=%d]", + beanId.c_str(), + beanConfigFile.c_str(), + ctorArgIndex); + } + CAF_CM_LOG_DEBUG_VA4( + "Bean ctor arg parsed [id=%s][arg-index=%d][arg-type=%s][arg-value=%s]", + beanId.c_str(), + ctorArgIndex, + (CBeanCtorArg::VALUE == ctorArgType ? "VALUE" : "REFERENCE"), + ctorArgValue.c_str()); + } + } + + // Add the bean definition to the collection + SmartPtrCBeanNode beanNode; + beanNode.CreateInstance(); + beanNode->_id = beanId; + beanNode->_class = beanClass; + beanNode->_ctorArgs = beanCtorArgs; + beanNode->_properties = beanProperties; + + if (!beanCollection.insert( + CBeanCollection::value_type( + beanId, + beanNode)).second) { + CAF_CM_EXCEPTIONEX_VA3( + DuplicateElementException, + 0, + "Duplicate bean definition detected. " + "[bean id=%s][bean class=%s][bean_config_file=%s]", + beanId.c_str(), + beanNode->_class.c_str(), + beanConfigFile.c_str()); + } + } + } + + CAF_CM_LOG_DEBUG_VA2( + "Bean configuration file defined %d beans. " + "[file=%s]", + beanCollection.size(), + beanConfigFile.c_str()); +} + +void CApplicationContext::createBeanGraph( + CBeanCollection& beanCollection, + CBeanGraph& beanGraph, + CBeanGraph::ClistVertexEdges& beanTopologySort) const { + CAF_CM_FUNCNAME("createBeanGraph"); + + // Iterate the bean collection and create the beans. They will not be initialized. + // Two name sets will be built: bean names and contstructor-arg ref names. + // These two sets will be compared to ensure that all referenced beans exist. + Csetstr beanNames; + Csetstr beanCtorRefNames; + for (TSmartMapIterator beanIter(beanCollection); + beanIter; + beanIter++) { + + // Create the bean and add it to the collection + CAF_CM_LOG_DEBUG_VA2( + "Creating bean [id=%s][class=%s]", + beanIter.getKey().c_str(), + beanIter->_class.c_str()); + beanIter->_bean.CreateInstance(beanIter->_class.c_str()); + + // Add the bean id to the beanNames set + if (!beanNames.insert(beanIter->_id).second) { + CAF_CM_LOG_DEBUG_VA1( + "Internal logic error: duplicate bean detected. " + "[id=%s]", + beanIter->_id.c_str()); + } + + // Add ref constructor args to the ctor ref name set + for (TConstMapIterator beanCtorArg(beanIter->_ctorArgs); + beanCtorArg; + beanCtorArg++) { + if (CBeanCtorArg::REFERENCE == beanCtorArg->_type) { + beanCtorRefNames.insert(beanCtorArg->_value); + } + } + } + + // Make sure that all beans referenced as ctor args exist + Csetstr beanNameDiff; + std::set_difference( + beanCtorRefNames.begin(), + beanCtorRefNames.end(), + beanNames.begin(), + beanNames.end(), + std::inserter(beanNameDiff, beanNameDiff.end())); + + if (beanNameDiff.size()) { + for (TConstIterator missingName(beanNameDiff); + missingName; + missingName++) { + CAF_CM_LOG_ERROR_VA1( + "No bean definition exists for constructor-arg referenced bean '%s'", + missingName->c_str()); + } + CAF_CM_EXCEPTIONEX_VA0( + NoSuchElementException, + 0, + "One or more bean constructor-args references beans that are not defined."); + } + + // Create a graph node for each bean + for (TSmartConstMapIterator beanIter(beanCollection); + beanIter; + beanIter++) { + beanGraph.addVertex(*beanIter); + } + + // Okay. Now connect the vertices according the constructor-arg references. + // The resulting graph will give us the initialization/tear-down order. + for (TSmartConstMapIterator beanIter(beanCollection); + beanIter; + beanIter++) { + for (TConstMapIterator ctorArg(beanIter->_ctorArgs); + ctorArg; + ctorArg++) { + if (CBeanCtorArg::REFERENCE == ctorArg->_type) { + CBeanCollection::const_iterator ctorBean = beanCollection.find(ctorArg->_value); + if (beanCollection.end() == ctorBean) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Internal error: constructor-arg referenced bean '%s' is missing", + ctorArg->_value.c_str()); + } + beanGraph.addEdge(ctorBean->second, *beanIter); + } + } + } + + // And finally - compute the bean topology sort order + beanTopologySort = beanGraph.topologySort(); + + // Debugging - you will thank me for this later + CAF_CM_LOG_DEBUG_VA0("BEGIN: Bean initialization order") + for (TSmartConstIterator beanNode(beanTopologySort); + beanNode; + beanNode++) { + CAF_CM_LOG_DEBUG_VA1("bean id=%s", beanNode->_id.c_str()); + } + CAF_CM_LOG_DEBUG_VA0("END: Bean initialization order") +} + +void CApplicationContext::initializeBeans( + CBeanCollection& beanCollection, + CBeanGraph::ClistVertexEdges& beanTopologySort) const { + CAF_CM_FUNCNAME("initializeBeans"); + + for (TSmartIterator beanNode(beanTopologySort); + beanNode; + beanNode++) { + CAF_CM_LOG_DEBUG_VA1("Initializing bean %s", beanNode->_id.c_str()); + + // The bean should not have been initialized + if (beanNode->_isInitialized) { + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + 0, + "Internal error: Bean [%s] has already been initialized.", + beanNode->_id.c_str()); + } + + // Iterate the contructor-args and build a collection to + // pass to the bean initializer + IBean::Cargs beanInitArgs; + for (TConstMapIterator ctorArg(beanNode->_ctorArgs); + ctorArg; + ctorArg++) { + switch (ctorArg->_type) { + case CBeanCtorArg::REFERENCE: { + CBeanCollection::const_iterator bean = beanCollection.find(ctorArg->_value); + if (!bean->second->_isInitialized) { + CAF_CM_EXCEPTIONEX_VA2( + NullPointerException, + 0, + "Internal error: Referenced bean not initialized. " + "[bean id=%s][constructor-arg ref=%s]", + beanNode->_id.c_str(), + ctorArg->_value.c_str()); + } + beanInitArgs.push_back(IBean::CArg(bean->second->_bean)); + CAF_CM_LOG_DEBUG_VA1( + "constructor-arg ref=%s", + ctorArg->_value.c_str()); + } + break; + + case CBeanCtorArg::VALUE: + beanInitArgs.push_back(IBean::CArg(ctorArg->_value)); + CAF_CM_LOG_DEBUG_VA1( + "constructor-arg value=%s", + ctorArg->_value.c_str()); + break; + + default: + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "Internal error: Bean constructor-arg is not a ref or value " + "[bean id=%s][constructor-arg index=%d]", + beanNode->_id.c_str(), + ctorArg.getKey()); + } + } + + // Iterate the bean properties and resolve value references + SmartPtrIAppConfig appConfig = getAppConfig(); + Cmapstrstr properties = beanNode->_properties; + + for (TMapIterator property(properties); + property; + property++) { + *property = appConfig->resolveValue(*property); + } + + // Initialize the bean + beanNode->_bean->initializeBean(beanInitArgs, properties); + beanNode->_isInitialized = true; + } +} + +void CApplicationContext::terminateBeans(CBeanGraph::ClistVertexEdges& beanTopologySort) const { + CAF_CM_FUNCNAME("terminateBeans"); + + // Important! Iterate in reverse order of initialization + // Some beans may not be initialized because of exceptions during init process + for (CBeanGraph::ClistVertexEdges::reverse_iterator beanNode = beanTopologySort.rbegin(); + beanNode != beanTopologySort.rend(); + beanNode++) { + if ((*beanNode)->_isInitialized) { + CAF_CM_LOG_DEBUG_VA1( + "Terminating bean %s", + (*beanNode)->_id.c_str()); + try { + (*beanNode)->_bean->terminateBean(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } else { + CAF_CM_LOG_DEBUG_VA1( + "Skipping termination of uninitialized bean %s", + (*beanNode)->_id.c_str()); + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoCondition.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoCondition.cpp new file mode 100644 index 000000000..942f747d9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoCondition.cpp @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CAutoMutex.h" +#include "Common/CAutoCondition.h" + +using namespace Caf; + +CAutoCondition::CAutoCondition() : + _isInitialized (false), + CAF_CM_INIT("CAutoCondition") { + ::g_cond_init(&_condition); +} + +CAutoCondition::~CAutoCondition() { + ::g_cond_clear(&_condition); +} + +void CAutoCondition::initialize(const std::string& name) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _name = name; + _isInitialized = true; +} + +bool CAutoCondition::isInitialized() const { + return _isInitialized; +} + +void CAutoCondition::close() { + CAF_CM_FUNCNAME_VALIDATE("close"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_isInitialized) { + ::g_cond_clear(&_condition); + _name.clear(); + _isInitialized = false; + } +} + +std::string CAutoCondition::getName() const { + CAF_CM_FUNCNAME_VALIDATE("getName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _name; +} + +void CAutoCondition::signal() { + CAF_CM_FUNCNAME_VALIDATE("signal"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + ::g_cond_signal(&_condition); +} + +void CAutoCondition::wait(SmartPtrCAutoMutex& mutex) { + CAF_CM_FUNCNAME_VALIDATE("wait"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + ::g_cond_wait(&_condition, mutex->getNonConstPtr()); +} + +bool CAutoCondition::waitUntil(SmartPtrCAutoMutex& mutex, gint64 endTime) { + CAF_CM_FUNCNAME_VALIDATE("waitUntil"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + gboolean isSignaled = ::g_cond_wait_until(&_condition, mutex->getNonConstPtr(), endTime); + return (FALSE == isSignaled) ? false : true; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.cpp new file mode 100644 index 000000000..0d662f127 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.cpp @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CFileLock.h" +#include "Exception/CCafException.h" +#include "CAutoFileUnlock.h" + +using namespace Caf; + +CAutoFileUnlock::CAutoFileUnlock(SmartPtrCFileLock & rspcManagedLock) +{ + m_spcLock = rspcManagedLock; +} + +CAutoFileUnlock::~CAutoFileUnlock() +{ + CAF_CM_STATIC_FUNC("CAutoFileUnlock", "~CAutoFileUnlock"); + try + { + if (m_spcLock) + { + m_spcLock->setLockLevel(CFileLock::UNLOCK, true); + m_spcLock = 0; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.h new file mode 100644 index 000000000..54cc32105 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoFileUnlock.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAutoFileUnlock_h_ +#define CAutoFileUnlock_h_ + + +#include "Common/CFileLock.h" + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoFileUnlock +{ +public: + CAutoFileUnlock(SmartPtrCFileLock & rspcManagedLock); + ~CAutoFileUnlock(); + +private: + SmartPtrCFileLock m_spcLock; + CAF_CM_DECLARE_NOCOPY(CAutoFileUnlock); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutex.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutex.cpp new file mode 100644 index 000000000..fa97e94ef --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutex.cpp @@ -0,0 +1,76 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CAutoMutex.h" + +using namespace Caf; + +CAutoMutex::CAutoMutex() : + _isInitialized(false), + CAF_CM_INIT("CAutoMutex") { +} + +CAutoMutex::~CAutoMutex() { + if (_isInitialized) { + ::g_mutex_clear(&_mutex); + } +} + +void CAutoMutex::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + ::g_mutex_init(&_mutex); + _isInitialized = true; +} + +bool CAutoMutex::isInitialized() const { + return _isInitialized; +} + +void CAutoMutex::lock( + const char* className, + const char* funcName, + const int32 lineNumber) { + CAF_CM_FUNCNAME_VALIDATE("lock"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Waiting for lock - %s::%s(%d) - %p", className, funcName, +// lineNumber, &_mutex); +// } + + ::g_mutex_lock(&_mutex); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Got lock - %s::%s(%d) - %p", className, funcName, lineNumber, +// &_mutex); +// } +} + +void CAutoMutex::unlock( + const char* className, + const char* funcName, + const int32 lineNumber) { + CAF_CM_FUNCNAME_VALIDATE("unlock"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Unlocking lock - %s::%s(%d) - %p", className, funcName, +// lineNumber, &_mutex); +// } + + ::g_mutex_unlock(&_mutex); +} + +GMutex* CAutoMutex::getNonConstPtr() { + CAF_CM_FUNCNAME_VALIDATE("getNonConstPtr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return &_mutex; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.cpp new file mode 100644 index 000000000..e9f0477d1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.cpp @@ -0,0 +1,74 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CAutoMutex.h" +#include "Common/CAutoRecMutex.h" +#include "CAutoMutexLockUnlock.h" + +using namespace Caf; + +CAutoMutexLockUnlock::CAutoMutexLockUnlock( + SmartPtrCAutoMutex& mutex, + const char* className, + const char* funcName, + const int32 lineNumber) : + _lineNumber(0), + CAF_CM_INIT("CAutoMutexLockUnlock") { + CAF_CM_FUNCNAME_VALIDATE("CAutoMutexLockUnlock"); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + _mutex = mutex; + + if ((NULL != className) && (NULL != funcName)) { + _className = className; + _funcName = funcName; + _lineNumber = lineNumber; + } + + _mutex->lock(className, funcName, lineNumber); +} + +CAutoMutexLockUnlock::CAutoMutexLockUnlock( + SmartPtrCAutoRecMutex& recMutex, + const char* className, + const char* funcName, + const int32 lineNumber) : + _lineNumber(0), + CAF_CM_INIT("CAutoMutexLockUnlock") { + CAF_CM_FUNCNAME_VALIDATE("CAutoMutexLockUnlock"); + CAF_CM_VALIDATE_SMARTPTR(recMutex); + + _recMutex = recMutex; + + if ((NULL != className) && (NULL != funcName)) { + _className = className; + _funcName = funcName; + _lineNumber = lineNumber; + } + + _recMutex->lock(className, funcName, lineNumber); +} + +CAutoMutexLockUnlock::~CAutoMutexLockUnlock() { + if (_className.empty() && _funcName.empty()) { + if (!_mutex.IsNull()) { + _mutex->unlock(); + } + if (!_recMutex.IsNull()) { + _recMutex->unlock(); + } + } else { + if (!_mutex.IsNull()) { + _mutex->unlock(_className.c_str(), _funcName.c_str(), _lineNumber); + } + if (!_recMutex.IsNull()) { + _recMutex->unlock(_className.c_str(), _funcName.c_str(), _lineNumber); + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.h new file mode 100644 index 000000000..4faf2a709 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlock.h @@ -0,0 +1,47 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAUTOMUTEXLOCKUNLOCK_H_ +#define CAUTOMUTEXLOCKUNLOCK_H_ + + +#include "Common/CAutoMutex.h" +#include "Common/CAutoRecMutex.h" + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoMutexLockUnlock { +public: + CAutoMutexLockUnlock( + SmartPtrCAutoMutex& mutex, + const char* className = NULL, + const char* funcName = NULL, + const int32 lineNumber = 0); + + CAutoMutexLockUnlock( + SmartPtrCAutoRecMutex& recMutex, + const char* className = NULL, + const char* funcName = NULL, + const int32 lineNumber = 0); + + ~CAutoMutexLockUnlock(); + +private: + SmartPtrCAutoMutex _mutex; + SmartPtrCAutoRecMutex _recMutex; + + std::string _className; + std::string _funcName; + int32 _lineNumber; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoMutexLockUnlock); +}; +} + +#endif /* CAUTOMUTEXLOCKUNLOCK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlockRaw.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlockRaw.cpp new file mode 100644 index 000000000..d0d19ce2e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlockRaw.cpp @@ -0,0 +1,40 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CAutoMutexLockUnlockRaw.h" + +using namespace Caf; + +CAutoMutexLockUnlockRaw::CAutoMutexLockUnlockRaw(GMutex* mutex) : + CAF_CM_INIT("CAutoMutexLockUnlockRaw") { + _mutex = mutex; + _recMutex = NULL; + + if (_mutex) { + ::g_mutex_lock(_mutex); + } +} + +CAutoMutexLockUnlockRaw::CAutoMutexLockUnlockRaw(GRecMutex* recMutex) : + CAF_CM_INIT("CAutoMutexLockUnlockRaw") { + _mutex = NULL; + _recMutex = recMutex; + + if (_recMutex) { + ::g_rec_mutex_lock(_recMutex); + } +} + +CAutoMutexLockUnlockRaw::~CAutoMutexLockUnlockRaw() { + if (_mutex) { + ::g_mutex_unlock(_mutex); + } + if (_recMutex) { + ::g_rec_mutex_unlock(_recMutex); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlockRaw.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlockRaw.h new file mode 100644 index 000000000..ba59641de --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexLockUnlockRaw.h @@ -0,0 +1,32 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAUTOMUTEXLOCKUNLOCKRAW_H_ +#define CAUTOMUTEXLOCKUNLOCKRAW_H_ + +namespace Caf { + +class SUBSYSTEMBASE_LINKAGE CAutoMutexLockUnlockRaw { +public: + CAutoMutexLockUnlockRaw(GMutex* mutex); + + CAutoMutexLockUnlockRaw(GRecMutex* recMutex); + + ~CAutoMutexLockUnlockRaw(); + +private: + GMutex* _mutex; + GRecMutex* _recMutex; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoMutexLockUnlockRaw); +}; + +} + +#endif /* CAUTOMUTEXLOCKUNLOCKRAW_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.cpp new file mode 100644 index 000000000..5f696747a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.cpp @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: Oct 21, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CAutoMutex.h" +#include "Common/CAutoRecMutex.h" +#include "CAutoMutexUnlockLock.h" + +using namespace Caf; + +CAutoMutexUnlockLock::CAutoMutexUnlockLock( + SmartPtrCAutoMutex& mutex, + const char* className, + const char* funcName, + const int32 lineNumber) : + _lineNumber(lineNumber), + CAF_CM_INIT("CAutoMutexUnlockLock") { + CAF_CM_FUNCNAME_VALIDATE("CAutoMutexUnlockLock"); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + _mutex = mutex; + + if ((NULL != className) && (NULL != funcName)) { + _className = className; + _funcName = funcName; + } + + _mutex->unlock(className, funcName, lineNumber); +} + +CAutoMutexUnlockLock::CAutoMutexUnlockLock( + SmartPtrCAutoRecMutex& recMutex, + const char* className, + const char* funcName, + const int32 lineNumber) : + _lineNumber(lineNumber), + CAF_CM_INIT("CAutoMutexUnlockLock") { + CAF_CM_FUNCNAME_VALIDATE("CAutoMutexUnlockLock"); + CAF_CM_VALIDATE_SMARTPTR(recMutex); + + _recMutex = recMutex; + + if ((NULL != className) && (NULL != funcName)) { + _className = className; + _funcName = funcName; + } + + _recMutex->unlock(className, funcName, lineNumber); +} + +CAutoMutexUnlockLock::~CAutoMutexUnlockLock() { + if (_className.empty() && _funcName.empty()) { + if (!_mutex.IsNull()) { + _mutex->lock(); + } + if (!_recMutex.IsNull()) { + _recMutex->lock(); + } + } else { + if (!_mutex.IsNull()) { + _mutex->lock(_className.c_str(), _funcName.c_str(), _lineNumber); + } + if (!_recMutex.IsNull()) { + _recMutex->lock(_className.c_str(), _funcName.c_str(), _lineNumber); + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.h new file mode 100644 index 000000000..9ad5ce175 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoMutexUnlockLock.h @@ -0,0 +1,47 @@ +/* + * Author: bwilliams + * Created: Oct 21, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAUTOMUTEXUNLOCKLOCK_H_ +#define CAUTOMUTEXUNLOCKLOCK_H_ + + +#include "Common/CAutoMutex.h" +#include "Common/CAutoRecMutex.h" + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CAutoMutexUnlockLock { +public: + CAutoMutexUnlockLock( + SmartPtrCAutoMutex& mutex, + const char* className = NULL, + const char* funcName = NULL, + const int32 lineNumber = 0); + + CAutoMutexUnlockLock( + SmartPtrCAutoRecMutex& recMutex, + const char* className = NULL, + const char* funcName = NULL, + const int32 lineNumber = 0); + + ~CAutoMutexUnlockLock(); + +private: + SmartPtrCAutoMutex _mutex; + SmartPtrCAutoRecMutex _recMutex; + + std::string _className; + std::string _funcName; + int32 _lineNumber; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CAutoMutexUnlockLock); +}; +} + +#endif /* CAUTOMUTEXUNLOCKLOCK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoRecMutex.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoRecMutex.cpp new file mode 100644 index 000000000..9bc7a3fe2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CAutoRecMutex.cpp @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: Oct 29, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CAutoRecMutex.h" + +using namespace Caf; + +CAutoRecMutex::CAutoRecMutex() : + _isInitialized(false), + CAF_CM_INIT("CAutoRecMutex") { + ::g_rec_mutex_init(&_mutex); +} + +CAutoRecMutex::~CAutoRecMutex() { + ::g_rec_mutex_clear(&_mutex); +} + +void CAutoRecMutex::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _isInitialized = true; +} + +bool CAutoRecMutex::isInitialized() const { + return _isInitialized; +} + +void CAutoRecMutex::lock( + const char* className, + const char* funcName, + const int32 lineNumber) { + CAF_CM_FUNCNAME_VALIDATE("lock"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Waiting for lock - %s::%s(%d) - %p", className, funcName, +// lineNumber, &_mutex); +// } + + ::g_rec_mutex_lock(&_mutex); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Got lock - %s::%s(%d) - %p", className, funcName, lineNumber, +// &_mutex); +// } + +} + +void CAutoRecMutex::unlock( + const char* className, + const char* funcName, + const int32 lineNumber) { + CAF_CM_FUNCNAME_VALIDATE("unlock"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + +// if ((NULL != className) && (NULL != funcName)) { +// CAF_CM_LOG_DEBUG_VA4("Unlocking lock - %s::%s(%d) - %p", className, funcName, +// lineNumber, &_mutex); +// } + + ::g_rec_mutex_unlock(&_mutex); +} + +GRecMutex* CAutoRecMutex::getNonConstPtr() { + CAF_CM_FUNCNAME_VALIDATE("getNonConstPtr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return &_mutex; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCafRegex.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCafRegex.cpp new file mode 100644 index 000000000..4990cf602 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCafRegex.cpp @@ -0,0 +1,264 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CCafRegex.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CCafRegex::CCafRegex() : + _isInitialized(false), + _gRegex(NULL), + CAF_CM_INIT_LOG("CCafRegex") { +} + +CCafRegex::~CCafRegex() { + CAF_CM_FUNCNAME("~CCafRegex"); + + try { + if(NULL != _gRegex) { + g_regex_unref(_gRegex); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CCafRegex::initialize(const std::string& regex) { + CAF_CM_FUNCNAME("initialize"); + + GError* gError = NULL; + try { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(regex); + + _gRegex = g_regex_new( + regex.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &gError); + if(NULL == _gRegex) { + const std::string errorMessage = (gError == NULL) ? "" : gError->message; + const int32 errorCode = (gError == NULL) ? 0 : gError->code; + CAF_CM_EXCEPTION_VA1(errorCode, "g_regex_new Failed: \"%s\"", errorMessage.c_str()); + } + + if(NULL != gError) { + g_error_free(gError); + } + + _regex = regex; + _isInitialized = true; + } + catch(...) { + if(NULL != gError) { + g_error_free(gError); + } + throw; + } +} + +bool CCafRegex::isMatched(const std::string& source) { + CAF_CM_FUNCNAME_VALIDATE("isMatched"); + + bool rc = false; + GMatchInfo* gMatchInfo = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(source); + + gboolean gIsMatch = g_regex_match(_gRegex, source.c_str(), (GRegexMatchFlags)0, &gMatchInfo); + rc = (FALSE == gIsMatch) ? false : true; + + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + } + catch(...) { + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + throw; + } + + return rc; +} + +std::map CCafRegex::matchNames( + const std::string& source, + const std::set& names) { + + CAF_CM_FUNCNAME_VALIDATE("matchNames"); + + std::map rc; + GMatchInfo* gMatchInfo = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(source); + CAF_CM_VALIDATE_STL(names); + + gboolean gIsMatch = g_regex_match(_gRegex, source.c_str(), (GRegexMatchFlags)0, &gMatchInfo); + if(GLIB_TRUE == gIsMatch) { + CAF_CM_VALIDATE_PTR(gMatchInfo); + + for(TConstIterator > name(names); name; name++) { + gchar* gString = g_match_info_fetch_named(gMatchInfo, (*name).c_str()); + if(NULL != gString) { + rc.insert(std::make_pair(*name, gString)); + g_free(gString); + } + } + } + + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + } + catch(...) { + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + throw; + } + + return rc; +} + +std::deque CCafRegex::matchName( + const std::string& source, + const std::string& name) { + + CAF_CM_FUNCNAME("matchName"); + + std::deque rc; + GMatchInfo* gMatchInfo = NULL; + GError* gError = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(source); + CAF_CM_VALIDATE_STRING(name); + + gboolean gIsMatch = g_regex_match(_gRegex, source.c_str(), (GRegexMatchFlags)0, &gMatchInfo); + if(GLIB_TRUE == gIsMatch) { + CAF_CM_VALIDATE_PTR(gMatchInfo); + + while(g_match_info_matches(gMatchInfo)) { + gchar* gString = g_match_info_fetch_named(gMatchInfo, name.c_str()); + rc.push_back(gString); + g_free(gString); + + g_match_info_next(gMatchInfo, &gError); + if(NULL != gError) { + CAF_CM_EXCEPTION_VA1(gError->code, "g_match_info_next Failed: \"%s\"", gError->message); + } + } + } + + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + } + catch(...) { + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + if(NULL != gError) { + g_error_free(gError); + } + throw; + } + + return rc; +} + +std::string CCafRegex::match( + const std::string& source, + const int32 matchNum) { + + CAF_CM_FUNCNAME_VALIDATE("match"); + + std::string rc; + GMatchInfo* gMatchInfo = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(source); + + gboolean gIsMatch = g_regex_match(_gRegex, source.c_str(), (GRegexMatchFlags)0, &gMatchInfo); + if(GLIB_TRUE == gIsMatch) { + CAF_CM_VALIDATE_PTR(gMatchInfo); + + gchar* gString = g_match_info_fetch(gMatchInfo, matchNum); + rc = gString; + g_free(gString); + } + + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + } + catch(...) { + if(NULL != gMatchInfo) { + g_match_info_free(gMatchInfo); + } + } + + return rc; +} + +std::string CCafRegex::replaceLiteral( + const std::string& source, + const std::string& replacement) { + + CAF_CM_FUNCNAME("replaceLiteral"); + + std::string rc; + GError* gError = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(source); + CAF_CM_VALIDATE_STRING(replacement); + + gchar* gString = g_regex_replace_literal( + _gRegex, source.c_str(), -1, 0, replacement.c_str(), G_REGEX_MATCH_NOTBOL, &gError); + + if(NULL != gError) { + CAF_CM_EXCEPTION_VA1(gError->code, "g_regex_replace_literal Failed: \"%s\"", gError->message); + } + + rc = gString; + g_free(gString); + } + catch(...) { + if(NULL != gError) { + g_error_free(gError); + } + throw; + } + + return rc; +} + +std::string CCafRegex::replaceLiteral( + const std::string& regex, + const std::string& source, + const std::string& replacement) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafRegex", "replaceLiteral"); + CAF_CM_VALIDATE_STRING(regex); + CAF_CM_VALIDATE_STRING(source); + CAF_CM_VALIDATE_STRING(replacement); + + CCafRegex cafRegex; + cafRegex.initialize(regex); + return cafRegex.replaceLiteral(source, replacement); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCmdLineOptions.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCmdLineOptions.cpp new file mode 100644 index 000000000..e72ab43ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CCmdLineOptions.cpp @@ -0,0 +1,253 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CCmdLineOptions.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CCmdLineOptions::CCmdLineOptions(void) : + _isInitialized(false), + _optionCnt(0), + _maxOptions(0), + _gOptions(NULL), + CAF_CM_INIT_LOG("CCmdLineOptions") { +} + +CCmdLineOptions::~CCmdLineOptions(void) { + CAF_CM_FUNCNAME("~CCmdLineOptions"); + try { + for(TConstIterator option(_stringOptions); option && (option->second != NULL); option++) { + g_free(option->second); + } + } + CAF_CM_CATCH_ALL + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CCmdLineOptions::initialize( + const std::string& cmdDescription, + const uint32 maxOptions) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(cmdDescription); + CAF_CM_VALIDATE_POSITIVE(maxOptions); + + _cmdDescription = cmdDescription; + _maxOptions = maxOptions; + _gOptions = new GOptionEntry[_maxOptions + 1]; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CCmdLineOptions::addStringOption( + const std::string& longName, + const char shortName, + const std::string& optionDescription) { + CAF_CM_FUNCNAME_VALIDATE("addStringOption"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + CAF_CM_VALIDATE_STRING(optionDescription); + + checkOptionCnt(longName, _optionCnt, _maxOptions); + populateOption(_gOptions[_optionCnt], longName, shortName, optionDescription); + + _stringOptions.insert(std::make_pair(longName, static_cast(NULL))); + _gOptions[_optionCnt].arg_data = &(_stringOptions.find(longName)->second); + _gOptions[_optionCnt].arg = G_OPTION_ARG_STRING; + + _optionCnt++; + } + CAF_CM_EXIT; +} + +void CCmdLineOptions::addIntOption( + const std::string& longName, + const char shortName, + const std::string& optionDescription) { + CAF_CM_FUNCNAME_VALIDATE("addIntOption"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + CAF_CM_VALIDATE_STRING(optionDescription); + + checkOptionCnt(longName, _optionCnt, _maxOptions); + populateOption(_gOptions[_optionCnt], longName, shortName, optionDescription); + + _intOptions.insert(std::make_pair(longName, 0)); + _gOptions[_optionCnt].arg_data = &(_intOptions.find(longName)->second); + _gOptions[_optionCnt].arg = G_OPTION_ARG_INT; + + _optionCnt++; + } + CAF_CM_EXIT; +} + +void CCmdLineOptions::addBoolOption( + const std::string& longName, + const char shortName, + const std::string& optionDescription) { + CAF_CM_FUNCNAME_VALIDATE("addBoolOption"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + CAF_CM_VALIDATE_STRING(optionDescription); + + checkOptionCnt(longName, _optionCnt, _maxOptions); + populateOption(_gOptions[_optionCnt], longName, shortName, optionDescription); + + _boolOptions.insert(std::make_pair(longName, FALSE)); + _gOptions[_optionCnt].arg_data = &(_boolOptions.find(longName)->second); + _gOptions[_optionCnt].arg = G_OPTION_ARG_NONE; + + _optionCnt++; + } + CAF_CM_EXIT; +} + +void CCmdLineOptions::parse( + int32 argc, + char* argv[]) { + CAF_CM_FUNCNAME("parse"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _gOptions[_optionCnt] = GOptionEntry(); + + GError *gError = NULL; + GOptionContext *gContext = g_option_context_new(_cmdDescription.c_str()); + g_option_context_add_main_entries(gContext, _gOptions, NULL); + if(!g_option_context_parse(gContext, &argc, &argv, &gError)) { + CAF_CM_VALIDATE_PTR(gError); + + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + g_error_free(gError); + g_option_context_free(gContext); + + CAF_CM_EXCEPTION_VA1(errorCode, "option parsing failed: %s", errorMessage.c_str()); + } + + g_option_context_free(gContext); + } + CAF_CM_EXIT; +} + +std::string CCmdLineOptions::findStringOption( + const std::string& longName) { + CAF_CM_FUNCNAME("findStringOption"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + + CStringOptions::const_iterator iter = _stringOptions.find(longName); + if(iter == _stringOptions.end()) { + CAF_CM_EXCEPTION_VA1(E_FAIL, "String option not found: %s", longName.c_str()); + } + + if(iter->second != NULL) { + rc = iter->second; + } + } + CAF_CM_EXIT; + + return rc; +} + +int32 CCmdLineOptions::findIntOption( + const std::string& longName) { + CAF_CM_FUNCNAME("findIntOption"); + + int32 rc = 0; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + + CIntOptions::const_iterator iter = _intOptions.find(longName); + if(iter == _intOptions.end()) { + CAF_CM_EXCEPTION_VA1(E_FAIL, "Int option not found: %s", longName.c_str()); + } + + rc = iter->second; + } + CAF_CM_EXIT; + + return rc; +} + +bool CCmdLineOptions::findBoolOption( + const std::string& longName) { + CAF_CM_FUNCNAME("findBoolOption"); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(longName); + + CBoolOptions::const_iterator iter = _boolOptions.find(longName); + if(iter == _boolOptions.end()) { + CAF_CM_EXCEPTION_VA1(E_FAIL, "Bool option not found: %s", longName.c_str()); + } + + rc = iter->second == GLIB_TRUE ? true : false; + } + CAF_CM_EXIT; + + return rc; +} + +void CCmdLineOptions::checkOptionCnt( + const std::string& longName, + const uint32 optionCnt, + const uint32 maxOptions) const { + CAF_CM_FUNCNAME("checkOptionCnt"); + + CAF_CM_ENTER { + if(optionCnt >= maxOptions) { + CAF_CM_EXCEPTION_VA3(E_INVALIDARG, "\"%s\" exceeded the maximum number of allowed options (%d >= %d)", + longName.c_str(), optionCnt, maxOptions); + } + } + CAF_CM_EXIT; +} + +void CCmdLineOptions::populateOption( + GOptionEntry& optionEntry, + const std::string& longName, + const char shortName, + const std::string& optionDescription) { + + CAF_CM_ENTER { + // We can't guarantee that longName's and optionDescription's scopes will be sufficient, so store the strings. + _longNames.push_back(longName); + _optionDescriptions.push_back(optionDescription); + + optionEntry.long_name = _longNames.back().c_str(); + optionEntry.short_name = shortName; + optionEntry.flags = 0; + optionEntry.description = _optionDescriptions.back().c_str(); + optionEntry.arg_description = NULL; + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParams.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParams.cpp new file mode 100644 index 000000000..94d53c312 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParams.cpp @@ -0,0 +1,98 @@ +/* + * Author: mdonahue + * Created: Jan 17, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CConfigParams.h" +#include "Exception/CCafException.h" +#include "Common/IConfigParams.h" + +using namespace Caf; + +CConfigParams::CConfigParams() : + _table(NULL), + CAF_CM_INIT("CConfigParams") { +} + +CConfigParams::~CConfigParams() { + if (_table) + g_hash_table_unref( _table); +} + +void CConfigParams::initialize( + const std::string& sectionName, + EKeyManagement keyManagement, + EValueManagement valueManagement) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISNOTINITIALIZED(_table); + CAF_CM_VALIDATE_STRING(sectionName); + _sectionName = sectionName; + _table = g_hash_table_new_full( + g_str_hash, + g_str_equal, + EKeysManaged == keyManagement ? destroyKeyCallback : NULL, + EValuesManaged == valueManagement ? destroyValueCallback : NULL); + } + CAF_CM_EXIT; +} + +void CConfigParams::insert(const char* key, GVariant* value) { + CAF_CM_FUNCNAME_VALIDATE("insert"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_table); + CAF_CM_VALIDATE_STRINGPTRA(key); + CAF_CM_VALIDATE_PTR(value); + g_hash_table_insert(_table, (void*)key, value); + } + CAF_CM_EXIT; +} + +GVariant* CConfigParams::lookup( + const char* key, + const EParamDisposition disposition) const { + CAF_CM_FUNCNAME("lookup"); + + GVariant* value = NULL; + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_table); + CAF_CM_VALIDATE_STRINGPTRA(key); + value = (GVariant*)g_hash_table_lookup(_table, key); + if (!value && (disposition == PARAM_REQUIRED)) { + CAF_CM_EXCEPTION_VA2( + ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + key, + _sectionName.c_str()); + } + } + CAF_CM_EXIT; + + return value; +} + +std::string CConfigParams::getSectionName() const { + CAF_CM_FUNCNAME_VALIDATE("getSectionName"); + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_table); + } + CAF_CM_EXIT; + return _sectionName; +} + +void CConfigParams::destroyKeyCallback(gpointer ptr) { + g_free(ptr); +} + +void CConfigParams::destroyValueCallback(gpointer ptr) { + g_variant_unref((GVariant*)ptr); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParamsChain.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParamsChain.cpp new file mode 100644 index 000000000..760719103 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CConfigParamsChain.cpp @@ -0,0 +1,72 @@ +/* + * Author: mdonahue + * Created: Jan 17, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CConfigParamsChain.h" +#include "Exception/CCafException.h" +#include "Common/IConfigParams.h" + +using namespace Caf; + +CConfigParamsChain::CConfigParamsChain() : + CAF_CM_INIT("CConfigParamsChain") { +} + +CConfigParamsChain::~CConfigParamsChain() { +} + +void CConfigParamsChain::initialize( + CConfigParams::EKeyManagement keyManagement, + CConfigParams::EValueManagement valueManagement, + const SmartPtrIConfigParams& baseParams) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_theseParams); + CAF_CM_VALIDATE_INTERFACE(baseParams); + + _baseParams = baseParams; + _theseParams.CreateInstance(); + _theseParams->initialize( + _baseParams->getSectionName(), + keyManagement, + valueManagement); +} + +void CConfigParamsChain::insert(const char* key, GVariant* value) { + CAF_CM_FUNCNAME_VALIDATE("insert"); + CAF_CM_PRECOND_ISINITIALIZED(_theseParams); + + _theseParams->insert(key, value); +} + +GVariant* CConfigParamsChain::lookup( + const char* key, + const EParamDisposition disposition) const { + CAF_CM_FUNCNAME("lookup"); + CAF_CM_PRECOND_ISINITIALIZED(_theseParams); + + GVariant* value = _theseParams->lookup(key, PARAM_OPTIONAL); + if (!value) { + value = _baseParams->lookup(key, PARAM_OPTIONAL); + } + + if (!value && (disposition == PARAM_REQUIRED)) { + CAF_CM_EXCEPTION_VA2( + ERROR_TAG_NOT_FOUND, + "Required config parameter [%s] is missing from section [%s]", + key, + _baseParams->getSectionName().c_str()); + } + + return value; +} + +std::string CConfigParamsChain::getSectionName() const { + CAF_CM_FUNCNAME_VALIDATE("lookup"); + CAF_CM_PRECOND_ISINITIALIZED(_theseParams); + + return _theseParams->getSectionName(); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.cpp new file mode 100644 index 000000000..98f850be7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.cpp @@ -0,0 +1,410 @@ +/* + * Author: mdonahue + * Created: Jun 9, 2011 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CLoggingUtils.h" +#include "CDaemonUtils.h" + +#include +#include +#include +#include +#include +#include + +#ifndef OPEN_MAX +#define OPEN_MAX 256 +#endif + +using namespace Caf; + +extern "C" void DaemonUtilsCrashHandler(int32 sigNum, siginfo_t *info, void *context); + +/////////////////////////////////////////////////////////////////////////////// +// +// MakeDaemon +// This function makes the process a daemon process +// +// NOTE: The following function has numerous coding standard violations that +// cannot be/should not be corrected by CAF common classes and macros. +// +/////////////////////////////////////////////////////////////////////////////// +void CDaemonUtils::MakeDaemon( + int32 argc, + char** argv, + const std::string& procPath, + const std::string& procName, + void(*pfnShutdownHandler)(int32 signalNum), + bool& isDaemonized, + bool& logInfos) { + + const std::string logProcName = procName.empty() ? "CDaemonUtils" : procName; + ::openlog(logProcName.c_str(), LOG_PID, LOG_USER); + ::atexit(::closelog); + ::syslog(LOG_INFO, "Initializing %s", logProcName.c_str()); + + isDaemonized = true; + logInfos = false; + bool enableCrashHandlers = true; + + std::string userName; + std::string groupName; + std::string rootDir; + int32 irc = 0; + while ((irc = ::getopt(argc, argv, "u:g:r:vnc")) != -1) { + switch (irc) { + case 'u': + userName = optarg; + break; + case 'g': + groupName = optarg; + break; + case 'r': + rootDir = optarg; + break; + case 'n': + isDaemonized = false; + break; + case 'c': + enableCrashHandlers = false; + break; + case 'v': + logInfos = true; + break; + default: + ::syslog(LOG_WARNING, "Unknown option '%c', ignoring", irc); + } + } + + if (logInfos) { + ::syslog( + LOG_INFO, + "Got user %s", + userName.empty() ? "" : userName.c_str()); + ::syslog( + LOG_INFO, + "Got group %s", + groupName.empty() ? "" : groupName.c_str()); + } + + if (isDaemonized) { + if (logInfos) { + ::syslog(LOG_INFO, "Daemonizing"); + } + + // This bizarre check is necessary because the console appender writes to stdout + // when a daemon, which messes up the listener some of the file reads - plus, it + // just doesn't make sense for a daemon to write to the console. + if (CLoggingUtils::isConsoleAppenderUsed()) { + ::syslog(LOG_ERR, "Daemon cannot use console appender"); + ::exit(2); + } + + // first fork ourselves off + if (logInfos) { + ::syslog(LOG_INFO, "Daemon forking"); + } + ::closelog(); + + int32 childPid = ::fork(); + if (childPid < 0) { + ::syslog(LOG_ERR, "Cannot fork child - %s", ::strerror(errno)); + ::exit(2); + } else if (childPid > 0) { + ::exit( 0 ); // we're done because we are the parent + } + + // so we are the child - setsid causes this process to be a new + // session leader, process group leader and has no controlling terminal + if (static_cast(-1) == ::setsid()) { + ::syslog( + LOG_ERR, + "Unable to become a session leader - %s", + ::strerror(errno)); + ::exit(2); + } + + // Ignore the signal from this parent terminating + ::signal(SIGHUP, SIG_IGN); + + // and fork again - puts the init process in charge of cleaning us up + childPid = ::fork(); + if (childPid < 0) { + syslog( LOG_ERR, "Cannot fork 2nd child - %s", ::strerror(errno)); + ::exit(2); + } else if (childPid > 0) { + ::exit( 0 ); // we're done because we are the first child + } + + // close any open file descriptors + int32 maxFd = ::sysconf(_SC_OPEN_MAX); + if (maxFd < 0) { + maxFd = OPEN_MAX; + } + + for (int32 fd = 0; fd < maxFd; ++fd) { + ::close(fd); + } + + // and re-open syslog + ::openlog(logProcName.c_str(), LOG_CONS | LOG_PID, LOG_USER); + errno = 0; + } + + // set a signal handler to catch SIGTERM & SIGINT + struct sigaction sigActionInfo; + if (pfnShutdownHandler) { + ::memset(&sigActionInfo, 0, sizeof(struct sigaction)); + sigActionInfo.sa_flags = 0; + sigActionInfo.sa_handler = pfnShutdownHandler; + sigemptyset(&sigActionInfo.sa_mask); + + if (-1 == ::sigaction(SIGTERM, &sigActionInfo, NULL)) { + ::syslog( + LOG_ERR, + "Unable to setup shutdown signal handler - %s", + ::strerror(errno)); + ::exit(2); + } + + if (-1 == ::sigaction(SIGINT, &sigActionInfo, NULL)) + { + ::syslog( + LOG_ERR, + "Unable to setup interrupt signal handler - %s", + ::strerror(errno)); + ::exit(2); + } + } else { + ::syslog(LOG_WARNING, "No shutdown handler function was supplied."); + } + + // ignore any terminal signals + #ifdef SIGTTOU + ::signal(SIGTTOU, SIG_IGN); + #endif + #ifdef SIGTTIN + ::signal(SIGTTIN, SIG_IGN); + #endif + #ifdef SIGTSTP + ::signal(SIGTSTP, SIG_IGN); + #endif + + // set us up as the specified group + if (!groupName.empty()) { + struct group* groupInfo = ::getgrnam(groupName.c_str()); + if (groupInfo) { + if (logInfos) { + ::syslog(LOG_INFO, "Switching to group %d", groupInfo->gr_gid); + } + if (0 != ::setgid(groupInfo->gr_gid)) { + ::syslog( + LOG_ERR, + "Unable to become group %s - %s", + groupName.c_str(), + ::strerror(errno)); + ::exit(2); + } + } else { + ::syslog( + LOG_ERR, + "Unable to find group info for %s - %s", + groupName.c_str(), + ::strerror(errno)); + ::exit(2); + } + } + + // set us up as the specified user + if (!userName.empty()) { + struct passwd * passwdInfo = ::getpwnam(userName.c_str()); + if (passwdInfo) { + if (logInfos) { + ::syslog(LOG_INFO, "Switching to user %d", passwdInfo->pw_uid); + } + if (0 != ::setuid(passwdInfo->pw_uid)) { + ::syslog( + LOG_ERR, + "Unable to become user %s - %s", + userName.c_str(), + ::strerror(errno)); + ::exit(2); + } + } else { + ::syslog( + LOG_ERR, + "Unable to find login info for %s - %s", + userName.c_str(), + ::strerror(errno)); + ::exit(2); + } + } + + // Move the current directory to the specified directory + // to make sure we don't hold a file system open. + if (rootDir.empty()) { + if (logInfos) { + ::syslog(LOG_INFO, "Switching to directory of %s", procPath.c_str()); + } + const char * lastSlash = ::strrchr(procPath.c_str(), '/'); + if (*lastSlash) { + std::string directory = procPath; + directory.erase(directory.rfind('/')); + if (logInfos) { + ::syslog(LOG_INFO, "chdir %s", directory.c_str()); + } + ::chdir(directory.c_str()); + } else { + if (logInfos) { + ::syslog(LOG_INFO, "chdir /"); + } + ::chdir("/"); + } + } else { + if (logInfos) { + ::syslog(LOG_INFO, "Switching to directory %s", rootDir.c_str()); + } + if (-1 == ::chdir(rootDir.c_str())) + { + ::syslog( + LOG_ERR, + "::chdir to %s failed - %s", + rootDir.c_str(), + ::strerror(errno)); + } + } + + // set our umask correctly - disable all world access + if (logInfos) { + ::syslog(LOG_INFO, "umask 0007"); + } + ::umask(0007); + + // boost our open file limit + struct rlimit rlimitInfo; + ::getrlimit(RLIMIT_NOFILE, &rlimitInfo); + if (rlimitInfo.rlim_cur < rlimitInfo.rlim_max) { + if (logInfos) { +#ifdef __x86_64__ + ::syslog( + LOG_INFO, + "rlimit change #files from %lld to %lld", + (long long) rlimitInfo.rlim_cur, + (long long) rlimitInfo.rlim_max); +#else + ::syslog( + LOG_INFO, + "rlimit change #files from %d to %d", + rlimitInfo.rlim_cur, + rlimitInfo.rlim_max); +#endif + } + rlimitInfo.rlim_cur = rlimitInfo.rlim_max; + ::setrlimit(RLIMIT_NOFILE, &rlimitInfo); + } else { + if (logInfos) { +#ifdef __x86_64__ + ::syslog( + LOG_INFO, + "rlimit #files already at maximum of %lld", + (long long) rlimitInfo.rlim_cur); +#else + ::syslog( + LOG_INFO, + "rlimit #files already at maximum of %d", + rlimitInfo.rlim_cur); +#endif + } + } + + if (enableCrashHandlers) + { + // Set up the crash handler + struct sigaction newAction; + struct sigaction oldAction; + ::memset(&newAction, 0, sizeof(struct sigaction)); + ::memset(&oldAction, 0, sizeof(struct sigaction)); + + newAction.sa_sigaction = DaemonUtilsCrashHandler; + newAction.sa_flags = SA_SIGINFO | SA_RESETHAND; + if (sigfillset(&newAction.sa_mask) == -1) { + ::syslog( + LOG_ERR, + "Unable to fill crash handler signal set - %s", + ::strerror(errno)); + } + else if (::sigaction(SIGILL, &newAction, &oldAction) == -1 || + ::sigaction(SIGSEGV, &newAction, &oldAction) == -1 || + ::sigaction(SIGFPE, &newAction, &oldAction) == -1 || + ::sigaction(SIGBUS, &newAction, &oldAction) == -1) + { + ::syslog( + LOG_ERR, + "Unable to set crash handler signal handler %s", + ::strerror(errno)); + } + } + + if (logInfos) + ::syslog(LOG_INFO, "Initialized"); +} + +extern "C" void DaemonUtilsCrashHandler(int32 sigNum, siginfo_t *info, void *context) +{ + CAF_CM_STATIC_FUNC_LOG("CDaemonUtils", "DaemonUtilsCrashHandler"); + + try { + std::string message("Got Signal "); + switch (sigNum) { + case SIGSEGV: + message += "[SEGV"; + break; + case SIGBUS: + message += "[BUS"; + break; + case SIGFPE: + message += "[FPE"; + break; + + case SIGILL: + message += "[ILL"; + break; + + default: + message += + "[UNKNOWN SIGNAL (" + + CStringConv::toString(sigNum) + + ")"; + break; + } + message += " code=" + CStringConv::toString(info->si_code) + "]"; + message += " Fault Addr[" + CStringConv::toString(info->si_addr) + "] "; + +#if defined ( __linux__ ) || defined ( __APPLE__ ) + Dl_info dlInfo; + if (0 != ::dladdr(info->si_addr, &dlInfo)) { + if (dlInfo.dli_fname != NULL) { + message += " Module ["; + message += dlInfo.dli_fname; + } + if (dlInfo.dli_sname != NULL) { + message += " Symbol ["; + message += dlInfo.dli_sname; + } + } +#else + #error "Need to determine if DlInfo is available" +#endif + + ::syslog(LOG_ERR, "%s", message.c_str()); + CAF_CM_LOG_ERROR_VA0(message.c_str()); + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; + ::exit(-1); +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.h new file mode 100644 index 000000000..73349ee90 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDaemonUtils.h @@ -0,0 +1,25 @@ +/* + * Author: mdonahue + * Created: Jun 9, 2011 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CDAEMONUTILS_H_ +#define CDAEMONUTILS_H_ + +class CDaemonUtils { +public: + static void MakeDaemon( + int32 argc, + char** argv, + const std::string& procPath, + const std::string& procName, + void(*pfnShutdownHandler)(int32 signalNum), + bool& isDaemonized, + bool& logInfos); + + CAF_CM_DECLARE_NOCREATE(CDaemonUtils); +}; + +#endif /* CDAEMONUTILS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.cpp new file mode 100644 index 000000000..2bb2e4ec3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.cpp @@ -0,0 +1,105 @@ +/*k + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#ifndef WIN32 +#include +#endif +#include "CDateTimeUtils.h" + +using namespace Caf; + +#ifdef WIN32 +#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 + +int32 CDateTimeUtils::getTimeOfDay(struct timeval *tv, struct timezone *tz) { + FILETIME ft; + unsigned __int64 tmpres = 0; + static int32 tzflag; + + if (NULL != tv) + { + ::GetSystemTimeAsFileTime(&ft); + + tmpres |= ft.dwHighDateTime; + tmpres <<= 32; + tmpres |= ft.dwLowDateTime; + + /*converting file time to unix epoch*/ + tmpres -= DELTA_EPOCH_IN_MICROSECS; + tmpres /= 10; /*convert into microseconds*/ + tv->tv_sec = (int32)(tmpres / 1000000UL); + tv->tv_usec = (int32)(tmpres % 1000000UL); + } + + if (NULL != tz) + { + if (!tzflag) + { + _tzset(); + tzflag++; + } + long minuteswest = 0; + ::_get_timezone(&minuteswest); + tz->tz_minuteswest = minuteswest / 60; + int32 dstHours = 0; + ::_get_daylight(&dstHours); + tz->tz_dsttime = dstHours == 0 ? 0 : 1; + } + + return 0; +} +#else +int32 CDateTimeUtils::getTimeOfDay(struct timeval *tv, struct timezone *tz) { + return ::gettimeofday(tv, tz); +} +#endif + +uint64 CDateTimeUtils::getTimeMs() { + CAF_CM_STATIC_FUNC("CDateTimeUtils", "getTimeMs"); + + timeval curTime; + if(-1 == getTimeOfDay(&curTime, NULL)) { + const int32 errorCode = errno; + CAF_CM_EXCEPTION_VA0(errorCode, "getTimeOfDay failed"); + } + + return (curTime.tv_sec * 1000) + (curTime.tv_usec / 1000); +} + +uint64 CDateTimeUtils::calcRemainingTime( + const uint64 begTimeMs, + const uint64 totalMs) { + CAF_CM_STATIC_FUNC_VALIDATE("CDateTimeUtils", "calcRemainingTime"); + + const uint64 diffTimeMs = CDateTimeUtils::getTimeMs() - begTimeMs; + CAF_CM_VALIDATE_NONNEGATIVE_INT64(diffTimeMs); + + uint64 rc = 0; + if(totalMs > diffTimeMs) { + rc = totalMs - diffTimeMs; + } + + return rc; +} + +std::string CDateTimeUtils::getCurrentDateTime() { + time_t now; + ::time(&now); + char buf[sizeof "0000-00-00T00:00:00Z"]; + tm result; +#ifdef WIN32 + ::gmtime_s(&result, &now); + ::strftime(buf, sizeof buf, "%Y-%m-%dT%H:%M:%SZ", &result); +#else + ::gmtime_r(&now, &result); + ::strftime(buf, sizeof buf, "%FT%TZ", &result); +#endif + + return buf; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.h new file mode 100644 index 000000000..57286e883 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CDateTimeUtils.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CDateTimeUtils_H_ +#define CDateTimeUtils_H_ + +#ifndef WIN32 +#include +#else +#include +#endif + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CDateTimeUtils { +public: + static uint64 getTimeMs(); + + static uint64 calcRemainingTime( + const uint64 begTimeMs, + const uint64 totalMs); + + static int32 getTimeOfDay(struct timeval *tv, struct timezone *tz); + + static std::string getCurrentDateTime(); + +private: + CAF_CM_DECLARE_NOCREATE(CDateTimeUtils); +}; + +} + +#endif /* CDateTimeUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.cpp new file mode 100644 index 000000000..b8eb9ffc5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CEnvironmentUtils.h" +using namespace Caf; + + +void CEnvironmentUtils::readEnvironmentVar(const char* varname, std::string& rValue) { + CAF_CM_STATIC_FUNC_VALIDATE("CEnvironmentUtils", "readEnvironmentVar"); + CAF_CM_VALIDATE_PTR(varname); + #ifdef WIN32 + char* dupEnvBuf = NULL; + size_t dupEnvBufLen = 0; + errno_t apiRc = ::_dupenv_s(&dupEnvBuf, &dupEnvBufLen, varname); + rValue = std::string(dupEnvBuf && ::strlen(dupEnvBuf) ? dupEnvBuf : ""); + ::free(dupEnvBuf); + dupEnvBuf = NULL; + #else + const char *prValue = ::getenv(varname); + if (NULL != prValue) { + rValue = prValue; + } + #endif +} + +void CEnvironmentUtils::writeEnvironmentVar(const char* varname, std::string& rValue) { + CAF_CM_STATIC_FUNC_VALIDATE("CEnvironmentUtils", "writeEnvironmentVar"); + CAF_CM_VALIDATE_PTR(varname); + #ifdef WIN32 + std::ostringstream formattedStream; + formattedStream << std::string(varname) << std::string("=") << rValue; + ::_putenv(formattedStream.str().c_str()); + #else + // Not Implemented + #endif +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.h new file mode 100644 index 000000000..121affe76 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CEnvironmentUtils.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CENVIRONMENTUTILS_H_ +#define CENVIRONMENTUTILS_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CEnvironmentUtils { +public: + + static void readEnvironmentVar(const char* varname, std::string& rValue); + static void writeEnvironmentVar(const char* varname, std::string& rValue); + +private: + CAF_CM_DECLARE_NOCREATE(CEnvironmentUtils); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLock.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLock.cpp new file mode 100644 index 000000000..c38854f05 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileLock.cpp @@ -0,0 +1,178 @@ +/* + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CFileLock.h" +#include "Exception/CCafException.h" +#include +#include +#include +#include + +using namespace Caf; + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::CFileLock() +// +//////////////////////////////////////////////////////////////////////// +CFileLock::CFileLock() : + CAF_CM_INIT("CFileLock"), + _isInitialized(false), + _isFileDescriptorLocal(false), + _fileDescriptor(-1), + _lockLevel(UNLOCK) { +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::~CFileLock() +// +//////////////////////////////////////////////////////////////////////// +CFileLock::~CFileLock() { + CAF_CM_FUNCNAME("~CFileLock"); + try { + if (_isInitialized) { + setLockLevel(UNLOCK, true); + if (_isFileDescriptorLocal) + ::close(_fileDescriptor); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::Initialize() +// +//////////////////////////////////////////////////////////////////////// +void CFileLock::initialize(int32 iFileDescriptor) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _lockLevel = UNLOCK; + _fileDescriptor = iFileDescriptor; + _isFileDescriptorLocal = false; + _isInitialized = true; +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::Initialize() +// +//////////////////////////////////////////////////////////////////////// +void CFileLock::initialize(const char* cszFilename, bool bCreateFile) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRINGPTRA(cszFilename); + + int32 iFlags = bCreateFile ? O_RDWR | O_CREAT : O_RDWR; + int32 iFileDescriptor = ::open(cszFilename, iFlags, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); + + if (-1 != iFileDescriptor) { + _lockLevel = UNLOCK; + _fileDescriptor = iFileDescriptor; + _isFileDescriptorLocal = true; + _isInitialized = true; + } + else { + int32 iRc = errno; + CAF_CM_EXCEPTION_VA1(iRc, "Unable to open file %s", cszFilename); + } +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::GetLockLevel() +// +//////////////////////////////////////////////////////////////////////// +CFileLock::ELockLevel CFileLock::getLockLevel() const { + CAF_CM_FUNCNAME_VALIDATE("getLockLeve"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _lockLevel; +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::SetLockLevel() +// +//////////////////////////////////////////////////////////////////////// +void CFileLock::setLockLevel(ELockLevel eLockLevel, bool bDowngradeLock) { + CAF_CM_FUNCNAME("setLockLeve"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + bool bLockChangeOK = true; + // determine if we are attempting to downgrade an existing lock + if (!bDowngradeLock) { + if (eLockLevel <= _lockLevel) { + bLockChangeOK = false; + } + } + + if (bLockChangeOK && (eLockLevel != _lockLevel)) { + struct flock stFlock; + ::memset(&stFlock, 0, sizeof(stFlock)); + stFlock.l_whence = SEEK_SET; + stFlock.l_start = 0; + stFlock.l_len = 1; + if (SHARED_LOCK == eLockLevel) + stFlock.l_type = F_RDLCK; + else if (EXCLUSIVE_LOCK == eLockLevel) + stFlock.l_type = F_WRLCK; + else + stFlock.l_type = F_UNLCK; + + if (-1 != ::fcntl(_fileDescriptor, F_SETLKW, &stFlock)) { + _lockLevel = eLockLevel; + } + else { + CAF_CM_EXCEPTION_VA0(errno, "Unable to modify lock"); + } + } +} + +//////////////////////////////////////////////////////////////////////// +// +// CFileLock::AttemptSetLockLevel() +// +//////////////////////////////////////////////////////////////////////// +bool CFileLock::attemptSetLockLevel(ELockLevel eLockLevel, bool bDowngradeLock) { + CAF_CM_FUNCNAME("attemptSetLockLeve"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + bool bRet = false; + bool bLockChangeOK = true; + + // determine if we are attempting to downgrade an existing lock + if (!bDowngradeLock) { + if (eLockLevel <= _lockLevel) { + bLockChangeOK = false; + } + } + + if (bLockChangeOK && (eLockLevel != _lockLevel)) { + struct flock stFlock; + ::memset(&stFlock, 0, sizeof(stFlock)); + stFlock.l_whence = SEEK_SET; + stFlock.l_start = 0; + stFlock.l_len = 1; + if (SHARED_LOCK == eLockLevel) + stFlock.l_type = F_RDLCK; + else if (EXCLUSIVE_LOCK == eLockLevel) + stFlock.l_type = F_WRLCK; + else + stFlock.l_type = F_UNLCK; + + if (-1 != ::fcntl(_fileDescriptor, F_SETLK, &stFlock)) { + _lockLevel = eLockLevel; + bRet = true; + } + else if ((EACCES != errno) && (EAGAIN != errno)) { + CAF_CM_EXCEPTION_VA0(errno, "Unable to modify lock"); + } + } + + return bRet; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.cpp new file mode 100644 index 000000000..38435f2d6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.cpp @@ -0,0 +1,1291 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Exception/CCafException.h" +#include "CFileSystemUtils.h" +#include "../Collections/Iterators/IteratorsInc.h" +#ifdef WIN32 + #include +#endif + +#ifdef __linux__ +#include +#include +#endif + +#include +#include + +using namespace Caf; + +const std::string FileSystemUtils::REGEX_MATCH_ALL; + +void FileSystemUtils::createDirectory( + const std::string& path, + const uint32 mode/* = 0770*/) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "createDirectory"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(doesDirectoryExist(path)) { + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + ERROR_ALREADY_EXISTS, + "Directory exists: %s", + path.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA1("Creating directory - %s", path.c_str()); + int32 rc = g_mkdir_with_parents(path.c_str(), mode); + if(rc < 0) { + rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc, + "Unable to create directory: %s", + path.c_str()); + } + } + } + CAF_CM_EXIT; +} + +void FileSystemUtils::removeDirectory( + const std::string& path) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "removeDirectory"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(doesDirectoryExist(path)) { + CAF_CM_LOG_DEBUG_VA1("Removing directory - %s", path.c_str()); + int32 rc = g_rmdir(path.c_str()); + if(rc < 0) { + rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc, + "Failed to remove directory: %s", + path.c_str()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Directory does not exist: %s", + path.c_str()); + } + } + CAF_CM_EXIT; +} + +void FileSystemUtils::recursiveRemoveDirectory(const std::string& path) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "recursiveRemoveDirectory"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(doesDirectoryExist(path)) { + DirectoryItems items = itemsInDirectory(path, REGEX_MATCH_ALL); + + // Delete subdirs first + for (TConstIterator directory(items.directories); directory; directory++) { + recursiveRemoveDirectory(path + G_DIR_SEPARATOR_S + *directory); + } + + // Delete files + for (TConstIterator file(items.files); file; file++) { + removeFile(path + G_DIR_SEPARATOR_S + *file); + } + + // Delete directory + removeDirectory(path); + } else { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Directory does not exist: %s", + path.c_str()); + } + } + CAF_CM_EXIT; +} + +void FileSystemUtils::removeFile( + const std::string& path) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "removeFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(doesFileExist(path)) { + CAF_CM_LOG_DEBUG_VA1("Removing file - %s", path.c_str()); + int32 rc = g_remove(path.c_str()); + if(rc < 0) { + rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc,"Failed to remove file: %s", + path.c_str()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "File does not exist: %s", + path.c_str()); + } + } + CAF_CM_EXIT; +} + +FileSystemUtils::Files FileSystemUtils::removeFilesInDirectory( + const std::string& path, + const std::string& regex) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "removeFilesInDirectory"); + + Files rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(doesDirectoryExist(path)) { + DirectoryItems items = itemsInDirectory(path, regex); + for (TConstIterator file(items.files); file; file++) { + removeFile(path + G_DIR_SEPARATOR_S + *file); + rc.push_back(*file); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Directory does not exist: %s", + path.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +bool FileSystemUtils::doesFileExist( + const std::string& path) { + CAF_CM_STATIC_FUNC_VALIDATE( "FileSystemUtils", "doesFileExist" ); + CAF_CM_VALIDATE_STRING(path); + + return isRegularFile(path); +} + +bool FileSystemUtils::doesDirectoryExist( + const std::string& path) { + + CAF_CM_STATIC_FUNC_LOG_VALIDATE( "FileSystemUtils", "doesDirectoryExist" ); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + rc = (GLIB_TRUE == g_file_test(path.c_str(), G_FILE_TEST_IS_DIR)); + } + CAF_CM_EXIT; + + return rc; +} + +bool FileSystemUtils::isRegularFile( + const std::string& path) { + + CAF_CM_STATIC_FUNC_VALIDATE( "FileSystemUtils", "isRegularFile" ); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + // Test to make sure the source is a regular file (or symlink to one), not a directory + rc = (g_file_test(path.c_str(), G_FILE_TEST_IS_REGULAR) == GLIB_TRUE); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::getCurrentDir() { + return getDirname(getCurrentFile()); +} + +std::string FileSystemUtils::getCurrentFile() { + std::string fileName; + CEcmDllManager::GetLibraryNameFromHandle(NULL, fileName); + + return fileName; +} + +std::string FileSystemUtils::getBasename( + const std::string& path) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "getBasename" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + gchar* basename = g_path_get_basename(path.c_str()); + if(NULL == basename) { + CAF_CM_EXCEPTION_EFAIL( "g_path_get_basename Failed: " + path); + } + + rc = basename; + g_free(basename); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::getDirname( + const std::string& path) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "getDirname" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + gchar* dirname = g_path_get_dirname(path.c_str()); + if(NULL == dirname) { + CAF_CM_EXCEPTION_EFAIL( "g_path_get_dirname Failed: " + path); + } + + rc = dirname; + g_free(dirname); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::getTmpDir() { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "getTmpDir" ); + + std::string rc; + + CAF_CM_ENTER { + const gchar* tmpDir = g_get_tmp_dir(); + if(NULL == tmpDir) { + CAF_CM_EXCEPTION_EFAIL( "g_get_tmp_dir Failed"); + } else { + // Trim trailing slash + rc = tmpDir; + rc.erase(rc.find_last_not_of(G_DIR_SEPARATOR)+1); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::buildPath( + const std::string& path, + const std::string& newElement) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "buildPath" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + CAF_CM_VALIDATE_STRING(newElement); + + gchar* newPath = g_build_filename(path.c_str(), newElement.c_str(), NULL); + if(NULL == newPath) { + CAF_CM_EXCEPTION_VA2(E_FAIL, "g_build_filename Failed: %s, %s", path.c_str(), newElement.c_str()); + } + + rc = normalizePathForPlatform(newPath); + g_free(newPath); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "buildPath" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + CAF_CM_VALIDATE_STRING(newElement1); + CAF_CM_VALIDATE_STRING(newElement2); + + gchar* newPath = g_build_filename(path.c_str(), newElement1.c_str(), newElement2.c_str(), NULL); + if(NULL == newPath) { + CAF_CM_EXCEPTION_VA3(E_FAIL, "g_build_filename Failed: %s, %s, %s", path.c_str(), newElement1.c_str(), newElement2.c_str()); + } + + rc = normalizePathForPlatform(newPath); + g_free(newPath); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2, + const std::string& newElement3) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "buildPath" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + CAF_CM_VALIDATE_STRING(newElement1); + CAF_CM_VALIDATE_STRING(newElement2); + CAF_CM_VALIDATE_STRING(newElement3); + + gchar* newPath = g_build_filename( + path.c_str(), newElement1.c_str(), newElement2.c_str(), newElement3.c_str(), NULL); + if(NULL == newPath) { + CAF_CM_EXCEPTION_VA4(E_FAIL, + "g_build_filename Failed: %s, %s, %s, %s", + path.c_str(), newElement1.c_str(), newElement2.c_str(), newElement3.c_str()); + } + + rc = normalizePathForPlatform(newPath); + g_free(newPath); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2, + const std::string& newElement3, + const std::string& newElement4) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "buildPath" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + CAF_CM_VALIDATE_STRING(newElement1); + CAF_CM_VALIDATE_STRING(newElement2); + CAF_CM_VALIDATE_STRING(newElement3); + CAF_CM_VALIDATE_STRING(newElement4); + + gchar* newPath = g_build_filename( + path.c_str(), newElement1.c_str(), newElement2.c_str(), newElement3.c_str(), newElement4.c_str(), NULL); + if(NULL == newPath) { + CAF_CM_EXCEPTION_VA5(E_FAIL, + "g_build_filename Failed: %s, %s, %s, %s, %s", + path.c_str(), newElement1.c_str(), newElement2.c_str(), newElement3.c_str(), newElement4.c_str()); + } + + rc = normalizePathForPlatform(newPath); + g_free(newPath); + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::loadTextFile( + const std::string& path) { + CAF_CM_STATIC_FUNC( "FileSystemUtils", "loadTextFile" ); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + // Throw an exception if the file doesn't exist. + if (!doesFileExist(path)) { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "The file '%s' does not exist.", + path.c_str()); + } + + // Read in the contents of the file. Since this is a text file, it's terminated with NULL + // so we needn't pass the length. + GError *gError = NULL; + gchar *fileContents = NULL; + const bool isSuccessful = g_file_get_contents(path.c_str(), &fileContents, NULL, &gError); + + // If the call wasn't successful, throw an exception with the error information. + if(! isSuccessful) { + CAF_CM_VALIDATE_PTR(gError); + + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + g_error_free(gError); + + CAF_CM_EXCEPTIONEX_VA2( + IOException, + errorCode, + "g_file_get_contents Failed: %s File: %s", + errorMessage.c_str(), + path.c_str()); + } + + if (fileContents && ::strlen(fileContents)) { + rc = fileContents; + } + g_free(fileContents); + } + CAF_CM_EXIT; + + return rc; +} + +Cdeqstr FileSystemUtils::loadTextFileIntoColl( + const std::string& path) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "loadTextFileIntoColl"); + CAF_CM_VALIDATE_STRING(path); + + // Throw an exception if the file doesn't exist. + if (!doesFileExist(path)) { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "The file '%s' does not exist.", + path.c_str()); + } + + std::ifstream fileStream(path.c_str()); + if (! fileStream.is_open()) { + CAF_CM_EXCEPTION_VA1(E_UNEXPECTED, + "Error opening file - %s", path.c_str()); + } + + Cdeqstr rc; + std::string line; + while(std::getline(fileStream, line)) { + rc.push_back(line); + } + + if (fileStream.bad()) { + CAF_CM_EXCEPTION_VA1(E_UNEXPECTED, + "Error reading file - %s", path.c_str()); + } + + return rc; +} + +SmartPtrCDynamicByteArray FileSystemUtils::loadByteFile( + const std::string& path) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "loadByteFile"); + + SmartPtrCDynamicByteArray rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + // Throw an exception if the file doesn't exist. + if (!doesFileExist(path)) { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "The file '%s' does not exist.", + path.c_str()); + } + + // Read in the contents of the file. Since this is a text file, it's terminated with NULL + // so we needn't pass the length. + GError *gError = NULL; + gchar *fileContents = NULL; + gsize fileContentsLen = 0; + const bool isSuccessful = g_file_get_contents( + path.c_str(), &fileContents, &fileContentsLen, &gError); + + // If the call wasn't successful, throw an exception with the error information. + if(! isSuccessful) { + CAF_CM_VALIDATE_PTR(gError); + + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + g_error_free(gError); + + CAF_CM_EXCEPTIONEX_VA2( + IOException, + errorCode, + "g_file_get_contents Failed: %s File: %s", + errorMessage.c_str(), + path.c_str()); + } + + if (fileContents && fileContentsLen) { + rc.CreateInstance(); + rc->allocateBytes(static_cast(fileContentsLen)); + rc->memCpy(fileContents, static_cast(fileContentsLen)); + } + g_free(fileContents); + } + CAF_CM_EXIT; + + return rc; +} + +void FileSystemUtils::saveTextFile( + const std::string& outputDir, + const std::string& filename, + const std::string& contents, + const FILE_MODE_TYPE fileMode/* = FILE_MODE_REPLACE*/, + const std::string temporaryFileSuffix/* = ".tmp"*/) { + CAF_CM_STATIC_FUNC_VALIDATE("FileSystemUtils", "saveTextFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(outputDir); + CAF_CM_VALIDATE_STRING(filename); + CAF_CM_VALIDATE_STRING(contents); + + const std::string filePath = buildPath(outputDir, filename); + saveTextFile(filePath, contents, fileMode, temporaryFileSuffix); + } + CAF_CM_EXIT; +} + +void FileSystemUtils::saveTextFile( + const std::string& filePath, + const std::string& contents, + const FILE_MODE_TYPE fileMode/* = FILE_MODE_REPLACE*/, + const std::string temporaryFileSuffix/* = ".tmp"*/) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "saveTextFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_STRING(contents); + + saveByteFile(filePath, reinterpret_cast(contents.c_str()), + contents.length(), fileMode, temporaryFileSuffix); + } + CAF_CM_EXIT; +} + +void FileSystemUtils::saveByteFile( + const std::string& filePath, + const SmartPtrCDynamicByteArray& contents, + const FILE_MODE_TYPE fileMode/* = FILE_MODE_REPLACE*/, + const std::string temporaryFileSuffix/* = ".tmp"*/) { + CAF_CM_STATIC_FUNC_VALIDATE("FileSystemUtils", "saveByteFile"); + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_SMARTPTR(contents); + // temporaryFileSuffix is optional + + saveByteFile(filePath, contents->getPtr(), contents->getByteCount(), + fileMode, temporaryFileSuffix); +} + +void FileSystemUtils::saveByteFile( + const std::string& filePath, + const byte* contents, + const size_t& contentsLen, + const FILE_MODE_TYPE fileMode/* = FILE_MODE_REPLACE*/, + const std::string temporaryFileSuffix/* = ".tmp"*/) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "saveByteFile"); + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_PTR(contents); + // temporaryFileSuffix is optional + + const std::string fileDir = getDirname(filePath); + if (! doesDirectoryExist(fileDir)) { + createDirectory(fileDir); + } + + bool fileExists = doesFileExist(filePath); + switch (fileMode) { + case FILE_MODE_REPLACE: + if (fileExists) { + CAF_CM_LOG_DEBUG_VA1("Replacing file - %s", filePath.c_str()); + } + saveFileSafely(filePath, contents, contentsLen, temporaryFileSuffix); + break; + case FILE_MODE_IGNORE: + if (fileExists) { + CAF_CM_LOG_WARN_VA1("Ignoring file - %s", filePath.c_str()); + } else { + saveFileSafely(filePath, contents, contentsLen, temporaryFileSuffix); + } + break; + case FILE_MODE_FAIL: + if (fileExists) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_EXISTS, "File exists - %s", + filePath.c_str()); + } + saveFileSafely(filePath, contents, contentsLen, temporaryFileSuffix); + break; + } +} + +void FileSystemUtils::saveFileSafely( + const std::string& filePath, + const byte* contents, + const size_t& contentsLen, + const std::string& temporaryFileSuffix) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "saveFileSafely"); + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_PTR(contents); + // temporaryFileSuffix is optional + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + if (temporaryFileSuffix.empty()) { + saveByteFileRaw(filePath, contents, contentsLen); + } else { + const std::string filePathTmp = filePath + temporaryFileSuffix; + saveByteFileRaw(filePathTmp, contents, contentsLen); + moveFile(filePathTmp, filePath); + } +} + +void FileSystemUtils::saveByteFileRaw( + const std::string& path, + const byte* contents, + const size_t& contentsLen) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "saveByteFileRaw"); + CAF_CM_VALIDATE_STRING(path); + CAF_CM_VALIDATE_PTR(contents); + + GError *gError = NULL; + const bool isSuccessful = g_file_set_contents( + path.c_str(), reinterpret_cast(contents), contentsLen, &gError); + + // If the call wasn't successful, throw an exception with the error information. + if(! isSuccessful) { + CAF_CM_VALIDATE_PTR(gError); + + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + g_error_free(gError); + + CAF_CM_EXCEPTIONEX_VA2( + IOException, + errorCode, + "g_file_set_contents Failed: %s File: %s", + errorMessage.c_str(), + path.c_str()); + } +} + +FileSystemUtils::DirectoryItems FileSystemUtils::itemsInDirectory( + const std::string& path, + const std::string& regex) { + + CAF_CM_STATIC_FUNC( "FileSystemUtils", "itemsInDirectory" ); + + DirectoryItems rc; + GDir *gDir = NULL; + GError *gError = NULL; + GRegex *gRegex = NULL; + + try { + CAF_CM_VALIDATE_STRING(path); + + if(! doesDirectoryExist(path)) { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Directory does not exist: %s", + path.c_str()); + } + + gDir = g_dir_open(path.c_str(), 0, &gError); + if(NULL == gDir) { + const std::string errorMessage = (gError == NULL) ? "" : gError->message; + const int32 errorCode = (gError == NULL) ? 0 : gError->code; + + CAF_CM_EXCEPTIONEX_VA2( + IOException, + errorCode, + "Failed to open directory \"%s\": %s", + path.c_str(), + errorMessage.c_str()); + } + + if(regex.compare(REGEX_MATCH_ALL) != 0) { + gRegex = g_regex_new(regex.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &gError); + if(gError) { + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + CAF_CM_EXCEPTIONEX_VA2(IOException, errorCode, + "g_regex_new Failed: %s regex: %s", + errorMessage.c_str(), + regex.c_str()); + } + } + + for(const gchar* filename = g_dir_read_name(gDir); + filename != NULL; + filename = g_dir_read_name(gDir)) { + std::string fullPath(path); + fullPath += G_DIR_SEPARATOR_S; + fullPath += filename; + bool isDirectory = g_file_test(fullPath.c_str(), G_FILE_TEST_IS_DIR); + + if (gRegex) { + if (g_regex_match(gRegex, + filename, + (GRegexMatchFlags)0, + NULL)) { + if (isDirectory) { + rc.directories.push_back(filename); + } else { + rc.files.push_back(filename); + } + } + } else { + if (isDirectory) { + rc.directories.push_back(filename); + } else { + rc.files.push_back(filename); + } + } + } + + if(gError != NULL) { + g_error_free(gError); + } + if(gDir != NULL) { + g_dir_close(gDir); + } + if(gRegex != NULL) { + g_regex_unref(gRegex); + } + } + catch(...) { + if(gError != NULL) { + g_error_free(gError); + } + if(gDir != NULL) { + g_dir_close(gDir); + } + if(gRegex != NULL) { + g_regex_unref(gRegex); + } + throw; + } + + return rc; +} + +FileSystemUtils::PathAndDirectoryItemsCollection +FileSystemUtils::recursiveItemsInDirectory(const std::string& path, const std::string& regex) { + PathAndDirectoryItemsCollection rc; + + CAF_CM_ENTER { + DirectoryItems items = itemsInDirectory(path, regex); + rc.push_back(PathAndDirectoryItems(path, items)); + + for (TConstIterator subdir(items.directories); subdir; subdir++) { + std::string subdirPath = buildPath(path, *subdir); + PathAndDirectoryItemsCollection subitems = recursiveItemsInDirectory(subdirPath, regex); + rc.insert(rc.end(), subitems.begin(), subitems.end()); + } + } + CAF_CM_EXIT; + + return rc; +} + +void FileSystemUtils::copyFile(const std::string& srcPath, const std::string& dstPath) { + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "copyFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(srcPath); + CAF_CM_VALIDATE_STRING(dstPath); + + // Test to make sure the source is a regular file (or symlink to one), not a directory + if (! isRegularFile(srcPath)) { + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + 0, + "Source is not a regular file: %s", + srcPath.c_str()); + } + + const std::string dstDir = getDirname(dstPath); + if (!doesDirectoryExist(dstDir)) { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Destination path does not exist: %s", + dstDir.c_str()); + } + +#if defined (__linux__) || defined (__APPLE__) + int32 infd = -1; + int32 outfd = -1; + try { + // Determine the stats of the source file, for use with output file later + struct stat srcStat; + if (::stat(srcPath.c_str(), &srcStat) != 0) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc, + "::stat %s failed", + srcPath.c_str()); + } + + infd = ::open(srcPath.c_str(), O_RDONLY); + if (infd == -1) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc, + "Unable to open %s for reading", + srcPath.c_str()); + } + + // Open output file write-only for user, initially, and set to source file's mode bits later + outfd = ::open(dstPath.c_str(), O_WRONLY | O_CREAT, S_IWUSR); + if (outfd == -1) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA1( + IOException, + rc, + "Unable to open %s for writing", + dstPath.c_str()); + } + + // Arbitrary size for the data buffer to use for the copy + const int32 buff_size = 65536; + + byte buffer[buff_size]; + ssize_t index = 0; + // Loop until we've processed the whole file + while (index < srcStat.st_size) { + ssize_t bytesRead = ::read(infd, buffer, buff_size); + if (bytesRead > 0) { + ssize_t writeIndex = 0; + // Loop until we've written out all the buffer + while (writeIndex < bytesRead) { + // If we're part way done, write from where we left off, but with a smaller number of bytes left + ssize_t bytesWritten = ::write(outfd, buffer + writeIndex, bytesRead - writeIndex); + if (bytesWritten < 0) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA2( + IOException, + rc, + "Unable to write to %s (index = %d)", + dstPath.c_str(), + writeIndex); + } + writeIndex += bytesWritten; + } + index += bytesRead; + } else if (bytesRead < 0) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA2( + IOException, + rc, + "Unable to read from %s at offset %d", + srcPath.c_str(), + index); + } + + } + if (outfd != -1) { + // Lastly, update the mode bits on the destination file to be the same as the source + ::fchmod(outfd, srcStat.st_mode); + } + } + CAF_CM_CATCH_ALL; + + if (infd != -1) { + ::close(infd); + } + if (outfd != -1) { + ::close(outfd); + } + CAF_CM_THROWEXCEPTION; +#elif defined(WIN32) + const std::wstring wSrcPath = CStringUtils::convertNarrowToWide(srcPath); + const std::wstring wDstPath = CStringUtils::convertNarrowToWide(dstPath); + BOOL bRc = ::CopyFileW( + wSrcPath.c_str(), + wDstPath.c_str(), + TRUE); + if (!bRc) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + CAF_CM_EXCEPTIONEX_VA3( + IOException, + lastError, + "Failed to copy file %s to %s - %s", + srcPath.c_str(), + dstPath.c_str(), + errorMsg.c_str()); + } +#else +#error not implemented +#endif + } + CAF_CM_EXIT; +} + +void FileSystemUtils::moveFile(const std::string& srcPath, const std::string& dstPath) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "moveFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(srcPath); + CAF_CM_VALIDATE_STRING(dstPath); + + if (!doesFileExist(srcPath)) { + CAF_CM_EXCEPTIONEX_VA1( + FileNotFoundException, + 0, + "Source file does not exist: %s", + srcPath.c_str()); + } + if (!doesDirectoryExist(getDirname(dstPath))) { + createDirectory(getDirname(dstPath)); + } + + if (g_rename(srcPath.c_str(), dstPath.c_str()) == -1) { + int32 rc = errno; + CAF_CM_EXCEPTIONEX_VA2( + IOException, + rc, + "Unable to move file %s to %s", + srcPath.c_str(), + dstPath.c_str()); + } + } + CAF_CM_EXIT; +} + +void FileSystemUtils::copyDirectory(const std::string& srcPath, const std::string& dstPath) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "copyDirectory"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(srcPath); + CAF_CM_VALIDATE_STRING(dstPath); + + if(doesDirectoryExist(dstPath)) { + CAF_CM_EXCEPTIONEX_VA1( + IOException, + ERROR_ALREADY_EXISTS, + "Cannot copy into an existing directory: %s", + dstPath.c_str()); + } + createDirectory(dstPath); + + if(!doesDirectoryExist(srcPath)) { + CAF_CM_EXCEPTIONEX_VA1( + PathNotFoundException, + 0, + "Invalid source directory: %s", + srcPath.c_str()); + } + + const DirectoryItems items = itemsInDirectory(srcPath, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator srcFile(items.files); srcFile; srcFile++) { + copyFile(srcPath + G_DIR_SEPARATOR_S + *srcFile, + dstPath + G_DIR_SEPARATOR_S + *srcFile); + } + } + CAF_CM_EXIT; +} + +void FileSystemUtils::recursiveCopyDirectory(const std::string& srcPath, const std::string& dstPath) { + CAF_CM_STATIC_FUNC_VALIDATE("FileSystemUtils", "recursiveCopyDirectory"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(srcPath); + CAF_CM_VALIDATE_STRING(dstPath); + + const DirectoryItems items = itemsInDirectory(srcPath, FileSystemUtils::REGEX_MATCH_ALL); + + // Copy subdirectories first + for (TConstIterator srcDir(items.directories); srcDir; srcDir++) { + copyDirectory(srcPath + G_DIR_SEPARATOR_S + *srcDir, + dstPath + G_DIR_SEPARATOR_S + *srcDir); + } + + // Copy files second + for (TConstIterator srcFile(items.files); srcFile; srcFile++) { + copyFile(srcPath + G_DIR_SEPARATOR_S + *srcFile, + dstPath + G_DIR_SEPARATOR_S + *srcFile); + } + } + CAF_CM_EXIT; +} + +std::string FileSystemUtils::findOptionalFile( + const std::string& directory, + const std::string& filename) { + + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "findOptionalFile"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filename); + + const std::deque files = findOptionalFiles(directory, filename); + if (files.size() == 1) { + rc = files[0]; + } else if (files.size() > 1) { + CAF_CM_EXCEPTION_VA2(ERROR_FILE_EXISTS, + "Found more than one file - directory: %s, filename: %s", + directory.c_str(), filename.c_str()) + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::findRequiredFile( + const std::string& directory, + const std::string& filename) { + + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "findRequiredFile"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filename); + + rc = findOptionalFile(directory, filename); + if (rc.empty()) { + CAF_CM_EXCEPTION_VA2(ERROR_FILE_NOT_FOUND, + "File not found - directory: %s, filename: %s", + directory.c_str(), filename.c_str()) + } + } + CAF_CM_EXIT; + + return rc; +} + +std::deque FileSystemUtils::findOptionalFiles( + const std::string& directory, + const std::string& filename) { + + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "findOptionalFiles"); + + std::deque rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filename); + + PathAndDirectoryItemsCollection pAndDItemsCol = + recursiveItemsInDirectory(directory, REGEX_MATCH_ALL); + for (TConstIterator + pAndDItemsColIter(pAndDItemsCol); pAndDItemsColIter; pAndDItemsColIter++) { + const std::string path = pAndDItemsColIter->path; + const DirectoryItems directoryItems = + pAndDItemsColIter->items; + const Files files = directoryItems.files; + for (TConstIterator fileIter(files); fileIter; fileIter++) { + const std::string filenameCur = *fileIter; + if (filenameCur.compare(filename) == 0) { + const std::string filePath = buildPath(path, filename); + rc.push_back(filePath); + } + } + } + } + CAF_CM_EXIT; + + return rc; +} + +std::deque FileSystemUtils::findRequiredFiles( + const std::string& directory, + const std::string& filename) { + + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "findRequiredFiles"); + + std::deque rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filename); + + rc = findOptionalFiles(directory, filename); + if (rc.empty()) { + CAF_CM_EXCEPTION_VA2(ERROR_FILE_NOT_FOUND, + "File not found - directory: %s, filename: %s", + directory.c_str(), filename.c_str()) + } + } + CAF_CM_EXIT; + + return rc; +} + +void FileSystemUtils::chmod( + const std::string &path, + const uint32 mode/* = 0770*/) { + + CAF_CM_STATIC_FUNC_LOG("FileSystemUtils", "chmod"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + if(! doesFileExist(path)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, 0, + "File does not exist: %s", path.c_str()); + } + + // Not using g_chmod on Nix because it hangs. +#ifdef WIN32 + g_chmod(path.c_str(), mode); +#else + const int32 rc = ::chmod(path.c_str(), mode); + if (rc != 0) { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, + "chmod failed - file: %s, filename: %s", path.c_str()); + } +#endif + } + CAF_CM_EXIT; +} + +std::string FileSystemUtils::normalizePathForPlatform( + const std::string &path) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "normalizePathForPlatform"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + rc = path; +#ifdef WIN32 + std::replace(rc.begin(), rc.end(), '/', '\\'); +#else + std::replace(rc.begin(), rc.end(), '\\', '/'); +#endif + } + CAF_CM_EXIT; + + return rc; +} + +std::string FileSystemUtils::normalizePathWithForward( + const std::string &path) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "normalizePathWithForward"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(path); + + rc = path; + std::replace(rc.begin(), rc.end(), '\\', '/'); + } + CAF_CM_EXIT; + + return rc; +} + +int64 FileSystemUtils::getFileSize(const std::string& filename) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "getFileSize"); + CAF_CM_VALIDATE_STRING(filename); + + struct stat stat_buf; + int32 rc = ::stat(filename.c_str(), &stat_buf); + return rc == 0 ? stat_buf.st_size : -1; +} + +std::string FileSystemUtils::saveTempTextFile(const std::string& filename_template, const std::string& contents) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("FileSystemUtils", "saveTempTextFile"); + + std::string filename; + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filename_template); + CAF_CM_VALIDATE_STRING(contents); + + filename = FileSystemUtils::getTempFilename(filename_template); + + FileSystemUtils::saveTextFile(filename, contents); + } + CAF_CM_EXIT; + + return filename; +} + +std::string FileSystemUtils::getTempFilename(const std::string& filename_template) { + CAF_CM_STATIC_FUNC("FileSystemUtils", "getTempFilename"); + + std::string filename; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filename_template); + + gchar* allocatedFilename; + GError *gError = NULL; + + int32 fd = g_file_open_tmp(filename_template.c_str(), &allocatedFilename, &gError); + if (fd >= 0) { + filename = allocatedFilename; +#ifdef WIN32 + ::_close(fd); +#else + ::close(fd); +#endif + g_free(allocatedFilename); + } + if (gError != NULL) { + const std::string errorMessage = gError->message; + const int32 errorCode = gError->code; + + g_error_free(gError); + + CAF_CM_EXCEPTIONEX_VA2( + IOException, + errorCode, + "g_file_open_tmp Failed: %s Template: %s", + errorMessage.c_str(), + filename_template.c_str()); + } + } + CAF_CM_EXIT; + CAF_CM_VALIDATE_STRING(filename); + + return filename; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.h new file mode 100644 index 000000000..c3fbd2a94 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CFileSystemUtils.h @@ -0,0 +1,205 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CFILESYSTEMUTILS_H_ +#define CFILESYSTEMUTILS_H_ + + + +#include "Memory/DynamicArray/DynamicArrayInc.h" + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE FileSystemUtils { +public: + // Helpful typedefs + + // file or directory name only: no path. + typedef std::deque Files; + typedef Files Directories; + + // directory and file names only: no path. + struct DirectoryItems { + DirectoryItems() {}; + DirectoryItems(const Directories& d, const Files& f) : directories(d), files(f) {}; + + Directories directories; + Files files; + }; + + // first is full path to the items in DirectoryItems + struct PathAndDirectoryItems { + PathAndDirectoryItems() {}; + PathAndDirectoryItems(const std::string& p, DirectoryItems& i) : path(p), items(i) {}; + + std::string path; + DirectoryItems items; + }; + + typedef enum { + FILE_MODE_REPLACE, + FILE_MODE_FAIL, + FILE_MODE_IGNORE + } FILE_MODE_TYPE; + + typedef std::deque PathAndDirectoryItemsCollection; + + // Use this constant to match all item names in a directory + static const std::string REGEX_MATCH_ALL; + + static void createDirectory(const std::string &path, const uint32 mode = 0770); + + static void removeDirectory(const std::string& path); + + static void recursiveRemoveDirectory(const std::string& path); + + static void removeFile(const std::string& path); + + static Files removeFilesInDirectory(const std::string& path, const std::string& regex); + + static bool doesFileExist(const std::string& path); + + static bool doesDirectoryExist(const std::string& path); + + static bool isRegularFile(const std::string& path); + + static std::string getCurrentDir(); + + static std::string getCurrentFile(); + + static std::string getBasename(const std::string& path); + + static std::string getDirname(const std::string& path); + + static std::string getTmpDir(); + + static std::string buildPath( + const std::string& path, + const std::string& newElement); + + static std::string buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2); + + static std::string buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2, + const std::string& newElement3); + + static std::string buildPath( + const std::string& path, + const std::string& newElement1, + const std::string& newElement2, + const std::string& newElement3, + const std::string& newElement4); + + static std::string loadTextFile( + const std::string& path); + + static Cdeqstr loadTextFileIntoColl( + const std::string& path); + + static SmartPtrCDynamicByteArray loadByteFile( + const std::string& path); + + static void saveTextFile( + const std::string& outputDir, + const std::string& filename, + const std::string& contents, + const FILE_MODE_TYPE fileMode = FILE_MODE_REPLACE, + const std::string temporaryFileSuffix = ".tmp"); + + static void saveTextFile( + const std::string& filePath, + const std::string& contents, + const FILE_MODE_TYPE fileMode = FILE_MODE_REPLACE, + const std::string temporaryFileSuffix = ".tmp"); + + static void saveByteFile( + const std::string& filePath, + const SmartPtrCDynamicByteArray& contents, + const FILE_MODE_TYPE fileMode = FILE_MODE_REPLACE, + const std::string temporaryFileSuffix = ".tmp"); + + static void saveByteFile( + const std::string& filePath, + const byte* contents, + const size_t& contentsLen, + const FILE_MODE_TYPE fileMode = FILE_MODE_REPLACE, + const std::string temporaryFileSuffix = ".tmp"); + + static DirectoryItems itemsInDirectory( + const std::string& path, + const std::string& regex); + + static PathAndDirectoryItemsCollection recursiveItemsInDirectory( + const std::string& path, + const std::string& regex); + + // The caller must ensure that dstPath exists. + static void copyFile(const std::string& srcPath, const std::string& dstPath); + + static void moveFile(const std::string& srcPath, const std::string& dstPath); + + static void copyDirectory(const std::string& srcPath, const std::string& dstPath); + + static void recursiveCopyDirectory(const std::string& srcPath, const std::string& dstPath); + + static std::string findOptionalFile( + const std::string& outputDir, + const std::string& filename); + + static std::string findRequiredFile( + const std::string& outputDir, + const std::string& filename); + + static std::deque findOptionalFiles( + const std::string& outputDir, + const std::string& filename); + + static std::deque findRequiredFiles( + const std::string& outputDir, + const std::string& filename); + + static void chmod( + const std::string &path, + const uint32 mode = 0770); + + static std::string normalizePathForPlatform( + const std::string &path); + + static std::string normalizePathWithForward( + const std::string &path); + + static int64 getFileSize(const std::string& filename); + + static std::string saveTempTextFile(const std::string& filename_template, const std::string& contents); + + static std::string getTempFilename(const std::string& filename_template); + +private: + static void saveFileSafely( + const std::string& filePath, + const byte* contents, + const size_t& contentsLen, + const std::string& temporaryFileSuffix); + + static void saveByteFileRaw( + const std::string& path, + const byte* contents, + const size_t& contentsLen); + + +private: + CAF_CM_DECLARE_NOCREATE(FileSystemUtils); +}; + +} + +#endif /* CFILESYSTEMUTILS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.cpp new file mode 100644 index 000000000..cdb21b7da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.cpp @@ -0,0 +1,127 @@ +/* + * Author: mdonahue + * Created: May 24, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CHexCodec.h" +#include +#include + +using namespace Caf; +using namespace std; + +std::string CHexCodec::Encode( + const byte* buffer, + const uint32 bufferSize, + const uint32 pairSpacing, + const uint32 pairsPerLine, + const char lineBreakChar) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CHexCodec", "Encode"); + + stringstream encoding; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_PTR(buffer); + CAF_CM_VALIDATE_NOTZERO(bufferSize); + + string spacing; + for (uint32 u = 0; u < pairSpacing; ++u) { + spacing += ' '; + } + + uint16 uTest = 1; + byte bTest[2] = { 1, 0 }; + const bool isLittleEndian = (::memcmp(&uTest, bTest, 2) == 0); + uint32 groups = bufferSize >> 2; + uint32 remainder = bufferSize % 4; + encoding.fill('0'); + encoding.setf(ios_base::uppercase); + encoding.setf(ios_base::hex, ios_base::basefield); + uint8 b[4]; + const uint32* uintPtr = reinterpret_cast(buffer); + uint32 pairs = 0; + for (uint32 u = 0; u < groups; ++u) { + if (isLittleEndian) { + b[0] = static_cast(*uintPtr); + b[1] = static_cast(*uintPtr >> 8); + b[2] = static_cast(*uintPtr >> 16); + b[3] = static_cast(*uintPtr >> 24); + } else { + b[0] = static_cast(*uintPtr >> 24); + b[1] = static_cast(*uintPtr >> 16); + b[2] = static_cast(*uintPtr >> 8); + b[3] = static_cast(*uintPtr); + } + + for (uint32 p = 0; p < 4; ++p) { + if (pairSpacing && pairs) { + encoding << spacing; + } + encoding << setw(2) << static_cast(b[p]); + if (pairsPerLine) { + if (0 == (++pairs % pairsPerLine)) { + encoding << lineBreakChar; + pairs = 0; + } + } else { + ++pairs; + } + } + ++uintPtr; + } + + switch (remainder) { + case 0: + break; + case 1: + if (isLittleEndian) { + b[0] = static_cast(*uintPtr); + } else { + b[0] = static_cast(*uintPtr >> 24); + } + break; + case 2: + if (isLittleEndian) { + b[0] = static_cast(*uintPtr); + b[1] = static_cast(*uintPtr >> 8); + } else { + b[0] = static_cast(*uintPtr >> 24); + b[1] = static_cast(*uintPtr >> 16); + } + break; + case 3: + if (isLittleEndian) { + b[0] = static_cast(*uintPtr); + b[1] = static_cast(*uintPtr >> 8); + b[2] = static_cast(*uintPtr >> 16); + } else { + b[0] = static_cast(*uintPtr >> 24); + b[1] = static_cast(*uintPtr >> 16); + b[2] = static_cast(*uintPtr >> 8); + } + break; + } + + for (uint32 p = 0; p < remainder; ++p) { + if (pairSpacing && pairs) { + encoding << spacing; + } + encoding << setw(2) << static_cast(b[p]); + if (pairsPerLine) { + if (0 == (++pairs % pairsPerLine)) { + encoding << lineBreakChar; + pairs = 0; + } + } else { + ++pairs; + } + } + } + CAF_CM_EXIT; + + return encoding.str(); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.h new file mode 100644 index 000000000..f50b3e946 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CHexCodec.h @@ -0,0 +1,31 @@ +/* + * Author: mdonahue + * Created: May 24, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CHEXCODEC_H_ +#define CHEXCODEC_H_ + +namespace Caf { +class COMMONAGGREGATOR_LINKAGE CHexCodec { +public: + /// Encodes a buffer as a 2 digit per byte string. + /// + /// @param buffer Input buffer + /// @param bufferSize Input buffer length + /// @param pairSpacing Number of spaces to insert between digit pairs + /// @param pairsPerLine Number of pairs to encode per line. 0 = single line output. + /// @param lineBreakChar Character to insert between lines + /// @return A string containing the hex encoding + static std::string Encode( + const byte* buffer, + const uint32 bufferSize, + const uint32 pairSpacing = 0, + const uint32 pairsPerLine = 0, + const char lineBreakChar = '\n'); +}; +} + +#endif /* CHEXCODEC_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CIniFile.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CIniFile.cpp new file mode 100644 index 000000000..e31e4db78 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CIniFile.cpp @@ -0,0 +1,528 @@ +/* + * Author: bwilliams + * Created: May 18, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CCafRegex.h" +#include "Common/CIniFile.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CIniFile::CIniFile() : + _isInitialized(false), + CAF_CM_INIT_LOG("CIniFile") { +} + +CIniFile::~CIniFile() { +} + +void CIniFile::initialize( + const std::string& configFilePath) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(configFilePath); + + _configFilePath = configFilePath; + + _isInitialized = true; +} + +std::deque CIniFile::getSectionCollection() { + CAF_CM_FUNCNAME_VALIDATE("getSectionCollection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::deque sectionCollection; + if (_sectionCollection.empty()) { + _sectionCollection = parse(_configFilePath); + } + + sectionCollection = _sectionCollection; + + return sectionCollection; +} + +std::deque CIniFile::getEntryCollection( + const std::string& sectionName) { + CAF_CM_FUNCNAME_VALIDATE("getEntryCollection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + + std::deque entryCollection; + if (_sectionCollection.empty()) { + _sectionCollection = parse(_configFilePath); + } + + for (TConstIterator > iniSectionIter(_sectionCollection); + iniSectionIter; iniSectionIter++) { + const SmartPtrSIniSection iniSection = *iniSectionIter; + const std::string sectionNameTmp = iniSection->_sectionName; + + if (sectionNameTmp.compare(sectionName) == 0) { + entryCollection = iniSection->_entryCollection; + } + } + + return entryCollection; +} + +CIniFile::SmartPtrSIniEntry CIniFile::findOptionalEntry( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalEntry"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + CIniFile::SmartPtrSIniEntry iniEntry; + if (_sectionCollection.empty()) { + _sectionCollection = parse(_configFilePath); + } + + for (TConstIterator > iniSectionIter(_sectionCollection); + iniSectionIter; iniSectionIter++) { + const SmartPtrSIniSection iniSection = *iniSectionIter; + const std::string sectionNameTmp = iniSection->_sectionName; + + if (sectionNameTmp.compare(sectionName) == 0) { + for (TConstIterator > iniEntryIter(iniSection->_entryCollection); + iniEntryIter; iniEntryIter++) { + const SmartPtrSIniEntry iniEntryTmp = *iniEntryIter; + const std::string keyNameTmp = iniEntryTmp->_name; + if (keyNameTmp.compare(keyName) == 0) { + iniEntry = iniEntryTmp; + break; + } + } + } + } + + return iniEntry; +} + +CIniFile::SmartPtrSIniEntry CIniFile::findRequiredEntry( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME("findRequiredEntry"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findOptionalEntry(sectionName, keyName); + if (iniEntry.IsNull()) { + CAF_CM_EXCEPTIONEX_VA2(NoSuchElementException, ERROR_NOT_FOUND, + "Value not found - sectionName: %s, keyName: %s", sectionName.c_str(), keyName.c_str()); + } + + return iniEntry; +} + +std::string CIniFile::findOptionalString( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + std::string value; + const SmartPtrSIniEntry iniEntry = findOptionalEntry(sectionName, keyName); + if (! iniEntry.IsNull()) { + value = iniEntry->_valueExpanded; + } + + return value; +} + +std::string CIniFile::findRequiredString( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findRequiredString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findRequiredEntry(sectionName, keyName); + return iniEntry->_valueExpanded; +} + +std::string CIniFile::findOptionalRawString( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalRawString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + std::string value; + const SmartPtrSIniEntry iniEntry = findOptionalEntry(sectionName, keyName); + if (! iniEntry.IsNull()) { + value = iniEntry->_valueRaw; + } + + return value; +} + +std::string CIniFile::findRequiredRawString( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findRequiredRawString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findRequiredEntry(sectionName, keyName); + return iniEntry->_valueRaw; +} + +void CIniFile::log() { + CAF_CM_FUNCNAME_VALIDATE("log"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_sectionCollection.empty()) { + _sectionCollection = parse(_configFilePath); + } + + for (TConstIterator > iniSectionIter(_sectionCollection); + iniSectionIter; iniSectionIter++) { + const SmartPtrSIniSection iniSection = *iniSectionIter; + CAF_CM_LOG_DEBUG_VA1("Section - %s", iniSection->_sectionName.c_str()); + + for (TConstIterator > iniEntryIter(iniSection->_entryCollection); + iniEntryIter; iniEntryIter++) { + const SmartPtrSIniEntry iniEntry = *iniEntryIter; + CAF_CM_LOG_DEBUG_VA3(" Entry - %s=%s (%s)", + iniEntry->_name.c_str(), iniEntry->_valueRaw.c_str(), iniEntry->_valueExpanded.c_str()); + } + } +} + +void CIniFile::setValue( + const std::string& sectionName, + const std::string& keyName, + const std::string& value) { + CAF_CM_FUNCNAME("setValue"); + + GKeyFile* gKeyFile = NULL; + GError* gError = NULL; + gchar* gFileContents = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + CAF_CM_VALIDATE_STRING(value); + + try { + gKeyFile = g_key_file_new(); + g_key_file_load_from_file( + gKeyFile, + _configFilePath.c_str(), + G_KEY_FILE_NONE, + &gError); + if (gError != NULL) { + throw gError; + } + + g_key_file_set_string( + gKeyFile, + sectionName.c_str(), + keyName.c_str(), + value.c_str()); + + gFileContents = g_key_file_to_data( + gKeyFile, + NULL, + &gError); + if (gError != NULL) { + throw gError; + } + if (gKeyFile) { + g_key_file_free(gKeyFile); + gKeyFile = NULL; + } + + g_file_set_contents( + _configFilePath.c_str(), + gFileContents, + -1, + &gError); + if (gError != NULL) { + throw gError; + } + + _sectionCollection.clear(); + } catch (GError *gErrorExc) { + CAF_CM_EXCEPTION_VA0(gErrorExc->code, gErrorExc->message); + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + + try { + if (gKeyFile) { + g_key_file_free(gKeyFile); + } + + if (gError) { + g_error_free(gError); + } + + if (gFileContents) { + g_free(gFileContents); + } + } + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void CIniFile::deleteValue( + const std::string& sectionName, + const std::string& keyName) { + CAF_CM_FUNCNAME("deleteValue"); + + GKeyFile* gKeyFile = NULL; + GError* gError = NULL; + gchar* gFileContents = NULL; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sectionName); + CAF_CM_VALIDATE_STRING(keyName); + + try { + gKeyFile = g_key_file_new(); + g_key_file_load_from_file( + gKeyFile, + _configFilePath.c_str(), + G_KEY_FILE_NONE, + &gError); + if (gError != NULL) { + throw gError; + } + + g_key_file_remove_key( + gKeyFile, + sectionName.c_str(), + keyName.c_str(), + &gError); + if (gError != NULL) { + throw gError; + } + + gFileContents = g_key_file_to_data( + gKeyFile, + NULL, + &gError); + if (gError != NULL) { + throw gError; + } + if (gKeyFile) { + g_key_file_free(gKeyFile); + gKeyFile = NULL; + } + + g_file_set_contents( + _configFilePath.c_str(), + gFileContents, + -1, + &gError); + if (gError != NULL) { + throw gError; + } + + _sectionCollection.clear(); + } catch (GError *gErrorExc) { + CAF_CM_EXCEPTION_VA0(gErrorExc->code, gErrorExc->message); + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + + try { + if (gKeyFile) { + g_key_file_free(gKeyFile); + } + + if (gError) { + g_error_free(gError); + } + + if (gFileContents) { + g_free(gFileContents); + } + } + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +std::deque CIniFile::parse( + const std::string& configFilePath) const { + CAF_CM_FUNCNAME("parse"); + + std::deque iniSectionCollection; + std::deque replacementCollection; + + GKeyFile* gKeyFile = NULL; + gchar** gGroupStrCollection = NULL; + gchar** gKeyStrCollection = NULL; + GError* gError = NULL; + gchar* gValueStr = NULL; + + try { + CAF_CM_VALIDATE_STRING(configFilePath); + + try { + gKeyFile = g_key_file_new(); + g_key_file_load_from_file( + gKeyFile, + configFilePath.c_str(), + G_KEY_FILE_NONE, + &gError); + if (gError != NULL) { + throw gError; + } + + gsize numGroups = 0; + gGroupStrCollection = g_key_file_get_groups(gKeyFile, &numGroups); + for (gsize groupNum = 0; groupNum < numGroups; groupNum++) { + const gchar* gGroupNameStr = gGroupStrCollection[groupNum]; + const std::string groupName = gGroupNameStr; + + SmartPtrSIniSection iniSection; + iniSection.CreateInstance(); + iniSection->_sectionName = groupName; + + gsize numKeys = 0; + gKeyStrCollection = g_key_file_get_keys( + gKeyFile, + gGroupNameStr, + &numKeys, + &gError); + + for (gsize keyNum = 0; keyNum < numKeys; keyNum++) { + const gchar* gKeyNameStr = gKeyStrCollection[keyNum]; + const std::string keyName = gKeyNameStr; + + gValueStr = g_key_file_get_string( + gKeyFile, + gGroupNameStr, + gKeyNameStr, + &gError); + if (gError != NULL) { + throw gError; + } + + std::string valueRaw = gValueStr; + g_free(gValueStr); + gValueStr = NULL; + + std::string valueExpanded; + if (valueRaw.empty()) { + // TODO: Need a way to represent NULL strings as opposed to empty strings. + valueRaw = " "; + valueExpanded = " "; + } else { + valueExpanded = CStringUtils::trim(valueRaw); + valueExpanded = CStringUtils::expandEnv(valueExpanded); + for (TConstIterator > replacementIter(replacementCollection); + replacementIter; replacementIter++ ) { + const SmartPtrSReplacement replacement = *replacementIter; + if (replacement->_regex->isMatched(valueExpanded)) { + valueExpanded = replacement->_regex->replaceLiteral(valueExpanded, replacement->_value); + break; + } + } + + if (groupName.compare("globals") == 0) { + const SmartPtrSReplacement replacement = createReplacement(keyName, valueExpanded); + replacementCollection.push_back(replacement); + } + } + + const SmartPtrSIniEntry iniEntry = createIniEntry(keyName, valueRaw, valueExpanded); + iniSection->_entryCollection.push_back(iniEntry); + } + + iniSectionCollection.push_back(iniSection); + } + } catch (GError *gErrorExc) { + CAF_CM_EXCEPTION_VA0(gErrorExc->code, gErrorExc->message); + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + + try { + if (gKeyFile) { + g_key_file_free(gKeyFile); + } + + if (gError) { + g_error_free(gError); + } + + if (gGroupStrCollection) { + g_strfreev(gGroupStrCollection); + } + + if (gKeyStrCollection) { + g_strfreev(gKeyStrCollection); + } + + if (gValueStr) { + g_free(gValueStr); + } + } + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; + + return iniSectionCollection; +} + +CIniFile::SmartPtrSReplacement CIniFile::createReplacement( + const std::string& keyName, + const std::string& value) const { + CAF_CM_FUNCNAME_VALIDATE("createReplacement"); + CAF_CM_VALIDATE_STRING(keyName); + + std::string pattern("\\$\\{"); + pattern += keyName; + pattern += "\\}"; + + SmartPtrCCafRegex regex; + regex.CreateInstance(); + regex->initialize(pattern); + + SmartPtrSReplacement replacement; + replacement.CreateInstance(); + replacement->_regex = regex; + replacement->_value = value; + + return replacement; +} + +CIniFile::SmartPtrSIniEntry CIniFile::createIniEntry( + const std::string& keyName, + const std::string& valueRaw, + const std::string& valueExpanded) const { + CAF_CM_FUNCNAME_VALIDATE("createIniEntry"); + CAF_CM_VALIDATE_STRING(keyName); + CAF_CM_VALIDATE_STRING(valueRaw); + CAF_CM_VALIDATE_STRING(valueExpanded); + + SmartPtrSIniEntry iniEntry; + iniEntry.CreateInstance(); + iniEntry->_name = keyName; + iniEntry->_valueRaw = valueRaw; + iniEntry->_valueExpanded = valueExpanded; + + return iniEntry; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingSetter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingSetter.cpp new file mode 100644 index 000000000..9bb4cc624 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingSetter.cpp @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CLoggingSetter.h" +#include "Common/CLoggingUtils.h" + +using namespace Caf; + +//////////////////////////////////////////////////////////////////////// +// +// CLoggingSetter::CLoggingSetter() +// +//////////////////////////////////////////////////////////////////////// +CLoggingSetter::CLoggingSetter() : + _isInitialized(false), + _remapLoggingLocation(false), + CAF_CM_INIT_LOG("CLoggingSetter") { +} + +//////////////////////////////////////////////////////////////////////// +// +// CLoggingSetter::~CLoggingSetter() +// +//////////////////////////////////////////////////////////////////////// +CLoggingSetter::~CLoggingSetter() { + CAF_CM_FUNCNAME("~CLoggingSetter"); + + try { + if (_isInitialized) { + if (_remapLoggingLocation) { + CAF_CM_LOG_DEBUG_VA0("Resetting log config dir"); + CLoggingUtils::resetConfigFile(); + CAF_CM_LOG_DEBUG_VA0("Reset log config dir"); + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; +} + +//////////////////////////////////////////////////////////////////////// +// +// CLoggingSetter::Initialize() +// +//////////////////////////////////////////////////////////////////////// +void CLoggingSetter::initialize(const std::string& logDir) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(logDir); + + _remapLoggingLocation = AppConfigUtils::getOptionalBoolean("remap_logging_location"); + if (_remapLoggingLocation) { + CAF_CM_LOG_DEBUG_VA1("Setting log config dir - %s", logDir.c_str()); + CLoggingUtils::setLogDir(logDir); + CAF_CM_LOG_DEBUG_VA1("Set log config dir - %s", logDir.c_str()); + } + + _isInitialized = true; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingUtils.cpp new file mode 100644 index 000000000..da35b6f76 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CLoggingUtils.cpp @@ -0,0 +1,195 @@ +/*k + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CLoggingUtils.h" +#include "Exception/CCafException.h" +#include +#include + +using namespace Caf; + +GRecMutex CLoggingUtils::_sOpMutex; +SmartPtrCLoggingUtils CLoggingUtils::_sInstance; + +bool CLoggingUtils::isConsoleAppenderUsed() { + bool rc = false; + + const log4cpp::AppenderSet appenders = + log4cpp::Category::getRoot().getAllAppenders(); + for (log4cpp::AppenderSet::const_iterator iter = appenders.begin(); + (iter != appenders.end() && !rc); iter++) { + const log4cpp::Appender* appender = *iter; + rc = CStringUtils::isEqualIgnoreCase(appender->getName(), "console"); + } + + return rc; +} + +void CLoggingUtils::setStartupConfigFile( + const std::string& configFile, + const std::string& logDir) { + CAF_CM_STATIC_FUNC("CLoggingUtils", "setStartupConfigFile"); + CAF_CM_VALIDATE_STRING(configFile); + +#ifndef WIN32 + char configFileFullBuf[ 32768 ]; + ::realpath(configFile.c_str(), configFileFullBuf); + const std::string configFileFull = configFileFullBuf; +#else + wchar_t w_configFileFullBuf[ 32768 ]; + const std::wstring w_configFile = CStringUtils::convertNarrowToWide(configFile.c_str()); + DWORD dwResult = GetFullPathName(w_configFile.c_str(), 32768, w_configFileFullBuf, NULL); + // Convert the string back to narrow + const std::string configFileFull = CStringUtils::convertWideToNarrow(std::wstring(w_configFileFullBuf, dwResult)); +#endif + + if (!FileSystemUtils::doesFileExist(configFileFull)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, "Config file does not exist - %s", configFileFull.c_str()); + } + + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + if (_sInstance.IsNull()) { + _sInstance.CreateInstance(); + } + _sInstance->_configFile = configFileFull; + _sInstance->loadProperties(); + + if (logDir.empty()) { + _sInstance->loadConfig(configFileFull); + } else { + setLogDir(logDir); + } +} + +SmartPtrCLoggingUtils CLoggingUtils::getInstance() { + CAF_CM_STATIC_FUNC("CLoggingUtils", "getInstance"); + + CAutoMutexLockUnlockRaw oLock(&_sOpMutex); + if (!_sInstance) { + CAF_CM_EXCEPTION_VA0(ERROR_INVALID_STATE, "Config file not set"); + } + + return _sInstance; +} + +CLoggingUtils::CLoggingUtils() : + CAF_CM_INIT_LOG("CLoggingUtils") { +} + +void CLoggingUtils::loadConfig(const std::string& configFile) { + CAF_CM_STATIC_FUNC_LOG("CLoggingUtils", "loadConfig"); + CAF_CM_VALIDATE_STRING(configFile); + + if (!FileSystemUtils::doesFileExist(configFile)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, "Config file does not exist - %s", configFile.c_str()); + } + + // Make sure existing unmanaged appenders are cleaned up + std::vector* categories = log4cpp::Category::getCurrentCategories(); + for (std::vector::const_iterator catIter = categories->begin(); + catIter != categories->end(); catIter++) { + log4cpp::Category* category = *catIter; + log4cpp::AppenderSet appenders = category->getAllAppenders(); + for (log4cpp::AppenderSet::const_iterator appIter = appenders.begin(); appIter != appenders.end(); appIter++) { + log4cpp::Appender* appender = *appIter; + if (!category->ownsAppender(appender)) { + // Appender lifecycle is NOT managed by the category...need to manually delete + // First remove the appender before another thread attempts to access it during logging + category->removeAppender(appender); + delete appender; + } + } + } + + // Use property configurator to load configuration file..to set up configured Categories and Appenders + try { + log4cpp::PropertyConfigurator::configure(configFile); + } catch (log4cpp::ConfigureFailure e) { + std::cout << "Log4cpp Error: " << e.what() << std::endl; + } + + CAF_CM_LOG_DEBUG_VA1("Using log config file - %s", configFile.c_str()); +} + +std::string CLoggingUtils::getConfigFile() { + return getInstance()->_configFile; +} + +void CLoggingUtils::resetConfigFile() { + loadConfig(getInstance()->_configFile); +} + +void CLoggingUtils::setLogDir(const std::string& logDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CLoggingUtils", "setLogDir"); + CAF_CM_VALIDATE_STRING(logDir); + + if (!FileSystemUtils::doesDirectoryExist(logDir)) { + CAF_CM_LOG_INFO_VA1("Creating log dir - %s", logDir.c_str()); + FileSystemUtils::createDirectory(logDir); + } + + // Create a temporary file for storing the new config + std::string tmpFileName = FileSystemUtils::buildPath(logDir, "log4cpp_config_tmp"); + static const std::string SRCH_STR = ".fileName"; + static const size_t SRCH_STR_SIZE = SRCH_STR.length(); + + std::ofstream tmpCfg(tmpFileName.c_str(), std::ios_base::out | std::ios_base::trunc); + PropertyMap src = getInstance()->_properties; + for (PropertyMap::const_iterator iter = src.begin(); iter != src.end(); iter++) { + tmpCfg << (*iter).first << "="; + if (iter->first.rfind(SRCH_STR) == iter->first.length() - SRCH_STR_SIZE) { + const std::string basename = FileSystemUtils::getBasename(iter->second); + tmpCfg << FileSystemUtils::buildPath(logDir, basename); + } else { + tmpCfg << (*iter).second; + } + tmpCfg << std::endl; + } + tmpCfg.close(); + + loadConfig(tmpFileName); + FileSystemUtils::removeFile(tmpFileName); +} + +void CLoggingUtils::loadProperties() { + CAF_CM_FUNCNAME_VALIDATE("loadProperties"); + CAF_CM_VALIDATE_STRING(_configFile); + _properties.clear(); + + static const size_t BUFF_SIZE = 2048; + char buffer[BUFF_SIZE]; + + std::string line, property, name, value, prefix; + size_t pos = 0; + + std::ifstream properties(_configFile.c_str()); + while (properties.getline(buffer, BUFF_SIZE)) { + line = CStringUtils::trim(buffer); + + // Check for comment. If at beginning, ignore whole line. If not, extract portion up to comment + pos = line.find('#'); + if (pos == std::string::npos) { + property = line; + } else if (pos > 0) { + property = line.substr(0, pos); + } else { + continue; + } + + // Parse the property into name/value + pos = property.find('='); + if (pos != std::string::npos) { + name = CStringUtils::trim(property.substr(0, pos)); + value = CStringUtils::trim(property.substr(pos + 1, property.size() - pos)); + + _properties[name] = value; + } else { + continue; + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CManagedThreadPool.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CManagedThreadPool.cpp new file mode 100644 index 000000000..7eda6e558 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CManagedThreadPool.cpp @@ -0,0 +1,392 @@ +/* + * Created on: May 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/CManagedThreadPool.h" +#include "Exception/CCafException.h" + +namespace Caf { + +class TaskWrapper : public CManagedThreadPool::IThreadTask { +public: + typedef enum { + StateInactive, + StateActive, + StateFinishedComplete, + StateFinishedIncomplete + } EnumState; + +public: + TaskWrapper(); + virtual ~TaskWrapper(); + + void init(const CManagedThreadPool::SmartPtrIThreadTask& task); + + void setState(EnumState state); + + EnumState getState() const; + +public: // IThreadTask + bool run(); + +private: + CManagedThreadPool::SmartPtrIThreadTask _task; + EnumState _state; + +private: + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(TaskWrapper); + +}; +CAF_DECLARE_SMART_POINTER(TaskWrapper); + +} + +using namespace Caf; + +uint32 CManagedThreadPool::DEFAULT_TASK_UPDATE_INTERVAL = 333; + +CManagedThreadPool::CManagedThreadPool() : + _isInitialized(false), + _isShuttingDown(false), + _threadPool(NULL), + _workerThread(NULL), + _taskUpdateInterval(DEFAULT_TASK_UPDATE_INTERVAL), + CAF_CM_INIT_LOG("CManagedThreadPool") { + CAF_CM_INIT_THREADSAFE; +} + +CManagedThreadPool::~CManagedThreadPool() { + CAF_CM_FUNCNAME_VALIDATE("~CManagedThreadPool"); + + if (_threadPool || _workerThread || _tasks.size()) { + const char* poolName = _poolName.empty() ? "" : _poolName.c_str(); + CAF_CM_LOG_ERROR_VA1( + "[poolName=%s] Destroying thread pool but it is " + "still active. You really should call term() first.", + poolName); + + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Setting shutdown flag", poolName); + _isShuttingDown = true; + + if (_workerThread) { + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Waiting for worker thread to stop", poolName); + g_thread_join(_workerThread); + } + + if (_threadPool) { + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Waiting for thread pool to stop", poolName); + g_thread_pool_free( + _threadPool, + TRUE, /* immediate - do not schedule any more tasks to threads */ + TRUE /* wait - wait for currently running tasks to finish */ ); + } + + CAF_CM_LOG_DEBUG_VA2( + "[poolName=%s] Pool has shut down. Releasing %d tasks", + poolName, + _tasks.size()); + for (TConstIterator task(_tasks); task; task++) { + (*task)->Release(); + } + } +} + +void CManagedThreadPool::init( + const std::string& poolName, + uint32 threadCount, + uint32 taskUpdateInterval) { + CAF_CM_FUNCNAME("init"); + CAF_CM_VALIDATE_STRING(poolName); + CAF_CM_VALIDATE_NOTZERO(threadCount); + + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _poolName = poolName; + if (taskUpdateInterval) { + _taskUpdateInterval = taskUpdateInterval; + } + + GError *error = NULL; + _threadPool = g_thread_pool_new( + taskWorkerFunc, + NULL, + threadCount, + TRUE, + &error); + if (error) { + CAF_CM_THROW_GERROR(error); + } + _workerThread = CThreadUtils::startJoinable( + poolWorkerFunc, + this); + _isInitialized = true; +} + +void CManagedThreadPool::term() { + CAF_CM_FUNCNAME("term"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_LOCK_UNLOCK; + + if (g_thread_self() == _workerThread) { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, ERROR_INVALID_STATE, "Must terminate the worker thread from a different thread - %p", _workerThread); + } + + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Setting shutdown flag", _poolName.c_str()); + _isShuttingDown = true; + + CAF_CM_LOG_DEBUG_VA2("[poolName=%s] Waiting for worker thread to stop - workerThread: %p", _poolName.c_str(), _workerThread); + GThread* workerThread = _workerThread; + { + CAF_CM_UNLOCK_LOCK; + g_thread_join(workerThread); + } + _workerThread = NULL; + + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Waiting for thread pool to stop", _poolName.c_str()); + GThreadPool* threadPool = _threadPool; + { + CAF_CM_UNLOCK_LOCK; + g_thread_pool_free( + threadPool, + TRUE, /* immediate - do not schedule any more tasks to threads */ + TRUE /* wait - wait for currently running tasks to finish */ ); + } + _threadPool = NULL; + + CAF_CM_LOG_DEBUG_VA2( + "[poolName=%s] Pool has shut down. Releasing %d tasks", + _poolName.c_str(), + _tasks.size()); + const TaskSet tasks = _tasks; + { + CAF_CM_UNLOCK_LOCK; + for (TConstIterator task(tasks); task; task++) { + (*task)->Release(); + } + } + _tasks.clear(); +} + +void CManagedThreadPool::enqueue(const SmartPtrIThreadTask& task) { + CAF_CM_FUNCNAME("enqueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(task); + CAF_CM_LOCK_UNLOCK; + SmartPtrTaskWrapper taskWrapper; + taskWrapper.CreateInstance(); + taskWrapper->init(task); + if (!_tasks.insert(taskWrapper.GetAddRefedInterface()).second) { + // This should not be possible! + taskWrapper->Release(); + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "[poolName=%s] An attempt was made to add a task object with an " + "address equal to that of an existing object. " + "This should not be possible. Please report this bug.", + _poolName.c_str()); + } +} + +void CManagedThreadPool::enqueue(const TaskDeque& tasks) { + CAF_CM_FUNCNAME("enqueue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_LOCK_UNLOCK; + for (TSmartConstIterator task(tasks); task; task++) { + SmartPtrTaskWrapper taskWrapper; + taskWrapper.CreateInstance(); + taskWrapper->init(*task); + if (!_tasks.insert(taskWrapper.GetAddRefedInterface()).second) { + // This should not be possible! + taskWrapper->Release(); + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "[poolName=%s] An attempt was made to add a task object with an " + "address equal to that of an existing object. " + "This should not be possible. Please report this bug.", + _poolName.c_str()); + } + } +} + +CManagedThreadPool::Stats CManagedThreadPool::getStats() const { + CAF_CM_FUNCNAME_VALIDATE("getStats"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_LOCK_UNLOCK; + Stats stats = { 0, 0, 0, 0, 0 }; + stats.taskCount = static_cast(_tasks.size()); + for (TConstIterator task(_tasks); task; task++) { + TaskWrapper *taskWrapper = reinterpret_cast(*task); + switch (taskWrapper->getState()) { + case TaskWrapper::StateActive: + ++stats.activeTaskCount; + break; + + case TaskWrapper::StateInactive: + ++stats.inactiveTaskCount; + break; + + case TaskWrapper::StateFinishedComplete: + ++stats.completeTaskCount; + break; + + case TaskWrapper::StateFinishedIncomplete: + ++stats.incompleteTaskCount; + break; + } + } + return stats; +} + +gpointer CManagedThreadPool::poolWorkerFunc(gpointer context) { + CAF_CM_STATIC_FUNC_LOG("CManagedThreadPool", "poolWorkerFunc"); + try { + CAF_CM_VALIDATE_PTR(context); + CManagedThreadPool *pool = reinterpret_cast(context); + pool->runPool(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + return NULL; +} + +void CManagedThreadPool::runPool() { + CAF_CM_FUNCNAME("runPool"); + CAF_CM_LOCK_UNLOCK; + + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Starting runPool() thread", _poolName.c_str()); + while (!_isShuttingDown) { + TaskSet tasksToRun; + TaskSet tasksRemoved; + + try { + // Move inactive tasks to the thread pool + for (TConstIterator task(_tasks); + !_isShuttingDown && task; + task++) { + TaskWrapper* taskWrapper = reinterpret_cast(*task); + if (TaskWrapper::StateInactive == taskWrapper->getState()) { + taskWrapper->setState(TaskWrapper::StateActive); + GError *error = NULL; + g_thread_pool_push( + _threadPool, + taskWrapper, + &error); + if (error) { + taskWrapper->setState(TaskWrapper::StateInactive); + CAF_CM_LOG_ERROR_VA3( + "[poolName=%s] Unable to add task to tread pool. " + "[%d][%s]", + _poolName.c_str(), + error->code, + error->message); + g_error_free(error); + error = NULL; + } + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + try { + // Handle finished tasks. The tasks may switch from Active to + // FinishedComplete or FinishedIncomplete while we are reading the + // state. That's okay - we'll just catch it on the next go-round. + // + // The alternative is to protect the state variable in the task wrapper + // with a critical section. Seems kind of expensive for something that + // isn't really a problem or time-critical. + // + // Also using naked iterators here since I'm updating the task set. + TaskSet::iterator task = _tasks.begin(); + while (!_isShuttingDown && (task != _tasks.end())) { + TaskWrapper* taskWrapper = reinterpret_cast(*task); + if (TaskWrapper::StateFinishedComplete == taskWrapper->getState()) { + TaskSet::iterator toErase = task; + ++task; + _tasks.erase(toErase); + taskWrapper->Release(); + } else if (TaskWrapper::StateFinishedIncomplete == taskWrapper->getState()) { + taskWrapper->setState(TaskWrapper::StateInactive); + ++task; + } else { + ++task; + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + const uint32 taskUpdateInterval = _taskUpdateInterval; + { + CAF_CM_UNLOCK_LOCK; + CThreadUtils::sleep(taskUpdateInterval); + } + } + CAF_CM_LOG_DEBUG_VA1("[poolName=%s] Leaving runPool() thread", _poolName.c_str()); +} + +void CManagedThreadPool::taskWorkerFunc(gpointer threadContext, gpointer) { + CAF_CM_STATIC_FUNC_LOG("TaskWorkerFunc", "taskWorkerFunc"); + // Don't want to segfault so I'll test threadContext even though + // it *cannot* be NULL. If it is we are in really bad shape! + try { + CAF_CM_VALIDATE_PTR(threadContext); + + TaskWrapper *task = reinterpret_cast(threadContext); + bool complete = false; + try { + complete = task->run(); + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + task->setState(TaskWrapper::StateFinishedComplete); + } else { + task->setState(complete ? + TaskWrapper::StateFinishedComplete : + TaskWrapper::StateFinishedIncomplete); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +TaskWrapper::TaskWrapper() : + _state(StateInactive) { + CAF_CM_INIT_THREADSAFE; +} + +TaskWrapper::~TaskWrapper() { +} + +void TaskWrapper::init(const CManagedThreadPool::SmartPtrIThreadTask& task) { + _task = task; +} + +void TaskWrapper::setState(EnumState state) { + CAF_CM_LOCK_UNLOCK; + _state = state; +} + +TaskWrapper::EnumState TaskWrapper::getState() const { + CAF_CM_LOCK_UNLOCK; + return _state; +} + +bool TaskWrapper::run() { + return _task->run(); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.cpp new file mode 100644 index 000000000..a561a3089 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.cpp @@ -0,0 +1,466 @@ +/*k + * Author: bwilliams + * Created: Nov 25, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityDoc.h" +#include "CPersistenceUtils.h" + +using namespace Caf; + +SmartPtrCPersistenceDoc CPersistenceUtils::loadPersistence( + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadPersistence"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + SmartPtrCPersistenceDoc persistence; + persistence.CreateInstance(); + persistence->initialize( + loadLocalSecurity(persistenceDir), + loadRemoteSecurityCollection(persistenceDir), + loadPersistenceProtocolCollection(persistenceDir), + loadTextFile(persistenceDir, "version.txt", "1.0")); + + return persistence; +} + +SmartPtrCLocalSecurityDoc CPersistenceUtils::loadLocalSecurity( + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadLocalSecurity"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + const std::string localDir = FileSystemUtils::buildPath(persistenceDir, "local"); + + SmartPtrCLocalSecurityDoc localSecurity; + localSecurity.CreateInstance(); + localSecurity->initialize( + loadTextFile(localDir, "localId.txt"), + loadTextFile(localDir, "privateKey.pem"), + loadTextFile(localDir, "cert.pem"), + FileSystemUtils::buildPath(localDir, "privateKey.pem"), + FileSystemUtils::buildPath(localDir, "cert.pem")); + + return localSecurity; +} + +SmartPtrCRemoteSecurityCollectionDoc CPersistenceUtils::loadRemoteSecurityCollection( + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadRemoteSecurityCollection"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + const std::string remoteDir = FileSystemUtils::buildPath(persistenceDir, "remote"); + + std::deque remoteSecurityCollectionInner; + if (FileSystemUtils::doesDirectoryExist(remoteDir)) { + FileSystemUtils::DirectoryItems remoteItems = FileSystemUtils::itemsInDirectory( + remoteDir, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator remoteIter(remoteItems.directories); remoteIter; remoteIter++) { + const std::string remoteId = *remoteIter; + const std::string remoteIdDir = FileSystemUtils::buildPath(remoteDir, remoteId); + const std::string cmsCertCollectionDir = FileSystemUtils::buildPath(remoteIdDir, "cmsCertCollection"); + + std::deque cmsCertCollectionInner; + std::deque cmsCertPathCollectionInner; + if (FileSystemUtils::doesDirectoryExist(cmsCertCollectionDir)) { + FileSystemUtils::DirectoryItems cmsCertCollectionItems = FileSystemUtils::itemsInDirectory( + cmsCertCollectionDir, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator cmsCertCollectionIter(cmsCertCollectionItems.files); cmsCertCollectionIter; cmsCertCollectionIter++) { + cmsCertCollectionInner.push_back( + loadTextFile(cmsCertCollectionDir, *cmsCertCollectionIter)); + cmsCertPathCollectionInner.push_back( + FileSystemUtils::buildPath(cmsCertCollectionDir, *cmsCertCollectionIter)); + } + } + + SmartPtrCCertCollectionDoc cmsCertCollection; + cmsCertCollection.CreateInstance(); + cmsCertCollection->initialize(cmsCertCollectionInner); + + SmartPtrCCertPathCollectionDoc cmsCertPathCollection; + cmsCertPathCollection.CreateInstance(); + cmsCertPathCollection->initialize(cmsCertPathCollectionInner); + + SmartPtrCRemoteSecurityDoc remoteSecurity; + remoteSecurity.CreateInstance(); + remoteSecurity->initialize( + loadTextFile(remoteIdDir, "remoteId.txt"), + loadTextFile(remoteIdDir, "protocolName.txt"), + loadTextFile(remoteIdDir, "cmsCert.pem"), + loadTextFile(remoteIdDir, "cmsCipherName.txt"), + cmsCertCollection, + FileSystemUtils::buildPath(remoteIdDir, "cmsCert.pem"), + cmsCertPathCollection); + + remoteSecurityCollectionInner.push_back(remoteSecurity); + } + } + + SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollection; + remoteSecurityCollection.CreateInstance(); + remoteSecurityCollection->initialize(remoteSecurityCollectionInner); + + return remoteSecurityCollection; +} + +SmartPtrCPersistenceProtocolCollectionDoc CPersistenceUtils::loadPersistenceProtocolCollection( + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadPersistenceProtocolCollection"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + const std::string protocolDir = FileSystemUtils::buildPath(persistenceDir, "protocol"); + + std::deque persistenceProtocolCollectionInner; + if (FileSystemUtils::doesDirectoryExist(protocolDir)) { + FileSystemUtils::DirectoryItems protocolItems = FileSystemUtils::itemsInDirectory( + protocolDir, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator protocolIter(protocolItems.directories); protocolIter; protocolIter++) { + const std::string protocolId = *protocolIter; + const std::string protocolIdDir = FileSystemUtils::buildPath(protocolDir, protocolId); + const std::string tlsCipherCollectionDir = FileSystemUtils::buildPath(protocolIdDir, "tlsCipherCollection"); + const std::string tlsCertCollectionDir = FileSystemUtils::buildPath(protocolIdDir, "tlsCertCollection"); + + Cdeqstr tlsCipherCollection; + if (FileSystemUtils::doesDirectoryExist(tlsCipherCollectionDir)) { + FileSystemUtils::DirectoryItems tlsCipherCollectionItems = FileSystemUtils::itemsInDirectory( + tlsCipherCollectionDir, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator tlsCipherCollectionIter(tlsCipherCollectionItems.files); tlsCipherCollectionIter; tlsCipherCollectionIter++) { + tlsCipherCollection.push_back( + loadTextFile(tlsCipherCollectionDir, *tlsCipherCollectionIter)); + } + } + + std::deque tlsCertCollectionInner; + std::deque tlsCertPathCollectionInner; + if (FileSystemUtils::doesDirectoryExist(tlsCertCollectionDir)) { + FileSystemUtils::DirectoryItems tlsCertCollectionItems = FileSystemUtils::itemsInDirectory( + tlsCertCollectionDir, FileSystemUtils::REGEX_MATCH_ALL); + for (TConstIterator tlsCertCollectionIter(tlsCertCollectionItems.files); tlsCertCollectionIter; tlsCertCollectionIter++) { + tlsCertCollectionInner.push_back( + loadTextFile(tlsCertCollectionDir, *tlsCertCollectionIter)); + tlsCertPathCollectionInner.push_back( + FileSystemUtils::buildPath(tlsCertCollectionDir, *tlsCertCollectionIter)); + } + } + + SmartPtrCCertCollectionDoc tlsCertCollection; + tlsCertCollection.CreateInstance(); + tlsCertCollection->initialize(tlsCertCollectionInner); + + SmartPtrCCertPathCollectionDoc tlsCertPathCollection; + tlsCertPathCollection.CreateInstance(); + tlsCertPathCollection->initialize(tlsCertPathCollectionInner); + + SmartPtrCPersistenceProtocolDoc persistenceProtocol; + persistenceProtocol.CreateInstance(); + persistenceProtocol->initialize( + loadTextFile(protocolIdDir, "protocolName.txt"), + loadTextFile(protocolIdDir, "uri.txt"), + loadTextFile(protocolIdDir, "uri_amqp.txt"), + loadTextFile(protocolIdDir, "uri_tunnel.txt"), + loadTextFile(protocolIdDir, "tlsCert.pem"), + loadTextFile(protocolIdDir, "tlsProtocol.txt"), + tlsCipherCollection, + tlsCertCollection, + FileSystemUtils::buildPath(protocolIdDir, "uri_amqp.txt"), + FileSystemUtils::buildPath(protocolIdDir, "uri_tunnel.txt"), + FileSystemUtils::buildPath(protocolIdDir, "tlsCert.pem"), + tlsCertPathCollection); + + persistenceProtocolCollectionInner.push_back(persistenceProtocol); + } + } + + SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollection; + persistenceProtocolCollection.CreateInstance(); + persistenceProtocolCollection->initialize(persistenceProtocolCollectionInner); + + return persistenceProtocolCollection; +} + +SmartPtrCPersistenceProtocolDoc CPersistenceUtils::loadPersistenceProtocol( + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadPersistenceProtocol"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + const SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollection = + loadPersistenceProtocolCollection(persistenceDir); + + return loadPersistenceProtocol(persistenceProtocolCollection); +} + +SmartPtrCPersistenceProtocolDoc CPersistenceUtils::loadPersistenceProtocol( + const SmartPtrCPersistenceProtocolCollectionDoc& persistenceProtocolCollection) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "loadPersistenceProtocol"); + CAF_CM_VALIDATE_SMARTPTR(persistenceProtocolCollection); + + std::deque persistenceProtocolCollectionInner = + persistenceProtocolCollection->getPersistenceProtocol(); + CAF_CM_VALIDATE_BOOL(persistenceProtocolCollectionInner.size() <= 1); + + SmartPtrCPersistenceProtocolDoc rc; + if (persistenceProtocolCollectionInner.size() == 1) { + rc = persistenceProtocolCollectionInner.front(); + } + + return rc; +} + +void CPersistenceUtils::savePersistence( + const SmartPtrCPersistenceDoc& persistence, + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPersistenceUtils", "savePersistence"); + CAF_CM_VALIDATE_SMARTPTR(persistence); + CAF_CM_VALIDATE_STRING(persistenceDir); + + const std::string protocolDir = FileSystemUtils::buildPath(persistenceDir, "protocol", "amqpBroker_default"); + const std::string uriAmqp = loadTextFile(protocolDir, "uri_amqp.txt"); + const std::string uriTunnel = loadTextFile(protocolDir, "uri_tunnel.txt"); + + if (FileSystemUtils::doesDirectoryExist(persistenceDir)) { + CAF_CM_LOG_DEBUG_VA1("Removing directory - %s", persistenceDir.c_str()); + FileSystemUtils::recursiveRemoveDirectory(persistenceDir); + } + + const SmartPtrCLocalSecurityDoc localSecurity = persistence->getLocalSecurity(); + const SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollection = + persistence->getRemoteSecurityCollection(); + const SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollection = + persistence->getPersistenceProtocolCollection(); + + saveLocalSecurity(localSecurity, persistenceDir); + saveRemoteSecurityCollection(remoteSecurityCollection, persistenceDir); + savePersistenceProtocolCollection(persistenceProtocolCollection, persistenceDir, + uriAmqp, uriTunnel); + FileSystemUtils::saveTextFile(persistenceDir, "version.txt", persistence->getVersion()); +} + +void CPersistenceUtils::saveLocalSecurity( + const SmartPtrCLocalSecurityDoc& localSecurity, + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "saveLocalSecurity"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + if (localSecurity) { + const std::string locCertsDir = createDirectory(persistenceDir, "local"); + + if (! localSecurity->getLocalId().empty()) { + FileSystemUtils::saveTextFile( + locCertsDir, "localId.txt", localSecurity->getLocalId()); + } + + if (! localSecurity->getCert().empty()) { + FileSystemUtils::saveTextFile( + locCertsDir, "cert.pem", localSecurity->getCert()); + } + + if (! localSecurity->getPrivateKey().empty()) { + FileSystemUtils::saveTextFile( + locCertsDir, "privateKey.pem", localSecurity->getPrivateKey()); + } + } +} + +void CPersistenceUtils::saveRemoteSecurityCollection( + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollection, + const std::string& persistenceDir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "saveRemoteSecurityCollection"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + if (! remoteSecurityCollection.IsNull()) { + const std::deque remoteSecurityCollectionInner = + remoteSecurityCollection->getRemoteSecurity(); + if (! remoteSecurityCollectionInner.empty()) { + const std::string rmtCertsDir = createDirectory(persistenceDir, "remote"); + + for (TConstIterator > + remoteSecurityIter(remoteSecurityCollectionInner); + remoteSecurityIter; + remoteSecurityIter++) { + const SmartPtrCRemoteSecurityDoc remoteSecurity = *remoteSecurityIter; + CAF_CM_VALIDATE_SMARTPTR(remoteSecurity); + + const std::string remoteId = remoteSecurity->getRemoteId(); + CAF_CM_VALIDATE_STRING(remoteId); + + const std::string persistenceDir = createDirectory(rmtCertsDir, remoteId); + + FileSystemUtils::saveTextFile( + persistenceDir, "remoteId.txt", remoteSecurity->getRemoteId()); + + if (! remoteSecurity->getProtocolName().empty()) { + FileSystemUtils::saveTextFile( + persistenceDir, "protocolName.txt", remoteSecurity->getProtocolName()); + } + + if (! remoteSecurity->getCmsCert().empty()) { + FileSystemUtils::saveTextFile( + persistenceDir, "cmsCert.pem", remoteSecurity->getCmsCert()); + } + + if (! remoteSecurity->getCmsCipherName().empty()) { + FileSystemUtils::saveTextFile( + persistenceDir, "cmsCipherName.txt", remoteSecurity->getCmsCipherName()); + } + + if (! remoteSecurity->getCmsCertCollection().IsNull()) { + const std::deque cmsCertCollectionInner = + remoteSecurity->getCmsCertCollection()->getCert(); + + if (! cmsCertCollectionInner.empty()) { + const std::string certCollectionDir = createDirectory(persistenceDir, "cmsCertCollection"); + saveCollection(cmsCertCollectionInner, certCollectionDir, "cmsCert", ".pem"); + } + } + } + } + } +} + +void CPersistenceUtils::savePersistenceProtocolCollection( + const SmartPtrCPersistenceProtocolCollectionDoc& persistenceProtocolCollection, + const std::string& persistenceDir, + const std::string& uriAmqp, + const std::string& uriTunnel) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "savePersistenceProtocolCollection"); + CAF_CM_VALIDATE_STRING(persistenceDir); + + if (! persistenceProtocolCollection.IsNull()) { + const std::deque persistenceProtocolCollectionInner = + persistenceProtocolCollection->getPersistenceProtocol(); + if (! persistenceProtocolCollectionInner.empty()) { + const std::string protocolDir = createDirectory(persistenceDir, "protocol"); + + for (TConstIterator > + persistenceProtocolIter(persistenceProtocolCollectionInner); + persistenceProtocolIter; + persistenceProtocolIter++) { + const SmartPtrCPersistenceProtocolDoc persistenceProtocol = *persistenceProtocolIter; + + const std::string protocolName = persistenceProtocol->getProtocolName(); + CAF_CM_VALIDATE_STRING(protocolName); + + const std::string amqpQueueDir = createDirectory(protocolDir, protocolName); + + FileSystemUtils::saveTextFile( + amqpQueueDir, "protocolName.txt", persistenceProtocol->getProtocolName()); + + if (! persistenceProtocol->getUri().empty()) { + FileSystemUtils::saveTextFile( + amqpQueueDir, "uri.txt", persistenceProtocol->getUri()); + } + + const std::string uriAmqpTmp = persistenceProtocol->getUriAmqp().empty() ? + uriAmqp : persistenceProtocol->getUriAmqp(); + if (! uriAmqpTmp.empty()) { + FileSystemUtils::saveTextFile( + amqpQueueDir, "uri_amqp.txt", uriAmqpTmp); + } + + const std::string uriTunnelTmp = persistenceProtocol->getUriTunnel().empty() ? + uriTunnel : persistenceProtocol->getUriTunnel(); + if (! uriTunnelTmp.empty()) { + FileSystemUtils::saveTextFile( + amqpQueueDir, "uri_tunnel.txt", uriTunnelTmp); + } + + if (! persistenceProtocol->getTlsCert().empty()) { + FileSystemUtils::saveTextFile( + amqpQueueDir, "tlsCert.pem", persistenceProtocol->getTlsCert()); + } + + if (! persistenceProtocol->getTlsProtocol().empty()) { + FileSystemUtils::saveTextFile( + amqpQueueDir, "tlsProtocol.txt", persistenceProtocol->getTlsProtocol()); + } + + const std::deque tlsCipherCollectionInner = + persistenceProtocol->getTlsCipherCollection(); + if (! tlsCipherCollectionInner.empty()) { + const std::string cipherDir = createDirectory(amqpQueueDir, "tlsCipherCollection"); + saveCollection(tlsCipherCollectionInner, cipherDir, "tlsCipher", ".txt"); + } + + if (! persistenceProtocol->getTlsCertCollection().IsNull()) { + const std::deque tlsCertCollectionInner = + persistenceProtocol->getTlsCertCollection()->getCert(); + + if (! tlsCertCollectionInner.empty()) { + const std::string certCollectionDir = createDirectory(amqpQueueDir, "tlsCertCollection"); + saveCollection(tlsCertCollectionInner, certCollectionDir, "tlsCert", ".pem"); + } + } + } + } + } +} + +std::string CPersistenceUtils::loadTextFile( + const std::string& dir, + const std::string& file, + const std::string& defaultVal, + const bool isTrimRight) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPersistenceUtils", "loadTextFile"); + CAF_CM_VALIDATE_STRING(dir); + CAF_CM_VALIDATE_STRING(file); + + const std::string path = FileSystemUtils::buildPath(dir, file); + + std::string rc; + if (FileSystemUtils::doesFileExist(path)) { + rc = FileSystemUtils::loadTextFile(path); + if (isTrimRight) { + rc = CStringUtils::trimRight(rc); + } + } else { + CAF_CM_LOG_DEBUG_VA1("File not found - %s", path.c_str()); + rc = defaultVal; + } + + return rc; +} + +std::string CPersistenceUtils::createDirectory( + const std::string& directory, + const std::string& subdir) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "createDirectory"); + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(subdir); + + const std::string dirPath = FileSystemUtils::buildPath(directory, subdir); + if (! FileSystemUtils::doesDirectoryExist(dirPath)) { + FileSystemUtils::createDirectory(dirPath); + } + + return dirPath; +} + +void CPersistenceUtils::saveCollection( + const Cdeqstr& collection, + const std::string& directory, + const std::string& filePrefix, + const std::string& filePostfix) { + CAF_CM_STATIC_FUNC_VALIDATE("CPersistenceUtils", "saveCollection"); + CAF_CM_VALIDATE_STL(collection); + CAF_CM_VALIDATE_STRING(directory); + CAF_CM_VALIDATE_STRING(filePrefix); + CAF_CM_VALIDATE_STRING(filePostfix); + + int32 cnt = 0; + for (TConstIterator elemIter(collection); elemIter; elemIter++) { + const std::string elem = *elemIter; + const std::string cntStr = CStringConv::toString(cnt++); + std::string elemFilename = filePrefix + cntStr + filePostfix; + FileSystemUtils::saveTextFile(directory, elemFilename, elem); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.h new file mode 100644 index 000000000..99e126878 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CPersistenceUtils.h @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CPersistenceUtils_H_ +#define CPersistenceUtils_H_ + +#include + +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CPersistenceUtils { +public: + static SmartPtrCPersistenceDoc loadPersistence( + const std::string& persistenceDir); + + static SmartPtrCLocalSecurityDoc loadLocalSecurity( + const std::string& persistenceDir); + + static SmartPtrCRemoteSecurityCollectionDoc loadRemoteSecurityCollection( + const std::string& persistenceDir); + + static SmartPtrCPersistenceProtocolCollectionDoc loadPersistenceProtocolCollection( + const std::string& persistenceDir); + + static SmartPtrCPersistenceProtocolDoc loadPersistenceProtocol( + const std::string& persistenceDir); + + static SmartPtrCPersistenceProtocolDoc loadPersistenceProtocol( + const SmartPtrCPersistenceProtocolCollectionDoc& persistenceProtocolCollection); + +public: + static void savePersistence( + const SmartPtrCPersistenceDoc& persistence, + const std::string& persistenceDir); + + static void saveLocalSecurity( + const SmartPtrCLocalSecurityDoc& localSecurity, + const std::string& persistenceDir); + + static void saveRemoteSecurityCollection( + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollection, + const std::string& persistenceDir); + + static void savePersistenceProtocolCollection( + const SmartPtrCPersistenceProtocolCollectionDoc& persistenceProtocolCollection, + const std::string& persistenceDir, + const std::string& uriAmqp, + const std::string& uriTunnel); + +private: + static std::string loadTextFile( + const std::string& dir, + const std::string& file, + const std::string& defaultVal = std::string(), + const bool isTrimRight = true); + +private: + static std::string createDirectory( + const std::string& directory, + const std::string& subdir); + + static void saveCollection( + const Cdeqstr& collection, + const std::string& directory, + const std::string& filePrefix, + const std::string& filePostfix); + +private: + CAF_CM_DECLARE_NOCREATE(CPersistenceUtils); +}; + +} + +#endif /* CPersistenceUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.cpp new file mode 100644 index 000000000..7efb82e5a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.cpp @@ -0,0 +1,441 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "CProcessUtils.h" +#ifndef WIN32 +#include +#include +#endif + + +using namespace Caf; + +const std::string ProcessUtils::INHERIT_PARENT_DIRECTORY; + +void ProcessUtils::runSyncToFiles( + const Cdeqstr& argv, + const std::string& stdoutPath, + const std::string& stderrPath, + const ProcessUtils::Priority priority, + const std::string workingDirectory) { + + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ProcessUtils", "runSyncToFiles"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(argv); + // stdoutPath is optional + // stderrPath is optional + + std::string stdoutContent; + std::string stderrContent; + ProcessUtils::runSync( + argv, stdoutPath, stderrPath, stdoutContent, stderrContent, priority, workingDirectory); + } + CAF_CM_EXIT; +} + +void ProcessUtils::runSync( + const Cdeqstr& argv, + std::string& stdoutContent, + std::string& stderrContent, + const ProcessUtils::Priority priority, + const std::string workingDirectory) { + + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ProcessUtils", "runSync"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(argv); + + ProcessUtils::runSync( + argv, std::string(), std::string(), stdoutContent, stderrContent, priority, workingDirectory); + } + CAF_CM_EXIT; +} + +#ifdef WIN32 +void ProcessUtils::runSync( + const Cdeqstr& argv, + const std::string& stdoutPath, + const std::string& stderrPath, + std::string& stdoutContent, + std::string& stderrContent, + const ProcessUtils::Priority priority, + const std::string& workingDirectory) { + CAF_CM_STATIC_FUNC_LOG( "CProcessUtils", "runSync(Win)" ); + + const uint32 maxCmdLineLen = 1024; + + PROCESS_INFORMATION processInfo; + HANDLE stdoutReadPipe = NULL; + HANDLE stdoutWritePipe = NULL; + HANDLE stderrReadPipe = NULL; + HANDLE stderrWritePipe = NULL; + + try { + CAF_CM_VALIDATE_STL(argv); + + const std::string cmdLine = convertToString(argv); + + if (cmdLine.length() > maxCmdLineLen) { + CAF_CM_EXCEPTION_VA1(0, "Command-line too long: \"%s\"", + cmdLine.c_str()); + } + + CAF_CM_LOG_INFO_VA1("Running command - %s", cmdLine.c_str()); + + char cmdLineBuf[maxCmdLineLen + 1]; + ::strcpy_s(cmdLineBuf, cmdLine.c_str()); + + SECURITY_ATTRIBUTES securityAttributes; + ::ZeroMemory(&securityAttributes, sizeof(securityAttributes)); + securityAttributes.nLength = sizeof(securityAttributes); + securityAttributes.bInheritHandle = TRUE; + + //Create pipes to write and read stdout/stderr + BOOL apiRc = ::CreatePipe(&stdoutReadPipe, &stdoutWritePipe, &securityAttributes, 0); + if (apiRc == FALSE) { + const DWORD errorCode = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(errorCode); + CAF_CM_EXCEPTION_VA2(errorCode, "Failed to create the stdout pipe - cmdLine: \"%s\", msg: \"%s\"", + cmdLine.c_str(), errorMsg.c_str()); + } + + apiRc = ::CreatePipe(&stderrReadPipe, &stderrWritePipe, &securityAttributes, 0); + if (apiRc == FALSE) { + const DWORD errorCode = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(errorCode); + CAF_CM_EXCEPTION_VA2(errorCode, "Failed to create the stderr pipe - cmdLine: \"%s\", msg: \"%s\"", + cmdLine.c_str(), errorMsg.c_str()); + } + + STARTUPINFOA startupInfo; + ::ZeroMemory(&startupInfo, sizeof(startupInfo)); + startupInfo.cb = sizeof(startupInfo); + startupInfo.dwFlags |= STARTF_USESTDHANDLES; + startupInfo.hStdInput = NULL; + startupInfo.hStdOutput = stdoutWritePipe; + startupInfo.hStdError = stderrWritePipe; + + ::ZeroMemory(&processInfo, sizeof(processInfo)); + + DWORD dwCreationFlags = CREATE_NO_WINDOW; + switch (priority) { + case LOW: + dwCreationFlags |= BELOW_NORMAL_PRIORITY_CLASS; + break; + + case IDLE: + dwCreationFlags |= IDLE_PRIORITY_CLASS; + break; + + case NORMAL: + default: + dwCreationFlags |= NORMAL_PRIORITY_CLASS; + break; + } + + // NORMAL_PRIORITY_CLASS BELOW_NORMAL_PRIORITY_CLASS IDLE_PRIORITY_CLASS + // Create the process + apiRc = ::CreateProcessA( + NULL, // Image Name + cmdLineBuf, // Command Line + NULL, // Security Attributes for the Process + NULL, // Security Attributes for the Thread + TRUE, // Inherit handles? + dwCreationFlags, // Creation flags + NULL, // Environment + workingDirectory.length() == 0 ? NULL : workingDirectory.c_str(), + &startupInfo, // Startup Info + &processInfo); // Process Info + + if (apiRc == FALSE) { + const DWORD errorCode = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(errorCode); + CAF_CM_EXCEPTION_VA2(errorCode, "Failed to invoke \"%s\", msg: \"%s\"", + cmdLine.c_str(), errorMsg.c_str()); + } else { + // Successfully created the process. Wait for it to finish. + ::WaitForSingleObject(processInfo.hProcess, INFINITE); + + // Get the exit code. + DWORD exitCode = 0; + apiRc = ::GetExitCodeProcess(processInfo.hProcess, &exitCode); + if (apiRc == FALSE) { + const DWORD errorCode = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(errorCode); + CAF_CM_EXCEPTION_VA2(errorCode, "Executed command but couldn't get exit code - cmdLine: \"%s\", msg: \"%s\"", + cmdLine.c_str(), errorMsg.c_str()); + } + + ::CloseHandle(stdoutWritePipe); + ::CloseHandle(stderrWritePipe); + stdoutWritePipe = NULL; + stderrWritePipe = NULL; + + stdoutContent = readFromPipe(stdoutReadPipe); + stderrContent = readFromPipe(stderrReadPipe); + + if (!stdoutContent.empty() && !stdoutPath.empty()) { + FileSystemUtils::saveTextFile(stdoutPath, stdoutContent); + } + + if (!stderrContent.empty() && !stderrPath.empty()) { + FileSystemUtils::saveTextFile(stderrPath, stderrContent); + } + + std::ostringstream msgStream; + if (exitCode != 0) { + msgStream << "Command failed - exitCode: " << exitCode; + msgStream << ", cmdLine: \"" << cmdLine << "\""; + msgStream << ", stdout: \"" << stdoutContent.c_str() << "\""; + msgStream << ", stderr: \"" << stderrContent.c_str() << "\""; + std::string msg = msgStream.str(); + + CAF_CM_LOG_WARN_VA0(msg.c_str()); + CAF_CM_EXCEPTIONEX_VA0(ProcessFailedException, exitCode, msg); + } + + msgStream << "Command succeeded - cmdLine: \"" << cmdLine << "\"; output: "; + msgStream << ", stdout: \"" << stdoutContent.c_str() << "\""; + msgStream << ", stderr: \"" << stderrContent.c_str() << "\""; + CAF_CM_LOG_DEBUG_VA0(msgStream.str().c_str()); + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + + try { + if (processInfo.hProcess != NULL) { + ::CloseHandle(processInfo.hProcess); + } + if (processInfo.hThread != NULL) { + ::CloseHandle(processInfo.hThread); + } + if (stdoutReadPipe != NULL) { + ::CloseHandle(stdoutReadPipe); + } + if (stdoutWritePipe != NULL) { + ::CloseHandle(stdoutWritePipe); + } + if (stderrReadPipe != NULL) { + ::CloseHandle(stderrReadPipe); + } + if (stderrWritePipe != NULL) { + ::CloseHandle(stderrWritePipe); + } + } + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +std::string ProcessUtils::readFromPipe( + const HANDLE readPipe) { + CAF_CM_STATIC_FUNC_LOG( "CProcessUtils", "readFromPipe" ); + + const uint32 maxOutBufSize = 1024; + + std::string rc = ""; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_PTR(readPipe); + + char readBuf[maxOutBufSize+1]; + DWORD numberOfBytesRead = 0; + for (BOOL apiRc = ::ReadFile(readPipe, readBuf, maxOutBufSize, &numberOfBytesRead, NULL); + apiRc != FALSE; + apiRc = ::ReadFile(readPipe, readBuf, maxOutBufSize, &numberOfBytesRead, NULL)) { + readBuf[numberOfBytesRead] = '\0'; + rc += std::string(readBuf); + } + } + CAF_CM_EXIT; + + return rc; +} +#else + +void SpawnChildSetup(gpointer data) { + int niceLevel = *((int*) data); + setpriority(PRIO_PROCESS, 0, niceLevel); +} + +void ProcessUtils::runSync( + const Cdeqstr& argv, + const std::string& stdoutPath, + const std::string& stderrPath, + std::string& stdoutContent, + std::string& stderrContent, + const ProcessUtils::Priority priority, + const std::string& workingDirectory) { + CAF_CM_STATIC_FUNC_LOG( "CProcessUtils", "runSync(NotWin)" ); + + GError *gError = NULL; + gchar *gStdout = NULL; + gchar *gStderr = NULL; + const char** argvNative = NULL; + + try { + CAF_CM_VALIDATE_STL(argv); + + const std::string cmdLine = convertToString(argv); + + // Each string in argvNative points to the internal memory in + // the corresponding string in argv. So int32 as argvNative and + // argv have (at least) the same scope, everything should be fine. + argvNative = convertToCharArray(argv); + + int niceLevel; + switch (priority) { + case LOW: + niceLevel = 10; + break; + + case IDLE: + niceLevel = 19; + break; + + case NORMAL: + default: + niceLevel = 0; + break; + } + + CAF_CM_LOG_INFO_VA1("Running command - %s", cmdLine.c_str()); + + gint gStatus = 0; + const bool isSuccessful = g_spawn_sync( + workingDirectory.length() == 0 ? NULL : workingDirectory.c_str(), + const_cast(argvNative), + NULL, // child's environment, or NULL to inherit parent's + static_cast(0), // GSpawnFlags - the defaults are fine + &SpawnChildSetup, // child_setup - function to run in the child just before exec() + &niceLevel, // user_data - user data for child_setup + &gStdout, + &gStderr, + &gStatus, + &gError); + + stdoutContent = (gStdout == NULL) ? std::string() : gStdout; + stderrContent = (gStderr == NULL) ? std::string() : gStderr; + + if (!stdoutContent.empty() && !stdoutPath.empty()) { + FileSystemUtils::saveTextFile(stdoutPath, stdoutContent); + } + if (!stderrContent.empty() && !stderrPath.empty()) { + FileSystemUtils::saveTextFile(stderrPath, stderrContent); + } + + std::ostringstream msgStream; + if(!isSuccessful || (WIFEXITED(gStatus) == FALSE) || (WEXITSTATUS(gStatus) != 0)) { + const std::string errorMessage = (gError == NULL) ? std::string() : gError->message; + const int32 errorCode = (gError == NULL) ? 0 : gError->code; + + msgStream << "Failed to invoke command - errorCode: " << errorCode; + msgStream << ", errorMessage: \"" << errorMessage.c_str() << "\""; + msgStream << ", cmdLine: \"" << cmdLine << "\""; + msgStream << ", stdout: \"" << stdoutContent.c_str() << "\""; + msgStream << ", stderr: \"" << stderrContent.c_str() << "\""; + std::string msg = msgStream.str(); + + CAF_CM_LOG_WARN_VA0(msg.c_str()); + CAF_CM_EXCEPTIONEX_VA0(ProcessFailedException, errorCode, msg); + } + + msgStream << "Command succeeded - cmdLine: \"" << cmdLine << "\"; output: "; + msgStream << ", stdout: \"" << stdoutContent.c_str() << "\""; + msgStream << ", stderr: \"" << stderrContent.c_str() << "\""; + CAF_CM_LOG_DEBUG_VA0(msgStream.str().c_str()); + + freeMemory(gError, gStdout, gStderr, argvNative); + } + catch(...) { + freeMemory(gError, gStdout, gStderr, argvNative); + throw; + } +} +#endif + +std::string ProcessUtils::getUserName() { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ProcessUtils", "getUserName"); + + std::string rc; + + CAF_CM_ENTER { + const gchar* gUserName = g_get_user_name(); + CAF_CM_VALIDATE_PTR(gUserName); + + rc = gUserName; + } + CAF_CM_EXIT; + + return rc; +} + +std::string ProcessUtils::getRealUserName() { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ProcessUtils", "getRealUserName"); + + std::string rc; + + CAF_CM_ENTER { + const gchar* gUserName = g_get_real_name(); + CAF_CM_VALIDATE_PTR(gUserName); + + rc = gUserName; + } + CAF_CM_EXIT; + + return rc; +} + +const char** ProcessUtils::convertToCharArray( + const Cdeqstr& deqstr) { + int32 rcIndex = 0; + const char** rc = new const char*[deqstr.size() + 1]; + for (TConstIterator strIter(deqstr); strIter; strIter++) { + rc[rcIndex++] = (*strIter).c_str(); + } + + rc[rcIndex++] = NULL; + + return rc; +} + +std::string ProcessUtils::convertToString(const Cdeqstr& deqstr) { + std::string rc; + for (TConstIterator strIter(deqstr); strIter; strIter++) { + std::string str = *strIter; +#ifdef WIN32 + if (rc.empty() && str.find(" ") != std::string::npos) { + str = "\"" + *strIter + "\""; + } +#endif + rc += str + std::string(" "); + } + + return rc; +} + +void ProcessUtils::freeMemory( + GError *gError, + gchar *gStdout, + gchar *gStderr, + const char** argvNative) { + if(gError != NULL) { + g_error_free(gError); + gError = NULL; + } + g_free(gStdout); + g_free(gStderr); + if (argvNative != NULL) { + delete[] argvNative; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.h new file mode 100644 index 000000000..c217cbdf0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CProcessUtils.h @@ -0,0 +1,76 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProcessUtils_H_ +#define CProcessUtils_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE ProcessUtils { +public: + enum COMMONAGGREGATOR_LINKAGE Priority { + NORMAL, + LOW, + IDLE + }; +public: + // Use for the "workingDirectory" parameter when you want to inherit the parents directory. + static const std::string INHERIT_PARENT_DIRECTORY; + +public: + static void runSyncToFiles( + const Cdeqstr& argv, + const std::string& stdoutPath, + const std::string& stderrPath, + const ProcessUtils::Priority priority = NORMAL, + const std::string workingDirectory = ProcessUtils::INHERIT_PARENT_DIRECTORY); + + static void runSync( + const Cdeqstr& argv, + std::string& stdoutContent, + std::string& stderrContent, + const ProcessUtils::Priority priority = NORMAL, + const std::string workingDirectory = ProcessUtils::INHERIT_PARENT_DIRECTORY); + +public: + static std::string getUserName(); + static std::string getRealUserName(); + +private: + static void runSync( + const Cdeqstr& argv, + const std::string& stdoutPath, + const std::string& stderrPath, + std::string& stdoutContent, + std::string& stderrContent, + const ProcessUtils::Priority priority, + const std::string& workingDirectory); + + static const char** convertToCharArray( + const Cdeqstr& argv); + + static std::string convertToString( + const Cdeqstr& deqstr); + + static void freeMemory( + GError *gError, + gchar *gStdout, + gchar *gStderr, + const char** argvNative); + +#ifdef WIN32 + static std::string readFromPipe( + const HANDLE readPipe); +#endif + +private: + CAF_CM_DECLARE_NOCREATE(ProcessUtils); +}; + +} + +#endif /* CProcessUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.cpp new file mode 100644 index 000000000..3758b21b2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.cpp @@ -0,0 +1,186 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#include "CStringUtils.h" + +#include +#include +#include + +using namespace Caf; + +Cdeqstr CStringUtils::split(const std::string &str, const char delim) { + Cdeqstr rc; + std::string token; + std::stringstream stream(str); + while(std::getline(stream, token, delim)) { + rc.push_back(token); + } + + return rc; +} + +// trim from both ends +std::string CStringUtils::trim(const std::string &s) { + std::string sTmp = s; + return trimLeft(trimRight(sTmp)); +} + +// trim from start +std::string CStringUtils::trimLeft(const std::string &s) { + std::string sTmp = s; + sTmp.erase( + sTmp.begin(), + std::find_if( + sTmp.begin(), + sTmp.end(), + std::not1(std::ptr_fun(std::isspace)))); + return sTmp; +} + +// trim from end +std::string CStringUtils::trimRight(const std::string &s) { + std::string sTmp = s; + sTmp.erase( + std::find_if( + sTmp.rbegin(), + sTmp.rend(), + std::not1(std::ptr_fun(std::isspace))).base(), sTmp.end()); + return sTmp; +} + +// expand the environment variable in the string. +std::string CStringUtils::expandEnv(const std::string &envStr) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CStringUtils", "expandEnv"); + CAF_CM_VALIDATE_STRING(envStr); + + return getAppConfig()->resolveValue(envStr); +} + +UUID CStringUtils::createRandomUuidRaw() { + CAF_CM_STATIC_FUNC_LOG("CStringUtils", "createRandomUuidRaw"); + + UUID randomUuid; + if (S_OK != ::UuidCreate(&randomUuid)) { + CAF_CM_EXCEPTIONEX_VA0(InvalidHandleException, E_UNEXPECTED, + "Failed to create the UUID"); + } + + return randomUuid; +} + +std::string CStringUtils::createRandomUuid() { + return BasePlatform::UuidToString(createRandomUuidRaw()); +} + +inline bool caseInsCharCompare(char a, char b) { + return(::toupper(a) == ::toupper(b)); +} + +bool CStringUtils::isEqualIgnoreCase( + const std::string & src, + const std::string & srch) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CStringUtils", "isEqualIgnoreCase"); + CAF_CM_VALIDATE_STRING(src); + CAF_CM_VALIDATE_STRING(srch); + + return((src.size() == srch.size()) && + std::equal(src.begin(), src.end(), srch.begin(), caseInsCharCompare)); + +// std::string::iterator it = std::search( +// src.begin(), src.end(), +// srch.begin(), srch.end(), +// [](char ch1, char ch2) { return std::toupper(ch1) == std::toupper(ch2); } +// ); +// +// return (it != src.end()); +} + +#ifdef WIN32 +std::string CStringUtils::convertWideToNarrow( + const std::wstring& src) { + CAF_CM_STATIC_FUNC_LOG("CStringUtils", "convertWideToNarrow"); + + std::string rc; + + // deal with trivial case of empty string + if (! src.empty()) { + // determine required length of new string + const int32 srcLength = static_cast(src.length()); + const int32 reqLength = ::WideCharToMultiByte(CP_UTF8, 0, src.c_str(), srcLength, NULL, 0, NULL, NULL); + + // construct new string of required length + std::string dst(reqLength, '\0'); + + // convert old string to new string + const int32 dstLength = static_cast(dst.length()); + ::WideCharToMultiByte(CP_UTF8, 0, src.c_str(), srcLength, &dst[0], dstLength, NULL, NULL); + + rc = dst; + } + + return rc; +} + +std::wstring CStringUtils::convertNarrowToWide( + const std::string& src) { + CAF_CM_STATIC_FUNC_LOG("CStringUtils", "convertNarrowToWide"); + + std::wstring rc; + + // deal with trivial case of empty string + if (! src.empty()) { + // determine required length of new string + const int32 srcLength = static_cast(src.length()); + const int32 reqLength = ::MultiByteToWideChar(CP_UTF8, 0, src.c_str(), srcLength, NULL, 0); + + // construct new string of required length + std::wstring dst(reqLength, L'\0'); + + // convert old string to new string + const int32 dstLength = static_cast(dst.length()); + ::MultiByteToWideChar(CP_UTF8, 0, src.c_str(), srcLength, &dst[0], dstLength); + + rc = dst; + } + + return rc; +} +#endif + +std::string CStringUtils::toLower( + const std::string& str) { + CAF_CM_STATIC_FUNC_VALIDATE("CStringUtils", "toLower"); + CAF_CM_VALIDATE_STRING(str); + + std::string rc(str); + std::transform( + str.begin(), + str.end(), + rc.begin(), + std::ptr_fun(std::tolower)); + + return rc; +} + +std::string CStringUtils::toUpper( + const std::string& str) { + CAF_CM_STATIC_FUNC_VALIDATE("CStringUtils", "toUpper"); + CAF_CM_VALIDATE_STRING(str); + + std::string rc(str); + std::transform( + str.begin(), + str.end(), + rc.begin(), + std::ptr_fun(std::toupper)); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.h new file mode 100644 index 000000000..e8f415ff2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CStringUtils.h @@ -0,0 +1,87 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CSTRINGUTILS_H_ +#define CSTRINGUTILS_H_ + +#include + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CStringUtils { +public: + static Cdeqstr split(const std::string &str, const char delim); + static std::string trim(const std::string &s); + static std::string trimLeft(const std::string &s); + static std::string trimRight(const std::string &s); + static std::string expandEnv(const std::string &s); + static UUID createRandomUuidRaw(); + static std::string createRandomUuid(); + static bool isEqualIgnoreCase(const std::string & src, const std::string & srch); +#ifdef WIN32 + static std::string convertWideToNarrow(const std::wstring& src); + static std::wstring convertNarrowToWide(const std::string& src); +#endif + + static std::string toLower( + const std::string& str); + + static std::string toUpper( + const std::string& str); + +private: + CAF_CM_DECLARE_NOCREATE(CStringUtils); +}; + +namespace CStringConv { + +// Templates to convert numbers to strings +template +inline std::basic_string toTString(const T& t) { + std::basic_ostringstream o; + o << t; + if (o.fail()) { + throw std::runtime_error("cannot convert number to string"); + } + return o.str(); +} + +template +inline std::string toString(const T& t) { + return toTString(t); +} + +template +inline std::wstring toWString(const T& t) { + return toTString(t); +} + +// Templates to convert strings to numbers +template +inline T fromTString(const std::basic_string& s) { + T t; + std::basic_istringstream i(s); + i >> t; + if (i.fail()) { + throw std::runtime_error("cannot convert string '" + s + "' to number"); + } + return t; +} + +template +inline T fromString(const std::string& s) { + return fromTString(s); +} + +template +inline T fromWString(const std::wstring& s) { + return fromTString(s); +} + +}} + +#endif /* CSTRINGUTILS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadPool.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadPool.cpp new file mode 100644 index 000000000..98119980a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadPool.cpp @@ -0,0 +1,94 @@ +/* + * CThreadPool.cpp + * + * Created on: May 9, 2012 + * Author: mdonahue + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CManagedThreadPool.h" +#include "Common/CThreadPool.h" +#include "Exception/CCafException.h" + + bool _isInitialized; + GThreadPool *_threadPool; + gpointer _userData; + +CThreadPool::CThreadPool() : + _isInitialized(false), + _threadPool(NULL), + _userData(NULL), + CAF_CM_INIT("CThreadPool") { + CAF_CM_INIT_THREADSAFE; +} + +CThreadPool::~CThreadPool() { + if (_threadPool) { + g_thread_pool_free(_threadPool, FALSE, TRUE); + } +} + +void CThreadPool::init(gpointer userData, gint maxThreads) { + CAF_CM_FUNCNAME("init"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + GError *error = NULL; + _threadPool = g_thread_pool_new( + ThreadFunc, + userData, + maxThreads, + TRUE, + &error); + if (error) { + CAF_CM_THROW_GERROR(error); + } + _isInitialized = true; +} + +void CThreadPool::term() { + CAF_CM_FUNCNAME_VALIDATE("term"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + g_thread_pool_free(_threadPool, FALSE, TRUE); + _threadPool = NULL; +} + +void CThreadPool::addTask(const SmartPtrIThreadTask& task) { + CAF_CM_FUNCNAME("addTask"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(task); + + if (_threadPool) { + GError *error = NULL; + g_thread_pool_push( + _threadPool, + task.GetAddRefedInterface(), + &error); + if (error) { + task->Release(); + CAF_CM_THROW_GERROR(error); + } + } else { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "The thread pool has been shut down"); + } +} + +void CThreadPool::ThreadFunc(gpointer data, gpointer userData) { + CAF_CM_STATIC_FUNC_LOG("CThreadPool", "ThreadFunc"); + CAF_CM_VALIDATE_PTR(data); + // userData is optional + IThreadTask *task = reinterpret_cast(data); + try { + task->run(userData); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + task->Release(); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadSignal.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadSignal.cpp new file mode 100644 index 000000000..9a21d3d93 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadSignal.cpp @@ -0,0 +1,93 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CAutoMutex.h" +#include "Exception/CCafException.h" +#include "Common/CThreadSignal.h" + +using namespace Caf; + +CThreadSignal::CThreadSignal(void) : + _isInitialized(false), + CAF_CM_INIT("CThreadSignal") { + CAF_CM_INIT_THREADSAFE + ; +} + +CThreadSignal::~CThreadSignal(void) { +} + +void CThreadSignal::initialize(const std::string& conditionName) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(conditionName); + + _condition.initialize(conditionName); + _isInitialized = true; +} + +bool CThreadSignal::isInitialized() const { + CAF_CM_LOCK_UNLOCK; + return _isInitialized; +} + +void CThreadSignal::signal() { + CAF_CM_FUNCNAME_VALIDATE("signal"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _condition.signal(); +} + +void CThreadSignal::wait(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs) { + CAF_CM_FUNCNAME("wait"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + const bool isSignaled = waitOrTimeout(mutex, timeoutMs); + if (!isSignaled) { + CAF_CM_EXCEPTION_VA1(ERROR_TIMEOUT, "Signal timed-out: %s", + _condition.getName().c_str()); + } +} + +bool CThreadSignal::waitOrTimeout(SmartPtrCAutoMutex& mutex, const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("waitOrTimeout"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(mutex); + + bool rc = false; + if (0 == timeoutMs) { + _condition.wait(mutex); + rc = true; + } else { + gint64 endTime; + endTime = ::g_get_monotonic_time() + timeoutMs * G_TIME_SPAN_MILLISECOND; + rc = _condition.waitUntil(mutex, endTime); + } + + return rc; +} + +std::string CThreadSignal::getName() const { + CAF_CM_FUNCNAME_VALIDATE("getName"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _condition.getName(); +} + +void CThreadSignal::close() { + CAF_CM_LOCK_UNLOCK; + + if (_isInitialized) { + _condition.close(); + _isInitialized = false; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.cpp new file mode 100644 index 000000000..f1e3be9c1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.cpp @@ -0,0 +1,52 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "CThreadUtils.h" + +using namespace Caf; + +uint32 CThreadUtils::getThreadStackSizeKb() { + CAF_CM_STATIC_FUNC_LOG_ONLY("CThreadUtils", "getThreadStackSizeKb"); + + uint32 stackSizeKb = + AppConfigUtils::getRequiredUint32(_sAppConfigGlobalThreadStackSizeKb); + +#ifdef __linux__ + // The thread stack size is the larger of + // PTHREAD_STACK_MIN, 256K and the config file value + stackSizeKb = std::max((int32)stackSizeKb, std::max(PTHREAD_STACK_MIN, (256 * 1024)) / 1024); +#endif + CAF_CM_LOG_DEBUG_VA1("thread_stack_size_kb=%d", stackSizeKb); + return stackSizeKb; +} + +GThread* CThreadUtils::startJoinable(threadFunc func, void* data) { + CAF_CM_STATIC_FUNC("CThreadUtils", "startJoinable"); + + GThread *rc = g_thread_new("CThreadUtils::startJoinable", func, data); + if(NULL == rc) { + CAF_CM_EXCEPTION_VA0(0, "g_thread_new Failed"); + } + + return rc; +} + +void CThreadUtils::join(GThread* thread) { + (void) g_thread_join(thread); +} + +void CThreadUtils::sleep( + const uint32 milliseconds) { + + CAF_CM_ENTER { + const int32 microseconds = milliseconds * 1000; + g_usleep(microseconds); + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.h new file mode 100644 index 000000000..f8f28824d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CThreadUtils.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CThreadUtils_H_ +#define CThreadUtils_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CThreadUtils { +public: + typedef void* (*threadFunc) (void* data); + +public: + static uint32 getThreadStackSizeKb(); + static GThread* startJoinable(threadFunc func, void* data); + static void join(GThread* thread); + static void sleep(const uint32 milliseconds); + +private: + CAF_CM_DECLARE_NOCREATE(CThreadUtils); +}; + +} + +#endif /* CThreadUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.cpp new file mode 100644 index 000000000..53b5f1433 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.cpp @@ -0,0 +1,91 @@ +/* + * Author: bwilliams + * Created: Nov 17, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CTimeUnit.h" + +using namespace Caf; + +int32 CTimeUnit::MILLISECONDS::toDays(const int32 milliseconds) { + return milliseconds / (1000*60*60*24); +} + +int32 CTimeUnit::MILLISECONDS::toHours(const int32 milliseconds) { + return milliseconds / (1000*60*60); +} + +int32 CTimeUnit::MILLISECONDS::toMinutes(const int32 milliseconds) { + return milliseconds / (1000*60); +} + +int32 CTimeUnit::MILLISECONDS::toSeconds(const int32 milliseconds) { + return milliseconds / 1000; +} + +int32 CTimeUnit::SECONDS::toDays(const int32 seconds) { + return seconds / (60*60*24); +} + +int32 CTimeUnit::SECONDS::toHours(const int32 seconds) { + return seconds / (60*60); +} + +int32 CTimeUnit::SECONDS::toMinutes(const int32 seconds) { + return seconds / 60; +} + +int32 CTimeUnit::SECONDS::toMilliseconds(const int32 seconds) { + return seconds * 1000; +} + +int32 CTimeUnit::MINUTES::toDays(const int32 seconds) { + return seconds / (60*24); +} + +int32 CTimeUnit::MINUTES::toHours(const int32 minutes) { + return minutes / 60; +} + +int32 CTimeUnit::MINUTES::toSeconds(const int32 minutes) { + return minutes * 60; +} + +int32 CTimeUnit::MINUTES::toMilliseconds(const int32 minutes) { + return minutes * 1000 * 60; +} + +int32 CTimeUnit::HOURS::toDays(const int32 hours) { + return hours / 24; +} + +int32 CTimeUnit::HOURS::toMinutes(const int32 hours) { + return hours * 60; +} + +int32 CTimeUnit::HOURS::toSeconds(const int32 hours) { + return hours * (60*60); +} + +int32 CTimeUnit::HOURS::toMilliseconds(const int32 hours) { + return hours * (60*60*1000); +} + +int32 CTimeUnit::DAYS::toHours(const int32 days) { + return days * 24; +} + +int32 CTimeUnit::DAYS::toMinutes(const int32 days) { + return days * (24*60); +} + +int32 CTimeUnit::DAYS::toSeconds(const int32 days) { + return days * (24*60*60); +} + +int32 CTimeUnit::DAYS::toMilliseconds(const int32 days) { + return days * (24*60*60*1000); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.h new file mode 100644 index 000000000..d2c5663fd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CTimeUnit.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Nov 17, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CTimeUnit_H_ +#define CTimeUnit_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CTimeUnit { +public: + class COMMONAGGREGATOR_LINKAGE MILLISECONDS { + public: + static int32 toDays(const int32 milliseconds); + static int32 toHours(const int32 milliseconds); + static int32 toMinutes(const int32 milliseconds); + static int32 toSeconds(const int32 milliseconds); + }; + + class COMMONAGGREGATOR_LINKAGE SECONDS { + public: + static int32 toDays(const int32 seconds); + static int32 toHours(const int32 seconds); + static int32 toMinutes(const int32 seconds); + static int32 toMilliseconds(const int32 seconds); + }; + + class COMMONAGGREGATOR_LINKAGE MINUTES { + public: + static int32 toDays(const int32 minutes); + static int32 toHours(const int32 minutes); + static int32 toSeconds(const int32 minutes); + static int32 toMilliseconds(const int32 minutes); + }; + + class COMMONAGGREGATOR_LINKAGE HOURS { + public: + static int32 toDays(const int32 hours); + static int32 toMinutes(const int32 hours); + static int32 toSeconds(const int32 hours); + static int32 toMilliseconds(const int32 hours); + }; + + class COMMONAGGREGATOR_LINKAGE DAYS { + public: + static int32 toHours(const int32 days); + static int32 toMinutes(const int32 days); + static int32 toSeconds(const int32 days); + static int32 toMilliseconds(const int32 days); + }; + +private: + CAF_CM_DECLARE_NOCREATE(CTimeUnit); +}; + +} + +#endif /* CTimeUnit_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CVariant.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CVariant.cpp new file mode 100644 index 000000000..e380ccd06 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CVariant.cpp @@ -0,0 +1,179 @@ +/* + * Created on: Jun 7, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "Common/CVariant.h" + +using namespace Caf; + +CVariant::CVariant() : + _variant(NULL), + CAF_CM_INIT("CVariant") { +} + +CVariant::~CVariant() { + if (_variant) { + g_variant_unref(_variant); + } +} + +void CVariant::set(GVariant *variant) { + CAF_CM_FUNCNAME_VALIDATE("set"); + CAF_CM_VALIDATE_PTR(variant); + if (_variant) { + g_variant_unref(_variant); + _variant = NULL; + } + _variant = g_variant_ref_sink(variant); +} + +GVariant *CVariant::get() const { + CAF_CM_FUNCNAME_VALIDATE("get"); + CAF_CM_VALIDATE_PTR(_variant); + return _variant; +} + +std::string CVariant::toString() const { + CAF_CM_FUNCNAME("toString"); + CAF_CM_VALIDATE_PTR(_variant); + std::string result; + + const GVariantType *variantType = g_variant_get_type(_variant); + if (g_variant_type_equal(variantType, G_VARIANT_TYPE_BOOLEAN)) { + result = g_variant_get_boolean(_variant) ? "true" : "false"; + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_BYTE)) { + result = CStringConv::toString(g_variant_get_byte(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_INT16)) { + result = CStringConv::toString(g_variant_get_int16(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_UINT16)) { + result = CStringConv::toString(g_variant_get_uint16(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_INT32)) { + result = CStringConv::toString(g_variant_get_int32(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_UINT32)) { + result = CStringConv::toString(g_variant_get_uint32(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_INT64)) { + result = CStringConv::toString(g_variant_get_int64(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_UINT64)) { + result = CStringConv::toString(g_variant_get_uint64(_variant)); + } else if (g_variant_type_equal(variantType, G_VARIANT_TYPE_STRING)) { + result = g_variant_get_string(_variant, NULL); + } else { + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + 0, + "Unsupported GVariant conversion to string from type '%s'", + g_variant_get_type_string(_variant)); + } + return result; +} + +bool CVariant::isString() const { + return isType(G_VARIANT_TYPE_STRING); +} + +bool CVariant::isBool() const { + return isType(G_VARIANT_TYPE_BOOLEAN); +} + +bool CVariant::isUint8() const { + return isType(G_VARIANT_TYPE_BYTE); +} + +bool CVariant::isInt16() const { + return isType(G_VARIANT_TYPE_INT16); +} + +bool CVariant::isUint16() const { + return isType(G_VARIANT_TYPE_UINT16); +} + +bool CVariant::isInt32() const { + return isType(G_VARIANT_TYPE_INT32); +} + +bool CVariant::isUint32() const { + return isType(G_VARIANT_TYPE_UINT32); +} + +bool CVariant::isInt64() const { + return isType(G_VARIANT_TYPE_INT64); +} + +bool CVariant::isUint64() const { + return isType(G_VARIANT_TYPE_UINT64); +} + +SmartPtrCVariant CVariant::createString(const std::string& value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_string(value.c_str())); + return variant; +} + +SmartPtrCVariant CVariant::createBool(const bool value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_boolean(value)); + return variant; +} + +SmartPtrCVariant CVariant::createUint8(const uint8 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_byte(value)); + return variant; +} + +SmartPtrCVariant CVariant::createInt16(const int16 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_int16(value)); + return variant; +} + +SmartPtrCVariant CVariant::createUint16(const uint16 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_uint16(value)); + return variant; +} + +SmartPtrCVariant CVariant::createInt32(const int32 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_int32(value)); + return variant; +} + +SmartPtrCVariant CVariant::createUint32(const uint32 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_uint32(value)); + return variant; +} + +SmartPtrCVariant CVariant::createInt64(const int64 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_int64(value)); + return variant; +} + +SmartPtrCVariant CVariant::createUint64(const uint64 value) { + SmartPtrCVariant variant; + variant.CreateInstance(); + variant->set(g_variant_new_uint64(value)); + return variant; +} + +bool CVariant::isType(const GVariantType * varType) const { + CAF_CM_FUNCNAME_VALIDATE("isType"); + CAF_CM_VALIDATE_PTR(_variant); + CAF_CM_VALIDATE_PTR(varType); + return g_variant_type_equal(g_variant_get_type(_variant), varType); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.cpp new file mode 100644 index 000000000..391034002 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.cpp @@ -0,0 +1,57 @@ +/* + * Author: mdonahue + * Created: Jan 24, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#ifdef WIN32 +#include "Common/CWinScm.h" +#endif + +#include "CafInitialize.h" + +using namespace Caf; + +HRESULT CafInitialize::init() { + return S_OK; +} + +HRESULT CafInitialize::serviceConfig() { +#ifdef WIN32 +// CWinScm toolsScm("VMTools"); +// SmartPtrSServiceConfig toolsConfig = toolsScm.getServiceConfig(false); +// if (!toolsConfig.isNull()) { +// // Add to path +// } + + CWinScm vgAuthScm("VGAuthService"); + Caf::CWinScm::SmartPtrSServiceConfig vgAuthConfig = vgAuthScm.getServiceConfig(false); + if (!vgAuthConfig.IsNull() && !vgAuthConfig->_binaryPathName.empty()) { + // Add to path + std::string dllPath = vgAuthConfig->_binaryPathName; + if (dllPath[0] == '\"') { + dllPath = dllPath.substr(1, dllPath.length() - 2); + } + + const std::wstring dllPathWide = CStringUtils::convertNarrowToWide(FileSystemUtils::getDirname(dllPath)); + // NOTE: Can't use ::AddDllDirectory because it requires a newer base version of windows. Even so, + // MSDN documentation specifies search order to be non-deterministic. + if (0 == ::SetDllDirectory(dllPathWide.c_str())) { + const DWORD lastError = ::GetLastError(); + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(lastError); + ::fprintf( + stderr, + "CafInitialize::serviceConfig() ::AddDllDirectory() Failed - : VGAuthService, msg: \"%s\"", + errorMsg.c_str()); + } + } +#endif + return S_OK; +} + +HRESULT CafInitialize::term() { + return S_OK; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.h new file mode 100644 index 000000000..a5eefa04a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CafInitialize.h @@ -0,0 +1,24 @@ +/* + * Author: mdonahue + * Created: Jan 24, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAFINITIALIZE_H_ +#define CAFINITIALIZE_H_ + +namespace Caf { + +class COMMONAGGREGATOR_LINKAGE CafInitialize { +public: + static HRESULT init(); + static HRESULT serviceConfig(); + static HRESULT term(); + + CAF_CM_DECLARE_NOCREATE(CafInitialize); +}; + +} + +#endif /* CAFINITIALIZE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CommonAggregatorLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CommonAggregatorLink.h new file mode 100644 index 000000000..5e805b09f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/CommonAggregatorLink.h @@ -0,0 +1,65 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef COMMONAGGREGATORLINK_H_ +#define COMMONAGGREGATORLINK_H_ + +#ifndef COMMONAGGREGATOR_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) + #else + #define COMMONAGGREGATOR_LINKAGE __declspec(dllimport) + #endif + #else + #define COMMONAGGREGATOR_LINKAGE + #endif +#endif + +#include +#include +#include +#include +#include + +#include +#include + +#include "../Logging/LoggingLink.h" +#include "../Exception/ExceptionLink.h" +#include "../Collections/Iterators/IteratorsInc.h" +#include "../Collections/Graphs/GraphsInc.h" + +#include "CTimeUnit.h" +#include "CAutoFileUnlock.h" +#include "CStringUtils.h" +#include "CFileSystemUtils.h" +#include "CProcessUtils.h" +#include "CDateTimeUtils.h" +#include "CThreadUtils.h" +#include "AppConfigUtils.h" +#include "CAutoMutexLockUnlock.h" +#include "CAutoMutexLockUnlockRaw.h" +#include "CAutoMutexUnlockLock.h" +#include "CafInitialize.h" +#include "CHexCodec.h" +#include "UriUtils.h" +#include "TBlockingCell.h" +#include "Common/CVariant.h" +#include "CEnvironmentUtils.h" +#include "CPersistenceUtils.h" + +#if defined(__linux__) || defined(__APPLE__) +#include "CDaemonUtils.h" +#elif WIN32 +#endif + +#include "../SubSystemBase/SubSystemBaseLink.h" +#include "../Xml/MarkupParser/MarkupParserLink.h" +#include "../Xml/XmlUtils/XmlUtilsLink.h" + +#endif /* COMMONAGGREGATORLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/TBlockingCell.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/TBlockingCell.h new file mode 100644 index 000000000..8e31e1a7c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/TBlockingCell.h @@ -0,0 +1,107 @@ +/* + * Created on: May 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef TBLOCKINGCELL_H_ +#define TBLOCKINGCELL_H_ + +#include "Common/CThreadSignal.h" +#include "Exception/CCafException.h" + +namespace Caf { + +/** + * @brief Simple one-shot IPC mechanism. + * Allows a value to be passed from one thread to another in a thread-safe manner. + * The value may only be set once and once set may get retrieved as many times as + * desired. + */ +template class TBlockingCell { + +public: + TBlockingCell() : + _filled(false) { + CAF_CM_INIT_THREADSAFE; + CAF_THREADSIGNAL_INIT; + //TODO: This has stopped working... why? + //_value = NULL; + _valueSignal.initialize("valueSignal"); + } + + virtual ~TBlockingCell() { + } + + /** + * @brief Wait for a value indefinitely + * Waits indefinitely for the value to be set or returns the value if it is + * already set. + * @return value + */ + T get() { + return get(0); + } + + /** + * @brief Wait for a value for a specified amount of time + * Waits for a set amout of time (milliseconds) for the value to be set or returns + * the value if it is already set. + * @retval value if set + * @retval TimeoutException thrown if time expires + */ + T get(uint32 timeoutMs) { + CAF_CM_STATIC_FUNC("TBlockingCell", "get"); + CAF_CM_LOCK; + CAF_THREADSIGNAL_LOCK_UNLOCK; + if (!_filled) { + CAF_CM_UNLOCK; + _valueSignal.waitOrTimeout(CAF_THREADSIGNAL_MUTEX, timeoutMs); + CAF_CM_LOCK; + if (!_filled) { + CAF_CM_UNLOCK; + CAF_CM_EXCEPTIONEX_VA0( + TimeoutException, + 0, + "Timed out waiting for value to be set"); + } else { + CAF_CM_UNLOCK; + } + } else { + CAF_CM_UNLOCK; + } + return _value; + } + + /** + * @brief Sets a new value if the value is not already set + * If the value is already set an IllegalStateException will be thrown. + */ + void set(T newValue) { + CAF_CM_STATIC_FUNC("TBlockingCell", "set"); + CAF_CM_LOCK_UNLOCK; + if (_filled) { + CAF_CM_EXCEPTIONEX_VA0( + IllegalStateException, + 0, + "The value can only be set once"); + } + _value = newValue; + _filled = true; + _valueSignal.signal(); + } + +private: + bool _filled; + T _value; + CAF_THREADSIGNAL_CREATE; + CThreadSignal _valueSignal; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(TBlockingCell); +}; + +} + + +#endif /* TBLOCKINGCELL_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.cpp new file mode 100644 index 000000000..7dc265a23 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.cpp @@ -0,0 +1,406 @@ +/* + * Author: mdonahue + * Created: Feb 4, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "UriUtils.h" + +using namespace Caf; + +void UriUtils::parseUriString( + const std::string& uri, + UriUtils::SUriRecord& data) { + CAF_CM_STATIC_FUNC("UriUtils", "parseUriString"); + CAF_CM_VALIDATE_STRING(uri); + + // examples: + // + // vmcf:service_id@tcp:host=hostname,port=portnum?timeout=timeoutval + // tunnel:localhost:6672/amqp_queue_name?vhost=caf;connection_timeout=150000;connection_retries=10;connection_seconds_to_wait=10;channel_cache_size=3 + // amqp:guest:guest@10.25.91.81:5672/amqp_queue_name?vhost=caf;connection_timeout=150000;connection_retries=10;connection_seconds_to_wait=10;channel_cache_size=3 + + static const std::string uriPattern("^(?P[^:]+?):(?P

[^?]+)\\?\?(?P.*)"); + static const std::string parmPattern("(?P[^=]+)=(?P[^;]+);?"); + static const std::string namePattern("^(?P[^:]+):(?P[^@]+)@(?P.*)"); + static const std::string hostPattern("^(?P[^:]+):(?P[^/]+)/"); + static const std::string pathPattern("/(?P[^?]+)"); + + CAF_CM_ENTER { + data.protocol = std::string(); + data.address = std::string(); + data.parameters.clear(); + + GRegex *regexUri = NULL; + GRegex *regexParms = NULL; + GRegex *regexName = NULL; + GRegex *regexHost = NULL; + GRegex *regexPath = NULL; + GMatchInfo* matchInfo = NULL; + + try { + CAF_CM_VALIDATE_STRING(uri); + GError *error = NULL; + regexUri = g_regex_new(uriPattern.c_str(), + (GRegexCompileFlags)(G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + regexParms = g_regex_new(parmPattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + regexName = g_regex_new(namePattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + regexHost = g_regex_new(hostPattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + regexPath = g_regex_new(pathPattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + if (g_regex_match(regexUri, uri.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + gchar *value = g_match_info_fetch_named(matchInfo, "protocol"); + data.protocol = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "address"); + data.address = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "parameters"); + std::string params(value ? value : ""); + g_free(value); + g_match_info_free(matchInfo); + matchInfo = NULL; + + if (! data.address.empty()) { + std::string hostpath = data.address; + if (g_regex_match(regexName, data.address.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + value = g_match_info_fetch_named(matchInfo, "username"); + data.username = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "password"); + data.password = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "hostpath"); + hostpath = value; + g_free(value); + } + g_match_info_free(matchInfo); + matchInfo = NULL; + + if (g_regex_match(regexHost, hostpath.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + value = g_match_info_fetch_named(matchInfo, "host"); + data.host = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "port"); + data.portStr = value; + data.port = CStringConv::fromString(value); + g_free(value); + } + g_match_info_free(matchInfo); + matchInfo = NULL; + + if (g_regex_match(regexPath, hostpath.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + value = g_match_info_fetch_named(matchInfo, "path"); + data.path = value; + g_free(value); + } + g_match_info_free(matchInfo); + matchInfo = NULL; + } + + if (params.length()) { + if (g_regex_match(regexParms, params.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + while (g_match_info_matches(matchInfo)) { + value = g_match_info_fetch_named(matchInfo, "name"); + std::string paramName(value); + g_free(value); + value = g_match_info_fetch_named(matchInfo, "value"); + std::string paramValue(value); + g_free(value); + if (!data.parameters.insert( + std::map::value_type(paramName, paramValue)).second) { + CAF_CM_EXCEPTION_VA2(ERROR_DUPLICATE_TAG, + "Duplicate parameter name %s in %s", + paramName.c_str(), + uri.c_str()); + } + g_match_info_next(matchInfo, &error); + if (error) { + throw error; + } + } + } + g_match_info_free(matchInfo); + matchInfo = NULL; + } + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_GERROR + + if (matchInfo) { + g_match_info_free(matchInfo); + } + if (regexUri) { + g_regex_unref(regexUri); + } + if (regexParms) { + g_regex_unref(regexParms); + } + if (regexName) { + g_regex_unref(regexName); + } + if (regexHost) { + g_regex_unref(regexHost); + } + if (regexPath) { + g_regex_unref(regexPath); + } + CAF_CM_THROWEXCEPTION; + } + CAF_CM_EXIT; +} + +std::string UriUtils::buildUriString( + UriUtils::SUriRecord& data) { + CAF_CM_STATIC_FUNC_VALIDATE("UriUtils", "buildUriString"); + CAF_CM_VALIDATE_STRING(data.protocol); + CAF_CM_VALIDATE_STRING(data.host); + CAF_CM_VALIDATE_STRING(data.path); + + std::string rc = data.protocol + ":"; + if (! data.username.empty() || ! data.password.empty()) { + rc += data.username + ":" + data.password + "@"; + } + + rc += data.host; + + if (! data.portStr.empty()) { + rc += ":" + data.portStr; + } + + rc += "/" + data.path; + + rc = appendParameters(rc, data.parameters); + + return rc; +} + +void UriUtils::parseFileAddress(const std::string& fileUri, UriUtils::SFileUriRecord& data) { + CAF_CM_STATIC_FUNC_LOG("UriUtils", "parseFileAddress"); + CAF_CM_VALIDATE_STRING(fileUri); + + // examples: + // + // ///c:/tmp + + static const std::string addressPattern("^//(?P[^/]*)/(?P.*)"); + static const std::string drivePattern("^[a-zA-Z]:"); + + CAF_CM_ENTER { + data.hostname = std::string(); + data.path = std::string(); + + GRegex *regexAddress = NULL; + GRegex *regexDrive = NULL; + GMatchInfo* matchInfo = NULL; + + try { + CAF_CM_VALIDATE_STRING(fileUri); + + GError *error = NULL; + regexAddress = g_regex_new(addressPattern.c_str(), + (GRegexCompileFlags)(G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + if (g_regex_match(regexAddress, fileUri.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + gchar *value = g_match_info_fetch_named(matchInfo, "hostname"); + data.hostname = value; + g_free(value); + value = g_match_info_fetch_named(matchInfo, "path"); + data.path = value; + g_free(value); + g_match_info_free(matchInfo); + matchInfo = NULL; + + regexDrive = g_regex_new(drivePattern.c_str(), + (GRegexCompileFlags)(G_REGEX_RAW), + (GRegexMatchFlags)0, + &error); + if (error) { + throw error; + } + + if (! g_regex_match(regexDrive, data.path.c_str(), (GRegexMatchFlags)0, &matchInfo)) { + data.path = "/" + data.path; + } + g_match_info_free(matchInfo); + matchInfo = NULL; + } + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_GERROR + + if (matchInfo) { + g_match_info_free(matchInfo); + } + if (regexAddress) { + g_regex_unref(regexAddress); + } + if (regexDrive) { + g_regex_unref(regexDrive); + } + CAF_CM_THROWEXCEPTION; + } + CAF_CM_EXIT; +} + +std::string UriUtils::parseRequiredFilePath( + const std::string& uriStr) { + CAF_CM_STATIC_FUNC("UriUtils", "parseRequiredFilePath"); + CAF_CM_VALIDATE_STRING(uriStr); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(uriStr); + + SUriRecord uriRecord; + parseUriString(uriStr, uriRecord); + + if(uriRecord.protocol.compare("file") != 0) { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, ERROR_INVALID_DATA, + "Unsupported protocol (%s != \"file\") - %s", + uriRecord.protocol.c_str(), uriStr.c_str()); + } + + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + + rc = CStringUtils::expandEnv(fileUriRecord.path); + if(! FileSystemUtils::doesFileExist(rc)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "File in URI not found - %s", rc.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string UriUtils::parseOptionalFilePath( + const std::string& uriStr) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("UriUtils", "parseOptionalFilePath"); + CAF_CM_VALIDATE_STRING(uriStr); + + std::string rc = ""; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(uriStr); + + SUriRecord uriRecord; + parseUriString(uriStr, uriRecord); + + if(uriRecord.protocol.compare("file") != 0) { + CAF_CM_LOG_DEBUG_VA2( + "Unsupported protocol (%s != \"file\") - %s", + uriRecord.protocol.c_str(), uriStr.c_str()); + } else { + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + + const std::string filePath = CStringUtils::expandEnv(fileUriRecord.path); + if(! FileSystemUtils::doesFileExist(filePath)) { + CAF_CM_LOG_DEBUG_VA2( + "File in URI not found - uri: %s, path: %s", uriStr.c_str(), filePath.c_str()); + } else { + rc = filePath; + } + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string UriUtils::appendParameters( + const std::string& uriStr, + const std::map& parameters) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("UriUtils", "appendParameters"); + CAF_CM_VALIDATE_STRING(uriStr); + + std::string rc = uriStr; + if (!parameters.empty()) { + rc += "?"; + for (TConstMapIterator > parameter(parameters); + parameter; parameter++) { + rc += parameter.getKey() + "=" + *parameter + ";"; + } + } + + CAF_CM_LOG_DEBUG_VA1("Appended parameters - num: %d", parameters.size()); + + return rc; +} + +std::string UriUtils::findOptParameter( + const UriUtils::SUriRecord& uri, + const std::string& name, + const std::string& defaultValue) { + CAF_CM_STATIC_FUNC_VALIDATE("UriUtils", "findOptParameter"); + CAF_CM_VALIDATE_STRING(name); + + std::string rc = defaultValue; + const std::map::const_iterator param = + uri.parameters.find(name); + if(param != uri.parameters.end()) { + rc = param->second; + } + + return rc; +} + +std::string UriUtils::findReqParameter( + const UriUtils::SUriRecord& uri, + const std::string& name) { + CAF_CM_STATIC_FUNC("UriUtils", "findReqParameter"); + CAF_CM_VALIDATE_STRING(name); + + const std::map::const_iterator param = + uri.parameters.find(name); + if(param == uri.parameters.end()) { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "param not found - %s", name.c_str()); + } + + return param->second; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.h new file mode 100644 index 000000000..48f381b50 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/UriUtils.h @@ -0,0 +1,51 @@ +/* + * Author: mdonahue + * Created: Feb 4, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef UriUtils_h_ +#define UriUtils_h_ + +namespace Caf { + +namespace UriUtils { + + struct SUriRecord { + std::string protocol; + std::string address; + std::string username; + std::string password; + std::string host; + uint32 port; + std::string portStr; + std::string path; + std::map parameters; + }; + + struct SFileUriRecord { + std::string hostname; + std::string path; + }; + + void COMMONAGGREGATOR_LINKAGE parseUriString(const std::string& uri, SUriRecord& data); + std::string COMMONAGGREGATOR_LINKAGE buildUriString(SUriRecord& data); + void COMMONAGGREGATOR_LINKAGE parseFileAddress(const std::string& fileUri, SFileUriRecord& data); + std::string COMMONAGGREGATOR_LINKAGE parseRequiredFilePath(const std::string& uriStr); + std::string COMMONAGGREGATOR_LINKAGE parseOptionalFilePath(const std::string& uriStr); + std::string COMMONAGGREGATOR_LINKAGE appendParameters(const std::string& uriStr, + const std::map& parameters); + + std::string COMMONAGGREGATOR_LINKAGE findOptParameter( + const UriUtils::SUriRecord& uri, + const std::string& name, + const std::string& defaultValue = std::string()); + std::string COMMONAGGREGATOR_LINKAGE findReqParameter( + const UriUtils::SUriRecord& uri, + const std::string& name); +}; + +} + +#endif /* UriUtils_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/stdafx.h new file mode 100644 index 000000000..91c0d5b49 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Common/stdafx.h @@ -0,0 +1,31 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) + #define EXCEPTION_LINKAGE __declspec(dllexport) + #define LOGGING_LINKAGE __declspec(dllexport) + #define SUBSYSTEMBASE_LINKAGE __declspec(dllexport) + #define MARKUPPARSER_LINKAGE __declspec(dllexport) + #define XMLUTILS_LINKAGE __declspec(dllexport) +#else + #define COMMONAGGREGATOR_LINKAGE + #define EXCEPTION_LINKAGE + #define LOGGING_LINKAGE + #define SUBSYSTEMBASE_LINKAGE + #define MARKUPPARSER_LINKAGE + #define XMLUTILS_LINKAGE +#endif + +#include + +#include "CommonAggregatorLink.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/CommonGlobals.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/CommonGlobals.cpp new file mode 100644 index 000000000..a03376866 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/CommonGlobals.cpp @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include + +namespace Caf { + const char* _sConfigTmpDir = "tmp_dir"; + const char* _sConfigInputDir = "input_dir"; + const char* _sConfigOutputDir = "output_dir"; + const char* _sConfigSchemaCacheDir = "schema_cache_dir"; + const char* _sConfigProviderRegDir = "provider_reg_dir"; + const char* _sConfigInstallDir = "install_dir"; + const char* _sConfigInvokersDir = "invokers_dir"; + const char* _sConfigProvidersDir = "providers_dir"; + const char* _sConfigCommonPackagesDir = "common_packages_dir"; + const char* _sConfigWorkingDir = "working_dir"; + const char* _sConfigPrivateKeyFile = "private_key_file"; + const char* _sConfigCertFile = "cert_file"; + + const char* _sProviderHostArea = "providerHost"; + const char* _sManagementAgentArea = "managementAgent"; + + const char* _sSchemaSummaryFilename = "schemaSummary.xml"; + const char* _sProviderResponseFilename = "providerResponse.xml"; + const char* _sStdoutFilename = "_provider_stdout_"; + const char* _sStderrFilename = "_provider_stderr_"; + + const char* _sPayloadRequestFilename = "payloadRequest.xml"; + const char* _sResponseFilename = "response.xml"; + const char* _sErrorResponseFilename = "errorResponse.xml"; + const char* _sProviderRequestFilename = "providerRequest.xml"; + const char* _sInfraErrFilename = "_infraError_"; + + const char* _sAppConfigGlobalParamRootDir = "root_dir"; + const char* _sAppConfigGlobalParamDataDir = "data_dir"; + const char* _sAppConfigGlobalParamLogDir = "log_dir"; + const char* _sAppConfigGlobalParamLogConfigFile = "log_config_file"; + const char* _sAppConfigGlobalParamInputDir = "input_dir"; + const char* _sAppConfigGlobalParamOutputDir = "output_dir"; + const char* _sAppConfigGlobalParamDbDir = "db_dir"; + const char* _sAppConfigGlobalThreadStackSizeKb = "thread_stack_size_kb"; + + const GUID CAFCOMMON_GUID_NULL = {0}; + +#ifdef WIN32 + const char* CAFCOMMON_PATH_DELIM = "\\"; + const char CAFCOMMON_PATH_DELIM_CHAR = '\\'; +#else + const char* CAFCOMMON_PATH_DELIM = "/"; + const char CAFCOMMON_PATH_DELIM_CHAR = '/'; +#endif +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInCollectionDoc.cpp new file mode 100644 index 000000000..ede483ff2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInCollectionDoc.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CAddInCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type AddInCollection +CAddInCollectionDoc::CAddInCollectionDoc() : + _isInitialized(false) {} +CAddInCollectionDoc::~CAddInCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CAddInCollectionDoc::initialize( + const std::deque addInCollection) { + if (! _isInitialized) { + _addInCollection = addInCollection; + + _isInitialized = true; + } +} + +/// Accessor for the AddIn +std::deque CAddInCollectionDoc::getAddInCollection() const { + return _addInCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInsDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInsDoc.cpp new file mode 100644 index 000000000..54b9c9972 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInsDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAddInCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAddInsDoc.h" + +using namespace Caf; + +/// A simple container for objects of type AddIns +CAddInsDoc::CAddInsDoc() : + _isInitialized(false) {} +CAddInsDoc::~CAddInsDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CAddInsDoc::initialize( + const std::deque addInCollection) { + if (! _isInitialized) { + _addInCollection = addInCollection; + + _isInitialized = true; + } +} + +/// Accessor for the AddInCollection +std::deque CAddInsDoc::getAddInCollection() const { + return _addInCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentCollectionDoc.cpp new file mode 100644 index 000000000..a86565153 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentCollectionDoc.cpp @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type AttachmentCollection +CAttachmentCollectionDoc::CAttachmentCollectionDoc() : + _isInitialized(false) {} +CAttachmentCollectionDoc::~CAttachmentCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CAttachmentCollectionDoc::initialize( + const std::deque attachment, + const std::deque inlineAttachment) { + if (! _isInitialized) { + _attachment = attachment; + _inlineAttachment = inlineAttachment; + + _isInitialized = true; + } +} + +/// Accessor for the Attachment +std::deque CAttachmentCollectionDoc::getAttachment() const { + return _attachment; +} + +/// Accessor for the InlineAttachment +std::deque CAttachmentCollectionDoc::getInlineAttachment() const { + return _inlineAttachment; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentDoc.cpp new file mode 100644 index 000000000..08dfec25f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentDoc.cpp @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" + +using namespace Caf; + +/// A simple container for objects of type Attachment +CAttachmentDoc::CAttachmentDoc() : + _isInitialized(false), + _isReference(false), + _cmsPolicy(CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED) {} +CAttachmentDoc::~CAttachmentDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CAttachmentDoc::initialize( + const std::string name, + const std::string type, + const std::string uri, + const bool isReference, + const CMS_POLICY cmsPolicy) { + if (! _isInitialized) { + _name = name; + _type = type; + _uri = uri; + _isReference = isReference; + _cmsPolicy = cmsPolicy; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::string CAttachmentDoc::getName() const { + return _name; +} + +/// Accessor for the Type +std::string CAttachmentDoc::getType() const { + return _type; +} + +/// Accessor for the Uri +std::string CAttachmentDoc::getUri() const { + return _uri; +} + +/// Accessor for the IsReference +bool CAttachmentDoc::getIsReference() const { + return _isReference; +} + +/// Accessor for the CMS Policy +CMS_POLICY CAttachmentDoc::getCmsPolicy() const { + return _cmsPolicy; +} + + +CMS_POLICY _cmsPolicy; + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.cpp new file mode 100644 index 000000000..4c3853e22 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type AttachmentNameCollection +CAttachmentNameCollectionDoc::CAttachmentNameCollectionDoc() : + _isInitialized(false) {} +CAttachmentNameCollectionDoc::~CAttachmentNameCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CAttachmentNameCollectionDoc::initialize( + const std::deque name) { + if (! _isInitialized) { + _name = name; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::deque CAttachmentNameCollectionDoc::getName() const { + return _name; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.cpp new file mode 100644 index 000000000..9b6a96ca2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h" +#include "Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h" + +using namespace Caf; + +/// Set of logging levels for different components +CAuthnAuthzCollectionDoc::CAuthnAuthzCollectionDoc() : + _isInitialized(false) {} +CAuthnAuthzCollectionDoc::~CAuthnAuthzCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CAuthnAuthzCollectionDoc::initialize( + const std::deque authnAuthz) { + if (! _isInitialized) { + _authnAuthz = authnAuthz; + + _isInitialized = true; + } +} + +/// Used to change the logging level for a specific component +std::deque CAuthnAuthzCollectionDoc::getAuthnAuthz() const { + return _authnAuthz; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAuthnAuthzDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAuthnAuthzDoc.cpp new file mode 100644 index 000000000..db114f935 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAuthnAuthzDoc.cpp @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: May 24, 2015 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h" + +using namespace Caf; + +/// A simple container for objects of type AuthnAuthz +CAuthnAuthzDoc::CAuthnAuthzDoc() : + _isInitialized(false), + _sequenceNumber(0) {} +CAuthnAuthzDoc::~CAuthnAuthzDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CAuthnAuthzDoc::initialize( + const std::string type, + const std::string value, + const std::string name, + const int32 sequenceNumber) { + if (! _isInitialized) { + _type = type; + _value = value; + _name = name; + _sequenceNumber = sequenceNumber; + + _isInitialized = true; + } +} + +/// Accessor for the Type +std::string CAuthnAuthzDoc::getType() const { + return _type; +} + +/// Accessor for the Value +std::string CAuthnAuthzDoc::getValue() const { + return _value; +} + +/// Accessor for the Name +std::string CAuthnAuthzDoc::getName() const { + return _name; +} + +/// Accessor for the SequenceNumber +int32 CAuthnAuthzDoc::getSequenceNumber() const { + return _sequenceNumber; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CClassFiltersDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CClassFiltersDoc.cpp new file mode 100644 index 000000000..f04bdd0de --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CClassFiltersDoc.cpp @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CClassFiltersDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ClassFilters +CClassFiltersDoc::CClassFiltersDoc() : + _isInitialized(false) {} +CClassFiltersDoc::~CClassFiltersDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CClassFiltersDoc::initialize( + const std::string dialect, + const std::deque classFilter) { + if (! _isInitialized) { + _dialect = dialect; + _classFilter = classFilter; + + _isInitialized = true; + } +} + +/// Accessor for the Dialect +std::string CClassFiltersDoc::getDialect() const { + return _dialect; +} + +/// Accessor for the ClassFilter +std::deque CClassFiltersDoc::getClassFilter() const { + return _classFilter; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CClassSpecifierDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CClassSpecifierDoc.cpp new file mode 100644 index 000000000..319e7f0b5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CClassSpecifierDoc.cpp @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CClassFiltersDoc.h" +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ClassSpecifier +CClassSpecifierDoc::CClassSpecifierDoc() : + _isInitialized(false) {} +CClassSpecifierDoc::~CClassSpecifierDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CClassSpecifierDoc::initialize( + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass, + const SmartPtrCClassFiltersDoc classFilters) { + if (! _isInitialized) { + _fullyQualifiedClass = fullyQualifiedClass; + _classFilters = classFilters; + + _isInitialized = true; + } +} + +/// Accessor for the FullyQualifiedClass +SmartPtrCFullyQualifiedClassGroupDoc CClassSpecifierDoc::getFullyQualifiedClass() const { + return _fullyQualifiedClass; +} + +/// Accessor for the ClassFilters +SmartPtrCClassFiltersDoc CClassSpecifierDoc::getClassFilters() const { + return _classFilters; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.cpp new file mode 100644 index 000000000..b1b4075a2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.cpp @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" + +using namespace Caf; + +/// A simple container for objects of type FullyQualifiedClassGroup +CFullyQualifiedClassGroupDoc::CFullyQualifiedClassGroupDoc() : + _isInitialized(false) {} +CFullyQualifiedClassGroupDoc::~CFullyQualifiedClassGroupDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CFullyQualifiedClassGroupDoc::initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion) { + if (! _isInitialized) { + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + + _isInitialized = true; + } +} + +/// Accessor for the ClassNamespace +std::string CFullyQualifiedClassGroupDoc::getClassNamespace() const { + return _classNamespace; +} + +/// Accessor for the ClassName +std::string CFullyQualifiedClassGroupDoc::getClassName() const { + return _className; +} + +/// Accessor for the ClassVersion +std::string CFullyQualifiedClassGroupDoc::getClassVersion() const { + return _classVersion; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.cpp new file mode 100644 index 000000000..a456beb49 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type InlineAttachmentCollection +CInlineAttachmentCollectionDoc::CInlineAttachmentCollectionDoc() : + _isInitialized(false) {} +CInlineAttachmentCollectionDoc::~CInlineAttachmentCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CInlineAttachmentCollectionDoc::initialize( + const std::deque attachment) { + if (! _isInitialized) { + _attachment = attachment; + + _isInitialized = true; + } +} + +/// Accessor for the InlineAttachment +std::deque CInlineAttachmentCollectionDoc::getInlineAttachment() const { + return _attachment; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CInlineAttachmentDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CInlineAttachmentDoc.cpp new file mode 100644 index 000000000..889241552 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CInlineAttachmentDoc.cpp @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h" + +using namespace Caf; + +/// A simple container for objects of type InlineAttachment +CInlineAttachmentDoc::CInlineAttachmentDoc() : + _isInitialized(false) {} +CInlineAttachmentDoc::~CInlineAttachmentDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CInlineAttachmentDoc::initialize( + const std::string name, + const std::string type, + const std::string value) { + if (! _isInitialized) { + _name = name; + _type = type; + _value = value; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::string CInlineAttachmentDoc::getName() const { + return _name; +} + +/// Accessor for the Type +std::string CInlineAttachmentDoc::getType() const { + return _type; +} + +/// Accessor for the Value +std::string CInlineAttachmentDoc::getValue() const { + return _value; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.cpp new file mode 100644 index 000000000..8783335ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h" +#include "Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h" + +using namespace Caf; + +/// Set of logging levels for different components +CLoggingLevelCollectionDoc::CLoggingLevelCollectionDoc() : + _isInitialized(false) {} +CLoggingLevelCollectionDoc::~CLoggingLevelCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CLoggingLevelCollectionDoc::initialize( + const std::deque loggingLevel) { + if (! _isInitialized) { + _loggingLevel = loggingLevel; + + _isInitialized = true; + } +} + +/// Used to change the logging level for a specific component +std::deque CLoggingLevelCollectionDoc::getLoggingLevel() const { + return _loggingLevel; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CLoggingLevelElemDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CLoggingLevelElemDoc.cpp new file mode 100644 index 000000000..6da901e13 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CLoggingLevelElemDoc.cpp @@ -0,0 +1,53 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h" + +using namespace Caf; + +/// Logging level for a component +CLoggingLevelElemDoc::CLoggingLevelElemDoc() : + _component(LOGGINGCOMPONENT_NONE), + _level(LOGGINGLEVEL_NONE), + _isInitialized(false) {} +CLoggingLevelElemDoc::~CLoggingLevelElemDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CLoggingLevelElemDoc::initialize( + const LOGGINGCOMPONENT_TYPE component, + const LOGGINGLEVEL_TYPE level) { + if (! _isInitialized) { + _component = component; + _level = level; + + _isInitialized = true; + } +} + +/// The logging level applies to this component +LOGGINGCOMPONENT_TYPE CLoggingLevelElemDoc::getComponent() const { + return _component; +} + +/// Set the logging level to this value +LOGGINGLEVEL_TYPE CLoggingLevelElemDoc::getLevel() const { + return _level; +} + +LOGGINGCOMPONENT_TYPE _component; +LOGGINGLEVEL_TYPE _level; + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/COperationDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/COperationDoc.cpp new file mode 100644 index 000000000..0b5b96448 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/COperationDoc.cpp @@ -0,0 +1,50 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" + +using namespace Caf; + +/// A simple container for objects of type Operation +COperationDoc::COperationDoc() : + _isInitialized(false) {} +COperationDoc::~COperationDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void COperationDoc::initialize( + const std::string name, + const SmartPtrCParameterCollectionDoc parameterCollection) { + if (! _isInitialized) { + _name = name; + _parameterCollection = parameterCollection; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::string COperationDoc::getName() const { + return _name; +} + +/// Accessor for the ParameterCollection +SmartPtrCParameterCollectionDoc COperationDoc::getParameterCollection() const { + return _parameterCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CParameterCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CParameterCollectionDoc.cpp new file mode 100644 index 000000000..9667c2ed0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CParameterCollectionDoc.cpp @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestParameterDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ParameterCollection +CParameterCollectionDoc::CParameterCollectionDoc() : + _isInitialized(false) {} +CParameterCollectionDoc::~CParameterCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CParameterCollectionDoc::initialize( + const std::deque parameter, + const std::deque instanceParameter) { + if (! _isInitialized) { + _parameter = parameter; + _instanceParameter = instanceParameter; + + _isInitialized = true; + } +} + +/// Accessor for the Parameter +std::deque CParameterCollectionDoc::getParameter() const { + return _parameter; +} + +/// Accessor for the InstanceParameter +std::deque CParameterCollectionDoc::getInstanceParameter() const { + return _instanceParameter; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CPropertyCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CPropertyCollectionDoc.cpp new file mode 100644 index 000000000..10f45bc02 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CPropertyCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type PropertyCollection +CPropertyCollectionDoc::CPropertyCollectionDoc() : + _isInitialized(false) {} +CPropertyCollectionDoc::~CPropertyCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CPropertyCollectionDoc::initialize( + const std::deque property) { + if (! _isInitialized) { + _property = property; + + _isInitialized = true; + } +} + +/// Accessor for the Property +std::deque CPropertyCollectionDoc::getProperty() const { + return _property; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CPropertyDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CPropertyDoc.cpp new file mode 100644 index 000000000..9890b1dd4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CPropertyDoc.cpp @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" + +using namespace Caf; + +/// A simple container for objects of type Property +CPropertyDoc::CPropertyDoc() : + _type(PROPERTY_NONE), + _isInitialized(false) {} +CPropertyDoc::~CPropertyDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CPropertyDoc::initialize( + const std::string name, + const PROPERTY_TYPE type, + const std::deque value) { + if (! _isInitialized) { + _name = name; + _type = type; + _value = value; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::string CPropertyDoc::getName() const { + return _name; +} + +/// Accessor for the Type +PROPERTY_TYPE CPropertyDoc::getType() const { + return _type; +} + +/// Accessor for the Value +std::deque CPropertyDoc::getValue() const { + return _value; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CProtocolCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CProtocolCollectionDoc.cpp new file mode 100644 index 000000000..6ea4c3f90 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CProtocolCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CProtocolDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" + +using namespace Caf; + +/// Set of protocol +CProtocolCollectionDoc::CProtocolCollectionDoc() : + _isInitialized(false) {} +CProtocolCollectionDoc::~CProtocolCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProtocolCollectionDoc::initialize( + const std::deque protocol) { + if (! _isInitialized) { + _protocol = protocol; + + _isInitialized = true; + } +} + +/// Used to change the logging level for a specific component +std::deque CProtocolCollectionDoc::getProtocol() const { + return _protocol; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CProtocolDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CProtocolDoc.cpp new file mode 100644 index 000000000..5256642c2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CProtocolDoc.cpp @@ -0,0 +1,56 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CProtocolDoc.h" + +using namespace Caf; + +/// A simple container for objects of Protocol +CProtocolDoc::CProtocolDoc() : + _sequenceNumber(0), + _isInitialized(false) {} +CProtocolDoc::~CProtocolDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProtocolDoc::initialize( + const std::string uri, + const std::string name, + const int32 sequenceNumber) { + if (! _isInitialized) { + _name = name; + _uri = uri; + _sequenceNumber = sequenceNumber; + + _isInitialized = true; + } +} + +/// Accessor for the Uri +std::string CProtocolDoc::getUri() const { + return _uri; +} + +/// Accessor for the Name +std::string CProtocolDoc::getName() const { + return _name; +} + +/// Accessor for the Value +int32 CProtocolDoc::getSequenceNumber() const { + return _sequenceNumber; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestConfigDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestConfigDoc.cpp new file mode 100644 index 000000000..79d8252bd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestConfigDoc.cpp @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAddInsDoc.h" +#include "Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestConfigDoc.h" + +using namespace Caf; + +/// A simple container for objects of type RequestConfig +CRequestConfigDoc::CRequestConfigDoc() : + _isInitialized(false) {} +CRequestConfigDoc::~CRequestConfigDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CRequestConfigDoc::initialize( + const std::string responseFormatType, + const SmartPtrCAddInsDoc requestProcessorAddIns, + const SmartPtrCAddInsDoc responseProcessorAddIns, + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollection) { + if (! _isInitialized) { + _responseFormatType = responseFormatType; + _requestProcessorAddIns = requestProcessorAddIns; + _responseProcessorAddIns = responseProcessorAddIns; + _loggingLevelCollection = loggingLevelCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ResponseFormatType +std::string CRequestConfigDoc::getResponseFormatType() const { + return _responseFormatType; +} + +/// Accessor for the RequestProcessorAddIns +SmartPtrCAddInsDoc CRequestConfigDoc::getRequestProcessorAddIns() const { + return _requestProcessorAddIns; +} + +/// Accessor for the ResponseProcessorAddIns +SmartPtrCAddInsDoc CRequestConfigDoc::getResponseProcessorAddIns() const { + return _responseProcessorAddIns; +} + +/// Accessor for the LoggingLevelCollection +SmartPtrCLoggingLevelCollectionDoc CRequestConfigDoc::getLoggingLevelCollection() const { + return _loggingLevelCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestHeaderDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestHeaderDoc.cpp new file mode 100644 index 000000000..50278455b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestHeaderDoc.cpp @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestConfigDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" + +using namespace Caf; + +/// A simple container for objects of type RequestHeader +CRequestHeaderDoc::CRequestHeaderDoc() : + _isInitialized(false), + _sessionId(CAFCOMMON_GUID_NULL) {} +CRequestHeaderDoc::~CRequestHeaderDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CRequestHeaderDoc::initialize( + const SmartPtrCRequestConfigDoc requestConfig, + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollection, + const SmartPtrCProtocolCollectionDoc protocolCollection, + const SmartPtrCPropertyCollectionDoc echoPropertyBag, + const std::string version, + const std::string createdDateTime, + const UUID sessionId) { + if (! _isInitialized) { + _requestConfig = requestConfig; + _authnAuthzCollection = authnAuthzCollection; + _protocolCollection = protocolCollection; + _echoPropertyBag = echoPropertyBag; + _version = version; + _createdDateTime = createdDateTime; + _sessionId = sessionId; + + _isInitialized = true; + } +} + +/// Accessor for the RequestConfig +SmartPtrCRequestConfigDoc CRequestHeaderDoc::getRequestConfig() const { + return _requestConfig; +} + +/// Accessor for the Authentication / Authorization Collection +SmartPtrCAuthnAuthzCollectionDoc CRequestHeaderDoc::getAuthnAuthzCollection() const { + return _authnAuthzCollection; +} + +/// Accessor for the Protocol Collection +SmartPtrCProtocolCollectionDoc CRequestHeaderDoc::getProtocolCollection() const { + return _protocolCollection; +} + +/// Accessor for the EchoPropertyBag +SmartPtrCPropertyCollectionDoc CRequestHeaderDoc::getEchoPropertyBag() const { + return _echoPropertyBag; +} + +/// Accessor for the version +std::string CRequestHeaderDoc::getVersion() const { + return _version; +} + +/// Accessor for the date/time when the request was created +std::string CRequestHeaderDoc::getCreatedDateTime() const { + return _createdDateTime; +} + +/// Accessor for the session ID +UUID CRequestHeaderDoc::getSessionId() const { + return _sessionId; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestInstanceParameterDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestInstanceParameterDoc.cpp new file mode 100644 index 000000000..d5a70ed8b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestInstanceParameterDoc.cpp @@ -0,0 +1,69 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h" + +using namespace Caf; + +/// A simple container for objects of type RequestInstanceParameter +CRequestInstanceParameterDoc::CRequestInstanceParameterDoc() : + _isInitialized(false) {} +CRequestInstanceParameterDoc::~CRequestInstanceParameterDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CRequestInstanceParameterDoc::initialize( + const std::string name, + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const std::deque value) { + if (! _isInitialized) { + _name = name; + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + _value = value; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::string CRequestInstanceParameterDoc::getName() const { + return _name; +} + +/// Accessor for the ClassNamespace +std::string CRequestInstanceParameterDoc::getClassNamespace() const { + return _classNamespace; +} + +/// Accessor for the ClassName +std::string CRequestInstanceParameterDoc::getClassName() const { + return _className; +} + +/// Accessor for the ClassVersion +std::string CRequestInstanceParameterDoc::getClassVersion() const { + return _classVersion; +} + +/// Accessor for the Value +std::deque CRequestInstanceParameterDoc::getValue() const { + return _value; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestParameterDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestParameterDoc.cpp new file mode 100644 index 000000000..e1ab1e7af --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestParameterDoc.cpp @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/CafCoreTypesDoc/CRequestParameterDoc.h" + +using namespace Caf; + +/// A simple container for objects of type RequestParameter +CRequestParameterDoc::CRequestParameterDoc() : + _type(PARAMETER_NONE), + _isInitialized(false) {} +CRequestParameterDoc::~CRequestParameterDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CRequestParameterDoc::initialize( + const std::string name, + const PARAMETER_TYPE type, + const std::deque value) { + if (! _isInitialized) { + _name = name; + _type = type; + _value = value; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::string CRequestParameterDoc::getName() const { + return _name; +} + +/// Accessor for the Type +PARAMETER_TYPE CRequestParameterDoc::getType() const { + return _type; +} + +/// Accessor for the Value +std::deque CRequestParameterDoc::getValue() const { + return _value; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CStatisticsDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CStatisticsDoc.cpp new file mode 100644 index 000000000..596dd9eeb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/CStatisticsDoc.cpp @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" + +using namespace Caf; + +/// A simple container for objects of type Statistics +CStatisticsDoc::CStatisticsDoc() : + _providerJobNum(0), + _providerJobTotal(0), + _providerJobDurationSecs(0), + _pmeNum(0), + _pmeTotal(0), + _pmeDurationSecs(0), + _isInitialized(false) {} +CStatisticsDoc::~CStatisticsDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CStatisticsDoc::initialize( + const SmartPtrCPropertyCollectionDoc propertyCollection, + const int32 providerJobNum, + const int32 providerJobTotal, + const int32 providerJobDurationSecs, + const int32 pmeNum, + const int32 pmeTotal, + const int32 pmeDurationSecs) { + if (! _isInitialized) { + _propertyCollection = propertyCollection; + _providerJobNum = providerJobNum; + _providerJobTotal = providerJobTotal; + _providerJobDurationSecs = providerJobDurationSecs; + _pmeNum = pmeNum; + _pmeTotal = pmeTotal; + _pmeDurationSecs = pmeDurationSecs; + + _isInitialized = true; + } +} + +/// Accessor for the PropertyCollection +SmartPtrCPropertyCollectionDoc CStatisticsDoc::getPropertyCollection() const { + return _propertyCollection; +} + +/// Accessor for the ProviderJobNum +int32 CStatisticsDoc::getProviderJobNum() const { + return _providerJobNum; +} + +/// Accessor for the ProviderJobTotal +int32 CStatisticsDoc::getProviderJobTotal() const { + return _providerJobTotal; +} + +/// Accessor for the ProviderJobDurationSecs +int32 CStatisticsDoc::getProviderJobDurationSecs() const { + return _providerJobDurationSecs; +} + +/// Accessor for the PmeNum +int32 CStatisticsDoc::getPmeNum() const { + return _pmeNum; +} + +/// Accessor for the PmeTotal +int32 CStatisticsDoc::getPmeTotal() const { + return _pmeTotal; +} + +/// Accessor for the PmeDurationSecs +int32 CStatisticsDoc::getPmeDurationSecs() const { + return _pmeDurationSecs; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/stdafx.h new file mode 100644 index 000000000..b3873419c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafCoreTypesDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define CAFCORETYPESDOC_LINKAGE __declspec(dllexport) +#else + #define CAFCORETYPESDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CFullPackageElemDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CFullPackageElemDoc.cpp new file mode 100644 index 000000000..8f5f645cb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CFullPackageElemDoc.cpp @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafInstallRequestDoc/CPackageDefnDoc.h" +#include "Doc/CafInstallRequestDoc/CFullPackageElemDoc.h" + +using namespace Caf; + +/// A simple container for objects of type FullPackageElem +CFullPackageElemDoc::CFullPackageElemDoc() : + _index(0), + _isInitialized(false) {} +CFullPackageElemDoc::~CFullPackageElemDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CFullPackageElemDoc::initialize( + const int32 index, + const std::string packageNamespace, + const std::string packageName, + const std::string packageVersion, + const SmartPtrCPackageDefnDoc installPackage, + const SmartPtrCPackageDefnDoc uninstallPackage) { + if (! _isInitialized) { + _index = index; + _packageNamespace = packageNamespace; + _packageName = packageName; + _packageVersion = packageVersion; + _installPackage = installPackage; + _uninstallPackage = uninstallPackage; + + _isInitialized = true; + } +} + +/// Accessor for the Index +int32 CFullPackageElemDoc::getIndex() const { + return _index; +} + +/// Accessor for the PackageNamespace +std::string CFullPackageElemDoc::getPackageNamespace() const { + return _packageNamespace; +} + +/// Accessor for the PackageName +std::string CFullPackageElemDoc::getPackageName() const { + return _packageName; +} + +/// Accessor for the PackageVersion +std::string CFullPackageElemDoc::getPackageVersion() const { + return _packageVersion; +} + +/// Accessor for the InstallPackage +SmartPtrCPackageDefnDoc CFullPackageElemDoc::getInstallPackage() const { + return _installPackage; +} + +/// Accessor for the UninstallPackage +SmartPtrCPackageDefnDoc CFullPackageElemDoc::getUninstallPackage() const { + return _uninstallPackage; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CGetInventoryJobDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CGetInventoryJobDoc.cpp new file mode 100644 index 000000000..8fe4e1cad --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CGetInventoryJobDoc.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h" + +using namespace Caf; + +/// A simple container for objects of type GetInventoryJob +CGetInventoryJobDoc::CGetInventoryJobDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CGetInventoryJobDoc::~CGetInventoryJobDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CGetInventoryJobDoc::initialize( + const UUID jobId) { + if (! _isInitialized) { + _jobId = jobId; + + _isInitialized = true; + } +} + +/// Accessor for the JobId +UUID CGetInventoryJobDoc::getJobId() const { + return _jobId; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallBatchDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallBatchDoc.cpp new file mode 100644 index 000000000..25707f701 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallBatchDoc.cpp @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallBatchDoc.h" + +using namespace Caf; + +/// A simple container for objects of type InstallBatch +CInstallBatchDoc::CInstallBatchDoc() : + _isInitialized(false) {} +CInstallBatchDoc::~CInstallBatchDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CInstallBatchDoc::initialize( + const SmartPtrCGetInventoryJobDoc getInventory, + const SmartPtrCInstallProviderJobDoc installProvider, + const SmartPtrCUninstallProviderJobDoc uninstallProvider) { + if (! _isInitialized) { + _getInventory = getInventory; + _installProvider = installProvider; + _uninstallProvider = uninstallProvider; + + _isInitialized = true; + } +} + +/// Accessor for the GetInventory +SmartPtrCGetInventoryJobDoc CInstallBatchDoc::getGetInventory() const { + return _getInventory; +} + +/// Accessor for the InstallProvider +SmartPtrCInstallProviderJobDoc CInstallBatchDoc::getInstallProvider() const { + return _installProvider; +} + +/// Accessor for the UninstallProvider +SmartPtrCUninstallProviderJobDoc CInstallBatchDoc::getUninstallProvider() const { + return _uninstallProvider; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallPackageSpecDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallPackageSpecDoc.cpp new file mode 100644 index 000000000..0e127decf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallPackageSpecDoc.cpp @@ -0,0 +1,93 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h" + +using namespace Caf; + +/// A simple container for objects of type InstallPackageSpec +CInstallPackageSpecDoc::CInstallPackageSpecDoc() : + _isInitialized(false) {} +CInstallPackageSpecDoc::~CInstallPackageSpecDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CInstallPackageSpecDoc::initialize( + const std::string packageNamespace, + const std::string packageName, + const std::string packageVersion, + const std::string startupAttachmentName, + const std::string packageAttachmentName, + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection, + const SmartPtrCAttachmentCollectionDoc attachmentCollection, + const std::string arguments) { + if (! _isInitialized) { + _packageNamespace = packageNamespace; + _packageName = packageName; + _packageVersion = packageVersion; + _startupAttachmentName = startupAttachmentName; + _packageAttachmentName = packageAttachmentName; + _attachmentNameCollection = attachmentNameCollection; + _attachmentCollection = attachmentCollection; + _arguments = arguments; + + _isInitialized = true; + } +} + +/// Accessor for the PackageNamespace +std::string CInstallPackageSpecDoc::getPackageNamespace() const { + return _packageNamespace; +} + +/// Accessor for the PackageName +std::string CInstallPackageSpecDoc::getPackageName() const { + return _packageName; +} + +/// Accessor for the PackageVersion +std::string CInstallPackageSpecDoc::getPackageVersion() const { + return _packageVersion; +} + +/// Accessor for the StartupAttachmentName +std::string CInstallPackageSpecDoc::getStartupAttachmentName() const { + return _startupAttachmentName; +} + +/// Accessor for the PackageAttachmentName +std::string CInstallPackageSpecDoc::getPackageAttachmentName() const { + return _packageAttachmentName; +} + +/// Accessor for the AttachmentNameCollection +SmartPtrCAttachmentNameCollectionDoc CInstallPackageSpecDoc::getSupportingAttachmentNameCollection() const { + return _attachmentNameCollection; +} + +/// Accessor for the AttachmentCollection +SmartPtrCAttachmentCollectionDoc CInstallPackageSpecDoc::getAttachmentCollection() const { + return _attachmentCollection; +} + +/// Accessor for the Arguments +std::string CInstallPackageSpecDoc::getArguments() const { + return _arguments; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallProviderJobDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallProviderJobDoc.cpp new file mode 100644 index 000000000..5be27674e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallProviderJobDoc.cpp @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" + +#include "Doc/CafInstallRequestDoc/CFullPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" + +using namespace Caf; + +/// A simple container for objects of type InstallProviderJob +CInstallProviderJobDoc::CInstallProviderJobDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _jobId(CAFCOMMON_GUID_NULL), + _packageOSType(PACKAGE_OS_NONE), + _isInitialized(false) {} +CInstallProviderJobDoc::~CInstallProviderJobDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CInstallProviderJobDoc::initialize( + const UUID clientId, + const UUID jobId, + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const PACKAGE_OS_TYPE packageOSType, + const std::deque packageCollection) { + if (! _isInitialized) { + _clientId = clientId; + _jobId = jobId; + _providerNamespace = providerNamespace; + _providerName = providerName; + _providerVersion = providerVersion; + _packageOSType = packageOSType; + _packageCollection = packageCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CInstallProviderJobDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the JobId +UUID CInstallProviderJobDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the ProviderNamespace +std::string CInstallProviderJobDoc::getProviderNamespace() const { + return _providerNamespace; +} + +/// Accessor for the ProviderName +std::string CInstallProviderJobDoc::getProviderName() const { + return _providerName; +} + +/// Accessor for the ProviderVersion +std::string CInstallProviderJobDoc::getProviderVersion() const { + return _providerVersion; +} + +/// Accessor for the PackageOSType +PACKAGE_OS_TYPE CInstallProviderJobDoc::getPackageOSType() const { + return _packageOSType; +} + +/// Accessor for the PackageVal +std::deque CInstallProviderJobDoc::getPackageCollection() const { + return _packageCollection; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallProviderSpecDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallProviderSpecDoc.cpp new file mode 100644 index 000000000..c26e93513 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallProviderSpecDoc.cpp @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafInstallRequestDoc/CMinPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" + +using namespace Caf; + +/// A simple container for objects of type InstallProviderSpec +CInstallProviderSpecDoc::CInstallProviderSpecDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CInstallProviderSpecDoc::~CInstallProviderSpecDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CInstallProviderSpecDoc::initialize( + const UUID clientId, + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const std::deque packageCollection) { + if (! _isInitialized) { + _clientId = clientId; + _providerNamespace = providerNamespace; + _providerName = providerName; + _providerVersion = providerVersion; + _packageCollection = packageCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CInstallProviderSpecDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the ProviderNamespace +std::string CInstallProviderSpecDoc::getProviderNamespace() const { + return _providerNamespace; +} + +/// Accessor for the ProviderName +std::string CInstallProviderSpecDoc::getProviderName() const { + return _providerName; +} + +/// Accessor for the ProviderVersion +std::string CInstallProviderSpecDoc::getProviderVersion() const { + return _providerVersion; +} + +/// Accessor for the PackageVal +std::deque CInstallProviderSpecDoc::getPackageCollection() const { + return _packageCollection; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallRequestDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallRequestDoc.cpp new file mode 100644 index 000000000..237149213 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallRequestDoc.cpp @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallBatchDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallRequestDoc.h" + +using namespace Caf; + +/// A simple container for objects of type InstallRequest +CInstallRequestDoc::CInstallRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CInstallRequestDoc::~CInstallRequestDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CInstallRequestDoc::initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCInstallBatchDoc batch, + const SmartPtrCAttachmentCollectionDoc attachmentCollection) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _requestHeader = requestHeader; + _batch = batch; + _attachmentCollection = attachmentCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CInstallRequestDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CInstallRequestDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the PmeId +std::string CInstallRequestDoc::getPmeId() const { + return _pmeId; +} + +/// Accessor for the RequestHeader +SmartPtrCRequestHeaderDoc CInstallRequestDoc::getRequestHeader() const { + return _requestHeader; +} + +/// Accessor for the Batch +SmartPtrCInstallBatchDoc CInstallRequestDoc::getBatch() const { + return _batch; +} + +/// Accessor for the AttachmentCollection +SmartPtrCAttachmentCollectionDoc CInstallRequestDoc::getAttachmentCollection() const { + return _attachmentCollection; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CMinPackageElemDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CMinPackageElemDoc.cpp new file mode 100644 index 000000000..615cf1696 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CMinPackageElemDoc.cpp @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafInstallRequestDoc/CMinPackageElemDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MinPackageElem +CMinPackageElemDoc::CMinPackageElemDoc() : + _index(0), + _isInitialized(false) {} +CMinPackageElemDoc::~CMinPackageElemDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMinPackageElemDoc::initialize( + const int32 index, + const std::string packageNamespace, + const std::string packageName, + const std::string packageVersion) { + if (! _isInitialized) { + _index = index; + _packageNamespace = packageNamespace; + _packageName = packageName; + _packageVersion = packageVersion; + + _isInitialized = true; + } +} + +/// Accessor for the Index +int32 CMinPackageElemDoc::getIndex() const { + return _index; +} + +/// Accessor for the PackageNamespace +std::string CMinPackageElemDoc::getPackageNamespace() const { + return _packageNamespace; +} + +/// Accessor for the PackageName +std::string CMinPackageElemDoc::getPackageName() const { + return _packageName; +} + +/// Accessor for the PackageVersion +std::string CMinPackageElemDoc::getPackageVersion() const { + return _packageVersion; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CPackageDefnDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CPackageDefnDoc.cpp new file mode 100644 index 000000000..cb79d285f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CPackageDefnDoc.cpp @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Doc/CafInstallRequestDoc/CPackageDefnDoc.h" + +using namespace Caf; + +/// A simple container for objects of type PackageDefn +CPackageDefnDoc::CPackageDefnDoc() : + _isInitialized(false) {} +CPackageDefnDoc::~CPackageDefnDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CPackageDefnDoc::initialize( + const std::string startupAttachmentName, + const std::string packageAttachmentName, + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection, + const std::string arguments) { + if (! _isInitialized) { + _startupAttachmentName = startupAttachmentName; + _packageAttachmentName = packageAttachmentName; + _attachmentNameCollection = attachmentNameCollection; + _arguments = arguments; + + _isInitialized = true; + } +} + +/// Accessor for the StartupAttachmentName +std::string CPackageDefnDoc::getStartupAttachmentName() const { + return _startupAttachmentName; +} + +/// Accessor for the PackageAttachmentName +std::string CPackageDefnDoc::getPackageAttachmentName() const { + return _packageAttachmentName; +} + +/// Accessor for the AttachmentNameCollection +SmartPtrCAttachmentNameCollectionDoc CPackageDefnDoc::getSupportingAttachmentNameCollection() const { + return _attachmentNameCollection; +} + +/// Accessor for the Arguments +std::string CPackageDefnDoc::getArguments() const { + return _arguments; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CUninstallProviderJobDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CUninstallProviderJobDoc.cpp new file mode 100644 index 000000000..81bbc272c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/CUninstallProviderJobDoc.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" + +using namespace Caf; + +/// A simple container for objects of type UninstallProviderJob +CUninstallProviderJobDoc::CUninstallProviderJobDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _jobId(CAFCOMMON_GUID_NULL), + _packageOSType(PACKAGE_OS_NONE), + _isInitialized(false) {} +CUninstallProviderJobDoc::~CUninstallProviderJobDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CUninstallProviderJobDoc::initialize( + const UUID clientId, + const UUID jobId, + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const PACKAGE_OS_TYPE packageOSType) { + if (! _isInitialized) { + _clientId = clientId; + _jobId = jobId; + _providerNamespace = providerNamespace; + _providerName = providerName; + _providerVersion = providerVersion; + _packageOSType = packageOSType; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CUninstallProviderJobDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the JobId +UUID CUninstallProviderJobDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the ProviderNamespace +std::string CUninstallProviderJobDoc::getProviderNamespace() const { + return _providerNamespace; +} + +/// Accessor for the ProviderName +std::string CUninstallProviderJobDoc::getProviderName() const { + return _providerName; +} + +/// Accessor for the ProviderVersion +std::string CUninstallProviderJobDoc::getProviderVersion() const { + return _providerVersion; +} + +/// Accessor for the PackageOSType +PACKAGE_OS_TYPE CUninstallProviderJobDoc::getPackageOSType() const { + return _packageOSType; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/stdafx.h new file mode 100644 index 000000000..439086e46 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/CafInstallRequestDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define CAFINSTALLREQUESTDOC_LINKAGE __declspec(dllexport) +#else + #define CAFINSTALLREQUESTDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagRequestDoc/CDiagRequestDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagRequestDoc/CDiagRequestDoc.cpp new file mode 100644 index 000000000..fed946f27 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagRequestDoc/CDiagRequestDoc.cpp @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/DiagTypesDoc/CDiagBatchDoc.h" +#include "Doc/DiagRequestDoc/CDiagRequestDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DiagRequest +CDiagRequestDoc::CDiagRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CDiagRequestDoc::~CDiagRequestDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDiagRequestDoc::initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCDiagBatchDoc batch) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _requestHeader = requestHeader; + _batch = batch; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CDiagRequestDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CDiagRequestDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the PmeId +std::string CDiagRequestDoc::getPmeId() const { + return _pmeId; +} + +/// Accessor for the RequestHeader +SmartPtrCRequestHeaderDoc CDiagRequestDoc::getRequestHeader() const { + return _requestHeader; +} + +/// Accessor for the Batch +SmartPtrCDiagBatchDoc CDiagRequestDoc::getBatch() const { + return _batch; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagRequestDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagRequestDoc/stdafx.h new file mode 100644 index 000000000..ebe312589 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagRequestDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define DIAGREQUESTDOC_LINKAGE __declspec(dllexport) +#else + #define DIAGREQUESTDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagBatchDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagBatchDoc.cpp new file mode 100644 index 000000000..307845daf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagBatchDoc.cpp @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h" +#include "Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h" +#include "Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h" +#include "Doc/DiagTypesDoc/CDiagBatchDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DiagBatch +CDiagBatchDoc::CDiagBatchDoc() : + _isInitialized(false) {} +CDiagBatchDoc::~CDiagBatchDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDiagBatchDoc::initialize( + const SmartPtrCDiagCollectInstancesDoc collectInstances, + const SmartPtrCDiagSetValueCollectionDoc setValueCollection, + const SmartPtrCDiagDeleteValueCollectionDoc deleteValueCollection) { + if (! _isInitialized) { + _collectInstances = collectInstances; + _setValueCollection = setValueCollection; + _deleteValueCollection = deleteValueCollection; + + _isInitialized = true; + } +} + +/// Accessor for the CollectInstances +SmartPtrCDiagCollectInstancesDoc CDiagBatchDoc::getCollectInstances() const { + return _collectInstances; +} + +/// Accessor for the SetValueCollection +SmartPtrCDiagSetValueCollectionDoc CDiagBatchDoc::getSetValueCollection() const { + return _setValueCollection; +} + +/// Accessor for the DeleteValueCollection +SmartPtrCDiagDeleteValueCollectionDoc CDiagBatchDoc::getDeleteValueCollection() const { + return _deleteValueCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagCollectInstancesDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagCollectInstancesDoc.cpp new file mode 100644 index 000000000..bb66491c4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagCollectInstancesDoc.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DiagCollectInstances +CDiagCollectInstancesDoc::CDiagCollectInstancesDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CDiagCollectInstancesDoc::~CDiagCollectInstancesDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDiagCollectInstancesDoc::initialize( + const UUID jobId) { + if (! _isInitialized) { + _jobId = jobId; + + _isInitialized = true; + } +} + +/// Accessor for the JobId +UUID CDiagCollectInstancesDoc::getJobId() const { + return _jobId; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.cpp new file mode 100644 index 000000000..579b28a09 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/DiagTypesDoc/CDiagDeleteValueDoc.h" +#include "Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DiagDeleteValueCollection +CDiagDeleteValueCollectionDoc::CDiagDeleteValueCollectionDoc() : + _isInitialized(false) {} +CDiagDeleteValueCollectionDoc::~CDiagDeleteValueCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDiagDeleteValueCollectionDoc::initialize( + const std::deque deleteValueCollection) { + if (! _isInitialized) { + _deleteValueCollection = deleteValueCollection; + + _isInitialized = true; + } +} + +/// Accessor for the DeleteValue +std::deque CDiagDeleteValueCollectionDoc::getDeleteValueCollection() const { + return _deleteValueCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagDeleteValueDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagDeleteValueDoc.cpp new file mode 100644 index 000000000..62a5c1bf8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagDeleteValueDoc.cpp @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/DiagTypesDoc/CDiagDeleteValueDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DiagDeleteValue +CDiagDeleteValueDoc::CDiagDeleteValueDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CDiagDeleteValueDoc::~CDiagDeleteValueDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDiagDeleteValueDoc::initialize( + const UUID jobId, + const std::string fileAlias, + const std::string valueName) { + if (! _isInitialized) { + _jobId = jobId; + _fileAlias = fileAlias; + _valueName = valueName; + + _isInitialized = true; + } +} + +/// Accessor for the JobId +UUID CDiagDeleteValueDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the FileAlias +std::string CDiagDeleteValueDoc::getFileAlias() const { + return _fileAlias; +} + +/// Accessor for the ValueName +std::string CDiagDeleteValueDoc::getValueName() const { + return _valueName; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagSetValueCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagSetValueCollectionDoc.cpp new file mode 100644 index 000000000..e80c802db --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagSetValueCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/DiagTypesDoc/CDiagSetValueDoc.h" +#include "Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DiagSetValueCollection +CDiagSetValueCollectionDoc::CDiagSetValueCollectionDoc() : + _isInitialized(false) {} +CDiagSetValueCollectionDoc::~CDiagSetValueCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDiagSetValueCollectionDoc::initialize( + const std::deque setValueCollection) { + if (! _isInitialized) { + _setValueCollection = setValueCollection; + + _isInitialized = true; + } +} + +/// Accessor for the SetValue +std::deque CDiagSetValueCollectionDoc::getSetValueCollection() const { + return _setValueCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagSetValueDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagSetValueDoc.cpp new file mode 100644 index 000000000..4a29f8e82 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagSetValueDoc.cpp @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" +#include "Doc/DiagTypesDoc/CDiagSetValueDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DiagSetValue +CDiagSetValueDoc::CDiagSetValueDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CDiagSetValueDoc::~CDiagSetValueDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDiagSetValueDoc::initialize( + const UUID jobId, + const std::string fileAlias, + const SmartPtrCPropertyDoc value) { + if (! _isInitialized) { + _jobId = jobId; + _fileAlias = fileAlias; + _value = value; + + _isInitialized = true; + } +} + +/// Accessor for the JobId +UUID CDiagSetValueDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the FileAlias +std::string CDiagSetValueDoc::getFileAlias() const { + return _fileAlias; +} + +/// Accessor for the Value +SmartPtrCPropertyDoc CDiagSetValueDoc::getValue() const { + return _value; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/stdafx.h new file mode 100644 index 000000000..c2b4aa8e4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/DiagTypesDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define DIAGTYPESDOC_LINKAGE __declspec(dllexport) +#else + #define DIAGTYPESDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtRequestDoc/CMgmtRequestDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtRequestDoc/CMgmtRequestDoc.cpp new file mode 100644 index 000000000..b4782bd06 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtRequestDoc/CMgmtRequestDoc.cpp @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MgmtRequest +CMgmtRequestDoc::CMgmtRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CMgmtRequestDoc::~CMgmtRequestDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMgmtRequestDoc::initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCMgmtBatchDoc batch, + const SmartPtrCAttachmentCollectionDoc attachmentCollection) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _requestHeader = requestHeader; + _batch = batch; + _attachmentCollection = attachmentCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CMgmtRequestDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CMgmtRequestDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the PmeId +std::string CMgmtRequestDoc::getPmeId() const { + return _pmeId; +} + +/// Accessor for the RequestHeader +SmartPtrCRequestHeaderDoc CMgmtRequestDoc::getRequestHeader() const { + return _requestHeader; +} + +/// Accessor for the Batch +SmartPtrCMgmtBatchDoc CMgmtRequestDoc::getBatch() const { + return _batch; +} + +/// Accessor for the AttachmentCollection +SmartPtrCAttachmentCollectionDoc CMgmtRequestDoc::getAttachmentCollection() const { + return _attachmentCollection; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtRequestDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtRequestDoc/stdafx.h new file mode 100644 index 000000000..7bdaaf007 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtRequestDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MGMTREQUESTDOC_LINKAGE __declspec(dllexport) +#else + #define MGMTREQUESTDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtBatchDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtBatchDoc.cpp new file mode 100644 index 000000000..6bfe2f927 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtBatchDoc.cpp @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MgmtBatch +CMgmtBatchDoc::CMgmtBatchDoc() : + _isInitialized(false) {} +CMgmtBatchDoc::~CMgmtBatchDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMgmtBatchDoc::initialize( + const SmartPtrCMgmtCollectSchemaDoc collectSchema, + const SmartPtrCMgmtCollectInstancesCollectionDoc collectInstancesCollection, + const SmartPtrCMgmtInvokeOperationCollectionDoc invokeOperationCollection) { + if (! _isInitialized) { + _collectSchema = collectSchema; + _collectInstancesCollection = collectInstancesCollection; + _invokeOperationCollection = invokeOperationCollection; + + _isInitialized = true; + } +} + +/// Accessor for the CollectSchema +SmartPtrCMgmtCollectSchemaDoc CMgmtBatchDoc::getCollectSchema() const { + return _collectSchema; +} + +/// Accessor for the CollectInstancesCollection +SmartPtrCMgmtCollectInstancesCollectionDoc CMgmtBatchDoc::getCollectInstancesCollection() const { + return _collectInstancesCollection; +} + +/// Accessor for the InvokeOperationCollection +SmartPtrCMgmtInvokeOperationCollectionDoc CMgmtBatchDoc::getInvokeOperationCollection() const { + return _invokeOperationCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.cpp new file mode 100644 index 000000000..d093ce04f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MgmtCollectInstancesCollection +CMgmtCollectInstancesCollectionDoc::CMgmtCollectInstancesCollectionDoc() : + _isInitialized(false) {} +CMgmtCollectInstancesCollectionDoc::~CMgmtCollectInstancesCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMgmtCollectInstancesCollectionDoc::initialize( + const std::deque collectInstancesCollection) { + if (! _isInitialized) { + _collectInstancesCollection = collectInstancesCollection; + + _isInitialized = true; + } +} + +/// Accessor for the CollectInstances +std::deque CMgmtCollectInstancesCollectionDoc::getCollectInstancesCollection() const { + return _collectInstancesCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectInstancesDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectInstancesDoc.cpp new file mode 100644 index 000000000..a18333b97 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectInstancesDoc.cpp @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MgmtCollectInstances +CMgmtCollectInstancesDoc::CMgmtCollectInstancesDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CMgmtCollectInstancesDoc::~CMgmtCollectInstancesDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMgmtCollectInstancesDoc::initialize( + const UUID jobId, + const SmartPtrCClassSpecifierDoc classSpecifier, + const SmartPtrCParameterCollectionDoc parameterCollection) { + if (! _isInitialized) { + _jobId = jobId; + _classSpecifier = classSpecifier; + _parameterCollection = parameterCollection; + + _isInitialized = true; + } +} + +/// Accessor for the JobId +UUID CMgmtCollectInstancesDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the ClassSpecifier +SmartPtrCClassSpecifierDoc CMgmtCollectInstancesDoc::getClassSpecifier() const { + return _classSpecifier; +} + +/// Accessor for the ParameterCollection +SmartPtrCParameterCollectionDoc CMgmtCollectInstancesDoc::getParameterCollection() const { + return _parameterCollection; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectSchemaDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectSchemaDoc.cpp new file mode 100644 index 000000000..dc18591a3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectSchemaDoc.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MgmtCollectSchema +CMgmtCollectSchemaDoc::CMgmtCollectSchemaDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CMgmtCollectSchemaDoc::~CMgmtCollectSchemaDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMgmtCollectSchemaDoc::initialize( + const UUID jobId) { + if (! _isInitialized) { + _jobId = jobId; + + _isInitialized = true; + } +} + +/// Accessor for the JobId +UUID CMgmtCollectSchemaDoc::getJobId() const { + return _jobId; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.cpp new file mode 100644 index 000000000..abef57af3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MgmtInvokeOperationCollection +CMgmtInvokeOperationCollectionDoc::CMgmtInvokeOperationCollectionDoc() : + _isInitialized(false) {} +CMgmtInvokeOperationCollectionDoc::~CMgmtInvokeOperationCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMgmtInvokeOperationCollectionDoc::initialize( + const std::deque invokeOperationCollection) { + if (! _isInitialized) { + _invokeOperationCollection = invokeOperationCollection; + + _isInitialized = true; + } +} + +/// Accessor for the InvokeOperation +std::deque CMgmtInvokeOperationCollectionDoc::getInvokeOperationCollection() const { + return _invokeOperationCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtInvokeOperationDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtInvokeOperationDoc.cpp new file mode 100644 index 000000000..553815aa4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtInvokeOperationDoc.cpp @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MgmtInvokeOperation +CMgmtInvokeOperationDoc::CMgmtInvokeOperationDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CMgmtInvokeOperationDoc::~CMgmtInvokeOperationDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMgmtInvokeOperationDoc::initialize( + const UUID jobId, + const SmartPtrCClassSpecifierDoc classSpecifier, + const SmartPtrCOperationDoc operation) { + if (! _isInitialized) { + _jobId = jobId; + _classSpecifier = classSpecifier; + _operation = operation; + + _isInitialized = true; + } +} + +/// Accessor for the JobId +UUID CMgmtInvokeOperationDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the ClassSpecifier +SmartPtrCClassSpecifierDoc CMgmtInvokeOperationDoc::getClassSpecifier() const { + return _classSpecifier; +} + +/// Accessor for the Operation +SmartPtrCOperationDoc CMgmtInvokeOperationDoc::getOperation() const { + return _operation; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/stdafx.h new file mode 100644 index 000000000..a80fcd556 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MgmtTypesDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MGMTTYPESDOC_LINKAGE __declspec(dllexport) +#else + #define MGMTTYPESDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.cpp new file mode 100644 index 000000000..00979b4fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MultiPmeMgmtBatchCollection +CMultiPmeMgmtBatchCollectionDoc::CMultiPmeMgmtBatchCollectionDoc() : + _isInitialized(false) {} +CMultiPmeMgmtBatchCollectionDoc::~CMultiPmeMgmtBatchCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMultiPmeMgmtBatchCollectionDoc::initialize( + const std::deque multiPmeBatch) { + if (! _isInitialized) { + _multiPmeBatch = multiPmeBatch; + + _isInitialized = true; + } +} + +/// Accessor for the MultiPmeBatch +std::deque CMultiPmeMgmtBatchCollectionDoc::getMultiPmeBatch() const { + return _multiPmeBatch; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.cpp new file mode 100644 index 000000000..b7c1b023e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.cpp @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MultiPmeMgmtBatch +CMultiPmeMgmtBatchDoc::CMultiPmeMgmtBatchDoc() : + _isInitialized(false) {} +CMultiPmeMgmtBatchDoc::~CMultiPmeMgmtBatchDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMultiPmeMgmtBatchDoc::initialize( + const SmartPtrCPmeIdCollectionDoc pmeIdCollection, + const SmartPtrCMgmtBatchDoc batch) { + if (! _isInitialized) { + _pmeIdCollection = pmeIdCollection; + _batch = batch; + + _isInitialized = true; + } +} + +/// Accessor for the PmeIdCollection +SmartPtrCPmeIdCollectionDoc CMultiPmeMgmtBatchDoc::getPmeIdCollection() const { + return _pmeIdCollection; +} + +/// Accessor for the Batch +SmartPtrCMgmtBatchDoc CMultiPmeMgmtBatchDoc::getBatch() const { + return _batch; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.cpp new file mode 100644 index 000000000..1716cc66b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.cpp @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h" + +using namespace Caf; + +/// A simple container for objects of type MultiPmeMgmtRequest +CMultiPmeMgmtRequestDoc::CMultiPmeMgmtRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CMultiPmeMgmtRequestDoc::~CMultiPmeMgmtRequestDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMultiPmeMgmtRequestDoc::initialize( + const UUID clientId, + const UUID requestId, + const SmartPtrCRequestHeaderDoc requestHeader, + const SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeBatchCollection) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _requestHeader = requestHeader; + _multiPmeBatchCollection = multiPmeBatchCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CMultiPmeMgmtRequestDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CMultiPmeMgmtRequestDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the RequestHeader +SmartPtrCRequestHeaderDoc CMultiPmeMgmtRequestDoc::getRequestHeader() const { + return _requestHeader; +} + +/// Accessor for the MultiPmeBatchCollection +SmartPtrCMultiPmeMgmtBatchCollectionDoc CMultiPmeMgmtRequestDoc::getMultiPmeBatchCollection() const { + return _multiPmeBatchCollection; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.cpp new file mode 100644 index 000000000..2f3bcb3f0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type PmeIdCollection +CPmeIdCollectionDoc::CPmeIdCollectionDoc() : + _isInitialized(false) {} +CPmeIdCollectionDoc::~CPmeIdCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CPmeIdCollectionDoc::initialize( + const std::deque pmeIdCollection) { + if (! _isInitialized) { + _pmeIdCollection = pmeIdCollection; + + _isInitialized = true; + } +} + +/// Accessor for the PmeId +std::deque CPmeIdCollectionDoc::getPmeIdCollection() const { + return _pmeIdCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/stdafx.h new file mode 100644 index 000000000..d6eaadb5b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MULTIPMEMGMTREQUESTDOC_LINKAGE __declspec(dllexport) +#else + #define MULTIPMEMGMTREQUESTDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.cpp new file mode 100644 index 000000000..5e47a0863 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.cpp @@ -0,0 +1,101 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" + +using namespace Caf; + +/// A simple container for objects of type PayloadEnvelope +CPayloadEnvelopeDoc::CPayloadEnvelopeDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CPayloadEnvelopeDoc::~CPayloadEnvelopeDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CPayloadEnvelopeDoc::initialize( + const UUID& clientId, + const UUID& requestId, + const std::string& pmeId, + const std::string& payloadType, + const std::string& payloadVersion, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const SmartPtrCProtocolCollectionDoc& protocolCollection, + const SmartPtrCPropertyCollectionDoc& headerCollection, + const std::string version) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _payloadType = payloadType; + _payloadVersion = payloadVersion; + _attachmentCollection = attachmentCollection; + _protocolCollection = protocolCollection; + _headerCollection = headerCollection; + _version = version; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CPayloadEnvelopeDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CPayloadEnvelopeDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the PmeId +std::string CPayloadEnvelopeDoc::getPmeId() const { + return _pmeId; +} + +/// Accessor for the PayloadType +std::string CPayloadEnvelopeDoc::getPayloadType() const { + return _payloadType; +} + +/// Accessor for the PayloadVersion +std::string CPayloadEnvelopeDoc::getPayloadVersion() const { + return _payloadVersion; +} + +/// Accessor for the Protocol Collection +SmartPtrCProtocolCollectionDoc CPayloadEnvelopeDoc::getProtocolCollection() const { + return _protocolCollection; +} + +/// Accessor for the AttachmentCollection +SmartPtrCAttachmentCollectionDoc CPayloadEnvelopeDoc::getAttachmentCollection() const { + return _attachmentCollection; +} + +/// Accessor for the Headers +SmartPtrCPropertyCollectionDoc CPayloadEnvelopeDoc::getHeaderCollection() const { + return _headerCollection; +} + +/// Accessor for the version +std::string CPayloadEnvelopeDoc::getVersion() const { + return _version; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PayloadEnvelopeDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PayloadEnvelopeDoc/stdafx.h new file mode 100644 index 000000000..dcb0fa36c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PayloadEnvelopeDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PAYLOADENVELOPEDOC_LINKAGE __declspec(dllexport) +#else + #define PAYLOADENVELOPEDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CCertCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CCertCollectionDoc.cpp new file mode 100644 index 000000000..07eebf55e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CCertCollectionDoc.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type CertCollection +CCertCollectionDoc::CCertCollectionDoc() : + _isInitialized(false) {} +CCertCollectionDoc::~CCertCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CCertCollectionDoc::initialize( + const std::deque certCollection) { + if (! _isInitialized) { + _certCollection = certCollection; + + _isInitialized = true; + } +} + +/// Accessor for the Cert +std::deque CCertCollectionDoc::getCert() const { + return _certCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CCertPathCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CCertPathCollectionDoc.cpp new file mode 100644 index 000000000..aee764b6d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CCertPathCollectionDoc.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type CertPathCollection +CCertPathCollectionDoc::CCertPathCollectionDoc() : + _isInitialized(false) {} +CCertPathCollectionDoc::~CCertPathCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CCertPathCollectionDoc::initialize( + const std::deque certPathCollection) { + if (! _isInitialized) { + _certPathCollection = certPathCollection; + + _isInitialized = true; + } +} + +/// Accessor for the Cert +std::deque CCertPathCollectionDoc::getCertPath() const { + return _certPathCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CLocalSecurityDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CLocalSecurityDoc.cpp new file mode 100644 index 000000000..1d1dbda39 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CLocalSecurityDoc.cpp @@ -0,0 +1,70 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" + +using namespace Caf; + +/// A simple container for objects of type CLocalSecurityDoc +CLocalSecurityDoc::CLocalSecurityDoc() : + _isInitialized(false) {} +CLocalSecurityDoc::~CLocalSecurityDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CLocalSecurityDoc::initialize( + const std::string& localId, + const std::string& privateKey, + const std::string& cert, + const std::string& privateKeyPath, + const std::string& certPath) { + if (! _isInitialized) { + _localId = localId; + _privateKey = privateKey; + _cert = cert; + + _privateKeyPath = privateKeyPath; + _certPath = certPath; + + _isInitialized = true; + } +} + +/// Accessor for the LocalId +std::string CLocalSecurityDoc::getLocalId() const { + return _localId; +} + +/// Accessor for the PrivateKey +std::string CLocalSecurityDoc::getPrivateKey() const { + return _privateKey; +} + +/// Accessor for the Cert +std::string CLocalSecurityDoc::getCert() const { + return _cert; +} + +/// Accessor for the PrivateKeyPath +std::string CLocalSecurityDoc::getPrivateKeyPath() const { + return _privateKeyPath; +} + +/// Accessor for the CertPath +std::string CLocalSecurityDoc::getCertPath() const { + return _certPath; +} + + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceDoc.cpp new file mode 100644 index 000000000..cadd12120 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceDoc.cpp @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" + +using namespace Caf; + +/// A simple container for objects of type PersistenceEnvelope +CPersistenceDoc::CPersistenceDoc() : + _isInitialized(false) {} +CPersistenceDoc::~CPersistenceDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CPersistenceDoc::initialize( + const SmartPtrCLocalSecurityDoc& localSecurity, + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollection, + const SmartPtrCPersistenceProtocolCollectionDoc& persistenceProtocolCollection, + const std::string version) { + if (! _isInitialized) { + _localSecurity = localSecurity; + _remoteSecurityCollection = remoteSecurityCollection; + _persistenceProtocolCollection = persistenceProtocolCollection; + _version = version; + + _isInitialized = true; + } +} + +/// Accessor for the LocalSecurity +SmartPtrCLocalSecurityDoc CPersistenceDoc::getLocalSecurity() const { + return _localSecurity; +} + +/// Accessor for the Protocol Collection +SmartPtrCRemoteSecurityCollectionDoc CPersistenceDoc::getRemoteSecurityCollection() const { + return _remoteSecurityCollection; +} + +/// Accessor for the PersistenceProtocol +SmartPtrCPersistenceProtocolCollectionDoc CPersistenceDoc::getPersistenceProtocolCollection() const { + return _persistenceProtocolCollection; +} + +/// Accessor for the version +std::string CPersistenceDoc::getVersion() const { + return _version; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceProtocolCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceProtocolCollectionDoc.cpp new file mode 100644 index 000000000..39e7219eb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceProtocolCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type PersistenceProtocolCollection +CPersistenceProtocolCollectionDoc::CPersistenceProtocolCollectionDoc() : + _isInitialized(false) {} +CPersistenceProtocolCollectionDoc::~CPersistenceProtocolCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CPersistenceProtocolCollectionDoc::initialize( + const std::deque persistenceProtocol) { + if (! _isInitialized) { + _persistenceProtocol = persistenceProtocol; + + _isInitialized = true; + } +} + +/// Accessor for the PersistenceProtocol +std::deque CPersistenceProtocolCollectionDoc::getPersistenceProtocol() const { + return _persistenceProtocol; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceProtocolDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceProtocolDoc.cpp new file mode 100644 index 000000000..1da977b59 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceProtocolDoc.cpp @@ -0,0 +1,123 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" + +using namespace Caf; + +/// A simple container for objects of type CPersistenceProtocolDoc +CPersistenceProtocolDoc::CPersistenceProtocolDoc() : + _isInitialized(false) {} +CPersistenceProtocolDoc::~CPersistenceProtocolDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CPersistenceProtocolDoc::initialize( + const std::string& protocolName, + const std::string& uri, + const std::string& uriAmqp, + const std::string& uriTunnel, + const std::string& tlsCert, + const std::string& tlsProtocol, + const Cdeqstr& tlsCipherCollection, + const SmartPtrCCertCollectionDoc& tlsCertCollection, + const std::string& uriAmqpPath, + const std::string& uriTunnelPath, + const std::string& tlsCertPath, + const SmartPtrCCertPathCollectionDoc& tlsCertPathCollection) { + if (! _isInitialized) { + _protocolName = protocolName; + _uri = uri; + _uriAmqp = uriAmqp; + _uriTunnel = uriTunnel; + _tlsCert = tlsCert; + _tlsProtocol = tlsProtocol; + _tlsCipherCollection = tlsCipherCollection; + _tlsCertCollection = tlsCertCollection; + + _uriAmqpPath = uriAmqpPath; + _uriTunnelPath = uriTunnelPath; + _tlsCertPath = tlsCertPath; + _tlsCertPathCollection = tlsCertPathCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ProtocolName +std::string CPersistenceProtocolDoc::getProtocolName() const { + return _protocolName; +} + +/// Accessor for the Uri +std::string CPersistenceProtocolDoc::getUri() const { + return _uri; +} + +/// Accessor for the UriAmqp +std::string CPersistenceProtocolDoc::getUriAmqp() const { + return _uriAmqp; +} + +/// Accessor for the UriTunnel +std::string CPersistenceProtocolDoc::getUriTunnel() const { + return _uriTunnel; +} + +/// Accessor for the TlsCert +std::string CPersistenceProtocolDoc::getTlsCert() const { + return _tlsCert; +} + +/// Accessor for the TlsProtocol +std::string CPersistenceProtocolDoc::getTlsProtocol() const { + return _tlsProtocol; +} + +/// Accessor for the tlsCipherCollection +Cdeqstr CPersistenceProtocolDoc::getTlsCipherCollection() const { + return _tlsCipherCollection; +} + +/// Accessor for the TlsCertCollection +SmartPtrCCertCollectionDoc CPersistenceProtocolDoc::getTlsCertCollection() const { + return _tlsCertCollection; +} + +/// Accessor for the UriAmqpPath +std::string CPersistenceProtocolDoc::getUriAmqpPath() const { + return _uriAmqpPath; +} + +/// Accessor for the UriTunnelPath +std::string CPersistenceProtocolDoc::getUriTunnelPath() const { + return _uriTunnelPath; +} + +/// Accessor for the TlsCertPath +std::string CPersistenceProtocolDoc::getTlsCertPath() const { + return _tlsCertPath; +} + +/// Accessor for the TlsCertPathCollection +SmartPtrCCertPathCollectionDoc CPersistenceProtocolDoc::getTlsCertPathCollection() const { + return _tlsCertPathCollection; +} + +Cdeqstr _tlsCipherCollection; + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CRemoteSecurityCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CRemoteSecurityCollectionDoc.cpp new file mode 100644 index 000000000..88b7214c8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CRemoteSecurityCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CRemoteSecurityDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type RemoteSecurityCollection +CRemoteSecurityCollectionDoc::CRemoteSecurityCollectionDoc() : + _isInitialized(false) {} +CRemoteSecurityCollectionDoc::~CRemoteSecurityCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CRemoteSecurityCollectionDoc::initialize( + const std::deque remoteSecurity) { + if (! _isInitialized) { + _remoteSecurity = remoteSecurity; + + _isInitialized = true; + } +} + +/// Accessor for the RemoteSecurity +std::deque CRemoteSecurityCollectionDoc::getRemoteSecurity() const { + return _remoteSecurity; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CRemoteSecurityDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CRemoteSecurityDoc.cpp new file mode 100644 index 000000000..eaafd9a63 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/CRemoteSecurityDoc.cpp @@ -0,0 +1,87 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityDoc.h" + +using namespace Caf; + +/// A simple container for objects of type CRemoteSecurityDoc +CRemoteSecurityDoc::CRemoteSecurityDoc() : + _isInitialized(false) {} +CRemoteSecurityDoc::~CRemoteSecurityDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CRemoteSecurityDoc::initialize( + const std::string& remoteId, + const std::string& protocolName, + const std::string& cmsCert, + const std::string& cmsCipherName, + const SmartPtrCCertCollectionDoc& cmsCertCollection, + const std::string& cmsCertPath, + const SmartPtrCCertPathCollectionDoc& cmsCertPathCollection) { + if (! _isInitialized) { + _remoteId = remoteId; + _protocolName = protocolName; + _cmsCert = cmsCert; + _cmsCipherName = cmsCipherName; + _cmsCertCollection = cmsCertCollection; + + _cmsCertPath = cmsCertPath; + _cmsCertPathCollection = cmsCertPathCollection; + + _isInitialized = true; + } +} + +/// Accessor for the RemoteId +std::string CRemoteSecurityDoc::getRemoteId() const { + return _remoteId; +} + +/// Accessor for the ProtocolName +std::string CRemoteSecurityDoc::getProtocolName() const { + return _protocolName; +} + +/// Accessor for the cmsCert +std::string CRemoteSecurityDoc::getCmsCert() const { + return _cmsCert; +} + +/// Accessor for the CmsCipher +std::string CRemoteSecurityDoc::getCmsCipherName() const { + return _cmsCipherName; +} + +/// Accessor for the CertCollection +SmartPtrCCertCollectionDoc CRemoteSecurityDoc::getCmsCertCollection() const { + return _cmsCertCollection; +} + +/// Accessor for the cmsCertPath +std::string CRemoteSecurityDoc::getCmsCertPath() const { + return _cmsCertPath; +} + +/// Accessor for the CertPathCollection +SmartPtrCCertPathCollectionDoc CRemoteSecurityDoc::getCmsCertPathCollection() const { + return _cmsCertPathCollection; +} + + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/stdafx.h new file mode 100644 index 000000000..f28ac1cf3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/PersistenceDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PERSISTENCEDOC_LINKAGE __declspec(dllexport) +#else + #define PERSISTENCEDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CClassCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CClassCollectionDoc.cpp new file mode 100644 index 000000000..64ef9727a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CClassCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Doc/ProviderInfraDoc/CClassCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ClassCollection +CClassCollectionDoc::CClassCollectionDoc() : + _isInitialized(false) {} +CClassCollectionDoc::~CClassCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CClassCollectionDoc::initialize( + const std::deque fullyQualifiedClass) { + if (! _isInitialized) { + _fullyQualifiedClass = fullyQualifiedClass; + + _isInitialized = true; + } +} + +/// Accessor for the FullyQualifiedClass +std::deque CClassCollectionDoc::getFullyQualifiedClass() const { + return _fullyQualifiedClass; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CProviderRegDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CProviderRegDoc.cpp new file mode 100644 index 000000000..0162608da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CProviderRegDoc.cpp @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderReg +CProviderRegDoc::CProviderRegDoc() : + _staleSec(0), + _isSchemaVisible(false), + _isInitialized(false) {} +CProviderRegDoc::~CProviderRegDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderRegDoc::initialize( + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const int32 staleSec, + const bool isSchemaVisible, + const std::string invokerRelPath) { + if (! _isInitialized) { + _providerNamespace = providerNamespace; + _providerName = providerName; + _providerVersion = providerVersion; + _staleSec = staleSec; + _isSchemaVisible = isSchemaVisible; + _invokerRelPath = invokerRelPath; + + _isInitialized = true; + } +} + +/// Accessor for the ProviderNamespace +std::string CProviderRegDoc::getProviderNamespace() const { + return _providerNamespace; +} + +/// Accessor for the ProviderName +std::string CProviderRegDoc::getProviderName() const { + return _providerName; +} + +/// Accessor for the ProviderVersion +std::string CProviderRegDoc::getProviderVersion() const { + return _providerVersion; +} + +/// Accessor for the StaleSec +int32 CProviderRegDoc::getStaleSec() const { + return _staleSec; +} + +/// Accessor for the IsSchemaVisible +bool CProviderRegDoc::getIsSchemaVisible() const { + return _isSchemaVisible; +} + +/// Accessor for the InvokerRelPath +std::string CProviderRegDoc::getInvokerRelPath() const { + return _invokerRelPath; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CSchemaSummaryDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CSchemaSummaryDoc.cpp new file mode 100644 index 000000000..4c2f159e5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/CSchemaSummaryDoc.cpp @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/ProviderInfraDoc/CClassCollectionDoc.h" +#include "Doc/ProviderInfraDoc/CSchemaSummaryDoc.h" + +using namespace Caf; + +/// A simple container for objects of type SchemaSummary +CSchemaSummaryDoc::CSchemaSummaryDoc() : + _isInitialized(false) {} +CSchemaSummaryDoc::~CSchemaSummaryDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CSchemaSummaryDoc::initialize( + const std::string providerNamespace, + const std::string providerName, + const std::string providerVersion, + const SmartPtrCClassCollectionDoc classCollection, + const std::string invokerPath) { + if (! _isInitialized) { + _providerNamespace = providerNamespace; + _providerName = providerName; + _providerVersion = providerVersion; + _classCollection = classCollection; + _invokerPath = invokerPath; + + _isInitialized = true; + } +} + +/// Accessor for the ProviderNamespace +std::string CSchemaSummaryDoc::getProviderNamespace() const { + return _providerNamespace; +} + +/// Accessor for the ProviderName +std::string CSchemaSummaryDoc::getProviderName() const { + return _providerName; +} + +/// Accessor for the ProviderVersion +std::string CSchemaSummaryDoc::getProviderVersion() const { + return _providerVersion; +} + +/// Accessor for the ClassCollection +SmartPtrCClassCollectionDoc CSchemaSummaryDoc::getClassCollection() const { + return _classCollection; +} + +/// Accessor for the InvokerPath +std::string CSchemaSummaryDoc::getInvokerPath() const { + return _invokerPath; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/stdafx.h new file mode 100644 index 000000000..29378b813 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderInfraDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PROVIDERINFRADOC_LINKAGE __declspec(dllexport) +#else + #define PROVIDERINFRADOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderBatchDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderBatchDoc.cpp new file mode 100644 index 000000000..5fb9971fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderBatchDoc.cpp @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderBatchDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderBatch +CProviderBatchDoc::CProviderBatchDoc() : + _isInitialized(false) {} +CProviderBatchDoc::~CProviderBatchDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderBatchDoc::initialize( + const std::string outputDir, + const SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollection, + const SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollection) { + if (! _isInitialized) { + _outputDir = outputDir; + _collectInstancesCollection = collectInstancesCollection; + _invokeOperationCollection = invokeOperationCollection; + + _isInitialized = true; + } +} + +/// Accessor for the OutputDir +std::string CProviderBatchDoc::getOutputDir() const { + return _outputDir; +} + +/// Accessor for the CollectInstancesCollection +SmartPtrCProviderCollectInstancesCollectionDoc CProviderBatchDoc::getCollectInstancesCollection() const { + return _collectInstancesCollection; +} + +/// Accessor for the InvokeOperationCollection +SmartPtrCProviderInvokeOperationCollectionDoc CProviderBatchDoc::getInvokeOperationCollection() const { + return _invokeOperationCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.cpp new file mode 100644 index 000000000..c6281d0bf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderCollectInstancesCollection +CProviderCollectInstancesCollectionDoc::CProviderCollectInstancesCollectionDoc() : + _isInitialized(false) {} +CProviderCollectInstancesCollectionDoc::~CProviderCollectInstancesCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderCollectInstancesCollectionDoc::initialize( + const std::deque collectInstances) { + if (! _isInitialized) { + _collectInstances = collectInstances; + + _isInitialized = true; + } +} + +/// Accessor for the CollectInstances +std::deque CProviderCollectInstancesCollectionDoc::getCollectInstances() const { + return _collectInstances; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectInstancesDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectInstancesDoc.cpp new file mode 100644 index 000000000..dff72521f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectInstancesDoc.cpp @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderCollectInstances +CProviderCollectInstancesDoc::CProviderCollectInstancesDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CProviderCollectInstancesDoc::~CProviderCollectInstancesDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderCollectInstancesDoc::initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const UUID jobId, + const std::string outputDir, + const SmartPtrCParameterCollectionDoc parameterCollection) { + if (! _isInitialized) { + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + _jobId = jobId; + _outputDir = outputDir; + _parameterCollection = parameterCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ClassNamespace +std::string CProviderCollectInstancesDoc::getClassNamespace() const { + return _classNamespace; +} + +/// Accessor for the ClassName +std::string CProviderCollectInstancesDoc::getClassName() const { + return _className; +} + +/// Accessor for the ClassVersion +std::string CProviderCollectInstancesDoc::getClassVersion() const { + return _classVersion; +} + +/// Accessor for the JobId +UUID CProviderCollectInstancesDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the OutputDir +std::string CProviderCollectInstancesDoc::getOutputDir() const { + return _outputDir; +} + +/// Accessor for the ParameterCollection +SmartPtrCParameterCollectionDoc CProviderCollectInstancesDoc::getParameterCollection() const { + return _parameterCollection; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.cpp new file mode 100644 index 000000000..ca89be60e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.cpp @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderCollectSchemaRequest +CProviderCollectSchemaRequestDoc::CProviderCollectSchemaRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CProviderCollectSchemaRequestDoc::~CProviderCollectSchemaRequestDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderCollectSchemaRequestDoc::initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const UUID jobId, + const std::string outputDir, + const SmartPtrCProviderRequestHeaderDoc requestHeader) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _jobId = jobId; + _outputDir = outputDir; + _requestHeader = requestHeader; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CProviderCollectSchemaRequestDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CProviderCollectSchemaRequestDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the PmeId +std::string CProviderCollectSchemaRequestDoc::getPmeId() const { + return _pmeId; +} + +/// Accessor for the JobId +UUID CProviderCollectSchemaRequestDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the OutputDir +std::string CProviderCollectSchemaRequestDoc::getOutputDir() const { + return _outputDir; +} + +/// Accessor for the RequestHeader +SmartPtrCProviderRequestHeaderDoc CProviderCollectSchemaRequestDoc::getRequestHeader() const { + return _requestHeader; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.cpp new file mode 100644 index 000000000..bdda24700 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderInvokeOperationCollection +CProviderInvokeOperationCollectionDoc::CProviderInvokeOperationCollectionDoc() : + _isInitialized(false) {} +CProviderInvokeOperationCollectionDoc::~CProviderInvokeOperationCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderInvokeOperationCollectionDoc::initialize( + const std::deque invokeOperation) { + if (! _isInitialized) { + _invokeOperation = invokeOperation; + + _isInitialized = true; + } +} + +/// Accessor for the InvokeOperation +std::deque CProviderInvokeOperationCollectionDoc::getInvokeOperation() const { + return _invokeOperation; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderInvokeOperationDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderInvokeOperationDoc.cpp new file mode 100644 index 000000000..bd63fc618 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderInvokeOperationDoc.cpp @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderInvokeOperation +CProviderInvokeOperationDoc::CProviderInvokeOperationDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CProviderInvokeOperationDoc::~CProviderInvokeOperationDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderInvokeOperationDoc::initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const UUID jobId, + const std::string outputDir, + const SmartPtrCOperationDoc operation) { + if (! _isInitialized) { + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + _jobId = jobId; + _outputDir = outputDir; + _operation = operation; + + _isInitialized = true; + } +} + +/// Accessor for the ClassNamespace +std::string CProviderInvokeOperationDoc::getClassNamespace() const { + return _classNamespace; +} + +/// Accessor for the ClassName +std::string CProviderInvokeOperationDoc::getClassName() const { + return _className; +} + +/// Accessor for the ClassVersion +std::string CProviderInvokeOperationDoc::getClassVersion() const { + return _classVersion; +} + +/// Accessor for the JobId +UUID CProviderInvokeOperationDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the OutputDir +std::string CProviderInvokeOperationDoc::getOutputDir() const { + return _outputDir; +} + +/// Accessor for the Operation +SmartPtrCOperationDoc CProviderInvokeOperationDoc::getOperation() const { + return _operation; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestConfigDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestConfigDoc.cpp new file mode 100644 index 000000000..1d40ca9e6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestConfigDoc.cpp @@ -0,0 +1,50 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderRequestConfig +CProviderRequestConfigDoc::CProviderRequestConfigDoc() : + _isInitialized(false) {} +CProviderRequestConfigDoc::~CProviderRequestConfigDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderRequestConfigDoc::initialize( + const std::string responseFormatType, + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollection) { + if (! _isInitialized) { + _responseFormatType = responseFormatType; + _loggingLevelCollection = loggingLevelCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ResponseFormatType +std::string CProviderRequestConfigDoc::getResponseFormatType() const { + return _responseFormatType; +} + +/// Accessor for the LoggingLevelCollection +SmartPtrCLoggingLevelCollectionDoc CProviderRequestConfigDoc::getLoggingLevelCollection() const { + return _loggingLevelCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestDoc.cpp new file mode 100644 index 000000000..13b7c1375 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestDoc.cpp @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderBatchDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderRequest +CProviderRequestDoc::CProviderRequestDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CProviderRequestDoc::~CProviderRequestDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderRequestDoc::initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCProviderRequestHeaderDoc requestHeader, + const SmartPtrCProviderBatchDoc batch, + const SmartPtrCAttachmentCollectionDoc attachmentCollection) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _requestHeader = requestHeader; + _batch = batch; + _attachmentCollection = attachmentCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CProviderRequestDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CProviderRequestDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the PmeId +std::string CProviderRequestDoc::getPmeId() const { + return _pmeId; +} + +/// Accessor for the RequestHeader +SmartPtrCProviderRequestHeaderDoc CProviderRequestDoc::getRequestHeader() const { + return _requestHeader; +} + +/// Accessor for the Batch +SmartPtrCProviderBatchDoc CProviderRequestDoc::getBatch() const { + return _batch; +} + +/// Accessor for the AttachmentCollection +SmartPtrCAttachmentCollectionDoc CProviderRequestDoc::getAttachmentCollection() const { + return _attachmentCollection; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestHeaderDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestHeaderDoc.cpp new file mode 100644 index 000000000..a08a8ae16 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestHeaderDoc.cpp @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderRequestHeader +CProviderRequestHeaderDoc::CProviderRequestHeaderDoc() : + _isInitialized(false) {} +CProviderRequestHeaderDoc::~CProviderRequestHeaderDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderRequestHeaderDoc::initialize( + const SmartPtrCProviderRequestConfigDoc requestConfig, + const SmartPtrCPropertyCollectionDoc echoPropertyBag) { + if (! _isInitialized) { + _requestConfig = requestConfig; + _echoPropertyBag = echoPropertyBag; + + _isInitialized = true; + } +} + +/// Accessor for the RequestConfig +SmartPtrCProviderRequestConfigDoc CProviderRequestHeaderDoc::getRequestConfig() const { + return _requestConfig; +} + +/// Accessor for the EchoPropertyBag +SmartPtrCPropertyCollectionDoc CProviderRequestHeaderDoc::getEchoPropertyBag() const { + return _echoPropertyBag; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/stdafx.h new file mode 100644 index 000000000..c95958ad4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderRequestDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PROVIDERREQUESTDOC_LINKAGE __declspec(dllexport) +#else + #define PROVIDERREQUESTDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CCdifDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CCdifDoc.cpp new file mode 100644 index 000000000..b20903a33 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CCdifDoc.cpp @@ -0,0 +1,59 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h" +#include "Doc/ProviderResultsDoc/CRequestIdentifierDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/ProviderResultsDoc/CCdifDoc.h" + +using namespace Caf; + +/// A simple container for objects of type Cdif +CCdifDoc::CCdifDoc() : + _isInitialized(false) {} +CCdifDoc::~CCdifDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CCdifDoc::initialize( + const SmartPtrCRequestIdentifierDoc requestIdentifier, + const SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollection, + const SmartPtrCSchemaDoc schema) { + if (! _isInitialized) { + _requestIdentifier = requestIdentifier; + _definitionObjectCollection = definitionObjectCollection; + _schema = schema; + + _isInitialized = true; + } +} + +/// Accessor for the RequestIdentifier +SmartPtrCRequestIdentifierDoc CCdifDoc::getRequestIdentifier() const { + return _requestIdentifier; +} + +/// Accessor for the DefinitionObjectCollection +SmartPtrCDefinitionObjectCollectionDoc CCdifDoc::getDefinitionObjectCollection() const { + return _definitionObjectCollection; +} + +/// Accessor for the Schema +SmartPtrCSchemaDoc CCdifDoc::getSchema() const { + return _schema; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.cpp new file mode 100644 index 000000000..62c94393b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h" + +using namespace Caf; + +/// Set of elements containing data returned as a result of a provider collection or action +CDefinitionObjectCollectionDoc::CDefinitionObjectCollectionDoc() : + _isInitialized(false) {} +CDefinitionObjectCollectionDoc::~CDefinitionObjectCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDefinitionObjectCollectionDoc::initialize( + const std::deque value) { + if (! _isInitialized) { + _value = value; + + _isInitialized = true; + } +} + +/// Accessor for the Value +std::deque CDefinitionObjectCollectionDoc::getValue() const { + return _value; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CRequestIdentifierDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CRequestIdentifierDoc.cpp new file mode 100644 index 000000000..902cea13b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CRequestIdentifierDoc.cpp @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/ProviderResultsDoc/CRequestIdentifierDoc.h" + +using namespace Caf; + +/// Fields that allow client to determine which request resulted in this response document +CRequestIdentifierDoc::CRequestIdentifierDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _jobId(CAFCOMMON_GUID_NULL), + _sessionId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CRequestIdentifierDoc::~CRequestIdentifierDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CRequestIdentifierDoc::initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const UUID jobId, + const SmartPtrCActionClassDoc actionClass, + const UUID sessionId) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _jobId = jobId; + _actionClass = actionClass; + _sessionId = sessionId; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CRequestIdentifierDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CRequestIdentifierDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the PmeId +std::string CRequestIdentifierDoc::getPmeId() const { + return _pmeId; +} + +/// Identifier of the specific job within the request +UUID CRequestIdentifierDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the ActionClass +SmartPtrCActionClassDoc CRequestIdentifierDoc::getActionClass() const { + return _actionClass; +} + +/// Client-configurable identifier that is opaque (not used) by the Common Agent Framework +UUID CRequestIdentifierDoc::getSessionId() const { + return _sessionId; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CSchemaDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CSchemaDoc.cpp new file mode 100644 index 000000000..b8d072831 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/CSchemaDoc.cpp @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h" +#include "Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" + +using namespace Caf; + +/// Set of elements describing the objects that can be generated by the provider +CSchemaDoc::CSchemaDoc() : + _isInitialized(false) {} +CSchemaDoc::~CSchemaDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CSchemaDoc::initialize( + const std::deque dataClassCollection, + const std::deque actionClassCollection, + const std::deque logicalRelationshipCollection, + const std::deque physicalRelationshipCollection) { + if (! _isInitialized) { + _dataClassCollection = dataClassCollection; + _actionClassCollection = actionClassCollection; + _logicalRelationshipCollection = logicalRelationshipCollection; + _physicalRelationshipCollection = physicalRelationshipCollection; + + _isInitialized = true; + } +} + +/// Accessor for the DataClassCollection +std::deque CSchemaDoc::getDataClassCollection() const { + return _dataClassCollection; +} + +/// Accessor for the ActionClassCollection +std::deque CSchemaDoc::getActionClassCollection() const { + return _actionClassCollection; +} + +/// Accessor for the LogicalRelationshipCollection +std::deque CSchemaDoc::getLogicalRelationshipCollection() const { + return _logicalRelationshipCollection; +} + +/// Accessor for the PhysicalRelationshipCollection +std::deque CSchemaDoc::getPhysicalRelationshipCollection() const { + return _physicalRelationshipCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/stdafx.h new file mode 100644 index 000000000..9ec8336ad --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ProviderResultsDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PROVIDERRESULTSDOC_LINKAGE __declspec(dllexport) +#else + #define PROVIDERRESULTSDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CErrorResponseDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CErrorResponseDoc.cpp new file mode 100644 index 000000000..4d252de5b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CErrorResponseDoc.cpp @@ -0,0 +1,72 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Doc/ResponseDoc/CErrorResponseDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ErrorResponse +CErrorResponseDoc::CErrorResponseDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CErrorResponseDoc::~CErrorResponseDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CErrorResponseDoc::initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const std::string errorMessage) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _responseHeader = responseHeader; + _errorMessage = errorMessage; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CErrorResponseDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CErrorResponseDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the PmeId +std::string CErrorResponseDoc::getPmeId() const { + return _pmeId; +} + +/// Accessor for the Response Header +SmartPtrCResponseHeaderDoc CErrorResponseDoc::getResponseHeader() const { + return _responseHeader; +} + +/// Accessor for the ErrorMessage +std::string CErrorResponseDoc::getErrorMessage() const { + return _errorMessage; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventKeyCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventKeyCollectionDoc.cpp new file mode 100644 index 000000000..5f277eb7b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventKeyCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/ResponseDoc/CEventKeyDoc.h" +#include "Doc/ResponseDoc/CEventKeyCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type EventKeyCollection +CEventKeyCollectionDoc::CEventKeyCollectionDoc() : + _isInitialized(false) {} +CEventKeyCollectionDoc::~CEventKeyCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CEventKeyCollectionDoc::initialize( + const std::deque eventKey) { + if (! _isInitialized) { + _eventKey = eventKey; + + _isInitialized = true; + } +} + +/// Accessor for the EventKey +std::deque CEventKeyCollectionDoc::getEventKey() const { + return _eventKey; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventKeyDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventKeyDoc.cpp new file mode 100644 index 000000000..987c71014 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventKeyDoc.cpp @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/ResponseDoc/CEventKeyDoc.h" + +using namespace Caf; + +/// A simple container for objects of type EventKey +CEventKeyDoc::CEventKeyDoc() : + _isInitialized(false) {} +CEventKeyDoc::~CEventKeyDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CEventKeyDoc::initialize( + const std::string name, + const std::string value) { + if (! _isInitialized) { + _name = name; + _value = value; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::string CEventKeyDoc::getName() const { + return _name; +} + +/// Accessor for the Value +std::string CEventKeyDoc::getValue() const { + return _value; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventManifestDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventManifestDoc.cpp new file mode 100644 index 000000000..041bc030f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CEventManifestDoc.cpp @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/ResponseDoc/CEventManifestDoc.h" + +using namespace Caf; + +/// A simple container for objects of type EventManifest +CEventManifestDoc::CEventManifestDoc() : + _isInitialized(false) {} +CEventManifestDoc::~CEventManifestDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CEventManifestDoc::initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const std::string operationName, + const SmartPtrCAttachmentCollectionDoc attachmentCollection) { + if (! _isInitialized) { + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + _operationName = operationName; + _attachmentCollection = attachmentCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ClassNamespace +std::string CEventManifestDoc::getClassNamespace() const { + return _classNamespace; +} + +/// Accessor for the ClassName +std::string CEventManifestDoc::getClassName() const { + return _className; +} + +/// Accessor for the ClassVersion +std::string CEventManifestDoc::getClassVersion() const { + return _classVersion; +} + +/// Accessor for the OperationName +std::string CEventManifestDoc::getOperationName() const { + return _operationName; +} + +/// Accessor for the AttachmentCollection +SmartPtrCAttachmentCollectionDoc CEventManifestDoc::getAttachmentCollection() const { + return _attachmentCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CManifestCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CManifestCollectionDoc.cpp new file mode 100644 index 000000000..dc4bda6f7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CManifestCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Doc/ResponseDoc/CManifestCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ManifestCollection +CManifestCollectionDoc::CManifestCollectionDoc() : + _isInitialized(false) {} +CManifestCollectionDoc::~CManifestCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CManifestCollectionDoc::initialize( + const std::deque manifest) { + if (! _isInitialized) { + _manifest = manifest; + + _isInitialized = true; + } +} + +/// Accessor for the Manifest +std::deque CManifestCollectionDoc::getManifest() const { + return _manifest; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CManifestDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CManifestDoc.cpp new file mode 100644 index 000000000..c4f10b22e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CManifestDoc.cpp @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" + +using namespace Caf; + +/// A simple container for objects of type Manifest +CManifestDoc::CManifestDoc() : + _jobId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CManifestDoc::~CManifestDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CManifestDoc::initialize( + const std::string classNamespace, + const std::string className, + const std::string classVersion, + const UUID jobId, + const std::string operationName, + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection) { + if (! _isInitialized) { + _classNamespace = classNamespace; + _className = className; + _classVersion = classVersion; + _jobId = jobId; + _operationName = operationName; + _attachmentNameCollection = attachmentNameCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ClassNamespace +std::string CManifestDoc::getClassNamespace() const { + return _classNamespace; +} + +/// Accessor for the ClassName +std::string CManifestDoc::getClassName() const { + return _className; +} + +/// Accessor for the ClassVersion +std::string CManifestDoc::getClassVersion() const { + return _classVersion; +} + +/// Accessor for the JobId +UUID CManifestDoc::getJobId() const { + return _jobId; +} + +/// Accessor for the OperationName +std::string CManifestDoc::getOperationName() const { + return _operationName; +} + +/// Accessor for the AttachmentNameCollection +SmartPtrCAttachmentNameCollectionDoc CManifestDoc::getAttachmentNameCollection() const { + return _attachmentNameCollection; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CProviderEventResponseDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CProviderEventResponseDoc.cpp new file mode 100644 index 000000000..cd98b3baf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CProviderEventResponseDoc.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" +#include "Doc/ResponseDoc/CEventKeyCollectionDoc.h" +#include "Doc/ResponseDoc/CEventManifestDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Doc/ResponseDoc/CProviderEventResponseDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderEventResponse +CProviderEventResponseDoc::CProviderEventResponseDoc() : + _isInitialized(false) {} +CProviderEventResponseDoc::~CProviderEventResponseDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderEventResponseDoc::initialize( + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const SmartPtrCEventManifestDoc manifest, + const SmartPtrCEventKeyCollectionDoc eventKeyCollection, + const SmartPtrCStatisticsDoc statistics) { + if (! _isInitialized) { + _pmeId = pmeId; + _responseHeader = responseHeader; + _manifest = manifest; + _eventKeyCollection = eventKeyCollection; + _statistics = statistics; + + _isInitialized = true; + } +} + +/// Accessor for the PmeId +std::string CProviderEventResponseDoc::getPmeId() const { + return _pmeId; +} + +/// Accessor for the ResponseHeader +SmartPtrCResponseHeaderDoc CProviderEventResponseDoc::getResponseHeader() const { + return _responseHeader; +} + +/// Accessor for the Manifest +SmartPtrCEventManifestDoc CProviderEventResponseDoc::getManifest() const { + return _manifest; +} + +/// Accessor for the EventKeyCollection +SmartPtrCEventKeyCollectionDoc CProviderEventResponseDoc::getEventKeyCollection() const { + return _eventKeyCollection; +} + +/// Accessor for the Statistics +SmartPtrCStatisticsDoc CProviderEventResponseDoc::getStatistics() const { + return _statistics; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CProviderResponseDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CProviderResponseDoc.cpp new file mode 100644 index 000000000..33e63272c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CProviderResponseDoc.cpp @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Doc/ResponseDoc/CProviderResponseDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ProviderResponse +CProviderResponseDoc::CProviderResponseDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CProviderResponseDoc::~CProviderResponseDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CProviderResponseDoc::initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const SmartPtrCManifestDoc manifest, + const SmartPtrCAttachmentCollectionDoc attachmentCollection, + const SmartPtrCStatisticsDoc statistics) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _responseHeader = responseHeader; + _manifest = manifest; + _attachmentCollection = attachmentCollection; + _statistics = statistics; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CProviderResponseDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CProviderResponseDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the PmeId +std::string CProviderResponseDoc::getPmeId() const { + return _pmeId; +} + +/// Accessor for the ResponseHeader +SmartPtrCResponseHeaderDoc CProviderResponseDoc::getResponseHeader() const { + return _responseHeader; +} + +/// Accessor for the Manifest +SmartPtrCManifestDoc CProviderResponseDoc::getManifest() const { + return _manifest; +} + +/// Accessor for the AttachmentCollection +SmartPtrCAttachmentCollectionDoc CProviderResponseDoc::getAttachmentCollection() const { + return _attachmentCollection; +} + +/// Accessor for the Statistics +SmartPtrCStatisticsDoc CProviderResponseDoc::getStatistics() const { + return _statistics; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CResponseDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CResponseDoc.cpp new file mode 100644 index 000000000..6f9d1123e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CResponseDoc.cpp @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" +#include "Doc/ResponseDoc/CManifestCollectionDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Doc/ResponseDoc/CResponseDoc.h" + +using namespace Caf; + +/// A simple container for objects of type Response +CResponseDoc::CResponseDoc() : + _clientId(CAFCOMMON_GUID_NULL), + _requestId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CResponseDoc::~CResponseDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CResponseDoc::initialize( + const UUID clientId, + const UUID requestId, + const std::string pmeId, + const SmartPtrCResponseHeaderDoc responseHeader, + const SmartPtrCManifestCollectionDoc manifestCollection, + const SmartPtrCAttachmentCollectionDoc attachmentCollection, + const SmartPtrCStatisticsDoc statistics) { + if (! _isInitialized) { + _clientId = clientId; + _requestId = requestId; + _pmeId = pmeId; + _responseHeader = responseHeader; + _manifestCollection = manifestCollection; + _attachmentCollection = attachmentCollection; + _statistics = statistics; + + _isInitialized = true; + } +} + +/// Accessor for the ClientId +UUID CResponseDoc::getClientId() const { + return _clientId; +} + +/// Accessor for the RequestId +UUID CResponseDoc::getRequestId() const { + return _requestId; +} + +/// Accessor for the PmeId +std::string CResponseDoc::getPmeId() const { + return _pmeId; +} + +/// Accessor for the ManifestCollection +SmartPtrCResponseHeaderDoc CResponseDoc::getResponseHeader() const { + return _responseHeader; +} + +/// Accessor for the ManifestCollection +SmartPtrCManifestCollectionDoc CResponseDoc::getManifestCollection() const { + return _manifestCollection; +} + +/// Accessor for the AttachmentCollection +SmartPtrCAttachmentCollectionDoc CResponseDoc::getAttachmentCollection() const { + return _attachmentCollection; +} + +/// Accessor for the Statistics +SmartPtrCStatisticsDoc CResponseDoc::getStatistics() const { + return _statistics; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CResponseHeaderDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CResponseHeaderDoc.cpp new file mode 100644 index 000000000..0d95bedf1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/CResponseHeaderDoc.cpp @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ResponseHeader +CResponseHeaderDoc::CResponseHeaderDoc() : + _sequenceNumber(0), + _isFinalResponse(true), + _sessionId(CAFCOMMON_GUID_NULL), + _isInitialized(false) {} +CResponseHeaderDoc::~CResponseHeaderDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CResponseHeaderDoc::initialize( + const std::string version, + const std::string createdDateTime, + const uint32 sequenceNumber, + const bool isFinalResponse, + const UUID sessionId) { + if (! _isInitialized) { + _version = version; + _createdDateTime = createdDateTime; + _sequenceNumber = sequenceNumber; + _isFinalResponse = isFinalResponse; + _sessionId = sessionId; + + _isInitialized = true; + } +} + +/// Accessor for the version +std::string CResponseHeaderDoc::getVersion() const { + return _version; +} + +/// Accessor for the date/time when the request was created +std::string CResponseHeaderDoc::getCreatedDateTime() const { + return _createdDateTime; +} + +/// Accessor for the sequenceNumber +uint32 CResponseHeaderDoc::getSequenceNumber() const { + return _sequenceNumber; +} + +/// Accessor for the version +bool CResponseHeaderDoc::getIsFinalResponse() const { + return _isFinalResponse; +} + +/// Accessor for the session ID +UUID CResponseHeaderDoc::getSessionId() const { + return _sessionId; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/stdafx.h new file mode 100644 index 000000000..68b8f4ae2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/ResponseDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define RESPONSEDOC_LINKAGE __declspec(dllexport) +#else + #define RESPONSEDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassDoc.cpp new file mode 100644 index 000000000..901620b25 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassDoc.cpp @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CCollectMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" + +using namespace Caf; + +/// Definition of an action class that may be generated by the provider +CActionClassDoc::CActionClassDoc() : + _isInitialized(false) {} +CActionClassDoc::~CActionClassDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CActionClassDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const SmartPtrCCollectMethodDoc collectMethod, + const std::deque methodCollection, + const std::string displayName, + const std::string description) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _collectMethod = collectMethod; + _methodCollection = methodCollection; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CActionClassDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CActionClassDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CActionClassDoc::getVersion() const { + return _version; +} + +/// Accessor for the CollectMethod +SmartPtrCCollectMethodDoc CActionClassDoc::getCollectMethod() const { + return _collectMethod; +} + +/// Accessor for the Method +std::deque CActionClassDoc::getMethodCollection() const { + return _methodCollection; +} + +/// A hint as to what this class should be called when displaying it to a human +std::string CActionClassDoc::getDisplayName() const { + return _displayName; +} + +/// A phrase to describe the class for mouse-over text, etc +std::string CActionClassDoc::getDescription() const { + return _description; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.cpp new file mode 100644 index 000000000..28d36bf20 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CActionClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ActionClassInstanceCollection +CActionClassInstanceCollectionDoc::CActionClassInstanceCollectionDoc() : + _isInitialized(false) {} +CActionClassInstanceCollectionDoc::~CActionClassInstanceCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CActionClassInstanceCollectionDoc::initialize( + const std::deque actionClassInstanceCollection) { + if (! _isInitialized) { + _actionClassInstanceCollection = actionClassInstanceCollection; + + _isInitialized = true; + } +} + +/// Accessor for the ActionClassInstance +std::deque CActionClassInstanceCollectionDoc::getActionClassInstanceCollection() const { + return _actionClassInstanceCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassInstanceDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassInstanceDoc.cpp new file mode 100644 index 000000000..561aaf288 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassInstanceDoc.cpp @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassInstanceDoc.h" + +using namespace Caf; + +/// A simple container for objects of type ActionClassInstance +CActionClassInstanceDoc::CActionClassInstanceDoc() : + _isInitialized(false) {} +CActionClassInstanceDoc::~CActionClassInstanceDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CActionClassInstanceDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const SmartPtrCInstanceOperationCollectionDoc instanceOperationCollection) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _instanceOperationCollection = instanceOperationCollection; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CActionClassInstanceDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CActionClassInstanceDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CActionClassInstanceDoc::getVersion() const { + return _version; +} + +/// Accessor for the InstanceOperationCollection +SmartPtrCInstanceOperationCollectionDoc CActionClassInstanceDoc::getInstanceOperationCollection() const { + return _instanceOperationCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassCardinalityDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassCardinalityDoc.cpp new file mode 100644 index 000000000..f50d023ae --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassCardinalityDoc.cpp @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" + +using namespace Caf; + +/// Class description of one end of a relationship +CClassCardinalityDoc::CClassCardinalityDoc() : + _isInitialized(false) {} +CClassCardinalityDoc::~CClassCardinalityDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CClassCardinalityDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::string cardinality) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _cardinality = cardinality; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CClassCardinalityDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CClassCardinalityDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CClassCardinalityDoc::getVersion() const { + return _version; +} + +/// Cardinality of one end relationship, i.e. has one, has many, etc +std::string CClassCardinalityDoc::getCardinality() const { + return _cardinality; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassFieldDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassFieldDoc.cpp new file mode 100644 index 000000000..5a409ffaa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassFieldDoc.cpp @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/CClassFieldDoc.h" + +using namespace Caf; + +/// Description of a class and the field used to identify one end of a relationship +CClassFieldDoc::CClassFieldDoc() : + _isInitialized(false) {} +CClassFieldDoc::~CClassFieldDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CClassFieldDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::string field) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _field = field; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CClassFieldDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CClassFieldDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CClassFieldDoc::getVersion() const { + return _version; +} + +/// Description of a class field used to identify one end of a relationship +std::string CClassFieldDoc::getField() const { + return _field; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassIdentifierDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassIdentifierDoc.cpp new file mode 100644 index 000000000..7cf4de4e1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassIdentifierDoc.cpp @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" + +using namespace Caf; + +/// Tuple of values to uniquely identify a class +CClassIdentifierDoc::CClassIdentifierDoc() : + _isInitialized(false) {} +CClassIdentifierDoc::~CClassIdentifierDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CClassIdentifierDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CClassIdentifierDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CClassIdentifierDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CClassIdentifierDoc::getVersion() const { + return _version; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassInstancePropertyDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassInstancePropertyDoc.cpp new file mode 100644 index 000000000..60e8a98e0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassInstancePropertyDoc.cpp @@ -0,0 +1,87 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h" + +using namespace Caf; + +/// Definition of an attribute (field) of a class +CClassInstancePropertyDoc::CClassInstancePropertyDoc() : + _required(false), + _transientVal(false), + _list(false), + _isInitialized(false) {} +CClassInstancePropertyDoc::~CClassInstancePropertyDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CClassInstancePropertyDoc::initialize( + const std::string name, + const std::deque type, + const bool required, + const bool transientVal, + const bool list, + const std::string displayName, + const std::string description) { + if (! _isInitialized) { + _name = name; + _type = type; + _required = required; + _transientVal = transientVal; + _list = list; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } +} + +/// Property name +std::string CClassInstancePropertyDoc::getName() const { + return _name; +} + +/// Accessor for the Type +std::deque CClassInstancePropertyDoc::getType() const { + return _type; +} + +/// Whether this is a required property, i.e. this property must always be non-empty +bool CClassInstancePropertyDoc::getRequired() const { + return _required; +} + +/// Accessor for the TransientVal +bool CClassInstancePropertyDoc::getTransientVal() const { + return _transientVal; +} + +/// Indicates whether to expect a list of properties in the provider response +bool CClassInstancePropertyDoc::getList() const { + return _list; +} + +/// A hint as to what this property should be called when displaying it to a human +std::string CClassInstancePropertyDoc::getDisplayName() const { + return _displayName; +} + +/// A phrase to describe the property for mouse-over text, etc +std::string CClassInstancePropertyDoc::getDescription() const { + return _description; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassPropertyDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassPropertyDoc.cpp new file mode 100644 index 000000000..0ef813074 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassPropertyDoc.cpp @@ -0,0 +1,141 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" + +using namespace Caf; + +/// Definition of an attribute (field) of a class +CClassPropertyDoc::CClassPropertyDoc() : + _type(PROPERTY_NONE), + _required(false), + _key(false), + _list(false), + _caseSensitive(false), + _transientVal(false), + _validator(VALIDATOR_NONE), + _isInitialized(false) {} +CClassPropertyDoc::~CClassPropertyDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CClassPropertyDoc::initialize( + const std::string name, + const PROPERTY_TYPE type, + const std::deque value, + const bool required, + const bool key, + const bool list, + const bool caseSensitive, + const bool transientVal, + const std::string defaultVal, + const VALIDATOR_TYPE validator, + const std::string upperRange, + const std::string lowerRange, + const std::string displayName, + const std::string description) { + if (! _isInitialized) { + _name = name; + _type = type; + _value = value; + _required = required; + _key = key; + _list = list; + _caseSensitive = caseSensitive; + _transientVal = transientVal; + _defaultVal = defaultVal; + _validator = validator; + _upperRange = upperRange; + _lowerRange = lowerRange; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } +} + +/// Property name +std::string CClassPropertyDoc::getName() const { + return _name; +} + +/// Describes the data type of the property +PROPERTY_TYPE CClassPropertyDoc::getType() const { + return _type; +} + +/// The contents of a validator used on this property +std::deque CClassPropertyDoc::getValue() const { + return _value; +} + +/// Whether this is a required property, i.e. this property must always be non-empty +bool CClassPropertyDoc::getRequired() const { + return _required; +} + +/// Indicates this property may be used as a key identifying field +bool CClassPropertyDoc::getKey() const { + return _key; +} + +/// Indicates whether to expect a list of properties in the provider response +bool CClassPropertyDoc::getList() const { + return _list; +} + +/// Indicates whether a string field should be treated in a case-sensitive manner +bool CClassPropertyDoc::getCaseSensitive() const { + return _caseSensitive; +} + +/// Accessor for the TransientVal +bool CClassPropertyDoc::getTransientVal() const { + return _transientVal; +} + +/// Accessor for the DefaultVal +std::string CClassPropertyDoc::getDefaultVal() const { + return _defaultVal; +} + +/// The type of validator described in the 'value' sub-elements +VALIDATOR_TYPE CClassPropertyDoc::getValidator() const { + return _validator; +} + +/// If a 'range' validator is in use, this describes the upper limit of allowable values for the property. QUESTIONABLE: how do we determine inclusive or exclusive range +std::string CClassPropertyDoc::getUpperRange() const { + return _upperRange; +} + +/// If a 'range' validator is in use, this describes the lower limit of allowable values for the property. QUESTIONABLE: how do we determine inclusive or exclusive range +std::string CClassPropertyDoc::getLowerRange() const { + return _lowerRange; +} + +/// A hint as to what this property should be called when displaying it to a human +std::string CClassPropertyDoc::getDisplayName() const { + return _displayName; +} + +/// A phrase to describe the property for mouse-over text, etc +std::string CClassPropertyDoc::getDescription() const { + return _description; +} + +VALIDATOR_TYPE _validator; + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCmdlMetadataDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCmdlMetadataDoc.cpp new file mode 100644 index 000000000..a819c2c4e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCmdlMetadataDoc.cpp @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" + +using namespace Caf; + +/// A simple container for objects of type CmdlMetadata +CCmdlMetadataDoc::CCmdlMetadataDoc() : + _isInitialized(false) {} +CCmdlMetadataDoc::~CCmdlMetadataDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CCmdlMetadataDoc::initialize( + const std::string name, + const std::string value) { + if (! _isInitialized) { + _name = name; + _value = value; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::string CCmdlMetadataDoc::getName() const { + return _name; +} + +/// Accessor for the Value +std::string CCmdlMetadataDoc::getValue() const { + return _value; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCmdlUnionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCmdlUnionDoc.cpp new file mode 100644 index 000000000..2ff303329 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCmdlUnionDoc.cpp @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/CCmdlUnionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type CmdlUnion +CCmdlUnionDoc::CCmdlUnionDoc() : + _isInitialized(false) {} +CCmdlUnionDoc::~CCmdlUnionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CCmdlUnionDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CCmdlUnionDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CCmdlUnionDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CCmdlUnionDoc::getVersion() const { + return _version; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCollectMethodDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCollectMethodDoc.cpp new file mode 100644 index 000000000..8b18a338f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CCollectMethodDoc.cpp @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" +#include "Doc/SchemaTypesDoc/CCollectMethodDoc.h" + +using namespace Caf; + +/// Definition of a collection method on a class +CCollectMethodDoc::CCollectMethodDoc() : + _isInitialized(false) {} +CCollectMethodDoc::~CCollectMethodDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CCollectMethodDoc::initialize( + const std::string name, + const std::deque parameterCollection, + const std::deque instanceParameterCollection, + const std::deque returnValCollection, + const std::deque eventValCollection, + const std::deque errorCollection) { + if (! _isInitialized) { + _name = name; + _parameterCollection = parameterCollection; + _instanceParameterCollection = instanceParameterCollection; + _returnValCollection = returnValCollection; + _eventValCollection = eventValCollection; + _errorCollection = errorCollection; + + _isInitialized = true; + } +} + +/// name of the collection method +std::string CCollectMethodDoc::getName() const { + return _name; +} + +/// Definition of a parameter that passes simple types to the collection method +std::deque CCollectMethodDoc::getParameterCollection() const { + return _parameterCollection; +} + +/// Definition of a parameter passing data class instances to the collection method +std::deque CCollectMethodDoc::getInstanceParameterCollection() const { + return _instanceParameterCollection; +} + +/// Accessor for the ReturnVal +std::deque CCollectMethodDoc::getReturnValCollection() const { + return _returnValCollection; +} + +/// Accessor for the EventVal +std::deque CCollectMethodDoc::getEventValCollection() const { + return _eventValCollection; +} + +/// A class that may be returned to indicate an error occurred during the processing of the collection method +std::deque CCollectMethodDoc::getErrorCollection() const { + return _errorCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassDoc.cpp new file mode 100644 index 000000000..a7a803d9d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassDoc.cpp @@ -0,0 +1,101 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h" +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" + +using namespace Caf; + +/// Definition of a data class that may be generated by the provider +CDataClassDoc::CDataClassDoc() : + _unique(false), + _transientVal(false), + _isInitialized(false) {} +CDataClassDoc::~CDataClassDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDataClassDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque propertyCollection, + const std::deque instancePropertyCollection, + const bool unique, + const bool transientVal, + const std::string displayName, + const std::string description) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _propertyCollection = propertyCollection; + _instancePropertyCollection = instancePropertyCollection; + _unique = unique; + _transientVal = transientVal; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CDataClassDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CDataClassDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CDataClassDoc::getVersion() const { + return _version; +} + +/// Accessor for the Property +std::deque CDataClassDoc::getPropertyCollection() const { + return _propertyCollection; +} + +/// Accessor for the InstanceProperty +std::deque CDataClassDoc::getInstancePropertyCollection() const { + return _instancePropertyCollection; +} + +/// Indicates whether the key properties of this class are enough to guarantee uniqueness from other classes of the same type +bool CDataClassDoc::getUnique() const { + return _unique; +} + +/// Accessor for the TransientVal +bool CDataClassDoc::getTransientVal() const { + return _transientVal; +} + +/// A hint as to what this class should be called when displaying it to a human +std::string CDataClassDoc::getDisplayName() const { + return _displayName; +} + +/// A phrase to describe the class for mouse-over text, etc +std::string CDataClassDoc::getDescription() const { + return _description; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.cpp new file mode 100644 index 000000000..cf287c846 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DataClassInstanceCollection +CDataClassInstanceCollectionDoc::CDataClassInstanceCollectionDoc() : + _isInitialized(false) {} +CDataClassInstanceCollectionDoc::~CDataClassInstanceCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDataClassInstanceCollectionDoc::initialize( + const std::deque dataClassInstanceCollection) { + if (! _isInitialized) { + _dataClassInstanceCollection = dataClassInstanceCollection; + + _isInitialized = true; + } +} + +/// Accessor for the DataClassInstance +std::deque CDataClassInstanceCollectionDoc::getDataClassInstanceCollection() const { + return _dataClassInstanceCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassInstanceDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassInstanceDoc.cpp new file mode 100644 index 000000000..3a127c8c3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassInstanceDoc.cpp @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CCmdlUnionDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DataClassInstance +CDataClassInstanceDoc::CDataClassInstanceDoc() : + _isInitialized(false) {} +CDataClassInstanceDoc::~CDataClassInstanceDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDataClassInstanceDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque cmdlMetadataCollection, + const std::deque propertyCollection, + const std::deque instancePropertyCollection, + const SmartPtrCCmdlUnionDoc cmdlUnion) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _cmdlMetadataCollection = cmdlMetadataCollection; + _propertyCollection = propertyCollection; + _instancePropertyCollection = instancePropertyCollection; + _cmdlUnion = cmdlUnion; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CDataClassInstanceDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CDataClassInstanceDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CDataClassInstanceDoc::getVersion() const { + return _version; +} + +/// Accessor for the CmdlMetadata +std::deque CDataClassInstanceDoc::getCmdlMetadataCollection() const { + return _cmdlMetadataCollection; +} + +/// Accessor for the Property +std::deque CDataClassInstanceDoc::getPropertyCollection() const { + return _propertyCollection; +} + +/// Accessor for the InstanceProperty +std::deque CDataClassInstanceDoc::getInstancePropertyCollection() const { + return _instancePropertyCollection; +} + +/// Accessor for the CmdlUnion +SmartPtrCCmdlUnionDoc CDataClassInstanceDoc::getCmdlUnion() const { + return _cmdlUnion; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassPropertyDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassPropertyDoc.cpp new file mode 100644 index 000000000..bb31826b9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassPropertyDoc.cpp @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DataClassProperty +CDataClassPropertyDoc::CDataClassPropertyDoc() : + _isInitialized(false) {} +CDataClassPropertyDoc::~CDataClassPropertyDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDataClassPropertyDoc::initialize( + const std::string name, + const std::deque cmdlMetadata, + const std::string value) { + if (! _isInitialized) { + _name = name; + _cmdlMetadata = cmdlMetadata; + _value = value; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::string CDataClassPropertyDoc::getName() const { + return _name; +} + +/// Accessor for the CmdlMetadata +std::deque CDataClassPropertyDoc::getCmdlMetadata() const { + return _cmdlMetadata; +} + +/// Accessor for the Value +std::string CDataClassPropertyDoc::getValue() const { + return _value; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassSubInstanceDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassSubInstanceDoc.cpp new file mode 100644 index 000000000..b772a6cba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassSubInstanceDoc.cpp @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CCmdlUnionDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" + +using namespace Caf; + +/// A simple container for objects of type DataClassSubInstance +CDataClassSubInstanceDoc::CDataClassSubInstanceDoc() : + _isInitialized(false) {} +CDataClassSubInstanceDoc::~CDataClassSubInstanceDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CDataClassSubInstanceDoc::initialize( + const std::string name, + const std::deque cmdlMetadataCollection, + const std::deque propertyCollection, + const std::deque instancePropertyCollection, + const SmartPtrCCmdlUnionDoc cmdlUnion) { + if (! _isInitialized) { + _name = name; + _cmdlMetadataCollection = cmdlMetadataCollection; + _propertyCollection = propertyCollection; + _instancePropertyCollection = instancePropertyCollection; + _cmdlUnion = cmdlUnion; + + _isInitialized = true; + } +} + +/// Accessor for the Name +std::string CDataClassSubInstanceDoc::getName() const { + return _name; +} + +/// Accessor for the CmdlMetadata +std::deque CDataClassSubInstanceDoc::getCmdlMetadataCollection() const { + return _cmdlMetadataCollection; +} + +/// Accessor for the Property +std::deque CDataClassSubInstanceDoc::getPropertyCollection() const { + return _propertyCollection; +} + +/// Accessor for the InstanceProperty +std::deque CDataClassSubInstanceDoc::getInstancePropertyCollection() const { + return _instancePropertyCollection; +} + +/// Accessor for the CmdlUnion +SmartPtrCCmdlUnionDoc CDataClassSubInstanceDoc::getCmdlUnion() const { + return _cmdlUnion; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceOperationCollectionDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceOperationCollectionDoc.cpp new file mode 100644 index 000000000..ca953e6d7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceOperationCollectionDoc.cpp @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CInstanceOperationDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h" + +using namespace Caf; + +/// A simple container for objects of type InstanceOperationCollection +CInstanceOperationCollectionDoc::CInstanceOperationCollectionDoc() : + _isInitialized(false) {} +CInstanceOperationCollectionDoc::~CInstanceOperationCollectionDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CInstanceOperationCollectionDoc::initialize( + const std::deque instanceOperationCollection) { + if (! _isInitialized) { + _instanceOperationCollection = instanceOperationCollection; + + _isInitialized = true; + } +} + +/// Accessor for the InstanceOperation +std::deque CInstanceOperationCollectionDoc::getInstanceOperationCollection() const { + return _instanceOperationCollection; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceOperationDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceOperationDoc.cpp new file mode 100644 index 000000000..0b7a6802f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceOperationDoc.cpp @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/CInstanceOperationDoc.h" + +using namespace Caf; + +/// A simple container for objects of type InstanceOperation +CInstanceOperationDoc::CInstanceOperationDoc() : + _isInitialized(false) {} +CInstanceOperationDoc::~CInstanceOperationDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CInstanceOperationDoc::initialize( + const std::string operationName, + const std::string moniker) { + if (! _isInitialized) { + _operationName = operationName; + _moniker = moniker; + + _isInitialized = true; + } +} + +/// Accessor for the OperationName +std::string CInstanceOperationDoc::getOperationName() const { + return _operationName; +} + +/// Accessor for the Moniker +std::string CInstanceOperationDoc::getMoniker() const { + return _moniker; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceParameterDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceParameterDoc.cpp new file mode 100644 index 000000000..636431fd1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceParameterDoc.cpp @@ -0,0 +1,91 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" + +using namespace Caf; + +/// A parameter containing a data class instance used by a method to control the outcome +CInstanceParameterDoc::CInstanceParameterDoc() : + _isOptional(false), + _isList(false), + _isInitialized(false) {} +CInstanceParameterDoc::~CInstanceParameterDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CInstanceParameterDoc::initialize( + const std::string name, + const std::string instanceNamespace, + const std::string instanceName, + const std::string instanceVersion, + const bool isOptional, + const bool isList, + const std::string displayName, + const std::string description) { + if (! _isInitialized) { + _name = name; + _instanceNamespace = instanceNamespace; + _instanceName = instanceName; + _instanceVersion = instanceVersion; + _isOptional = isOptional; + _isList = isList; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } +} + +/// Name of parameter +std::string CInstanceParameterDoc::getName() const { + return _name; +} + +/// Namespace of instance object type +std::string CInstanceParameterDoc::getInstanceNamespace() const { + return _instanceNamespace; +} + +/// Name of instance object type +std::string CInstanceParameterDoc::getInstanceName() const { + return _instanceName; +} + +/// Version of instance object type +std::string CInstanceParameterDoc::getInstanceVersion() const { + return _instanceVersion; +} + +/// Indicates this parameter need not be passed +bool CInstanceParameterDoc::getIsOptional() const { + return _isOptional; +} + +/// Indicates whether to expect a list of values as opposed to a single value (the default if this attribute is not present) +bool CInstanceParameterDoc::getIsList() const { + return _isList; +} + +/// Human-readable version of the parameter name +std::string CInstanceParameterDoc::getDisplayName() const { + return _displayName; +} + +/// Short description of what the parameter is for +std::string CInstanceParameterDoc::getDescription() const { + return _description; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CJoinTypeDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CJoinTypeDoc.cpp new file mode 100644 index 000000000..94f9d68e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CJoinTypeDoc.cpp @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +#include "Doc/SchemaTypesDoc/CClassFieldDoc.h" +#include "Doc/SchemaTypesDoc/CJoinTypeDoc.h" + +using namespace Caf; + +/// A simple container for objects of type JoinType +CJoinTypeDoc::CJoinTypeDoc() : + _operand(OPERATOR_NONE), + _isInitialized(false) {} +CJoinTypeDoc::~CJoinTypeDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CJoinTypeDoc::initialize( + const OPERATOR_TYPE operand, + const SmartPtrCClassFieldDoc dataClassLeft, + const SmartPtrCClassFieldDoc dataClassRight, + const std::string description) { + if (! _isInitialized) { + _operand = operand; + _dataClassLeft = dataClassLeft; + _dataClassRight = dataClassRight; + _description = description; + + _isInitialized = true; + } +} + +/// Defines the operand used to join the class fields. Restricted to '=' for now +OPERATOR_TYPE CJoinTypeDoc::getOperand() const { + return _operand; +} + +/// Identifies the fields on classes that uniquely identify relationship +SmartPtrCClassFieldDoc CJoinTypeDoc::getDataClassLeft() const { + return _dataClassLeft; +} + +/// Identifies the fields on classes that uniquely identify relationship +SmartPtrCClassFieldDoc CJoinTypeDoc::getDataClassRight() const { + return _dataClassRight; +} + +/// A short human-readable description of the join +std::string CJoinTypeDoc::getDescription() const { + return _description; +} + +OPERATOR_TYPE _operand; + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CLogicalRelationshipDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CLogicalRelationshipDoc.cpp new file mode 100644 index 000000000..bf2c5c8f7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CLogicalRelationshipDoc.cpp @@ -0,0 +1,94 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" +#include "Doc/SchemaTypesDoc/CJoinTypeDoc.h" +#include "Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h" + +using namespace Caf; + +/// Definition of a relationship between classes that can be described by identifying the fields on the classes that uniquely identify the relationship +CLogicalRelationshipDoc::CLogicalRelationshipDoc() : + _arity(ARITY_NONE), + _isInitialized(false) {} +CLogicalRelationshipDoc::~CLogicalRelationshipDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CLogicalRelationshipDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const ARITY_TYPE arity, + const SmartPtrCClassCardinalityDoc dataClassLeft, + const SmartPtrCClassCardinalityDoc dataClassRight, + const std::deque joinCollection, + const std::string description) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _arity = arity; + _dataClassLeft = dataClassLeft; + _dataClassRight = dataClassRight; + _joinCollection = joinCollection; + _description = description; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CLogicalRelationshipDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CLogicalRelationshipDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CLogicalRelationshipDoc::getVersion() const { + return _version; +} + +/// Accessor for the Arity +ARITY_TYPE CLogicalRelationshipDoc::getArity() const { + return _arity; +} + +/// Accessor for the DataClassLeft +SmartPtrCClassCardinalityDoc CLogicalRelationshipDoc::getDataClassLeft() const { + return _dataClassLeft; +} + +/// Accessor for the DataClassRight +SmartPtrCClassCardinalityDoc CLogicalRelationshipDoc::getDataClassRight() const { + return _dataClassRight; +} + +/// Defines a join condition of the relationship +std::deque CLogicalRelationshipDoc::getJoinCollection() const { + return _joinCollection; +} + +/// Accessor for the Description +std::string CLogicalRelationshipDoc::getDescription() const { + return _description; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CMethodDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CMethodDoc.cpp new file mode 100644 index 000000000..cda0122b7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CMethodDoc.cpp @@ -0,0 +1,94 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" + +using namespace Caf; + +/// Definition of a method on a class +CMethodDoc::CMethodDoc() : + _isInitialized(false) {} +CMethodDoc::~CMethodDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMethodDoc::initialize( + const std::string name, + const std::deque parameterCollection, + const std::deque instanceParameterCollection, + const std::deque returnValCollection, + const std::deque eventValCollection, + const std::deque errorCollection, + const std::string displayName, + const std::string description) { + if (! _isInitialized) { + _name = name; + _parameterCollection = parameterCollection; + _instanceParameterCollection = instanceParameterCollection; + _returnValCollection = returnValCollection; + _eventValCollection = eventValCollection; + _errorCollection = errorCollection; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } +} + +/// name of the method +std::string CMethodDoc::getName() const { + return _name; +} + +/// Definition of a parameter that passes simple types to the method +std::deque CMethodDoc::getParameterCollection() const { + return _parameterCollection; +} + +/// Definition of a parameter that passes data class instances to the method +std::deque CMethodDoc::getInstanceParameterCollection() const { + return _instanceParameterCollection; +} + +/// Accessor for the ReturnVal +std::deque CMethodDoc::getReturnValCollection() const { + return _returnValCollection; +} + +/// Accessor for the EventVal +std::deque CMethodDoc::getEventValCollection() const { + return _eventValCollection; +} + +/// A class that may be returned to indicate an error occurred during the processing of the collection method +std::deque CMethodDoc::getErrorCollection() const { + return _errorCollection; +} + +/// Human-readable version of the method name +std::string CMethodDoc::getDisplayName() const { + return _displayName; +} + +/// A short phrase describing the purpose of the method +std::string CMethodDoc::getDescription() const { + return _description; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CMethodParameterDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CMethodParameterDoc.cpp new file mode 100644 index 000000000..3d71d7d7f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CMethodParameterDoc.cpp @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" + +using namespace Caf; + +/// A parameter containing a simple type used by a method to control the outcome +CMethodParameterDoc::CMethodParameterDoc() : + _type(PARAMETER_NONE), + _isOptional(false), + _isList(false), + _isInitialized(false) {} +CMethodParameterDoc::~CMethodParameterDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CMethodParameterDoc::initialize( + const std::string name, + const PARAMETER_TYPE type, + const bool isOptional, + const bool isList, + const std::string defaultVal, + const std::string displayName, + const std::string description) { + if (! _isInitialized) { + _name = name; + _type = type; + _isOptional = isOptional; + _isList = isList; + _defaultVal = defaultVal; + _displayName = displayName; + _description = description; + + _isInitialized = true; + } +} + +/// Name of parameter +std::string CMethodParameterDoc::getName() const { + return _name; +} + +/// Describes the data type of the property +PARAMETER_TYPE CMethodParameterDoc::getType() const { + return _type; +} + +/// Indicates this parameter need not be passed +bool CMethodParameterDoc::getIsOptional() const { + return _isOptional; +} + +/// Indicates whether to expect a list of values as opposed to a single value (the default if this attribute is not present) +bool CMethodParameterDoc::getIsList() const { + return _isList; +} + +/// Accessor for the DefaultVal +std::string CMethodParameterDoc::getDefaultVal() const { + return _defaultVal; +} + +/// Human-readable version of the parameter name +std::string CMethodParameterDoc::getDisplayName() const { + return _displayName; +} + +/// Short description of what the parameter is for +std::string CMethodParameterDoc::getDescription() const { + return _description; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CPhysicalRelationshipDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CPhysicalRelationshipDoc.cpp new file mode 100644 index 000000000..9ad570ea2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CPhysicalRelationshipDoc.cpp @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" +#include "Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h" + +using namespace Caf; + +/// Describes a relationship between dataclass where the key information from data class instances comprising the relationship are listed in an instance of this class +CPhysicalRelationshipDoc::CPhysicalRelationshipDoc() : + _arity(ARITY_NONE), + _isInitialized(false) {} +CPhysicalRelationshipDoc::~CPhysicalRelationshipDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CPhysicalRelationshipDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const ARITY_TYPE arity, + const SmartPtrCClassCardinalityDoc dataClassLeft, + const SmartPtrCClassCardinalityDoc dataClassRight, + const std::string description) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _arity = arity; + _dataClassLeft = dataClassLeft; + _dataClassRight = dataClassRight; + _description = description; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CPhysicalRelationshipDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CPhysicalRelationshipDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CPhysicalRelationshipDoc::getVersion() const { + return _version; +} + +/// Accessor for the Arity +ARITY_TYPE CPhysicalRelationshipDoc::getArity() const { + return _arity; +} + +/// Accessor for the DataClassLeft +SmartPtrCClassCardinalityDoc CPhysicalRelationshipDoc::getDataClassLeft() const { + return _dataClassLeft; +} + +/// Accessor for the DataClassRight +SmartPtrCClassCardinalityDoc CPhysicalRelationshipDoc::getDataClassRight() const { + return _dataClassRight; +} + +/// Accessor for the Description +std::string CPhysicalRelationshipDoc::getDescription() const { + return _description; +} + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CRelationshipDoc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CRelationshipDoc.cpp new file mode 100644 index 000000000..882672b82 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/CRelationshipDoc.cpp @@ -0,0 +1,87 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * + */ + +#include "stdafx.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" +#include "Doc/SchemaTypesDoc/CRelationshipDoc.h" + +using namespace Caf; + +/// Definition of a relationship between data classes +CRelationshipDoc::CRelationshipDoc() : + _arity(ARITY_NONE), + _isInitialized(false) {} +CRelationshipDoc::~CRelationshipDoc() {} + +/// Initializes the object with everything required by this +/// container. Once initialized, this object cannot +/// be changed (i.e. it is immutable). +void CRelationshipDoc::initialize( + const std::string namespaceVal, + const std::string name, + const std::string version, + const ARITY_TYPE arity, + const SmartPtrCClassCardinalityDoc dataClassLeft, + const SmartPtrCClassCardinalityDoc dataClassRight, + const std::string description) { + if (! _isInitialized) { + _namespaceVal = namespaceVal; + _name = name; + _version = version; + _arity = arity; + _dataClassLeft = dataClassLeft; + _dataClassRight = dataClassRight; + _description = description; + + _isInitialized = true; + } +} + +/// Accessor for the NamespaceVal +std::string CRelationshipDoc::getNamespaceVal() const { + return _namespaceVal; +} + +/// Accessor for the Name +std::string CRelationshipDoc::getName() const { + return _name; +} + +/// Accessor for the Version +std::string CRelationshipDoc::getVersion() const { + return _version; +} + +/// Number of parts (sides) to relationship. Restricted to a two-sided relationship for now +ARITY_TYPE CRelationshipDoc::getArity() const { + return _arity; +} + +/// Identifies the two classes that make up the relationship +SmartPtrCClassCardinalityDoc CRelationshipDoc::getDataClassLeft() const { + return _dataClassLeft; +} + +/// Identifies the two classes that make up the relationship +SmartPtrCClassCardinalityDoc CRelationshipDoc::getDataClassRight() const { + return _dataClassRight; +} + +/// A short human-readable description of the relationship +std::string CRelationshipDoc::getDescription() const { + return _description; +} + + + + + + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/stdafx.h new file mode 100644 index 000000000..f4bed1fb6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocDoc/SchemaTypesDoc/stdafx.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: February 25, 2016 + * + * Copyright (C) 2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define SCHEMATYPESDOC_LINKAGE __declspec(dllexport) +#else + #define SCHEMATYPESDOC_LINKAGE +#endif + +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.cpp new file mode 100644 index 000000000..68d3458b7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.cpp @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Exception/CCafException.h" +#include "AttachmentUtils.h" + +using namespace Caf; + +SmartPtrCAttachmentDoc AttachmentUtils::findOptionalAttachment( + const std::string& attachmentName, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("AttachmentUtils", "findOptionalAttachment"); + + SmartPtrCAttachmentDoc attachmentRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(attachmentName); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + + const std::deque attachmentCollectionInner = + attachmentCollection->getAttachment(); + for (TConstIterator > attachmentIter(attachmentCollectionInner); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachmentTmp = *attachmentIter; + const std::string attachmentNameTmp = attachmentTmp->getName(); + if (attachmentNameTmp.compare(attachmentName) == 0) { + attachmentRc = attachmentTmp; + } + } + } + CAF_CM_EXIT; + + return attachmentRc; +} + +SmartPtrCAttachmentDoc AttachmentUtils::findRequiredAttachment( + const std::string& attachmentName, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG("AttachmentUtils", "findRequiredAttachment"); + + SmartPtrCAttachmentDoc attachmentRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(attachmentName); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + + attachmentRc = findOptionalAttachment(attachmentName, attachmentCollection); + if (attachmentRc.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Required attachment not found - %s", attachmentName.c_str()); + } + } + CAF_CM_EXIT; + + return attachmentRc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.h new file mode 100644 index 000000000..67804858a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/AttachmentUtils.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef AttachmentUtils_h_ +#define AttachmentUtils_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" + +namespace Caf { +class DOCUTILS_LINKAGE AttachmentUtils { +public: + static SmartPtrCAttachmentDoc findOptionalAttachment( + const std::string& attachmentName, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection); + + static SmartPtrCAttachmentDoc findRequiredAttachment( + const std::string& attachmentName, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection); + +private: + CAF_CM_DECLARE_NOCREATE(AttachmentUtils); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.cpp new file mode 100644 index 000000000..f33698165 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.cpp @@ -0,0 +1,218 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" +#include "Integration/IDocument.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "DefnObjectConverter.h" + +using namespace Caf; + +std::string DefnObjectConverter::toString( + const SmartPtrCDataClassInstanceDoc dataClassInstance) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "toString"); + + std::string defnObjXmlStr; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassInstance); + + const SmartPtrCXmlElement defnObjXml = CXmlUtils::createRootElement( + dataClassInstance->getName(), "http://schemas->vmware->com/caf/schema"); + + defnObjXml->addAttribute("namespace", dataClassInstance->getNamespaceVal()); + defnObjXml->addAttribute("name", dataClassInstance->getName()); + defnObjXml->addAttribute("version", dataClassInstance->getVersion()); + + SmartPtrCDataClassSubInstanceDoc dataClassSubInstance; + dataClassSubInstance.CreateInstance(); + dataClassSubInstance->initialize( + dataClassInstance->getName(), + dataClassInstance->getCmdlMetadataCollection(), + dataClassInstance->getPropertyCollection(), + dataClassInstance->getInstancePropertyCollection(), + dataClassInstance->getCmdlUnion()); + + addDataClassSubInstance(dataClassSubInstance, defnObjXml); + + defnObjXmlStr = defnObjXml->saveToStringRaw(); + } + CAF_CM_EXIT; + + return defnObjXmlStr; +} + +SmartPtrCDataClassInstanceDoc DefnObjectConverter::fromString( + const std::string defnObjectXmlStr) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "fromString"); + + SmartPtrCDataClassInstanceDoc dataClassInstanceRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(defnObjectXmlStr); + + const SmartPtrCXmlElement defnObjectXml = CXmlUtils::parseString(defnObjectXmlStr, std::string()); + + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstance = parseDataClassSubInstance(defnObjectXml, true); + + dataClassInstanceRc.CreateInstance(); + dataClassInstanceRc->initialize( + defnObjectXml->findRequiredAttribute("namespace"), + defnObjectXml->findRequiredAttribute("name"), + defnObjectXml->findRequiredAttribute("version"), + dataClassSubInstance->getCmdlMetadataCollection(), + dataClassSubInstance->getPropertyCollection(), + dataClassSubInstance->getInstancePropertyCollection(), + dataClassSubInstance->getCmdlUnion()); + } + CAF_CM_EXIT; + + return dataClassInstanceRc; +} + +void DefnObjectConverter::addDataClassSubInstance( + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstance, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "addDataClassSubInstance"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassSubInstance); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque cmdlMetadataCollection = dataClassSubInstance->getCmdlMetadataCollection(); + if (! cmdlMetadataCollection.empty()) { + addCmdlMetadata(cmdlMetadataCollection, thisXml); + } + + const std::deque dataClassPropertyCollection = dataClassSubInstance->getPropertyCollection(); + if (! dataClassPropertyCollection.empty()) { + for (TSmartConstIterator > dataClassPropertyIter(dataClassPropertyCollection); + dataClassPropertyIter; dataClassPropertyIter++) { + const SmartPtrCDataClassPropertyDoc dataClassProperty = *dataClassPropertyIter; + const SmartPtrCXmlElement propertyXml = thisXml->createAndAddElement(dataClassProperty->getName()); + + const std::deque cmdlMetadataCollectionProperty = dataClassProperty->getCmdlMetadata(); + if (! cmdlMetadataCollectionProperty.empty()) { + addCmdlMetadata(cmdlMetadataCollectionProperty, propertyXml); + } + propertyXml->setValue(dataClassProperty->getValue()); + } + } + + const std::deque instancePropertyCollection = dataClassSubInstance->getInstancePropertyCollection(); + if (! instancePropertyCollection.empty()) { + for (TSmartConstIterator > dataClassSubInstanceIter(instancePropertyCollection); + dataClassSubInstanceIter; dataClassSubInstanceIter++) { + const SmartPtrCDataClassSubInstanceDoc instanceProperty = *dataClassSubInstanceIter; + const SmartPtrCXmlElement instancePropertyXml = thisXml->createAndAddElement(instanceProperty->getName()); + addDataClassSubInstance(instanceProperty, instancePropertyXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassSubInstanceDoc DefnObjectConverter::parseDataClassSubInstance( + const SmartPtrCXmlElement dataClassSubInstanceXml, + const bool isDataClassInstance) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "parseDataClassSubInstance"); + + SmartPtrCDataClassSubInstanceDoc dataClassSubInstanceRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassSubInstanceXml); + + std::deque cmdlMetadataCollection; + if (! isDataClassInstance) { + cmdlMetadataCollection = parseCmdlMetadata(dataClassSubInstanceXml); + } + + std::deque dataClassPropertyCollection; + std::deque instancePropertyCollection; + const CXmlElement::SmartPtrCElementCollection childrenXml = dataClassSubInstanceXml->getAllChildren(); + if (! childrenXml.IsNull() && ! childrenXml->empty()) { + for (TConstIterator childrenXmlIter(*childrenXml); + childrenXmlIter; childrenXmlIter++) { + const SmartPtrCXmlElement childXml = childrenXmlIter->second; + + const CXmlElement::SmartPtrCElementCollection grandChildrenXml = childXml->getAllChildren(); + if (! grandChildrenXml.IsNull() && ! grandChildrenXml->empty()) { + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstance = parseDataClassSubInstance(childXml, false); + instancePropertyCollection.push_back(dataClassSubInstance); + } else { + const std::deque cmdlMetadataCollectionProperty = parseCmdlMetadata(childXml); + SmartPtrCDataClassPropertyDoc dataClassProperty; + dataClassProperty.CreateInstance(); + dataClassProperty->initialize( + childXml->getName(), cmdlMetadataCollectionProperty, childXml->getValue()); + dataClassPropertyCollection.push_back(dataClassProperty); + } + } + } + + dataClassSubInstanceRc.CreateInstance(); + dataClassSubInstanceRc->initialize( + dataClassSubInstanceXml->getName(), + cmdlMetadataCollection, dataClassPropertyCollection, instancePropertyCollection, SmartPtrCCmdlUnionDoc()); + } + CAF_CM_EXIT; + + return dataClassSubInstanceRc; +} + +std::deque DefnObjectConverter::parseCmdlMetadata( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "parseCmdlMetadata"); + + std::deque cmdlMetadataCollection; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCAttributeCollection attributeCollection = thisXml->getAllAttributes(); + if (! attributeCollection.IsNull() && ! attributeCollection->empty()) { + for (TConstIterator childrenXmlIter(*attributeCollection); + childrenXmlIter; childrenXmlIter++) { + const std::string attributeName = childrenXmlIter->first; + const std::string attributeValue = childrenXmlIter->second; + + SmartPtrCCmdlMetadataDoc cmdlMetadata; + cmdlMetadata.CreateInstance(); + cmdlMetadata->initialize(attributeName, attributeValue); + + cmdlMetadataCollection.push_back(cmdlMetadata); + } + } + } + CAF_CM_EXIT; + + return cmdlMetadataCollection; +} + +void DefnObjectConverter::addCmdlMetadata( + const std::deque cmdlMetadataCollection, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DefnObjectConverter", "addCmdlMetadata"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STL(cmdlMetadataCollection); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + for (TSmartConstIterator > cmdlMetadataIter(cmdlMetadataCollection); + cmdlMetadataIter; cmdlMetadataIter++) { + const SmartPtrCCmdlMetadataDoc cmdlMetadata = *cmdlMetadataIter; + thisXml->addAttribute(cmdlMetadata->getName(), cmdlMetadata->getValue()); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.h new file mode 100644 index 000000000..b1971bcba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DefnObjectConverter.h @@ -0,0 +1,49 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef DefnObjectConverter_h_ +#define DefnObjectConverter_h_ + + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { +class DOCUTILS_LINKAGE DefnObjectConverter { +public: + static std::string toString( + const SmartPtrCDataClassInstanceDoc dataClassInstance); + + static SmartPtrCDataClassInstanceDoc fromString( + const std::string defnObjectXmlStr); + +private: + static void addDataClassSubInstance( + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstance, + const SmartPtrCXmlElement thisXml); + + static SmartPtrCDataClassSubInstanceDoc parseDataClassSubInstance( + const SmartPtrCXmlElement dataClassInstanceXml, + const bool isDataClassInstance); + + static std::deque parseCmdlMetadata( + const SmartPtrCXmlElement thisXml); + + static void addCmdlMetadata( + const std::deque cmdlMetadataCollection, + const SmartPtrCXmlElement thisXml); + +private: + CAF_CM_DECLARE_NOCREATE(DefnObjectConverter); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsInc.h new file mode 100644 index 000000000..aaebd8235 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsInc.h @@ -0,0 +1,21 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DocUtils_Inc_h_ +#define DocUtils_Inc_h_ + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "DefnObjectConverter.h" +#include "ParameterUtils.h" +#include "AttachmentUtils.h" +#include "DocXmlUtils.h" + +#endif /* DocUtils_Inc_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsLink.h new file mode 100644 index 000000000..f0617e033 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocUtilsLink.h @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef DocUtils_Link_h_ +#define DocUtils_Link_h_ + +#ifndef DOCUTILS_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define DOCUTILS_LINKAGE __declspec(dllexport) + #else + #define DOCUTILS_LINKAGE __declspec(dllimport) + #endif + #else + #define DOCUTILS_LINKAGE + #endif +#endif + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "DefnObjectConverter.h" +#include "ParameterUtils.h" +#include "AttachmentUtils.h" +#include "DocXmlUtils.h" + +#endif /* DocUtils_Link_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.cpp new file mode 100644 index 000000000..5f9546701 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.cpp @@ -0,0 +1,50 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" +#include "DocXmlUtils.h" + +using namespace Caf; + +std::string DocXmlUtils::getSchemaNamespace( + const std::string& relSchemaNamespace) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DocXmlUtils", "getSchemaNamespace"); + + std::string schemaNamespace; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(relSchemaNamespace); + + const std::string schemaNamespaceRoot = + AppConfigUtils::getRequiredString("schema_namespace_root"); + const std::string pathDelim = "/"; + schemaNamespace = schemaNamespaceRoot + pathDelim + relSchemaNamespace; + } + CAF_CM_EXIT; + + return schemaNamespace; +} + +std::string DocXmlUtils::getSchemaLocation( + const std::string& relSchemaLocation) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("DocXmlUtils", "getSchemaLocation"); + + std::string schemaLocation; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(relSchemaLocation); + + const std::string schemaLocationRoot = + AppConfigUtils::getRequiredString("schema_location_root"); + const std::string pathDelim = "/"; + schemaLocation = schemaLocationRoot + pathDelim + relSchemaLocation; + } + CAF_CM_EXIT; + + return schemaLocation; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.h new file mode 100644 index 000000000..2bc37d2be --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/DocXmlUtils.h @@ -0,0 +1,23 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef DocXmlUtils_h_ +#define DocXmlUtils_h_ + +namespace Caf { + + namespace DocXmlUtils { + std::string DOCUTILS_LINKAGE getSchemaNamespace( + const std::string& relSchemaNamespace); + + std::string DOCUTILS_LINKAGE getSchemaLocation( + const std::string& relSchemaLocation); + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/EnumConvertersXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/EnumConvertersXml.cpp new file mode 100644 index 000000000..ec89ec9d7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/EnumConvertersXml.cpp @@ -0,0 +1,588 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +std::string EnumConvertersXml::convertParameterTypeToString( + const PARAMETER_TYPE parameterType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertParameterTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(parameterType) { + case PARAMETER_NONE: + CAF_CM_LOG_DEBUG_VA0("Parameter not set"); + break; + case PARAMETER_STRING: + rc = "String"; + break; + case PARAMETER_SINT32: + rc = "SInt32"; + break; + case PARAMETER_UINT32: + rc = "UInt32"; + break; + case PARAMETER_SINT64: + rc = "SInt64"; + break; + case PARAMETER_UINT64: + rc = "UInt64"; + break; + case PARAMETER_DECIMAL: + rc = "Decimal"; + break; + case PARAMETER_DOUBLE: + rc = "Double"; + break; + case PARAMETER_BOOLEAN: + rc = "Boolean"; + break; + case PARAMETER_DATETIME: + rc = "DateTime"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown parameter type - %d", static_cast(parameterType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +PARAMETER_TYPE EnumConvertersXml::convertStringToParameterType( + const std::string parameterType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToParameterType"); + + PARAMETER_TYPE rc = PARAMETER_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterType); + + if (parameterType.compare("String") == 0) { + rc = PARAMETER_STRING; + } else if (parameterType.compare("SInt32") == 0) { + rc = PARAMETER_SINT32; + } else if (parameterType.compare("UInt32") == 0) { + rc = PARAMETER_UINT32; + } else if (parameterType.compare("SInt64") == 0) { + rc = PARAMETER_SINT64; + } else if (parameterType.compare("UInt64") == 0) { + rc = PARAMETER_UINT64; + } else if (parameterType.compare("Decimal") == 0) { + rc = PARAMETER_DECIMAL; + } else if (parameterType.compare("Double") == 0) { + rc = PARAMETER_DOUBLE; + } else if (parameterType.compare("Boolean") == 0) { + rc = PARAMETER_BOOLEAN; + } else if (parameterType.compare("DateTime") == 0) { + rc = PARAMETER_DATETIME; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown parameter type - %s", parameterType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertPropertyTypeToString( + const PROPERTY_TYPE propertyType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertPropertyTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(propertyType) { + case PROPERTY_NONE: + CAF_CM_LOG_DEBUG_VA0("Property not set"); + break; + case PROPERTY_STRING: + rc = "String"; + break; + case PROPERTY_SINT32: + rc = "SInt32"; + break; + case PROPERTY_UINT32: + rc = "UInt32"; + break; + case PROPERTY_SINT64: + rc = "SInt64"; + break; + case PROPERTY_UINT64: + rc = "UInt64"; + break; + case PROPERTY_DECIMAL: + rc = "Decimal"; + break; + case PROPERTY_DOUBLE: + rc = "Double"; + break; + case PROPERTY_BOOLEAN: + rc = "Boolean"; + break; + case PROPERTY_DATETIME: + rc = "DateTime"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown property type - %d", static_cast(propertyType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +PROPERTY_TYPE EnumConvertersXml::convertStringToPropertyType( + const std::string propertyType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToPropertyType"); + + PROPERTY_TYPE rc = PROPERTY_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(propertyType); + + if (propertyType.compare("String") == 0) { + rc = PROPERTY_STRING; + } else if (propertyType.compare("SInt32") == 0) { + rc = PROPERTY_SINT32; + } else if (propertyType.compare("UInt32") == 0) { + rc = PROPERTY_UINT32; + } else if (propertyType.compare("SInt64") == 0) { + rc = PROPERTY_SINT64; + } else if (propertyType.compare("UInt64") == 0) { + rc = PROPERTY_UINT64; + } else if (propertyType.compare("Decimal") == 0) { + rc = PROPERTY_DECIMAL; + } else if (propertyType.compare("Double") == 0) { + rc = PROPERTY_DOUBLE; + } else if (propertyType.compare("Boolean") == 0) { + rc = PROPERTY_BOOLEAN; + } else if (propertyType.compare("DateTime") == 0) { + rc = PROPERTY_DATETIME; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown property type - %s", propertyType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertValidatorTypeToString( + const VALIDATOR_TYPE validatorType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertValidatorTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(validatorType) { + case VALIDATOR_NONE: + break; + case VALIDATOR_ENUM: + rc = "enum"; + break; + case VALIDATOR_RANGE: + rc = "range"; + break; + case VALIDATOR_REGEX: + rc = "regex"; + break; + case VALIDATOR_CUSTOM: + rc = "custom"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown validator type - %d", static_cast(validatorType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +VALIDATOR_TYPE EnumConvertersXml::convertStringToValidatorType( + const std::string validatorType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToValidatorType"); + + VALIDATOR_TYPE rc = VALIDATOR_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(validatorType); + + if (validatorType.compare("enum") == 0) { + rc = VALIDATOR_ENUM; + } else if (validatorType.compare("range") == 0) { + rc = VALIDATOR_RANGE; + } else if (validatorType.compare("regex") == 0) { + rc = VALIDATOR_REGEX; + } else if (validatorType.compare("custom") == 0) { + rc = VALIDATOR_CUSTOM; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown validator type - %s", validatorType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertOperatorTypeToString( + const OPERATOR_TYPE operatorType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertOperatorTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(operatorType) { + case OPERATOR_NONE: + CAF_CM_LOG_DEBUG_VA0("Operator not set"); + break; + case OPERATOR_EQUAL: + rc = "="; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown operator type - %d", static_cast(operatorType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +OPERATOR_TYPE EnumConvertersXml::convertStringToOperatorType( + const std::string operatorType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToOperatorType"); + + OPERATOR_TYPE rc = OPERATOR_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(operatorType); + + if (operatorType.compare("=") == 0) { + rc = OPERATOR_EQUAL; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown operator type - %s", operatorType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertArityTypeToString( + const ARITY_TYPE arityType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertArityTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(arityType) { + case ARITY_NONE: + CAF_CM_LOG_DEBUG_VA0("Arity not set"); + break; + case ARITY_UNSIGNED_BYTE: + rc = "2"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown arity type - %d", static_cast(arityType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +ARITY_TYPE EnumConvertersXml::convertStringToArityType( + const std::string arityType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToArityType"); + + ARITY_TYPE rc = ARITY_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(arityType); + + if (arityType.compare("2") == 0) { + rc = ARITY_UNSIGNED_BYTE; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown arity type - %s", arityType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertPackageOSTypeToString( + const PACKAGE_OS_TYPE packageOSType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertPackageOSTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(packageOSType) { + case PACKAGE_OS_NONE: + CAF_CM_LOG_DEBUG_VA0("Package OS not set"); + break; + case PACKAGE_OS_ALL: + rc = "All"; + break; + case PACKAGE_OS_NIX: + rc = "Nix"; + break; + case PACKAGE_OS_WIN: + rc = "Win"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown Package OS type - %d", static_cast(packageOSType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +PACKAGE_OS_TYPE EnumConvertersXml::convertStringToPackageOSType( + const std::string packageOSType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToPackageOSType"); + + PACKAGE_OS_TYPE rc = PACKAGE_OS_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(packageOSType); + + if (packageOSType.compare("All") == 0) { + rc = PACKAGE_OS_ALL; + } else if (packageOSType.compare("Nix") == 0) { + rc = PACKAGE_OS_NIX; + } else if (packageOSType.compare("Win") == 0) { + rc = PACKAGE_OS_WIN; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown Package OS type - %s", packageOSType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertLoggingLevelTypeToString( + const LOGGINGLEVEL_TYPE loggingLevelType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertLoggingLevelTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(loggingLevelType) { + case LOGGINGLEVEL_NONE: + CAF_CM_LOG_DEBUG_VA0("Logging level not set"); + break; + case LOGGINGLEVEL_DEBUG: + rc = "DEBUG"; + break; + case LOGGINGLEVEL_INFO: + rc = "INFO"; + break; + case LOGGINGLEVEL_WARN: + rc = "WARN"; + break; + case LOGGINGLEVEL_ERROR: + rc = "ERROR"; + break; + case LOGGINGLEVEL_CRITICAL: + rc = "CRITICAL"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown logging level type - %d", static_cast(loggingLevelType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +LOGGINGLEVEL_TYPE EnumConvertersXml::convertStringToLoggingLevelType( + const std::string loggingLevelType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToLoggingLevelType"); + + LOGGINGLEVEL_TYPE rc = LOGGINGLEVEL_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(loggingLevelType); + + if (loggingLevelType.compare("DEBUG") == 0) { + rc = LOGGINGLEVEL_DEBUG; + } else if (loggingLevelType.compare("INFO") == 0) { + rc = LOGGINGLEVEL_INFO; + } else if (loggingLevelType.compare("WARN") == 0) { + rc = LOGGINGLEVEL_WARN; + } else if (loggingLevelType.compare("ERROR") == 0) { + rc = LOGGINGLEVEL_ERROR; + } else if (loggingLevelType.compare("CRITICAL") == 0) { + rc = LOGGINGLEVEL_CRITICAL; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown logging level type - %s", loggingLevelType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertLoggingComponentTypeToString( + const LOGGINGCOMPONENT_TYPE loggingComponentType) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertLoggingComponentTypeToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(loggingComponentType) { + case LOGGINGCOMPONENT_NONE: + CAF_CM_LOG_DEBUG_VA0("Logging component not set"); + break; + case LOGGINGCOMPONENT_COMMUNICATIONS: + rc = "Communications"; + break; + case LOGGINGCOMPONENT_MANAGEMENTAGENT: + rc = "ManagementAgent"; + break; + case LOGGINGCOMPONENT_PROVIDERFRAMEWORK: + rc = "ProviderFramework"; + break; + case LOGGINGCOMPONENT_PROVIDER: + rc = "Provider"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown logging component type - %d", static_cast(loggingComponentType)); + } + } + CAF_CM_EXIT; + + return rc; +} + +LOGGINGCOMPONENT_TYPE EnumConvertersXml::convertStringToLoggingComponentType( + const std::string loggingComponentType) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToLoggingComponentType"); + + LOGGINGCOMPONENT_TYPE rc = LOGGINGCOMPONENT_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(loggingComponentType); + + if (loggingComponentType.compare("Communications") == 0) { + rc = LOGGINGCOMPONENT_COMMUNICATIONS; + } else if (loggingComponentType.compare("ManagementAgent") == 0) { + rc = LOGGINGCOMPONENT_MANAGEMENTAGENT; + } else if (loggingComponentType.compare("ProviderFramework") == 0) { + rc = LOGGINGCOMPONENT_PROVIDERFRAMEWORK; + } else if (loggingComponentType.compare("Provider") == 0) { + rc = LOGGINGCOMPONENT_PROVIDER; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown logging component type - %s", loggingComponentType.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string EnumConvertersXml::convertCmsPolicyToString( + const CMS_POLICY cmsPolicy) { + CAF_CM_STATIC_FUNC_LOG("EnumConvertersXml", "convertCmsPolicyToString"); + + std::string rc; + + CAF_CM_ENTER { + switch(cmsPolicy) { + case CMS_POLICY_NONE: + rc = "None"; + break; + case CMS_POLICY_CAF_ENCRYPTED: + rc = "CAF_Encrypted"; + break; + case CMS_POLICY_CAF_SIGNED: + rc = "CAF_Signed"; + break; + case CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED: + rc = "CAF_Encrypted_And_Signed"; + break; + case CMS_POLICY_APP_ENCRYPTED: + rc = "App_Encrypted"; + break; + case CMS_POLICY_APP_SIGNED: + rc = "App_Signed"; + break; + case CMS_POLICY_APP_ENCRYPTED_AND_SIGNED: + rc = "App_Encrypted_And_Signed"; + break; + default: + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown CMS Policy - %d", static_cast(cmsPolicy)); + } + } + CAF_CM_EXIT; + + return rc; +} + +CMS_POLICY EnumConvertersXml::convertStringToCmsPolicy( + const std::string cmsPolicy) { + CAF_CM_STATIC_FUNC("EnumConvertersXml", "convertStringToCmsPolicy"); + + CMS_POLICY rc = CMS_POLICY_NONE; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(cmsPolicy); + + if (cmsPolicy.compare("None") == 0) { + rc = CMS_POLICY_NONE; + } else if (cmsPolicy.compare("CAF_Encrypted") == 0) { + rc = CMS_POLICY_CAF_ENCRYPTED; + } else if (cmsPolicy.compare("CAF_Signed") == 0) { + rc = CMS_POLICY_CAF_SIGNED; + } else if (cmsPolicy.compare("CAF_Encrypted_And_Signed") == 0) { + rc = CMS_POLICY_CAF_ENCRYPTED_AND_SIGNED; + } else if (cmsPolicy.compare("App_Encrypted") == 0) { + rc = CMS_POLICY_APP_ENCRYPTED; + } else if (cmsPolicy.compare("App_Signed") == 0) { + rc = CMS_POLICY_APP_SIGNED; + } else if (cmsPolicy.compare("App_Encrypted_And_Signed") == 0) { + rc = CMS_POLICY_APP_ENCRYPTED_AND_SIGNED; + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unknown CMS Policy - %s", cmsPolicy.c_str()); + } + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.cpp new file mode 100644 index 000000000..38def7ba0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.cpp @@ -0,0 +1,336 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestParameterDoc.h" +#include "Exception/CCafException.h" +#include "ParameterUtils.h" + +using namespace Caf; + +SmartPtrCRequestParameterDoc ParameterUtils::findOptionalParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalParameter"); + + SmartPtrCRequestParameterDoc parameterRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterCollectionInner = + parameterCollection->getParameter(); + for (TConstIterator > parameterIter(parameterCollectionInner); + parameterIter; parameterIter++) { + const SmartPtrCRequestParameterDoc parameterTmp = *parameterIter; + const std::string parameterNameTmp = parameterTmp->getName(); + if (parameterNameTmp.compare(parameterName) == 0) { + parameterRc = parameterTmp; + } + } + } + CAF_CM_EXIT; + + return parameterRc; +} + +SmartPtrCRequestParameterDoc ParameterUtils::findRequiredParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG("ParameterUtils", "findRequiredParameter"); + + SmartPtrCRequestParameterDoc parameterRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + parameterRc = findOptionalParameter(parameterName, parameterCollection); + if (parameterRc.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Required parameter not found - %s", parameterName.c_str()); + } + } + CAF_CM_EXIT; + + return parameterRc; +} + +std::deque ParameterUtils::findOptionalParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalParameterAsStringCollection"); + + std::deque parameterValueCollectionRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const SmartPtrCRequestParameterDoc parameter = findOptionalParameter(parameterName, parameterCollection); + if (! parameter.IsNull()) { + parameterValueCollectionRc = parameter->getValue(); + } + } + CAF_CM_EXIT; + + return parameterValueCollectionRc; +} + +std::deque ParameterUtils::findRequiredParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findRequiredParameterAsStringCollection"); + + std::deque parameterValueCollectionRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const SmartPtrCRequestParameterDoc parameter = findRequiredParameter(parameterName, parameterCollection); + parameterValueCollectionRc = parameter->getValue(); + } + CAF_CM_EXIT; + + return parameterValueCollectionRc; +} + +std::string ParameterUtils::findOptionalParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalParameterAsString"); + + std::string parameterValueRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterValueCollection = + findOptionalParameterAsStringCollection(parameterName, parameterCollection); + if (parameterValueCollection.size() == 1) { + parameterValueRc = parameterValueCollection.front(); + } + } + CAF_CM_EXIT; + + return parameterValueRc; +} + +std::string ParameterUtils::findRequiredParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG("ParameterUtils", "findRequiredParameterAsString"); + + std::string parameterValueRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterValueCollection = + findOptionalParameterAsStringCollection(parameterName, parameterCollection); + if (parameterValueCollection.size() != 1) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Required string parameter not found - %s", parameterName.c_str()); + } + + parameterValueRc = parameterValueCollection.front(); + } + CAF_CM_EXIT; + + return parameterValueRc; +} + +SmartPtrCRequestInstanceParameterDoc ParameterUtils::findOptionalInstanceParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalInstanceParameter"); + + SmartPtrCRequestInstanceParameterDoc parameterRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterCollectionInner = + parameterCollection->getInstanceParameter(); + for (TConstIterator > parameterIter(parameterCollectionInner); + parameterIter; parameterIter++) { + const SmartPtrCRequestInstanceParameterDoc parameterTmp = *parameterIter; + const std::string parameterNameTmp = parameterTmp->getName(); + if (parameterNameTmp.compare(parameterName) == 0) { + parameterRc = parameterTmp; + } + } + } + CAF_CM_EXIT; + + return parameterRc; +} + +SmartPtrCRequestInstanceParameterDoc ParameterUtils::findRequiredInstanceParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG("ParameterUtils", "findRequiredInstanceParameter"); + + SmartPtrCRequestInstanceParameterDoc parameterRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + parameterRc = findOptionalInstanceParameter(parameterName, parameterCollection); + if (parameterRc.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Required parameter not found - %s", parameterName.c_str()); + } + } + CAF_CM_EXIT; + + return parameterRc; +} + +std::deque ParameterUtils::findOptionalInstanceParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalInstanceParameterAsStringCollection"); + + std::deque parameterValueCollectionRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const SmartPtrCRequestInstanceParameterDoc parameter = findOptionalInstanceParameter(parameterName, parameterCollection); + if (! parameter.IsNull()) { + parameterValueCollectionRc = parameter->getValue(); + } + } + CAF_CM_EXIT; + + return parameterValueCollectionRc; +} + +std::deque ParameterUtils::findRequiredInstanceParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findRequiredInstanceParameterAsStringCollection"); + + std::deque parameterValueCollectionRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const SmartPtrCRequestInstanceParameterDoc parameter = findRequiredInstanceParameter(parameterName, parameterCollection); + parameterValueCollectionRc = parameter->getValue(); + } + CAF_CM_EXIT; + + return parameterValueCollectionRc; +} + +std::string ParameterUtils::findOptionalInstanceParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "findOptionalInstanceParameterAsString"); + + std::string parameterValueRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterValueCollection = + findOptionalInstanceParameterAsStringCollection(parameterName, parameterCollection); + if (parameterValueCollection.size() == 1) { + parameterValueRc = parameterValueCollection.front(); + } + } + CAF_CM_EXIT; + + return parameterValueRc; +} + +std::string ParameterUtils::findRequiredInstanceParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection) { + CAF_CM_STATIC_FUNC_LOG("ParameterUtils", "findRequiredInstanceParameterAsString"); + + std::string parameterValueRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(parameterName); + CAF_CM_VALIDATE_SMARTPTR(parameterCollection); + + const std::deque parameterValueCollection = + findOptionalInstanceParameterAsStringCollection(parameterName, parameterCollection); + if (parameterValueCollection.size() != 1) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Required string parameter not found - %s", parameterName.c_str()); + } + + parameterValueRc = parameterValueCollection.front(); + } + CAF_CM_EXIT; + + return parameterValueRc; +} + +SmartPtrCRequestParameterDoc ParameterUtils::createParameter( + const std::string& name, + const std::string& value) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "createParameter"); + + SmartPtrCRequestParameterDoc parameter; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_STRING(value); + + std::deque valueCollection; + valueCollection.push_back(value); + + parameter.CreateInstance(); + parameter->initialize( + name, + PARAMETER_STRING, + valueCollection); + } + CAF_CM_EXIT; + + return parameter; +} + +SmartPtrCRequestParameterDoc ParameterUtils::createParameter( + const std::string& name, + const std::deque& valueCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("ParameterUtils", "createParameter"); + + SmartPtrCRequestParameterDoc parameter; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_STL(valueCollection); + + parameter.CreateInstance(); + parameter->initialize( + name, + PARAMETER_STRING, + valueCollection); + } + CAF_CM_EXIT; + + return parameter; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.h new file mode 100644 index 000000000..0a335b660 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/ParameterUtils.h @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef ParameterUtils_h_ +#define ParameterUtils_h_ + + +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestParameterDoc.h" + +namespace Caf { +class DOCUTILS_LINKAGE ParameterUtils { +public: + static SmartPtrCRequestParameterDoc findOptionalParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static SmartPtrCRequestParameterDoc findRequiredParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::deque findOptionalParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::deque findRequiredParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::string findOptionalParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::string findRequiredParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + +public: + static SmartPtrCRequestInstanceParameterDoc findOptionalInstanceParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static SmartPtrCRequestInstanceParameterDoc findRequiredInstanceParameter( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::deque findOptionalInstanceParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::deque findRequiredInstanceParameterAsStringCollection( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::string findOptionalInstanceParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + + static std::string findRequiredInstanceParameterAsString( + const std::string& parameterName, + const SmartPtrCParameterCollectionDoc& parameterCollection); + +public: + static SmartPtrCRequestParameterDoc createParameter( + const std::string& name, + const std::string& value); + + static SmartPtrCRequestParameterDoc createParameter( + const std::string& name, + const std::deque& valueCollection); + +private: + CAF_CM_DECLARE_NOCREATE(ParameterUtils); +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/stdafx.h new file mode 100644 index 000000000..e181cff12 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocUtils/stdafx.h @@ -0,0 +1,19 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#include +#include +#include "DocUtilsLink.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.cpp new file mode 100644 index 000000000..388066fa1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.cpp @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAddInCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.h" + +using namespace Caf; + +void AddInCollectionXml::add( + const SmartPtrCAddInCollectionDoc addInCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AddInCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(addInCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque addInVal = + addInCollectionDoc->getAddInCollection(); + CAF_CM_VALIDATE_STL(addInVal); + + if (! addInVal.empty()) { + for (TConstIterator > addInIter(addInVal); + addInIter; addInIter++) { + const SmartPtrCXmlElement addInXml = + thisXml->createAndAddElement("addIn"); + addInXml->setValue(*addInIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCAddInCollectionDoc AddInCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AddInCollectionXml", "parse"); + + SmartPtrCAddInCollectionDoc addInCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection addInChildrenXml = + thisXml->findRequiredChildren("addIn"); + + std::deque addInVal; + if (! addInChildrenXml.IsNull() && ! addInChildrenXml->empty()) { + for (TConstIterator addInXmlIter(*addInChildrenXml); + addInXmlIter; addInXmlIter++) { + const SmartPtrCXmlElement addInXml = addInXmlIter->second; + const std::string addInDoc = addInXml->getValue(); + addInVal.push_back(addInDoc); + } + } + + addInCollectionDoc.CreateInstance(); + addInCollectionDoc->initialize( + addInVal); + } + CAF_CM_EXIT; + + return addInCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.cpp new file mode 100644 index 000000000..600ff4b3d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.cpp @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAddInCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAddInsDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/AddInsXml.h" +#include "Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.h" + +using namespace Caf; + +void AddInsXml::add( + const SmartPtrCAddInsDoc addInsDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AddInsXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(addInsDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque addInCollectionVal = + addInsDoc->getAddInCollection(); + CAF_CM_VALIDATE_STL(addInCollectionVal); + + if (! addInCollectionVal.empty()) { + for (TConstIterator > addInCollectionIter(addInCollectionVal); + addInCollectionIter; addInCollectionIter++) { + const SmartPtrCXmlElement addInCollectionXml = + thisXml->createAndAddElement("addInCollection"); + AddInCollectionXml::add(*addInCollectionIter, addInCollectionXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCAddInsDoc AddInsXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AddInsXml", "parse"); + + SmartPtrCAddInsDoc addInsDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection addInCollectionChildrenXml = + thisXml->findRequiredChildren("addInCollection"); + + std::deque addInCollectionVal; + if (! addInCollectionChildrenXml.IsNull() && ! addInCollectionChildrenXml->empty()) { + for (TConstIterator addInCollectionXmlIter(*addInCollectionChildrenXml); + addInCollectionXmlIter; addInCollectionXmlIter++) { + const SmartPtrCXmlElement addInCollectionXml = addInCollectionXmlIter->second; + const SmartPtrCAddInCollectionDoc addInCollectionDoc = + AddInCollectionXml::parse(addInCollectionXml); + addInCollectionVal.push_back(addInCollectionDoc); + } + } + + addInsDoc.CreateInstance(); + addInsDoc->initialize( + addInCollectionVal); + } + CAF_CM_EXIT; + + return addInsDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.cpp new file mode 100644 index 000000000..39b17ac00 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.cpp @@ -0,0 +1,76 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/AttachmentXml.h" + +using namespace Caf; + +void AttachmentCollectionXml::add( + const SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(attachmentCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque attachmentVal = + attachmentCollectionDoc->getAttachment(); + if (! attachmentVal.empty()) { + for (TConstIterator > attachmentIter(attachmentVal); + attachmentIter; attachmentIter++) { + const SmartPtrCXmlElement attachmentXml = + thisXml->createAndAddElement("attachment"); + AttachmentXml::add(*attachmentIter, attachmentXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCAttachmentCollectionDoc AttachmentCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentCollectionXml", "parse"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection attachmentChildrenXml = + thisXml->findOptionalChildren("attachment"); + + std::deque attachmentVal; + if (! attachmentChildrenXml.IsNull() && ! attachmentChildrenXml->empty()) { + for (TConstIterator attachmentXmlIter(*attachmentChildrenXml); + attachmentXmlIter; attachmentXmlIter++) { + const SmartPtrCXmlElement attachmentXml = attachmentXmlIter->second; + const SmartPtrCAttachmentDoc attachmentDoc = + AttachmentXml::parse(attachmentXml); + attachmentVal.push_back(attachmentDoc); + } + } + + attachmentCollectionDoc.CreateInstance(); + attachmentCollectionDoc->initialize( + attachmentVal); + } + CAF_CM_EXIT; + + return attachmentCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.cpp new file mode 100644 index 000000000..2f24a636e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.cpp @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h" + +using namespace Caf; + +void AttachmentNameCollectionXml::add( + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentNameCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(attachmentNameCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque nameVal = + attachmentNameCollectionDoc->getName(); + CAF_CM_VALIDATE_STL(nameVal); + + if (! nameVal.empty()) { + for (TConstIterator > nameIter(nameVal); + nameIter; nameIter++) { + const SmartPtrCXmlElement nameXml = + thisXml->createAndAddElement("attachmentName"); + nameXml->addAttribute("name", *nameIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCAttachmentNameCollectionDoc AttachmentNameCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentNameCollectionXml", "parse"); + + SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection nameChildrenXml = + thisXml->findRequiredChildren("attachmentName"); + + std::deque nameVal; + if (! nameChildrenXml.IsNull() && ! nameChildrenXml->empty()) { + for (TConstIterator nameXmlIter(*nameChildrenXml); + nameXmlIter; nameXmlIter++) { + const SmartPtrCXmlElement nameXml = nameXmlIter->second; + const std::string name = nameXml->findRequiredAttribute("name"); + nameVal.push_back(name); + } + } + + attachmentNameCollectionDoc.CreateInstance(); + attachmentNameCollectionDoc->initialize( + nameVal); + } + CAF_CM_EXIT; + + return attachmentNameCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.cpp new file mode 100644 index 000000000..f673b7557 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.cpp @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/AttachmentXml.h" + +using namespace Caf; + +void AttachmentXml::add( + const SmartPtrCAttachmentDoc attachmentDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(attachmentDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = attachmentDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string typeVal = attachmentDoc->getType(); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::string uriVal = attachmentDoc->getUri(); + CAF_CM_VALIDATE_STRING(uriVal); + thisXml->addAttribute("uri", uriVal); + + const std::string isReferenceVal = attachmentDoc->getIsReference() ? "true" : "false"; + CAF_CM_VALIDATE_STRING(isReferenceVal); + thisXml->addAttribute("isReference", isReferenceVal); + + const CMS_POLICY cmsPolicyVal = attachmentDoc->getCmsPolicy(); + thisXml->addAttribute("cmsPolicy", EnumConvertersXml::convertCmsPolicyToString(cmsPolicyVal)); + } + CAF_CM_EXIT; +} + +SmartPtrCAttachmentDoc AttachmentXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AttachmentXml", "parse"); + + SmartPtrCAttachmentDoc attachmentDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string typeStrVal = + thisXml->findRequiredAttribute("type"); + const std::string typeVal = typeStrVal; + + const std::string uriStrVal = + thisXml->findRequiredAttribute("uri"); + const std::string uriVal = uriStrVal; + + const std::string isReferenceStrVal = + thisXml->findRequiredAttribute("isReference"); + bool isReferenceVal = false; + if (! isReferenceStrVal.empty()) { + isReferenceVal = (isReferenceStrVal.compare("true") == 0) ? true : false; + } + + CMS_POLICY cmsPolicyVal = CMS_POLICY_NONE; + const std::string cmsPolicyStr = thisXml->findOptionalAttribute("cmsPolicy"); + if (! cmsPolicyStr.empty()) { + cmsPolicyVal = EnumConvertersXml::convertStringToCmsPolicy(cmsPolicyStr); + } + + attachmentDoc.CreateInstance(); + attachmentDoc->initialize( + nameVal, + typeVal, + uriVal, + isReferenceVal, + cmsPolicyVal); + } + CAF_CM_EXIT; + + return attachmentDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.cpp new file mode 100644 index 000000000..a2df80630 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.cpp @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.h" + +using namespace Caf; + +void AuthnAuthzCollectionXml::add( + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AuthnAuthzCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(authnAuthzCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque authnAuthzVal = + authnAuthzCollectionDoc->getAuthnAuthz(); + CAF_CM_VALIDATE_STL(authnAuthzVal); + + if (! authnAuthzVal.empty()) { + for (TConstIterator > authnAuthzIter(authnAuthzVal); + authnAuthzIter; authnAuthzIter++) { + const SmartPtrCXmlElement authnAuthzXml = + thisXml->createAndAddElement("authnAuthz"); + AuthnAuthzXml::add(*authnAuthzIter, authnAuthzXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCAuthnAuthzCollectionDoc AuthnAuthzCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AuthnAuthzCollectionXml", "parse"); + + SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection authnAuthzChildrenXml = + thisXml->findRequiredChildren("authnAuthz"); + + std::deque authnAuthzVal; + if (! authnAuthzChildrenXml.IsNull() && ! authnAuthzChildrenXml->empty()) { + for (TConstIterator authnAuthzXmlIter(*authnAuthzChildrenXml); + authnAuthzXmlIter; authnAuthzXmlIter++) { + const SmartPtrCXmlElement authnAuthzXml = authnAuthzXmlIter->second; + const SmartPtrCAuthnAuthzDoc authnAuthzDoc = + AuthnAuthzXml::parse(authnAuthzXml); + authnAuthzVal.push_back(authnAuthzDoc); + } + } + + authnAuthzCollectionDoc.CreateInstance(); + authnAuthzCollectionDoc->initialize( + authnAuthzVal); + } + CAF_CM_EXIT; + + return authnAuthzCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.cpp new file mode 100644 index 000000000..decb55d3a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.cpp @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.h" + +using namespace Caf; + +void AuthnAuthzXml::add( + const SmartPtrCAuthnAuthzDoc authnAuthzDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AuthnAuthzXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(authnAuthzDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string typeVal = authnAuthzDoc->getType(); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::string valueVal = authnAuthzDoc->getValue(); + CAF_CM_VALIDATE_STRING(valueVal); + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setValue(valueVal); + + const std::string nameVal = authnAuthzDoc->getName(); + if (! nameVal.empty()) { + thisXml->addAttribute("name", nameVal); + } + + const std::string sequenceNumberVal = + CStringConv::toString(authnAuthzDoc->getSequenceNumber()); + if (! sequenceNumberVal.empty()) { + thisXml->addAttribute("sequenceNumber", sequenceNumberVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCAuthnAuthzDoc AuthnAuthzXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("AuthnAuthzXml", "parse"); + + SmartPtrCAuthnAuthzDoc authnAuthzDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string typeVal = + thisXml->findRequiredAttribute("type"); + + const std::string valueVal = + thisXml->findRequiredChild("value")->getValue(); + + const std::string nameVal = + thisXml->findOptionalAttribute("name"); + + const std::string sequenceNumberStrVal = + thisXml->findOptionalAttribute("sequenceNumber"); + int32 sequenceNumberVal = 0; + if (! sequenceNumberStrVal.empty()) { + sequenceNumberVal = CStringConv::fromString(sequenceNumberStrVal); + } + + authnAuthzDoc.CreateInstance(); + authnAuthzDoc->initialize( + typeVal, + valueVal, + nameVal, + sequenceNumberVal); + } + CAF_CM_EXIT; + + return authnAuthzDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.cpp new file mode 100644 index 000000000..6c11b829f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CClassFiltersDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.h" + +using namespace Caf; + +void ClassFiltersXml::add( + const SmartPtrCClassFiltersDoc classFiltersDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassFiltersXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classFiltersDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string dialectVal = classFiltersDoc->getDialect(); + CAF_CM_VALIDATE_STRING(dialectVal); + thisXml->addAttribute("dialect", dialectVal); + + const std::deque classFilterVal = + classFiltersDoc->getClassFilter(); + CAF_CM_VALIDATE_STL(classFilterVal); + + if (! classFilterVal.empty()) { + for (TConstIterator > classFilterIter(classFilterVal); + classFilterIter; classFilterIter++) { + const SmartPtrCXmlElement classFilterXml = + thisXml->createAndAddElement("classFilter"); + classFilterXml->setValue(*classFilterIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCClassFiltersDoc ClassFiltersXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassFiltersXml", "parse"); + + SmartPtrCClassFiltersDoc classFiltersDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string dialectStrVal = + thisXml->findRequiredAttribute("dialect"); + const std::string dialectVal = dialectStrVal; + + const CXmlElement::SmartPtrCElementCollection classFilterChildrenXml = + thisXml->findRequiredChildren("classFilter"); + + std::deque classFilterVal; + if (! classFilterChildrenXml.IsNull() && ! classFilterChildrenXml->empty()) { + for (TConstIterator classFilterXmlIter(*classFilterChildrenXml); + classFilterXmlIter; classFilterXmlIter++) { + const SmartPtrCXmlElement classFilterXml = classFilterXmlIter->second; + const std::string classFilterDoc = classFilterXml->getValue(); + classFilterVal.push_back(classFilterDoc); + } + } + + classFiltersDoc.CreateInstance(); + classFiltersDoc->initialize( + dialectVal, + classFilterVal); + } + CAF_CM_EXIT; + + return classFiltersDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.cpp new file mode 100644 index 000000000..95cd10cd5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.cpp @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CClassFiltersDoc.h" +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.h" +#include "Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.h" +#include "Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.h" + +using namespace Caf; + +void ClassSpecifierXml::add( + const SmartPtrCClassSpecifierDoc classSpecifierDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassSpecifierXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classSpecifierDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassVal = + classSpecifierDoc->getFullyQualifiedClass(); + if (! fullyQualifiedClassVal.IsNull()) { + const SmartPtrCXmlElement fullyQualifiedClassXml = + thisXml->createAndAddElement("fullyQualifiedClass"); + FullyQualifiedClassGroupXml::add(fullyQualifiedClassVal, fullyQualifiedClassXml); + } + + const SmartPtrCClassFiltersDoc classFiltersVal = + classSpecifierDoc->getClassFilters(); + if (! classFiltersVal.IsNull()) { + const SmartPtrCXmlElement classFiltersXml = + thisXml->createAndAddElement("classFilters"); + ClassFiltersXml::add(classFiltersVal, classFiltersXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCClassSpecifierDoc ClassSpecifierXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassSpecifierXml", "parse"); + + SmartPtrCClassSpecifierDoc classSpecifierDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement fullyQualifiedClassXml = + thisXml->findOptionalChild("fullyQualifiedClass"); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassVal; + if (! fullyQualifiedClassXml.IsNull()) { + fullyQualifiedClassVal = FullyQualifiedClassGroupXml::parse(fullyQualifiedClassXml); + } + + const SmartPtrCXmlElement classFiltersXml = + thisXml->findOptionalChild("classFilters"); + + SmartPtrCClassFiltersDoc classFiltersVal; + if (! classFiltersXml.IsNull()) { + classFiltersVal = ClassFiltersXml::parse(classFiltersXml); + } + + classSpecifierDoc.CreateInstance(); + classSpecifierDoc->initialize( + fullyQualifiedClassVal, + classFiltersVal); + } + CAF_CM_EXIT; + + return classSpecifierDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.cpp new file mode 100644 index 000000000..d0d298daa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.cpp @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.h" + +using namespace Caf; + +void FullyQualifiedClassGroupXml::add( + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassGroupDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("FullyQualifiedClassGroupXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(fullyQualifiedClassGroupDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceVal = fullyQualifiedClassGroupDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = fullyQualifiedClassGroupDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = fullyQualifiedClassGroupDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + } + CAF_CM_EXIT; +} + +SmartPtrCFullyQualifiedClassGroupDoc FullyQualifiedClassGroupXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("FullyQualifiedClassGroupXml", "parse"); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassGroupDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + fullyQualifiedClassGroupDoc.CreateInstance(); + fullyQualifiedClassGroupDoc->initialize( + classNamespaceVal, + classNameVal, + classVersionVal); + } + CAF_CM_EXIT; + + return fullyQualifiedClassGroupDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.cpp new file mode 100644 index 000000000..7054975ea --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.cpp @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.h" + +using namespace Caf; + +void LoggingLevelCollectionXml::add( + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LoggingLevelCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(loggingLevelCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque loggingLevelVal = + loggingLevelCollectionDoc->getLoggingLevel(); + CAF_CM_VALIDATE_STL(loggingLevelVal); + + if (! loggingLevelVal.empty()) { + for (TConstIterator > loggingLevelIter(loggingLevelVal); + loggingLevelIter; loggingLevelIter++) { + const SmartPtrCXmlElement loggingLevelXml = + thisXml->createAndAddElement("loggingLevel"); + LoggingLevelElemXml::add(*loggingLevelIter, loggingLevelXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCLoggingLevelCollectionDoc LoggingLevelCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LoggingLevelCollectionXml", "parse"); + + SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection loggingLevelChildrenXml = + thisXml->findRequiredChildren("loggingLevel"); + + std::deque loggingLevelVal; + if (! loggingLevelChildrenXml.IsNull() && ! loggingLevelChildrenXml->empty()) { + for (TConstIterator loggingLevelXmlIter(*loggingLevelChildrenXml); + loggingLevelXmlIter; loggingLevelXmlIter++) { + const SmartPtrCXmlElement loggingLevelXml = loggingLevelXmlIter->second; + const SmartPtrCLoggingLevelElemDoc loggingLevelDoc = + LoggingLevelElemXml::parse(loggingLevelXml); + loggingLevelVal.push_back(loggingLevelDoc); + } + } + + loggingLevelCollectionDoc.CreateInstance(); + loggingLevelCollectionDoc->initialize( + loggingLevelVal); + } + CAF_CM_EXIT; + + return loggingLevelCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.cpp new file mode 100644 index 000000000..50cc299c5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.cpp @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +#include "Doc/CafCoreTypesDoc/CLoggingLevelElemDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.h" + +using namespace Caf; + +void LoggingLevelElemXml::add( + const SmartPtrCLoggingLevelElemDoc loggingLevelElemDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LoggingLevelElemXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(loggingLevelElemDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string componentVal = + EnumConvertersXml::convertLoggingComponentTypeToString(loggingLevelElemDoc->getComponent()); + CAF_CM_VALIDATE_STRING(componentVal); + thisXml->addAttribute("component", componentVal); + + const std::string levelVal = + EnumConvertersXml::convertLoggingLevelTypeToString(loggingLevelElemDoc->getLevel()); + CAF_CM_VALIDATE_STRING(levelVal); + thisXml->addAttribute("level", levelVal); + } + CAF_CM_EXIT; +} + +SmartPtrCLoggingLevelElemDoc LoggingLevelElemXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LoggingLevelElemXml", "parse"); + + SmartPtrCLoggingLevelElemDoc loggingLevelElemDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string componentStrVal = + thisXml->findRequiredAttribute("component"); + LOGGINGCOMPONENT_TYPE componentVal = LOGGINGCOMPONENT_NONE; + if (! componentStrVal.empty()) { + componentVal = EnumConvertersXml::convertStringToLoggingComponentType(componentStrVal); + } + + const std::string levelStrVal = + thisXml->findRequiredAttribute("level"); + LOGGINGLEVEL_TYPE levelVal = LOGGINGLEVEL_NONE; + if (! levelStrVal.empty()) { + levelVal = EnumConvertersXml::convertStringToLoggingLevelType(levelStrVal); + } + + loggingLevelElemDoc.CreateInstance(); + loggingLevelElemDoc->initialize( + componentVal, + levelVal); + } + CAF_CM_EXIT; + + return loggingLevelElemDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.cpp new file mode 100644 index 000000000..8c17d0ea8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.cpp @@ -0,0 +1,76 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/OperationXml.h" +#include "Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h" + +using namespace Caf; + +void OperationXml::add( + const SmartPtrCOperationDoc operationDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("OperationXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(operationDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = operationDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const SmartPtrCParameterCollectionDoc parameterCollectionVal = + operationDoc->getParameterCollection(); + if (! parameterCollectionVal.IsNull()) { + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->createAndAddElement("parameterCollection"); + ParameterCollectionXml::add(parameterCollectionVal, parameterCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCOperationDoc OperationXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("OperationXml", "parse"); + + SmartPtrCOperationDoc operationDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->findOptionalChild("parameterCollection"); + + SmartPtrCParameterCollectionDoc parameterCollectionVal; + if (! parameterCollectionXml.IsNull()) { + parameterCollectionVal = ParameterCollectionXml::parse(parameterCollectionXml); + } + + operationDoc.CreateInstance(); + operationDoc->initialize( + nameVal, + parameterCollectionVal); + } + CAF_CM_EXIT; + + return operationDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.cpp new file mode 100644 index 000000000..3b29f61a4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.cpp @@ -0,0 +1,105 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestParameterDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestParameterXml.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestParameterXml.h" + +using namespace Caf; + +void ParameterCollectionXml::add( + const SmartPtrCParameterCollectionDoc parameterCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ParameterCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(parameterCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque parameterVal = + parameterCollectionDoc->getParameter(); + if (! parameterVal.empty()) { + for (TConstIterator > parameterIter(parameterVal); + parameterIter; parameterIter++) { + const SmartPtrCXmlElement parameterXml = + thisXml->createAndAddElement("parameter"); + RequestParameterXml::add(*parameterIter, parameterXml); + } + } + + const std::deque instanceParameterVal = + parameterCollectionDoc->getInstanceParameter(); + if (! instanceParameterVal.empty()) { + for (TConstIterator > instanceParameterIter(instanceParameterVal); + instanceParameterIter; instanceParameterIter++) { + const SmartPtrCXmlElement instanceParameterXml = + thisXml->createAndAddElement("instanceParameter"); + RequestInstanceParameterXml::add(*instanceParameterIter, instanceParameterXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCParameterCollectionDoc ParameterCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ParameterCollectionXml", "parse"); + + SmartPtrCParameterCollectionDoc parameterCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection parameterChildrenXml = + thisXml->findOptionalChildren("parameter"); + + std::deque parameterVal; + if (! parameterChildrenXml.IsNull() && ! parameterChildrenXml->empty()) { + for (TConstIterator parameterXmlIter(*parameterChildrenXml); + parameterXmlIter; parameterXmlIter++) { + const SmartPtrCXmlElement parameterXml = parameterXmlIter->second; + const SmartPtrCRequestParameterDoc parameterDoc = + RequestParameterXml::parse(parameterXml); + parameterVal.push_back(parameterDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instanceParameterChildrenXml = + thisXml->findOptionalChildren("instanceParameter"); + + std::deque instanceParameterVal; + if (! instanceParameterChildrenXml.IsNull() && ! instanceParameterChildrenXml->empty()) { + for (TConstIterator instanceParameterXmlIter(*instanceParameterChildrenXml); + instanceParameterXmlIter; instanceParameterXmlIter++) { + const SmartPtrCXmlElement instanceParameterXml = instanceParameterXmlIter->second; + const SmartPtrCRequestInstanceParameterDoc instanceParameterDoc = + RequestInstanceParameterXml::parse(instanceParameterXml); + instanceParameterVal.push_back(instanceParameterDoc); + } + } + + parameterCollectionDoc.CreateInstance(); + parameterCollectionDoc->initialize( + parameterVal, + instanceParameterVal); + } + CAF_CM_EXIT; + + return parameterCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.cpp new file mode 100644 index 000000000..9a2f9b839 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.cpp @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/PropertyXml.h" + +using namespace Caf; + +void PropertyCollectionXml::add( + const SmartPtrCPropertyCollectionDoc propertyCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PropertyCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(propertyCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque propertyVal = + propertyCollectionDoc->getProperty(); + CAF_CM_VALIDATE_STL(propertyVal); + + if (! propertyVal.empty()) { + for (TConstIterator > propertyIter(propertyVal); + propertyIter; propertyIter++) { + const SmartPtrCXmlElement propertyXml = + thisXml->createAndAddElement("property"); + PropertyXml::add(*propertyIter, propertyXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCPropertyCollectionDoc PropertyCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PropertyCollectionXml", "parse"); + + SmartPtrCPropertyCollectionDoc propertyCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection propertyChildrenXml = + thisXml->findRequiredChildren("property"); + + std::deque propertyVal; + if (! propertyChildrenXml.IsNull() && ! propertyChildrenXml->empty()) { + for (TConstIterator propertyXmlIter(*propertyChildrenXml); + propertyXmlIter; propertyXmlIter++) { + const SmartPtrCXmlElement propertyXml = propertyXmlIter->second; + const SmartPtrCPropertyDoc propertyDoc = + PropertyXml::parse(propertyXml); + propertyVal.push_back(propertyDoc); + } + } + + propertyCollectionDoc.CreateInstance(); + propertyCollectionDoc->initialize( + propertyVal); + } + CAF_CM_EXIT; + + return propertyCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.cpp new file mode 100644 index 000000000..1feb87614 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.cpp @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/PropertyXml.h" + +using namespace Caf; + +void PropertyXml::add( + const SmartPtrCPropertyDoc propertyDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PropertyXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(propertyDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = propertyDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string typeVal = + EnumConvertersXml::convertPropertyTypeToString(propertyDoc->getType()); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::deque valueVal = + propertyDoc->getValue(); + CAF_CM_VALIDATE_STL(valueVal); + + if (! valueVal.empty()) { + for (TConstIterator > valueIter(valueVal); + valueIter; valueIter++) { + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setValue(*valueIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCPropertyDoc PropertyXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PropertyXml", "parse"); + + SmartPtrCPropertyDoc propertyDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string typeStrVal = + thisXml->findRequiredAttribute("type"); + PROPERTY_TYPE typeVal = PROPERTY_NONE; + if (! typeStrVal.empty()) { + typeVal = EnumConvertersXml::convertStringToPropertyType(typeStrVal); + } + + const CXmlElement::SmartPtrCElementCollection valueChildrenXml = + thisXml->findRequiredChildren("value"); + + std::deque valueVal; + if (! valueChildrenXml.IsNull() && ! valueChildrenXml->empty()) { + for (TConstIterator valueXmlIter(*valueChildrenXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->getValue(); + valueVal.push_back(valueDoc); + } + } + + propertyDoc.CreateInstance(); + propertyDoc->initialize( + nameVal, + typeVal, + valueVal); + } + CAF_CM_EXIT; + + return propertyDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.cpp new file mode 100644 index 000000000..0bf26b654 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.cpp @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/ProtocolXml.h" + +using namespace Caf; + +void ProtocolCollectionXml::add( + const SmartPtrCProtocolCollectionDoc protocolCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProtocolCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(protocolCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque protocolVal = + protocolCollectionDoc->getProtocol(); + CAF_CM_VALIDATE_STL(protocolVal); + + if (! protocolVal.empty()) { + for (TConstIterator > protocolIter(protocolVal); + protocolIter; protocolIter++) { + const SmartPtrCXmlElement protocolXml = + thisXml->createAndAddElement("protocol"); + ProtocolXml::add(*protocolIter, protocolXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCProtocolCollectionDoc ProtocolCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProtocolCollectionXml", "parse"); + + SmartPtrCProtocolCollectionDoc protocolCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection protocolChildrenXml = + thisXml->findRequiredChildren("protocol"); + + std::deque protocolVal; + if (! protocolChildrenXml.IsNull() && ! protocolChildrenXml->empty()) { + for (TConstIterator protocolXmlIter(*protocolChildrenXml); + protocolXmlIter; protocolXmlIter++) { + const SmartPtrCXmlElement protocolXml = protocolXmlIter->second; + const SmartPtrCProtocolDoc protocolDoc = + ProtocolXml::parse(protocolXml); + protocolVal.push_back(protocolDoc); + } + } + + protocolCollectionDoc.CreateInstance(); + protocolCollectionDoc->initialize( + protocolVal); + } + CAF_CM_EXIT; + + return protocolCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.cpp new file mode 100644 index 000000000..46fe2a82a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CProtocolDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/ProtocolXml.h" + +using namespace Caf; + +void ProtocolXml::add( + const SmartPtrCProtocolDoc protocolDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProtocolXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(protocolDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string uriVal = protocolDoc->getUri(); + CAF_CM_VALIDATE_STRING(uriVal); + thisXml->addAttribute("uri", uriVal); + + const std::string nameVal = protocolDoc->getName(); + if (! nameVal.empty()) { + thisXml->addAttribute("name", nameVal); + } + + const std::string sequenceNumberVal = + CStringConv::toString(protocolDoc->getSequenceNumber()); + if (! sequenceNumberVal.empty()) { + thisXml->addAttribute("sequenceNumber", sequenceNumberVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProtocolDoc ProtocolXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProtocolXml", "parse"); + + SmartPtrCProtocolDoc protocolDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string uriVal = + thisXml->findRequiredAttribute("uri"); + + const std::string nameVal = + thisXml->findOptionalAttribute("name"); + + const std::string sequenceNumberStrVal = + thisXml->findOptionalAttribute("sequenceNumber"); + int32 sequenceNumberVal = 0; + if (! sequenceNumberStrVal.empty()) { + sequenceNumberVal = CStringConv::fromString(sequenceNumberStrVal); + } + + protocolDoc.CreateInstance(); + protocolDoc->initialize( + uriVal, + nameVal, + sequenceNumberVal); + } + CAF_CM_EXIT; + + return protocolDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.cpp new file mode 100644 index 000000000..3f2cad764 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.cpp @@ -0,0 +1,112 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAddInsDoc.h" +#include "Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestConfigDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestConfigXml.h" +#include "Doc/DocXml/CafCoreTypesXml/AddInsXml.h" +#include "Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.h" + +using namespace Caf; + +void RequestConfigXml::add( + const SmartPtrCRequestConfigDoc requestConfigDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestConfigXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(requestConfigDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string responseFormatTypeVal = requestConfigDoc->getResponseFormatType(); + CAF_CM_VALIDATE_STRING(responseFormatTypeVal); + thisXml->addAttribute("responseFormatType", responseFormatTypeVal); + + const SmartPtrCAddInsDoc requestProcessorAddInsVal = + requestConfigDoc->getRequestProcessorAddIns(); + if (! requestProcessorAddInsVal.IsNull()) { + const SmartPtrCXmlElement requestProcessorAddInsXml = + thisXml->createAndAddElement("requestProcessorAddIns"); + AddInsXml::add(requestProcessorAddInsVal, requestProcessorAddInsXml); + } + + const SmartPtrCAddInsDoc responseProcessorAddInsVal = + requestConfigDoc->getResponseProcessorAddIns(); + if (! responseProcessorAddInsVal.IsNull()) { + const SmartPtrCXmlElement responseProcessorAddInsXml = + thisXml->createAndAddElement("responseProcessorAddIns"); + AddInsXml::add(responseProcessorAddInsVal, responseProcessorAddInsXml); + } + + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionVal = + requestConfigDoc->getLoggingLevelCollection(); + if (! loggingLevelCollectionVal.IsNull()) { + const SmartPtrCXmlElement loggingLevelCollectionXml = + thisXml->createAndAddElement("loggingLevelCollection"); + LoggingLevelCollectionXml::add(loggingLevelCollectionVal, loggingLevelCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCRequestConfigDoc RequestConfigXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestConfigXml", "parse"); + + SmartPtrCRequestConfigDoc requestConfigDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string responseFormatTypeStrVal = + thisXml->findRequiredAttribute("responseFormatType"); + const std::string responseFormatTypeVal = responseFormatTypeStrVal; + + const SmartPtrCXmlElement requestProcessorAddInsXml = + thisXml->findOptionalChild("requestProcessorAddIns"); + + SmartPtrCAddInsDoc requestProcessorAddInsVal; + if (! requestProcessorAddInsXml.IsNull()) { + requestProcessorAddInsVal = AddInsXml::parse(requestProcessorAddInsXml); + } + + const SmartPtrCXmlElement responseProcessorAddInsXml = + thisXml->findOptionalChild("responseProcessorAddIns"); + + SmartPtrCAddInsDoc responseProcessorAddInsVal; + if (! responseProcessorAddInsXml.IsNull()) { + responseProcessorAddInsVal = AddInsXml::parse(responseProcessorAddInsXml); + } + + const SmartPtrCXmlElement loggingLevelCollectionXml = + thisXml->findOptionalChild("loggingLevelCollection"); + + SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionVal; + if (! loggingLevelCollectionXml.IsNull()) { + loggingLevelCollectionVal = LoggingLevelCollectionXml::parse(loggingLevelCollectionXml); + } + + requestConfigDoc.CreateInstance(); + requestConfigDoc->initialize( + responseFormatTypeVal, + requestProcessorAddInsVal, + responseProcessorAddInsVal, + loggingLevelCollectionVal); + } + CAF_CM_EXIT; + + return requestConfigDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.cpp new file mode 100644 index 000000000..f55e69864 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.cpp @@ -0,0 +1,154 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestConfigDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestConfigXml.h" +#include "Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h" + +using namespace Caf; + +void RequestHeaderXml::add( + const SmartPtrCRequestHeaderDoc requestHeaderDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestHeaderXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(requestHeaderDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCRequestConfigDoc requestConfigVal = + requestHeaderDoc->getRequestConfig(); + CAF_CM_VALIDATE_SMARTPTR(requestConfigVal); + + const SmartPtrCXmlElement requestConfigXml = + thisXml->createAndAddElement("requestConfig"); + RequestConfigXml::add(requestConfigVal, requestConfigXml); + + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionVal = + requestHeaderDoc->getAuthnAuthzCollection(); + if (! authnAuthzCollectionVal.IsNull()) { + const SmartPtrCXmlElement authnAuthzCollectionXml = + thisXml->createAndAddElement("authnAuthzCollection"); + AuthnAuthzCollectionXml::add(authnAuthzCollectionVal, authnAuthzCollectionXml); + } + + const SmartPtrCProtocolCollectionDoc protocolCollectionVal = + requestHeaderDoc->getProtocolCollection(); + if (! protocolCollectionVal.IsNull()) { + const SmartPtrCXmlElement protocolCollectionXml = + thisXml->createAndAddElement("protocolCollection"); + ProtocolCollectionXml::add(protocolCollectionVal, protocolCollectionXml); + } + + const SmartPtrCPropertyCollectionDoc echoPropertyBagVal = + requestHeaderDoc->getEchoPropertyBag(); + if (! echoPropertyBagVal.IsNull()) { + const SmartPtrCXmlElement echoPropertyBagXml = + thisXml->createAndAddElement("echoPropertyBag"); + PropertyCollectionXml::add(echoPropertyBagVal, echoPropertyBagXml); + } + + const std::string versionVal = requestHeaderDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string createdDateTimeVal = requestHeaderDoc->getCreatedDateTime(); + CAF_CM_VALIDATE_STRING(createdDateTimeVal); + thisXml->addAttribute("createdDateTime", createdDateTimeVal); + + const std::string sessionIdVal = + BasePlatform::UuidToString(requestHeaderDoc->getSessionId()); + if (! sessionIdVal.empty()) { + thisXml->addAttribute("sessionId", sessionIdVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCRequestHeaderDoc RequestHeaderXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestHeaderXml", "parse"); + + SmartPtrCRequestHeaderDoc requestHeaderDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement requestConfigXml = + thisXml->findRequiredChild("requestConfig"); + + SmartPtrCRequestConfigDoc requestConfigVal; + if (! requestConfigXml.IsNull()) { + requestConfigVal = RequestConfigXml::parse(requestConfigXml); + } + + const SmartPtrCXmlElement authnAuthzCollectionXml = + thisXml->findOptionalChild("authnAuthzCollection"); + + SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollectionVal; + if (! authnAuthzCollectionXml.IsNull()) { + authnAuthzCollectionVal = AuthnAuthzCollectionXml::parse(authnAuthzCollectionXml); + } + + const SmartPtrCXmlElement protocolCollectionXml = + thisXml->findOptionalChild("protocolCollection"); + + SmartPtrCProtocolCollectionDoc protocolCollectionVal; + if (! protocolCollectionXml.IsNull()) { + protocolCollectionVal = ProtocolCollectionXml::parse(protocolCollectionXml); + } + + const SmartPtrCXmlElement echoPropertyBagXml = + thisXml->findOptionalChild("echoPropertyBag"); + + SmartPtrCPropertyCollectionDoc echoPropertyBagVal; + if (! echoPropertyBagXml.IsNull()) { + echoPropertyBagVal = PropertyCollectionXml::parse(echoPropertyBagXml); + } + + const std::string versionVal = + thisXml->findRequiredAttribute("version"); + + const std::string createdDateTimeVal = + thisXml->findRequiredAttribute("createdDateTime"); + + const std::string sessionIdStrVal = + thisXml->findOptionalAttribute("sessionId"); + UUID sessionIdVal = CAFCOMMON_GUID_NULL; + if (! sessionIdStrVal.empty()) { + BasePlatform::UuidFromString(sessionIdStrVal.c_str(), sessionIdVal); + } + + requestHeaderDoc.CreateInstance(); + requestHeaderDoc->initialize( + requestConfigVal, + authnAuthzCollectionVal, + protocolCollectionVal, + echoPropertyBagVal, + versionVal, + createdDateTimeVal, + sessionIdVal); + } + CAF_CM_EXIT; + + return requestHeaderDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.cpp new file mode 100644 index 000000000..1cbe4e208 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.cpp @@ -0,0 +1,107 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.h" + +using namespace Caf; + +void RequestInstanceParameterXml::add( + const SmartPtrCRequestInstanceParameterDoc requestInstanceParameterDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestInstanceParameterXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(requestInstanceParameterDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = requestInstanceParameterDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string classNamespaceVal = requestInstanceParameterDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = requestInstanceParameterDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = requestInstanceParameterDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + + const std::deque valueVal = + requestInstanceParameterDoc->getValue(); + if (! valueVal.empty()) { + for (TConstIterator > valueIter(valueVal); + valueIter; valueIter++) { + thisXml->appendValue(*valueIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCRequestInstanceParameterDoc RequestInstanceParameterXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestInstanceParameterXml", "parse"); + + SmartPtrCRequestInstanceParameterDoc requestInstanceParameterDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + const CXmlElement::SmartPtrCElementCollection valueChildrenXml = + thisXml->getAllChildren(); + + std::deque valueVal; + if (! valueChildrenXml.IsNull() && ! valueChildrenXml->empty()) { + for (TConstIterator valueXmlIter(*valueChildrenXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->saveToStringRaw(); + valueVal.push_back(valueDoc); + } + } + + requestInstanceParameterDoc.CreateInstance(); + requestInstanceParameterDoc->initialize( + nameVal, + classNamespaceVal, + classNameVal, + classVersionVal, + valueVal); + } + CAF_CM_EXIT; + + return requestInstanceParameterDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.cpp new file mode 100644 index 000000000..27e787287 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.cpp @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +#include "Doc/CafCoreTypesDoc/CRequestParameterDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestParameterXml.h" + +using namespace Caf; + +void RequestParameterXml::add( + const SmartPtrCRequestParameterDoc requestParameterDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestParameterXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(requestParameterDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = requestParameterDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string typeVal = + EnumConvertersXml::convertParameterTypeToString(requestParameterDoc->getType()); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::deque valueVal = + requestParameterDoc->getValue(); + CAF_CM_VALIDATE_STL(valueVal); + + if (! valueVal.empty()) { + for (TConstIterator > valueIter(valueVal); + valueIter; valueIter++) { + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setCDataValue(*valueIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCRequestParameterDoc RequestParameterXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestParameterXml", "parse"); + + SmartPtrCRequestParameterDoc requestParameterDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string typeStrVal = + thisXml->findRequiredAttribute("type"); + PARAMETER_TYPE typeVal = PARAMETER_NONE; + if (! typeStrVal.empty()) { + typeVal = EnumConvertersXml::convertStringToParameterType(typeStrVal); + } + + const CXmlElement::SmartPtrCElementCollection valueChildrenXml = + thisXml->findRequiredChildren("value"); + + std::deque valueVal; + if (! valueChildrenXml.IsNull() && ! valueChildrenXml->empty()) { + for (TConstIterator valueXmlIter(*valueChildrenXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->getCDataValue(); + valueVal.push_back(valueDoc); + } + } + + requestParameterDoc.CreateInstance(); + requestParameterDoc->initialize( + nameVal, + typeVal, + valueVal); + } + CAF_CM_EXIT; + + return requestParameterDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.cpp new file mode 100644 index 000000000..b7d0636f8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.cpp @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: Nov 21, 2014 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestXml.h" + +using namespace Caf; + +SmartPtrCXmlElement RequestXml::parseString( + const std::string& xml, + const std::string& rootName) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestXml", "parseString"); + CAF_CM_VALIDATE_STRING(xml); + // rootName is optional + + SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, rootName); + + return rootXml; +} + +SmartPtrCXmlElement RequestXml::parseFile( + const std::string& xml, + const std::string& rootName) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestXml", "parseFile"); + CAF_CM_VALIDATE_STRING(xml); + // rootName is optional + + SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(xml, rootName); + + return rootXml; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.cpp new file mode 100644 index 000000000..7ed0a253b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.cpp @@ -0,0 +1,151 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafCoreTypesXml/StatisticsXml.h" +#include "Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h" + +using namespace Caf; + +void StatisticsXml::add( + const SmartPtrCStatisticsDoc statisticsDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("StatisticsXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(statisticsDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCPropertyCollectionDoc propertyCollectionVal = + statisticsDoc->getPropertyCollection(); + CAF_CM_VALIDATE_SMARTPTR(propertyCollectionVal); + + const SmartPtrCXmlElement propertyCollectionXml = + thisXml->createAndAddElement("propertyCollection"); + PropertyCollectionXml::add(propertyCollectionVal, propertyCollectionXml); + + const std::string providerJobNumVal = + CStringConv::toString(statisticsDoc->getProviderJobNum()); + if (! providerJobNumVal.empty()) { + thisXml->addAttribute("providerJobNum", providerJobNumVal); + } + + const std::string providerJobTotalVal = + CStringConv::toString(statisticsDoc->getProviderJobTotal()); + if (! providerJobTotalVal.empty()) { + thisXml->addAttribute("providerJobTotal", providerJobTotalVal); + } + + const std::string providerJobDurationSecsVal = + CStringConv::toString(statisticsDoc->getProviderJobDurationSecs()); + if (! providerJobDurationSecsVal.empty()) { + thisXml->addAttribute("providerJobDurationSecs", providerJobDurationSecsVal); + } + + const std::string pmeNumVal = + CStringConv::toString(statisticsDoc->getPmeNum()); + if (! pmeNumVal.empty()) { + thisXml->addAttribute("pmeNum", pmeNumVal); + } + + const std::string pmeTotalVal = + CStringConv::toString(statisticsDoc->getPmeTotal()); + if (! pmeTotalVal.empty()) { + thisXml->addAttribute("pmeTotal", pmeTotalVal); + } + + const std::string pmeDurationSecsVal = + CStringConv::toString(statisticsDoc->getPmeDurationSecs()); + if (! pmeDurationSecsVal.empty()) { + thisXml->addAttribute("pmeDurationSecs", pmeDurationSecsVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCStatisticsDoc StatisticsXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("StatisticsXml", "parse"); + + SmartPtrCStatisticsDoc statisticsDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement propertyCollectionXml = + thisXml->findRequiredChild("propertyCollection"); + + SmartPtrCPropertyCollectionDoc propertyCollectionVal; + if (! propertyCollectionXml.IsNull()) { + propertyCollectionVal = PropertyCollectionXml::parse(propertyCollectionXml); + } + + const std::string providerJobNumStrVal = + thisXml->findOptionalAttribute("providerJobNum"); + int32 providerJobNumVal = 0; + if (! providerJobNumStrVal.empty()) { + providerJobNumVal = CStringConv::fromString(providerJobNumStrVal); + } + + const std::string providerJobTotalStrVal = + thisXml->findOptionalAttribute("providerJobTotal"); + int32 providerJobTotalVal = 0; + if (! providerJobTotalStrVal.empty()) { + providerJobTotalVal = CStringConv::fromString(providerJobTotalStrVal); + } + + const std::string providerJobDurationSecsStrVal = + thisXml->findOptionalAttribute("providerJobDurationSecs"); + int32 providerJobDurationSecsVal = 0; + if (! providerJobDurationSecsStrVal.empty()) { + providerJobDurationSecsVal = CStringConv::fromString(providerJobDurationSecsStrVal); + } + + const std::string pmeNumStrVal = + thisXml->findOptionalAttribute("pmeNum"); + int32 pmeNumVal = 0; + if (! pmeNumStrVal.empty()) { + pmeNumVal = CStringConv::fromString(pmeNumStrVal); + } + + const std::string pmeTotalStrVal = + thisXml->findOptionalAttribute("pmeTotal"); + int32 pmeTotalVal = 0; + if (! pmeTotalStrVal.empty()) { + pmeTotalVal = CStringConv::fromString(pmeTotalStrVal); + } + + const std::string pmeDurationSecsStrVal = + thisXml->findOptionalAttribute("pmeDurationSecs"); + int32 pmeDurationSecsVal = 0; + if (! pmeDurationSecsStrVal.empty()) { + pmeDurationSecsVal = CStringConv::fromString(pmeDurationSecsStrVal); + } + + statisticsDoc.CreateInstance(); + statisticsDoc->initialize( + propertyCollectionVal, + providerJobNumVal, + providerJobTotalVal, + providerJobDurationSecsVal, + pmeNumVal, + pmeTotalVal, + pmeDurationSecsVal); + } + CAF_CM_EXIT; + + return statisticsDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/stdafx.h new file mode 100644 index 000000000..b2390b571 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafCoreTypesXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define CAFCORETYPESXML_LINKAGE __declspec(dllexport) +#else + #define CAFCORETYPESXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp new file mode 100644 index 000000000..624aff06e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp @@ -0,0 +1,250 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/RequestXml.h" +#include "Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.h" +#include "Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.h" +#include "Doc/DocXml/CafInstallRequestXml/InstallRequestXml.h" + +#include "Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallRequestDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h" + +using namespace Caf; + +std::string XmlRoots::saveInstallRequestToString( + const SmartPtrCInstallRequestDoc installRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveInstallRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/CafInstallRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "installRequest", schemaNamespace, schemaLocation); + InstallRequestXml::add(installRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCInstallRequestDoc XmlRoots::parseInstallRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallRequestFromString"); + + SmartPtrCInstallRequestDoc installRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = RequestXml::parseString(xml, "caf:installRequest"); + installRequestDoc = InstallRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installRequestDoc; +} + +void XmlRoots::saveInstallRequestToFile( + const SmartPtrCInstallRequestDoc installRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveInstallRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string installRequestStr = + saveInstallRequestToString(installRequestDoc); + FileSystemUtils::saveTextFile(filePath, installRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallRequestDoc XmlRoots::parseInstallRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallRequestFromFile"); + + SmartPtrCInstallRequestDoc installRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = RequestXml::parseFile(filePath, "caf:installRequest"); + installRequestDoc = InstallRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installRequestDoc; +} + +std::string XmlRoots::saveInstallProviderSpecToString( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveInstallProviderSpecToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpecDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/CafInstallRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "installProviderSpec", schemaNamespace, schemaLocation); + InstallProviderSpecXml::add(installProviderSpecDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCInstallProviderSpecDoc XmlRoots::parseInstallProviderSpecFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallProviderSpecFromString"); + + SmartPtrCInstallProviderSpecDoc installProviderSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:installProviderSpec"); + installProviderSpecDoc = InstallProviderSpecXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installProviderSpecDoc; +} + +void XmlRoots::saveInstallProviderSpecToFile( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveInstallProviderSpecToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpecDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string installProviderSpecStr = + saveInstallProviderSpecToString(installProviderSpecDoc); + FileSystemUtils::saveTextFile(filePath, installProviderSpecStr); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallProviderSpecDoc XmlRoots::parseInstallProviderSpecFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallProviderSpecFromFile"); + + SmartPtrCInstallProviderSpecDoc installProviderSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:installProviderSpec"); + installProviderSpecDoc = InstallProviderSpecXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installProviderSpecDoc; +} + +std::string XmlRoots::saveInstallPackageSpecToString( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveInstallPackageSpecToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpecDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/CafInstallRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "installPackageSpec", schemaNamespace, schemaLocation); + InstallPackageSpecXml::add(installPackageSpecDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCInstallPackageSpecDoc XmlRoots::parseInstallPackageSpecFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallPackageSpecFromString"); + + SmartPtrCInstallPackageSpecDoc installPackageSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:installPackageSpec"); + installPackageSpecDoc = InstallPackageSpecXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installPackageSpecDoc; +} + +void XmlRoots::saveInstallPackageSpecToFile( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveInstallPackageSpecToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpecDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string installPackageSpecStr = + saveInstallPackageSpecToString(installPackageSpecDoc); + FileSystemUtils::saveTextFile(filePath, installPackageSpecStr); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallPackageSpecDoc XmlRoots::parseInstallPackageSpecFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseInstallPackageSpecFromFile"); + + SmartPtrCInstallPackageSpecDoc installPackageSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:installPackageSpec"); + installPackageSpecDoc = InstallPackageSpecXml::parse(rootXml); + } + CAF_CM_EXIT; + + return installPackageSpecDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp new file mode 100644 index 000000000..4a1b1ec88 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp @@ -0,0 +1,125 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafInstallRequestXml/PackageDefnXml.h" + +#include "Doc/CafInstallRequestDoc/CFullPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CPackageDefnDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.h" + +using namespace Caf; + +void FullPackageElemXml::add( + const SmartPtrCFullPackageElemDoc fullPackageElemDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("FullPackageElemXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(fullPackageElemDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string indexVal = + CStringConv::toString(fullPackageElemDoc->getIndex()); + CAF_CM_VALIDATE_STRING(indexVal); + thisXml->addAttribute("index", indexVal); + + const std::string packageNamespaceVal = fullPackageElemDoc->getPackageNamespace(); + CAF_CM_VALIDATE_STRING(packageNamespaceVal); + thisXml->addAttribute("packageNamespace", packageNamespaceVal); + + const std::string packageNameVal = fullPackageElemDoc->getPackageName(); + CAF_CM_VALIDATE_STRING(packageNameVal); + thisXml->addAttribute("packageName", packageNameVal); + + const std::string packageVersionVal = fullPackageElemDoc->getPackageVersion(); + CAF_CM_VALIDATE_STRING(packageVersionVal); + thisXml->addAttribute("packageVersion", packageVersionVal); + + const SmartPtrCPackageDefnDoc installPackageVal = + fullPackageElemDoc->getInstallPackage(); + CAF_CM_VALIDATE_SMARTPTR(installPackageVal); + + const SmartPtrCXmlElement installPackageXml = + thisXml->createAndAddElement("installPackage"); + PackageDefnXml::add(installPackageVal, installPackageXml); + + const SmartPtrCPackageDefnDoc uninstallPackageVal = + fullPackageElemDoc->getUninstallPackage(); + CAF_CM_VALIDATE_SMARTPTR(uninstallPackageVal); + + const SmartPtrCXmlElement uninstallPackageXml = + thisXml->createAndAddElement("uninstallPackage"); + PackageDefnXml::add(uninstallPackageVal, uninstallPackageXml); + } + CAF_CM_EXIT; +} + +SmartPtrCFullPackageElemDoc FullPackageElemXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("FullPackageElemXml", "parse"); + + SmartPtrCFullPackageElemDoc fullPackageElemDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string indexStrVal = + thisXml->findRequiredAttribute("index"); + int32 indexVal = 0; + if (! indexStrVal.empty()) { + indexVal = CStringConv::fromString(indexStrVal); + } + + const std::string packageNamespaceStrVal = + thisXml->findRequiredAttribute("packageNamespace"); + const std::string packageNamespaceVal = packageNamespaceStrVal; + + const std::string packageNameStrVal = + thisXml->findRequiredAttribute("packageName"); + const std::string packageNameVal = packageNameStrVal; + + const std::string packageVersionStrVal = + thisXml->findRequiredAttribute("packageVersion"); + const std::string packageVersionVal = packageVersionStrVal; + + const SmartPtrCXmlElement installPackageXml = + thisXml->findRequiredChild("installPackage"); + + SmartPtrCPackageDefnDoc installPackageVal; + if (! installPackageXml.IsNull()) { + installPackageVal = PackageDefnXml::parse(installPackageXml); + } + + const SmartPtrCXmlElement uninstallPackageXml = + thisXml->findRequiredChild("uninstallPackage"); + + SmartPtrCPackageDefnDoc uninstallPackageVal; + if (! uninstallPackageXml.IsNull()) { + uninstallPackageVal = PackageDefnXml::parse(uninstallPackageXml); + } + + fullPackageElemDoc.CreateInstance(); + fullPackageElemDoc->initialize( + indexVal, + packageNamespaceVal, + packageNameVal, + packageVersionVal, + installPackageVal, + uninstallPackageVal); + } + CAF_CM_EXIT; + + return fullPackageElemDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp new file mode 100644 index 000000000..33865cbee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.h" + +using namespace Caf; + +void GetInventoryJobXml::add( + const SmartPtrCGetInventoryJobDoc getInventoryJobDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("GetInventoryJobXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(getInventoryJobDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(getInventoryJobDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + } + CAF_CM_EXIT; +} + +SmartPtrCGetInventoryJobDoc GetInventoryJobXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("GetInventoryJobXml", "parse"); + + SmartPtrCGetInventoryJobDoc getInventoryJobDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + getInventoryJobDoc.CreateInstance(); + getInventoryJobDoc->initialize( + jobIdVal); + } + CAF_CM_EXIT; + + return getInventoryJobDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp new file mode 100644 index 000000000..82dd7adc7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.h" +#include "Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h" +#include "Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h" + +#include "Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallBatchDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/InstallBatchXml.h" + +using namespace Caf; + +void InstallBatchXml::add( + const SmartPtrCInstallBatchDoc installBatchDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallBatchXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installBatchDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCGetInventoryJobDoc getInventoryVal = + installBatchDoc->getGetInventory(); + if (! getInventoryVal.IsNull()) { + const SmartPtrCXmlElement getInventoryXml = + thisXml->createAndAddElement("getInventory"); + GetInventoryJobXml::add(getInventoryVal, getInventoryXml); + } + + const SmartPtrCInstallProviderJobDoc installProviderVal = + installBatchDoc->getInstallProvider(); + if (! installProviderVal.IsNull()) { + const SmartPtrCXmlElement installProviderXml = + thisXml->createAndAddElement("installProvider"); + InstallProviderJobXml::add(installProviderVal, installProviderXml); + } + + const SmartPtrCUninstallProviderJobDoc uninstallProviderVal = + installBatchDoc->getUninstallProvider(); + if (! uninstallProviderVal.IsNull()) { + const SmartPtrCXmlElement uninstallProviderXml = + thisXml->createAndAddElement("uninstallProvider"); + UninstallProviderJobXml::add(uninstallProviderVal, uninstallProviderXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCInstallBatchDoc InstallBatchXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallBatchXml", "parse"); + + SmartPtrCInstallBatchDoc installBatchDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement getInventoryXml = + thisXml->findOptionalChild("getInventory"); + + SmartPtrCGetInventoryJobDoc getInventoryVal; + if (! getInventoryXml.IsNull()) { + getInventoryVal = GetInventoryJobXml::parse(getInventoryXml); + } + + const SmartPtrCXmlElement installProviderXml = + thisXml->findOptionalChild("installProvider"); + + SmartPtrCInstallProviderJobDoc installProviderVal; + if (! installProviderXml.IsNull()) { + installProviderVal = InstallProviderJobXml::parse(installProviderXml); + } + + const SmartPtrCXmlElement uninstallProviderXml = + thisXml->findOptionalChild("uninstallProvider"); + + SmartPtrCUninstallProviderJobDoc uninstallProviderVal; + if (! uninstallProviderXml.IsNull()) { + uninstallProviderVal = UninstallProviderJobXml::parse(uninstallProviderXml); + } + + installBatchDoc.CreateInstance(); + installBatchDoc->initialize( + getInventoryVal, + installProviderVal, + uninstallProviderVal); + } + CAF_CM_EXIT; + + return installBatchDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp new file mode 100644 index 000000000..58ae2e59b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp @@ -0,0 +1,144 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.h" + +using namespace Caf; + +void InstallPackageSpecXml::add( + const SmartPtrCInstallPackageSpecDoc installPackageSpecDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallPackageSpecXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpecDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string packageNamespaceVal = installPackageSpecDoc->getPackageNamespace(); + CAF_CM_VALIDATE_STRING(packageNamespaceVal); + thisXml->addAttribute("packageNamespace", packageNamespaceVal); + + const std::string packageNameVal = installPackageSpecDoc->getPackageName(); + CAF_CM_VALIDATE_STRING(packageNameVal); + thisXml->addAttribute("packageName", packageNameVal); + + const std::string packageVersionVal = installPackageSpecDoc->getPackageVersion(); + CAF_CM_VALIDATE_STRING(packageVersionVal); + thisXml->addAttribute("packageVersion", packageVersionVal); + + const std::string startupAttachmentNameVal = installPackageSpecDoc->getStartupAttachmentName(); + CAF_CM_VALIDATE_STRING(startupAttachmentNameVal); + thisXml->addAttribute("startupAttachmentName", startupAttachmentNameVal); + + const std::string packageAttachmentNameVal = installPackageSpecDoc->getPackageAttachmentName(); + CAF_CM_VALIDATE_STRING(packageAttachmentNameVal); + thisXml->addAttribute("packageAttachmentName", packageAttachmentNameVal); + + const SmartPtrCAttachmentNameCollectionDoc supportingAttachmentNameCollectionVal = + installPackageSpecDoc->getSupportingAttachmentNameCollection(); + if (! supportingAttachmentNameCollectionVal.IsNull()) { + const SmartPtrCXmlElement supportingAttachmentNameCollectionXml = + thisXml->createAndAddElement("attachmentNameCollection"); + AttachmentNameCollectionXml::add(supportingAttachmentNameCollectionVal, supportingAttachmentNameCollectionXml); + } + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + installPackageSpecDoc->getAttachmentCollection(); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollectionVal); + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + + const std::string argumentsVal = installPackageSpecDoc->getArguments(); + if (! argumentsVal.empty()) { + thisXml->addAttribute("arguments", argumentsVal); + } + + thisXml->addAttribute("version", "1.0"); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallPackageSpecDoc InstallPackageSpecXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallPackageSpecXml", "parse"); + + SmartPtrCInstallPackageSpecDoc installPackageSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string packageNamespaceStrVal = + thisXml->findRequiredAttribute("packageNamespace"); + const std::string packageNamespaceVal = packageNamespaceStrVal; + + const std::string packageNameStrVal = + thisXml->findRequiredAttribute("packageName"); + const std::string packageNameVal = packageNameStrVal; + + const std::string packageVersionStrVal = + thisXml->findRequiredAttribute("packageVersion"); + const std::string packageVersionVal = packageVersionStrVal; + + const std::string startupAttachmentNameStrVal = + thisXml->findRequiredAttribute("startupAttachmentName"); + const std::string startupAttachmentNameVal = startupAttachmentNameStrVal; + + const std::string packageAttachmentNameStrVal = + thisXml->findRequiredAttribute("packageAttachmentName"); + const std::string packageAttachmentNameVal = packageAttachmentNameStrVal; + + const SmartPtrCXmlElement supportingAttachmentNameCollectionXml = + thisXml->findOptionalChild("attachmentNameCollection"); + + SmartPtrCAttachmentNameCollectionDoc supportingAttachmentNameCollectionVal; + if (! supportingAttachmentNameCollectionXml.IsNull()) { + supportingAttachmentNameCollectionVal = AttachmentNameCollectionXml::parse(supportingAttachmentNameCollectionXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findRequiredChild("attachmentCollection"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + const std::string argumentsStrVal = + thisXml->findOptionalAttribute("arguments"); + const std::string argumentsVal = argumentsStrVal; + + installPackageSpecDoc.CreateInstance(); + installPackageSpecDoc->initialize( + packageNamespaceVal, + packageNameVal, + packageVersionVal, + startupAttachmentNameVal, + packageAttachmentNameVal, + supportingAttachmentNameCollectionVal, + attachmentCollectionVal, + argumentsVal); + } + CAF_CM_EXIT; + + return installPackageSpecDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp new file mode 100644 index 000000000..bb87fc0b0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp @@ -0,0 +1,147 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" + +#include "Doc/CafInstallRequestDoc/CFullPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h" + +using namespace Caf; + +void InstallProviderJobXml::add( + const SmartPtrCInstallProviderJobDoc installProviderJobDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallProviderJobXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installProviderJobDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(installProviderJobDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(installProviderJobDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string providerNamespaceVal = installProviderJobDoc->getProviderNamespace(); + CAF_CM_VALIDATE_STRING(providerNamespaceVal); + thisXml->addAttribute("providerNamespace", providerNamespaceVal); + + const std::string providerNameVal = installProviderJobDoc->getProviderName(); + CAF_CM_VALIDATE_STRING(providerNameVal); + thisXml->addAttribute("providerName", providerNameVal); + + const std::string providerVersionVal = installProviderJobDoc->getProviderVersion(); + CAF_CM_VALIDATE_STRING(providerVersionVal); + thisXml->addAttribute("providerVersion", providerVersionVal); + + const std::string packageOSTypeVal = + EnumConvertersXml::convertPackageOSTypeToString(installProviderJobDoc->getPackageOSType()); + CAF_CM_VALIDATE_STRING(packageOSTypeVal); + thisXml->addAttribute("packageOSType", packageOSTypeVal); + + const std::deque packageValVal = + installProviderJobDoc->getPackageCollection(); + CAF_CM_VALIDATE_STL(packageValVal); + + if (! packageValVal.empty()) { + const SmartPtrCXmlElement packageCollectionXml = + thisXml->createAndAddElement("packageCollection"); + for (TConstIterator > packageValIter(packageValVal); + packageValIter; packageValIter++) { + const SmartPtrCXmlElement packageValXml = + packageCollectionXml->createAndAddElement("package"); + FullPackageElemXml::add(*packageValIter, packageValXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCInstallProviderJobDoc InstallProviderJobXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallProviderJobXml", "parse"); + + SmartPtrCInstallProviderJobDoc installProviderJobDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + + const std::string providerNamespaceStrVal = + thisXml->findRequiredAttribute("providerNamespace"); + const std::string providerNamespaceVal = providerNamespaceStrVal; + + const std::string providerNameStrVal = + thisXml->findRequiredAttribute("providerName"); + const std::string providerNameVal = providerNameStrVal; + + const std::string providerVersionStrVal = + thisXml->findRequiredAttribute("providerVersion"); + const std::string providerVersionVal = providerVersionStrVal; + + const std::string packageOSTypeStrVal = + thisXml->findRequiredAttribute("packageOSType"); + PACKAGE_OS_TYPE packageOSTypeVal = PACKAGE_OS_NONE; + if (! packageOSTypeStrVal.empty()) { + packageOSTypeVal = EnumConvertersXml::convertStringToPackageOSType(packageOSTypeStrVal); + } + + const SmartPtrCXmlElement packageCollectionXml = + thisXml->findRequiredChild("packageCollection"); + const CXmlElement::SmartPtrCElementCollection packageValChildrenXml = + packageCollectionXml->findRequiredChildren("package"); + + std::deque packageValVal; + if (! packageValChildrenXml.IsNull() && ! packageValChildrenXml->empty()) { + for (TConstIterator packageValXmlIter(*packageValChildrenXml); + packageValXmlIter; packageValXmlIter++) { + const SmartPtrCXmlElement packageValXml = packageValXmlIter->second; + const SmartPtrCFullPackageElemDoc packageValDoc = + FullPackageElemXml::parse(packageValXml); + packageValVal.push_back(packageValDoc); + } + } + + installProviderJobDoc.CreateInstance(); + installProviderJobDoc->initialize( + clientIdVal, + jobIdVal, + providerNamespaceVal, + providerNameVal, + providerVersionVal, + packageOSTypeVal, + packageValVal); + } + CAF_CM_EXIT; + + return installProviderJobDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp new file mode 100644 index 000000000..39d795080 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp @@ -0,0 +1,121 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.h" + +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CMinPackageElemDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.h" + +using namespace Caf; + +void InstallProviderSpecXml::add( + const SmartPtrCInstallProviderSpecDoc installProviderSpecDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallProviderSpecXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpecDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(installProviderSpecDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string providerNamespaceVal = installProviderSpecDoc->getProviderNamespace(); + CAF_CM_VALIDATE_STRING(providerNamespaceVal); + thisXml->addAttribute("providerNamespace", providerNamespaceVal); + + const std::string providerNameVal = installProviderSpecDoc->getProviderName(); + CAF_CM_VALIDATE_STRING(providerNameVal); + thisXml->addAttribute("providerName", providerNameVal); + + const std::string providerVersionVal = installProviderSpecDoc->getProviderVersion(); + CAF_CM_VALIDATE_STRING(providerVersionVal); + thisXml->addAttribute("providerVersion", providerVersionVal); + + const std::deque packageValVal = + installProviderSpecDoc->getPackageCollection(); + CAF_CM_VALIDATE_STL(packageValVal); + + if (! packageValVal.empty()) { + for (TConstIterator > packageValIter(packageValVal); + packageValIter; packageValIter++) { + const SmartPtrCXmlElement packageValXml = + thisXml->createAndAddElement("package"); + MinPackageElemXml::add(*packageValIter, packageValXml); + } + } + + thisXml->addAttribute("version", "1.0"); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallProviderSpecDoc InstallProviderSpecXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallProviderSpecXml", "parse"); + + SmartPtrCInstallProviderSpecDoc installProviderSpecDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string providerNamespaceStrVal = + thisXml->findRequiredAttribute("providerNamespace"); + const std::string providerNamespaceVal = providerNamespaceStrVal; + + const std::string providerNameStrVal = + thisXml->findRequiredAttribute("providerName"); + const std::string providerNameVal = providerNameStrVal; + + const std::string providerVersionStrVal = + thisXml->findRequiredAttribute("providerVersion"); + const std::string providerVersionVal = providerVersionStrVal; + + const CXmlElement::SmartPtrCElementCollection packageValChildrenXml = + thisXml->findRequiredChildren("package"); + + std::deque packageValVal; + if (! packageValChildrenXml.IsNull() && ! packageValChildrenXml->empty()) { + for (TConstIterator packageValXmlIter(*packageValChildrenXml); + packageValXmlIter; packageValXmlIter++) { + const SmartPtrCXmlElement packageValXml = packageValXmlIter->second; + const SmartPtrCMinPackageElemDoc packageValDoc = + MinPackageElemXml::parse(packageValXml); + packageValVal.push_back(packageValDoc); + } + } + + installProviderSpecDoc.CreateInstance(); + installProviderSpecDoc->initialize( + clientIdVal, + providerNamespaceVal, + providerNameVal, + providerVersionVal, + packageValVal); + } + CAF_CM_EXIT; + + return installProviderSpecDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp new file mode 100644 index 000000000..b9c721f65 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp @@ -0,0 +1,140 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h" +#include "Doc/DocXml/CafInstallRequestXml/InstallBatchXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallBatchDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallRequestDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/InstallRequestXml.h" + +using namespace Caf; + +void InstallRequestXml::add( + const SmartPtrCInstallRequestDoc installRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(installRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(installRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = installRequestDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const SmartPtrCRequestHeaderDoc requestHeaderVal = + installRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + RequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + + const SmartPtrCInstallBatchDoc batchVal = + installRequestDoc->getBatch(); + CAF_CM_VALIDATE_SMARTPTR(batchVal); + + const SmartPtrCXmlElement batchXml = + thisXml->createAndAddElement("batch"); + InstallBatchXml::add(batchVal, batchXml); + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + installRequestDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCInstallRequestDoc InstallRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstallRequestXml", "parse"); + + SmartPtrCInstallRequestDoc installRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + + SmartPtrCRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = RequestHeaderXml::parse(requestHeaderXml); + } + + const SmartPtrCXmlElement batchXml = + thisXml->findRequiredChild("batch"); + + SmartPtrCInstallBatchDoc batchVal; + if (! batchXml.IsNull()) { + batchVal = InstallBatchXml::parse(batchXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + installRequestDoc.CreateInstance(); + installRequestDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + requestHeaderVal, + batchVal, + attachmentCollectionVal); + } + CAF_CM_EXIT; + + return installRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp new file mode 100644 index 000000000..2c839b68b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/CafInstallRequestDoc/CMinPackageElemDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.h" + +using namespace Caf; + +void MinPackageElemXml::add( + const SmartPtrCMinPackageElemDoc minPackageElemDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MinPackageElemXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(minPackageElemDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string indexVal = + CStringConv::toString(minPackageElemDoc->getIndex()); + CAF_CM_VALIDATE_STRING(indexVal); + thisXml->addAttribute("index", indexVal); + + const std::string packageNamespaceVal = minPackageElemDoc->getPackageNamespace(); + CAF_CM_VALIDATE_STRING(packageNamespaceVal); + thisXml->addAttribute("packageNamespace", packageNamespaceVal); + + const std::string packageNameVal = minPackageElemDoc->getPackageName(); + CAF_CM_VALIDATE_STRING(packageNameVal); + thisXml->addAttribute("packageName", packageNameVal); + + const std::string packageVersionVal = minPackageElemDoc->getPackageVersion(); + CAF_CM_VALIDATE_STRING(packageVersionVal); + thisXml->addAttribute("packageVersion", packageVersionVal); + } + CAF_CM_EXIT; +} + +SmartPtrCMinPackageElemDoc MinPackageElemXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MinPackageElemXml", "parse"); + + SmartPtrCMinPackageElemDoc minPackageElemDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string indexStrVal = + thisXml->findRequiredAttribute("index"); + int32 indexVal = 0; + if (! indexStrVal.empty()) { + indexVal = CStringConv::fromString(indexStrVal); + } + + const std::string packageNamespaceStrVal = + thisXml->findRequiredAttribute("packageNamespace"); + const std::string packageNamespaceVal = packageNamespaceStrVal; + + const std::string packageNameStrVal = + thisXml->findRequiredAttribute("packageName"); + const std::string packageNameVal = packageNameStrVal; + + const std::string packageVersionStrVal = + thisXml->findRequiredAttribute("packageVersion"); + const std::string packageVersionVal = packageVersionStrVal; + + minPackageElemDoc.CreateInstance(); + minPackageElemDoc->initialize( + indexVal, + packageNamespaceVal, + packageNameVal, + packageVersionVal); + } + CAF_CM_EXIT; + + return minPackageElemDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp new file mode 100644 index 000000000..187dc1f5e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp @@ -0,0 +1,96 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Doc/CafInstallRequestDoc/CPackageDefnDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/PackageDefnXml.h" + +using namespace Caf; + +void PackageDefnXml::add( + const SmartPtrCPackageDefnDoc packageDefnDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PackageDefnXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(packageDefnDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string startupAttachmentNameVal = packageDefnDoc->getStartupAttachmentName(); + CAF_CM_VALIDATE_STRING(startupAttachmentNameVal); + thisXml->addAttribute("startupAttachmentName", startupAttachmentNameVal); + + const std::string packageAttachmentNameVal = packageDefnDoc->getPackageAttachmentName(); + CAF_CM_VALIDATE_STRING(packageAttachmentNameVal); + thisXml->addAttribute("packageAttachmentName", packageAttachmentNameVal); + + const SmartPtrCAttachmentNameCollectionDoc supportingAttachmentNameCollectionVal = + packageDefnDoc->getSupportingAttachmentNameCollection(); + if (! supportingAttachmentNameCollectionVal.IsNull()) { + const SmartPtrCXmlElement supportingAttachmentNameCollectionXml = + thisXml->createAndAddElement("attachmentNameCollection"); + AttachmentNameCollectionXml::add(supportingAttachmentNameCollectionVal, supportingAttachmentNameCollectionXml); + } + + const std::string argumentsVal = packageDefnDoc->getArguments(); + if (! argumentsVal.empty()) { + thisXml->addAttribute("arguments", argumentsVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCPackageDefnDoc PackageDefnXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PackageDefnXml", "parse"); + + SmartPtrCPackageDefnDoc packageDefnDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string startupAttachmentNameStrVal = + thisXml->findRequiredAttribute("startupAttachmentName"); + const std::string startupAttachmentNameVal = startupAttachmentNameStrVal; + + const std::string packageAttachmentNameStrVal = + thisXml->findRequiredAttribute("packageAttachmentName"); + const std::string packageAttachmentNameVal = packageAttachmentNameStrVal; + + const SmartPtrCXmlElement supportingAttachmentNameCollectionXml = + thisXml->findOptionalChild("attachmentNameCollection"); + + SmartPtrCAttachmentNameCollectionDoc supportingAttachmentNameCollectionVal; + if (! supportingAttachmentNameCollectionXml.IsNull()) { + supportingAttachmentNameCollectionVal = AttachmentNameCollectionXml::parse(supportingAttachmentNameCollectionXml); + } + + const std::string argumentsStrVal = + thisXml->findOptionalAttribute("arguments"); + const std::string argumentsVal = argumentsStrVal; + + packageDefnDoc.CreateInstance(); + packageDefnDoc->initialize( + startupAttachmentNameVal, + packageAttachmentNameVal, + supportingAttachmentNameCollectionVal, + argumentsVal); + } + CAF_CM_EXIT; + + return packageDefnDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp new file mode 100644 index 000000000..7092709cc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp @@ -0,0 +1,113 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" + +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h" + +using namespace Caf; + +void UninstallProviderJobXml::add( + const SmartPtrCUninstallProviderJobDoc uninstallProviderJobDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("UninstallProviderJobXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(uninstallProviderJobDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(uninstallProviderJobDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(uninstallProviderJobDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string providerNamespaceVal = uninstallProviderJobDoc->getProviderNamespace(); + CAF_CM_VALIDATE_STRING(providerNamespaceVal); + thisXml->addAttribute("providerNamespace", providerNamespaceVal); + + const std::string providerNameVal = uninstallProviderJobDoc->getProviderName(); + CAF_CM_VALIDATE_STRING(providerNameVal); + thisXml->addAttribute("providerName", providerNameVal); + + const std::string providerVersionVal = uninstallProviderJobDoc->getProviderVersion(); + CAF_CM_VALIDATE_STRING(providerVersionVal); + thisXml->addAttribute("providerVersion", providerVersionVal); + + const std::string packageOSTypeVal = + EnumConvertersXml::convertPackageOSTypeToString(uninstallProviderJobDoc->getPackageOSType()); + CAF_CM_VALIDATE_STRING(packageOSTypeVal); + thisXml->addAttribute("packageOSType", packageOSTypeVal); + } + CAF_CM_EXIT; +} + +SmartPtrCUninstallProviderJobDoc UninstallProviderJobXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("UninstallProviderJobXml", "parse"); + + SmartPtrCUninstallProviderJobDoc uninstallProviderJobDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + + const std::string providerNamespaceStrVal = + thisXml->findRequiredAttribute("providerNamespace"); + const std::string providerNamespaceVal = providerNamespaceStrVal; + + const std::string providerNameStrVal = + thisXml->findRequiredAttribute("providerName"); + const std::string providerNameVal = providerNameStrVal; + + const std::string providerVersionStrVal = + thisXml->findRequiredAttribute("providerVersion"); + const std::string providerVersionVal = providerVersionStrVal; + + const std::string packageOSTypeStrVal = + thisXml->findRequiredAttribute("packageOSType"); + PACKAGE_OS_TYPE packageOSTypeVal = PACKAGE_OS_NONE; + if (! packageOSTypeStrVal.empty()) { + packageOSTypeVal = EnumConvertersXml::convertStringToPackageOSType(packageOSTypeStrVal); + } + + uninstallProviderJobDoc.CreateInstance(); + uninstallProviderJobDoc->initialize( + clientIdVal, + jobIdVal, + providerNamespaceVal, + providerNameVal, + providerVersionVal, + packageOSTypeVal); + } + CAF_CM_EXIT; + + return uninstallProviderJobDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/stdafx.h new file mode 100644 index 000000000..49d3d214c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/CafInstallRequestXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define CAFINSTALLREQUESTXML_LINKAGE __declspec(dllexport) +#else + #define CAFINSTALLREQUESTXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp new file mode 100644 index 000000000..ed54bfa59 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp @@ -0,0 +1,121 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h" +#include "Doc/DocXml/DiagTypesXml/DiagBatchXml.h" + +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/DiagRequestDoc/CDiagRequestDoc.h" +#include "Doc/DiagTypesDoc/CDiagBatchDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/DiagRequestXml/DiagRequestXml.h" + +using namespace Caf; + +void DiagRequestXml::add( + const SmartPtrCDiagRequestDoc diagRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(diagRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(diagRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = diagRequestDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const SmartPtrCRequestHeaderDoc requestHeaderVal = + diagRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + RequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + + const SmartPtrCDiagBatchDoc batchVal = + diagRequestDoc->getBatch(); + CAF_CM_VALIDATE_SMARTPTR(batchVal); + + const SmartPtrCXmlElement batchXml = + thisXml->createAndAddElement("batch"); + DiagBatchXml::add(batchVal, batchXml); + } + CAF_CM_EXIT; +} + +SmartPtrCDiagRequestDoc DiagRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagRequestXml", "parse"); + + SmartPtrCDiagRequestDoc diagRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + + SmartPtrCRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = RequestHeaderXml::parse(requestHeaderXml); + } + + const SmartPtrCXmlElement batchXml = + thisXml->findRequiredChild("batch"); + + SmartPtrCDiagBatchDoc batchVal; + if (! batchXml.IsNull()) { + batchVal = DiagBatchXml::parse(batchXml); + } + + diagRequestDoc.CreateInstance(); + diagRequestDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + requestHeaderVal, + batchVal); + } + CAF_CM_EXIT; + + return diagRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp new file mode 100644 index 000000000..21cd24a1f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp @@ -0,0 +1,96 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/RequestXml.h" +#include "Doc/DocXml/DiagRequestXml/DiagRequestXml.h" + +#include "Doc/DiagRequestDoc/CDiagRequestDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.h" + +using namespace Caf; + +std::string XmlRoots::saveDiagRequestToString( + const SmartPtrCDiagRequestDoc diagRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveDiagRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/DiagRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "diagRequest", schemaNamespace, schemaLocation); + DiagRequestXml::add(diagRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCDiagRequestDoc XmlRoots::parseDiagRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseDiagRequestFromString"); + + SmartPtrCDiagRequestDoc diagRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = RequestXml::parseString(xml, "caf:diagRequest"); + diagRequestDoc = DiagRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return diagRequestDoc; +} + +void XmlRoots::saveDiagRequestToFile( + const SmartPtrCDiagRequestDoc diagRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveDiagRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string diagRequestStr = + saveDiagRequestToString(diagRequestDoc); + FileSystemUtils::saveTextFile(filePath, diagRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCDiagRequestDoc XmlRoots::parseDiagRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseDiagRequestFromFile"); + + SmartPtrCDiagRequestDoc diagRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = RequestXml::parseFile(filePath, "caf:diagRequest"); + diagRequestDoc = DiagRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return diagRequestDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/stdafx.h new file mode 100644 index 000000000..75e50bf79 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagRequestXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define DIAGREQUESTXML_LINKAGE __declspec(dllexport) +#else + #define DIAGREQUESTXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp new file mode 100644 index 000000000..60f1ef32b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.h" +#include "Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.h" +#include "Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.h" + +#include "Doc/DiagTypesDoc/CDiagBatchDoc.h" +#include "Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h" +#include "Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h" +#include "Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/DiagTypesXml/DiagBatchXml.h" + +using namespace Caf; + +void DiagBatchXml::add( + const SmartPtrCDiagBatchDoc diagBatchDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagBatchXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagBatchDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCDiagCollectInstancesDoc collectInstancesVal = + diagBatchDoc->getCollectInstances(); + if (! collectInstancesVal.IsNull()) { + const SmartPtrCXmlElement collectInstancesXml = + thisXml->createAndAddElement("collectInstances"); + DiagCollectInstancesXml::add(collectInstancesVal, collectInstancesXml); + } + + const SmartPtrCDiagSetValueCollectionDoc setValueCollectionVal = + diagBatchDoc->getSetValueCollection(); + if (! setValueCollectionVal.IsNull()) { + const SmartPtrCXmlElement setValueCollectionXml = + thisXml->createAndAddElement("setValueCollection"); + DiagSetValueCollectionXml::add(setValueCollectionVal, setValueCollectionXml); + } + + const SmartPtrCDiagDeleteValueCollectionDoc deleteValueCollectionVal = + diagBatchDoc->getDeleteValueCollection(); + if (! deleteValueCollectionVal.IsNull()) { + const SmartPtrCXmlElement deleteValueCollectionXml = + thisXml->createAndAddElement("deleteValueCollection"); + DiagDeleteValueCollectionXml::add(deleteValueCollectionVal, deleteValueCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCDiagBatchDoc DiagBatchXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagBatchXml", "parse"); + + SmartPtrCDiagBatchDoc diagBatchDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement collectInstancesXml = + thisXml->findOptionalChild("collectInstances"); + + SmartPtrCDiagCollectInstancesDoc collectInstancesVal; + if (! collectInstancesXml.IsNull()) { + collectInstancesVal = DiagCollectInstancesXml::parse(collectInstancesXml); + } + + const SmartPtrCXmlElement setValueCollectionXml = + thisXml->findOptionalChild("setValueCollection"); + + SmartPtrCDiagSetValueCollectionDoc setValueCollectionVal; + if (! setValueCollectionXml.IsNull()) { + setValueCollectionVal = DiagSetValueCollectionXml::parse(setValueCollectionXml); + } + + const SmartPtrCXmlElement deleteValueCollectionXml = + thisXml->findOptionalChild("deleteValueCollection"); + + SmartPtrCDiagDeleteValueCollectionDoc deleteValueCollectionVal; + if (! deleteValueCollectionXml.IsNull()) { + deleteValueCollectionVal = DiagDeleteValueCollectionXml::parse(deleteValueCollectionXml); + } + + diagBatchDoc.CreateInstance(); + diagBatchDoc->initialize( + collectInstancesVal, + setValueCollectionVal, + deleteValueCollectionVal); + } + CAF_CM_EXIT; + + return diagBatchDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.cpp new file mode 100644 index 000000000..c87f76c5d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.cpp @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.h" + +using namespace Caf; + +void DiagCollectInstancesXml::add( + const SmartPtrCDiagCollectInstancesDoc diagCollectInstancesDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagCollectInstancesXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagCollectInstancesDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(diagCollectInstancesDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + } + CAF_CM_EXIT; +} + +SmartPtrCDiagCollectInstancesDoc DiagCollectInstancesXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagCollectInstancesXml", "parse"); + + SmartPtrCDiagCollectInstancesDoc diagCollectInstancesDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + diagCollectInstancesDoc.CreateInstance(); + diagCollectInstancesDoc->initialize( + jobIdVal); + } + CAF_CM_EXIT; + + return diagCollectInstancesDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.cpp new file mode 100644 index 000000000..257bf2310 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.h" + +#include "Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h" +#include "Doc/DiagTypesDoc/CDiagDeleteValueDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.h" + +using namespace Caf; + +void DiagDeleteValueCollectionXml::add( + const SmartPtrCDiagDeleteValueCollectionDoc diagDeleteValueCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagDeleteValueCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagDeleteValueCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque deleteValueVal = + diagDeleteValueCollectionDoc->getDeleteValueCollection(); + CAF_CM_VALIDATE_STL(deleteValueVal); + + if (! deleteValueVal.empty()) { + for (TConstIterator > deleteValueIter(deleteValueVal); + deleteValueIter; deleteValueIter++) { + const SmartPtrCXmlElement deleteValueXml = + thisXml->createAndAddElement("deleteValue"); + DiagDeleteValueXml::add(*deleteValueIter, deleteValueXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCDiagDeleteValueCollectionDoc DiagDeleteValueCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagDeleteValueCollectionXml", "parse"); + + SmartPtrCDiagDeleteValueCollectionDoc diagDeleteValueCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection deleteValueChildrenXml = + thisXml->findRequiredChildren("deleteValue"); + + std::deque deleteValueVal; + if (! deleteValueChildrenXml.IsNull() && ! deleteValueChildrenXml->empty()) { + for (TConstIterator deleteValueXmlIter(*deleteValueChildrenXml); + deleteValueXmlIter; deleteValueXmlIter++) { + const SmartPtrCXmlElement deleteValueXml = deleteValueXmlIter->second; + const SmartPtrCDiagDeleteValueDoc deleteValueDoc = + DiagDeleteValueXml::parse(deleteValueXml); + deleteValueVal.push_back(deleteValueDoc); + } + } + + diagDeleteValueCollectionDoc.CreateInstance(); + diagDeleteValueCollectionDoc->initialize( + deleteValueVal); + } + CAF_CM_EXIT; + + return diagDeleteValueCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.cpp new file mode 100644 index 000000000..96a0e3caf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.cpp @@ -0,0 +1,87 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DiagTypesDoc/CDiagDeleteValueDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.h" + +using namespace Caf; + +void DiagDeleteValueXml::add( + const SmartPtrCDiagDeleteValueDoc diagDeleteValueDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagDeleteValueXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagDeleteValueDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(diagDeleteValueDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string fileAliasVal = diagDeleteValueDoc->getFileAlias(); + CAF_CM_VALIDATE_STRING(fileAliasVal); + thisXml->addAttribute("fileAlias", fileAliasVal); + + const std::string valueNameVal = + diagDeleteValueDoc->getValueName(); + CAF_CM_VALIDATE_STRING(valueNameVal); + + const SmartPtrCXmlElement valueNameXml = + thisXml->createAndAddElement("valueName"); + valueNameXml->setValue(valueNameVal); + } + CAF_CM_EXIT; +} + +SmartPtrCDiagDeleteValueDoc DiagDeleteValueXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagDeleteValueXml", "parse"); + + SmartPtrCDiagDeleteValueDoc diagDeleteValueDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string fileAliasStrVal = + thisXml->findRequiredAttribute("fileAlias"); + const std::string fileAliasVal = fileAliasStrVal; + + const SmartPtrCXmlElement valueNameXml = + thisXml->findRequiredChild("valueName"); + + std::string valueNameVal; + if (! valueNameXml.IsNull()) { + valueNameVal = valueNameXml->getValue(); + } + + diagDeleteValueDoc.CreateInstance(); + diagDeleteValueDoc->initialize( + jobIdVal, + fileAliasVal, + valueNameVal); + } + CAF_CM_EXIT; + + return diagDeleteValueDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.cpp new file mode 100644 index 000000000..d9048c997 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/DiagTypesXml/DiagSetValueXml.h" + +#include "Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h" +#include "Doc/DiagTypesDoc/CDiagSetValueDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.h" + +using namespace Caf; + +void DiagSetValueCollectionXml::add( + const SmartPtrCDiagSetValueCollectionDoc diagSetValueCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagSetValueCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagSetValueCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque setValueVal = + diagSetValueCollectionDoc->getSetValueCollection(); + CAF_CM_VALIDATE_STL(setValueVal); + + if (! setValueVal.empty()) { + for (TConstIterator > setValueIter(setValueVal); + setValueIter; setValueIter++) { + const SmartPtrCXmlElement setValueXml = + thisXml->createAndAddElement("setValue"); + DiagSetValueXml::add(*setValueIter, setValueXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCDiagSetValueCollectionDoc DiagSetValueCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagSetValueCollectionXml", "parse"); + + SmartPtrCDiagSetValueCollectionDoc diagSetValueCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection setValueChildrenXml = + thisXml->findRequiredChildren("setValue"); + + std::deque setValueVal; + if (! setValueChildrenXml.IsNull() && ! setValueChildrenXml->empty()) { + for (TConstIterator setValueXmlIter(*setValueChildrenXml); + setValueXmlIter; setValueXmlIter++) { + const SmartPtrCXmlElement setValueXml = setValueXmlIter->second; + const SmartPtrCDiagSetValueDoc setValueDoc = + DiagSetValueXml::parse(setValueXml); + setValueVal.push_back(setValueDoc); + } + } + + diagSetValueCollectionDoc.CreateInstance(); + diagSetValueCollectionDoc->initialize( + setValueVal); + } + CAF_CM_EXIT; + + return diagSetValueCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.cpp new file mode 100644 index 000000000..da5471f70 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.cpp @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/PropertyXml.h" + +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" +#include "Doc/DiagTypesDoc/CDiagSetValueDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/DiagTypesXml/DiagSetValueXml.h" + +using namespace Caf; + +void DiagSetValueXml::add( + const SmartPtrCDiagSetValueDoc diagSetValueDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagSetValueXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(diagSetValueDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(diagSetValueDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string fileAliasVal = diagSetValueDoc->getFileAlias(); + CAF_CM_VALIDATE_STRING(fileAliasVal); + thisXml->addAttribute("fileAlias", fileAliasVal); + + const SmartPtrCPropertyDoc valueVal = + diagSetValueDoc->getValue(); + CAF_CM_VALIDATE_SMARTPTR(valueVal); + + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + PropertyXml::add(valueVal, valueXml); + } + CAF_CM_EXIT; +} + +SmartPtrCDiagSetValueDoc DiagSetValueXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DiagSetValueXml", "parse"); + + SmartPtrCDiagSetValueDoc diagSetValueDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string fileAliasStrVal = + thisXml->findRequiredAttribute("fileAlias"); + const std::string fileAliasVal = fileAliasStrVal; + + const SmartPtrCXmlElement valueXml = + thisXml->findRequiredChild("value"); + + SmartPtrCPropertyDoc valueVal; + if (! valueXml.IsNull()) { + valueVal = PropertyXml::parse(valueXml); + } + + diagSetValueDoc.CreateInstance(); + diagSetValueDoc->initialize( + jobIdVal, + fileAliasVal, + valueVal); + } + CAF_CM_EXIT; + + return diagSetValueDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/stdafx.h new file mode 100644 index 000000000..aca7b2bbe --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/DiagTypesXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define DIAGTYPESXML_LINKAGE __declspec(dllexport) +#else + #define DIAGTYPESXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp new file mode 100644 index 000000000..3727dca2a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp @@ -0,0 +1,138 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h" +#include "Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MgmtRequestXml/MgmtRequestXml.h" + +using namespace Caf; + +void MgmtRequestXml::add( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(mgmtRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(mgmtRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = mgmtRequestDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const SmartPtrCRequestHeaderDoc requestHeaderVal = + mgmtRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + RequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + + const SmartPtrCMgmtBatchDoc batchVal = + mgmtRequestDoc->getBatch(); + CAF_CM_VALIDATE_SMARTPTR(batchVal); + + const SmartPtrCXmlElement batchXml = + thisXml->createAndAddElement("batch"); + MgmtBatchXml::add(batchVal, batchXml); + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + mgmtRequestDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtRequestDoc MgmtRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtRequestXml", "parse"); + + SmartPtrCMgmtRequestDoc mgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + SmartPtrCRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = RequestHeaderXml::parse(requestHeaderXml); + } + + const SmartPtrCXmlElement batchXml = + thisXml->findRequiredChild("batch"); + SmartPtrCMgmtBatchDoc batchVal; + if (! batchXml.IsNull()) { + batchVal = MgmtBatchXml::parse(batchXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + mgmtRequestDoc.CreateInstance(); + mgmtRequestDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + requestHeaderVal, + batchVal, + attachmentCollectionVal); + } + CAF_CM_EXIT; + + return mgmtRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp new file mode 100644 index 000000000..38a4b2879 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp @@ -0,0 +1,96 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/RequestXml.h" +#include "Doc/DocXml/MgmtRequestXml/MgmtRequestXml.h" + +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.h" + +using namespace Caf; + +std::string XmlRoots::saveMgmtRequestToString( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveMgmtRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/MgmtRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "mgmtRequest", schemaNamespace, schemaLocation); + MgmtRequestXml::add(mgmtRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCMgmtRequestDoc XmlRoots::parseMgmtRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseMgmtRequestFromString"); + + SmartPtrCMgmtRequestDoc mgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = RequestXml::parseString(xml, "caf:mgmtRequest"); + mgmtRequestDoc = MgmtRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return mgmtRequestDoc; +} + +void XmlRoots::saveMgmtRequestToFile( + const SmartPtrCMgmtRequestDoc mgmtRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveMgmtRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string mgmtRequestStr = + saveMgmtRequestToString(mgmtRequestDoc); + FileSystemUtils::saveTextFile(filePath, mgmtRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtRequestDoc XmlRoots::parseMgmtRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseMgmtRequestFromFile"); + + SmartPtrCMgmtRequestDoc mgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = RequestXml::parseFile(filePath, "caf:mgmtRequest"); + mgmtRequestDoc = MgmtRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return mgmtRequestDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/stdafx.h new file mode 100644 index 000000000..3e1cb250b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtRequestXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MGMTREQUESTXML_LINKAGE __declspec(dllexport) +#else + #define MGMTREQUESTXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp new file mode 100644 index 000000000..315b0fda7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.h" +#include "Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.h" +#include "Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.h" + +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h" + +using namespace Caf; + +void MgmtBatchXml::add( + const SmartPtrCMgmtBatchDoc mgmtBatchDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtBatchXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtBatchDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCMgmtCollectSchemaDoc collectSchemaVal = + mgmtBatchDoc->getCollectSchema(); + if (! collectSchemaVal.IsNull()) { + const SmartPtrCXmlElement collectSchemaXml = + thisXml->createAndAddElement("collectSchema"); + MgmtCollectSchemaXml::add(collectSchemaVal, collectSchemaXml); + } + + const SmartPtrCMgmtCollectInstancesCollectionDoc collectInstancesCollectionVal = + mgmtBatchDoc->getCollectInstancesCollection(); + if (! collectInstancesCollectionVal.IsNull()) { + const SmartPtrCXmlElement collectInstancesCollectionXml = + thisXml->createAndAddElement("collectInstancesCollection"); + MgmtCollectInstancesCollectionXml::add(collectInstancesCollectionVal, collectInstancesCollectionXml); + } + + const SmartPtrCMgmtInvokeOperationCollectionDoc invokeOperationCollectionVal = + mgmtBatchDoc->getInvokeOperationCollection(); + if (! invokeOperationCollectionVal.IsNull()) { + const SmartPtrCXmlElement invokeOperationCollectionXml = + thisXml->createAndAddElement("invokeOperationCollection"); + MgmtInvokeOperationCollectionXml::add(invokeOperationCollectionVal, invokeOperationCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtBatchDoc MgmtBatchXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtBatchXml", "parse"); + + SmartPtrCMgmtBatchDoc mgmtBatchDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement collectSchemaXml = + thisXml->findOptionalChild("collectSchema"); + + SmartPtrCMgmtCollectSchemaDoc collectSchemaVal; + if (! collectSchemaXml.IsNull()) { + collectSchemaVal = MgmtCollectSchemaXml::parse(collectSchemaXml); + } + + const SmartPtrCXmlElement collectInstancesCollectionXml = + thisXml->findOptionalChild("collectInstancesCollection"); + + SmartPtrCMgmtCollectInstancesCollectionDoc collectInstancesCollectionVal; + if (! collectInstancesCollectionXml.IsNull()) { + collectInstancesCollectionVal = MgmtCollectInstancesCollectionXml::parse(collectInstancesCollectionXml); + } + + const SmartPtrCXmlElement invokeOperationCollectionXml = + thisXml->findOptionalChild("invokeOperationCollection"); + + SmartPtrCMgmtInvokeOperationCollectionDoc invokeOperationCollectionVal; + if (! invokeOperationCollectionXml.IsNull()) { + invokeOperationCollectionVal = MgmtInvokeOperationCollectionXml::parse(invokeOperationCollectionXml); + } + + mgmtBatchDoc.CreateInstance(); + mgmtBatchDoc->initialize( + collectSchemaVal, + collectInstancesCollectionVal, + invokeOperationCollectionVal); + } + CAF_CM_EXIT; + + return mgmtBatchDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp new file mode 100644 index 000000000..d675edf37 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.h" + +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.h" + +using namespace Caf; + +void MgmtCollectInstancesCollectionXml::add( + const SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectInstancesCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtCollectInstancesCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque collectInstancesVal = + mgmtCollectInstancesCollectionDoc->getCollectInstancesCollection(); + CAF_CM_VALIDATE_STL(collectInstancesVal); + + if (! collectInstancesVal.empty()) { + for (TConstIterator > collectInstancesIter(collectInstancesVal); + collectInstancesIter; collectInstancesIter++) { + const SmartPtrCXmlElement collectInstancesXml = + thisXml->createAndAddElement("collectInstances"); + MgmtCollectInstancesXml::add(*collectInstancesIter, collectInstancesXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtCollectInstancesCollectionDoc MgmtCollectInstancesCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectInstancesCollectionXml", "parse"); + + SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection collectInstancesChildrenXml = + thisXml->findRequiredChildren("collectInstances"); + + std::deque collectInstancesVal; + if (! collectInstancesChildrenXml.IsNull() && ! collectInstancesChildrenXml->empty()) { + for (TConstIterator collectInstancesXmlIter(*collectInstancesChildrenXml); + collectInstancesXmlIter; collectInstancesXmlIter++) { + const SmartPtrCXmlElement collectInstancesXml = collectInstancesXmlIter->second; + const SmartPtrCMgmtCollectInstancesDoc collectInstancesDoc = + MgmtCollectInstancesXml::parse(collectInstancesXml); + collectInstancesVal.push_back(collectInstancesDoc); + } + } + + mgmtCollectInstancesCollectionDoc.CreateInstance(); + mgmtCollectInstancesCollectionDoc->initialize( + collectInstancesVal); + } + CAF_CM_EXIT; + + return mgmtCollectInstancesCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp new file mode 100644 index 000000000..dc76b437f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.h" +#include "Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h" + +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.h" + +using namespace Caf; + +void MgmtCollectInstancesXml::add( + const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstancesDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectInstancesXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtCollectInstancesDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(mgmtCollectInstancesDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const SmartPtrCClassSpecifierDoc classSpecifierVal = + mgmtCollectInstancesDoc->getClassSpecifier(); + CAF_CM_VALIDATE_SMARTPTR(classSpecifierVal); + + const SmartPtrCXmlElement classSpecifierXml = + thisXml->createAndAddElement("classSpecifier"); + ClassSpecifierXml::add(classSpecifierVal, classSpecifierXml); + + const SmartPtrCParameterCollectionDoc parameterCollectionVal = + mgmtCollectInstancesDoc->getParameterCollection(); + if (! parameterCollectionVal.IsNull()) { + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->createAndAddElement("parameterCollection"); + ParameterCollectionXml::add(parameterCollectionVal, parameterCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtCollectInstancesDoc MgmtCollectInstancesXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectInstancesXml", "parse"); + + SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstancesDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const SmartPtrCXmlElement classSpecifierXml = + thisXml->findRequiredChild("classSpecifier"); + + SmartPtrCClassSpecifierDoc classSpecifierVal; + if (! classSpecifierXml.IsNull()) { + classSpecifierVal = ClassSpecifierXml::parse(classSpecifierXml); + } + + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->findOptionalChild("parameterCollection"); + + SmartPtrCParameterCollectionDoc parameterCollectionVal; + if (! parameterCollectionXml.IsNull()) { + parameterCollectionVal = ParameterCollectionXml::parse(parameterCollectionXml); + } + + mgmtCollectInstancesDoc.CreateInstance(); + mgmtCollectInstancesDoc->initialize( + jobIdVal, + classSpecifierVal, + parameterCollectionVal); + } + CAF_CM_EXIT; + + return mgmtCollectInstancesDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp new file mode 100644 index 000000000..09d9eda28 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.h" + +using namespace Caf; + +void MgmtCollectSchemaXml::add( + const SmartPtrCMgmtCollectSchemaDoc mgmtCollectSchemaDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectSchemaXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtCollectSchemaDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(mgmtCollectSchemaDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtCollectSchemaDoc MgmtCollectSchemaXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtCollectSchemaXml", "parse"); + + SmartPtrCMgmtCollectSchemaDoc mgmtCollectSchemaDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + mgmtCollectSchemaDoc.CreateInstance(); + mgmtCollectSchemaDoc->initialize( + jobIdVal); + } + CAF_CM_EXIT; + + return mgmtCollectSchemaDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp new file mode 100644 index 000000000..36a79fad3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.h" + +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.h" + +using namespace Caf; + +void MgmtInvokeOperationCollectionXml::add( + const SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtInvokeOperationCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtInvokeOperationCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque invokeOperationVal = + mgmtInvokeOperationCollectionDoc->getInvokeOperationCollection(); + CAF_CM_VALIDATE_STL(invokeOperationVal); + + if (! invokeOperationVal.empty()) { + for (TConstIterator > invokeOperationIter(invokeOperationVal); + invokeOperationIter; invokeOperationIter++) { + const SmartPtrCXmlElement invokeOperationXml = + thisXml->createAndAddElement("invokeOperation"); + MgmtInvokeOperationXml::add(*invokeOperationIter, invokeOperationXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtInvokeOperationCollectionDoc MgmtInvokeOperationCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtInvokeOperationCollectionXml", "parse"); + + SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection invokeOperationChildrenXml = + thisXml->findRequiredChildren("invokeOperation"); + + std::deque invokeOperationVal; + if (! invokeOperationChildrenXml.IsNull() && ! invokeOperationChildrenXml->empty()) { + for (TConstIterator invokeOperationXmlIter(*invokeOperationChildrenXml); + invokeOperationXmlIter; invokeOperationXmlIter++) { + const SmartPtrCXmlElement invokeOperationXml = invokeOperationXmlIter->second; + const SmartPtrCMgmtInvokeOperationDoc invokeOperationDoc = + MgmtInvokeOperationXml::parse(invokeOperationXml); + invokeOperationVal.push_back(invokeOperationDoc); + } + } + + mgmtInvokeOperationCollectionDoc.CreateInstance(); + mgmtInvokeOperationCollectionDoc->initialize( + invokeOperationVal); + } + CAF_CM_EXIT; + + return mgmtInvokeOperationCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp new file mode 100644 index 000000000..d486e6414 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp @@ -0,0 +1,100 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.h" + +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.h" +#include "Doc/DocXml/CafCoreTypesXml/OperationXml.h" + +using namespace Caf; + +void MgmtInvokeOperationXml::add( + const SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperationDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtInvokeOperationXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(mgmtInvokeOperationDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdVal = + BasePlatform::UuidToString(mgmtInvokeOperationDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const SmartPtrCClassSpecifierDoc classSpecifierVal = + mgmtInvokeOperationDoc->getClassSpecifier(); + CAF_CM_VALIDATE_SMARTPTR(classSpecifierVal); + + const SmartPtrCXmlElement classSpecifierXml = + thisXml->createAndAddElement("classSpecifier"); + ClassSpecifierXml::add(classSpecifierVal, classSpecifierXml); + + const SmartPtrCOperationDoc operationVal = + mgmtInvokeOperationDoc->getOperation(); + CAF_CM_VALIDATE_SMARTPTR(operationVal); + + const SmartPtrCXmlElement operationXml = + thisXml->createAndAddElement("operation"); + OperationXml::add(operationVal, operationXml); + } + CAF_CM_EXIT; +} + +SmartPtrCMgmtInvokeOperationDoc MgmtInvokeOperationXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MgmtInvokeOperationXml", "parse"); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperationDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const SmartPtrCXmlElement classSpecifierXml = + thisXml->findRequiredChild("classSpecifier"); + + SmartPtrCClassSpecifierDoc classSpecifierVal; + if (! classSpecifierXml.IsNull()) { + classSpecifierVal = ClassSpecifierXml::parse(classSpecifierXml); + } + + const SmartPtrCXmlElement operationXml = + thisXml->findRequiredChild("operation"); + + SmartPtrCOperationDoc operationVal; + if (! operationXml.IsNull()) { + operationVal = OperationXml::parse(operationXml); + } + + mgmtInvokeOperationDoc.CreateInstance(); + mgmtInvokeOperationDoc->initialize( + jobIdVal, + classSpecifierVal, + operationVal); + } + CAF_CM_EXIT; + + return mgmtInvokeOperationDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/stdafx.h new file mode 100644 index 000000000..c9aeb89a1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MgmtTypesXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MGMTTYPESXML_LINKAGE __declspec(dllexport) +#else + #define MGMTTYPESXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp new file mode 100644 index 000000000..1d0c37562 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.h" + +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.h" + +using namespace Caf; + +void MultiPmeMgmtBatchCollectionXml::add( + const SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeMgmtBatchCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtBatchCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtBatchCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque multiPmeBatchVal = + multiPmeMgmtBatchCollectionDoc->getMultiPmeBatch(); + CAF_CM_VALIDATE_STL(multiPmeBatchVal); + + if (! multiPmeBatchVal.empty()) { + for (TConstIterator > multiPmeBatchIter(multiPmeBatchVal); + multiPmeBatchIter; multiPmeBatchIter++) { + const SmartPtrCXmlElement multiPmeBatchXml = + thisXml->createAndAddElement("multiPmeBatch"); + MultiPmeMgmtBatchXml::add(*multiPmeBatchIter, multiPmeBatchXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCMultiPmeMgmtBatchCollectionDoc MultiPmeMgmtBatchCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtBatchCollectionXml", "parse"); + + SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeMgmtBatchCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection multiPmeBatchChildrenXml = + thisXml->findRequiredChildren("multiPmeBatch"); + + std::deque multiPmeBatchVal; + if (! multiPmeBatchChildrenXml.IsNull() && ! multiPmeBatchChildrenXml->empty()) { + for (TConstIterator multiPmeBatchXmlIter(*multiPmeBatchChildrenXml); + multiPmeBatchXmlIter; multiPmeBatchXmlIter++) { + const SmartPtrCXmlElement multiPmeBatchXml = multiPmeBatchXmlIter->second; + const SmartPtrCMultiPmeMgmtBatchDoc multiPmeBatchDoc = + MultiPmeMgmtBatchXml::parse(multiPmeBatchXml); + multiPmeBatchVal.push_back(multiPmeBatchDoc); + } + } + + multiPmeMgmtBatchCollectionDoc.CreateInstance(); + multiPmeMgmtBatchCollectionDoc->initialize( + multiPmeBatchVal); + } + CAF_CM_EXIT; + + return multiPmeMgmtBatchCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp new file mode 100644 index 000000000..ce9f346ab --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/MgmtTypesXml/MgmtBatchXml.h" + +#include "Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.h" + +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.h" + +using namespace Caf; + +void MultiPmeMgmtBatchXml::add( + const SmartPtrCMultiPmeMgmtBatchDoc multiPmeMgmtBatchDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtBatchXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtBatchDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCPmeIdCollectionDoc pmeIdCollectionVal = + multiPmeMgmtBatchDoc->getPmeIdCollection(); + CAF_CM_VALIDATE_SMARTPTR(pmeIdCollectionVal); + + const SmartPtrCXmlElement pmeIdCollectionXml = + thisXml->createAndAddElement("pmeIdCollection"); + PmeIdCollectionXml::add(pmeIdCollectionVal, pmeIdCollectionXml); + + const SmartPtrCMgmtBatchDoc batchVal = + multiPmeMgmtBatchDoc->getBatch(); + CAF_CM_VALIDATE_SMARTPTR(batchVal); + + const SmartPtrCXmlElement batchXml = + thisXml->createAndAddElement("batch"); + MgmtBatchXml::add(batchVal, batchXml); + } + CAF_CM_EXIT; +} + +SmartPtrCMultiPmeMgmtBatchDoc MultiPmeMgmtBatchXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtBatchXml", "parse"); + + SmartPtrCMultiPmeMgmtBatchDoc multiPmeMgmtBatchDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement pmeIdCollectionXml = + thisXml->findRequiredChild("pmeIdCollection"); + + SmartPtrCPmeIdCollectionDoc pmeIdCollectionVal; + if (! pmeIdCollectionXml.IsNull()) { + pmeIdCollectionVal = PmeIdCollectionXml::parse(pmeIdCollectionXml); + } + + const SmartPtrCXmlElement batchXml = + thisXml->findRequiredChild("batch"); + + SmartPtrCMgmtBatchDoc batchVal; + if (! batchXml.IsNull()) { + batchVal = MgmtBatchXml::parse(batchXml); + } + + multiPmeMgmtBatchDoc.CreateInstance(); + multiPmeMgmtBatchDoc->initialize( + pmeIdCollectionVal, + batchVal); + } + CAF_CM_EXIT; + + return multiPmeMgmtBatchDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp new file mode 100644 index 000000000..653f5e645 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp @@ -0,0 +1,113 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h" +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.h" + +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.h" +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.h" + +using namespace Caf; + +void MultiPmeMgmtRequestXml::add( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(multiPmeMgmtRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(multiPmeMgmtRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const SmartPtrCRequestHeaderDoc requestHeaderVal = + multiPmeMgmtRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + RequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + + const SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeBatchCollectionVal = + multiPmeMgmtRequestDoc->getMultiPmeBatchCollection(); + CAF_CM_VALIDATE_SMARTPTR(multiPmeBatchCollectionVal); + + const SmartPtrCXmlElement multiPmeBatchCollectionXml = + thisXml->createAndAddElement("multiPmeBatchCollection"); + MultiPmeMgmtBatchCollectionXml::add(multiPmeBatchCollectionVal, multiPmeBatchCollectionXml); + } + CAF_CM_EXIT; +} + +SmartPtrCMultiPmeMgmtRequestDoc MultiPmeMgmtRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MultiPmeMgmtRequestXml", "parse"); + + SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + + SmartPtrCRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = RequestHeaderXml::parse(requestHeaderXml); + } + + const SmartPtrCXmlElement multiPmeBatchCollectionXml = + thisXml->findRequiredChild("multiPmeBatchCollection"); + + SmartPtrCMultiPmeMgmtBatchCollectionDoc multiPmeBatchCollectionVal; + if (! multiPmeBatchCollectionXml.IsNull()) { + multiPmeBatchCollectionVal = MultiPmeMgmtBatchCollectionXml::parse(multiPmeBatchCollectionXml); + } + + multiPmeMgmtRequestDoc.CreateInstance(); + multiPmeMgmtRequestDoc->initialize( + clientIdVal, + requestIdVal, + requestHeaderVal, + multiPmeBatchCollectionVal); + } + CAF_CM_EXIT; + + return multiPmeMgmtRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp new file mode 100644 index 000000000..2d095b88a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp @@ -0,0 +1,96 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/RequestXml.h" +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.h" + +#include "Doc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.h" + +using namespace Caf; + +std::string XmlRoots::saveMultiPmeMgmtRequestToString( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveMultiPmeMgmtRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/MultiPmeMgmtRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "multiPmeMgmtRequest", schemaNamespace, schemaLocation); + MultiPmeMgmtRequestXml::add(multiPmeMgmtRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCMultiPmeMgmtRequestDoc XmlRoots::parseMultiPmeMgmtRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseMultiPmeMgmtRequestFromString"); + + SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = RequestXml::parseString(xml, "caf:multiPmeMgmtRequest"); + multiPmeMgmtRequestDoc = MultiPmeMgmtRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return multiPmeMgmtRequestDoc; +} + +void XmlRoots::saveMultiPmeMgmtRequestToFile( + const SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveMultiPmeMgmtRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(multiPmeMgmtRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string multiPmeMgmtRequestStr = + saveMultiPmeMgmtRequestToString(multiPmeMgmtRequestDoc); + FileSystemUtils::saveTextFile(filePath, multiPmeMgmtRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCMultiPmeMgmtRequestDoc XmlRoots::parseMultiPmeMgmtRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseMultiPmeMgmtRequestFromFile"); + + SmartPtrCMultiPmeMgmtRequestDoc multiPmeMgmtRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = RequestXml::parseFile(filePath, "caf:multiPmeMgmtRequest"); + multiPmeMgmtRequestDoc = MultiPmeMgmtRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return multiPmeMgmtRequestDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp new file mode 100644 index 000000000..f03e616ec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.h" + +using namespace Caf; + +void PmeIdCollectionXml::add( + const SmartPtrCPmeIdCollectionDoc pmeIdCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PmeIdCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(pmeIdCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque pmeIdVal = + pmeIdCollectionDoc->getPmeIdCollection(); + CAF_CM_VALIDATE_STL(pmeIdVal); + + if (! pmeIdVal.empty()) { + for (TConstIterator > pmeIdIter(pmeIdVal); + pmeIdIter; pmeIdIter++) { + const SmartPtrCXmlElement pmeIdXml = + thisXml->createAndAddElement("pmeId"); + pmeIdXml->setValue(*pmeIdIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCPmeIdCollectionDoc PmeIdCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PmeIdCollectionXml", "parse"); + + SmartPtrCPmeIdCollectionDoc pmeIdCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection pmeIdChildrenXml = + thisXml->findRequiredChildren("pmeId"); + + std::deque pmeIdVal; + if (! pmeIdChildrenXml.IsNull() && ! pmeIdChildrenXml->empty()) { + for (TConstIterator pmeIdXmlIter(*pmeIdChildrenXml); + pmeIdXmlIter; pmeIdXmlIter++) { + const SmartPtrCXmlElement pmeIdXml = pmeIdXmlIter->second; + + const std::string pmeIdDoc = pmeIdXml->getValue(); + + pmeIdVal.push_back(pmeIdDoc); + } + } + + pmeIdCollectionDoc.CreateInstance(); + pmeIdCollectionDoc->initialize( + pmeIdVal); + } + CAF_CM_EXIT; + + return pmeIdCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/stdafx.h new file mode 100644 index 000000000..73cd2606e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MULTIPMEMGMTREQUESTXML_LINKAGE __declspec(dllexport) +#else + #define MULTIPMEMGMTREQUESTXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp new file mode 100644 index 000000000..7a917c36b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp @@ -0,0 +1,154 @@ +/* + * Author: bwilliams + * Created: July 3, 2015 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.h" + +using namespace Caf; + +void PayloadEnvelopeXml::add( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PayloadEnvelopeXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelopeDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(payloadEnvelopeDoc->getClientId()); + if (! clientIdVal.empty()) { + thisXml->addAttribute("clientId", clientIdVal); + } + + const std::string requestIdVal = + BasePlatform::UuidToString(payloadEnvelopeDoc->getRequestId()); + if (! requestIdVal.empty()) { + thisXml->addAttribute("requestId", requestIdVal); + } + + const std::string pmeIdVal = payloadEnvelopeDoc->getPmeId(); + if (! pmeIdVal.empty()) { + thisXml->addAttribute("pmeId", pmeIdVal); + } + + const std::string payloadVersionVal = payloadEnvelopeDoc->getPayloadVersion(); + if (! payloadVersionVal.empty()) { + thisXml->addAttribute("payloadVersion", payloadVersionVal); + } + + const std::string payloadTypeVal = payloadEnvelopeDoc->getPayloadType(); + if (! payloadTypeVal.empty()) { + thisXml->addAttribute("payloadType", payloadTypeVal); + } + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + payloadEnvelopeDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + + const SmartPtrCProtocolCollectionDoc protocolCollectionVal = + payloadEnvelopeDoc->getProtocolCollection(); + if (! protocolCollectionVal.IsNull()) { + const SmartPtrCXmlElement protocolCollectionXml = + thisXml->createAndAddElement("protocolCollection"); + ProtocolCollectionXml::add(protocolCollectionVal, protocolCollectionXml); + } + + const SmartPtrCPropertyCollectionDoc headerCollectionVal = + payloadEnvelopeDoc->getHeaderCollection(); + if (! headerCollectionVal.IsNull()) { + const SmartPtrCXmlElement headerCollectionXml = + thisXml->createAndAddElement("headerCollection"); + PropertyCollectionXml::add(headerCollectionVal, headerCollectionXml); + } + + const std::string versionVal = payloadEnvelopeDoc->getVersion().empty() ? "1.0" : payloadEnvelopeDoc->getVersion(); + thisXml->addAttribute("version", versionVal); +} + +SmartPtrCPayloadEnvelopeDoc PayloadEnvelopeXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PayloadEnvelopeXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findOptionalAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findOptionalAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findOptionalAttribute("pmeId"); + + const std::string payloadTypeVal = + thisXml->findOptionalAttribute("payloadType"); + + const std::string payloadVersionVal = + thisXml->findOptionalAttribute("payloadVersion"); + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + const SmartPtrCXmlElement protocolCollectionXml = + thisXml->findOptionalChild("protocolCollection"); + + SmartPtrCProtocolCollectionDoc protocolCollectionVal; + if (! protocolCollectionXml.IsNull()) { + protocolCollectionVal = ProtocolCollectionXml::parse(protocolCollectionXml); + } + + const SmartPtrCXmlElement headerCollectionXml = + thisXml->findOptionalChild("headerCollection"); + SmartPtrCPropertyCollectionDoc headerCollectionVal; + if (! headerCollectionXml.IsNull()) { + headerCollectionVal = PropertyCollectionXml::parse(headerCollectionXml); + } + + const std::string versionVal = + thisXml->findOptionalAttribute("version"); + + SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc; + payloadEnvelopeDoc.CreateInstance(); + payloadEnvelopeDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + payloadTypeVal, + payloadVersionVal, + attachmentCollectionVal, + protocolCollectionVal, + headerCollectionVal, + versionVal); + + return payloadEnvelopeDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp new file mode 100644 index 000000000..eb7b83dc4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.h" + +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.h" + +using namespace Caf; + +std::string XmlRoots::savePayloadEnvelopeToString( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "savePayloadEnvelopeToString"); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelopeDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/PayloadEnvelope.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "payloadEnvelope", schemaNamespace, schemaLocation); + PayloadEnvelopeXml::add(payloadEnvelopeDoc, rootXml); + + return rootXml->saveToString(); +} + +SmartPtrCPayloadEnvelopeDoc XmlRoots::parsePayloadEnvelopeFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parsePayloadEnvelopeFromString"); + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:payloadEnvelope"); + return PayloadEnvelopeXml::parse(rootXml); +} + +void XmlRoots::savePayloadEnvelopeToFile( + const SmartPtrCPayloadEnvelopeDoc payloadEnvelopeDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "savePayloadEnvelopeToFile"); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelopeDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string payloadEnvelopeStr = + savePayloadEnvelopeToString(payloadEnvelopeDoc); + FileSystemUtils::saveTextFile(filePath, payloadEnvelopeStr); +} + +SmartPtrCPayloadEnvelopeDoc XmlRoots::parsePayloadEnvelopeFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parsePayloadEnvelopeFromFile"); + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:payloadEnvelope"); + return PayloadEnvelopeXml::parse(rootXml); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/stdafx.h new file mode 100644 index 000000000..c3fae1c32 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PayloadEnvelopeXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PAYLOADENVELOPEXML_LINKAGE __declspec(dllexport) +#else + #define PAYLOADENVELOPEXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp new file mode 100644 index 000000000..b68c15bd8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PersistenceXml/CertCollectionXml.h" + +using namespace Caf; + +void CertCollectionXml::add( + const SmartPtrCCertCollectionDoc certCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CertCollectionXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(certCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque certVal = + certCollectionDoc->getCert(); + + if (! certVal.empty()) { + for (TConstIterator > certIter(certVal); + certIter; certIter++) { + const SmartPtrCXmlElement certXml = + thisXml->createAndAddElement("cert"); + certXml->setValue(*certIter); + } + } +} + +SmartPtrCCertCollectionDoc CertCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CertCollectionXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection certChildrenXml = + thisXml->findOptionalChildren("cert"); + + std::deque certVal; + if (! certChildrenXml.IsNull() && ! certChildrenXml->empty()) { + for (TConstIterator certXmlIter(*certChildrenXml); + certXmlIter; certXmlIter++) { + const SmartPtrCXmlElement certXml = certXmlIter->second; + const std::string certDoc = certXml->getValue(); + certVal.push_back(certDoc); + } + } + + SmartPtrCCertCollectionDoc certCollectionDoc; + certCollectionDoc.CreateInstance(); + certCollectionDoc->initialize(certVal); + + return certCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp new file mode 100644 index 000000000..e2e7adc53 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PersistenceXml/CertPathCollectionXml.h" + +using namespace Caf; + +void CertPathCollectionXml::add( + const SmartPtrCCertPathCollectionDoc certPathCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CertPathCollectionXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(certPathCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque certPathVal = + certPathCollectionDoc->getCertPath(); + + if (! certPathVal.empty()) { + for (TConstIterator > certPathIter(certPathVal); + certPathIter; certPathIter++) { + const SmartPtrCXmlElement certPathXml = + thisXml->createAndAddElement("certPath"); + certPathXml->setValue(*certPathIter); + } + } +} + +SmartPtrCCertPathCollectionDoc CertPathCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CertPathCollectionXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection certPathChildrenXml = + thisXml->findOptionalChildren("certPath"); + + std::deque certPathVal; + if (! certPathChildrenXml.IsNull() && ! certPathChildrenXml->empty()) { + for (TConstIterator certPathXmlIter(*certPathChildrenXml); + certPathXmlIter; certPathXmlIter++) { + const SmartPtrCXmlElement certPathXml = certPathXmlIter->second; + const std::string certPathDoc = certPathXml->getValue(); + certPathVal.push_back(certPathDoc); + } + } + + SmartPtrCCertPathCollectionDoc certPathCollectionDoc; + certPathCollectionDoc.CreateInstance(); + certPathCollectionDoc->initialize(certPathVal); + + return certPathCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp new file mode 100644 index 000000000..6f49e8a73 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp @@ -0,0 +1,85 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PersistenceXml/LocalSecurityXml.h" + +using namespace Caf; + +void LocalSecurityXml::add( + const SmartPtrCLocalSecurityDoc localSecurityDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LocalSecurityXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(localSecurityDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string localIdVal = localSecurityDoc->getLocalId(); + if (! localIdVal.empty()) { + thisXml->addAttribute("localId", localIdVal); + } + + const std::string privateKeyVal = localSecurityDoc->getPrivateKey(); + if (! privateKeyVal.empty()) { + const SmartPtrCXmlElement privateKeyXml = thisXml->createAndAddElement("privateKey"); + privateKeyXml->setValue(privateKeyVal); + } + + const std::string certVal = localSecurityDoc->getCert(); + if (! certVal.empty()) { + const SmartPtrCXmlElement certXml = thisXml->createAndAddElement("cert"); + certXml->setValue(certVal); + } + + const std::string privateKeyPathVal = localSecurityDoc->getPrivateKeyPath(); + if (! privateKeyPathVal.empty()) { + thisXml->addAttribute("privateKeyPath", privateKeyPathVal); + } + + const std::string certPathVal = localSecurityDoc->getCertPath(); + if (! certPathVal.empty()) { + thisXml->addAttribute("certPath", certPathVal); + } +} + +SmartPtrCLocalSecurityDoc LocalSecurityXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LocalSecurityXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string localIdVal = thisXml->findOptionalAttribute("localId"); + + std::string privateKeyVal; + const SmartPtrCXmlElement privateKeyXml = thisXml->findOptionalChild("privateKey"); + if (privateKeyXml) { + privateKeyVal = privateKeyXml->getValue(); + } + + std::string certVal; + const SmartPtrCXmlElement certXml = thisXml->findOptionalChild("cert"); + if (certXml) { + certVal = certXml->getValue(); + } + + const std::string privateKeyPathVal = thisXml->findOptionalAttribute("privateKeyPath"); + const std::string certPathVal = thisXml->findOptionalAttribute("certPath"); + + SmartPtrCLocalSecurityDoc localSecurityDoc; + localSecurityDoc.CreateInstance(); + localSecurityDoc->initialize( + localIdVal, + privateKeyVal, + certVal, + privateKeyPathVal, + certPathVal); + + return localSecurityDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.cpp new file mode 100644 index 000000000..59a2c91d3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.cpp @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/PersistenceXml/PersistenceProtocolXml.h" + +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.h" + +using namespace Caf; + +void PersistenceProtocolCollectionXml::add( + const SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PersistenceProtocolCollectionXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(persistenceProtocolCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque persistenceProtocolVal = + persistenceProtocolCollectionDoc->getPersistenceProtocol(); + if (! persistenceProtocolVal.empty()) { + for (TConstIterator > persistenceProtocolIter(persistenceProtocolVal); + persistenceProtocolIter; persistenceProtocolIter++) { + const SmartPtrCXmlElement persistenceProtocolXml = + thisXml->createAndAddElement("persistenceProtocol"); + PersistenceProtocolXml::add(*persistenceProtocolIter, persistenceProtocolXml); + } + } +} + +SmartPtrCPersistenceProtocolCollectionDoc PersistenceProtocolCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PersistenceProtocolCollectionXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection persistenceProtocolChildrenXml = + thisXml->findOptionalChildren("persistenceProtocol"); + + std::deque persistenceProtocolVal; + if (! persistenceProtocolChildrenXml.IsNull() && ! persistenceProtocolChildrenXml->empty()) { + for (TConstIterator persistenceProtocolXmlIter(*persistenceProtocolChildrenXml); + persistenceProtocolXmlIter; persistenceProtocolXmlIter++) { + const SmartPtrCXmlElement persistenceProtocolXml = persistenceProtocolXmlIter->second; + const SmartPtrCPersistenceProtocolDoc persistenceProtocolDoc = + PersistenceProtocolXml::parse(persistenceProtocolXml); + persistenceProtocolVal.push_back(persistenceProtocolDoc); + } + } + + SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollectionDoc; + persistenceProtocolCollectionDoc.CreateInstance(); + persistenceProtocolCollectionDoc->initialize( + persistenceProtocolVal); + + return persistenceProtocolCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp new file mode 100644 index 000000000..399693106 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp @@ -0,0 +1,187 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/PersistenceXml/CertCollectionXml.h" +#include "Doc/DocXml/PersistenceXml/CertPathCollectionXml.h" + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PersistenceXml/PersistenceProtocolXml.h" + +using namespace Caf; + +void PersistenceProtocolXml::add( + const SmartPtrCPersistenceProtocolDoc persistenceProtocolDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PersistenceProtocolXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(persistenceProtocolDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string protocolNameVal = persistenceProtocolDoc->getProtocolName(); + if (! protocolNameVal.empty()) { + thisXml->addAttribute("protocolName", protocolNameVal); + } + + const std::string uriVal = persistenceProtocolDoc->getUri(); + if (! uriVal.empty()) { + thisXml->addAttribute("uri", uriVal); + } + + const std::string uriAmqpVal = persistenceProtocolDoc->getUriAmqp(); + if (! uriAmqpVal.empty()) { + thisXml->addAttribute("uriAmqp", uriAmqpVal); + } + + const std::string uriTunnelVal = persistenceProtocolDoc->getUriTunnel(); + if (! uriTunnelVal.empty()) { + thisXml->addAttribute("uriTunnel", uriTunnelVal); + } + + const std::string tlsCertVal = persistenceProtocolDoc->getTlsCert(); + if (! tlsCertVal.empty()) { + const SmartPtrCXmlElement tlsCertXml = thisXml->createAndAddElement("tlsCert"); + tlsCertXml->setValue(tlsCertVal); + } + + const std::string tlsProtocolVal = persistenceProtocolDoc->getTlsProtocol(); + if (! tlsProtocolVal.empty()) { + thisXml->addAttribute("tlsProtocol", tlsProtocolVal); + } + + const Cdeqstr tlsCipherCollectionVal = persistenceProtocolDoc->getTlsCipherCollection(); + if (! tlsCipherCollectionVal.empty()) { + const SmartPtrCXmlElement tlsCipherCollectionXml = + thisXml->createAndAddElement("tlsCipherCollection"); + for (TConstIterator > valueIter(tlsCipherCollectionVal); + valueIter; valueIter++) { + const SmartPtrCXmlElement valueXml = + tlsCipherCollectionXml->createAndAddElement("cipher"); + valueXml->setValue(*valueIter); + } + } + + const SmartPtrCCertCollectionDoc tlsCertCollectionVal = + persistenceProtocolDoc->getTlsCertCollection(); + if (! tlsCertCollectionVal.IsNull()) { + const SmartPtrCXmlElement tlsCertCollectionXml = + thisXml->createAndAddElement("tlsCertCollection"); + CertCollectionXml::add(tlsCertCollectionVal, tlsCertCollectionXml); + } + + const std::string uriAmqpPathVal = persistenceProtocolDoc->getUriAmqpPath(); + if (! uriAmqpPathVal.empty()) { + thisXml->addAttribute("uriAmqpPath", uriAmqpPathVal); + } + + const std::string uriTunnelPathVal = persistenceProtocolDoc->getUriTunnelPath(); + if (! uriTunnelPathVal.empty()) { + thisXml->addAttribute("uriTunnelPath", uriTunnelPathVal); + } + + const std::string tlsCertPathVal = persistenceProtocolDoc->getTlsCertPath(); + if (! tlsCertPathVal.empty()) { + thisXml->addAttribute("tlsCertPath", tlsCertPathVal); + } + + const SmartPtrCCertPathCollectionDoc tlsCertPathCollectionVal = + persistenceProtocolDoc->getTlsCertPathCollection(); + if (! tlsCertPathCollectionVal.IsNull()) { + const SmartPtrCXmlElement tlsCertPathCollectionXml = + thisXml->createAndAddElement("tlsCertPathCollection"); + CertPathCollectionXml::add(tlsCertPathCollectionVal, tlsCertPathCollectionXml); + } +} + +SmartPtrCPersistenceProtocolDoc PersistenceProtocolXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PersistenceProtocolXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string protocolNameVal = + thisXml->findOptionalAttribute("protocolName"); + + const std::string uriVal = + thisXml->findOptionalAttribute("uri"); + + const std::string uriAmqpVal = + thisXml->findOptionalAttribute("uriAmqp"); + + const std::string uriTunnelVal = + thisXml->findOptionalAttribute("uriTunnel"); + + std::string tlsCertVal; + const SmartPtrCXmlElement tlsCertXml = thisXml->findOptionalChild("tlsCert"); + if (tlsCertXml) { + tlsCertVal = tlsCertXml->getValue(); + } + + const std::string tlsProtocolVal = + thisXml->findOptionalAttribute("tlsProtocol"); + + const SmartPtrCXmlElement tlsCipherCollectionXml = + thisXml->findOptionalChild("tlsCipherCollection"); + std::deque tlsCipherCollectionVal; + if (! tlsCipherCollectionXml.IsNull()) { + const CXmlElement::SmartPtrCElementCollection valueCollectionXml = + tlsCipherCollectionXml->findOptionalChildren("cipher"); + if (! valueCollectionXml.IsNull() && ! valueCollectionXml->empty()) { + for (TConstIterator valueXmlIter(*valueCollectionXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->getValue(); + tlsCipherCollectionVal.push_back(valueDoc); + } + } + } + + const SmartPtrCXmlElement tlsCertCollectionXml = + thisXml->findOptionalChild("tlsCertCollection"); + SmartPtrCCertCollectionDoc tlsCertCollectionVal; + if (! tlsCertCollectionXml.IsNull()) { + tlsCertCollectionVal = CertCollectionXml::parse(tlsCertCollectionXml); + } + + const std::string uriAmqpPathVal = + thisXml->findOptionalAttribute("uriAmqpPath"); + + const std::string uriTunnelPathVal = + thisXml->findOptionalAttribute("uriTunnelPath"); + + const std::string tlsCertPathVal = + thisXml->findOptionalAttribute("tlsCertPath"); + + const SmartPtrCXmlElement tlsCertPathCollectionXml = + thisXml->findOptionalChild("tlsCertPathCollection"); + SmartPtrCCertPathCollectionDoc tlsCertPathCollectionVal; + if (! tlsCertPathCollectionXml.IsNull()) { + tlsCertPathCollectionVal = CertPathCollectionXml::parse(tlsCertPathCollectionXml); + } + + SmartPtrCPersistenceProtocolDoc persistenceProtocolDoc; + persistenceProtocolDoc.CreateInstance(); + persistenceProtocolDoc->initialize( + protocolNameVal, + uriVal, + uriAmqpVal, + uriTunnelVal, + tlsCertVal, + tlsProtocolVal, + tlsCipherCollectionVal, + tlsCertCollectionVal, + uriAmqpPathVal, + uriTunnelPathVal, + tlsCertPathVal, + tlsCertPathCollectionVal); + + return persistenceProtocolDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp new file mode 100644 index 000000000..0e20685fc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp @@ -0,0 +1,98 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/PersistenceXml/LocalSecurityXml.h" +#include "Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.h" +#include "Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.h" + +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PersistenceXml/PersistenceXml.h" + +using namespace Caf; + +void PersistenceXml::add( + const SmartPtrCPersistenceDoc persistenceDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PersistenceXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(persistenceDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCLocalSecurityDoc localSecurityVal = + persistenceDoc->getLocalSecurity(); + if (! localSecurityVal.IsNull()) { + const SmartPtrCXmlElement localSecurityXml = + thisXml->createAndAddElement("localSecurity"); + LocalSecurityXml::add(localSecurityVal, localSecurityXml); + } + + const SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionVal = + persistenceDoc->getRemoteSecurityCollection(); + if (! remoteSecurityCollectionVal.IsNull()) { + const SmartPtrCXmlElement remoteSecurityCollectionXml = + thisXml->createAndAddElement("remoteSecurityCollection"); + RemoteSecurityCollectionXml::add(remoteSecurityCollectionVal, remoteSecurityCollectionXml); + } + + const SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollectionVal = + persistenceDoc->getPersistenceProtocolCollection(); + if (! persistenceProtocolCollectionVal.IsNull()) { + const SmartPtrCXmlElement persistenceProtocolCollectionXml = + thisXml->createAndAddElement("persistenceProtocolCollection"); + PersistenceProtocolCollectionXml::add(persistenceProtocolCollectionVal, persistenceProtocolCollectionXml); + } + + const std::string versionVal = persistenceDoc->getVersion().empty() ? "1.0" : persistenceDoc->getVersion(); + thisXml->addAttribute("version", versionVal); +} + +SmartPtrCPersistenceDoc PersistenceXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PersistenceXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement localSecurityXml = + thisXml->findOptionalChild("localSecurity"); + SmartPtrCLocalSecurityDoc localSecurityVal; + if (! localSecurityXml.IsNull()) { + localSecurityVal = LocalSecurityXml::parse(localSecurityXml); + } + + const SmartPtrCXmlElement remoteSecurityCollectionXml = + thisXml->findOptionalChild("remoteSecurityCollection"); + SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionVal; + if (! remoteSecurityCollectionXml.IsNull()) { + remoteSecurityCollectionVal = RemoteSecurityCollectionXml::parse(remoteSecurityCollectionXml); + } + + const SmartPtrCXmlElement persistenceProtocolCollectionXml = + thisXml->findOptionalChild("persistenceProtocolCollection"); + SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollectionVal; + if (! persistenceProtocolCollectionXml.IsNull()) { + persistenceProtocolCollectionVal = PersistenceProtocolCollectionXml::parse(persistenceProtocolCollectionXml); + } + + const std::string versionVal = + thisXml->findOptionalAttribute("version"); + + SmartPtrCPersistenceDoc persistenceDoc; + persistenceDoc.CreateInstance(); + persistenceDoc->initialize( + localSecurityVal, + remoteSecurityCollectionVal, + persistenceProtocolCollectionVal, + versionVal); + + return persistenceDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp new file mode 100644 index 000000000..11ffd413d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/PersistenceXml/PersistenceXml.h" + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h" + +using namespace Caf; + +std::string XmlRoots::savePersistenceToString( + const SmartPtrCPersistenceDoc persistenceDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "savePersistenceToString"); + CAF_CM_VALIDATE_SMARTPTR(persistenceDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Persistence.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "persistence", schemaNamespace, schemaLocation); + PersistenceXml::add(persistenceDoc, rootXml); + + return rootXml->saveToString(); +} + +SmartPtrCPersistenceDoc XmlRoots::parsePersistenceFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parsePersistenceFromString"); + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:persistence"); + return PersistenceXml::parse(rootXml); +} + +void XmlRoots::savePersistenceToFile( + const SmartPtrCPersistenceDoc persistenceDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "savePersistenceToFile"); + CAF_CM_VALIDATE_SMARTPTR(persistenceDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string persistenceStr = + savePersistenceToString(persistenceDoc); + FileSystemUtils::saveTextFile(filePath, persistenceStr); +} + +SmartPtrCPersistenceDoc XmlRoots::parsePersistenceFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parsePersistenceFromFile"); + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:persistence"); + return PersistenceXml::parse(rootXml); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp new file mode 100644 index 000000000..e77ece575 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/PersistenceXml/RemoteSecurityXml.h" + +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.h" + +using namespace Caf; + +void RemoteSecurityCollectionXml::add( + const SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RemoteSecurityCollectionXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(remoteSecurityCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque remoteSecurityVal = + remoteSecurityCollectionDoc->getRemoteSecurity(); + if (! remoteSecurityVal.empty()) { + for (TConstIterator > remoteSecurityIter(remoteSecurityVal); + remoteSecurityIter; remoteSecurityIter++) { + const SmartPtrCXmlElement remoteSecurityXml = + thisXml->createAndAddElement("remoteSecurity"); + RemoteSecurityXml::add(*remoteSecurityIter, remoteSecurityXml); + } + } +} + +SmartPtrCRemoteSecurityCollectionDoc RemoteSecurityCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RemoteSecurityCollectionXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection remoteSecurityChildrenXml = + thisXml->findOptionalChildren("remoteSecurity"); + + std::deque remoteSecurityVal; + if (! remoteSecurityChildrenXml.IsNull() && ! remoteSecurityChildrenXml->empty()) { + for (TConstIterator remoteSecurityXmlIter(*remoteSecurityChildrenXml); + remoteSecurityXmlIter; remoteSecurityXmlIter++) { + const SmartPtrCXmlElement remoteSecurityXml = remoteSecurityXmlIter->second; + const SmartPtrCRemoteSecurityDoc remoteSecurityDoc = + RemoteSecurityXml::parse(remoteSecurityXml); + remoteSecurityVal.push_back(remoteSecurityDoc); + } + } + + SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollectionDoc; + remoteSecurityCollectionDoc.CreateInstance(); + remoteSecurityCollectionDoc->initialize( + remoteSecurityVal); + + return remoteSecurityCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp new file mode 100644 index 000000000..b03e12187 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp @@ -0,0 +1,122 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/PersistenceXml/CertCollectionXml.h" +#include "Doc/DocXml/PersistenceXml/CertPathCollectionXml.h" + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CCertPathCollectionDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/PersistenceXml/RemoteSecurityXml.h" + +using namespace Caf; + +void RemoteSecurityXml::add( + const SmartPtrCRemoteSecurityDoc remoteSecurityDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RemoteSecurityXml", "add"); + CAF_CM_VALIDATE_SMARTPTR(remoteSecurityDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string remoteIdVal = remoteSecurityDoc->getRemoteId(); + if (! remoteIdVal.empty()) { + thisXml->addAttribute("remoteId", remoteIdVal); + } + + const std::string protocolNameVal = remoteSecurityDoc->getProtocolName(); + if (! protocolNameVal.empty()) { + thisXml->addAttribute("protocolName", protocolNameVal); + } + + const std::string cmsCertVal = remoteSecurityDoc->getCmsCert(); + if (! cmsCertVal.empty()) { + const SmartPtrCXmlElement cmsCertXml = thisXml->createAndAddElement("cmsCert"); + cmsCertXml->setValue(cmsCertVal); + } + + const std::string cmsCipherNameVal = remoteSecurityDoc->getCmsCipherName(); + if (! cmsCipherNameVal.empty()) { + thisXml->addAttribute("cmsCipherName", cmsCipherNameVal); + } + + const SmartPtrCCertCollectionDoc cmsCertCollectionVal = + remoteSecurityDoc->getCmsCertCollection(); + if (! cmsCertCollectionVal.IsNull()) { + const SmartPtrCXmlElement cmsCertCollectionXml = + thisXml->createAndAddElement("cmsCertCollection"); + CertCollectionXml::add(cmsCertCollectionVal, cmsCertCollectionXml); + } + + const std::string cmsCertPathVal = remoteSecurityDoc->getCmsCertPath(); + if (! cmsCertPathVal.empty()) { + thisXml->addAttribute("cmsCertPath", cmsCertPathVal); + } + + const SmartPtrCCertPathCollectionDoc cmsCertPathCollectionVal = + remoteSecurityDoc->getCmsCertPathCollection(); + if (! cmsCertPathCollectionVal.IsNull()) { + const SmartPtrCXmlElement cmsCertPathCollectionXml = + thisXml->createAndAddElement("cmsCertPathCollection"); + CertPathCollectionXml::add(cmsCertPathCollectionVal, cmsCertPathCollectionXml); + } +} + +SmartPtrCRemoteSecurityDoc RemoteSecurityXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("RemoteSecurityXml", "parse"); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string remoteIdVal = + thisXml->findOptionalAttribute("remoteId"); + + const std::string protocolNameVal = + thisXml->findOptionalAttribute("protocolName"); + + std::string cmsCertVal; + const SmartPtrCXmlElement cmsCertXml = thisXml->findOptionalChild("cmsCert"); + if (cmsCertXml) { + cmsCertVal = cmsCertXml->getValue(); + } + + const std::string cmsCipherNameVal = + thisXml->findOptionalAttribute("cmsCipherName"); + + const SmartPtrCXmlElement cmsCertCollectionXml = + thisXml->findOptionalChild("cmsCertCollection"); + SmartPtrCCertCollectionDoc cmsCertCollectionVal; + if (! cmsCertCollectionXml.IsNull()) { + cmsCertCollectionVal = CertCollectionXml::parse(cmsCertCollectionXml); + } + + const std::string cmsCertPathVal = + thisXml->findOptionalAttribute("cmsCertPath"); + + const SmartPtrCXmlElement cmsCertPathCollectionXml = + thisXml->findOptionalChild("cmsCertPathCollection"); + SmartPtrCCertPathCollectionDoc cmsCertPathCollectionVal; + if (! cmsCertPathCollectionXml.IsNull()) { + cmsCertPathCollectionVal = CertPathCollectionXml::parse(cmsCertPathCollectionXml); + } + + SmartPtrCRemoteSecurityDoc remoteSecurityDoc; + remoteSecurityDoc.CreateInstance(); + remoteSecurityDoc->initialize( + remoteIdVal, + protocolNameVal, + cmsCertVal, + cmsCipherNameVal, + cmsCertCollectionVal, + cmsCertPathVal, + cmsCertPathCollectionVal); + + return remoteSecurityDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/stdafx.h new file mode 100644 index 000000000..c13afe134 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/PersistenceXml/stdafx.h @@ -0,0 +1,24 @@ +/* + * Author: bwilliams + * Created: Nov 16, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PERSISTENCEXML_LINKAGE __declspec(dllexport) +#else + #define PERSISTENCEXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp new file mode 100644 index 000000000..8890dd697 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.h" + +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Doc/ProviderInfraDoc/CClassCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderInfraXml/ClassCollectionXml.h" + +using namespace Caf; + +void ClassCollectionXml::add( + const SmartPtrCClassCollectionDoc classCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque fullyQualifiedClassVal = + classCollectionDoc->getFullyQualifiedClass(); + CAF_CM_VALIDATE_STL(fullyQualifiedClassVal); + + if (! fullyQualifiedClassVal.empty()) { + for (TConstIterator > fullyQualifiedClassIter(fullyQualifiedClassVal); + fullyQualifiedClassIter; fullyQualifiedClassIter++) { + const SmartPtrCXmlElement fullyQualifiedClassXml = + thisXml->createAndAddElement("fullyQualifiedClass"); + FullyQualifiedClassGroupXml::add(*fullyQualifiedClassIter, fullyQualifiedClassXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCClassCollectionDoc ClassCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassCollectionXml", "parse"); + + SmartPtrCClassCollectionDoc classCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection fullyQualifiedClassChildrenXml = + thisXml->findRequiredChildren("fullyQualifiedClass"); + + std::deque fullyQualifiedClassVal; + if (! fullyQualifiedClassChildrenXml.IsNull() && ! fullyQualifiedClassChildrenXml->empty()) { + for (TConstIterator fullyQualifiedClassXmlIter(*fullyQualifiedClassChildrenXml); + fullyQualifiedClassXmlIter; fullyQualifiedClassXmlIter++) { + const SmartPtrCXmlElement fullyQualifiedClassXml = fullyQualifiedClassXmlIter->second; + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClassDoc = + FullyQualifiedClassGroupXml::parse(fullyQualifiedClassXml); + fullyQualifiedClassVal.push_back(fullyQualifiedClassDoc); + } + } + + classCollectionDoc.CreateInstance(); + classCollectionDoc->initialize( + fullyQualifiedClassVal); + } + CAF_CM_EXIT; + + return classCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp new file mode 100644 index 000000000..f8200200f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp @@ -0,0 +1,172 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderInfraXml/ProviderRegXml.h" +#include "Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.h" + +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" +#include "Doc/ProviderInfraDoc/CSchemaSummaryDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h" + +using namespace Caf; + +std::string XmlRoots::saveProviderRegToString( + const SmartPtrCProviderRegDoc providerRegDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveProviderRegToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRegDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/ProviderInfra.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "providerReg", schemaNamespace, schemaLocation); + ProviderRegXml::add(providerRegDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCProviderRegDoc XmlRoots::parseProviderRegFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderRegFromString"); + + SmartPtrCProviderRegDoc providerRegDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:providerReg"); + providerRegDoc = ProviderRegXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerRegDoc; +} + +void XmlRoots::saveProviderRegToFile( + const SmartPtrCProviderRegDoc providerRegDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveProviderRegToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRegDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string providerRegStr = + saveProviderRegToString(providerRegDoc); + FileSystemUtils::saveTextFile(filePath, providerRegStr); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRegDoc XmlRoots::parseProviderRegFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderRegFromFile"); + + SmartPtrCProviderRegDoc providerRegDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:providerReg"); + providerRegDoc = ProviderRegXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerRegDoc; +} + +std::string XmlRoots::saveSchemaSummaryToString( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveSchemaSummaryToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaSummaryDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/ProviderInfra.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "schemaSummary", schemaNamespace, schemaLocation); + SchemaSummaryXml::add(schemaSummaryDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCSchemaSummaryDoc XmlRoots::parseSchemaSummaryFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseSchemaSummaryFromString"); + + SmartPtrCSchemaSummaryDoc schemaSummaryDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:schemaSummary"); + schemaSummaryDoc = SchemaSummaryXml::parse(rootXml); + } + CAF_CM_EXIT; + + return schemaSummaryDoc; +} + +void XmlRoots::saveSchemaSummaryToFile( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveSchemaSummaryToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaSummaryDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string schemaSummaryStr = + saveSchemaSummaryToString(schemaSummaryDoc); + FileSystemUtils::saveTextFile(filePath, schemaSummaryStr); + } + CAF_CM_EXIT; +} + +SmartPtrCSchemaSummaryDoc XmlRoots::parseSchemaSummaryFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseSchemaSummaryFromFile"); + + SmartPtrCSchemaSummaryDoc schemaSummaryDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:schemaSummary"); + schemaSummaryDoc = SchemaSummaryXml::parse(rootXml); + } + CAF_CM_EXIT; + + return schemaSummaryDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp new file mode 100644 index 000000000..5e968576f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp @@ -0,0 +1,110 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderInfraXml/ProviderRegXml.h" + +using namespace Caf; + +void ProviderRegXml::add( + const SmartPtrCProviderRegDoc providerRegDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRegXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRegDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string providerNamespaceVal = providerRegDoc->getProviderNamespace(); + CAF_CM_VALIDATE_STRING(providerNamespaceVal); + thisXml->addAttribute("providerNamespace", providerNamespaceVal); + + const std::string providerNameVal = providerRegDoc->getProviderName(); + CAF_CM_VALIDATE_STRING(providerNameVal); + thisXml->addAttribute("providerName", providerNameVal); + + const std::string providerVersionVal = providerRegDoc->getProviderVersion(); + CAF_CM_VALIDATE_STRING(providerVersionVal); + thisXml->addAttribute("providerVersion", providerVersionVal); + + const std::string staleSecVal = + CStringConv::toString(providerRegDoc->getStaleSec()); + CAF_CM_VALIDATE_STRING(staleSecVal); + thisXml->addAttribute("staleSec", staleSecVal); + + const std::string isSchemaVisibleVal = providerRegDoc->getIsSchemaVisible() ? "true" : "false"; + CAF_CM_VALIDATE_STRING(isSchemaVisibleVal); + thisXml->addAttribute("isSchemaVisible", isSchemaVisibleVal); + + const std::string invokerRelPathVal = providerRegDoc->getInvokerRelPath(); + if (! invokerRelPathVal.empty()) { + thisXml->addAttribute("invokerRelPath", invokerRelPathVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRegDoc ProviderRegXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRegXml", "parse"); + + SmartPtrCProviderRegDoc providerRegDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string providerNamespaceStrVal = + thisXml->findRequiredAttribute("providerNamespace"); + const std::string providerNamespaceVal = providerNamespaceStrVal; + + const std::string providerNameStrVal = + thisXml->findRequiredAttribute("providerName"); + const std::string providerNameVal = providerNameStrVal; + + const std::string providerVersionStrVal = + thisXml->findRequiredAttribute("providerVersion"); + const std::string providerVersionVal = providerVersionStrVal; + + const std::string staleSecStrVal = + thisXml->findRequiredAttribute("staleSec"); + int32 staleSecVal = 0; + if (! staleSecStrVal.empty()) { + staleSecVal = CStringConv::fromString(staleSecStrVal); + } + + const std::string isSchemaVisibleStrVal = + thisXml->findRequiredAttribute("isSchemaVisible"); + bool isSchemaVisibleVal = false; + if (! isSchemaVisibleStrVal.empty()) { + isSchemaVisibleVal = (isSchemaVisibleStrVal.compare("true") == 0) ? true : false; + } + + const std::string invokerRelPathStrVal = + thisXml->findOptionalAttribute("invokerRelPath"); + const std::string invokerRelPathVal = invokerRelPathStrVal; + + providerRegDoc.CreateInstance(); + providerRegDoc->initialize( + providerNamespaceVal, + providerNameVal, + providerVersionVal, + staleSecVal, + isSchemaVisibleVal, + invokerRelPathVal); + } + CAF_CM_EXIT; + + return providerRegDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp new file mode 100644 index 000000000..13ecd9450 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp @@ -0,0 +1,105 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderInfraXml/ClassCollectionXml.h" + +#include "Doc/ProviderInfraDoc/CClassCollectionDoc.h" +#include "Doc/ProviderInfraDoc/CSchemaSummaryDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.h" + +using namespace Caf; + +void SchemaSummaryXml::add( + const SmartPtrCSchemaSummaryDoc schemaSummaryDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("SchemaSummaryXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaSummaryDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string providerNamespaceVal = schemaSummaryDoc->getProviderNamespace(); + CAF_CM_VALIDATE_STRING(providerNamespaceVal); + thisXml->addAttribute("providerNamespace", providerNamespaceVal); + + const std::string providerNameVal = schemaSummaryDoc->getProviderName(); + CAF_CM_VALIDATE_STRING(providerNameVal); + thisXml->addAttribute("providerName", providerNameVal); + + const std::string providerVersionVal = schemaSummaryDoc->getProviderVersion(); + CAF_CM_VALIDATE_STRING(providerVersionVal); + thisXml->addAttribute("providerVersion", providerVersionVal); + + const SmartPtrCClassCollectionDoc classCollectionVal = + schemaSummaryDoc->getClassCollection(); + CAF_CM_VALIDATE_SMARTPTR(classCollectionVal); + + const SmartPtrCXmlElement classCollectionXml = + thisXml->createAndAddElement("classCollection"); + ClassCollectionXml::add(classCollectionVal, classCollectionXml); + + const std::string invokerPathVal = schemaSummaryDoc->getInvokerPath(); + if (! invokerPathVal.empty()) { + thisXml->addAttribute("invokerPath", invokerPathVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCSchemaSummaryDoc SchemaSummaryXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("SchemaSummaryXml", "parse"); + + SmartPtrCSchemaSummaryDoc schemaSummaryDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string providerNamespaceStrVal = + thisXml->findRequiredAttribute("providerNamespace"); + const std::string providerNamespaceVal = providerNamespaceStrVal; + + const std::string providerNameStrVal = + thisXml->findRequiredAttribute("providerName"); + const std::string providerNameVal = providerNameStrVal; + + const std::string providerVersionStrVal = + thisXml->findRequiredAttribute("providerVersion"); + const std::string providerVersionVal = providerVersionStrVal; + + const SmartPtrCXmlElement classCollectionXml = + thisXml->findRequiredChild("classCollection"); + + SmartPtrCClassCollectionDoc classCollectionVal; + if (! classCollectionXml.IsNull()) { + classCollectionVal = ClassCollectionXml::parse(classCollectionXml); + } + + const std::string invokerPathStrVal = + thisXml->findOptionalAttribute("invokerPath"); + const std::string invokerPathVal = invokerPathStrVal; + + schemaSummaryDoc.CreateInstance(); + schemaSummaryDoc->initialize( + providerNamespaceVal, + providerNameVal, + providerVersionVal, + classCollectionVal, + invokerPathVal); + } + CAF_CM_EXIT; + + return schemaSummaryDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/stdafx.h new file mode 100644 index 000000000..f64b02dc8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderInfraXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PROVIDERINFRAXML_LINKAGE __declspec(dllexport) +#else + #define PROVIDERINFRAXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.cpp new file mode 100644 index 000000000..dec2af9e0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.cpp @@ -0,0 +1,96 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.h" + +#include "Doc/ProviderRequestDoc/CProviderBatchDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderBatchXml.h" + +using namespace Caf; + +void ProviderBatchXml::add( + const SmartPtrCProviderBatchDoc providerBatchDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderBatchXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerBatchDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string outputDirVal = providerBatchDoc->getOutputDir(); + CAF_CM_VALIDATE_STRING(outputDirVal); + thisXml->addAttribute("outputDir", outputDirVal); + + const SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollectionVal = + providerBatchDoc->getCollectInstancesCollection(); + if (! collectInstancesCollectionVal.IsNull()) { + const SmartPtrCXmlElement collectInstancesCollectionXml = + thisXml->createAndAddElement("collectInstancesCollection"); + ProviderCollectInstancesCollectionXml::add(collectInstancesCollectionVal, collectInstancesCollectionXml); + } + + const SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollectionVal = + providerBatchDoc->getInvokeOperationCollection(); + if (! invokeOperationCollectionVal.IsNull()) { + const SmartPtrCXmlElement invokeOperationCollectionXml = + thisXml->createAndAddElement("invokeOperationCollection"); + ProviderInvokeOperationCollectionXml::add(invokeOperationCollectionVal, invokeOperationCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderBatchDoc ProviderBatchXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderBatchXml", "parse"); + + SmartPtrCProviderBatchDoc providerBatchDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string outputDirStrVal = + thisXml->findRequiredAttribute("outputDir"); + const std::string outputDirVal = outputDirStrVal; + + const SmartPtrCXmlElement collectInstancesCollectionXml = + thisXml->findOptionalChild("collectInstancesCollection"); + + SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollectionVal; + if (! collectInstancesCollectionXml.IsNull()) { + collectInstancesCollectionVal = ProviderCollectInstancesCollectionXml::parse(collectInstancesCollectionXml); + } + + const SmartPtrCXmlElement invokeOperationCollectionXml = + thisXml->findOptionalChild("invokeOperationCollection"); + + SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollectionVal; + if (! invokeOperationCollectionXml.IsNull()) { + invokeOperationCollectionVal = ProviderInvokeOperationCollectionXml::parse(invokeOperationCollectionXml); + } + + providerBatchDoc.CreateInstance(); + providerBatchDoc->initialize( + outputDirVal, + collectInstancesCollectionVal, + invokeOperationCollectionVal); + } + CAF_CM_EXIT; + + return providerBatchDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.cpp new file mode 100644 index 000000000..7f302d002 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.h" + +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.h" + +using namespace Caf; + +void ProviderCollectInstancesCollectionXml::add( + const SmartPtrCProviderCollectInstancesCollectionDoc providerCollectInstancesCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectInstancesCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerCollectInstancesCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque collectInstancesVal = + providerCollectInstancesCollectionDoc->getCollectInstances(); + CAF_CM_VALIDATE_STL(collectInstancesVal); + + if (! collectInstancesVal.empty()) { + for (TConstIterator > collectInstancesIter(collectInstancesVal); + collectInstancesIter; collectInstancesIter++) { + const SmartPtrCXmlElement collectInstancesXml = + thisXml->createAndAddElement("collectInstances"); + ProviderCollectInstancesXml::add(*collectInstancesIter, collectInstancesXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderCollectInstancesCollectionDoc ProviderCollectInstancesCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectInstancesCollectionXml", "parse"); + + SmartPtrCProviderCollectInstancesCollectionDoc providerCollectInstancesCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection collectInstancesChildrenXml = + thisXml->findRequiredChildren("collectInstances"); + + std::deque collectInstancesVal; + if (! collectInstancesChildrenXml.IsNull() && ! collectInstancesChildrenXml->empty()) { + for (TConstIterator collectInstancesXmlIter(*collectInstancesChildrenXml); + collectInstancesXmlIter; collectInstancesXmlIter++) { + const SmartPtrCXmlElement collectInstancesXml = collectInstancesXmlIter->second; + const SmartPtrCProviderCollectInstancesDoc collectInstancesDoc = + ProviderCollectInstancesXml::parse(collectInstancesXml); + collectInstancesVal.push_back(collectInstancesDoc); + } + } + + providerCollectInstancesCollectionDoc.CreateInstance(); + providerCollectInstancesCollectionDoc->initialize( + collectInstancesVal); + } + CAF_CM_EXIT; + + return providerCollectInstancesCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.cpp new file mode 100644 index 000000000..14107edeb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.cpp @@ -0,0 +1,117 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.h" + +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.h" + +using namespace Caf; + +void ProviderCollectInstancesXml::add( + const SmartPtrCProviderCollectInstancesDoc providerCollectInstancesDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectInstancesXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerCollectInstancesDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceVal = providerCollectInstancesDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = providerCollectInstancesDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = providerCollectInstancesDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(providerCollectInstancesDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string outputDirVal = providerCollectInstancesDoc->getOutputDir(); + CAF_CM_VALIDATE_STRING(outputDirVal); + thisXml->addAttribute("outputDir", outputDirVal); + + const SmartPtrCParameterCollectionDoc parameterCollectionVal = + providerCollectInstancesDoc->getParameterCollection(); + if (! parameterCollectionVal.IsNull()) { + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->createAndAddElement("parameterCollection"); + ParameterCollectionXml::add(parameterCollectionVal, parameterCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderCollectInstancesDoc ProviderCollectInstancesXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectInstancesXml", "parse"); + + SmartPtrCProviderCollectInstancesDoc providerCollectInstancesDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string outputDirStrVal = + thisXml->findRequiredAttribute("outputDir"); + const std::string outputDirVal = outputDirStrVal; + + const SmartPtrCXmlElement parameterCollectionXml = + thisXml->findOptionalChild("parameterCollection"); + + SmartPtrCParameterCollectionDoc parameterCollectionVal; + if (! parameterCollectionXml.IsNull()) { + parameterCollectionVal = ParameterCollectionXml::parse(parameterCollectionXml); + } + + providerCollectInstancesDoc.CreateInstance(); + providerCollectInstancesDoc->initialize( + classNamespaceVal, + classNameVal, + classVersionVal, + jobIdVal, + outputDirVal, + parameterCollectionVal); + } + CAF_CM_EXIT; + + return providerCollectInstancesDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.cpp new file mode 100644 index 000000000..0d6965397 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.cpp @@ -0,0 +1,124 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.h" + +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.h" + +using namespace Caf; + +void ProviderCollectSchemaRequestXml::add( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectSchemaRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerCollectSchemaRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(providerCollectSchemaRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(providerCollectSchemaRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = providerCollectSchemaRequestDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(providerCollectSchemaRequestDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string outputDirVal = providerCollectSchemaRequestDoc->getOutputDir(); + CAF_CM_VALIDATE_STRING(outputDirVal); + thisXml->addAttribute("outputDir", outputDirVal); + + const SmartPtrCProviderRequestHeaderDoc requestHeaderVal = + providerCollectSchemaRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + ProviderRequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderCollectSchemaRequestDoc ProviderCollectSchemaRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderCollectSchemaRequestXml", "parse"); + + SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string outputDirStrVal = + thisXml->findRequiredAttribute("outputDir"); + const std::string outputDirVal = outputDirStrVal; + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + + SmartPtrCProviderRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = ProviderRequestHeaderXml::parse(requestHeaderXml); + } + + providerCollectSchemaRequestDoc.CreateInstance(); + providerCollectSchemaRequestDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + jobIdVal, + outputDirVal, + requestHeaderVal); + } + CAF_CM_EXIT; + + return providerCollectSchemaRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.cpp new file mode 100644 index 000000000..effe7aa82 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.h" + +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.h" + +using namespace Caf; + +void ProviderInvokeOperationCollectionXml::add( + const SmartPtrCProviderInvokeOperationCollectionDoc providerInvokeOperationCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderInvokeOperationCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerInvokeOperationCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque invokeOperationVal = + providerInvokeOperationCollectionDoc->getInvokeOperation(); + CAF_CM_VALIDATE_STL(invokeOperationVal); + + if (! invokeOperationVal.empty()) { + for (TConstIterator > invokeOperationIter(invokeOperationVal); + invokeOperationIter; invokeOperationIter++) { + const SmartPtrCXmlElement invokeOperationXml = + thisXml->createAndAddElement("invokeOperation"); + ProviderInvokeOperationXml::add(*invokeOperationIter, invokeOperationXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderInvokeOperationCollectionDoc ProviderInvokeOperationCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderInvokeOperationCollectionXml", "parse"); + + SmartPtrCProviderInvokeOperationCollectionDoc providerInvokeOperationCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection invokeOperationChildrenXml = + thisXml->findRequiredChildren("invokeOperation"); + + std::deque invokeOperationVal; + if (! invokeOperationChildrenXml.IsNull() && ! invokeOperationChildrenXml->empty()) { + for (TConstIterator invokeOperationXmlIter(*invokeOperationChildrenXml); + invokeOperationXmlIter; invokeOperationXmlIter++) { + const SmartPtrCXmlElement invokeOperationXml = invokeOperationXmlIter->second; + const SmartPtrCProviderInvokeOperationDoc invokeOperationDoc = + ProviderInvokeOperationXml::parse(invokeOperationXml); + invokeOperationVal.push_back(invokeOperationDoc); + } + } + + providerInvokeOperationCollectionDoc.CreateInstance(); + providerInvokeOperationCollectionDoc->initialize( + invokeOperationVal); + } + CAF_CM_EXIT; + + return providerInvokeOperationCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.cpp new file mode 100644 index 000000000..e41b0a346 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.cpp @@ -0,0 +1,117 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/OperationXml.h" + +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.h" + +using namespace Caf; + +void ProviderInvokeOperationXml::add( + const SmartPtrCProviderInvokeOperationDoc providerInvokeOperationDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderInvokeOperationXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerInvokeOperationDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceVal = providerInvokeOperationDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = providerInvokeOperationDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = providerInvokeOperationDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(providerInvokeOperationDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string outputDirVal = providerInvokeOperationDoc->getOutputDir(); + CAF_CM_VALIDATE_STRING(outputDirVal); + thisXml->addAttribute("outputDir", outputDirVal); + + const SmartPtrCOperationDoc operationVal = + providerInvokeOperationDoc->getOperation(); + CAF_CM_VALIDATE_SMARTPTR(operationVal); + + const SmartPtrCXmlElement operationXml = + thisXml->createAndAddElement("operation"); + OperationXml::add(operationVal, operationXml); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderInvokeOperationDoc ProviderInvokeOperationXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderInvokeOperationXml", "parse"); + + SmartPtrCProviderInvokeOperationDoc providerInvokeOperationDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string outputDirStrVal = + thisXml->findRequiredAttribute("outputDir"); + const std::string outputDirVal = outputDirStrVal; + + const SmartPtrCXmlElement operationXml = + thisXml->findRequiredChild("operation"); + + SmartPtrCOperationDoc operationVal; + if (! operationXml.IsNull()) { + operationVal = OperationXml::parse(operationXml); + } + + providerInvokeOperationDoc.CreateInstance(); + providerInvokeOperationDoc->initialize( + classNamespaceVal, + classNameVal, + classVersionVal, + jobIdVal, + outputDirVal, + operationVal); + } + CAF_CM_EXIT; + + return providerInvokeOperationDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.cpp new file mode 100644 index 000000000..d83171e4d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.cpp @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.h" + +#include "Doc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.h" + +using namespace Caf; + +void ProviderRequestConfigXml::add( + const SmartPtrCProviderRequestConfigDoc providerRequestConfigDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestConfigXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRequestConfigDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string responseFormatTypeVal = providerRequestConfigDoc->getResponseFormatType(); + CAF_CM_VALIDATE_STRING(responseFormatTypeVal); + thisXml->addAttribute("responseFormatType", responseFormatTypeVal); + + const SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionVal = + providerRequestConfigDoc->getLoggingLevelCollection(); + if (! loggingLevelCollectionVal.IsNull()) { + const SmartPtrCXmlElement loggingLevelCollectionXml = + thisXml->createAndAddElement("loggingLevelCollection"); + LoggingLevelCollectionXml::add(loggingLevelCollectionVal, loggingLevelCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRequestConfigDoc ProviderRequestConfigXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestConfigXml", "parse"); + + SmartPtrCProviderRequestConfigDoc providerRequestConfigDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string responseFormatTypeStrVal = + thisXml->findRequiredAttribute("responseFormatType"); + const std::string responseFormatTypeVal = responseFormatTypeStrVal; + + const SmartPtrCXmlElement loggingLevelCollectionXml = + thisXml->findOptionalChild("loggingLevelCollection"); + + SmartPtrCLoggingLevelCollectionDoc loggingLevelCollectionVal; + if (! loggingLevelCollectionXml.IsNull()) { + loggingLevelCollectionVal = LoggingLevelCollectionXml::parse(loggingLevelCollectionXml); + } + + providerRequestConfigDoc.CreateInstance(); + providerRequestConfigDoc->initialize( + responseFormatTypeVal, + loggingLevelCollectionVal); + } + CAF_CM_EXIT; + + return providerRequestConfigDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.cpp new file mode 100644 index 000000000..fa5567526 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.cpp @@ -0,0 +1,87 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.h" + +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.h" + +using namespace Caf; + +void ProviderRequestHeaderXml::add( + const SmartPtrCProviderRequestHeaderDoc providerRequestHeaderDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestHeaderXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRequestHeaderDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCProviderRequestConfigDoc requestConfigVal = + providerRequestHeaderDoc->getRequestConfig(); + CAF_CM_VALIDATE_SMARTPTR(requestConfigVal); + + const SmartPtrCXmlElement requestConfigXml = + thisXml->createAndAddElement("requestConfig"); + ProviderRequestConfigXml::add(requestConfigVal, requestConfigXml); + + const SmartPtrCPropertyCollectionDoc echoPropertyBagVal = + providerRequestHeaderDoc->getEchoPropertyBag(); + if (! echoPropertyBagVal.IsNull()) { + const SmartPtrCXmlElement echoPropertyBagXml = + thisXml->createAndAddElement("echoPropertyBag"); + PropertyCollectionXml::add(echoPropertyBagVal, echoPropertyBagXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRequestHeaderDoc ProviderRequestHeaderXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestHeaderXml", "parse"); + + SmartPtrCProviderRequestHeaderDoc providerRequestHeaderDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement requestConfigXml = + thisXml->findRequiredChild("requestConfig"); + + SmartPtrCProviderRequestConfigDoc requestConfigVal; + if (! requestConfigXml.IsNull()) { + requestConfigVal = ProviderRequestConfigXml::parse(requestConfigXml); + } + + const SmartPtrCXmlElement echoPropertyBagXml = + thisXml->findOptionalChild("echoPropertyBag"); + + SmartPtrCPropertyCollectionDoc echoPropertyBagVal; + if (! echoPropertyBagXml.IsNull()) { + echoPropertyBagVal = PropertyCollectionXml::parse(echoPropertyBagXml); + } + + providerRequestHeaderDoc.CreateInstance(); + providerRequestHeaderDoc->initialize( + requestConfigVal, + echoPropertyBagVal); + } + CAF_CM_EXIT; + + return providerRequestHeaderDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.cpp new file mode 100644 index 000000000..0e7516748 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.cpp @@ -0,0 +1,140 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderBatchXml.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderBatchDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXml.h" + +using namespace Caf; + +void ProviderRequestXml::add( + const SmartPtrCProviderRequestDoc providerRequestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRequestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(providerRequestDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(providerRequestDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = providerRequestDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const SmartPtrCProviderRequestHeaderDoc requestHeaderVal = + providerRequestDoc->getRequestHeader(); + CAF_CM_VALIDATE_SMARTPTR(requestHeaderVal); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->createAndAddElement("requestHeader"); + ProviderRequestHeaderXml::add(requestHeaderVal, requestHeaderXml); + + const SmartPtrCProviderBatchDoc batchVal = + providerRequestDoc->getBatch(); + CAF_CM_VALIDATE_SMARTPTR(batchVal); + + const SmartPtrCXmlElement batchXml = + thisXml->createAndAddElement("batch"); + ProviderBatchXml::add(batchVal, batchXml); + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + providerRequestDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRequestDoc ProviderRequestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderRequestXml", "parse"); + + SmartPtrCProviderRequestDoc providerRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const SmartPtrCXmlElement requestHeaderXml = + thisXml->findRequiredChild("requestHeader"); + + SmartPtrCProviderRequestHeaderDoc requestHeaderVal; + if (! requestHeaderXml.IsNull()) { + requestHeaderVal = ProviderRequestHeaderXml::parse(requestHeaderXml); + } + + const SmartPtrCXmlElement batchXml = + thisXml->findRequiredChild("batch"); + + SmartPtrCProviderBatchDoc batchVal; + if (! batchXml.IsNull()) { + batchVal = ProviderBatchXml::parse(batchXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + providerRequestDoc.CreateInstance(); + providerRequestDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + requestHeaderVal, + batchVal, + attachmentCollectionVal); + } + CAF_CM_EXIT; + + return providerRequestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.cpp new file mode 100644 index 000000000..880a3d995 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.cpp @@ -0,0 +1,172 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXml.h" + +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h" + +using namespace Caf; + +std::string XmlRoots::saveProviderCollectSchemaRequestToString( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveProviderCollectSchemaRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerCollectSchemaRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/ProviderRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "providerCollectSchemaRequest", schemaNamespace, schemaLocation); + ProviderCollectSchemaRequestXml::add(providerCollectSchemaRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCProviderCollectSchemaRequestDoc XmlRoots::parseProviderCollectSchemaRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderCollectSchemaRequestFromString"); + + SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:providerCollectSchemaRequest"); + providerCollectSchemaRequestDoc = ProviderCollectSchemaRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerCollectSchemaRequestDoc; +} + +void XmlRoots::saveProviderCollectSchemaRequestToFile( + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveProviderCollectSchemaRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerCollectSchemaRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string providerCollectSchemaRequestStr = + saveProviderCollectSchemaRequestToString(providerCollectSchemaRequestDoc); + FileSystemUtils::saveTextFile(filePath, providerCollectSchemaRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderCollectSchemaRequestDoc XmlRoots::parseProviderCollectSchemaRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderCollectSchemaRequestFromFile"); + + SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:providerCollectSchemaRequest"); + providerCollectSchemaRequestDoc = ProviderCollectSchemaRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerCollectSchemaRequestDoc; +} + +std::string XmlRoots::saveProviderRequestToString( + const SmartPtrCProviderRequestDoc providerRequestDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveProviderRequestToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRequestDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/ProviderRequest.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "providerRequest", schemaNamespace, schemaLocation); + ProviderRequestXml::add(providerRequestDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCProviderRequestDoc XmlRoots::parseProviderRequestFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderRequestFromString"); + + SmartPtrCProviderRequestDoc providerRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:providerRequest"); + providerRequestDoc = ProviderRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerRequestDoc; +} + +void XmlRoots::saveProviderRequestToFile( + const SmartPtrCProviderRequestDoc providerRequestDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveProviderRequestToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerRequestDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string providerRequestStr = + saveProviderRequestToString(providerRequestDoc); + FileSystemUtils::saveTextFile(filePath, providerRequestStr); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderRequestDoc XmlRoots::parseProviderRequestFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderRequestFromFile"); + + SmartPtrCProviderRequestDoc providerRequestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:providerRequest"); + providerRequestDoc = ProviderRequestXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerRequestDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/stdafx.h new file mode 100644 index 000000000..2a4ce7e88 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderRequestXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PROVIDERREQUESTXML_LINKAGE __declspec(dllexport) +#else + #define PROVIDERREQUESTXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.cpp new file mode 100644 index 000000000..744695f12 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.cpp @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.h" +#include "Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.h" +#include "Doc/DocXml/ProviderResultsXml/SchemaXml.h" + +#include "Doc/ProviderResultsDoc/CCdifDoc.h" +#include "Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h" +#include "Doc/ProviderResultsDoc/CRequestIdentifierDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderResultsXml/CdifXml.h" + +using namespace Caf; + +void CdifXml::add( + const SmartPtrCCdifDoc cdifDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CdifXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(cdifDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCRequestIdentifierDoc requestIdentifierVal = + cdifDoc->getRequestIdentifier(); + CAF_CM_VALIDATE_SMARTPTR(requestIdentifierVal); + + const SmartPtrCXmlElement requestIdentifierXml = + thisXml->createAndAddElement("requestIdentifier"); + RequestIdentifierXml::add(requestIdentifierVal, requestIdentifierXml); + + const SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionVal = + cdifDoc->getDefinitionObjectCollection(); + if (! definitionObjectCollectionVal.IsNull()) { + const SmartPtrCXmlElement definitionObjectCollectionXml = + thisXml->createAndAddElement("definitionObjectCollection"); + DefinitionObjectCollectionXml::add(definitionObjectCollectionVal, definitionObjectCollectionXml); + } + + const SmartPtrCSchemaDoc schemaVal = + cdifDoc->getSchema(); + CAF_CM_VALIDATE_SMARTPTR(schemaVal); + + const SmartPtrCXmlElement schemaXml = + thisXml->createAndAddElement("schema"); + SchemaXml::add(schemaVal, schemaXml); + } + CAF_CM_EXIT; +} + +SmartPtrCCdifDoc CdifXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CdifXml", "parse"); + + SmartPtrCCdifDoc cdifDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const SmartPtrCXmlElement requestIdentifierXml = + thisXml->findRequiredChild("requestIdentifier"); + + SmartPtrCRequestIdentifierDoc requestIdentifierVal; + if (! requestIdentifierXml.IsNull()) { + requestIdentifierVal = RequestIdentifierXml::parse(requestIdentifierXml); + } + + const SmartPtrCXmlElement definitionObjectCollectionXml = + thisXml->findOptionalChild("definitionObjectCollection"); + + SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionVal; + if (! definitionObjectCollectionXml.IsNull()) { + definitionObjectCollectionVal = DefinitionObjectCollectionXml::parse(definitionObjectCollectionXml); + } + + const SmartPtrCXmlElement schemaXml = + thisXml->findRequiredChild("schema"); + + SmartPtrCSchemaDoc schemaVal; + if (! schemaXml.IsNull()) { + schemaVal = SchemaXml::parse(schemaXml); + } + + cdifDoc.CreateInstance(); + cdifDoc->initialize( + requestIdentifierVal, + definitionObjectCollectionVal, + schemaVal); + } + CAF_CM_EXIT; + + return cdifDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.cpp new file mode 100644 index 000000000..b55dffdd0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.cpp @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.h" + +using namespace Caf; + +void DefinitionObjectCollectionXml::add( + const SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DefinitionObjectCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(definitionObjectCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque valueVal = + definitionObjectCollectionDoc->getValue(); + if (! valueVal.empty()) { + for (TConstIterator > valueIter(valueVal); + valueIter; valueIter++) { + thisXml->appendValue(*valueIter); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCDefinitionObjectCollectionDoc DefinitionObjectCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DefinitionObjectCollectionXml", "parse"); + + SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection valueChildrenXml = + thisXml->getAllChildren(); + + std::deque valueVal; + if (! valueChildrenXml.IsNull() && ! valueChildrenXml->empty()) { + for (TConstIterator valueXmlIter(*valueChildrenXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->saveToStringRaw(); + valueVal.push_back(valueDoc); + } + } + + definitionObjectCollectionDoc.CreateInstance(); + definitionObjectCollectionDoc->initialize( + valueVal); + } + CAF_CM_EXIT; + + return definitionObjectCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.cpp new file mode 100644 index 000000000..2881d0906 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.cpp @@ -0,0 +1,172 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderResultsXml/CdifXml.h" +#include "Doc/DocXml/ProviderResultsXml/SchemaXml.h" + +#include "Doc/ProviderResultsDoc/CCdifDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h" + +using namespace Caf; + +std::string XmlRoots::saveSchemaToString( + const SmartPtrCSchemaDoc schemaDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveSchemaToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("cmdl"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("cmdl/ProviderResults.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "schema", schemaNamespace, schemaLocation); + SchemaXml::add(schemaDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCSchemaDoc XmlRoots::parseSchemaFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseSchemaFromString"); + + SmartPtrCSchemaDoc schemaDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:schema"); + schemaDoc = SchemaXml::parse(rootXml); + } + CAF_CM_EXIT; + + return schemaDoc; +} + +void XmlRoots::saveSchemaToFile( + const SmartPtrCSchemaDoc schemaDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveSchemaToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string schemaStr = + saveSchemaToString(schemaDoc); + FileSystemUtils::saveTextFile(filePath, schemaStr); + } + CAF_CM_EXIT; +} + +SmartPtrCSchemaDoc XmlRoots::parseSchemaFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseSchemaFromFile"); + + SmartPtrCSchemaDoc schemaDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:schema"); + schemaDoc = SchemaXml::parse(rootXml); + } + CAF_CM_EXIT; + + return schemaDoc; +} + +std::string XmlRoots::saveCdifToString( + const SmartPtrCCdifDoc cdifDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveCdifToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(cdifDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("cmdl"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("cmdl/ProviderResults.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "cdif", schemaNamespace, schemaLocation); + CdifXml::add(cdifDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCCdifDoc XmlRoots::parseCdifFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseCdifFromString"); + + SmartPtrCCdifDoc cdifDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:cdif"); + cdifDoc = CdifXml::parse(rootXml); + } + CAF_CM_EXIT; + + return cdifDoc; +} + +void XmlRoots::saveCdifToFile( + const SmartPtrCCdifDoc cdifDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveCdifToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(cdifDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string cdifStr = + saveCdifToString(cdifDoc); + FileSystemUtils::saveTextFile(filePath, cdifStr); + } + CAF_CM_EXIT; +} + +SmartPtrCCdifDoc XmlRoots::parseCdifFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseCdifFromFile"); + + SmartPtrCCdifDoc cdifDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:cdif"); + cdifDoc = CdifXml::parse(rootXml); + } + CAF_CM_EXIT; + + return cdifDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.cpp new file mode 100644 index 000000000..863a4da88 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.cpp @@ -0,0 +1,131 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/ActionClassXml.h" + +#include "Doc/ProviderResultsDoc/CRequestIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.h" + +using namespace Caf; + +void RequestIdentifierXml::add( + const SmartPtrCRequestIdentifierDoc requestIdentifierDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestIdentifierXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(requestIdentifierDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(requestIdentifierDoc->getClientId()); + CAF_CM_VALIDATE_STRING(clientIdVal); + thisXml->addAttribute("clientId", clientIdVal); + + const std::string requestIdVal = + BasePlatform::UuidToString(requestIdentifierDoc->getRequestId()); + CAF_CM_VALIDATE_STRING(requestIdVal); + thisXml->addAttribute("requestId", requestIdVal); + + const std::string pmeIdVal = requestIdentifierDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(requestIdentifierDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const SmartPtrCActionClassDoc actionClassVal = + requestIdentifierDoc->getActionClass(); + CAF_CM_VALIDATE_SMARTPTR(actionClassVal); + + const SmartPtrCXmlElement actionClassXml = + thisXml->createAndAddElement("actionClass"); + ActionClassXml::add(actionClassVal, actionClassXml); + + const std::string sessionIdVal = + BasePlatform::UuidToString(requestIdentifierDoc->getSessionId()); + if (! sessionIdVal.empty()) { + thisXml->addAttribute("sessionId", sessionIdVal); + } + + thisXml->addAttribute("version", "1.0"); + } + CAF_CM_EXIT; +} + +SmartPtrCRequestIdentifierDoc RequestIdentifierXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RequestIdentifierXml", "parse"); + + SmartPtrCRequestIdentifierDoc requestIdentifierDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findRequiredAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findRequiredAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const SmartPtrCXmlElement actionClassXml = + thisXml->findRequiredChild("actionClass"); + + SmartPtrCActionClassDoc actionClassVal; + if (! actionClassXml.IsNull()) { + actionClassVal = ActionClassXml::parse(actionClassXml); + } + + const std::string sessionIdStrVal = + thisXml->findOptionalAttribute("sessionId"); + UUID sessionIdVal = CAFCOMMON_GUID_NULL; + if (! sessionIdStrVal.empty()) { + BasePlatform::UuidFromString(sessionIdStrVal.c_str(), sessionIdVal); + } + + requestIdentifierDoc.CreateInstance(); + requestIdentifierDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + jobIdVal, + actionClassVal, + sessionIdVal); + } + CAF_CM_EXIT; + + return requestIdentifierDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.cpp new file mode 100644 index 000000000..7fe686003 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.cpp @@ -0,0 +1,161 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/ActionClassXml.h" +#include "Doc/DocXml/SchemaTypesXml/DataClassXml.h" + +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h" +#include "Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ProviderResultsXml/SchemaXml.h" +#include "Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.h" +#include "Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.h" + +using namespace Caf; + +void SchemaXml::add( + const SmartPtrCSchemaDoc schemaDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("SchemaXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(schemaDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque dataClassVal = + schemaDoc->getDataClassCollection(); + if (! dataClassVal.empty()) { + for (TConstIterator > dataClassIter(dataClassVal); + dataClassIter; dataClassIter++) { + const SmartPtrCXmlElement dataClassXml = + thisXml->createAndAddElement("dataClass"); + DataClassXml::add(*dataClassIter, dataClassXml); + } + } + + const std::deque actionClassVal = + schemaDoc->getActionClassCollection(); + if (! actionClassVal.empty()) { + for (TConstIterator > actionClassIter(actionClassVal); + actionClassIter; actionClassIter++) { + const SmartPtrCXmlElement actionClassXml = + thisXml->createAndAddElement("actionClass"); + ActionClassXml::add(*actionClassIter, actionClassXml); + } + } + + const std::deque logicalRelationshipVal = + schemaDoc->getLogicalRelationshipCollection(); + if (! logicalRelationshipVal.empty()) { + for (TConstIterator > logicalRelationshipIter(logicalRelationshipVal); + logicalRelationshipIter; logicalRelationshipIter++) { + const SmartPtrCXmlElement logicalRelationshipXml = + thisXml->createAndAddElement("logicalRelationship"); + LogicalRelationshipXml::add(*logicalRelationshipIter, logicalRelationshipXml); + } + } + + const std::deque physicalRelationshipVal = + schemaDoc->getPhysicalRelationshipCollection(); + if (! physicalRelationshipVal.empty()) { + for (TConstIterator > physicalRelationshipIter(physicalRelationshipVal); + physicalRelationshipIter; physicalRelationshipIter++) { + const SmartPtrCXmlElement physicalRelationshipXml = + thisXml->createAndAddElement("physicalRelationship"); + PhysicalRelationshipXml::add(*physicalRelationshipIter, physicalRelationshipXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCSchemaDoc SchemaXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("SchemaXml", "parse"); + + SmartPtrCSchemaDoc schemaDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection dataClassChildrenXml = + thisXml->findOptionalChildren("dataClass"); + + std::deque dataClassVal; + if (! dataClassChildrenXml.IsNull() && ! dataClassChildrenXml->empty()) { + for (TConstIterator dataClassXmlIter(*dataClassChildrenXml); + dataClassXmlIter; dataClassXmlIter++) { + const SmartPtrCXmlElement dataClassXml = dataClassXmlIter->second; + const SmartPtrCDataClassDoc dataClassDoc = + DataClassXml::parse(dataClassXml); + dataClassVal.push_back(dataClassDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection actionClassChildrenXml = + thisXml->findOptionalChildren("actionClass"); + + std::deque actionClassVal; + if (! actionClassChildrenXml.IsNull() && ! actionClassChildrenXml->empty()) { + for (TConstIterator actionClassXmlIter(*actionClassChildrenXml); + actionClassXmlIter; actionClassXmlIter++) { + const SmartPtrCXmlElement actionClassXml = actionClassXmlIter->second; + const SmartPtrCActionClassDoc actionClassDoc = + ActionClassXml::parse(actionClassXml); + actionClassVal.push_back(actionClassDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection logicalRelationshipChildrenXml = + thisXml->findOptionalChildren("logicalRelationship"); + + std::deque logicalRelationshipVal; + if (! logicalRelationshipChildrenXml.IsNull() && ! logicalRelationshipChildrenXml->empty()) { + for (TConstIterator logicalRelationshipXmlIter(*logicalRelationshipChildrenXml); + logicalRelationshipXmlIter; logicalRelationshipXmlIter++) { + const SmartPtrCXmlElement logicalRelationshipXml = logicalRelationshipXmlIter->second; + const SmartPtrCLogicalRelationshipDoc logicalRelationshipDoc = + LogicalRelationshipXml::parse(logicalRelationshipXml); + logicalRelationshipVal.push_back(logicalRelationshipDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection physicalRelationshipChildrenXml = + thisXml->findOptionalChildren("physicalRelationship"); + + std::deque physicalRelationshipVal; + if (! physicalRelationshipChildrenXml.IsNull() && ! physicalRelationshipChildrenXml->empty()) { + for (TConstIterator physicalRelationshipXmlIter(*physicalRelationshipChildrenXml); + physicalRelationshipXmlIter; physicalRelationshipXmlIter++) { + const SmartPtrCXmlElement physicalRelationshipXml = physicalRelationshipXmlIter->second; + const SmartPtrCPhysicalRelationshipDoc physicalRelationshipDoc = + PhysicalRelationshipXml::parse(physicalRelationshipXml); + physicalRelationshipVal.push_back(physicalRelationshipDoc); + } + } + + schemaDoc.CreateInstance(); + schemaDoc->initialize( + dataClassVal, + actionClassVal, + logicalRelationshipVal, + physicalRelationshipVal); + } + CAF_CM_EXIT; + + return schemaDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/stdafx.h new file mode 100644 index 000000000..eacbcaebd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ProviderResultsXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define PROVIDERRESULTSXML_LINKAGE __declspec(dllexport) +#else + #define PROVIDERRESULTSXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.cpp new file mode 100644 index 000000000..931b5e16e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.cpp @@ -0,0 +1,119 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ResponseXml/ResponseHeaderXml.h" + +#include "Doc/ResponseDoc/CErrorResponseDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/ErrorResponseXml.h" + +using namespace Caf; + +void ErrorResponseXml::add( + const SmartPtrCErrorResponseDoc errorResponseDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ErrorResponseXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(errorResponseDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(errorResponseDoc->getClientId()); + if (! clientIdVal.empty()) { + thisXml->addAttribute("clientId", clientIdVal); + } + + const std::string requestIdVal = + BasePlatform::UuidToString(errorResponseDoc->getRequestId()); + if (! requestIdVal.empty()) { + thisXml->addAttribute("requestId", requestIdVal); + } + + const std::string pmeIdVal = errorResponseDoc->getPmeId(); + if (! pmeIdVal.empty()) { + thisXml->addAttribute("pmeId", pmeIdVal); + } + + const SmartPtrCResponseHeaderDoc responseHeaderVal = + errorResponseDoc->getResponseHeader(); + if (! responseHeaderVal.IsNull()) { + const SmartPtrCXmlElement responseHeaderXml = + thisXml->createAndAddElement("responseHeader"); + ResponseHeaderXml::add(responseHeaderVal, responseHeaderXml); + } + + const std::string errorMessageVal = errorResponseDoc->getErrorMessage(); + if (! errorMessageVal.empty()) { + const SmartPtrCXmlElement errorMessageXml = + thisXml->createAndAddElement("errorMessage"); + errorMessageXml->setValue(errorMessageVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCErrorResponseDoc ErrorResponseXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ErrorResponseXml", "parse"); + + SmartPtrCErrorResponseDoc errorResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findOptionalAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findOptionalAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findOptionalAttribute("pmeId"); + + const SmartPtrCXmlElement responseHeaderXml = + thisXml->findOptionalChild("responseHeader"); + SmartPtrCResponseHeaderDoc responseHeaderVal; + if (! responseHeaderXml.IsNull()) { + responseHeaderVal = ResponseHeaderXml::parse(responseHeaderXml); + } + + const SmartPtrCXmlElement errorMessageXml = + thisXml->findOptionalChild("errorMessage"); + std::string errorMessageVal; + if (! errorMessageXml.IsNull()) { + errorMessageVal = errorMessageXml->getValue(); + } + + errorResponseDoc.CreateInstance(); + errorResponseDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + responseHeaderVal, + errorMessageVal); + } + CAF_CM_EXIT; + + return errorResponseDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.cpp new file mode 100644 index 000000000..177bf1ad0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ResponseXml/EventKeyXml.h" + +#include "Doc/ResponseDoc/CEventKeyCollectionDoc.h" +#include "Doc/ResponseDoc/CEventKeyDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/EventKeyCollectionXml.h" + +using namespace Caf; + +void EventKeyCollectionXml::add( + const SmartPtrCEventKeyCollectionDoc eventKeyCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventKeyCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(eventKeyCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque eventKeyVal = + eventKeyCollectionDoc->getEventKey(); + CAF_CM_VALIDATE_STL(eventKeyVal); + + if (! eventKeyVal.empty()) { + for (TConstIterator > eventKeyIter(eventKeyVal); + eventKeyIter; eventKeyIter++) { + const SmartPtrCXmlElement eventKeyXml = + thisXml->createAndAddElement("eventKey"); + EventKeyXml::add(*eventKeyIter, eventKeyXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCEventKeyCollectionDoc EventKeyCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventKeyCollectionXml", "parse"); + + SmartPtrCEventKeyCollectionDoc eventKeyCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection eventKeyChildrenXml = + thisXml->findRequiredChildren("eventKey"); + + std::deque eventKeyVal; + if (! eventKeyChildrenXml.IsNull() && ! eventKeyChildrenXml->empty()) { + for (TConstIterator eventKeyXmlIter(*eventKeyChildrenXml); + eventKeyXmlIter; eventKeyXmlIter++) { + const SmartPtrCXmlElement eventKeyXml = eventKeyXmlIter->second; + const SmartPtrCEventKeyDoc eventKeyDoc = + EventKeyXml::parse(eventKeyXml); + eventKeyVal.push_back(eventKeyDoc); + } + } + + eventKeyCollectionDoc.CreateInstance(); + eventKeyCollectionDoc->initialize( + eventKeyVal); + } + CAF_CM_EXIT; + + return eventKeyCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.cpp new file mode 100644 index 000000000..67d9766d9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.cpp @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/ResponseDoc/CEventKeyDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/EventKeyXml.h" + +using namespace Caf; + +void EventKeyXml::add( + const SmartPtrCEventKeyDoc eventKeyDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventKeyXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(eventKeyDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = eventKeyDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string valueVal = eventKeyDoc->getValue(); + CAF_CM_VALIDATE_STRING(valueVal); + thisXml->addAttribute("value", valueVal); + } + CAF_CM_EXIT; +} + +SmartPtrCEventKeyDoc EventKeyXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventKeyXml", "parse"); + + SmartPtrCEventKeyDoc eventKeyDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string valueStrVal = + thisXml->findRequiredAttribute("value"); + const std::string valueVal = valueStrVal; + + eventKeyDoc.CreateInstance(); + eventKeyDoc->initialize( + nameVal, + valueVal); + } + CAF_CM_EXIT; + + return eventKeyDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.cpp new file mode 100644 index 000000000..a2a1e1d37 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.cpp @@ -0,0 +1,104 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/ResponseDoc/CEventManifestDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/EventManifestXml.h" + +using namespace Caf; + +void EventManifestXml::add( + const SmartPtrCEventManifestDoc eventManifestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventManifestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(eventManifestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceVal = eventManifestDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = eventManifestDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = eventManifestDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + + const std::string operationNameVal = eventManifestDoc->getOperationName(); + CAF_CM_VALIDATE_STRING(operationNameVal); + thisXml->addAttribute("operationName", operationNameVal); + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + eventManifestDoc->getAttachmentCollection(); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollectionVal); + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + CAF_CM_EXIT; +} + +SmartPtrCEventManifestDoc EventManifestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("EventManifestXml", "parse"); + + SmartPtrCEventManifestDoc eventManifestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + const std::string operationNameStrVal = + thisXml->findRequiredAttribute("operationName"); + const std::string operationNameVal = operationNameStrVal; + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findRequiredChild("attachmentCollection"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + eventManifestDoc.CreateInstance(); + eventManifestDoc->initialize( + classNamespaceVal, + classNameVal, + classVersionVal, + operationNameVal, + attachmentCollectionVal); + } + CAF_CM_EXIT; + + return eventManifestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.cpp new file mode 100644 index 000000000..53392448f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ResponseXml/ManifestXml.h" + +#include "Doc/ResponseDoc/CManifestCollectionDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/ManifestCollectionXml.h" + +using namespace Caf; + +void ManifestCollectionXml::add( + const SmartPtrCManifestCollectionDoc manifestCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ManifestCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(manifestCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque manifestVal = + manifestCollectionDoc->getManifest(); + CAF_CM_VALIDATE_STL(manifestVal); + + if (! manifestVal.empty()) { + for (TConstIterator > manifestIter(manifestVal); + manifestIter; manifestIter++) { + const SmartPtrCXmlElement manifestXml = + thisXml->createAndAddElement("manifest"); + ManifestXml::add(*manifestIter, manifestXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCManifestCollectionDoc ManifestCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ManifestCollectionXml", "parse"); + + SmartPtrCManifestCollectionDoc manifestCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection manifestChildrenXml = + thisXml->findRequiredChildren("manifest"); + + std::deque manifestVal; + if (! manifestChildrenXml.IsNull() && ! manifestChildrenXml->empty()) { + for (TConstIterator manifestXmlIter(*manifestChildrenXml); + manifestXmlIter; manifestXmlIter++) { + const SmartPtrCXmlElement manifestXml = manifestXmlIter->second; + const SmartPtrCManifestDoc manifestDoc = + ManifestXml::parse(manifestXml); + manifestVal.push_back(manifestDoc); + } + } + + manifestCollectionDoc.CreateInstance(); + manifestCollectionDoc->initialize( + manifestVal); + } + CAF_CM_EXIT; + + return manifestCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestXml.cpp new file mode 100644 index 000000000..3f5af0d24 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ManifestXml.cpp @@ -0,0 +1,117 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/ManifestXml.h" + +using namespace Caf; + +void ManifestXml::add( + const SmartPtrCManifestDoc manifestDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ManifestXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(manifestDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceVal = manifestDoc->getClassNamespace(); + CAF_CM_VALIDATE_STRING(classNamespaceVal); + thisXml->addAttribute("classNamespace", classNamespaceVal); + + const std::string classNameVal = manifestDoc->getClassName(); + CAF_CM_VALIDATE_STRING(classNameVal); + thisXml->addAttribute("className", classNameVal); + + const std::string classVersionVal = manifestDoc->getClassVersion(); + CAF_CM_VALIDATE_STRING(classVersionVal); + thisXml->addAttribute("classVersion", classVersionVal); + + const std::string jobIdVal = + BasePlatform::UuidToString(manifestDoc->getJobId()); + CAF_CM_VALIDATE_STRING(jobIdVal); + thisXml->addAttribute("jobId", jobIdVal); + + const std::string operationNameVal = manifestDoc->getOperationName(); + CAF_CM_VALIDATE_STRING(operationNameVal); + thisXml->addAttribute("operationName", operationNameVal); + + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionVal = + manifestDoc->getAttachmentNameCollection(); + CAF_CM_VALIDATE_SMARTPTR(attachmentNameCollectionVal); + + const SmartPtrCXmlElement attachmentNameCollectionXml = + thisXml->createAndAddElement("attachmentNameCollection"); + AttachmentNameCollectionXml::add(attachmentNameCollectionVal, attachmentNameCollectionXml); + } + CAF_CM_EXIT; +} + +SmartPtrCManifestDoc ManifestXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ManifestXml", "parse"); + + SmartPtrCManifestDoc manifestDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string classNamespaceStrVal = + thisXml->findRequiredAttribute("classNamespace"); + const std::string classNamespaceVal = classNamespaceStrVal; + + const std::string classNameStrVal = + thisXml->findRequiredAttribute("className"); + const std::string classNameVal = classNameStrVal; + + const std::string classVersionStrVal = + thisXml->findRequiredAttribute("classVersion"); + const std::string classVersionVal = classVersionStrVal; + + const std::string jobIdStrVal = + thisXml->findRequiredAttribute("jobId"); + UUID jobIdVal = CAFCOMMON_GUID_NULL; + if (! jobIdStrVal.empty()) { + BasePlatform::UuidFromString(jobIdStrVal.c_str(), jobIdVal); + } + + const std::string operationNameStrVal = + thisXml->findRequiredAttribute("operationName"); + const std::string operationNameVal = operationNameStrVal; + + const SmartPtrCXmlElement attachmentNameCollectionXml = + thisXml->findRequiredChild("attachmentNameCollection"); + + SmartPtrCAttachmentNameCollectionDoc attachmentNameCollectionVal; + if (! attachmentNameCollectionXml.IsNull()) { + attachmentNameCollectionVal = AttachmentNameCollectionXml::parse(attachmentNameCollectionXml); + } + + manifestDoc.CreateInstance(); + manifestDoc->initialize( + classNamespaceVal, + classNameVal, + classVersionVal, + jobIdVal, + operationNameVal, + attachmentNameCollectionVal); + } + CAF_CM_EXIT; + + return manifestDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.cpp new file mode 100644 index 000000000..fa0bf84c8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.cpp @@ -0,0 +1,129 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/StatisticsXml.h" +#include "Doc/DocXml/ResponseXml/EventKeyCollectionXml.h" +#include "Doc/DocXml/ResponseXml/ResponseHeaderXml.h" + +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" +#include "Doc/ResponseDoc/CEventKeyCollectionDoc.h" +#include "Doc/ResponseDoc/CEventManifestDoc.h" +#include "Doc/ResponseDoc/CProviderEventResponseDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/ProviderEventResponseXml.h" +#include "Doc/DocXml/ResponseXml/EventManifestXml.h" + +using namespace Caf; + +void ProviderEventResponseXml::add( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderEventResponseXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerEventResponseDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string pmeIdVal = providerEventResponseDoc->getPmeId(); + CAF_CM_VALIDATE_STRING(pmeIdVal); + thisXml->addAttribute("pmeId", pmeIdVal); + + const SmartPtrCResponseHeaderDoc responseHeaderVal = + providerEventResponseDoc->getResponseHeader(); + if (! responseHeaderVal.IsNull()) { + const SmartPtrCXmlElement responseHeaderXml = + thisXml->createAndAddElement("responseHeader"); + ResponseHeaderXml::add(responseHeaderVal, responseHeaderXml); + } + + const SmartPtrCEventManifestDoc manifestVal = + providerEventResponseDoc->getManifest(); + CAF_CM_VALIDATE_SMARTPTR(manifestVal); + + const SmartPtrCXmlElement manifestXml = + thisXml->createAndAddElement("manifest"); + EventManifestXml::add(manifestVal, manifestXml); + + const SmartPtrCEventKeyCollectionDoc eventKeyCollectionVal = + providerEventResponseDoc->getEventKeyCollection(); + if (! eventKeyCollectionVal.IsNull()) { + const SmartPtrCXmlElement eventKeyCollectionXml = + thisXml->createAndAddElement("eventKeyCollection"); + EventKeyCollectionXml::add(eventKeyCollectionVal, eventKeyCollectionXml); + } + + const SmartPtrCStatisticsDoc statisticsVal = + providerEventResponseDoc->getStatistics(); + if (! statisticsVal.IsNull()) { + const SmartPtrCXmlElement statisticsXml = + thisXml->createAndAddElement("statistics"); + StatisticsXml::add(statisticsVal, statisticsXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderEventResponseDoc ProviderEventResponseXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderEventResponseXml", "parse"); + + SmartPtrCProviderEventResponseDoc providerEventResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string pmeIdVal = + thisXml->findRequiredAttribute("pmeId"); + + const SmartPtrCXmlElement responseHeaderXml = + thisXml->findOptionalChild("responseHeader"); + SmartPtrCResponseHeaderDoc responseHeaderVal; + if (! responseHeaderXml.IsNull()) { + responseHeaderVal = ResponseHeaderXml::parse(responseHeaderXml); + } + + const SmartPtrCXmlElement manifestXml = + thisXml->findRequiredChild("manifest"); + SmartPtrCEventManifestDoc manifestVal; + if (! manifestXml.IsNull()) { + manifestVal = EventManifestXml::parse(manifestXml); + } + + const SmartPtrCXmlElement eventKeyCollectionXml = + thisXml->findOptionalChild("eventKeyCollection"); + SmartPtrCEventKeyCollectionDoc eventKeyCollectionVal; + if (! eventKeyCollectionXml.IsNull()) { + eventKeyCollectionVal = EventKeyCollectionXml::parse(eventKeyCollectionXml); + } + + const SmartPtrCXmlElement statisticsXml = + thisXml->findOptionalChild("statistics"); + SmartPtrCStatisticsDoc statisticsVal; + if (! statisticsXml.IsNull()) { + statisticsVal = StatisticsXml::parse(statisticsXml); + } + + providerEventResponseDoc.CreateInstance(); + providerEventResponseDoc->initialize( + pmeIdVal, + responseHeaderVal, + manifestVal, + eventKeyCollectionVal, + statisticsVal); + } + CAF_CM_EXIT; + + return providerEventResponseDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.cpp new file mode 100644 index 000000000..32bbf0348 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.cpp @@ -0,0 +1,158 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/StatisticsXml.h" +#include "Doc/DocXml/ResponseXml/ManifestXml.h" +#include "Doc/DocXml/ResponseXml/ResponseHeaderXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Doc/ResponseDoc/CProviderResponseDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/ProviderResponseXml.h" + +using namespace Caf; + +void ProviderResponseXml::add( + const SmartPtrCProviderResponseDoc providerResponseDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderResponseXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerResponseDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(providerResponseDoc->getClientId()); + if (! clientIdVal.empty()) { + thisXml->addAttribute("clientId", clientIdVal); + } + + const std::string requestIdVal = + BasePlatform::UuidToString(providerResponseDoc->getRequestId()); + if (! requestIdVal.empty()) { + thisXml->addAttribute("requestId", requestIdVal); + } + + const std::string pmeIdVal = providerResponseDoc->getPmeId(); + if (! pmeIdVal.empty()) { + thisXml->addAttribute("pmeId", pmeIdVal); + } + + const SmartPtrCResponseHeaderDoc responseHeaderVal = + providerResponseDoc->getResponseHeader(); + if (! responseHeaderVal.IsNull()) { + const SmartPtrCXmlElement responseHeaderXml = + thisXml->createAndAddElement("responseHeader"); + ResponseHeaderXml::add(responseHeaderVal, responseHeaderXml); + } + + const SmartPtrCManifestDoc manifestVal = + providerResponseDoc->getManifest(); + if (! manifestVal.IsNull()) { + const SmartPtrCXmlElement manifestXml = + thisXml->createAndAddElement("manifest"); + ManifestXml::add(manifestVal, manifestXml); + } + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + providerResponseDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + + const SmartPtrCStatisticsDoc statisticsVal = + providerResponseDoc->getStatistics(); + if (! statisticsVal.IsNull()) { + const SmartPtrCXmlElement statisticsXml = + thisXml->createAndAddElement("statistics"); + StatisticsXml::add(statisticsVal, statisticsXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCProviderResponseDoc ProviderResponseXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ProviderResponseXml", "parse"); + + SmartPtrCProviderResponseDoc providerResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findOptionalAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findOptionalAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findOptionalAttribute("pmeId"); + + const SmartPtrCXmlElement responseHeaderXml = + thisXml->findOptionalChild("responseHeader"); + SmartPtrCResponseHeaderDoc responseHeaderVal; + if (! responseHeaderXml.IsNull()) { + responseHeaderVal = ResponseHeaderXml::parse(responseHeaderXml); + } + + const SmartPtrCXmlElement manifestXml = + thisXml->findOptionalChild("manifest"); + SmartPtrCManifestDoc manifestVal; + if (! manifestXml.IsNull()) { + manifestVal = ManifestXml::parse(manifestXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + const SmartPtrCXmlElement statisticsXml = + thisXml->findOptionalChild("statistics"); + SmartPtrCStatisticsDoc statisticsVal; + if (! statisticsXml.IsNull()) { + statisticsVal = StatisticsXml::parse(statisticsXml); + } + + providerResponseDoc.CreateInstance(); + providerResponseDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + responseHeaderVal, + manifestVal, + attachmentCollectionVal, + statisticsVal); + } + CAF_CM_EXIT; + + return providerResponseDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.cpp new file mode 100644 index 000000000..31a17d3f8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.cpp @@ -0,0 +1,103 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/ResponseHeaderXml.h" + +using namespace Caf; + +void ResponseHeaderXml::add( + const SmartPtrCResponseHeaderDoc responseHeaderDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ResponseHeaderXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(responseHeaderDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string versionVal = responseHeaderDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string createdDateTimeVal = responseHeaderDoc->getCreatedDateTime(); + CAF_CM_VALIDATE_STRING(createdDateTimeVal); + thisXml->addAttribute("createdDateTime", createdDateTimeVal); + + const std::string sequenceNumberVal = + CStringConv::toString(responseHeaderDoc->getSequenceNumber()); + CAF_CM_VALIDATE_STRING(sequenceNumberVal); + thisXml->addAttribute("sequenceNumber", sequenceNumberVal); + + const std::string isFinalResponseVal = responseHeaderDoc->getIsFinalResponse() ? "true" : "false"; + CAF_CM_VALIDATE_STRING(isFinalResponseVal); + thisXml->addAttribute("isFinalResponse", isFinalResponseVal); + + const std::string sessionIdVal = + BasePlatform::UuidToString(responseHeaderDoc->getSessionId()); + if (! sessionIdVal.empty()) { + thisXml->addAttribute("sessionId", sessionIdVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCResponseHeaderDoc ResponseHeaderXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ResponseHeaderXml", "parse"); + + SmartPtrCResponseHeaderDoc responseHeaderDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string versionVal = + thisXml->findRequiredAttribute("version"); + + const std::string createdDateTimeVal = + thisXml->findRequiredAttribute("createdDateTime"); + + const std::string sequenceNumberStrVal = + thisXml->findRequiredAttribute("sequenceNumber"); + uint32 sequenceNumberVal = 0; + if (! sequenceNumberStrVal.empty()) { + sequenceNumberVal = CStringConv::fromString(sequenceNumberStrVal); + } + + const std::string isFinalResponseStrVal = + thisXml->findRequiredAttribute("isFinalResponse"); + bool isFinalResponseVal = false; + if (! isFinalResponseStrVal.empty()) { + isFinalResponseVal = (isFinalResponseStrVal.compare("true") == 0) ? true : false; + } + + const std::string sessionIdStrVal = + thisXml->findOptionalAttribute("sessionId"); + UUID sessionIdVal = CAFCOMMON_GUID_NULL; + if (! sessionIdStrVal.empty()) { + BasePlatform::UuidFromString(sessionIdStrVal.c_str(), sessionIdVal); + } + + responseHeaderDoc.CreateInstance(); + responseHeaderDoc->initialize( + versionVal, + createdDateTimeVal, + sequenceNumberVal, + isFinalResponseVal, + sessionIdVal); + } + CAF_CM_EXIT; + + return responseHeaderDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXml.cpp new file mode 100644 index 000000000..eac1b07c4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXml.cpp @@ -0,0 +1,159 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h" +#include "Doc/DocXml/CafCoreTypesXml/StatisticsXml.h" +#include "Doc/DocXml/ResponseXml/ManifestCollectionXml.h" +#include "Doc/DocXml/ResponseXml/ResponseHeaderXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CStatisticsDoc.h" +#include "Doc/ResponseDoc/CManifestCollectionDoc.h" +#include "Doc/ResponseDoc/CResponseDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/ResponseXml.h" + +using namespace Caf; + +void ResponseXml::add( + const SmartPtrCResponseDoc responseDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ResponseXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(responseDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdVal = + BasePlatform::UuidToString(responseDoc->getClientId()); + if (! clientIdVal.empty()) { + thisXml->addAttribute("clientId", clientIdVal); + } + + const std::string requestIdVal = + BasePlatform::UuidToString(responseDoc->getRequestId()); + if (! requestIdVal.empty()) { + thisXml->addAttribute("requestId", requestIdVal); + } + + const std::string pmeIdVal = responseDoc->getPmeId(); + if (! pmeIdVal.empty()) { + thisXml->addAttribute("pmeId", pmeIdVal); + } + + const SmartPtrCResponseHeaderDoc responseHeaderVal = + responseDoc->getResponseHeader(); + if (! responseHeaderVal.IsNull()) { + const SmartPtrCXmlElement responseHeaderXml = + thisXml->createAndAddElement("responseHeader"); + ResponseHeaderXml::add(responseHeaderVal, responseHeaderXml); + } + + const SmartPtrCManifestCollectionDoc manifestCollectionVal = + responseDoc->getManifestCollection(); + if (! manifestCollectionVal.IsNull()) { + const SmartPtrCXmlElement manifestCollectionXml = + thisXml->createAndAddElement("manifestCollection"); + ManifestCollectionXml::add(manifestCollectionVal, manifestCollectionXml); + } + + const SmartPtrCAttachmentCollectionDoc attachmentCollectionVal = + responseDoc->getAttachmentCollection(); + if (! attachmentCollectionVal.IsNull()) { + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionVal, attachmentCollectionXml); + } + + const SmartPtrCStatisticsDoc statisticsVal = + responseDoc->getStatistics(); + if (! statisticsVal.IsNull()) { + const SmartPtrCXmlElement statisticsXml = + thisXml->createAndAddElement("statistics"); + StatisticsXml::add(statisticsVal, statisticsXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCResponseDoc ResponseXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ResponseXml", "parse"); + + SmartPtrCResponseDoc responseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string clientIdStrVal = + thisXml->findOptionalAttribute("clientId"); + UUID clientIdVal = CAFCOMMON_GUID_NULL; + if (! clientIdStrVal.empty()) { + BasePlatform::UuidFromString(clientIdStrVal.c_str(), clientIdVal); + } + + const std::string requestIdStrVal = + thisXml->findOptionalAttribute("requestId"); + UUID requestIdVal = CAFCOMMON_GUID_NULL; + if (! requestIdStrVal.empty()) { + BasePlatform::UuidFromString(requestIdStrVal.c_str(), requestIdVal); + } + + const std::string pmeIdVal = + thisXml->findOptionalAttribute("pmeId"); + + const SmartPtrCXmlElement responseHeaderXml = + thisXml->findOptionalChild("responseHeader"); + SmartPtrCResponseHeaderDoc responseHeaderVal; + if (! responseHeaderXml.IsNull()) { + responseHeaderVal = ResponseHeaderXml::parse(responseHeaderXml); + } + + const SmartPtrCXmlElement manifestCollectionXml = + thisXml->findOptionalChild("manifestCollection"); + + SmartPtrCManifestCollectionDoc manifestCollectionVal; + if (! manifestCollectionXml.IsNull()) { + manifestCollectionVal = ManifestCollectionXml::parse(manifestCollectionXml); + } + + const SmartPtrCXmlElement attachmentCollectionXml = + thisXml->findOptionalChild("attachmentCollection"); + SmartPtrCAttachmentCollectionDoc attachmentCollectionVal; + if (! attachmentCollectionXml.IsNull()) { + attachmentCollectionVal = AttachmentCollectionXml::parse(attachmentCollectionXml); + } + + const SmartPtrCXmlElement statisticsXml = + thisXml->findOptionalChild("statistics"); + SmartPtrCStatisticsDoc statisticsVal; + if (! statisticsXml.IsNull()) { + statisticsVal = StatisticsXml::parse(statisticsXml); + } + + responseDoc.CreateInstance(); + responseDoc->initialize( + clientIdVal, + requestIdVal, + pmeIdVal, + responseHeaderVal, + manifestCollectionVal, + attachmentCollectionVal, + statisticsVal); + } + CAF_CM_EXIT; + + return responseDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.cpp new file mode 100644 index 000000000..b8c448166 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.cpp @@ -0,0 +1,326 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ResponseXml/ResponseXml.h" + +#include "Doc/ResponseDoc/CErrorResponseDoc.h" +#include "Doc/ResponseDoc/CProviderEventResponseDoc.h" +#include "Doc/ResponseDoc/CProviderResponseDoc.h" +#include "Doc/ResponseDoc/CResponseDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/ResponseXml/ResponseXmlRoots.h" +#include "Doc/DocXml/ResponseXml/ErrorResponseXml.h" +#include "Doc/DocXml/ResponseXml/ProviderResponseXml.h" +#include "Doc/DocXml/ResponseXml/ProviderEventResponseXml.h" + +using namespace Caf; + +std::string XmlRoots::saveErrorResponseToString( + const SmartPtrCErrorResponseDoc errorResponseDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveErrorResponseToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(errorResponseDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Response.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "errorResponse", schemaNamespace, schemaLocation); + ErrorResponseXml::add(errorResponseDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCErrorResponseDoc XmlRoots::parseErrorResponseFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseErrorResponseFromString"); + + SmartPtrCErrorResponseDoc errorResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:errorResponse"); + errorResponseDoc = ErrorResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return errorResponseDoc; +} + +void XmlRoots::saveErrorResponseToFile( + const SmartPtrCErrorResponseDoc errorResponseDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveErrorResponseToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(errorResponseDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string errorResponseStr = + saveErrorResponseToString(errorResponseDoc); + FileSystemUtils::saveTextFile(filePath, errorResponseStr); + } + CAF_CM_EXIT; +} + +SmartPtrCErrorResponseDoc XmlRoots::parseErrorResponseFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseErrorResponseFromFile"); + + SmartPtrCErrorResponseDoc errorResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:errorResponse"); + errorResponseDoc = ErrorResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return errorResponseDoc; +} + +std::string XmlRoots::saveProviderResponseToString( + const SmartPtrCProviderResponseDoc providerResponseDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveProviderResponseToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerResponseDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Response.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "providerResponse", schemaNamespace, schemaLocation); + ProviderResponseXml::add(providerResponseDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCProviderResponseDoc XmlRoots::parseProviderResponseFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderResponseFromString"); + + SmartPtrCProviderResponseDoc providerResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:providerResponse"); + providerResponseDoc = ProviderResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerResponseDoc; +} + +void XmlRoots::saveProviderResponseToFile( + const SmartPtrCProviderResponseDoc providerResponseDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveProviderResponseToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerResponseDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string providerResponseStr = + saveProviderResponseToString(providerResponseDoc); + FileSystemUtils::saveTextFile(filePath, providerResponseStr); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderResponseDoc XmlRoots::parseProviderResponseFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderResponseFromFile"); + + SmartPtrCProviderResponseDoc providerResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:providerResponse"); + providerResponseDoc = ProviderResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerResponseDoc; +} + +std::string XmlRoots::saveResponseToString( + const SmartPtrCResponseDoc responseDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveResponseToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(responseDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Response.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "response", schemaNamespace, schemaLocation); + ResponseXml::add(responseDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCResponseDoc XmlRoots::parseResponseFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseResponseFromString"); + + SmartPtrCResponseDoc responseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:response"); + responseDoc = ResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return responseDoc; +} + +void XmlRoots::saveResponseToFile( + const SmartPtrCResponseDoc responseDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveResponseToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(responseDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string responseStr = + saveResponseToString(responseDoc); + FileSystemUtils::saveTextFile(filePath, responseStr); + } + CAF_CM_EXIT; +} + +SmartPtrCResponseDoc XmlRoots::parseResponseFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseResponseFromFile"); + + SmartPtrCResponseDoc responseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:response"); + responseDoc = ResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return responseDoc; +} + +std::string XmlRoots::saveProviderEventResponseToString( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveProviderEventResponseToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerEventResponseDoc); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + const std::string schemaLocation = DocXmlUtils::getSchemaLocation("fx/Response.xsd"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "providerEventResponse", schemaNamespace, schemaLocation); + ProviderEventResponseXml::add(providerEventResponseDoc, rootXml); + + rc = rootXml->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCProviderEventResponseDoc XmlRoots::parseProviderEventResponseFromString( + const std::string xml) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderEventResponseFromString"); + + SmartPtrCProviderEventResponseDoc providerEventResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(xml); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseString(xml, "caf:providerEventResponse"); + providerEventResponseDoc = ProviderEventResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerEventResponseDoc; +} + +void XmlRoots::saveProviderEventResponseToFile( + const SmartPtrCProviderEventResponseDoc providerEventResponseDoc, + const std::string filePath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("XmlRoots", "saveProviderEventResponseToFile"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(providerEventResponseDoc); + CAF_CM_VALIDATE_STRING(filePath); + + CAF_CM_LOG_DEBUG_VA1("Saving to file - %s", filePath.c_str()); + + const std::string providerEventResponseStr = + saveProviderEventResponseToString(providerEventResponseDoc); + FileSystemUtils::saveTextFile(filePath, providerEventResponseStr); + } + CAF_CM_EXIT; +} + +SmartPtrCProviderEventResponseDoc XmlRoots::parseProviderEventResponseFromFile( + const std::string filePath) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "parseProviderEventResponseFromFile"); + + SmartPtrCProviderEventResponseDoc providerEventResponseDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, "caf:providerEventResponse"); + providerEventResponseDoc = ProviderEventResponseXml::parse(rootXml); + } + CAF_CM_EXIT; + + return providerEventResponseDoc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/stdafx.h new file mode 100644 index 000000000..091ff5905 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/ResponseXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define RESPONSEXML_LINKAGE __declspec(dllexport) +#else + #define RESPONSEXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp new file mode 100644 index 000000000..5d5e21c34 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.h" + +#include "Doc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassInstanceDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.h" + +using namespace Caf; + +void ActionClassInstanceCollectionXml::add( + const SmartPtrCActionClassInstanceCollectionDoc actionClassInstanceCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassInstanceCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(actionClassInstanceCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque actionClassInstanceVal = + actionClassInstanceCollectionDoc->getActionClassInstanceCollection(); + CAF_CM_VALIDATE_STL(actionClassInstanceVal); + + if (! actionClassInstanceVal.empty()) { + for (TConstIterator > actionClassInstanceIter(actionClassInstanceVal); + actionClassInstanceIter; actionClassInstanceIter++) { + const SmartPtrCXmlElement actionClassInstanceXml = + thisXml->createAndAddElement("actionClassInstance"); + ActionClassInstanceXml::add(*actionClassInstanceIter, actionClassInstanceXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCActionClassInstanceCollectionDoc ActionClassInstanceCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassInstanceCollectionXml", "parse"); + + SmartPtrCActionClassInstanceCollectionDoc actionClassInstanceCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection actionClassInstanceChildrenXml = + thisXml->findRequiredChildren("actionClassInstance"); + + std::deque actionClassInstanceVal; + if (! actionClassInstanceChildrenXml.IsNull() && ! actionClassInstanceChildrenXml->empty()) { + for (TConstIterator actionClassInstanceXmlIter(*actionClassInstanceChildrenXml); + actionClassInstanceXmlIter; actionClassInstanceXmlIter++) { + const SmartPtrCXmlElement actionClassInstanceXml = actionClassInstanceXmlIter->second; + const SmartPtrCActionClassInstanceDoc actionClassInstanceDoc = + ActionClassInstanceXml::parse(actionClassInstanceXml); + actionClassInstanceVal.push_back(actionClassInstanceDoc); + } + } + + actionClassInstanceCollectionDoc.CreateInstance(); + actionClassInstanceCollectionDoc->initialize( + actionClassInstanceVal); + } + CAF_CM_EXIT; + + return actionClassInstanceCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp new file mode 100644 index 000000000..523ff1277 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp @@ -0,0 +1,95 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.h" + +#include "Doc/SchemaTypesDoc/CActionClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.h" + +using namespace Caf; + +void ActionClassInstanceXml::add( + const SmartPtrCActionClassInstanceDoc actionClassInstanceDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassInstanceXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(actionClassInstanceDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = actionClassInstanceDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = actionClassInstanceDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = actionClassInstanceDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionVal = + actionClassInstanceDoc->getInstanceOperationCollection(); + CAF_CM_VALIDATE_SMARTPTR(instanceOperationCollectionVal); + + const SmartPtrCXmlElement instanceOperationCollectionXml = + thisXml->createAndAddElement("instanceOperationCollection"); + InstanceOperationCollectionXml::add(instanceOperationCollectionVal, instanceOperationCollectionXml); + } + CAF_CM_EXIT; +} + +SmartPtrCActionClassInstanceDoc ActionClassInstanceXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassInstanceXml", "parse"); + + SmartPtrCActionClassInstanceDoc actionClassInstanceDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const SmartPtrCXmlElement instanceOperationCollectionXml = + thisXml->findRequiredChild("instanceOperationCollection"); + + SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionVal; + if (! instanceOperationCollectionXml.IsNull()) { + instanceOperationCollectionVal = InstanceOperationCollectionXml::parse(instanceOperationCollectionXml); + } + + actionClassInstanceDoc.CreateInstance(); + actionClassInstanceDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + instanceOperationCollectionVal); + } + CAF_CM_EXIT; + + return actionClassInstanceDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp new file mode 100644 index 000000000..f273eb41f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp @@ -0,0 +1,143 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/MethodXml.h" + +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CCollectMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/ActionClassXml.h" +#include "Doc/DocXml/SchemaTypesXml/CollectMethodXml.h" + +using namespace Caf; + +void ActionClassXml::add( + const SmartPtrCActionClassDoc actionClassDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(actionClassDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = actionClassDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = actionClassDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = actionClassDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const SmartPtrCCollectMethodDoc collectMethodVal = + actionClassDoc->getCollectMethod(); + if (! collectMethodVal.IsNull()) { + const SmartPtrCXmlElement collectMethodXml = + thisXml->createAndAddElement("collectMethod"); + CollectMethodXml::add(collectMethodVal, collectMethodXml); + } + + const std::deque methodVal = + actionClassDoc->getMethodCollection(); + if (! methodVal.empty()) { + for (TConstIterator > methodIter(methodVal); + methodIter; methodIter++) { + const SmartPtrCXmlElement methodXml = + thisXml->createAndAddElement("method"); + MethodXml::add(*methodIter, methodXml); + } + } + + const std::string displayNameVal = actionClassDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = actionClassDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCActionClassDoc ActionClassXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ActionClassXml", "parse"); + + SmartPtrCActionClassDoc actionClassDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const SmartPtrCXmlElement collectMethodXml = + thisXml->findOptionalChild("collectMethod"); + + SmartPtrCCollectMethodDoc collectMethodVal; + if (! collectMethodXml.IsNull()) { + collectMethodVal = CollectMethodXml::parse(collectMethodXml); + } + + const CXmlElement::SmartPtrCElementCollection methodChildrenXml = + thisXml->findOptionalChildren("method"); + + std::deque methodVal; + if (! methodChildrenXml.IsNull() && ! methodChildrenXml->empty()) { + for (TConstIterator methodXmlIter(*methodChildrenXml); + methodXmlIter; methodXmlIter++) { + const SmartPtrCXmlElement methodXml = methodXmlIter->second; + const SmartPtrCMethodDoc methodDoc = + MethodXml::parse(methodXml); + methodVal.push_back(methodDoc); + } + } + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + actionClassDoc.CreateInstance(); + actionClassDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + collectMethodVal, + methodVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return actionClassDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp new file mode 100644 index 000000000..f6e8a7738 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h" + +using namespace Caf; + +void ClassCardinalityXml::add( + const SmartPtrCClassCardinalityDoc classCardinalityDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassCardinalityXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classCardinalityDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = classCardinalityDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = classCardinalityDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = classCardinalityDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string cardinalityVal = classCardinalityDoc->getCardinality(); + CAF_CM_VALIDATE_STRING(cardinalityVal); + thisXml->addAttribute("cardinality", cardinalityVal); + } + CAF_CM_EXIT; +} + +SmartPtrCClassCardinalityDoc ClassCardinalityXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassCardinalityXml", "parse"); + + SmartPtrCClassCardinalityDoc classCardinalityDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const std::string cardinalityStrVal = + thisXml->findRequiredAttribute("cardinality"); + const std::string cardinalityVal = cardinalityStrVal; + + classCardinalityDoc.CreateInstance(); + classCardinalityDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + cardinalityVal); + } + CAF_CM_EXIT; + + return classCardinalityDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp new file mode 100644 index 000000000..73e93fb4b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CClassFieldDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/ClassFieldXml.h" + +using namespace Caf; + +void ClassFieldXml::add( + const SmartPtrCClassFieldDoc classFieldDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassFieldXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classFieldDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = classFieldDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = classFieldDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = classFieldDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string fieldVal = classFieldDoc->getField(); + CAF_CM_VALIDATE_STRING(fieldVal); + thisXml->addAttribute("field", fieldVal); + } + CAF_CM_EXIT; +} + +SmartPtrCClassFieldDoc ClassFieldXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassFieldXml", "parse"); + + SmartPtrCClassFieldDoc classFieldDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const std::string fieldStrVal = + thisXml->findRequiredAttribute("field"); + const std::string fieldVal = fieldStrVal; + + classFieldDoc.CreateInstance(); + classFieldDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + fieldVal); + } + CAF_CM_EXIT; + + return classFieldDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp new file mode 100644 index 000000000..016147cbd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h" + +using namespace Caf; + +void ClassIdentifierXml::add( + const SmartPtrCClassIdentifierDoc classIdentifierDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassIdentifierXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classIdentifierDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = classIdentifierDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = classIdentifierDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = classIdentifierDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + } + CAF_CM_EXIT; +} + +SmartPtrCClassIdentifierDoc ClassIdentifierXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassIdentifierXml", "parse"); + + SmartPtrCClassIdentifierDoc classIdentifierDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + classIdentifierDoc.CreateInstance(); + classIdentifierDoc->initialize( + namespaceValVal, + nameVal, + versionVal); + } + CAF_CM_EXIT; + + return classIdentifierDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp new file mode 100644 index 000000000..b402656a1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp @@ -0,0 +1,147 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h" + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.h" + +using namespace Caf; + +void ClassInstancePropertyXml::add( + const SmartPtrCClassInstancePropertyDoc classInstancePropertyDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassInstancePropertyXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classInstancePropertyDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = classInstancePropertyDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::deque typeVal = + classInstancePropertyDoc->getType(); + CAF_CM_VALIDATE_STL(typeVal); + + if (! typeVal.empty()) { + for (TConstIterator > typeIter(typeVal); + typeIter; typeIter++) { + const SmartPtrCXmlElement typeXml = + thisXml->createAndAddElement("type"); + ClassIdentifierXml::add(*typeIter, typeXml); + } + } + + const std::string requiredVal = classInstancePropertyDoc->getRequired() ? "true" : "false"; + if (! requiredVal.empty()) { + thisXml->addAttribute("required", requiredVal); + } + + const std::string transientValVal = classInstancePropertyDoc->getTransientVal() ? "true" : "false"; + if (! transientValVal.empty()) { + thisXml->addAttribute("transient", transientValVal); + } + + const std::string listVal = classInstancePropertyDoc->getList() ? "true" : "false"; + if (! listVal.empty()) { + thisXml->addAttribute("list", listVal); + } + + const std::string displayNameVal = classInstancePropertyDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = classInstancePropertyDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCClassInstancePropertyDoc ClassInstancePropertyXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassInstancePropertyXml", "parse"); + + SmartPtrCClassInstancePropertyDoc classInstancePropertyDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const CXmlElement::SmartPtrCElementCollection typeChildrenXml = + thisXml->findRequiredChildren("type"); + + std::deque typeVal; + if (! typeChildrenXml.IsNull() && ! typeChildrenXml->empty()) { + for (TConstIterator typeXmlIter(*typeChildrenXml); + typeXmlIter; typeXmlIter++) { + const SmartPtrCXmlElement typeXml = typeXmlIter->second; + const SmartPtrCClassIdentifierDoc typeDoc = + ClassIdentifierXml::parse(typeXml); + typeVal.push_back(typeDoc); + } + } + + const std::string requiredStrVal = + thisXml->findOptionalAttribute("required"); + bool requiredVal = false; + if (! requiredStrVal.empty()) { + requiredVal = (requiredStrVal.compare("true") == 0) ? true : false; + } + + const std::string transientValStrVal = + thisXml->findOptionalAttribute("transient"); + bool transientValVal = false; + if (! transientValStrVal.empty()) { + transientValVal = (transientValStrVal.compare("true") == 0) ? true : false; + } + + const std::string listStrVal = + thisXml->findOptionalAttribute("list"); + bool listVal = false; + if (! listStrVal.empty()) { + listVal = (listStrVal.compare("true") == 0) ? true : false; + } + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + classInstancePropertyDoc.CreateInstance(); + classInstancePropertyDoc->initialize( + nameVal, + typeVal, + requiredVal, + transientValVal, + listVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return classInstancePropertyDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp new file mode 100644 index 000000000..ba35f5209 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp @@ -0,0 +1,228 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/ClassPropertyXml.h" + +using namespace Caf; + +void ClassPropertyXml::add( + const SmartPtrCClassPropertyDoc classPropertyDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassPropertyXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(classPropertyDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = classPropertyDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string typeVal = + EnumConvertersXml::convertPropertyTypeToString(classPropertyDoc->getType()); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::deque valueVal = + classPropertyDoc->getValue(); + if (! valueVal.empty()) { + for (TConstIterator > valueIter(valueVal); + valueIter; valueIter++) { + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setValue(*valueIter); + } + } + + const std::string requiredVal = classPropertyDoc->getRequired() ? "true" : "false"; + if (! requiredVal.empty()) { + thisXml->addAttribute("required", requiredVal); + } + + const std::string keyVal = classPropertyDoc->getKey() ? "true" : "false"; + if (! keyVal.empty()) { + thisXml->addAttribute("key", keyVal); + } + + const std::string listVal = classPropertyDoc->getList() ? "true" : "false"; + if (! listVal.empty()) { + thisXml->addAttribute("list", listVal); + } + + const std::string caseSensitiveVal = classPropertyDoc->getCaseSensitive() ? "true" : "false"; + if (! caseSensitiveVal.empty()) { + thisXml->addAttribute("caseSensitive", caseSensitiveVal); + } + + const std::string transientValVal = classPropertyDoc->getTransientVal() ? "true" : "false"; + if (! transientValVal.empty()) { + thisXml->addAttribute("transient", transientValVal); + } + + const std::string defaultValVal = classPropertyDoc->getDefaultVal(); + if (! defaultValVal.empty()) { + thisXml->addAttribute("default", defaultValVal); + } + + const std::string validatorVal = + EnumConvertersXml::convertValidatorTypeToString(classPropertyDoc->getValidator()); + if (! validatorVal.empty()) { + thisXml->addAttribute("validator", validatorVal); + } + + const std::string upperRangeVal = classPropertyDoc->getUpperRange(); + if (! upperRangeVal.empty()) { + thisXml->addAttribute("upperRange", upperRangeVal); + } + + const std::string lowerRangeVal = classPropertyDoc->getLowerRange(); + if (! lowerRangeVal.empty()) { + thisXml->addAttribute("lowerRange", lowerRangeVal); + } + + const std::string displayNameVal = classPropertyDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = classPropertyDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCClassPropertyDoc ClassPropertyXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("ClassPropertyXml", "parse"); + + SmartPtrCClassPropertyDoc classPropertyDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string typeStrVal = + thisXml->findRequiredAttribute("type"); + PROPERTY_TYPE typeVal = PROPERTY_NONE; + if (! typeStrVal.empty()) { + typeVal = EnumConvertersXml::convertStringToPropertyType(typeStrVal); + } + + const CXmlElement::SmartPtrCElementCollection valueChildrenXml = + thisXml->findOptionalChildren("value"); + + std::deque valueVal; + if (! valueChildrenXml.IsNull() && ! valueChildrenXml->empty()) { + for (TConstIterator valueXmlIter(*valueChildrenXml); + valueXmlIter; valueXmlIter++) { + const SmartPtrCXmlElement valueXml = valueXmlIter->second; + const std::string valueDoc = valueXml->getValue(); + valueVal.push_back(valueDoc); + } + } + + const std::string requiredStrVal = + thisXml->findOptionalAttribute("required"); + bool requiredVal = false; + if (! requiredStrVal.empty()) { + requiredVal = (requiredStrVal.compare("true") == 0) ? true : false; + } + + const std::string keyStrVal = + thisXml->findOptionalAttribute("key"); + bool keyVal = false; + if (! keyStrVal.empty()) { + keyVal = (keyStrVal.compare("true") == 0) ? true : false; + } + + const std::string listStrVal = + thisXml->findOptionalAttribute("list"); + bool listVal = false; + if (! listStrVal.empty()) { + listVal = (listStrVal.compare("true") == 0) ? true : false; + } + + const std::string caseSensitiveStrVal = + thisXml->findOptionalAttribute("caseSensitive"); + bool caseSensitiveVal = false; + if (! caseSensitiveStrVal.empty()) { + caseSensitiveVal = (caseSensitiveStrVal.compare("true") == 0) ? true : false; + } + + const std::string transientValStrVal = + thisXml->findOptionalAttribute("transient"); + bool transientValVal = false; + if (! transientValStrVal.empty()) { + transientValVal = (transientValStrVal.compare("true") == 0) ? true : false; + } + + const std::string defaultValStrVal = + thisXml->findOptionalAttribute("default"); + const std::string defaultValVal = defaultValStrVal; + + const std::string validatorStrVal = + thisXml->findOptionalAttribute("validator"); + VALIDATOR_TYPE validatorVal = VALIDATOR_NONE; + if (! validatorStrVal.empty()) { + validatorVal = EnumConvertersXml::convertStringToValidatorType(validatorStrVal); + } + + const std::string upperRangeStrVal = + thisXml->findOptionalAttribute("upperRange"); + const std::string upperRangeVal = upperRangeStrVal; + + const std::string lowerRangeStrVal = + thisXml->findOptionalAttribute("lowerRange"); + const std::string lowerRangeVal = lowerRangeStrVal; + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + classPropertyDoc.CreateInstance(); + classPropertyDoc->initialize( + nameVal, + typeVal, + valueVal, + requiredVal, + keyVal, + listVal, + caseSensitiveVal, + transientValVal, + defaultValVal, + validatorVal, + upperRangeVal, + lowerRangeVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return classPropertyDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp new file mode 100644 index 000000000..9dc07ad68 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h" + +using namespace Caf; + +void CmdlMetadataXml::add( + const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CmdlMetadataXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(cmdlMetadataDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = cmdlMetadataDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string valueVal = + cmdlMetadataDoc->getValue(); + CAF_CM_VALIDATE_STRING(valueVal); + + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setValue(valueVal); + } + CAF_CM_EXIT; +} + +SmartPtrCCmdlMetadataDoc CmdlMetadataXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CmdlMetadataXml", "parse"); + + SmartPtrCCmdlMetadataDoc cmdlMetadataDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const SmartPtrCXmlElement valueXml = + thisXml->findRequiredChild("value"); + + std::string valueVal; + if (! valueXml.IsNull()) { + valueVal = valueXml->getValue(); + } + + cmdlMetadataDoc.CreateInstance(); + cmdlMetadataDoc->initialize( + nameVal, + valueVal); + } + CAF_CM_EXIT; + + return cmdlMetadataDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp new file mode 100644 index 000000000..a6fc7065e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CCmdlUnionDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h" + +using namespace Caf; + +void CmdlUnionXml::add( + const SmartPtrCCmdlUnionDoc cmdlUnionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CmdlUnionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(cmdlUnionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = cmdlUnionDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = cmdlUnionDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = cmdlUnionDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + } + CAF_CM_EXIT; +} + +SmartPtrCCmdlUnionDoc CmdlUnionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CmdlUnionXml", "parse"); + + SmartPtrCCmdlUnionDoc cmdlUnionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + cmdlUnionDoc.CreateInstance(); + cmdlUnionDoc->initialize( + namespaceValVal, + nameVal, + versionVal); + } + CAF_CM_EXIT; + + return cmdlUnionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp new file mode 100644 index 000000000..eb27474ee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp @@ -0,0 +1,194 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h" +#include "Doc/DocXml/SchemaTypesXml/InstanceParameterXml.h" +#include "Doc/DocXml/SchemaTypesXml/MethodParameterXml.h" + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CCollectMethodDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/CollectMethodXml.h" + +using namespace Caf; + +void CollectMethodXml::add( + const SmartPtrCCollectMethodDoc collectMethodDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CollectMethodXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(collectMethodDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = collectMethodDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::deque parameterVal = + collectMethodDoc->getParameterCollection(); + if (! parameterVal.empty()) { + for (TConstIterator > parameterIter(parameterVal); + parameterIter; parameterIter++) { + const SmartPtrCXmlElement parameterXml = + thisXml->createAndAddElement("parameter"); + MethodParameterXml::add(*parameterIter, parameterXml); + } + } + + const std::deque instanceParameterVal = + collectMethodDoc->getInstanceParameterCollection(); + if (! instanceParameterVal.empty()) { + for (TConstIterator > instanceParameterIter(instanceParameterVal); + instanceParameterIter; instanceParameterIter++) { + const SmartPtrCXmlElement instanceParameterXml = + thisXml->createAndAddElement("instanceParameter"); + InstanceParameterXml::add(*instanceParameterIter, instanceParameterXml); + } + } + + const std::deque returnValVal = + collectMethodDoc->getReturnValCollection(); + if (! returnValVal.empty()) { + for (TConstIterator > returnValIter(returnValVal); + returnValIter; returnValIter++) { + const SmartPtrCXmlElement returnValXml = + thisXml->createAndAddElement("return"); + ClassIdentifierXml::add(*returnValIter, returnValXml); + } + } + + const std::deque eventValVal = + collectMethodDoc->getEventValCollection(); + if (! eventValVal.empty()) { + for (TConstIterator > eventValIter(eventValVal); + eventValIter; eventValIter++) { + const SmartPtrCXmlElement eventValXml = + thisXml->createAndAddElement("event"); + ClassIdentifierXml::add(*eventValIter, eventValXml); + } + } + + const std::deque errorVal = + collectMethodDoc->getErrorCollection(); + if (! errorVal.empty()) { + for (TConstIterator > errorIter(errorVal); + errorIter; errorIter++) { + const SmartPtrCXmlElement errorXml = + thisXml->createAndAddElement("error"); + ClassIdentifierXml::add(*errorIter, errorXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCCollectMethodDoc CollectMethodXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("CollectMethodXml", "parse"); + + SmartPtrCCollectMethodDoc collectMethodDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const CXmlElement::SmartPtrCElementCollection parameterChildrenXml = + thisXml->findOptionalChildren("parameter"); + + std::deque parameterVal; + if (! parameterChildrenXml.IsNull() && ! parameterChildrenXml->empty()) { + for (TConstIterator parameterXmlIter(*parameterChildrenXml); + parameterXmlIter; parameterXmlIter++) { + const SmartPtrCXmlElement parameterXml = parameterXmlIter->second; + const SmartPtrCMethodParameterDoc parameterDoc = + MethodParameterXml::parse(parameterXml); + parameterVal.push_back(parameterDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instanceParameterChildrenXml = + thisXml->findOptionalChildren("instanceParameter"); + + std::deque instanceParameterVal; + if (! instanceParameterChildrenXml.IsNull() && ! instanceParameterChildrenXml->empty()) { + for (TConstIterator instanceParameterXmlIter(*instanceParameterChildrenXml); + instanceParameterXmlIter; instanceParameterXmlIter++) { + const SmartPtrCXmlElement instanceParameterXml = instanceParameterXmlIter->second; + const SmartPtrCInstanceParameterDoc instanceParameterDoc = + InstanceParameterXml::parse(instanceParameterXml); + instanceParameterVal.push_back(instanceParameterDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection returnValChildrenXml = + thisXml->findOptionalChildren("return"); + + std::deque returnValVal; + if (! returnValChildrenXml.IsNull() && ! returnValChildrenXml->empty()) { + for (TConstIterator returnValXmlIter(*returnValChildrenXml); + returnValXmlIter; returnValXmlIter++) { + const SmartPtrCXmlElement returnValXml = returnValXmlIter->second; + const SmartPtrCClassIdentifierDoc returnValDoc = + ClassIdentifierXml::parse(returnValXml); + returnValVal.push_back(returnValDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection eventValChildrenXml = + thisXml->findOptionalChildren("event"); + + std::deque eventValVal; + if (! eventValChildrenXml.IsNull() && ! eventValChildrenXml->empty()) { + for (TConstIterator eventValXmlIter(*eventValChildrenXml); + eventValXmlIter; eventValXmlIter++) { + const SmartPtrCXmlElement eventValXml = eventValXmlIter->second; + const SmartPtrCClassIdentifierDoc eventValDoc = + ClassIdentifierXml::parse(eventValXml); + eventValVal.push_back(eventValDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection errorChildrenXml = + thisXml->findOptionalChildren("error"); + + std::deque errorVal; + if (! errorChildrenXml.IsNull() && ! errorChildrenXml->empty()) { + for (TConstIterator errorXmlIter(*errorChildrenXml); + errorXmlIter; errorXmlIter++) { + const SmartPtrCXmlElement errorXml = errorXmlIter->second; + const SmartPtrCClassIdentifierDoc errorDoc = + ClassIdentifierXml::parse(errorXml); + errorVal.push_back(errorDoc); + } + } + + collectMethodDoc.CreateInstance(); + collectMethodDoc->initialize( + nameVal, + parameterVal, + instanceParameterVal, + returnValVal, + eventValVal, + errorVal); + } + CAF_CM_EXIT; + + return collectMethodDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp new file mode 100644 index 000000000..65d2b2725 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.h" + +#include "Doc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.h" + +using namespace Caf; + +void DataClassInstanceCollectionXml::add( + const SmartPtrCDataClassInstanceCollectionDoc dataClassInstanceCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassInstanceCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassInstanceCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque dataClassInstanceVal = + dataClassInstanceCollectionDoc->getDataClassInstanceCollection(); + CAF_CM_VALIDATE_STL(dataClassInstanceVal); + + if (! dataClassInstanceVal.empty()) { + for (TConstIterator > dataClassInstanceIter(dataClassInstanceVal); + dataClassInstanceIter; dataClassInstanceIter++) { + const SmartPtrCXmlElement dataClassInstanceXml = + thisXml->createAndAddElement("dataClassInstance"); + DataClassInstanceXml::add(*dataClassInstanceIter, dataClassInstanceXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassInstanceCollectionDoc DataClassInstanceCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassInstanceCollectionXml", "parse"); + + SmartPtrCDataClassInstanceCollectionDoc dataClassInstanceCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection dataClassInstanceChildrenXml = + thisXml->findRequiredChildren("dataClassInstance"); + + std::deque dataClassInstanceVal; + if (! dataClassInstanceChildrenXml.IsNull() && ! dataClassInstanceChildrenXml->empty()) { + for (TConstIterator dataClassInstanceXmlIter(*dataClassInstanceChildrenXml); + dataClassInstanceXmlIter; dataClassInstanceXmlIter++) { + const SmartPtrCXmlElement dataClassInstanceXml = dataClassInstanceXmlIter->second; + const SmartPtrCDataClassInstanceDoc dataClassInstanceDoc = + DataClassInstanceXml::parse(dataClassInstanceXml); + dataClassInstanceVal.push_back(dataClassInstanceDoc); + } + } + + dataClassInstanceCollectionDoc.CreateInstance(); + dataClassInstanceCollectionDoc->initialize( + dataClassInstanceVal); + } + CAF_CM_EXIT; + + return dataClassInstanceCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp new file mode 100644 index 000000000..1e23beb4e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp @@ -0,0 +1,179 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h" +#include "Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h" +#include "Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.h" + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CCmdlUnionDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.h" +#include "Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.h" + +using namespace Caf; + +void DataClassInstanceXml::add( + const SmartPtrCDataClassInstanceDoc dataClassInstanceDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassInstanceXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassInstanceDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = dataClassInstanceDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = dataClassInstanceDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = dataClassInstanceDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::deque cmdlMetadataVal = + dataClassInstanceDoc->getCmdlMetadataCollection(); + if (! cmdlMetadataVal.empty()) { + for (TConstIterator > cmdlMetadataIter(cmdlMetadataVal); + cmdlMetadataIter; cmdlMetadataIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = + thisXml->createAndAddElement("cmdlMetadata"); + CmdlMetadataXml::add(*cmdlMetadataIter, cmdlMetadataXml); + } + } + + const std::deque propertyVal = + dataClassInstanceDoc->getPropertyCollection(); + if (! propertyVal.empty()) { + for (TConstIterator > propertyIter(propertyVal); + propertyIter; propertyIter++) { + const SmartPtrCXmlElement propertyXml = + thisXml->createAndAddElement("property"); + DataClassPropertyXml::add(*propertyIter, propertyXml); + } + } + + const std::deque instancePropertyVal = + dataClassInstanceDoc->getInstancePropertyCollection(); + if (! instancePropertyVal.empty()) { + for (TConstIterator > instancePropertyIter(instancePropertyVal); + instancePropertyIter; instancePropertyIter++) { + const SmartPtrCXmlElement instancePropertyXml = + thisXml->createAndAddElement("instanceProperty"); + DataClassSubInstanceXml::add(*instancePropertyIter, instancePropertyXml); + } + } + + const SmartPtrCCmdlUnionDoc cmdlUnionVal = + dataClassInstanceDoc->getCmdlUnion(); + if (! cmdlUnionVal.IsNull()) { + const SmartPtrCXmlElement cmdlUnionXml = + thisXml->createAndAddElement("cmdlUnion"); + CmdlUnionXml::add(cmdlUnionVal, cmdlUnionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassInstanceDoc DataClassInstanceXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassInstanceXml", "parse"); + + SmartPtrCDataClassInstanceDoc dataClassInstanceDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const CXmlElement::SmartPtrCElementCollection cmdlMetadataChildrenXml = + thisXml->findOptionalChildren("cmdlMetadata"); + + std::deque cmdlMetadataVal; + if (! cmdlMetadataChildrenXml.IsNull() && ! cmdlMetadataChildrenXml->empty()) { + for (TConstIterator cmdlMetadataXmlIter(*cmdlMetadataChildrenXml); + cmdlMetadataXmlIter; cmdlMetadataXmlIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = cmdlMetadataXmlIter->second; + const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc = + CmdlMetadataXml::parse(cmdlMetadataXml); + cmdlMetadataVal.push_back(cmdlMetadataDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection propertyChildrenXml = + thisXml->findOptionalChildren("property"); + + std::deque propertyVal; + if (! propertyChildrenXml.IsNull() && ! propertyChildrenXml->empty()) { + for (TConstIterator propertyXmlIter(*propertyChildrenXml); + propertyXmlIter; propertyXmlIter++) { + const SmartPtrCXmlElement propertyXml = propertyXmlIter->second; + const SmartPtrCDataClassPropertyDoc propertyDoc = + DataClassPropertyXml::parse(propertyXml); + propertyVal.push_back(propertyDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instancePropertyChildrenXml = + thisXml->findOptionalChildren("instanceProperty"); + + std::deque instancePropertyVal; + if (! instancePropertyChildrenXml.IsNull() && ! instancePropertyChildrenXml->empty()) { + for (TConstIterator instancePropertyXmlIter(*instancePropertyChildrenXml); + instancePropertyXmlIter; instancePropertyXmlIter++) { + const SmartPtrCXmlElement instancePropertyXml = instancePropertyXmlIter->second; + const SmartPtrCDataClassSubInstanceDoc instancePropertyDoc = + DataClassSubInstanceXml::parse(instancePropertyXml); + instancePropertyVal.push_back(instancePropertyDoc); + } + } + + const SmartPtrCXmlElement cmdlUnionXml = + thisXml->findOptionalChild("cmdlUnion"); + + SmartPtrCCmdlUnionDoc cmdlUnionVal; + if (! cmdlUnionXml.IsNull()) { + cmdlUnionVal = CmdlUnionXml::parse(cmdlUnionXml); + } + + dataClassInstanceDoc.CreateInstance(); + dataClassInstanceDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + cmdlMetadataVal, + propertyVal, + instancePropertyVal, + cmdlUnionVal); + } + CAF_CM_EXIT; + + return dataClassInstanceDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp new file mode 100644 index 000000000..478859fcb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp @@ -0,0 +1,105 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h" + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.h" + +using namespace Caf; + +void DataClassPropertyXml::add( + const SmartPtrCDataClassPropertyDoc dataClassPropertyDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassPropertyXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassPropertyDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = dataClassPropertyDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::deque cmdlMetadataVal = + dataClassPropertyDoc->getCmdlMetadata(); + if (! cmdlMetadataVal.empty()) { + for (TConstIterator > cmdlMetadataIter(cmdlMetadataVal); + cmdlMetadataIter; cmdlMetadataIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = + thisXml->createAndAddElement("cmdlMetadata"); + CmdlMetadataXml::add(*cmdlMetadataIter, cmdlMetadataXml); + } + } + + const std::string valueVal = + dataClassPropertyDoc->getValue(); + if (! valueVal.empty()) { + const SmartPtrCXmlElement valueXml = + thisXml->createAndAddElement("value"); + valueXml->setValue(valueVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassPropertyDoc DataClassPropertyXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassPropertyXml", "parse"); + + SmartPtrCDataClassPropertyDoc dataClassPropertyDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const CXmlElement::SmartPtrCElementCollection cmdlMetadataChildrenXml = + thisXml->findOptionalChildren("cmdlMetadata"); + + std::deque cmdlMetadataVal; + if (! cmdlMetadataChildrenXml.IsNull() && ! cmdlMetadataChildrenXml->empty()) { + for (TConstIterator cmdlMetadataXmlIter(*cmdlMetadataChildrenXml); + cmdlMetadataXmlIter; cmdlMetadataXmlIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = cmdlMetadataXmlIter->second; + const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc = + CmdlMetadataXml::parse(cmdlMetadataXml); + cmdlMetadataVal.push_back(cmdlMetadataDoc); + } + } + + const SmartPtrCXmlElement valueXml = + thisXml->findOptionalChild("value"); + + std::string valueVal; + if (! valueXml.IsNull()) { + if (! valueXml.IsNull()) { + valueVal = valueXml->getValue(); + } + } + + dataClassPropertyDoc.CreateInstance(); + dataClassPropertyDoc->initialize( + nameVal, + cmdlMetadataVal, + valueVal); + } + CAF_CM_EXIT; + + return dataClassPropertyDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp new file mode 100644 index 000000000..b53133004 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp @@ -0,0 +1,159 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.h" +#include "Doc/DocXml/SchemaTypesXml/CmdlUnionXml.h" + +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CCmdlUnionDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.h" +#include "Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.h" + +using namespace Caf; + +void DataClassSubInstanceXml::add( + const SmartPtrCDataClassSubInstanceDoc dataClassSubInstanceDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassSubInstanceXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassSubInstanceDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = dataClassSubInstanceDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::deque cmdlMetadataVal = + dataClassSubInstanceDoc->getCmdlMetadataCollection(); + if (! cmdlMetadataVal.empty()) { + for (TConstIterator > cmdlMetadataIter(cmdlMetadataVal); + cmdlMetadataIter; cmdlMetadataIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = + thisXml->createAndAddElement("cmdlMetadata"); + CmdlMetadataXml::add(*cmdlMetadataIter, cmdlMetadataXml); + } + } + + const std::deque propertyVal = + dataClassSubInstanceDoc->getPropertyCollection(); + if (! propertyVal.empty()) { + for (TConstIterator > propertyIter(propertyVal); + propertyIter; propertyIter++) { + const SmartPtrCXmlElement propertyXml = + thisXml->createAndAddElement("property"); + DataClassPropertyXml::add(*propertyIter, propertyXml); + } + } + + const std::deque instancePropertyVal = + dataClassSubInstanceDoc->getInstancePropertyCollection(); + if (! instancePropertyVal.empty()) { + for (TConstIterator > instancePropertyIter(instancePropertyVal); + instancePropertyIter; instancePropertyIter++) { + const SmartPtrCXmlElement instancePropertyXml = + thisXml->createAndAddElement("instanceProperty"); + DataClassSubInstanceXml::add(*instancePropertyIter, instancePropertyXml); + } + } + + const SmartPtrCCmdlUnionDoc cmdlUnionVal = + dataClassSubInstanceDoc->getCmdlUnion(); + if (! cmdlUnionVal.IsNull()) { + const SmartPtrCXmlElement cmdlUnionXml = + thisXml->createAndAddElement("cmdlUnion"); + CmdlUnionXml::add(cmdlUnionVal, cmdlUnionXml); + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassSubInstanceDoc DataClassSubInstanceXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassSubInstanceXml", "parse"); + + SmartPtrCDataClassSubInstanceDoc dataClassSubInstanceDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const CXmlElement::SmartPtrCElementCollection cmdlMetadataChildrenXml = + thisXml->findOptionalChildren("cmdlMetadata"); + + std::deque cmdlMetadataVal; + if (! cmdlMetadataChildrenXml.IsNull() && ! cmdlMetadataChildrenXml->empty()) { + for (TConstIterator cmdlMetadataXmlIter(*cmdlMetadataChildrenXml); + cmdlMetadataXmlIter; cmdlMetadataXmlIter++) { + const SmartPtrCXmlElement cmdlMetadataXml = cmdlMetadataXmlIter->second; + const SmartPtrCCmdlMetadataDoc cmdlMetadataDoc = + CmdlMetadataXml::parse(cmdlMetadataXml); + cmdlMetadataVal.push_back(cmdlMetadataDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection propertyChildrenXml = + thisXml->findOptionalChildren("property"); + + std::deque propertyVal; + if (! propertyChildrenXml.IsNull() && ! propertyChildrenXml->empty()) { + for (TConstIterator propertyXmlIter(*propertyChildrenXml); + propertyXmlIter; propertyXmlIter++) { + const SmartPtrCXmlElement propertyXml = propertyXmlIter->second; + const SmartPtrCDataClassPropertyDoc propertyDoc = + DataClassPropertyXml::parse(propertyXml); + propertyVal.push_back(propertyDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instancePropertyChildrenXml = + thisXml->findOptionalChildren("instanceProperty"); + + std::deque instancePropertyVal; + if (! instancePropertyChildrenXml.IsNull() && ! instancePropertyChildrenXml->empty()) { + for (TConstIterator instancePropertyXmlIter(*instancePropertyChildrenXml); + instancePropertyXmlIter; instancePropertyXmlIter++) { + const SmartPtrCXmlElement instancePropertyXml = instancePropertyXmlIter->second; + const SmartPtrCDataClassSubInstanceDoc instancePropertyDoc = + DataClassSubInstanceXml::parse(instancePropertyXml); + instancePropertyVal.push_back(instancePropertyDoc); + } + } + + const SmartPtrCXmlElement cmdlUnionXml = + thisXml->findOptionalChild("cmdlUnion"); + + SmartPtrCCmdlUnionDoc cmdlUnionVal; + if (! cmdlUnionXml.IsNull()) { + cmdlUnionVal = CmdlUnionXml::parse(cmdlUnionXml); + } + + dataClassSubInstanceDoc.CreateInstance(); + dataClassSubInstanceDoc->initialize( + nameVal, + cmdlMetadataVal, + propertyVal, + instancePropertyVal, + cmdlUnionVal); + } + CAF_CM_EXIT; + + return dataClassSubInstanceDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp new file mode 100644 index 000000000..414a0d2fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp @@ -0,0 +1,178 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.h" +#include "Doc/DocXml/SchemaTypesXml/ClassPropertyXml.h" + +#include "Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h" +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/DataClassXml.h" + +using namespace Caf; + +void DataClassXml::add( + const SmartPtrCDataClassDoc dataClassDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(dataClassDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = dataClassDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = dataClassDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = dataClassDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::deque propertyVal = + dataClassDoc->getPropertyCollection(); + if (! propertyVal.empty()) { + for (TConstIterator > propertyIter(propertyVal); + propertyIter; propertyIter++) { + const SmartPtrCXmlElement propertyXml = + thisXml->createAndAddElement("property"); + ClassPropertyXml::add(*propertyIter, propertyXml); + } + } + + const std::deque instancePropertyVal = + dataClassDoc->getInstancePropertyCollection(); + if (! instancePropertyVal.empty()) { + for (TConstIterator > instancePropertyIter(instancePropertyVal); + instancePropertyIter; instancePropertyIter++) { + const SmartPtrCXmlElement instancePropertyXml = + thisXml->createAndAddElement("instanceProperty"); + ClassInstancePropertyXml::add(*instancePropertyIter, instancePropertyXml); + } + } + + const std::string uniqueVal = dataClassDoc->getUnique() ? "true" : "false"; + if (! uniqueVal.empty()) { + thisXml->addAttribute("unique", uniqueVal); + } + + const std::string transientValVal = dataClassDoc->getTransientVal() ? "true" : "false"; + if (! transientValVal.empty()) { + thisXml->addAttribute("transient", transientValVal); + } + + const std::string displayNameVal = dataClassDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = dataClassDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassDoc DataClassXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("DataClassXml", "parse"); + + SmartPtrCDataClassDoc dataClassDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const CXmlElement::SmartPtrCElementCollection propertyChildrenXml = + thisXml->findOptionalChildren("property"); + + std::deque propertyVal; + if (! propertyChildrenXml.IsNull() && ! propertyChildrenXml->empty()) { + for (TConstIterator propertyXmlIter(*propertyChildrenXml); + propertyXmlIter; propertyXmlIter++) { + const SmartPtrCXmlElement propertyXml = propertyXmlIter->second; + const SmartPtrCClassPropertyDoc propertyDoc = + ClassPropertyXml::parse(propertyXml); + propertyVal.push_back(propertyDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instancePropertyChildrenXml = + thisXml->findOptionalChildren("instanceProperty"); + + std::deque instancePropertyVal; + if (! instancePropertyChildrenXml.IsNull() && ! instancePropertyChildrenXml->empty()) { + for (TConstIterator instancePropertyXmlIter(*instancePropertyChildrenXml); + instancePropertyXmlIter; instancePropertyXmlIter++) { + const SmartPtrCXmlElement instancePropertyXml = instancePropertyXmlIter->second; + const SmartPtrCClassInstancePropertyDoc instancePropertyDoc = + ClassInstancePropertyXml::parse(instancePropertyXml); + instancePropertyVal.push_back(instancePropertyDoc); + } + } + + const std::string uniqueStrVal = + thisXml->findOptionalAttribute("unique"); + bool uniqueVal = false; + if (! uniqueStrVal.empty()) { + uniqueVal = (uniqueStrVal.compare("true") == 0) ? true : false; + } + + const std::string transientValStrVal = + thisXml->findOptionalAttribute("transient"); + bool transientValVal = false; + if (! transientValStrVal.empty()) { + transientValVal = (transientValStrVal.compare("true") == 0) ? true : false; + } + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + dataClassDoc.CreateInstance(); + dataClassDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + propertyVal, + instancePropertyVal, + uniqueVal, + transientValVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return dataClassDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp new file mode 100644 index 000000000..a6e6bdab9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp @@ -0,0 +1,79 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/InstanceOperationXml.h" + +#include "Doc/SchemaTypesDoc/CInstanceOperationCollectionDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceOperationDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.h" + +using namespace Caf; + +void InstanceOperationCollectionXml::add( + const SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceOperationCollectionXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(instanceOperationCollectionDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::deque instanceOperationVal = + instanceOperationCollectionDoc->getInstanceOperationCollection(); + CAF_CM_VALIDATE_STL(instanceOperationVal); + + if (! instanceOperationVal.empty()) { + for (TConstIterator > instanceOperationIter(instanceOperationVal); + instanceOperationIter; instanceOperationIter++) { + const SmartPtrCXmlElement instanceOperationXml = + thisXml->createAndAddElement("instanceOperation"); + InstanceOperationXml::add(*instanceOperationIter, instanceOperationXml); + } + } + } + CAF_CM_EXIT; +} + +SmartPtrCInstanceOperationCollectionDoc InstanceOperationCollectionXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceOperationCollectionXml", "parse"); + + SmartPtrCInstanceOperationCollectionDoc instanceOperationCollectionDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const CXmlElement::SmartPtrCElementCollection instanceOperationChildrenXml = + thisXml->findRequiredChildren("instanceOperation"); + + std::deque instanceOperationVal; + if (! instanceOperationChildrenXml.IsNull() && ! instanceOperationChildrenXml->empty()) { + for (TConstIterator instanceOperationXmlIter(*instanceOperationChildrenXml); + instanceOperationXmlIter; instanceOperationXmlIter++) { + const SmartPtrCXmlElement instanceOperationXml = instanceOperationXmlIter->second; + const SmartPtrCInstanceOperationDoc instanceOperationDoc = + InstanceOperationXml::parse(instanceOperationXml); + instanceOperationVal.push_back(instanceOperationDoc); + } + } + + instanceOperationCollectionDoc.CreateInstance(); + instanceOperationCollectionDoc->initialize( + instanceOperationVal); + } + CAF_CM_EXIT; + + return instanceOperationCollectionDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp new file mode 100644 index 000000000..12747a666 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CInstanceOperationDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/InstanceOperationXml.h" + +using namespace Caf; + +void InstanceOperationXml::add( + const SmartPtrCInstanceOperationDoc instanceOperationDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceOperationXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(instanceOperationDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string operationNameVal = instanceOperationDoc->getOperationName(); + CAF_CM_VALIDATE_STRING(operationNameVal); + thisXml->addAttribute("operationName", operationNameVal); + + const std::string monikerVal = instanceOperationDoc->getMoniker(); + CAF_CM_VALIDATE_STRING(monikerVal); + thisXml->addAttribute("moniker", monikerVal); + } + CAF_CM_EXIT; +} + +SmartPtrCInstanceOperationDoc InstanceOperationXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceOperationXml", "parse"); + + SmartPtrCInstanceOperationDoc instanceOperationDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string operationNameStrVal = + thisXml->findRequiredAttribute("operationName"); + const std::string operationNameVal = operationNameStrVal; + + const std::string monikerStrVal = + thisXml->findRequiredAttribute("moniker"); + const std::string monikerVal = monikerStrVal; + + instanceOperationDoc.CreateInstance(); + instanceOperationDoc->initialize( + operationNameVal, + monikerVal); + } + CAF_CM_EXIT; + + return instanceOperationDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp new file mode 100644 index 000000000..07506cd44 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp @@ -0,0 +1,129 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/InstanceParameterXml.h" + +using namespace Caf; + +void InstanceParameterXml::add( + const SmartPtrCInstanceParameterDoc instanceParameterDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceParameterXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(instanceParameterDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = instanceParameterDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string instanceNamespaceVal = instanceParameterDoc->getInstanceNamespace(); + CAF_CM_VALIDATE_STRING(instanceNamespaceVal); + thisXml->addAttribute("instanceNamespace", instanceNamespaceVal); + + const std::string instanceNameVal = instanceParameterDoc->getInstanceName(); + CAF_CM_VALIDATE_STRING(instanceNameVal); + thisXml->addAttribute("instanceName", instanceNameVal); + + const std::string instanceVersionVal = instanceParameterDoc->getInstanceVersion(); + CAF_CM_VALIDATE_STRING(instanceVersionVal); + thisXml->addAttribute("instanceVersion", instanceVersionVal); + + const std::string isOptionalVal = instanceParameterDoc->getIsOptional() ? "true" : "false"; + CAF_CM_VALIDATE_STRING(isOptionalVal); + thisXml->addAttribute("isOptional", isOptionalVal); + + const std::string isListVal = instanceParameterDoc->getIsList() ? "true" : "false"; + if (! isListVal.empty()) { + thisXml->addAttribute("isList", isListVal); + } + + const std::string displayNameVal = instanceParameterDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = instanceParameterDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCInstanceParameterDoc InstanceParameterXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("InstanceParameterXml", "parse"); + + SmartPtrCInstanceParameterDoc instanceParameterDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string instanceNamespaceStrVal = + thisXml->findRequiredAttribute("instanceNamespace"); + const std::string instanceNamespaceVal = instanceNamespaceStrVal; + + const std::string instanceNameStrVal = + thisXml->findRequiredAttribute("instanceName"); + const std::string instanceNameVal = instanceNameStrVal; + + const std::string instanceVersionStrVal = + thisXml->findRequiredAttribute("instanceVersion"); + const std::string instanceVersionVal = instanceVersionStrVal; + + const std::string isOptionalStrVal = + thisXml->findRequiredAttribute("isOptional"); + bool isOptionalVal = false; + if (! isOptionalStrVal.empty()) { + isOptionalVal = (isOptionalStrVal.compare("true") == 0) ? true : false; + } + + const std::string isListStrVal = + thisXml->findOptionalAttribute("isList"); + bool isListVal = false; + if (! isListStrVal.empty()) { + isListVal = (isListStrVal.compare("true") == 0) ? true : false; + } + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + instanceParameterDoc.CreateInstance(); + instanceParameterDoc->initialize( + nameVal, + instanceNamespaceVal, + instanceNameVal, + instanceVersionVal, + isOptionalVal, + isListVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return instanceParameterDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp new file mode 100644 index 000000000..e7f6de6cf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp @@ -0,0 +1,110 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/DocXml/SchemaTypesXml/ClassFieldXml.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +#include "Doc/SchemaTypesDoc/CClassFieldDoc.h" +#include "Doc/SchemaTypesDoc/CJoinTypeDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/JoinTypeXml.h" + +using namespace Caf; + +void JoinTypeXml::add( + const SmartPtrCJoinTypeDoc joinTypeDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("JoinTypeXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(joinTypeDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string operandVal = + EnumConvertersXml::convertOperatorTypeToString(joinTypeDoc->getOperand()); + CAF_CM_VALIDATE_STRING(operandVal); + thisXml->addAttribute("operand", operandVal); + + const SmartPtrCClassFieldDoc dataClassLeftVal = + joinTypeDoc->getDataClassLeft(); + CAF_CM_VALIDATE_SMARTPTR(dataClassLeftVal); + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->createAndAddElement("dataClassLeft"); + ClassFieldXml::add(dataClassLeftVal, dataClassLeftXml); + + const SmartPtrCClassFieldDoc dataClassRightVal = + joinTypeDoc->getDataClassRight(); + CAF_CM_VALIDATE_SMARTPTR(dataClassRightVal); + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->createAndAddElement("dataClassRight"); + ClassFieldXml::add(dataClassRightVal, dataClassRightXml); + + const std::string descriptionVal = joinTypeDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCJoinTypeDoc JoinTypeXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("JoinTypeXml", "parse"); + + SmartPtrCJoinTypeDoc joinTypeDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string operandStrVal = + thisXml->findRequiredAttribute("operand"); + OPERATOR_TYPE operandVal = OPERATOR_NONE; + if (! operandStrVal.empty()) { + operandVal = EnumConvertersXml::convertStringToOperatorType(operandStrVal); + } + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->findRequiredChild("dataClassLeft"); + + SmartPtrCClassFieldDoc dataClassLeftVal; + if (! dataClassLeftXml.IsNull()) { + dataClassLeftVal = ClassFieldXml::parse(dataClassLeftXml); + } + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->findRequiredChild("dataClassRight"); + + SmartPtrCClassFieldDoc dataClassRightVal; + if (! dataClassRightXml.IsNull()) { + dataClassRightVal = ClassFieldXml::parse(dataClassRightXml); + } + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + joinTypeDoc.CreateInstance(); + joinTypeDoc->initialize( + operandVal, + dataClassLeftVal, + dataClassRightVal, + descriptionVal); + } + CAF_CM_EXIT; + + return joinTypeDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp new file mode 100644 index 000000000..0183de376 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp @@ -0,0 +1,167 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h" +#include "Doc/DocXml/SchemaTypesXml/JoinTypeXml.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" +#include "Doc/SchemaTypesDoc/CJoinTypeDoc.h" +#include "Doc/SchemaTypesDoc/CLogicalRelationshipDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.h" + +using namespace Caf; + +void LogicalRelationshipXml::add( + const SmartPtrCLogicalRelationshipDoc logicalRelationshipDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LogicalRelationshipXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(logicalRelationshipDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = logicalRelationshipDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = logicalRelationshipDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = logicalRelationshipDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string arityVal = + EnumConvertersXml::convertArityTypeToString(logicalRelationshipDoc->getArity()); + CAF_CM_VALIDATE_STRING(arityVal); + thisXml->addAttribute("arity", arityVal); + + const SmartPtrCClassCardinalityDoc dataClassLeftVal = + logicalRelationshipDoc->getDataClassLeft(); + CAF_CM_VALIDATE_SMARTPTR(dataClassLeftVal); + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->createAndAddElement("dataClassLeft"); + ClassCardinalityXml::add(dataClassLeftVal, dataClassLeftXml); + + const SmartPtrCClassCardinalityDoc dataClassRightVal = + logicalRelationshipDoc->getDataClassRight(); + CAF_CM_VALIDATE_SMARTPTR(dataClassRightVal); + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->createAndAddElement("dataClassRight"); + ClassCardinalityXml::add(dataClassRightVal, dataClassRightXml); + + const std::deque joinVal = + logicalRelationshipDoc->getJoinCollection(); + CAF_CM_VALIDATE_STL(joinVal); + + if (! joinVal.empty()) { + for (TConstIterator > joinIter(joinVal); + joinIter; joinIter++) { + const SmartPtrCXmlElement joinXml = + thisXml->createAndAddElement("join"); + JoinTypeXml::add(*joinIter, joinXml); + } + } + + const std::string descriptionVal = logicalRelationshipDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCLogicalRelationshipDoc LogicalRelationshipXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("LogicalRelationshipXml", "parse"); + + SmartPtrCLogicalRelationshipDoc logicalRelationshipDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const std::string arityStrVal = + thisXml->findRequiredAttribute("arity"); + ARITY_TYPE arityVal = ARITY_NONE; + if (! arityStrVal.empty()) { + arityVal = EnumConvertersXml::convertStringToArityType(arityStrVal); + } + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->findRequiredChild("dataClassLeft"); + + SmartPtrCClassCardinalityDoc dataClassLeftVal; + if (! dataClassLeftXml.IsNull()) { + dataClassLeftVal = ClassCardinalityXml::parse(dataClassLeftXml); + } + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->findRequiredChild("dataClassRight"); + + SmartPtrCClassCardinalityDoc dataClassRightVal; + if (! dataClassRightXml.IsNull()) { + dataClassRightVal = ClassCardinalityXml::parse(dataClassRightXml); + } + + const CXmlElement::SmartPtrCElementCollection joinChildrenXml = + thisXml->findRequiredChildren("join"); + + std::deque joinVal; + if (! joinChildrenXml.IsNull() && ! joinChildrenXml->empty()) { + for (TConstIterator joinXmlIter(*joinChildrenXml); + joinXmlIter; joinXmlIter++) { + const SmartPtrCXmlElement joinXml = joinXmlIter->second; + const SmartPtrCJoinTypeDoc joinDoc = + JoinTypeXml::parse(joinXml); + joinVal.push_back(joinDoc); + } + } + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + logicalRelationshipDoc.CreateInstance(); + logicalRelationshipDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + arityVal, + dataClassLeftVal, + dataClassRightVal, + joinVal, + descriptionVal); + } + CAF_CM_EXIT; + + return logicalRelationshipDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp new file mode 100644 index 000000000..37137de6d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp @@ -0,0 +1,128 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/MethodParameterXml.h" + +using namespace Caf; + +void MethodParameterXml::add( + const SmartPtrCMethodParameterDoc methodParameterDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MethodParameterXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(methodParameterDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = methodParameterDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string typeVal = + EnumConvertersXml::convertParameterTypeToString(methodParameterDoc->getType()); + CAF_CM_VALIDATE_STRING(typeVal); + thisXml->addAttribute("type", typeVal); + + const std::string isOptionalVal = methodParameterDoc->getIsOptional() ? "true" : "false"; + CAF_CM_VALIDATE_STRING(isOptionalVal); + thisXml->addAttribute("isOptional", isOptionalVal); + + const std::string isListVal = methodParameterDoc->getIsList() ? "true" : "false"; + if (! isListVal.empty()) { + thisXml->addAttribute("isList", isListVal); + } + + const std::string defaultValVal = methodParameterDoc->getDefaultVal(); + if (! defaultValVal.empty()) { + thisXml->addAttribute("default", defaultValVal); + } + + const std::string displayNameVal = methodParameterDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = methodParameterDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCMethodParameterDoc MethodParameterXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MethodParameterXml", "parse"); + + SmartPtrCMethodParameterDoc methodParameterDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string typeStrVal = + thisXml->findRequiredAttribute("type"); + PARAMETER_TYPE typeVal = PARAMETER_NONE; + if (! typeStrVal.empty()) { + typeVal = EnumConvertersXml::convertStringToParameterType(typeStrVal); + } + + const std::string isOptionalStrVal = + thisXml->findRequiredAttribute("isOptional"); + bool isOptionalVal = false; + if (! isOptionalStrVal.empty()) { + isOptionalVal = (isOptionalStrVal.compare("true") == 0) ? true : false; + } + + const std::string isListStrVal = + thisXml->findOptionalAttribute("isList"); + bool isListVal = false; + if (! isListStrVal.empty()) { + isListVal = (isListStrVal.compare("true") == 0) ? true : false; + } + + const std::string defaultValStrVal = + thisXml->findOptionalAttribute("default"); + const std::string defaultValVal = defaultValStrVal; + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + methodParameterDoc.CreateInstance(); + methodParameterDoc->initialize( + nameVal, + typeVal, + isOptionalVal, + isListVal, + defaultValVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return methodParameterDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp new file mode 100644 index 000000000..8fed64113 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp @@ -0,0 +1,214 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.h" +#include "Doc/DocXml/SchemaTypesXml/InstanceParameterXml.h" +#include "Doc/DocXml/SchemaTypesXml/MethodParameterXml.h" + +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/MethodXml.h" + +using namespace Caf; + +void MethodXml::add( + const SmartPtrCMethodDoc methodDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MethodXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(methodDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameVal = methodDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::deque parameterVal = + methodDoc->getParameterCollection(); + if (! parameterVal.empty()) { + for (TConstIterator > parameterIter(parameterVal); + parameterIter; parameterIter++) { + const SmartPtrCXmlElement parameterXml = + thisXml->createAndAddElement("parameter"); + MethodParameterXml::add(*parameterIter, parameterXml); + } + } + + const std::deque instanceParameterVal = + methodDoc->getInstanceParameterCollection(); + if (! instanceParameterVal.empty()) { + for (TConstIterator > instanceParameterIter(instanceParameterVal); + instanceParameterIter; instanceParameterIter++) { + const SmartPtrCXmlElement instanceParameterXml = + thisXml->createAndAddElement("instanceParameter"); + InstanceParameterXml::add(*instanceParameterIter, instanceParameterXml); + } + } + + const std::deque returnValVal = + methodDoc->getReturnValCollection(); + if (! returnValVal.empty()) { + for (TConstIterator > returnValIter(returnValVal); + returnValIter; returnValIter++) { + const SmartPtrCXmlElement returnValXml = + thisXml->createAndAddElement("return"); + ClassIdentifierXml::add(*returnValIter, returnValXml); + } + } + + const std::deque eventValVal = + methodDoc->getEventValCollection(); + if (! eventValVal.empty()) { + for (TConstIterator > eventValIter(eventValVal); + eventValIter; eventValIter++) { + const SmartPtrCXmlElement eventValXml = + thisXml->createAndAddElement("event"); + ClassIdentifierXml::add(*eventValIter, eventValXml); + } + } + + const std::deque errorVal = + methodDoc->getErrorCollection(); + if (! errorVal.empty()) { + for (TConstIterator > errorIter(errorVal); + errorIter; errorIter++) { + const SmartPtrCXmlElement errorXml = + thisXml->createAndAddElement("error"); + ClassIdentifierXml::add(*errorIter, errorXml); + } + } + + const std::string displayNameVal = methodDoc->getDisplayName(); + if (! displayNameVal.empty()) { + thisXml->addAttribute("displayName", displayNameVal); + } + + const std::string descriptionVal = methodDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCMethodDoc MethodXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("MethodXml", "parse"); + + SmartPtrCMethodDoc methodDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const CXmlElement::SmartPtrCElementCollection parameterChildrenXml = + thisXml->findOptionalChildren("parameter"); + + std::deque parameterVal; + if (! parameterChildrenXml.IsNull() && ! parameterChildrenXml->empty()) { + for (TConstIterator parameterXmlIter(*parameterChildrenXml); + parameterXmlIter; parameterXmlIter++) { + const SmartPtrCXmlElement parameterXml = parameterXmlIter->second; + const SmartPtrCMethodParameterDoc parameterDoc = + MethodParameterXml::parse(parameterXml); + parameterVal.push_back(parameterDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection instanceParameterChildrenXml = + thisXml->findOptionalChildren("instanceParameter"); + + std::deque instanceParameterVal; + if (! instanceParameterChildrenXml.IsNull() && ! instanceParameterChildrenXml->empty()) { + for (TConstIterator instanceParameterXmlIter(*instanceParameterChildrenXml); + instanceParameterXmlIter; instanceParameterXmlIter++) { + const SmartPtrCXmlElement instanceParameterXml = instanceParameterXmlIter->second; + const SmartPtrCInstanceParameterDoc instanceParameterDoc = + InstanceParameterXml::parse(instanceParameterXml); + instanceParameterVal.push_back(instanceParameterDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection returnValChildrenXml = + thisXml->findOptionalChildren("return"); + + std::deque returnValVal; + if (! returnValChildrenXml.IsNull() && ! returnValChildrenXml->empty()) { + for (TConstIterator returnValXmlIter(*returnValChildrenXml); + returnValXmlIter; returnValXmlIter++) { + const SmartPtrCXmlElement returnValXml = returnValXmlIter->second; + const SmartPtrCClassIdentifierDoc returnValDoc = + ClassIdentifierXml::parse(returnValXml); + returnValVal.push_back(returnValDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection eventValChildrenXml = + thisXml->findOptionalChildren("event"); + + std::deque eventValVal; + if (! eventValChildrenXml.IsNull() && ! eventValChildrenXml->empty()) { + for (TConstIterator eventValXmlIter(*eventValChildrenXml); + eventValXmlIter; eventValXmlIter++) { + const SmartPtrCXmlElement eventValXml = eventValXmlIter->second; + const SmartPtrCClassIdentifierDoc eventValDoc = + ClassIdentifierXml::parse(eventValXml); + eventValVal.push_back(eventValDoc); + } + } + + const CXmlElement::SmartPtrCElementCollection errorChildrenXml = + thisXml->findOptionalChildren("error"); + + std::deque errorVal; + if (! errorChildrenXml.IsNull() && ! errorChildrenXml->empty()) { + for (TConstIterator errorXmlIter(*errorChildrenXml); + errorXmlIter; errorXmlIter++) { + const SmartPtrCXmlElement errorXml = errorXmlIter->second; + const SmartPtrCClassIdentifierDoc errorDoc = + ClassIdentifierXml::parse(errorXml); + errorVal.push_back(errorDoc); + } + } + + const std::string displayNameStrVal = + thisXml->findOptionalAttribute("displayName"); + const std::string displayNameVal = displayNameStrVal; + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + methodDoc.CreateInstance(); + methodDoc->initialize( + nameVal, + parameterVal, + instanceParameterVal, + returnValVal, + eventValVal, + errorVal, + displayNameVal, + descriptionVal); + } + CAF_CM_EXIT; + + return methodDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp new file mode 100644 index 000000000..2314474ef --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp @@ -0,0 +1,137 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" +#include "Doc/SchemaTypesDoc/CPhysicalRelationshipDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.h" + +using namespace Caf; + +void PhysicalRelationshipXml::add( + const SmartPtrCPhysicalRelationshipDoc physicalRelationshipDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PhysicalRelationshipXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(physicalRelationshipDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = physicalRelationshipDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = physicalRelationshipDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = physicalRelationshipDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string arityVal = + EnumConvertersXml::convertArityTypeToString(physicalRelationshipDoc->getArity()); + CAF_CM_VALIDATE_STRING(arityVal); + thisXml->addAttribute("arity", arityVal); + + const SmartPtrCClassCardinalityDoc dataClassLeftVal = + physicalRelationshipDoc->getDataClassLeft(); + CAF_CM_VALIDATE_SMARTPTR(dataClassLeftVal); + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->createAndAddElement("dataClassLeft"); + ClassCardinalityXml::add(dataClassLeftVal, dataClassLeftXml); + + const SmartPtrCClassCardinalityDoc dataClassRightVal = + physicalRelationshipDoc->getDataClassRight(); + CAF_CM_VALIDATE_SMARTPTR(dataClassRightVal); + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->createAndAddElement("dataClassRight"); + ClassCardinalityXml::add(dataClassRightVal, dataClassRightXml); + + const std::string descriptionVal = physicalRelationshipDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCPhysicalRelationshipDoc PhysicalRelationshipXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("PhysicalRelationshipXml", "parse"); + + SmartPtrCPhysicalRelationshipDoc physicalRelationshipDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const std::string arityStrVal = + thisXml->findRequiredAttribute("arity"); + ARITY_TYPE arityVal = ARITY_NONE; + if (! arityStrVal.empty()) { + arityVal = EnumConvertersXml::convertStringToArityType(arityStrVal); + } + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->findRequiredChild("dataClassLeft"); + + SmartPtrCClassCardinalityDoc dataClassLeftVal; + if (! dataClassLeftXml.IsNull()) { + dataClassLeftVal = ClassCardinalityXml::parse(dataClassLeftXml); + } + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->findRequiredChild("dataClassRight"); + + SmartPtrCClassCardinalityDoc dataClassRightVal; + if (! dataClassRightXml.IsNull()) { + dataClassRightVal = ClassCardinalityXml::parse(dataClassRightXml); + } + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + physicalRelationshipDoc.CreateInstance(); + physicalRelationshipDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + arityVal, + dataClassLeftVal, + dataClassRightVal, + descriptionVal); + } + CAF_CM_EXIT; + + return physicalRelationshipDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp new file mode 100644 index 000000000..16f73d5f9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp @@ -0,0 +1,137 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#include "stdafx.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.h" +#include "Doc/SchemaTypesDoc/SchemaTypesDocTypes.h" + +#include "Doc/SchemaTypesDoc/CClassCardinalityDoc.h" +#include "Doc/SchemaTypesDoc/CRelationshipDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Doc/DocXml/SchemaTypesXml/RelationshipXml.h" + +using namespace Caf; + +void RelationshipXml::add( + const SmartPtrCRelationshipDoc relationshipDoc, + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RelationshipXml", "add"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(relationshipDoc); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValVal = relationshipDoc->getNamespaceVal(); + CAF_CM_VALIDATE_STRING(namespaceValVal); + thisXml->addAttribute("namespace", namespaceValVal); + + const std::string nameVal = relationshipDoc->getName(); + CAF_CM_VALIDATE_STRING(nameVal); + thisXml->addAttribute("name", nameVal); + + const std::string versionVal = relationshipDoc->getVersion(); + CAF_CM_VALIDATE_STRING(versionVal); + thisXml->addAttribute("version", versionVal); + + const std::string arityVal = + EnumConvertersXml::convertArityTypeToString(relationshipDoc->getArity()); + CAF_CM_VALIDATE_STRING(arityVal); + thisXml->addAttribute("arity", arityVal); + + const SmartPtrCClassCardinalityDoc dataClassLeftVal = + relationshipDoc->getDataClassLeft(); + CAF_CM_VALIDATE_SMARTPTR(dataClassLeftVal); + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->createAndAddElement("dataClassLeft"); + ClassCardinalityXml::add(dataClassLeftVal, dataClassLeftXml); + + const SmartPtrCClassCardinalityDoc dataClassRightVal = + relationshipDoc->getDataClassRight(); + CAF_CM_VALIDATE_SMARTPTR(dataClassRightVal); + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->createAndAddElement("dataClassRight"); + ClassCardinalityXml::add(dataClassRightVal, dataClassRightXml); + + const std::string descriptionVal = relationshipDoc->getDescription(); + if (! descriptionVal.empty()) { + thisXml->addAttribute("description", descriptionVal); + } + } + CAF_CM_EXIT; +} + +SmartPtrCRelationshipDoc RelationshipXml::parse( + const SmartPtrCXmlElement thisXml) { + CAF_CM_STATIC_FUNC_VALIDATE("RelationshipXml", "parse"); + + SmartPtrCRelationshipDoc relationshipDoc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(thisXml); + + const std::string namespaceValStrVal = + thisXml->findRequiredAttribute("namespace"); + const std::string namespaceValVal = namespaceValStrVal; + + const std::string nameStrVal = + thisXml->findRequiredAttribute("name"); + const std::string nameVal = nameStrVal; + + const std::string versionStrVal = + thisXml->findRequiredAttribute("version"); + const std::string versionVal = versionStrVal; + + const std::string arityStrVal = + thisXml->findRequiredAttribute("arity"); + ARITY_TYPE arityVal = ARITY_NONE; + if (! arityStrVal.empty()) { + arityVal = EnumConvertersXml::convertStringToArityType(arityStrVal); + } + + const SmartPtrCXmlElement dataClassLeftXml = + thisXml->findRequiredChild("dataClassLeft"); + + SmartPtrCClassCardinalityDoc dataClassLeftVal; + if (! dataClassLeftXml.IsNull()) { + dataClassLeftVal = ClassCardinalityXml::parse(dataClassLeftXml); + } + + const SmartPtrCXmlElement dataClassRightXml = + thisXml->findRequiredChild("dataClassRight"); + + SmartPtrCClassCardinalityDoc dataClassRightVal; + if (! dataClassRightXml.IsNull()) { + dataClassRightVal = ClassCardinalityXml::parse(dataClassRightXml); + } + + const std::string descriptionStrVal = + thisXml->findOptionalAttribute("description"); + const std::string descriptionVal = descriptionStrVal; + + relationshipDoc.CreateInstance(); + relationshipDoc->initialize( + namespaceValVal, + nameVal, + versionVal, + arityVal, + dataClassLeftVal, + dataClassRightVal, + descriptionVal); + } + CAF_CM_EXIT; + + return relationshipDoc; +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/stdafx.h new file mode 100644 index 000000000..833de41bf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Doc/DocXml/SchemaTypesXml/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + * This code was generated by the script "build/dev/codeGen/genCppXml". Please + * speak to Brian W. before modifying it by hand. + * + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define SCHEMATYPESXML_LINKAGE __declspec(dllexport) +#else + #define SCHEMATYPESXML_LINKAGE +#endif + +#include + +#include +#include + + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.cpp new file mode 100644 index 000000000..f78eb9b5a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.cpp @@ -0,0 +1,142 @@ +/*k + * Author: bwilliams + * Created: Oct 30, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "stdlib.h" +#include "CBacktraceUtils.h" +#include + +#ifdef WIN32 +#include "StackWalker.h" +#else +#include +#include +#endif + +using namespace Caf; + +#ifdef WIN32 +class StackWalkerToDeque : public StackWalker { +public: + StackWalkerToDeque() : depth(0) {} + + std::deque getBacktrace() { + return backtrace; + } + +private: + static const int STACK_DEPTH_IGNORE = 3; + int depth; + std::deque backtrace; + +protected: + virtual void OnSymInit(LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUserName) { + // Do nothing to suppress default OnSymInit output + } + + virtual void OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion) { + // Do nothing to suppress default OnLoadModule output + } + + virtual void OnDbgHelpErr(LPCSTR szFuncName, DWORD gle, DWORD64 addr){ + // Do nothing to suppress default OnDbgHelpErr output + } + + virtual void OnOutput(LPCSTR szText) { + try { + std::string line = szText; + if (STACK_DEPTH_IGNORE < depth++) { + backtrace.push_back(CStringUtils::trimRight(line)); + } + } catch (...) { + backtrace.push_back("CBacktraceUtils::getBacktrace() threw an exception"); + } + } +}; + +std::deque CBacktraceUtils::getBacktrace() { + StackWalkerToDeque sw; + sw.ShowCallstack(); + return sw.getBacktrace(); +} + +#else +std::deque CBacktraceUtils::getBacktrace() { + char** messages = NULL; + std::deque backtrace; + try { + const int32 maxStackEntries = 50; + void *stackEntries[maxStackEntries]; + const size_t size = ::backtrace(stackEntries, maxStackEntries); + + messages = ::backtrace_symbols(stackEntries, size); + + /* skip first stack frame (points here) */ + for (size_t i = 1; i < size && messages != NULL; ++i) { + const std::string name = demangleName(messages[i]); + backtrace.push_back(name); + } + } + catch (...) { + backtrace.push_back("CBacktraceUtils::getBacktrace() threw an exception"); + } + + if (NULL != messages) { + ::free(messages); + } + + return backtrace; +} + +std::string CBacktraceUtils::demangleName(char* name) { + std::string rc; + if (NULL != name) { + char* mangled_name = 0; + char* offset_begin = 0; + char* offset_end = 0; + + // find parentheses and +address offset surrounding mangled name + for (char *p = name; *p; ++p) { + if (*p == '(') { + mangled_name = p; + } else if (*p == '+') { + offset_begin = p; + } else if (*p == ')') { + offset_end = p; + break; + } + } + + // if the line could be processed, attempt to demangle the symbol + if (mangled_name && offset_begin && offset_end && mangled_name < offset_begin) { + *mangled_name++ = '\0'; + *offset_begin++ = '\0'; + *offset_end++ = '\0'; + + int32 status; + char* real_name = abi::__cxa_demangle(mangled_name, 0, 0, &status); + + // if demangling is successful, output the demangled function name + if (status == 0) { + rc = real_name; + } + // otherwise, output the mangled function name + else { + rc = mangled_name; + } + + ::free(real_name); + } + // otherwise, print the whole line + else { + rc = name; + } + } + + return rc; +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.h new file mode 100644 index 000000000..57503a911 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CBacktraceUtils.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: Oct 30, 2014 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CBacktraceUtils_H_ +#define CBacktraceUtils_H_ + +namespace Caf { + +// See http://stackoverflow.com/questions/77005/how-to-generate-a-stacktrace-when-my-gcc-c-app-crashes +class EXCEPTION_LINKAGE CBacktraceUtils { +public: + static std::deque getBacktrace(); + +#ifndef WIN32 +private: + static std::string demangleName(char* name); +#endif + +private: + CBacktraceUtils(); + ~CBacktraceUtils(); + CBacktraceUtils(const CBacktraceUtils&); + CBacktraceUtils& operator=(const CBacktraceUtils&); +}; + +} + +#endif /* CBacktraceUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafException.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafException.cpp new file mode 100644 index 000000000..f1be31bee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafException.cpp @@ -0,0 +1,146 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include +#include +#include "CBacktraceUtils.h" + +using namespace Caf; + +CCafException::CCafException() : + _refCnt(0), + _isPopulated(false), + _exceptionClassName("CCafException"), + _errorCode(S_OK), + _backtrace(NULL) { +} + +CCafException::CCafException(const std::string& exceptionClassName) : + _refCnt(0), + _isPopulated(false), + _exceptionClassName(exceptionClassName), + _errorCode(S_OK), + _backtrace(NULL) { +} + +CCafException::~CCafException() { + if (_backtrace != NULL) { + delete _backtrace; + } +} + +void CCafException::throwSelf() { + throw this; +} + +void CCafException::throwAddRefedSelf() { + this->AddRef(); + throw this; +} + +void CCafException::AddRef() { + g_atomic_int_inc(&_refCnt); +} + +void CCafException::Release() { + if (g_atomic_int_dec_and_test(&_refCnt)) { + delete this; + } +} + +void CCafException::QueryInterface(const IID&, void**) { + throw std::runtime_error("QueryInterface not supported"); +} + +void CCafException::populate( + const std::string& message, + const HRESULT errorCode, + const std::string& className, + const std::string& funcName) { + _message = message; + _className = className; + _funcName = funcName; + _errorCode = HRESULT_FROM_WIN32(errorCode); + if (_backtrace != NULL) { + delete _backtrace; + } + _backtrace = new std::deque(CBacktraceUtils::getBacktrace()); + _isPopulated = true; +} + +void CCafException::populateVA( + const HRESULT errorCode, + const std::string& className, + const std::string& funcName, + const char* format, + ...) { + char buffer[1024]; + va_list args; + va_start(args, format); +#ifdef WIN32 + // Returns -1 if the buffer is truncated. + const int rc = vsnprintf_s(buffer, 1024, _TRUNCATE, format, args); + if ((rc > 0) || (rc == -1)) { +#else + if (vsnprintf(buffer, 1024, format, args) > 0) { +#endif + _message = buffer; + } else { + _message = "*** PopulateVA() INTERNAL ERROR: UNABLE TO FORMAT MESSAGE ***"; + } + va_end(args); + _className = className; + _funcName = funcName; + _errorCode = HRESULT_FROM_WIN32(errorCode); + if (_backtrace != NULL) { + delete _backtrace; + } + _backtrace = new std::deque(CBacktraceUtils::getBacktrace()); + _isPopulated = true; +} + +bool CCafException::isPopulated() const { + return _isPopulated; +} + +std::string CCafException::getExceptionClassName() const { + return _exceptionClassName; +} + +std::string CCafException::getMsg() const { + return _message; +} + +std::string CCafException::getClassName() const { + return _className; +} + +std::string CCafException::getFuncName() const { + return _funcName; +} + +HRESULT CCafException::getError() const { + return _errorCode; +} + +std::deque* CCafException::getBacktrace() const { + return _backtrace; +} + +std::string CCafException::getFullMsg() const { + std::string msg("["); + msg += _exceptionClassName; + msg += "] "; + msg += _className; + msg += "::"; + msg += _funcName; + msg += "() "; + msg += _message; + return msg; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.cpp new file mode 100644 index 000000000..940e534bd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.cpp @@ -0,0 +1,44 @@ +/* + * Created on: Oct 6, 2011 + * Author: mdonahue + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CCafExceptionEx.h" + +using namespace Caf; + +// General Runtime Exceptions +CAF_CM_DEFINE_EXCEPTION_CLASS(AccessDeniedException); +CAF_CM_DEFINE_EXCEPTION_CLASS(NullPointerException); +CAF_CM_DEFINE_EXCEPTION_CLASS(BufferOverflowException); +CAF_CM_DEFINE_EXCEPTION_CLASS(BufferUnderflowException); +CAF_CM_DEFINE_EXCEPTION_CLASS(InvalidArgumentException); +CAF_CM_DEFINE_EXCEPTION_CLASS(IllegalStateException); +CAF_CM_DEFINE_EXCEPTION_CLASS(IndexOutOfBoundsException); +CAF_CM_DEFINE_EXCEPTION_CLASS(NoSuchElementException); +CAF_CM_DEFINE_EXCEPTION_CLASS(DuplicateElementException); +CAF_CM_DEFINE_EXCEPTION_CLASS(UnsupportedOperationException); +CAF_CM_DEFINE_EXCEPTION_CLASS(UnsupportedVersionException); +CAF_CM_DEFINE_EXCEPTION_CLASS(InvalidHandleException); +CAF_CM_DEFINE_EXCEPTION_CLASS(TimeoutException); +CAF_CM_DEFINE_EXCEPTION_CLASS(NoSuchInterfaceException); +CAF_CM_DEFINE_EXCEPTION_CLASS(ProcessFailedException); + +// AppConfig Exceptions +CAF_CM_DEFINE_EXCEPTION_CLASS(NoSuchConfigSectionException); +CAF_CM_DEFINE_EXCEPTION_CLASS(NoSuchConfigValueException); + +// Dynamic Library Exception +CAF_CM_DEFINE_EXCEPTION_CLASS(LibraryFailedToLoadException); +CAF_CM_DEFINE_EXCEPTION_CLASS(NoSuchMethodException); + +// I/O Exceptions +CAF_CM_DEFINE_EXCEPTION_CLASS(IOException); +CAF_CM_DEFINE_EXCEPTION_CLASS(EOFException); +CAF_CM_DEFINE_EXCEPTION_CLASS(FileNotFoundException); +CAF_CM_DEFINE_EXCEPTION_CLASS(PathNotFoundException); +CAF_CM_DEFINE_EXCEPTION_CLASS(FileLockedException); + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.h new file mode 100644 index 000000000..4262b7208 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CCafExceptionEx.h @@ -0,0 +1,70 @@ +/* + * Created on: Oct 6, 2011 + * Author: mdonahue + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCAFEXCEPTIONEX_H_ +#define CCAFEXCEPTIONEX_H_ + + +#define CAF_CM_DECLARE_EXCEPTION_CLASS(_exclass_) \ +class EXCEPTION_LINKAGE _exclass_ : public Caf::CCafException { \ +public: \ + _exclass_(); \ + virtual ~_exclass_(); \ + void throwSelf(); \ + void throwAddRefedSelf(); \ +private: \ + _exclass_(const _exclass_ &); \ + _exclass_ & operator=(const _exclass_ &); \ +}; \ +typedef TCafSmartPtr<_exclass_, TCafObject<_exclass_> > SmartPtr##_exclass_ + +#define CAF_CM_DEFINE_EXCEPTION_CLASS(_exclass_) \ + _exclass_::_exclass_() : CCafException( #_exclass_ ) {} \ + _exclass_::~_exclass_() {} \ + void _exclass_::throwSelf() { throw this; } \ + void _exclass_::throwAddRefedSelf() { this->AddRef(); throw this; } + +#include "Exception/CCafException.h" + +namespace Caf { + +// General Runtime Exceptions +CAF_CM_DECLARE_EXCEPTION_CLASS(AccessDeniedException); +CAF_CM_DECLARE_EXCEPTION_CLASS(NullPointerException); +CAF_CM_DECLARE_EXCEPTION_CLASS(BufferOverflowException); +CAF_CM_DECLARE_EXCEPTION_CLASS(BufferUnderflowException); +CAF_CM_DECLARE_EXCEPTION_CLASS(InvalidArgumentException); +CAF_CM_DECLARE_EXCEPTION_CLASS(IllegalStateException); +CAF_CM_DECLARE_EXCEPTION_CLASS(IndexOutOfBoundsException); +CAF_CM_DECLARE_EXCEPTION_CLASS(NoSuchElementException); +CAF_CM_DECLARE_EXCEPTION_CLASS(DuplicateElementException); +CAF_CM_DECLARE_EXCEPTION_CLASS(UnsupportedOperationException); +CAF_CM_DECLARE_EXCEPTION_CLASS(UnsupportedVersionException); +CAF_CM_DECLARE_EXCEPTION_CLASS(InvalidHandleException); +CAF_CM_DECLARE_EXCEPTION_CLASS(TimeoutException); +CAF_CM_DECLARE_EXCEPTION_CLASS(NoSuchInterfaceException); +CAF_CM_DECLARE_EXCEPTION_CLASS(ProcessFailedException); + +// AppConfig Exceptions +CAF_CM_DECLARE_EXCEPTION_CLASS(NoSuchConfigSectionException); +CAF_CM_DECLARE_EXCEPTION_CLASS(NoSuchConfigValueException); + +// Dynamic Library Exception +CAF_CM_DECLARE_EXCEPTION_CLASS(LibraryFailedToLoadException); +CAF_CM_DECLARE_EXCEPTION_CLASS(NoSuchMethodException); + +// I/O Exceptions +CAF_CM_DECLARE_EXCEPTION_CLASS(IOException); +CAF_CM_DECLARE_EXCEPTION_CLASS(EOFException); +CAF_CM_DECLARE_EXCEPTION_CLASS(FileNotFoundException); +CAF_CM_DECLARE_EXCEPTION_CLASS(PathNotFoundException); +CAF_CM_DECLARE_EXCEPTION_CLASS(FileLockedException); + +} + +#endif + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.cpp new file mode 100644 index 000000000..1bb61d86e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.cpp @@ -0,0 +1,257 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "CValidate.h" +#include "ValidationMacros.h" + +using namespace Caf; + +// Some helper macros that make is easy to validate input arguments. +#define CAF_EXCEPTION_VALIDATE(_valmsg_, _variable_text_ ) \ + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, "%s %s", _valmsg_, _variable_text_) + +void CValidate::constructed(const bool value, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (! value ) { + CAF_CM_EXCEPTION_VA0(ERROR_INVALID_STATE, _sPRECOND_ISCONSTRUCTED); + } + } + CAF_CM_EXIT; +} + +void CValidate::initialized(const bool value, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (! value ) { + CAF_CM_EXCEPTION_VA0(OLE_E_BLANK, _sPRECOND_ISINITIALIZED); + } + } + CAF_CM_EXIT; +} + +void CValidate::notInitialized(const bool value, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value ) { + CAF_CM_EXCEPTION_VA0(ERROR_ALREADY_INITIALIZED, _sPRECOND_ISNOTINITIALIZED); + } + } + CAF_CM_EXIT; +} + +void CValidate::notEmptyStr(const std::string& value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value.length() == 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGEMPTY, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notEmptyStr(const std::wstring& value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value.length() == 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGEMPTY, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notEmptyUuid(const UUID value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (::IsEqualGUID(value, CAFCOMMON_GUID_NULL) ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_GUID, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notNullOrEmptyStr(const char* value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL == value) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGPTRNULL, name); + } + if (value[ 0 ] == '\0' ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGPTREMPTY, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notNullOrEmptyStr(const wchar_t* value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL == value) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGPTRNULL, name); + } + if (value[ 0 ] == L'\0') { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STRINGPTREMPTY, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notNullOrEmptyPtrArr(const void** value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL == value) { + CAF_EXCEPTION_VALIDATE( _sVALIDATE_PTRARRAYNULL, name); + } + if (NULL == value[ 0 ]) { + CAF_EXCEPTION_VALIDATE( _sVALIDATE_PTRARRAYEMPTY, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notNullInterface(const ICafObject* value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL == value) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_INTERFACE, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notNullPtr(const void* value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL == value) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_NOTNULL, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::nullPtr(const void* value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (NULL != value) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_NULL, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::zero(const int32 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value != 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_ZERO, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notZero(const int32 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value == 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_ISNOTZERO, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::positive(const int32 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value <= 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_POSITIVE, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::negative(const int32 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value >= 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_NEGATIVE, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::nonNegative(const int32 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value < 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_NONNEGATIVE, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::nonNegative64(const int64 value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value < 0 ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_NONNEGATIVE, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::isTrue(const bool value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (! value ) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_BOOL, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::notEmptyStl(const size_t value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value < 1) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STL, name); + } + } + CAF_CM_EXIT; +} + +void CValidate::emptyStl(const size_t value, const char* name, const char* className, const char* funcName) { + CAF_CM_STATIC_FUNC(className, funcName); + + CAF_CM_ENTER { + if (value != 0) { + CAF_EXCEPTION_VALIDATE(_sVALIDATE_STL_EMPTY, name); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.h new file mode 100644 index 000000000..d33ae9ca9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/CValidate.h @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CVALIDATE_H_ +#define CVALIDATE_H_ + +namespace Caf { + +class EXCEPTION_LINKAGE CValidate { +public: + static void constructed(const bool value, const char* className, const char* funcName); + static void initialized(const bool value, const char* className, const char* funcName); + static void notInitialized(const bool value, const char* className, const char* funcName); + static void notEmptyStr(const std::string& value, const char* name, const char* className, const char* funcName); + static void notEmptyStr(const std::wstring& value, const char* name, const char* className, const char* funcName); + static void notEmptyUuid(const UUID value, const char* name, const char* className, const char* funcName); + static void notNullOrEmptyStr(const char* value, const char* name, const char* className, const char* funcName); + static void notNullOrEmptyStr(const wchar_t* value, const char* name, const char* className, const char* funcName); + static void notNullOrEmptyPtrArr(const void** value, const char* name, const char* className, const char* funcName); + static void notNullInterface(const ICafObject* value, const char* name, const char* className, const char* funcName); + static void notNullPtr(const void* value, const char* name, const char* className, const char* funcName); + static void nullPtr(const void* value, const char* name, const char* className, const char* funcName); + static void zero(const int32 value, const char* name, const char* className, const char* funcName); + static void notZero(const int32 value, const char* name, const char* className, const char* funcName); + static void positive(const int32 value, const char* name, const char* className, const char* funcName); + static void negative(const int32 value, const char* name, const char* className, const char* funcName); + static void nonNegative(const int32 value, const char* name, const char* className, const char* funcName); + static void nonNegative64(const int64 value, const char* name, const char* className, const char* funcName); + static void isTrue(const bool value, const char* name, const char* className, const char* funcName); + static void notEmptyStl(const size_t value, const char* name, const char* className, const char* funcName); + static void emptyStl(const size_t value, const char* name, const char* className, const char* funcName); + +private: + CAF_CM_DECLARE_NOCREATE(CValidate); +}; + +} + +#endif /* CVALIDATE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ClassMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ClassMacros.h new file mode 100644 index 000000000..48ede1b63 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ClassMacros.h @@ -0,0 +1,96 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CLASSMACROS_H_ +#define CLASSMACROS_H_ + +// Prevents class creation +#define CAF_CM_DECLARE_NOCREATE(_classname_) \ + private:\ + _classname_();\ + ~_classname_();\ + _classname_(const _classname_&);\ + _classname_& operator=(const _classname_&) + +// Prevents copying +#define CAF_CM_DECLARE_NOCOPY(_classname_) \ + private:\ + _classname_(const _classname_&);\ + _classname_& operator=(const _classname_&) + +// Initializes the members of the class +#define CAF_CM_INIT( _ClassName_ ) _cm_className_( _ClassName_ ) + +// Sets up a class method for parameter validation only +#define CAF_CM_FUNCNAME_VALIDATE( _szFuncNameIn_ ) \ + const char * _cm_funcName_ = _szFuncNameIn_ + +// Sets up a class method for exception handling/parameter validation +#define CAF_CM_FUNCNAME( _szFuncNameIn_ ) \ + CAF_CM_FUNCNAME_VALIDATE ( _szFuncNameIn_); \ + CCafException* _cm_exception_ = NULL + +#define CAF_CM_CREATE \ + private: \ + const char * _cm_className_ + +#define CAF_CM_STATIC_FUNC_VALIDATE( _szScope_, _szFuncName_ ) \ + const char * _cm_className_ = _szScope_; \ + CAF_CM_FUNCNAME_VALIDATE( _szFuncName_ ) + +#define CAF_CM_STATIC_FUNC( _szScope_, _szFuncName_ ) \ + const char * _cm_className_ = _szScope_; \ + CAF_CM_FUNCNAME( _szFuncName_ ) + +#define CAF_CM_GET_FUNCNAME _cm_funcName_ + +#define CAF_CM_GET_CLASSNAME _cm_className_ + +#define CAF_CM_ENTER (void)0; + +#define CAF_CM_EXIT (void)0 + +#define CAF_CM_UPTLINE (void)0 + +// Class-level thread safety macros +#define CAF_CM_CREATE_THREADSAFE \ + private: \ + mutable Caf::SmartPtrCAutoRecMutex _cm_mutex_ + +#define CAF_CM_INIT_THREADSAFE \ + _cm_mutex_.CreateInstance(); \ + _cm_mutex_->initialize() + +#define CAF_CM_ENTER_AND_LOCK \ + Caf::CAutoMutexLockUnlock _auto_lock_unlock(_cm_mutex_); \ + CAF_CM_ENTER + +#define CAF_CM_UNLOCK_AND_EXIT CAF_CM_EXIT + +#define CAF_CM_LOCK _cm_mutex_->lock() + +#define CAF_CM_UNLOCK _cm_mutex_->unlock() + + +#define CAF_CM_LOCK_UNLOCK Caf::CAutoMutexLockUnlock _auto_lock_unlock(_cm_mutex_) + +#define CAF_CM_UNLOCK_LOCK Caf::CAutoMutexUnlockLock _auto_unlock_lock(_cm_mutex_) + +#define CAF_CM_LOCK_UNLOCK_LOG Caf::CAutoMutexLockUnlock _auto_lock_unlock(_cm_mutex_, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME, __LINE__) + +#define CAF_CM_UNLOCK_LOCK_LOG Caf::CAutoMutexUnlockLock _auto_unlock_lock(_cm_mutex_, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME, __LINE__) + + +#define CAF_CM_LOCK_UNLOCK1(_this_mutex_) Caf::CAutoMutexLockUnlock _auto_lock_unlock1(_this_mutex_) + +#define CAF_CM_UNLOCK_LOCK1(_this_mutex_) Caf::CAutoMutexUnlockLock _auto_unlock_lock1(_this_mutex_) + +#define CAF_CM_LOCK_UNLOCK1_LOG(_this_mutex_) Caf::CAutoMutexLockUnlock _auto_lock_unlock1(_this_mutex_, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME, __LINE__) + +#define CAF_CM_UNLOCK_LOCK1_LOG(_this_mutex_) Caf::CAutoMutexUnlockLock _auto_unlock_lock1(_this_mutex_, CAF_CM_GET_CLASSNAME, CAF_CM_GET_FUNCNAME, __LINE__) + +#endif /* CLASSMACROS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionExMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionExMacros.h new file mode 100644 index 000000000..930ed03f3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionExMacros.h @@ -0,0 +1,67 @@ +/* + * Created on: Oct 6, 2011 + * Author: mdonahue + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef EXEXCEPTIONEXMACROS_H_ +#define EXEXCEPTIONEXMACROS_H_ + +#define CAF_CM_EXCEPTIONEX_VA0(_exclass_, _code_, _msg_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populate(_msg_, _code_, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA1(_exclass_, _code_, _fmt_, _arg1_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA2(_exclass_, _code_, _fmt_, _arg1_, _arg2_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA3(_exclass_, _code_, _fmt_, _arg1_, _arg2_, _arg3_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA4(_exclass_, _code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA5(_exclass_, _code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#define CAF_CM_EXCEPTIONEX_VA6(_exclass_, _code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) \ + { \ + _cm_exception_ = new _exclass_(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + _cm_exception_->AddRef(); \ + throw static_cast<_exclass_*>(_cm_exception_); \ + } + +#endif /* EXEXCEPTIONEXMACROS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionLink.h new file mode 100644 index 000000000..4261af66a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionLink.h @@ -0,0 +1,33 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef EXCEPTIONLINK_H_ +#define EXCEPTIONLINK_H_ + +#ifndef EXCEPTION_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define EXCEPTION_LINKAGE __declspec(dllexport) + #else + #define EXCEPTION_LINKAGE __declspec(dllimport) + #endif + #else + #define EXCEPTION_LINKAGE + #endif +#endif + +#include "CBacktraceUtils.h" +#include "ClassMacros.h" +#include "ExceptionMacros.h" +#include "CCafExceptionEx.h" +#include "ExceptionExMacros.h" +#include "CValidate.h" +#include "ValidationMacros.h" +#include "ValidationMacrosRaw.h" +#include "StatusMacros.h" + +#endif /* EXCEPTIONLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionMacros.h new file mode 100644 index 000000000..b248fe971 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ExceptionMacros.h @@ -0,0 +1,157 @@ +/* + * Author: mdonahue + * Created: Jan 26, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef EXCEPTIONMACROS_H_ +#define EXCEPTIONMACROS_H_ + +#define CAF_CM_EXCEPTION_EFAIL( _msg_ ) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_msg_, E_FAIL, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA0(_code_, _msg_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_msg_, _code_, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA1(_code_, _fmt_, _arg1_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA2(_code_, _fmt_, _arg1_, _arg2_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA3(_code_, _fmt_, _arg1_, _arg2_, _arg3_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA4(_code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA5(_code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + +#define CAF_CM_EXCEPTION_VA6(_code_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) \ + { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populateVA(_code_, _cm_className_, _cm_funcName_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + _cm_exception_->AddRef(); \ + throw _cm_exception_; \ + } + + +#define CAF_CM_CLEAREXCEPTION \ + if(NULL != _cm_exception_) { _cm_exception_->Release(); _cm_exception_ = NULL; } + +#define CAF_CM_ISEXCEPTION \ + ((NULL == _cm_exception_) ? false : true) + +#define CAF_CM_EXCEPTION_GET_FULLMSG \ + (NULL == _cm_exception_) ? std::string() : _cm_exception_->getFullMsg() + +#define CAF_CM_EXCEPTION_GET_MSG \ + (NULL == _cm_exception_) ? std::string() : _cm_exception_->getMsg() + +#define CAF_CM_EXCEPTION_GET_ERROR \ + (NULL == _cm_exception_) ? S_OK : _cm_exception_->getError() + +#define CAF_CM_THROWEXCEPTION \ + if(NULL != _cm_exception_) { _cm_exception_->throwSelf(); } + +#define CAF_CM_GETEXCEPTION \ + _cm_exception_ + +// Catch exceptions and turn them into CafException +#define CAF_CM_CATCH_CAF \ + catch (CCafException* _catchException_) { \ + if(NULL == _cm_exception_) { \ + _cm_exception_ = _catchException_; \ + } \ + } + +#define CAF_CM_CATCH_HRESULT \ + catch (HRESULT& _catchException_) { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate("HRESULT Exception", _catchException_, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + } + +#define CAF_CM_CATCH_STL \ + catch (exception& _catchException_) { \ + const std::string _msg_ = std::string("STL Exception: " ) + std::string( _catchException_.what() ); \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_msg_, E_FAIL, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + } + +#define CAF_CM_CATCH_STD \ + catch (const std::exception& _catchException_) { \ + const std::string _msg_ = std::string("STD Exception: " ) + std::string( _catchException_.what() ); \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_msg_, E_FAIL, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + } + +#define CAF_CM_CATCH_DEFAULT \ + catch (...) { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate("Default Exception", E_FAIL, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + } + +#define CAF_CM_CATCH_GERROR \ + catch (GError* _catchException_) { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_catchException_->message, _catchException_->code, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + g_error_free(_catchException_); \ + } + +#define CAF_CM_THROW_GERROR(_err_) { \ + _cm_exception_ = new Caf::CCafException(); \ + _cm_exception_->populate(_err_->message, _err_->code, _cm_className_, _cm_funcName_); \ + _cm_exception_->AddRef(); \ + g_error_free(_err_); \ + _cm_exception_->throwSelf(); } + +#define CAF_CM_CATCH_ALL \ + CAF_CM_CATCH_CAF \ + CAF_CM_CATCH_HRESULT \ + CAF_CM_CATCH_STD \ + CAF_CM_CATCH_GERROR \ + CAF_CM_CATCH_DEFAULT + +#endif /* EXCEPTIONMACROS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StatusMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StatusMacros.h new file mode 100644 index 000000000..5228db180 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/StatusMacros.h @@ -0,0 +1,32 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STATUSMACROS_H_ +#define STATUSMACROS_H_ + +typedef std::pair CCafStatus; + +#define CAF_CM_VALIDATE_STATUS(_status_) \ + { \ + CCafStatus _int_status_ = _status_; \ + if (_int_status_.first != S_OK) \ + CAF_CM_EXCEPTION_VA0(_int_status_.first, _int_status_.second.c_str()); \ + } + +#define CAF_CM_STATUS _status_ + +#define CAF_CM_INIT_STATUS CCafStatus CAF_CM_STATUS = std::make_pair(S_OK, ""); + +#define CAF_CM_SET_STATUS_FROM_EXCEPTION(_arg_) \ + { \ + if (_arg_->isPopulated()) \ + CAF_CM_STATUS = std::make_pair(_arg_->getError(), _arg_->getMsg()); \ + else \ + CAF_CM_STATUS = std::make_pair(E_FAIL, "Unknown exception"); \ + } + +#endif /* STATUSMACROS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacros.h new file mode 100644 index 000000000..3645c5b62 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacros.h @@ -0,0 +1,146 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef VALIDATIONMACROS_H_ +#define VALIDATIONMACROS_H_ + +// String constants used in validation +const char _sPRECOND_ISCONSTRUCTED[] = "Pre-condition failed because object was not constructed successfully"; +const char _sPRECOND_ISINITIALIZED[] = "Pre-condition failed because object was not initialized successfully"; +const char _sPRECOND_ISNOTINITIALIZED[] = "Pre-condition failed because object has already been initialized"; +const char _sPRECOND_ISNOTREADONLY[] = "Pre-condition failed because the object is read-only."; + +const char _sVALIDATE_STRINGEMPTY[] ="Invalid Argument because a string is empty:"; +const char _sVALIDATE_STRINGPTRNULL[] ="Invalid Argument because a string pointer is null:"; +const char _sVALIDATE_STRINGPTREMPTY[] ="Invalid Argument because a string pointer is empty:"; +const char _sVALIDATE_PTRARRAYNULL[] ="Invalid Argument because a pointer array is null:"; +const char _sVALIDATE_PTRARRAYEMPTY[] ="Invalid Argument because a pointer array is empty:"; +const char _sVALIDATE_STL[] ="Invalid Argument because an STL container is empty:"; +const char _sVALIDATE_STL_EMPTY[] ="Invalid Argument because an STL container is not empty:"; +const char _sVALIDATE_STL_ITERATOR[] ="Invalid Argument because an STL iterator is at the end of the containter:"; +const char _sVALIDATE_INTERFACE[] ="Invalid Argument because an interface is NULL:"; +const char _sVALIDATE_ZERO[] ="Invalid Argument because a number is not equal to zero:"; +const char _sVALIDATE_ISNOTZERO[] ="Invalid Argument because a number is equal to zero:"; +const char _sVALIDATE_POSITIVE[] ="Invalid Argument because a number is less-than or equal-to zero:"; +const char _sVALIDATE_NEGATIVE[] ="Invalid Argument because a number is greater-than or equal-to zero:"; +const char _sVALIDATE_NONNEGATIVE[] ="Invalid Argument because a number is less-than zero:"; +const char _sVALIDATE_NOTNULL[] ="Invalid Argument is NULL:"; +const char _sVALIDATE_NULL[] ="Invalid Argument must be NULL:"; +const char _sVALIDATE_BOOL[] ="Invalid Argument because a bool is false:"; +const char _sVALIDATE_GUID[] ="Invalid Argument because a GUID is NULL:"; +const char _sASSERT_FAILED[] ="Assertion failed:"; + +// Used internally by some of these macros. +#define CAF_CM_EXCEPTION_VALIDATE( _valmsg_, _variable_text_ ) \ + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, "%s %s", _valmsg_, _variable_text_) + +// Some helper macros that make it easy to validate that the object pre-conditions have been met. +#define CAF_CM_PRECOND_ISCONSTRUCTED( _bIsConstucted_ ) \ + CValidate::constructed(_bIsConstucted_, _cm_className_, _cm_funcName_) + +#define CAF_CM_PRECOND_ISINITIALIZED( _bIsInitialized_ ) \ + CValidate::initialized(_bIsInitialized_, _cm_className_, _cm_funcName_) + +#define CAF_CM_PRECOND_ISNOTINITIALIZED( _bIsInitialized_ ) \ + CValidate::notInitialized(_bIsInitialized_, _cm_className_, _cm_funcName_) + +// Some helper macros that make is easy to validate input arguments. +#define CAF_CM_VALIDATE_STRING( _validate_ ) \ + CValidate::notEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_STRINGPTRW( _validate_ ) \ + CValidate::notNullOrEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_STRINGPTRA( _validate_ ) \ + CValidate::notNullOrEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_ZERO( _validate_) \ + CValidate::zero(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_NOTZERO( _validate_) \ + CValidate::notZero(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_POSITIVE( _validate_ ) \ + CValidate::positive(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_NEGATIVE( _validate_ ) \ + CValidate::negative(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_NONNEGATIVE( _validate_ ) \ + CValidate::nonNegative(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_NONNEGATIVE_INT64( _validate_ ) \ + CValidate::nonNegative64(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_BOOL( _validate_ ) \ + CValidate::isTrue(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_GUID( _validate_ ) \ + CValidate::notEmptyUuid(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_INTERFACE( _validate_ ) \ + CValidate::notNullInterface(_validate_.GetNonAddRefedInterface(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_INTERFACEPTR( _validate_ ) \ + CValidate::notNullInterface(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_PTR( _validate_ ) \ + CValidate::notNullPtr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_NULLPTR( _validate_ ) \ + CValidate::nullPtr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_SMARTPTR( _validate_ ) \ + CValidate::notNullPtr(_validate_.GetNonAddRefedInterface(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_PTRARRAY( _validate_ ) \ + CValidate::notNullOrEmptyPtrArr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_STL( _validate_ ) \ + CValidate::notEmptyStl(_validate_.size(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATE_STL_EMPTY( _validate_ ) \ + CValidate::emptyStl(_validate_.size(), #_validate_, _cm_className_, _cm_funcName_) + +// Not included in CValidate either because these macros are not currently used or because +// the types are too varied to include in a class. +#define CAF_CM_VALIDATE_STL_ITERATOR( _stlContainer_, _stlIterator ) \ + if( _stlIterator == _stlContainer_.end() ) \ + CAF_CM_EXCEPTION_VALIDATE( _sVALIDATE_STL_ITERATOR, #_stlContainer_ ) + +#define CAF_CM_VALIDATE_SMARTSTL_NOTEMPTY( _validate_ ) \ + if( _validate_.IsNull() || _validate_->empty() ) \ + CAF_CM_EXCEPTION_VALIDATE( _sVALIDATE_STL, #_validate_ ) + +#define CAF_CM_VALIDATE_COND_VA1( _cond_, _fmt_, _arg1_ ) \ + if(! (_cond_) ) { \ + const std::string _fullfmt_ = std::string(#_cond_) + " - " + std::string(_fmt_); \ + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, _fullfmt_.c_str(), _arg1_); \ + } + +#define CAF_CM_VALIDATE_COND_VA2( _cond_, _fmt_, _arg1_, _arg2_ ) \ + if(! (_cond_) ) { \ + const std::string _fullfmt_ = std::string(#_cond_) + " - " + std::string(_fmt_); \ + CAF_CM_EXCEPTION_VA2(E_INVALIDARG, _fullfmt_.c_str(), _arg1_, _arg2_); \ + } + +#define CAF_CM_VALIDATE_COND_VA3( _cond_, _fmt_, _arg1_, _arg2_, _arg3_ ) \ + if(! (_cond_) ) { \ + const std::string _fullfmt_ = std::string(#_cond_) + " - " + std::string(_fmt_); \ + CAF_CM_EXCEPTION_VA3(E_INVALIDARG, _fullfmt_.c_str(), _arg1_, _arg2_, _arg3_); \ + } + +// Generic assert +#define CAF_CM_ASSERT(_exp_) \ + if (!(_exp_)) \ + CAF_CM_EXCEPTION_VA2(E_FAIL, "%s %s", _sASSERT_FAILED, #_exp_ ) + +#define CAF_CM_ASSERT_MSG(_exp_, _msg_) \ + if (!(_exp_)) \ + CAF_CM_EXCEPTION_VA1( E_FAIL, "%s", _msg_ ); + +#endif /* VALIDATIONMACROS_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacrosRaw.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacrosRaw.h new file mode 100644 index 000000000..d9faad23d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/ValidationMacrosRaw.h @@ -0,0 +1,76 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef VALIDATIONMACROSRAW_H_ +#define VALIDATIONMACROSRAW_H_ + +// Some helper macros that make it easy to validate that the object pre-conditions have been met. +#define CAF_CM_PRECONDRAW_ISCONSTRUCTED( _cm_className_, _cm_funcName_, _bIsConstucted_ ) \ + CValidate::constructed(_bIsConstucted_, _cm_className_, _cm_funcName_) + +#define CAF_CM_PRECONDRAW_ISINITIALIZED( _cm_className_, _cm_funcName_, _bIsInitialized_ ) \ + CValidate::initialized(_bIsInitialized_, _cm_className_, _cm_funcName_) + +#define CAF_CM_PRECONDRAW_ISNOTINITIALIZED( _cm_className_, _cm_funcName_, _bIsInitialized_ ) \ + CValidate::notInitialized(_bIsInitialized_, _cm_className_, _cm_funcName_) + +// Some helper macros that make is easy to validate input arguments. +#define CAF_CM_VALIDATERAW_STRING( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_STRINGPTRW( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullOrEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_STRINGPTRA( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullOrEmptyStr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_ZERO( _cm_className_, _cm_funcName_, _validate_) \ + CValidate::zero(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_NOTZERO( _cm_className_, _cm_funcName_, _validate_) \ + CValidate::notZero(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_POSITIVE( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::positive(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_NEGATIVE( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::negative(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_NONNEGATIVE( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::nonNegative(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_BOOL( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::isTrue(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_GUID( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notEmptyUuid(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_INTERFACE( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullInterface(_validate_.GetNonAddRefedInterface(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_INTERFACEPTR( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullInterface(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_PTR( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullPtr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_NULLPTR( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::nullPtr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_SMARTPTR( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullPtr(_validate_.GetNonAddRefedInterface(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_PTRARRAY( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notNullOrEmptyPtrArr(_validate_, #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_STL( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::notEmptyStl(_validate_.size(), #_validate_, _cm_className_, _cm_funcName_) + +#define CAF_CM_VALIDATERAW_STL_EMPTY( _cm_className_, _cm_funcName_, _validate_ ) \ + CValidate::emptyStl(_validate_.size(), #_validate_, _cm_className_, _cm_funcName_) + +#endif /* VALIDATIONMACROSRAW_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/stdafx.h new file mode 100644 index 000000000..3b99d36b8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Exception/stdafx.h @@ -0,0 +1,24 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define EXCEPTION_LINKAGE __declspec(dllexport) + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) +#else + #define EXCEPTION_LINKAGE + #define COMMONAGGREGATOR_LINKAGE +#endif + +#include +#include +#include "ClassMacros.h" +#include "ExceptionMacros.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp new file mode 100644 index 000000000..6ab2c37d4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp @@ -0,0 +1,95 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "Integration/Caf/CBeanPropertiesHelper.h" + +using namespace Caf; + +SmartPtrCBeanPropertiesHelper CBeanPropertiesHelper::create( + const IBean::Cprops& properties) { + SmartPtrCBeanPropertiesHelper rc; + rc.CreateInstance(); + rc->initialize(properties); + + return rc; +} + +CBeanPropertiesHelper::CBeanPropertiesHelper(void) : + m_isInitialized(false), + CAF_CM_INIT("CBeanPropertiesHelper") { +} + +CBeanPropertiesHelper::~CBeanPropertiesHelper(void) { +} + +void CBeanPropertiesHelper::initialize( + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(m_isInitialized); + + _properties = properties; + m_isInitialized = true; +} + +std::string CBeanPropertiesHelper::getRequiredString( + const std::string& key) const { + CAF_CM_FUNCNAME("getRequiredString"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + const IBean::Cprops::const_iterator iter = _properties.find(key); + if (_properties.end() == iter) { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Required property not found - %s", key.c_str()); + } + + return iter->second; +} + +std::string CBeanPropertiesHelper::getOptionalString( + const std::string& key, + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getOptionalString"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + std::string rc = defaultVal; + const IBean::Cprops::const_iterator iter = _properties.find(key); + if (_properties.end() != iter) { + rc = iter->second; + } + + return rc; +} + +bool CBeanPropertiesHelper::getRequiredBool( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("getRequiredBool"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + const std::string val = getRequiredString(key); + return (val.compare("true") == 0); +} + +bool CBeanPropertiesHelper::getOptionalBool( + const std::string& key, + const bool defaultValue) const { + CAF_CM_FUNCNAME_VALIDATE("getOptionalBool"); + CAF_CM_PRECOND_ISINITIALIZED(m_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + bool rc = defaultValue; + const IBean::Cprops::const_iterator iter = _properties.find(key); + if (_properties.end() != iter) { + rc = (iter->second.compare("true") == 0); + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageCreator.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageCreator.cpp new file mode 100644 index 000000000..a4017c386 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageCreator.cpp @@ -0,0 +1,468 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h" +#include "Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.h" +#include "Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.h" +#include "Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h" +#include "Doc/DocXml/ResponseXml/ResponseXmlRoots.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" +#include "Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.h" + +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Integration/Caf/CCafMessageHeadersWriter.h" +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" +#include "Doc/CafCoreTypesDoc/CProtocolCollectionDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallRequestDoc.h" +#include "Doc/DiagRequestDoc/CDiagRequestDoc.h" +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" +#include "Doc/ResponseDoc/CErrorResponseDoc.h" +#include "Doc/ResponseDoc/CResponseDoc.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Integration/Caf/CCafMessagePayload.h" +#include "Integration/Caf/CCafMessageCreator.h" +#include "Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.h" + +using namespace Caf; + +SmartPtrIIntMessage CCafMessageCreator::createPayloadEnvelope( + const SmartPtrCResponseDoc& response, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "createPayloadEnvelope"); + CAF_CM_VALIDATE_SMARTPTR(response); + CAF_CM_VALIDATE_STRING(relFilename); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setRelFilename(relFilename); + + const SmartPtrIIntMessage rc = createPayloadEnvelope( + "response", + XmlRoots::saveResponseToString(response), + response->getClientId(), + response->getRequestId(), + response->getPmeId(), + response->getResponseHeader()->getVersion(), + messageHeadersWriter->getHeaders(), + headers, + response->getAttachmentCollection()); + + return rc; +} + +SmartPtrIIntMessage CCafMessageCreator::createPayloadEnvelope( + const SmartPtrCErrorResponseDoc& errorResponse, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "createPayloadEnvelope"); + CAF_CM_VALIDATE_SMARTPTR(errorResponse); + CAF_CM_VALIDATE_STRING(relFilename); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setRelFilename(relFilename); + + const SmartPtrIIntMessage rc = createPayloadEnvelope( + "errorResponse", + XmlRoots::saveErrorResponseToString(errorResponse), + errorResponse->getClientId(), + errorResponse->getRequestId(), + errorResponse->getPmeId(), + errorResponse->getResponseHeader()->getVersion(), + messageHeadersWriter->getHeaders(), + headers); + + return rc; +} + +SmartPtrIIntMessage CCafMessageCreator::createPayloadEnvelope( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "createPayloadEnvelope"); + CAF_CM_VALIDATE_SMARTPTR(mgmtRequest); + + const SmartPtrIIntMessage rc = createPayloadEnvelope( + "mgmtRequest", + XmlRoots::saveMgmtRequestToString(mgmtRequest), + mgmtRequest->getClientId(), + mgmtRequest->getRequestId(), + mgmtRequest->getPmeId(), + mgmtRequest->getRequestHeader()->getVersion(), + IIntMessage::SmartPtrCHeaders(), + headers, + mgmtRequest->getAttachmentCollection(), + mgmtRequest->getRequestHeader()->getProtocolCollection()); + + return rc; +} + +SmartPtrIIntMessage CCafMessageCreator::createPayloadEnvelope( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const std::deque& attachmentCollection, + const IIntMessage::SmartPtrCHeaders& newHeaders, + const IIntMessage::SmartPtrCHeaders& origHeaders) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "createPayloadEnvelope"); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + + SmartPtrCPayloadEnvelopeDoc payloadEnvelopeNew = payloadEnvelope; + if (attachmentCollection.size() > 0) { + SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc; + attachmentCollectionDoc.CreateInstance(); + attachmentCollectionDoc->initialize(attachmentCollection); + + payloadEnvelopeNew.CreateInstance(); + payloadEnvelopeNew->initialize( + payloadEnvelope->getClientId(), + payloadEnvelope->getRequestId(), + payloadEnvelope->getPmeId(), + payloadEnvelope->getPayloadType(), + payloadEnvelope->getPayloadVersion(), + attachmentCollectionDoc, + payloadEnvelope->getProtocolCollection(), + payloadEnvelope->getHeaderCollection(), + payloadEnvelope->getVersion()); + } + + const std::string payloadEnvelopeStr = + XmlRoots::savePayloadEnvelopeToString(payloadEnvelopeNew); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(payloadEnvelopeStr, newHeaders, origHeaders); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::createFromProviderResponse( + const SmartPtrCDynamicByteArray& providerResponse, + const std::string& relFilename, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "createFromProviderResponse"); + CAF_CM_VALIDATE_SMARTPTR(providerResponse); + CAF_CM_VALIDATE_STRING(relFilename); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("providerResponse"); + messageHeadersWriter->setRelFilename(relFilename); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(providerResponse, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCDynamicByteArray payload, + const std::deque& attachmentCollection, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + const std::string payloadStr = reinterpret_cast(payload->getPtr()); + const SmartPtrCXmlElement payloadXml = + CXmlUtils::parseString(payloadStr, std::string()); + + payloadXml->removeChild("attachmentCollection"); + if (! attachmentCollection.empty()) { + SmartPtrCAttachmentCollectionDoc attachmentCollectionDoc; + attachmentCollectionDoc.CreateInstance(); + attachmentCollectionDoc->initialize(attachmentCollection); + + const SmartPtrCXmlElement attachmentCollectionXml = + payloadXml->createAndAddElement("attachmentCollection"); + AttachmentCollectionXml::add(attachmentCollectionDoc, attachmentCollectionXml); + } + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr( + payloadXml->saveToString(), CIntMessage::SmartPtrCHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(mgmtRequest); + + const std::string mgmtRequestStr = + XmlRoots::saveMgmtRequestToString(mgmtRequest); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("mgmtRequest"); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(mgmtRequestStr, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCDiagRequestDoc& diagRequest, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(diagRequest); + + const std::string diagRequestStr = + XmlRoots::saveDiagRequestToString(diagRequest); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("diagRequest"); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(diagRequestStr, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCInstallRequestDoc& installRequest, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(installRequest); + + const std::string installRequestStr = + XmlRoots::saveInstallRequestToString(installRequest); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("installRequest"); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(installRequestStr, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCProviderRegDoc& providerReg, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(providerReg); + + const std::string installRequestStr = + XmlRoots::saveProviderRegToString(providerReg); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("providerReg"); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(installRequestStr, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCProviderCollectSchemaRequestDoc& providerCollectSchemaRequest, + const std::string& relFilename, + const std::string& relDirectory, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(providerCollectSchemaRequest); + CAF_CM_VALIDATE_STRING(relFilename); + CAF_CM_VALIDATE_STRING(relDirectory); + + const std::string providerCollectSchemaRequestMem = + XmlRoots::saveProviderCollectSchemaRequestToString(providerCollectSchemaRequest); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("providerCollectSchemaRequest"); + messageHeadersWriter->setRelFilename(relFilename); + messageHeadersWriter->setRelDirectory(relDirectory); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(providerCollectSchemaRequestMem, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::create( + const SmartPtrCProviderRequestDoc& providerRequest, + const std::string& relFilename, + const std::string& relDirectory, + const std::string& providerUri, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageCreator", "create"); + CAF_CM_VALIDATE_SMARTPTR(providerRequest); + CAF_CM_VALIDATE_STRING(relFilename); + CAF_CM_VALIDATE_STRING(relDirectory); + + SmartPtrCProviderRequestHeaderDoc requestHeader = providerRequest->getRequestHeader(); + SmartPtrCPropertyCollectionDoc propertyBag = requestHeader->getEchoPropertyBag(); + + std::deque newProperties; + if (!propertyBag.IsNull()) { + newProperties.assign(propertyBag->getProperty().begin(), propertyBag->getProperty().end()); + } + + std::deque relDirectoryValue(1, relDirectory); + SmartPtrCPropertyDoc relDirectoryProp; + relDirectoryProp.CreateInstance(); + relDirectoryProp->initialize("relDirectory", PROPERTY_STRING, relDirectoryValue); + newProperties.push_back(relDirectoryProp); + + std::deque providerUriValue(1, providerUri); + SmartPtrCPropertyDoc providerUriProp; + providerUriProp.CreateInstance(); + providerUriProp->initialize("providerUri", PROPERTY_STRING, providerUriValue); + newProperties.push_back(providerUriProp); + + SmartPtrCPropertyCollectionDoc newPropertyBag; + newPropertyBag.CreateInstance(); + newPropertyBag->initialize(newProperties); + + SmartPtrCProviderRequestHeaderDoc newRequestHeader; + newRequestHeader.CreateInstance(); + newRequestHeader->initialize(requestHeader->getRequestConfig(), newPropertyBag); + + SmartPtrCProviderRequestDoc newProviderRequest; + newProviderRequest.CreateInstance(); + newProviderRequest->initialize(providerRequest->getClientId(), + providerRequest->getRequestId(), providerRequest->getPmeId(), newRequestHeader, + providerRequest->getBatch(), providerRequest->getAttachmentCollection()); + + const std::string providerRequestMem = + XmlRoots::saveProviderRequestToString(newProviderRequest); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType("providerRequest"); + messageHeadersWriter->setRelFilename(relFilename); + messageHeadersWriter->setRelDirectory(relDirectory); + + if (! providerUri.empty()) { + messageHeadersWriter->setProviderUri(providerUri); + } + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(providerRequestMem, + messageHeadersWriter->getHeaders(), headers); + + return messageImpl; +} + +SmartPtrIIntMessage CCafMessageCreator::createPayloadEnvelope( + const std::string& payloadType, + const std::string& payloadStr, + const UUID& clientId, + const UUID& requestId, + const std::string& pmeId, + const std::string& payloadVersion, + const IIntMessage::SmartPtrCHeaders& newHeaders, + const IIntMessage::SmartPtrCHeaders& origHeaders, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const SmartPtrCProtocolCollectionDoc& protocolCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CCafMessageCreator", "createPayloadEnvelope"); + CAF_CM_VALIDATE_STRING(payloadType); + CAF_CM_VALIDATE_STRING(payloadStr); + // clientId is optional + // requestId is optional + // pmeId is optional + CAF_CM_VALIDATE_STRING(payloadVersion); + + SmartPtrCIntMessage messageImpl; + if (::IsEqualGUID(requestId, CAFCOMMON_GUID_NULL)) { + CAF_CM_LOG_WARN_VA1("Message is not associated with a request - %s", payloadStr.c_str()); + } else { + const std::string outputDir = + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamOutputDir); + + const std::string destAttachmentFilename = + BasePlatform::UuidToString(requestId) + "-EnvelopePayload.xml"; + const std::string destAttachmentPath = FileSystemUtils::buildPath( + outputDir, "att", destAttachmentFilename); + const std::string destAttachmentUri = + "file:///" + destAttachmentPath + "?relPath=" + destAttachmentFilename; + + const SmartPtrCDynamicByteArray payload = + CCafMessagePayload::createBufferFromStr(payloadStr); + FileSystemUtils::saveByteFile(destAttachmentPath, payload); + + const std::string cmsPolicyStr = AppConfigUtils::getRequiredString( + "security", "cms_policy"); + const CMS_POLICY cmsPolicy = + EnumConvertersXml::convertStringToCmsPolicy(cmsPolicyStr); + + SmartPtrCAttachmentDoc envelopePayloadAttachment; + envelopePayloadAttachment.CreateInstance(); + envelopePayloadAttachment->initialize("_EnvelopePayload_", "EnvelopePayload", + destAttachmentUri, false, cmsPolicy); + + std::deque attachmentCollectionNew; + if (! attachmentCollection.IsNull()) { + attachmentCollectionNew = attachmentCollection->getAttachment(); + } + attachmentCollectionNew.push_back(envelopePayloadAttachment); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionDocNew; + attachmentCollectionDocNew.CreateInstance(); + attachmentCollectionDocNew->initialize(attachmentCollectionNew); + + SmartPtrCPayloadEnvelopeDoc payloadEnvelope; + payloadEnvelope.CreateInstance(); + payloadEnvelope->initialize( + clientId, + requestId, + pmeId, + payloadType, + payloadVersion, + attachmentCollectionDocNew, + protocolCollection); + + const std::string payloadEnvelopeStr = + XmlRoots::savePayloadEnvelopeToString(payloadEnvelope); + + const CIntMessage::SmartPtrCHeaders mergedHeaders = + CIntMessage::mergeHeaders(newHeaders, origHeaders); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType(payloadType); + + messageImpl.CreateInstance(); + messageImpl->initializeStr( + payloadEnvelopeStr, messageHeadersWriter->getHeaders(), mergedHeaders); + } + + return messageImpl; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeaders.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeaders.cpp new file mode 100644 index 000000000..7840cdf4f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeaders.cpp @@ -0,0 +1,418 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "IVariant.h" +#include "Integration/IIntMessage.h" +#include "Exception/CCafException.h" +#include "Integration/Caf/CCafMessageHeaders.h" +#include "Integration/Core/FileHeaders.h" + +using namespace Caf; + +SmartPtrCCafMessageHeaders CCafMessageHeaders::create( + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessageHeaders", "create"); + CAF_CM_VALIDATE_SMARTPTR(headers); + + SmartPtrCCafMessageHeaders rc; + rc.CreateInstance(); + rc->initialize(headers); + + return rc; +} + +CCafMessageHeaders::CCafMessageHeaders(void) : + _isInitialized(false), + CAF_CM_INIT_LOG("CCafMessageHeaders") { +} + +CCafMessageHeaders::~CCafMessageHeaders(void) { +} + +void CCafMessageHeaders::initialize( + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(headers); + + _headers = headers; + _isInitialized = true; +} + +IIntMessage::SmartPtrCHeaders CCafMessageHeaders::getHeaders() const { + CAF_CM_FUNCNAME_VALIDATE("getHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _headers; +} + +std::string CCafMessageHeaders::getPayloadType() const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("payloadType"); +} + +std::string CCafMessageHeaders::getPayloadTypeOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadTypeOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("payloadType"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getVersion() const { + CAF_CM_FUNCNAME_VALIDATE("getVersion"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("version"); +} + +std::string CCafMessageHeaders::getVersionOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getVersionOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("version"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +UUID CCafMessageHeaders::getClientId() const { + CAF_CM_FUNCNAME_VALIDATE("getClientId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc; + const std::string rcStr = getClientIdStr(); + BasePlatform::UuidFromString(rcStr.c_str(), rc); + return rc; +} + +std::string CCafMessageHeaders::getClientIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getClientIdStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("clientId"); +} + +UUID CCafMessageHeaders::getClientIdOpt( + const UUID defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getClientIdOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc = defaultVal; + const std::string rcStr = getClientIdStrOpt(); + if (! rcStr.empty()) { + BasePlatform::UuidFromString(rcStr.c_str(), rc); + } + + return rc; +} + +std::string CCafMessageHeaders::getClientIdStrOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getClientIdStrOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("clientId"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +UUID CCafMessageHeaders::getRequestId() const { + CAF_CM_FUNCNAME_VALIDATE("getRequestId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc; + const std::string rcStr = getRequestIdStr(); + BasePlatform::UuidFromString(rcStr.c_str(), rc); + return rc; +} + +std::string CCafMessageHeaders::getRequestIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getRequestIdStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("requestId"); +} + +UUID CCafMessageHeaders::getRequestIdOpt( + const UUID defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getRequestIdOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc = defaultVal; + const std::string rcStr = getRequestIdStrOpt(); + if (! rcStr.empty()) { + BasePlatform::UuidFromString(rcStr.c_str(), rc); + } + + return rc; +} + +std::string CCafMessageHeaders::getRequestIdStrOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getRequestIdStrOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("requestId"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getPmeId() const { + CAF_CM_FUNCNAME_VALIDATE("getPmeId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("pmeId"); +} + +std::string CCafMessageHeaders::getPmeIdOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getPmeIdOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("pmeId"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +UUID CCafMessageHeaders::getSessionId() const { + CAF_CM_FUNCNAME_VALIDATE("getSessionId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc; + const std::string rcStr = getSessionIdStr(); + BasePlatform::UuidFromString(rcStr.c_str(), rc); + return rc; +} + +std::string CCafMessageHeaders::getSessionIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getSessionIdStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("sessionId"); +} + +UUID CCafMessageHeaders::getSessionIdOpt( + const UUID defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getSessionIdOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UUID rc = defaultVal; + const std::string rcStr = getSessionIdStrOpt(); + if (! rcStr.empty()) { + BasePlatform::UuidFromString(rcStr.c_str(), rc); + } + + return rc; +} + +std::string CCafMessageHeaders::getSessionIdStrOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getSessionIdStrOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("sessionId"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getRelDirectory() const { + CAF_CM_FUNCNAME_VALIDATE("getRelDirectory"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("relDirectory"); +} + +std::string CCafMessageHeaders::getRelDirectoryOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getRelDirectoryOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("relDirectory"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getRelFilename() const { + CAF_CM_FUNCNAME_VALIDATE("getRelFilename"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr(FileHeaders::_sFILENAME); +} + +std::string CCafMessageHeaders::getRelFilenameOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getRelFilenameOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr(FileHeaders::_sFILENAME); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getProviderUri() const { + CAF_CM_FUNCNAME_VALIDATE("getProviderUri"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("providerUri"); +} + +std::string CCafMessageHeaders::getProviderUriOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getProviderUriOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("providerUri"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getFlowDirection() const { + CAF_CM_FUNCNAME_VALIDATE("getFlowDirection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return getRequiredStr("cafcomm.internal.msgflow"); +} + +std::string CCafMessageHeaders::getFlowDirectionOpt( + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getFlowDirectionOpt"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = getOptionalStr("cafcomm.internal.msgflow"); + if (rcStr.empty()) { + rcStr = defaultVal; + } + + return rcStr; +} + +std::string CCafMessageHeaders::getRequiredStr( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("getRequiredStr"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return findRequiredHeader(key)->toString(); +} + +std::string CCafMessageHeaders::getOptionalStr( + const std::string& key, + const std::string& defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getOptionalStr"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rcStr = defaultVal; + const SmartPtrIVariant valueVar = findOptionalHeader(key); + if (! valueVar.IsNull()) { + rcStr = valueVar->toString(); + } + + return rcStr; +} + +bool CCafMessageHeaders::getRequiredBool( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("getRequiredBool"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrIVariant valueVar = findRequiredHeader(key); + CAF_CM_VALIDATE_BOOL(valueVar->isBool()); + + const std::string valueStr = valueVar->toString(); + CAF_CM_LOG_DEBUG_VA2("key: %s, value: %s", key.c_str(), valueStr.c_str()); + + return (valueStr.compare("true") == 0); +} + +bool CCafMessageHeaders::getOptionalBool( + const std::string& key, + const bool defaultVal) const { + CAF_CM_FUNCNAME_VALIDATE("getOptionalBool"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrIVariant valueVar = findOptionalHeader(key); + + bool rc = defaultVal; + if (! valueVar.IsNull()) { + CAF_CM_VALIDATE_BOOL(valueVar->isBool()); + + const std::string valueStr = valueVar->toString(); + CAF_CM_LOG_DEBUG_VA2("key: %s, value: %s", key.c_str(), valueStr.c_str()); + + rc = (valueStr.compare("true") == 0); + } + + return rc; +} + +SmartPtrIVariant CCafMessageHeaders::findOptionalHeader( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalHeader"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + SmartPtrIVariant value; + + IIntMessage::CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter != _headers->end()) { + value = headerIter->second.first; + } + + return value; +} + +SmartPtrIVariant CCafMessageHeaders::findRequiredHeader( + const std::string& key) const { + CAF_CM_FUNCNAME("findRequiredHeader"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + IIntMessage::CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter == _headers->end()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Key not found in headers - %s", key.c_str()); + } + + return headerIter->second.first; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp new file mode 100644 index 000000000..f9475d555 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp @@ -0,0 +1,223 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IIntMessage.h" +#include "Integration/Caf/CCafMessageHeadersWriter.h" +#include "Integration/Core/FileHeaders.h" +#include "Integration/Core/MessageHeaders.h" + +using namespace Caf; + +SmartPtrCCafMessageHeadersWriter CCafMessageHeadersWriter::create() { + SmartPtrCCafMessageHeadersWriter rc; + rc.CreateInstance(); + rc->initialize(); + + return rc; +} + +CCafMessageHeadersWriter::CCafMessageHeadersWriter(void) : + _isInitialized(false), + CAF_CM_INIT("CCafMessageHeadersWriter") { +} + +CCafMessageHeadersWriter::~CCafMessageHeadersWriter(void) { +} + +void CCafMessageHeadersWriter::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _headers.CreateInstance(); + _isInitialized = true; +} + +IIntMessage::SmartPtrCHeaders CCafMessageHeadersWriter::getHeaders() const { + CAF_CM_FUNCNAME_VALIDATE("getHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _headers; +} + +void CCafMessageHeadersWriter::setPayloadType( + const std::string& payloadType) { + CAF_CM_FUNCNAME_VALIDATE("setPayloadType"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(payloadType); + + insertString("payloadType", payloadType); +} + +void CCafMessageHeadersWriter::setVersion( + const std::string& version) { + CAF_CM_FUNCNAME_VALIDATE("setVersion"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(version); + + insertString("version", version); +} + +void CCafMessageHeadersWriter::setPayloadVersion( + const std::string& payloadVersion) { + CAF_CM_FUNCNAME_VALIDATE("setPayloadVersion"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(payloadVersion); + + insertString("payloadVersion", payloadVersion); +} + +void CCafMessageHeadersWriter::setClientId( + const UUID& clientId) { + CAF_CM_FUNCNAME_VALIDATE("setClientId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string clientIdStr = BasePlatform::UuidToString(clientId); + insertString("clientId", clientIdStr); +} + +void CCafMessageHeadersWriter::setClientId( + const std::string& clientIdStr) { + CAF_CM_FUNCNAME_VALIDATE("setClientId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(clientIdStr); + + insertString("clientId", clientIdStr); +} + +void CCafMessageHeadersWriter::setRequestId( + const UUID& requestId) { + CAF_CM_FUNCNAME_VALIDATE("setRequestId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string requestIdStr = BasePlatform::UuidToString(requestId); + insertString("requestId", requestIdStr); +} + +void CCafMessageHeadersWriter::setRequestId( + const std::string& requestIdStr) { + CAF_CM_FUNCNAME_VALIDATE("setRequestId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(requestIdStr); + + insertString("requestId", requestIdStr); +} + +void CCafMessageHeadersWriter::setPmeId( + const std::string& pmeId) { + CAF_CM_FUNCNAME_VALIDATE("setPmeId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(pmeId); + + insertString("pmeId", pmeId); +} + +void CCafMessageHeadersWriter::setSessionId( + const UUID& sessionId) { + CAF_CM_FUNCNAME_VALIDATE("setSessionId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string sessionIdStr = BasePlatform::UuidToString(sessionId); + insertString("sessionId", sessionIdStr); +} + +void CCafMessageHeadersWriter::setSessionId( + const std::string& sessionIdStr) { + CAF_CM_FUNCNAME_VALIDATE("setSessionId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(sessionIdStr); + + insertString("sessionId", sessionIdStr); +} + +void CCafMessageHeadersWriter::setRelDirectory( + const std::string& relDirectory) { + CAF_CM_FUNCNAME_VALIDATE("setRelDirectory"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(relDirectory); + + insertString("relDirectory", relDirectory); +} + +void CCafMessageHeadersWriter::setRelFilename( + const std::string& relFilename) { + CAF_CM_FUNCNAME_VALIDATE("setRelFilename"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(relFilename); + + insertString(FileHeaders::_sFILENAME, relFilename); +} + +void CCafMessageHeadersWriter::setProviderUri( + const std::string& providerUri) { + CAF_CM_FUNCNAME_VALIDATE("setProviderUri"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(providerUri); + + insertString("providerUri", providerUri); +} + +void CCafMessageHeadersWriter::setIsThrowable( + const bool& isThrowable) { + CAF_CM_FUNCNAME_VALIDATE("setIsThrowable"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + insertBool(MessageHeaders::_sIS_THROWABLE, isThrowable); +} + +void CCafMessageHeadersWriter::setIsMultiPart( + const bool& isMultiPart) { + CAF_CM_FUNCNAME_VALIDATE("setIsMultiPart"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + insertBool(MessageHeaders::_sMULTIPART, isMultiPart); +} + +void CCafMessageHeadersWriter::setProtocol( + const std::string& protocol) { + CAF_CM_FUNCNAME_VALIDATE("setProtocol"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(protocol); + + insertString(MessageHeaders::_sPROTOCOL_TYPE, protocol); +} + +void CCafMessageHeadersWriter::setProtocolAddress( + const std::string& protocolAddress) { + CAF_CM_FUNCNAME_VALIDATE("setProtocolAddress"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(protocolAddress); + + insertString(MessageHeaders::_sPROTOCOL_CONNSTR, protocolAddress); +} + +void CCafMessageHeadersWriter::setFlowDirection( + const std::string& flowDirection) { + CAF_CM_FUNCNAME_VALIDATE("setFlowDirection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(flowDirection); + + insertString("cafcomm.internal.msgflow", flowDirection); +} + +void CCafMessageHeadersWriter::insertString( + const std::string& key, + const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("insertString"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_VALIDATE_STRING(value); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createString(value), SmartPtrICafObject()))); +} + +void CCafMessageHeadersWriter::insertBool( + const std::string& key, + const bool& value) { + CAF_CM_FUNCNAME_VALIDATE("insertBool"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createBool(value), SmartPtrICafObject()))); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayload.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayload.cpp new file mode 100644 index 000000000..68109ac36 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayload.cpp @@ -0,0 +1,197 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/ResponseDoc/CEventKeyCollectionDoc.h" +#include "Doc/ResponseDoc/CEventKeyDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Integration/Caf/CCafMessagePayload.h" +#include "Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.h" +#include "Doc/DocXml/ResponseXml/ManifestXml.h" +#include "Doc/DocXml/ResponseXml/EventKeyCollectionXml.h" + +using namespace Caf; + +SmartPtrCCafMessagePayload CCafMessagePayload::create( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "create"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + SmartPtrCCafMessagePayload rc; + rc.CreateInstance(); + rc->initialize(payload, payloadType); + + return rc; +} + +SmartPtrCCafMessagePayload CCafMessagePayload::createFromFile( + const std::string& payloadFile, + const std::string& payloadType) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "createFromFile"); + CAF_CM_VALIDATE_STRING(payloadFile); + + const SmartPtrCDynamicByteArray payload = + FileSystemUtils::loadByteFile(payloadFile); + + return create(payload, payloadType); +} + +SmartPtrCCafMessagePayload CCafMessagePayload::createFromStr( + const std::string& payloadStr, + const std::string& payloadType) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "createFromStr"); + CAF_CM_VALIDATE_STRING(payloadStr); + + SmartPtrCDynamicByteArray payload = createBufferFromStr(payloadStr); + + SmartPtrCCafMessagePayload rc; + rc.CreateInstance(); + rc->initialize(payload, payloadType); + + return rc; +} + +SmartPtrCDynamicByteArray CCafMessagePayload::createBufferFromStr( + const std::string& payloadStr) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "createBufferFromStr"); + CAF_CM_VALIDATE_STRING(payloadStr); + + SmartPtrCDynamicByteArray rc; + rc.CreateInstance(); + rc->allocateBytes(static_cast(payloadStr.length())); + rc->memCpy(payloadStr.c_str(), static_cast(payloadStr.length())); + + return rc; +} + +SmartPtrCDynamicByteArray CCafMessagePayload::createBufferFromFile( + const std::string& payloadFile) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "createBufferFromFile"); + CAF_CM_VALIDATE_STRING(payloadFile); + + return FileSystemUtils::loadByteFile(payloadFile); +} + +void CCafMessagePayload::saveToFile( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadPath) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "saveToFile"); + CAF_CM_VALIDATE_SMARTPTR(payload); + CAF_CM_VALIDATE_STRING(payloadPath); + + FileSystemUtils::saveByteFile(payloadPath, + payload->getPtr(), payload->getByteCount()); +} + +std::string CCafMessagePayload::saveToStr( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayload", "saveToStr"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return reinterpret_cast(payload->getPtr()); +} + +CCafMessagePayload::CCafMessagePayload(void) : + _isInitialized(false), + CAF_CM_INIT("CCafMessagePayload") { +} + +CCafMessagePayload::~CCafMessagePayload(void) { +} + +void CCafMessagePayload::initialize( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType, + const std::string& encoding) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payload); + CAF_CM_VALIDATE_STRING(encoding); + CAF_CM_VALIDATE_BOOL(encoding.compare("xml") == 0); + + _payload = payload; + _encoding = encoding; + _payloadStr = saveToStr(payload); + _payloadXml = CXmlUtils::parseString(_payloadStr, payloadType); + + _isInitialized = true; +} + +std::string CCafMessagePayload::getPayloadStr() const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _payloadStr; +} + +SmartPtrCDynamicByteArray CCafMessagePayload::getPayload() const { + CAF_CM_FUNCNAME_VALIDATE("getPayload"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _payload; +} + +std::string CCafMessagePayload::getVersion() const { + CAF_CM_FUNCNAME_VALIDATE("getVersion"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCXmlElement headerXml = _payloadXml->findOptionalChild("requestHeader"); + if (headerXml.IsNull()) { + headerXml = _payloadXml->findOptionalChild("responseHeader"); + } + + std::string rc; + if (headerXml.IsNull()) { + rc = _payloadXml->findRequiredAttribute("version"); + } else { + rc = headerXml->findRequiredAttribute("version"); + } + + return rc; +} + +SmartPtrCRequestHeaderDoc CCafMessagePayload::getRequestHeader() const { + CAF_CM_FUNCNAME_VALIDATE("getRequestHeader"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCXmlElement requestHeaderXml = + _payloadXml->findRequiredChild("requestHeader"); + return RequestHeaderXml::parse(requestHeaderXml); +} + +SmartPtrCManifestDoc CCafMessagePayload::getManifest() const { + CAF_CM_FUNCNAME_VALIDATE("getManifest"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCXmlElement manifestXml = + _payloadXml->findRequiredChild("manifest"); + + return ManifestXml::parse(manifestXml); +} + +std::deque CCafMessagePayload::getEventKeyCollection() const { + CAF_CM_FUNCNAME_VALIDATE("getEventKeyCollection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::deque rc; + + SmartPtrCXmlElement eventKeyCollectionXml = + _payloadXml->findOptionalChild("eventKeyCollection"); + if (eventKeyCollectionXml) { + const SmartPtrCEventKeyCollectionDoc eventKeyCollection = + EventKeyCollectionXml::parse(eventKeyCollectionXml); + + rc = eventKeyCollection->getEventKey(); + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp new file mode 100644 index 000000000..7e6af45d4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp @@ -0,0 +1,103 @@ +/* + * Author: bwilliams + * Created: Jul 2009 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h" +#include "Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.h" +#include "Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h" +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h" + +#include "Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h" +#include "Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h" +#include "Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.h" + +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallRequestDoc.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" + +using namespace Caf; + +SmartPtrCPayloadEnvelopeDoc CCafMessagePayloadParser::getPayloadEnvelope( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getPayloadEnvelope"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return PayloadEnvelopeXml::parse(bufferToXml(payload, "caf:payloadEnvelope")); +} + +SmartPtrCInstallProviderJobDoc CCafMessagePayloadParser::getInstallProviderJob( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getInstallProviderJob"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return InstallProviderJobXml::parse(bufferToXml(payload, "caf:cafInstallProviderJob")); +} + +SmartPtrCUninstallProviderJobDoc CCafMessagePayloadParser::getUninstallProviderJob( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getUninstallProviderJob"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return UninstallProviderJobXml::parse(bufferToXml(payload, "caf:cafUninstallProviderJob")); +} + +SmartPtrCProviderRequestDoc CCafMessagePayloadParser::getProviderRequest( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getProviderRequest"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return XmlRoots::parseProviderRequestFromString(bufferToStr(payload)); +} + +SmartPtrCProviderRegDoc CCafMessagePayloadParser::getProviderReg( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getProviderReg"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return XmlRoots::parseProviderRegFromString(bufferToStr(payload)); +} + +SmartPtrCInstallRequestDoc CCafMessagePayloadParser::getInstallRequest( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getInstallRequest"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return XmlRoots::parseInstallRequestFromString(bufferToStr(payload)); +} + +SmartPtrCMgmtRequestDoc CCafMessagePayloadParser::getMgmtRequest( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "getMgmtRequest"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return XmlRoots::parseMgmtRequestFromString(bufferToStr(payload)); +} + +SmartPtrCXmlElement CCafMessagePayloadParser::bufferToXml( + const SmartPtrCDynamicByteArray& payload, + const std::string& payloadType) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "bufferToXml"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return CXmlUtils::parseString(bufferToStr(payload), payloadType); +} + +std::string CCafMessagePayloadParser::bufferToStr( + const SmartPtrCDynamicByteArray& payload) { + CAF_CM_STATIC_FUNC_VALIDATE("CCafMessagePayloadParser", "bufferToStr"); + CAF_CM_VALIDATE_SMARTPTR(payload); + + return reinterpret_cast(payload->getPtr()); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/stdafx.h new file mode 100644 index 000000000..9d98d4e95 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Caf/stdafx.h @@ -0,0 +1,21 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define INTEGRATIONCAF_LINKAGE __declspec(dllexport) +#else + #define INTEGRATIONCAF_LINKAGE +#endif + +#include +#include +#include + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageChannel.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageChannel.cpp new file mode 100644 index 000000000..f6b54c4e6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageChannel.cpp @@ -0,0 +1,69 @@ +/* + * Created on: Jan 26, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IChannelInterceptor.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/Core/CAbstractMessageChannel.h" + +CAbstractMessageChannel::CAbstractMessageChannel() : + CAF_CM_INIT("CAbstractMessageChannel") { +} + +CAbstractMessageChannel::~CAbstractMessageChannel() { +} + +bool CAbstractMessageChannel::send( + const SmartPtrIIntMessage& message) { + return send(message, -1); +} + +bool CAbstractMessageChannel::send( + const SmartPtrIIntMessage& message, + const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_VALIDATE_INTERFACE(message); + + // Call all interceptors' preSend() + SmartPtrIIntMessage intMessage = message; + SmartPtrIMessageChannel channel(this); + for (TSmartIterator > interceptor(_interceptors); + interceptor; + interceptor++) { + intMessage = interceptor->preSend(intMessage, channel); + if (!intMessage) { + break; + } + } + + // If an interceptor returned NULL then we're done + bool sent = false; + if (intMessage) { + // Send the message through the subclass doSend() + sent = doSend(intMessage, timeout); + + // Call the interceptors' postSend() + for (TSmartIterator > interceptor(_interceptors); + interceptor; + interceptor++) { + interceptor->postSend(intMessage, channel, sent); + } + } + + return sent; +} + +void CAbstractMessageChannel::setInterceptors( + const IChannelInterceptorSupport::InterceptorCollection& interceptors) { + _interceptors = interceptors; +} + +std::list CAbstractMessageChannel::getInterceptors() const { + return _interceptors; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageRouter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageRouter.cpp new file mode 100644 index 000000000..04714daa8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractMessageRouter.cpp @@ -0,0 +1,96 @@ +/* + * Created on: Aug 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/Core/CIntException.h" +#include "Exception/CCafException.h" +#include "Integration/Core/CAbstractMessageRouter.h" + +using namespace Caf; + +CAbstractMessageRouter::CAbstractMessageRouter() : + _ignoreSendFailures(false), + _sendTimeout(-1), + _isInitialized(false), + CAF_CM_INIT_LOG("CAbstractMessageRouter") { +} + +CAbstractMessageRouter::~CAbstractMessageRouter() { +} + +void CAbstractMessageRouter::init() { + init(SmartPtrIMessageChannel(), false, -1); +} + +void CAbstractMessageRouter::init( + const SmartPtrIMessageChannel& defaultOutputChannel, + const bool ignoreSendFailures, + const int32 sendTimeout) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + // defaultOutputChannel may be NULL + + _defaultOutputChannel = defaultOutputChannel; + _ignoreSendFailures = ignoreSendFailures; + _sendTimeout = sendTimeout; + _isInitialized = true; +} + +void CAbstractMessageRouter::routeMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("routeMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + bool isSent = false; + + ChannelCollection channels; + try { + channels = getTargetChannels(message); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + for (TSmartConstIterator channelIter(channels); + channelIter; + channelIter++) { + try { + SmartPtrIMessageChannel channel(*channelIter); + CAF_CM_VALIDATE_INTERFACE(channel); + channel->send(message, _sendTimeout); + isSent = true; + } + CAF_CM_CATCH_ALL; + if (CAF_CM_ISEXCEPTION && _ignoreSendFailures) { + CAF_CM_LOG_DEBUG_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + CAF_CM_THROWEXCEPTION; + } + + if (!isSent) { + if (_defaultOutputChannel) { + _defaultOutputChannel->send(message, _sendTimeout); + } else { + if (channels.size()) { + CAF_CM_EXCEPTIONEX_VA0( + MessageDeliveryException, + 0, + "failed to send message to resolved channel(s) " + "and no default output channel defined"); + } else { + CAF_CM_EXCEPTIONEX_VA0( + MessageDeliveryException, + 0, + "no channel resolved by router and no default " + "output channel defined"); + } + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractPollableChannel.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractPollableChannel.cpp new file mode 100644 index 000000000..a798b8753 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CAbstractPollableChannel.cpp @@ -0,0 +1,88 @@ +/* + * Created on: Jan 26, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Dependencies/CPollerMetadata.h" +#include "Integration/IChannelInterceptor.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/Core/CAbstractPollableChannel.h" + +CAbstractPollableChannel::CAbstractPollableChannel() : + CAF_CM_INIT("CAbstractPollableChannel") { +} + +CAbstractPollableChannel::~CAbstractPollableChannel() { +} + +SmartPtrIIntMessage CAbstractPollableChannel::receive() { + return receive(0); +} + +SmartPtrIIntMessage CAbstractPollableChannel::receive(const int32 timeout) { + SmartPtrIIntMessage message; + CAF_CM_ENTER { + std::list interceptors = getInterceptors(); + SmartPtrIMessageChannel channel(this); + bool preReceiveOk = true; + for (TSmartIterator > interceptor(interceptors); + interceptor && preReceiveOk; + interceptor++) { + preReceiveOk = interceptor->preReceive(channel); + } + + if (preReceiveOk) { + message = doReceive(timeout); + for (TSmartIterator > interceptor(interceptors); + interceptor && message; + interceptor++) { + message = interceptor->postReceive(message, channel); + } + } + } + CAF_CM_EXIT; + return message; +} + +SmartPtrCPollerMetadata CAbstractPollableChannel::getPollerMetadata() const { + CAF_CM_FUNCNAME_VALIDATE("getPollerMetadata"); + CAF_CM_VALIDATE_SMARTPTR(_pollerMetadata); + return _pollerMetadata; +} + +void CAbstractPollableChannel::setPollerMetadata(const SmartPtrCPollerMetadata& pollerMetadata) { + CAF_CM_FUNCNAME_VALIDATE("setPollerMetadata"); + CAF_CM_VALIDATE_SMARTPTR(pollerMetadata); + _pollerMetadata = pollerMetadata; +} + +void CAbstractPollableChannel::setPollerMetadata(const SmartPtrIDocument& pollerDoc) { + // pollerDoc is optional + + CAF_CM_ENTER { + _pollerMetadata.CreateInstance(); + _pollerMetadata->putFixedRate(1000); + _pollerMetadata->putMaxMessagesPerPoll(1); + + if (pollerDoc) { + const std::string maxMessagesPerPollStr = pollerDoc->findOptionalAttribute("max-messages-per-poll"); + if (!maxMessagesPerPollStr.empty()) { + const uint32 maxMessagesPerPoll = CStringConv::fromString(maxMessagesPerPollStr); + _pollerMetadata->putMaxMessagesPerPoll(maxMessagesPerPoll); + } + + const std::string fixedRateStr = pollerDoc->findOptionalAttribute("fixed-rate"); + if (!fixedRateStr.empty()) { + const uint32 fixedRate = CStringConv::fromString(fixedRateStr); + _pollerMetadata->putFixedRate(fixedRate); + } + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CBroadcastingDispatcher.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CBroadcastingDispatcher.cpp new file mode 100644 index 000000000..fef2ce0d3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CBroadcastingDispatcher.cpp @@ -0,0 +1,133 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Core/CIntException.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageHandler.h" +#include "Integration/Core/CBroadcastingDispatcher.h" + +using namespace Caf; + +CBroadcastingDispatcher::CBroadcastingDispatcher() : + _isInitialized(false), + CAF_CM_INIT_LOG("CBroadcastingDispatcher") { +} + +CBroadcastingDispatcher::~CBroadcastingDispatcher() { +} + +void CBroadcastingDispatcher::initialize( + const SmartPtrIErrorHandler& errorHandler) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(errorHandler); + + _errorHandler = errorHandler; + _messageHandlerCollection.CreateInstance(); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CBroadcastingDispatcher::addHandler( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("addHandler"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + const void* handlerPtr = messageHandler.GetNonAddRefedInterface(); + _messageHandlerCollection->insert(std::make_pair(handlerPtr, messageHandler)); + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Added handler - %llX", handlerPtr); +#else + CAF_CM_LOG_DEBUG_VA1("Added handler - %X", handlerPtr); +#endif + } + CAF_CM_EXIT; +} + +void CBroadcastingDispatcher::removeHandler( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("removeHandler"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + const void* handlerPtr = messageHandler.GetNonAddRefedInterface(); + _messageHandlerCollection->erase(handlerPtr); + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Removed handler - %llX", handlerPtr); +#else + CAF_CM_LOG_DEBUG_VA1("Removed handler - %X", handlerPtr); +#endif + } + CAF_CM_EXIT; +} + +bool CBroadcastingDispatcher::dispatch( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("dispatch"); + + bool isMessageHandled = false; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + for (TSmartConstMapIterator messageHandlerIter(*_messageHandlerCollection); + messageHandlerIter; messageHandlerIter++) { + const SmartPtrIMessageHandler messageHandler = *messageHandlerIter; + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Dispatching to handler - %llX", messageHandlerIter.getKey()); +#else + CAF_CM_LOG_DEBUG_VA1("Dispatching to handler - %X", messageHandlerIter.getKey()); +#endif + + try { + messageHandler->handleMessage(message); + isMessageHandled = true; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + try { + if (CAF_CM_ISEXCEPTION) { + CAF_CM_VALIDATE_INTERFACE(messageHandler); + SmartPtrIIntMessage savedMessage = messageHandler->getSavedMessage(); + if (savedMessage.IsNull()) { + savedMessage = message; + } + + SmartPtrCIntException intException; + intException.CreateInstance(); + intException->initialize(CAF_CM_GETEXCEPTION); + _errorHandler->handleError(intException, savedMessage); + + CAF_CM_CLEAREXCEPTION; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + } + CAF_CM_EXIT; + + return isMessageHandled; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp new file mode 100644 index 000000000..1162ca1da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp @@ -0,0 +1,41 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/Core/CChannelInterceptorAdapter.h" + +CChannelInterceptorAdapter::CChannelInterceptorAdapter() { +} + +CChannelInterceptorAdapter::~CChannelInterceptorAdapter() { +} + +SmartPtrIIntMessage& CChannelInterceptorAdapter::preSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel&) { + return message; +} + +void CChannelInterceptorAdapter::postSend( + SmartPtrIIntMessage&, + SmartPtrIMessageChannel&, + bool) { +} + +bool CChannelInterceptorAdapter::preReceive( + SmartPtrIMessageChannel&) { + return true; +} + +SmartPtrIIntMessage& CChannelInterceptorAdapter::postReceive( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel&) { + return message; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelResolver.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelResolver.cpp new file mode 100644 index 000000000..c3f0c65a5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CChannelResolver.cpp @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageChannel.h" +#include "Integration/Core/CChannelResolver.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CChannelResolver::CChannelResolver() : + _isInitialized(false), + CAF_CM_INIT("CChannelResolver") { +} + +CChannelResolver::~CChannelResolver() { +} + +void CChannelResolver::initialize( + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTSTL_NOTEMPTY(integrationObjectCollection); + + _integrationObjectCollection = integrationObjectCollection; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +SmartPtrIMessageChannel CChannelResolver::resolveChannelName( + const std::string& channelName) const { + CAF_CM_FUNCNAME("resolveChannelName"); + + SmartPtrIMessageChannel messageChannel; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(channelName); + + const SmartPtrIIntegrationObject integrationObject = + resolveChannelNameToObject(channelName); + + messageChannel.QueryInterface(integrationObject, false); + if (messageChannel.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Integration object is not a message channel - %s", channelName.c_str()); + } + } + CAF_CM_EXIT; + + return messageChannel; +} + +SmartPtrIIntegrationObject CChannelResolver::resolveChannelNameToObject( + const std::string& channelName) const { + CAF_CM_FUNCNAME("resolveChannelNameToObject"); + + SmartPtrIIntegrationObject integrationObject; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(channelName); + + const CIntegrationObjectCollection::const_iterator integrationObjectCollectionIter = + _integrationObjectCollection->find(channelName); + if (integrationObjectCollectionIter == _integrationObjectCollection->end()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Bean with given ID not found - %s", channelName.c_str()); + } + + integrationObject = integrationObjectCollectionIter->second; + } + CAF_CM_EXIT; + + return integrationObject; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CDocument.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CDocument.cpp new file mode 100644 index 000000000..238a3c11a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CDocument.cpp @@ -0,0 +1,298 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Integration/Core/CDocument.h" +#include "Common/IAppConfig.h" + +using namespace Caf; + +CDocument::CDocument() : + _isInitialized(false), + CAF_CM_INIT("CDocument") { +} + +CDocument::~CDocument() { +} + +void CDocument::initialize( + const SmartPtrCXmlElement& xmlElement) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(xmlElement); + + _xmlElement = xmlElement; + + // iterate over all attributes and resolve the attribute values + // for environment and appConfig value references + SmartPtrIAppConfig appConfig = getAppConfig(); + std::deque stack; + stack.push_back(_xmlElement); + while (stack.size()) { + SmartPtrCXmlElement element = stack.front(); + stack.pop_front(); + CXmlElement::SmartPtrCAttributeCollection attributes = element->getAllAttributes(); + for (TConstMapIterator attribute(*attributes); + attribute; + attribute++) { + element->setAttribute( + attribute.getKey(), + appConfig->resolveValue(*attribute)); + } + CXmlElement::SmartPtrCElementCollection children = element->getAllChildren(); + std::transform( + children->begin(), + children->end(), + std::insert_iterator >(stack, stack.end()), + select2nd()); + } + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +SmartPtrCXmlElement CDocument::getXmlElement() const { + CAF_CM_FUNCNAME_VALIDATE("getXmlElement"); + + SmartPtrCXmlElement rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement; + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::findRequiredAttribute(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findRequiredAttribute"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->findRequiredAttribute(name); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::findOptionalAttribute(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalAttribute"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->findOptionalAttribute(name); + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrIDocument CDocument::findRequiredChild(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findRequiredChild"); + + SmartPtrIDocument rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + const SmartPtrCXmlElement child = _xmlElement->findRequiredChild(name); + + SmartPtrCDocument document; + document.CreateInstance(); + document->initialize(child); + + rc = document; + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrIDocument CDocument::findOptionalChild(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalChild"); + + SmartPtrIDocument rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + const SmartPtrCXmlElement child = _xmlElement->findOptionalChild(name); + if (! child.IsNull()) { + SmartPtrCDocument document; + document.CreateInstance(); + document->initialize(child); + + rc = document; + } + } + CAF_CM_EXIT; + + return rc; +} + +IDocument::SmartPtrCAttributeCollection CDocument::getAllAttributes() const { + CAF_CM_FUNCNAME_VALIDATE("getAllAttributes"); + + IDocument::SmartPtrCAttributeCollection rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc.CreateInstance(); + + const CXmlElement::SmartPtrCAttributeCollection attributesXml = + _xmlElement->getAllAttributes(); + for (TConstIterator attributeXmlIter(*attributesXml); + attributeXmlIter; attributeXmlIter++) { + rc->insert(std::make_pair(attributeXmlIter->first, attributeXmlIter->second)); + } + } + CAF_CM_EXIT; + + return rc; +} + +IDocument::SmartPtrCChildCollection CDocument::getAllChildren() const { + CAF_CM_FUNCNAME_VALIDATE("getAllChildren"); + + IDocument::SmartPtrCChildCollection rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc.CreateInstance(); + + const CXmlElement::SmartPtrCElementCollection childrenXml = + _xmlElement->getAllChildren(); + for (TConstIterator childXmlIter(*childrenXml); + childXmlIter; childXmlIter++) { + SmartPtrCDocument document; + document.CreateInstance(); + document->initialize(childXmlIter->second); + + rc->insert(std::make_pair(childXmlIter->first, document)); + } + } + CAF_CM_EXIT; + + return rc; +} + +IDocument::SmartPtrCOrderedChildCollection CDocument::getAllChildrenInOrder() const { + CAF_CM_FUNCNAME_VALIDATE("getAllChildrenInOrder"); + + IDocument::SmartPtrCOrderedChildCollection rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc.CreateInstance(); + + const CXmlElement::SmartPtrCOrderedElementCollection childrenXml = + _xmlElement->getAllChildrenInOrder(); + for (TConstIterator childXmlIter(*childrenXml); + childXmlIter; childXmlIter++) { + SmartPtrCDocument document; + document.CreateInstance(); + document->initialize(*childXmlIter); + rc->push_back(document); + } + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::getName() const { + CAF_CM_FUNCNAME_VALIDATE("getName"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->getName(); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::getValue() const { + CAF_CM_FUNCNAME_VALIDATE("getValue"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->getValue(); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::getPath() const { + CAF_CM_FUNCNAME_VALIDATE("getPath"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->getPath(); + } + CAF_CM_EXIT; + + return rc; +} + +void CDocument::saveToFile(const std::string& filename) const { + CAF_CM_FUNCNAME_VALIDATE("saveToFile"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _xmlElement->saveToFile(filename); + } + CAF_CM_EXIT; +} + +std::string CDocument::saveToString() const { + CAF_CM_FUNCNAME_VALIDATE("saveToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->saveToString(); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CDocument::saveToStringRaw() const { + CAF_CM_FUNCNAME_VALIDATE("saveToStringRaw"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _xmlElement->saveToStringRaw(); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CErrorHandler.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CErrorHandler.cpp new file mode 100644 index 000000000..1520718fc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CErrorHandler.cpp @@ -0,0 +1,95 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Core/CIntMessage.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IThrowable.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/Core/CIntMessageHeaders.h" +#include "Integration/Core/MessageHeaders.h" + +using namespace Caf; + +CErrorHandler::CErrorHandler() : + _isInitialized(false), + CAF_CM_INIT_LOG("CErrorHandler") { +} + +CErrorHandler::~CErrorHandler() { +} + +void CErrorHandler::initialize( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrIMessageChannel& errorMessageChannel) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + CAF_CM_VALIDATE_INTERFACE(errorMessageChannel); + + _channelResolver = channelResolver; + _errorMessageChannel = errorMessageChannel; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CErrorHandler::handleError( + const SmartPtrIThrowable& throwable, + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME_VALIDATE("handleError"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(throwable); + // message is optional + + bool isThrowable = false; + if (! message.IsNull()) { + const std::string isThrowableStr = + message->findOptionalHeaderAsString(MessageHeaders::_sIS_THROWABLE); + isThrowable = + (isThrowableStr.empty() || (isThrowableStr.compare("false") == 0)) ? false : true; + } + + if (isThrowable) { + CAF_CM_LOG_ERROR_VA2("Error already handled - MsgErr: %s, Thrown: %s", + message->getPayloadStr().c_str(), throwable->getFullMsg().c_str()); + } else { + CIntMessageHeaders messageHeaders; + messageHeaders.insertString(MessageHeaders::_sIS_THROWABLE, "true"); + + const IIntMessage::SmartPtrCHeaders origHeaders = + message.IsNull() ? IIntMessage::SmartPtrCHeaders() : message->getHeaders(); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(throwable->getFullMsg(), + messageHeaders.getHeaders(), origHeaders); + + const SmartPtrIIntMessage newMessage = messageImpl; + + const std::string errorChannelRef = + newMessage->findOptionalHeaderAsString(MessageHeaders::_sERROR_CHANNEL); + + SmartPtrIMessageChannel errorMessageChannel = _errorMessageChannel; + if (! errorChannelRef.empty()) { + CAF_CM_LOG_INFO_VA1("Using alternate error channel - %s", errorChannelRef.c_str()); + errorMessageChannel = _channelResolver->resolveChannelName(errorChannelRef); + } + + errorMessageChannel->send(newMessage); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CExpressionHandler.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CExpressionHandler.cpp new file mode 100644 index 000000000..7d8dd089a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CExpressionHandler.cpp @@ -0,0 +1,136 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppConfig.h" +#include "Common/IAppContext.h" +#include "IBean.h" +#include "IVariant.h" +#include "Integration/Core/CExpressionHandler.h" +#include "Common/CCafRegex.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CExpressionHandler::CExpressionHandler() : + _isInitialized(false), + CAF_CM_INIT("CExpressionHandler") { +} + +CExpressionHandler::~CExpressionHandler() { +} + +void CExpressionHandler::init( + const SmartPtrIAppConfig& appConfig, + const SmartPtrIAppContext& appContext, + const std::string& expression) { + CAF_CM_FUNCNAME("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appConfig); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_STRING(expression); + + CCafRegex regex; + regex.initialize("\\@(\\w+)\\.(\\w+)\\((.*)\\)"); + if (!regex.isMatched(expression)) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Invalid expression syntax '%s'", + expression.c_str()); + } + _beanName = regex.match(expression, 1); + _methodName = regex.match(expression, 2); + if (!_beanName.length() || !_methodName.length()) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Invalid expression syntax '%s'", + expression.c_str()); + } + + SmartPtrIBean bean = appContext->getBean(_beanName); + _invoker.QueryInterface(bean, false); + if (!_invoker) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "bean '%s' does not support the IExpressionInvoker interface", + _beanName.c_str()); + } + + const std::string paramSubstr = regex.match(expression, 3); + Cdeqstr paramExprs = CStringUtils::split(paramSubstr, ','); + CCafRegex regexLiteral; + regexLiteral.initialize("'(.*)'"); + for (TConstIterator paramExpr(paramExprs); paramExpr; paramExpr++) { + std::string trimmedExpr = CStringUtils::trim(*paramExpr); + if (regexLiteral.isMatched(trimmedExpr)) { + std::string val = regexLiteral.match(trimmedExpr, 1); + if (val.length()) { + _methodParams.push_back(appConfig->resolveValue(val)); + } else { + _methodParams.push_back(""); + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Invalid expression syntax '%s'", + expression.c_str()); + } + } + _isInitialized = true; +} + +SmartPtrIVariant CExpressionHandler::evaluate(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("evaluate"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _invoker->invokeExpression(_methodName, _methodParams, message); +} + +std::string CExpressionHandler::getBeanName() const { + CAF_CM_FUNCNAME_VALIDATE("getBeanName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _beanName; +} + +std::string CExpressionHandler::getMethodName() const { + CAF_CM_FUNCNAME_VALIDATE("getMethodName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _methodName; +} + +Cdeqstr CExpressionHandler::getMethodParameters() const { + CAF_CM_FUNCNAME_VALIDATE("getMethodParameters"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _methodParams; +} + +std::string CExpressionHandler::toString() const { + std::stringstream result; + result + << "invoke @" + << _beanName + << '.' + << _methodName + << '('; + bool first = true; + for (TConstIterator param(_methodParams); param; param++) { + if (!first) { + result << ", "; + } + result + << '\'' + << *param + << '\''; + first = false; + } + result << ')'; + return result.str(); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntException.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntException.cpp new file mode 100644 index 000000000..08e858579 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntException.cpp @@ -0,0 +1,95 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Integration/Core/CIntException.h" + +#define CAF_CM_DEFINE_INTEGRATION_EXCEPTION_CLASS(_exclass_) \ + _exclass_::_exclass_() : CCafException( #_exclass_ ) {} \ + _exclass_::~_exclass_() {} \ + void _exclass_::throwSelf() { throw this; } + +using namespace Caf; + +CAF_CM_DEFINE_INTEGRATION_EXCEPTION_CLASS(FatalListenerStartupException) +CAF_CM_DEFINE_INTEGRATION_EXCEPTION_CLASS(ListenerExecutionFailedException) +CAF_CM_DEFINE_INTEGRATION_EXCEPTION_CLASS(MessageDeliveryException) + +CIntException::CIntException() : + _isInitialized(false), + _errorCode(0), + _backtrace(NULL), + CAF_CM_INIT("CIntException") { +} + +CIntException::~CIntException() { +} + +void CIntException::initialize(const CCafException* cafException) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(cafException); + + _exceptionClassName = cafException->getExceptionClassName(); + _message = cafException->getMsg(); + _className = cafException->getClassName(); + _funcName = cafException->getFuncName(); + _errorCode = cafException->getError(); + _backtrace = cafException->getBacktrace(); + _fullMsg = cafException->getFullMsg(); + + _isInitialized = true; +} + +std::string CIntException::getExceptionClassName() const { + CAF_CM_FUNCNAME_VALIDATE("getExceptionClassName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _exceptionClassName; +} + +std::string CIntException::getMsg() const { + CAF_CM_FUNCNAME_VALIDATE("getMsg"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _message; +} + +std::string CIntException::getClassName() const { + CAF_CM_FUNCNAME_VALIDATE("getClassName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _className; +} + +std::string CIntException::getFuncName() const { + CAF_CM_FUNCNAME_VALIDATE("getFuncName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _funcName; +} + +HRESULT CIntException::getError() const { + CAF_CM_FUNCNAME_VALIDATE("getError"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _errorCode; +} + +std::deque* CIntException::getBacktrace() const { + CAF_CM_FUNCNAME_VALIDATE("getBacktrace"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _backtrace; +} + +std::string CIntException::getFullMsg() const { + CAF_CM_FUNCNAME_VALIDATE("getFullMsg"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _fullMsg; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessage.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessage.cpp new file mode 100644 index 000000000..b784cd9e6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessage.cpp @@ -0,0 +1,240 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "ICafObject.h" +#include "IVariant.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Integration/Core/CIntMessage.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CIntMessage::CIntMessage() : + _isInitialized(false), + _messageId(CAFCOMMON_GUID_NULL), + CAF_CM_INIT("CIntMessage") { +} + +CIntMessage::~CIntMessage() { +} + +CIntMessage::SmartPtrCHeaders CIntMessage::mergeHeaders( + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders) { + CIntMessage::SmartPtrCHeaders headers; + headers.CreateInstance(); + + if (newHeaders) { + std::copy( + newHeaders->begin(), + newHeaders->end(), + std::inserter( + *headers, + headers->end())); + } + if (origHeaders) { + std::copy( + origHeaders->begin(), + origHeaders->end(), + std::inserter( + *headers, + headers->end())); + } + + return headers; +} + +void CIntMessage::initializeStr( + const std::string& payloadStr, + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders) { + CAF_CM_FUNCNAME_VALIDATE("initializeStr"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + std::string payloadStrTmp = payloadStr; + if (payloadStr.empty()) { + payloadStrTmp = ""; + } + + SmartPtrCDynamicByteArray payload; + payload.CreateInstance(); + payload->allocateBytes(payloadStrTmp.length()); + payload->memCpy(payloadStrTmp.c_str(), payloadStrTmp.length()); + + initialize(payload, newHeaders, origHeaders); +} + +void CIntMessage::initialize( + const SmartPtrCDynamicByteArray& payload, + const SmartPtrCHeaders& newHeaders, + const SmartPtrCHeaders& origHeaders) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + // payload is optional + // newHeaders are optional + // origHeaders are optional + + _payload = payload; + ::UuidCreate(&_messageId); + + _headers = mergeHeaders(newHeaders, origHeaders); + + IIntMessage::CHeaders::iterator header = _headers->find(MessageHeaders::_sID); + if (_headers->end() == header) { + _headers->insert(std::make_pair(MessageHeaders::_sID, + std::make_pair(CVariant::createString(CStringUtils::createRandomUuid()), SmartPtrICafObject()))); + } + header = _headers->find(MessageHeaders::_sTIMESTAMP); + if (_headers->end() == header) { + _headers->insert(std::make_pair(MessageHeaders::_sTIMESTAMP, + std::make_pair(CVariant::createUint64(CDateTimeUtils::getTimeMs()), SmartPtrICafObject()))); + } + _isInitialized = true; + } + CAF_CM_EXIT; +} + +SmartPtrCDynamicByteArray CIntMessage::getPayload() const { + CAF_CM_FUNCNAME_VALIDATE("getPayload"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _payload; +} + +std::string CIntMessage::getPayloadStr() const { + CAF_CM_FUNCNAME_VALIDATE("getPayloadStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return reinterpret_cast(_payload->getPtr()); +} + +UUID CIntMessage::getMessageId() const { + CAF_CM_FUNCNAME_VALIDATE("getMessageId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _messageId; +} + +std::string CIntMessage::getMessageIdStr() const { + CAF_CM_FUNCNAME_VALIDATE("getMessageIdStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return BasePlatform::UuidToString(_messageId); +} + +IIntMessage::SmartPtrCHeaders CIntMessage::getHeaders() const { + CAF_CM_FUNCNAME_VALIDATE("getHeaders"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _headers; +} + +SmartPtrIVariant CIntMessage::findOptionalHeader( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalHeader"); + + SmartPtrIVariant value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter != _headers->end()) { + value = headerIter->second.first; + } + } + CAF_CM_EXIT; + + return value; +} + +SmartPtrIVariant CIntMessage::findRequiredHeader( + const std::string& key) const { + CAF_CM_FUNCNAME("findRequiredHeader"); + + SmartPtrIVariant value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter == _headers->end()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Key not found in headers - %s", key.c_str()); + } + + value = headerIter->second.first; + } + CAF_CM_EXIT; + + return value; +} + +std::string CIntMessage::findOptionalHeaderAsString( + const std::string& key) const { + std::string valueStr; + SmartPtrIVariant value = findOptionalHeader(key); + if (value) { + valueStr = value->toString(); + } + return valueStr; +} + +std::string CIntMessage::findRequiredHeaderAsString( + const std::string& key) const { + std::string valueStr; + SmartPtrIVariant value = findRequiredHeader(key); + if (value) { + valueStr = value->toString(); + } + return valueStr; +} + +SmartPtrICafObject CIntMessage::findOptionalObjectHeader( + const std::string& key) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalObjectHeader"); + + SmartPtrICafObject value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter != _headers->end()) { + value = headerIter->second.second; + } + } + CAF_CM_EXIT; + + return value; +} + +SmartPtrICafObject CIntMessage::findRequiredObjectHeader( + const std::string& key) const { + CAF_CM_FUNCNAME("findRequiredObjectHeader"); + + SmartPtrICafObject value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(key); + + CHeaders::const_iterator headerIter = _headers->find(key); + if (headerIter == _headers->end()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Key not found in headers - %s", key.c_str()); + } + + value = headerIter->second.second; + } + CAF_CM_EXIT; + + return value; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessageHeaders.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessageHeaders.cpp new file mode 100644 index 000000000..75a8ab870 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntMessageHeaders.cpp @@ -0,0 +1,130 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "ICafObject.h" +#include "IVariant.h" +#include "Integration/IIntMessage.h" +#include "Integration/Core/CIntMessageHeaders.h" + +using namespace Caf; + +CIntMessageHeaders::CIntMessageHeaders() : + CAF_CM_INIT("CIntMessageHeaders") { + _headers.CreateInstance(); +} + +CIntMessageHeaders::~CIntMessageHeaders() { +} + +IIntMessage::SmartPtrCHeaders CIntMessageHeaders::getHeaders() const { + return _headers; +} + +void CIntMessageHeaders::clear() { + _headers.CreateInstance(); +} + +void CIntMessageHeaders::insertString( + const std::string& key, + const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("insertString"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_VALIDATE_STRING(value); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createString(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertStringOpt( + const std::string& key, + const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("insertStringOpt"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createString(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertInt64( + const std::string& key, + const int64& value) { + CAF_CM_FUNCNAME_VALIDATE("insertInt64"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createInt64(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertUint64( + const std::string& key, + const uint64& value) { + CAF_CM_FUNCNAME_VALIDATE("insertUint64"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createUint64(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertInt32( + const std::string& key, + const int32& value) { + CAF_CM_FUNCNAME_VALIDATE("insertInt32"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createInt32(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertUint32( + const std::string& key, + const uint32& value) { + CAF_CM_FUNCNAME_VALIDATE("insertUint32"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createUint32(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertInt16( + const std::string& key, + const int16& value) { + CAF_CM_FUNCNAME_VALIDATE("insertInt16"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createInt16(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertUint16( + const std::string& key, + const uint16& value) { + CAF_CM_FUNCNAME_VALIDATE("insertUint16"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createUint16(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertUint8( + const std::string& key, + const uint8& value) { + CAF_CM_FUNCNAME_VALIDATE("insertUint8"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createUint8(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertBool( + const std::string& key, + const bool& value) { + CAF_CM_FUNCNAME_VALIDATE("insertBool"); + CAF_CM_VALIDATE_STRING(key); + _headers->insert(std::make_pair(key, std::make_pair(CVariant::createBool(value), SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertVariant( + const std::string& key, + const SmartPtrIVariant& variant) { + CAF_CM_FUNCNAME_VALIDATE("insertVariant"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_VALIDATE_SMARTPTR(variant); + _headers->insert(std::make_pair(key, std::make_pair(variant, SmartPtrICafObject()))); +} + +void CIntMessageHeaders::insertObject( + const std::string& key, + const SmartPtrICafObject& cafObject) { + CAF_CM_FUNCNAME_VALIDATE("insertObject"); + CAF_CM_VALIDATE_STRING(key); + CAF_CM_VALIDATE_SMARTPTR(cafObject); + _headers->insert(std::make_pair(key, std::make_pair(SmartPtrIVariant(), cafObject))); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntegrationAppContext.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntegrationAppContext.cpp new file mode 100644 index 000000000..2c988f5f0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CIntegrationAppContext.cpp @@ -0,0 +1,701 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IBean.h" +#include "Integration/Core/CChannelResolver.h" +#include "Integration/Core/CDocument.h" +#include "Integration/IChannelInterceptor.h" +#include "Integration/IChannelInterceptorInstance.h" +#include "Integration/IChannelInterceptorSupport.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationAppContext.h" +#include "Integration/IIntegrationAppContextAware.h" +#include "Integration/IIntegrationComponent.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IMessageProducer.h" +#include "Integration/IPhased.h" +#include "Integration/ISmartLifecycle.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Integration/Core/CIntegrationAppContext.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CIntegrationAppContext::CIntegrationAppContext() : + _isInitialized(false), + _isIntegrationObjectCollectionReady(false), + _lifecycleBeansStarted(false), + _timeoutMs(0), + CAF_CM_INIT_LOG("CIntegrationAppContext") { +} + +CIntegrationAppContext::~CIntegrationAppContext() { + if (_weakSelfReference) { + _weakSelfReference->set(NULL); + } +} + +void CIntegrationAppContext::initialize( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + const std::string beanConfigPath = getDefaultBeanConfigPath(); + initializeRaw(timeoutMs, beanConfigPath, true); +} + +void CIntegrationAppContext::initialize( + const uint32 timeoutMs, + const std::string& beanConfigPath) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(beanConfigPath); + + initializeRaw(timeoutMs, beanConfigPath, true); +} + +void CIntegrationAppContext::initializeTwoPhase( + const uint32 timeoutMs, + const std::string& beanConfigPath) { + CAF_CM_FUNCNAME_VALIDATE("initializeTwoPhase"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(beanConfigPath); + + initializeRaw(timeoutMs, beanConfigPath, false); +} + +void CIntegrationAppContext::initializeRaw( + const uint32 timeoutMs, + const std::string& beanConfigPath, + const bool startLifecycleBeans) { + CAF_CM_FUNCNAME("initializeRaw"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(beanConfigPath); + + _timeoutMs = timeoutMs; + + _weakSelfReference.CreateInstance(); + _weakSelfReference->set(this); + + const Cdeqstr beanConfigPathCollection = + getBeanConfigFiles(beanConfigPath); + + _applicationContext.CreateInstance(); + _applicationContext->initialize(beanConfigPathCollection); + const IAppContext::SmartPtrCBeans contextBeans = + _applicationContext->getBeans(); + + _integrationObjectCollection = assign(contextBeans, beanConfigPathCollection); + + // Set context aware objects' appContext reference + for (TSmartConstMapIterator object(*_integrationObjectCollection); + object; + object++) { + SmartPtrIIntegrationAppContextAware contextAwareObj; + contextAwareObj.QueryInterface(*object, false); + if (contextAwareObj) { + contextAwareObj->setIntegrationAppContext(_weakSelfReference); + } + } + + // Inject channel interceptors + injectChannelInterceptors(_integrationObjectCollection); + _isIntegrationObjectCollectionReady = true; + + // Create the channel resolver and wire up the integration objects + SmartPtrCChannelResolver channelResolver; + channelResolver.CreateInstance(); + channelResolver->initialize(_integrationObjectCollection); + _channelResolver = channelResolver; + wire(_applicationContext, _integrationObjectCollection, _channelResolver); + + // Build up the collection of ILifecycle objects and determine + // the startup order. + // + // ISmartLifecycle objects will provide a phase number to state their + // desired relative load order. + // + // ILifecycle objects do not provide phase and will be set to order: + // 0 - non-message producing + // 1 - message producing + for (TSmartConstMapIterator object(*_integrationObjectCollection); + object; + object++) { + SmartPtrILifecycle lifecycleObj; + lifecycleObj.QueryInterface(*object, false); + if (lifecycleObj) { + SmartPtrISmartLifecycle smartLifecycleObj; + smartLifecycleObj.QueryInterface(*object, false); + if (smartLifecycleObj) { + SmartPtrIPhased phasedObj; + phasedObj.QueryInterface(*object, false); + if (phasedObj) { + _lifecycleBeans.insert( + LifecycleBeans::value_type( + phasedObj->getPhase(), + lifecycleObj)); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "ISmartLifecycle object '%s' must also " + "support the IPhased interface.", + object.getKey().c_str()); + } + } else { + SmartPtrIMessageProducer messageProducer; + messageProducer.QueryInterface(*object, false); + _lifecycleBeans.insert( + LifecycleBeans::value_type( + messageProducer && messageProducer->isMessageProducer() ? 1 : 0, + lifecycleObj)); + } + } + } + + if (_lifecycleBeans.size() && CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA0("Lifecycle startup order:"); + for (TSmartConstMultimapIterator lcBean(_lifecycleBeans); + lcBean; + lcBean++) { + SmartPtrIIntegrationObject obj; + obj.QueryInterface(*lcBean); + CAF_CM_LOG_DEBUG_VA2( + " [phase=%d][id=%s]", + lcBean.getKey(), + obj->getId().c_str()); + } + } + + // Start the lifecycle objects + if (startLifecycleBeans) { + _lifecycleBeansStarted = true; + startStop(_lifecycleBeans, _timeoutMs, true); + } + + _isInitialized = true; +} + +void CIntegrationAppContext::startLifecycleBeans() { + CAF_CM_FUNCNAME_VALIDATE("startLifecycleBeans"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_PRECOND_ISNOTINITIALIZED(_lifecycleBeansStarted); + + _lifecycleBeansStarted = true; + startStop(_lifecycleBeans, _timeoutMs, true); +} + +void CIntegrationAppContext::terminate(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("terminate"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_PRECOND_ISINITIALIZED(_lifecycleBeansStarted); + + try { + _weakSelfReference->set(NULL); + startStop(_lifecycleBeans, timeoutMs, false); + _isInitialized = false; + _isIntegrationObjectCollectionReady = false; + _channelResolver = NULL; + _integrationObjectCollection->clear(); + _integrationObjectCollection = NULL; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + try { + _applicationContext->terminate(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + try { + _applicationContext = NULL; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +SmartPtrIIntegrationObject CIntegrationAppContext::getIntegrationObject( + const std::string& id) const { + CAF_CM_FUNCNAME("getIntegrationObject"); + CAF_CM_VALIDATE_STRING(id); + CAF_CM_PRECOND_ISINITIALIZED(_isIntegrationObjectCollectionReady); + + CIntegrationObjectCollection::const_iterator objIter = + _integrationObjectCollection->find(id); + SmartPtrIIntegrationObject object; + if (objIter != _integrationObjectCollection->end()) { + object = objIter->second; + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Integration object [id=%s] is not in the collection", + id.c_str()); + } + + return object; +} + +void CIntegrationAppContext::getIntegrationObject(const IID& iid, void **ppv) const { + CAF_CM_FUNCNAME("getIntegrationObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isIntegrationObjectCollectionReady); + CAF_CM_VALIDATE_PTR(ppv); + + for (TSmartConstMapIterator objIter(*_integrationObjectCollection); + objIter; + objIter++) { + void *result; + (*objIter).QueryInterface(iid, &result); + if (result) { + if (*ppv) { + CAF_CM_EXCEPTIONEX_VA1( + DuplicateElementException, + 0, + "More than one integration object [iid=%s] was found.", + BasePlatform::UuidToString(iid).c_str()); + } else { + *ppv = result; + } + } + } + + if (!*ppv) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Integration object [iid=%s] is not in the collection", + BasePlatform::UuidToString(iid).c_str()); + } +} + +IIntegrationAppContext::SmartPtrCObjectCollection +CIntegrationAppContext::getIntegrationObjects(const IID& iid) const { + CAF_CM_FUNCNAME_VALIDATE("getIntegrationObjects"); + + SmartPtrCObjectCollection collection; + collection.CreateInstance(); + CAF_CM_PRECOND_ISINITIALIZED(_isIntegrationObjectCollectionReady); + for (TSmartMapIterator objIter(*_integrationObjectCollection); + objIter; + objIter++) { + void *result; + (*objIter).QueryInterface(iid, &result); + if (result) { + collection->push_back(*objIter); + objIter->Release(); + } + } + + return collection; +} + +SmartPtrIBean CIntegrationAppContext::getBean(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("getBean"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + return _applicationContext->getBean(name); +} + +SmartPtrIMessageChannel CIntegrationAppContext::resolveChannelName( + const std::string& channelName) const { + CAF_CM_FUNCNAME_VALIDATE("resolveChannelName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(channelName); + + return _channelResolver->resolveChannelName(channelName); +} + +SmartPtrIIntegrationObject CIntegrationAppContext::resolveChannelNameToObject( + const std::string& channelName) const { + CAF_CM_FUNCNAME_VALIDATE("resolveChannelNameToObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(channelName); + + return _channelResolver->resolveChannelNameToObject(channelName); +} + +SmartPtrCIntegrationObjectCollection CIntegrationAppContext::assign( + const IAppContext::SmartPtrCBeans& contextBeans, + const Cdeqstr& beanConfigPathCollection) const { + CAF_CM_FUNCNAME("assign"); + CAF_CM_VALIDATE_SMARTPTR(contextBeans); + CAF_CM_VALIDATE_STL(beanConfigPathCollection); + + SmartPtrCIntegrationObjectCollection integrationObjectCollection; + integrationObjectCollection.CreateInstance(); + addBuiltIn("nullChannelBean", contextBeans, integrationObjectCollection); + addBuiltIn("errorChannelBean", contextBeans, integrationObjectCollection); + + // Parse the bean config file + for (TConstIterator beanConfigPathIter(beanConfigPathCollection); + beanConfigPathIter; beanConfigPathIter++) { + const std::string beanConfigPath = *beanConfigPathIter; + + const SmartPtrCXmlElement configBeanRoot = CXmlUtils::parseFile(beanConfigPath, "caf:beans"); + const CXmlElement::SmartPtrCElementCollection configBeanChildren = + configBeanRoot->getAllChildren(); + for (TSmartConstMapIterator configBeanIter(*configBeanChildren); + configBeanIter; configBeanIter++) { + const SmartPtrCXmlElement configBean = *configBeanIter; + + // if the child is anything but a bean... + if ((configBean->getName() != "bean") && (configBean->getName() != "import")) { + SmartPtrCDocument document; + document.CreateInstance(); + document->initialize(configBean); + const SmartPtrIDocument configSection = document; + + SmartPtrIIntegrationObject integrationObject; + for (TSmartConstMapIterator contextBeanIter(*contextBeans); + contextBeanIter; contextBeanIter++) { + const SmartPtrIBean contextBean = *contextBeanIter; + + SmartPtrIIntegrationComponent integrationComponent; + integrationComponent.QueryInterface(contextBean, false); + + if (!integrationComponent.IsNull() && + integrationComponent->isResponsible(configSection)) { + integrationObject = integrationComponent->createObject(configSection); + if (!integrationObject) { + CAF_CM_EXCEPTIONEX_VA2( + NullPointerException, + 0, + "Component took responsibility for section - beanId: %s," + " section: %s - but createObject() returned NULL", + contextBeanIter.getKey().c_str(), + configSection->getName().c_str()); + } + + CAF_CM_LOG_DEBUG_VA3( + "Component took responsibility for section - beanId: %s, section: %s, id: %s", + contextBeanIter.getKey().c_str(), configSection->getName().c_str(), integrationObject->getId().c_str()); + + break; + } + } + + if (integrationObject.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Nothing took responsibility for the section: %s", + configBean->saveToStringRaw().c_str()); + } + + const std::string id = integrationObject->getId(); + if (integrationObjectCollection->find(id) != integrationObjectCollection->end()) { + CAF_CM_EXCEPTIONEX_VA1(DuplicateElementException, ERROR_ALREADY_EXISTS, + "Duplicate id: %s", id.c_str()); + } + + integrationObjectCollection->insert(std::make_pair(id, integrationObject)); + } + } + } + + return integrationObjectCollection; +} + +void CIntegrationAppContext::injectChannelInterceptors( + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection) const { + CAF_CM_FUNCNAME("injectChannelInterceptors"); + CAF_CM_VALIDATE_SMARTPTR(integrationObjectCollection); + CAF_CM_LOG_DEBUG_VA0("Searching for Channels and ChannelInterceptors"); + + // Build two collections: Channels and ChannelInterceptors + // ChannelInterceptors are wired in order, if specified. + // Order does not need to be unique. Multiple interceptors at the same + // order will be wired in first-seen order. + typedef std::multimap CChannelInterceptorMap; + CChannelInterceptorMap channelInterceptors; + typedef std::list CChannelList; + CChannelList channels; + for (TSmartConstMapIterator object(*integrationObjectCollection); + object; + object++) { + SmartPtrIMessageChannel channel; + channel.QueryInterface(*object, false); + if (channel) { + channels.push_back(channel); + } else { + SmartPtrIChannelInterceptorInstance interceptorInstance; + interceptorInstance.QueryInterface(*object, false); + if (interceptorInstance) { + channelInterceptors.insert( + CChannelInterceptorMap::value_type( + interceptorInstance->getOrder(), + interceptorInstance)); + } + } + } + + if (channelInterceptors.size()) { + // For each channel create a list of ChannelInterceptors that + // apply to it and add the list to the channel. + for (TSmartConstIterator channel(channels); + channel; + channel++) { + // Get the channel id + SmartPtrIIntegrationObject integrationObj; + integrationObj.QueryInterface(*channel); + const std::string channelId = integrationObj->getId(); + + // Channels must support the IChannelInterceptorSupport interface + SmartPtrIChannelInterceptorSupport interceptorSupport; + interceptorSupport.QueryInterface(*channel, false); + if (!interceptorSupport) { + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOINTERFACE, + "Channel [%s] does not support the required " + "IChannelInterceptorSupport interface", + channelId.c_str()); + } + + IChannelInterceptorSupport::InterceptorCollection interceptors; + for (TSmartConstMultimapIterator interceptorInstance(channelInterceptors); + interceptorInstance; + interceptorInstance++) { + integrationObj.QueryInterface(*interceptorInstance); + const std::string interceptorId = integrationObj->getId(); + if (interceptorInstance->isChannelIdMatched(channelId)) { + CAF_CM_LOG_DEBUG_VA3( + "Adding interceptor [id=%s order=%d] to channel [%s]", + interceptorId.c_str(), + interceptorInstance->getOrder(), + channelId.c_str()); + SmartPtrIChannelInterceptor interceptor; + interceptor.QueryInterface(*interceptorInstance); + interceptors.push_back(interceptor); + } + } + + if (interceptors.size()) { + interceptorSupport->setInterceptors(interceptors); + } + } + } else { + CAF_CM_LOG_DEBUG_VA0("No ChannelInterceptors were found"); + } +} + +void CIntegrationAppContext::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrCIntegrationObjectCollection& integrationObjectCollection, + const SmartPtrCChannelResolver& channelResolver) const { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_SMARTPTR(integrationObjectCollection); + + for (TSmartConstMapIterator integrationObjectIter(*integrationObjectCollection); + integrationObjectIter; integrationObjectIter++) { + const SmartPtrIIntegrationObject integrationObject = *integrationObjectIter; + + SmartPtrIIntegrationComponentInstance integrationComponentInstance; + integrationComponentInstance.QueryInterface(integrationObject, false); + if (integrationComponentInstance) { + CAF_CM_LOG_DEBUG_VA1( + "Wiring - id: %s", integrationObject->getId().c_str()); + integrationComponentInstance->wire(appContext, channelResolver); + } + } +} + +void CIntegrationAppContext::startStop( + const LifecycleBeans& lifecycleBeans, + const uint32 timeoutMs, + const bool isStart) const { + CAF_CM_FUNCNAME("startStop"); + + if (isStart) { + for (LifecycleBeans::const_iterator lifecycleObjIter = lifecycleBeans.begin(); + lifecycleObjIter != lifecycleBeans.end(); + ++lifecycleObjIter) { + SmartPtrILifecycle lifecycleObj = lifecycleObjIter->second; + SmartPtrIIntegrationObject integrationObj; + integrationObj.QueryInterface(lifecycleObj, true); + bool bAutoStart = true; + SmartPtrISmartLifecycle smartLifecycleObj; + smartLifecycleObj.QueryInterface(lifecycleObj, false); + if (smartLifecycleObj) { + bAutoStart = smartLifecycleObj->isAutoStartup(); + } + if (bAutoStart) { + CAF_CM_LOG_DEBUG_VA2( + "Starting lifecycle object [phase:%d][id:%s]", + lifecycleObjIter->first, + integrationObj->getId().c_str()); + lifecycleObj->start(timeoutMs); + } else { + CAF_CM_LOG_DEBUG_VA2( + "Skipping lifecycle object start [phase:%d][id:%s] " + "because isAutoStartup=false", + lifecycleObjIter->first, + integrationObj->getId().c_str()); + } + } + } else { + for (LifecycleBeans::const_reverse_iterator lifecycleObjIter = lifecycleBeans.rbegin(); + lifecycleObjIter != lifecycleBeans.rend(); + ++lifecycleObjIter) { + try { + SmartPtrILifecycle lifecycleObj = lifecycleObjIter->second; + SmartPtrIIntegrationObject integrationObj; + integrationObj.QueryInterface(lifecycleObj, true); + CAF_CM_LOG_DEBUG_VA2( + "Stopping lifecycle object [phase:%d][id:%s]", + lifecycleObjIter->first, + integrationObj->getId().c_str()); + lifecycleObj->stop(timeoutMs); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_ERROR_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + } +} + +void CIntegrationAppContext::addBuiltIn( + const std::string& beanId, + const IAppContext::SmartPtrCBeans& beans, + SmartPtrCIntegrationObjectCollection& integrationObjectCollection) const { + CAF_CM_FUNCNAME_VALIDATE("addBuiltIn"); + CAF_CM_VALIDATE_STRING(beanId); + CAF_CM_VALIDATE_SMARTPTR(beans); + CAF_CM_VALIDATE_SMARTPTR(integrationObjectCollection); + + const SmartPtrIDocument configSection; + + const IAppContext::CBeans::const_iterator beanIter = beans->find(beanId); + if (beanIter != beans->end()) { + const SmartPtrIBean bean = beanIter->second; + + SmartPtrIIntegrationComponent integrationComponent; + integrationComponent.QueryInterface(bean, false); + + if (!integrationComponent.IsNull()) { + const SmartPtrIIntegrationObject integrationObject = + integrationComponent->createObject(configSection); + + const std::string id = integrationObject->getId(); + integrationObjectCollection->insert(std::make_pair(id, integrationObject)); + } + } +} + +std::string CIntegrationAppContext::getDefaultBeanConfigPath() const { + CAF_CM_FUNCNAME("getDefaultBeanConfigPath"); + + // Get the bean config file + const std::string appConfigKey = "bean_config_file"; + std::string beanConfigPath = AppConfigUtils::getRequiredString(appConfigKey); + beanConfigPath = CStringUtils::expandEnv(beanConfigPath); + if (!FileSystemUtils::doesFileExist(beanConfigPath)) { + CAF_CM_EXCEPTIONEX_VA2(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "The bean config file does not exist - appConfigKey: %s, file: %s", + appConfigKey.c_str(), beanConfigPath.c_str()); + } + + return beanConfigPath; +} + +Cdeqstr CIntegrationAppContext::getBeanConfigFiles( + const std::string& beanConfigPath) const { + CAF_CM_FUNCNAME("getBeanConfigFiles"); + CAF_CM_VALIDATE_STRING(beanConfigPath); + + // Get the bean config file + const std::string beanConfigPathExp = CStringUtils::expandEnv(beanConfigPath); + if (!FileSystemUtils::doesFileExist(beanConfigPathExp)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "The bean config file does not exist - file: %s", + beanConfigPathExp.c_str()); + } + + CAF_CM_LOG_DEBUG_VA1("Adding bean file - %s", beanConfigPathExp.c_str()); + Cdeqstr beanConfigPathCollection; + beanConfigPathCollection.push_front(beanConfigPathExp); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(beanConfigPathExp, "caf:beans"); + const CXmlElement::SmartPtrCElementCollection beanChildrenXml = rootXml->getAllChildren(); + CAF_CM_VALIDATE_SMARTPTR(beanChildrenXml); + + const std::string beanConfigDirname = FileSystemUtils::getDirname(beanConfigPathExp); + for (TSmartConstMapIterator beanXmlIter(*beanChildrenXml); + beanXmlIter; beanXmlIter++) { + if (beanXmlIter.getKey().compare("import") == 0) { + const SmartPtrCXmlElement importXml = *beanXmlIter; + const std::string import = importXml->findRequiredAttribute("resource"); + const std::string importExp = CStringUtils::expandEnv(import); + + std::string importPath = FileSystemUtils::buildPath(beanConfigDirname, importExp); + if (! FileSystemUtils::doesFileExist(importPath)) { + importPath = importExp; + if (! FileSystemUtils::doesFileExist(importPath)) { + CAF_CM_EXCEPTIONEX_VA2(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Import does not exist - origFile: %s, importPath: %s", + beanConfigPath.c_str(), importPath.c_str()); + } + } + + CAF_CM_LOG_DEBUG_VA1("Adding bean file - %s", importPath.c_str()); + beanConfigPathCollection.push_front(importPath); + } + } + + return beanConfigPathCollection; +} + +CIntegrationAppContext:: +CIntegrationAppContextWeakReference::CIntegrationAppContextWeakReference() : + _context(NULL), + CAF_CM_INIT("CIntegrationAppContext") { + CAF_CM_INIT_THREADSAFE; +} + +void CIntegrationAppContext:: +CIntegrationAppContextWeakReference::set(CIntegrationAppContext *context) { + CAF_CM_LOCK_UNLOCK; + _context = context; +} + +SmartPtrIIntegrationObject CIntegrationAppContext:: +CIntegrationAppContextWeakReference::getIntegrationObject( + const std::string& id) const { + CAF_CM_FUNCNAME_VALIDATE("getIntegrtationObject"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_context); + return _context->getIntegrationObject(id); +} + +void CIntegrationAppContext:: +CIntegrationAppContextWeakReference::getIntegrationObject( + const IID& iid, + void **ppv) const { + CAF_CM_FUNCNAME_VALIDATE("getIntegrtationObject"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_context); + _context->getIntegrationObject(iid, ppv); +} + +IIntegrationAppContext::SmartPtrCObjectCollection CIntegrationAppContext:: +CIntegrationAppContextWeakReference::getIntegrationObjects( + const IID& iid) const { + CAF_CM_FUNCNAME_VALIDATE("getIntegrtationObjects"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_VALIDATE_PTR(_context); + return _context->getIntegrationObjects(iid); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHandler.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHandler.cpp new file mode 100644 index 000000000..c17d97817 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHandler.cpp @@ -0,0 +1,166 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "ICafObject.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/Core/CMessageHandler.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CMessageHandler::CMessageHandler() : + _isInitialized(false), + CAF_CM_INIT_LOG("CMessageHandler") { +} + +CMessageHandler::~CMessageHandler() { +} + +void CMessageHandler::initialize( + const std::string& inputId, + const SmartPtrIMessageChannel& outputMessageChannel, + const SmartPtrICafObject& messageHandlerObj) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(inputId); + // outputMessageChannel is optional + // + // messageHandlerObj optional but if provided must be one of + // ITransformer + // IMessageProcessor + // IMessageSplitter + // IMessageRouter + // IMessageHandler + // + // messageHandlerObj may also support IErrorProcessor + + _inputId = inputId; + _outputMessageChannel = outputMessageChannel; + + if (messageHandlerObj) { + _transformer.QueryInterface(messageHandlerObj, false); + _errorProcessor.QueryInterface(messageHandlerObj, false); + _messageProcessor.QueryInterface(messageHandlerObj, false); + _messageSplitter.QueryInterface(messageHandlerObj, false); + _messageRouter.QueryInterface(messageHandlerObj, false); + _messageHandler.QueryInterface(messageHandlerObj, false); + if (!_transformer && + !_errorProcessor && + !_messageProcessor && + !_messageSplitter && + !_messageRouter && + !_messageHandler) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "The messageHandler object '%s' does not have " + "a supported endpoint interface", + _inputId.c_str()); + } + } + + _isInitialized = true; +} + +std::string CMessageHandler::getInputId() const { + CAF_CM_FUNCNAME_VALIDATE("getInputId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _inputId; +} + +void CMessageHandler::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + + const std::string isThrowableStr = + message->findOptionalHeaderAsString(MessageHeaders::_sIS_THROWABLE); + const bool isThrowable = + (isThrowableStr.empty() || (isThrowableStr.compare("false") == 0)) ? false : true; + + if (isThrowable) { + if (! _errorProcessor.IsNull()) { + _savedMessage = _errorProcessor->processErrorMessage(message); + if (_savedMessage.IsNull()) { + CAF_CM_LOG_WARN_VA1( + "Error processing did not return a message - %s", _inputId.c_str()); + } else { + CAF_CM_VALIDATE_INTERFACE(_outputMessageChannel); + _outputMessageChannel->send(_savedMessage); + } + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, ERROR_INVALID_STATE, + "Nothing handled the throwable message - %s", _inputId.c_str()); + } + } else { + if (_inputId.compare("errorChannel") == 0) { + CAF_CM_LOG_WARN_VA1( + "Received non-error on error channel - %s", _inputId.c_str()); + } else if (! _messageSplitter.IsNull()) { + const IMessageSplitter::SmartPtrCMessageCollection outputMessageCollection = + _messageSplitter->splitMessage(message); + if (outputMessageCollection.IsNull() || outputMessageCollection->empty()) { + CAF_CM_LOG_WARN_VA1( + "Splitter did not split the message - %s", _inputId.c_str()); + } else { + CAF_CM_VALIDATE_INTERFACE(_outputMessageChannel); + for (TSmartConstIterator outputMessageIter(*outputMessageCollection); + outputMessageIter; outputMessageIter++) { + _savedMessage = *outputMessageIter; + _outputMessageChannel->send(_savedMessage); + } + } + } else if (! _messageRouter.IsNull()) { + CAF_CM_VALIDATE_BOOL(_outputMessageChannel.IsNull()); + _messageRouter->routeMessage(message); + } else if (! _messageProcessor.IsNull()) { + _savedMessage = _messageProcessor->processMessage(message); + if (_savedMessage.IsNull()) { + CAF_CM_LOG_WARN_VA1( + "Message processing did not return a message - %s", _inputId.c_str()); + } else { + CAF_CM_VALIDATE_INTERFACE(_outputMessageChannel); + _outputMessageChannel->send(_savedMessage); + } + } else if (! _transformer.IsNull()) { + _savedMessage = _transformer->transformMessage(message); + if (_savedMessage.IsNull()) { + CAF_CM_LOG_WARN_VA1( + "Transform did not return a message - %s", _inputId.c_str()); + } else { + CAF_CM_VALIDATE_INTERFACE(_outputMessageChannel); + _outputMessageChannel->send(_savedMessage); + } + } else if (! _messageHandler.IsNull()) { + _messageHandler->handleMessage(message); + } else if (! _outputMessageChannel.IsNull()) { + _outputMessageChannel->send(message); + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, ERROR_INVALID_STATE, + "Nothing handled the message - %s", _inputId.c_str()); + } + } +} + +SmartPtrIIntMessage CMessageHandler::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CMessageHandler::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHeaderUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHeaderUtils.cpp new file mode 100644 index 000000000..c7866884e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessageHeaderUtils.cpp @@ -0,0 +1,199 @@ +/* + * Author: bwilliams + * Created: April 6, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * + */ + +#include "stdafx.h" + +#include "Integration/IIntMessage.h" +#include "Exception/CCafException.h" +#include "Integration/Core/CMessageHeaderUtils.h" + +using namespace Caf; + +std::string CMessageHeaderUtils::getStringReq( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getStringReq"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getStringOpt(headers, tag); +} + +std::string CMessageHeaderUtils::getStringOpt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + std::string rc = 0; + IIntMessage::CHeaders::const_iterator iter = headers->find(tag); + if (iter != headers->end()) { + rc = iter->second.first->toString(); + } + return rc; +} + +uint8 CMessageHeaderUtils::getUint8Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getUint8Req"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getUint8Opt(headers, tag); +} + +uint8 CMessageHeaderUtils::getUint8Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + uint8 rc = 0; + IIntMessage::CHeaders::const_iterator header = headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_BYTE)) { + rc = g_variant_get_byte(header->second.first->get()); + } else { + rc = CStringConv::fromString(header->second.first->toString()); + } + } + return rc; +} + +uint16 CMessageHeaderUtils::getUint16Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getUint16Req"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getUint16Opt(headers, tag); +} + +uint16 CMessageHeaderUtils::getUint16Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + uint16 rc = 0; + IIntMessage::CHeaders::const_iterator header = headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT16)) { + rc = g_variant_get_uint16(header->second.first->get()); + } else { + rc = CStringConv::fromString(header->second.first->toString()); + } + } + return rc; +} + +uint32 CMessageHeaderUtils::getUint32Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getUint32Req"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getUint32Opt(headers, tag); +} + +uint32 CMessageHeaderUtils::getUint32Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + uint32 rc = 0; + IIntMessage::CHeaders::const_iterator header = headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT32)) { + rc = g_variant_get_uint32(header->second.first->get()); + } else { + rc = CStringConv::fromString(header->second.first->toString()); + } + } + return rc; +} + +uint64 CMessageHeaderUtils::getUint64Req( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getUint64Req"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getUint64Opt(headers, tag); +} + +uint64 CMessageHeaderUtils::getUint64Opt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + uint64 rc = 0; + IIntMessage::CHeaders::const_iterator header = headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_UINT64)) { + rc = g_variant_get_uint64(header->second.first->get()); + } else { + rc = CStringConv::fromString(header->second.first->toString()); + } + } + return rc; +} + +bool CMessageHeaderUtils::getBoolReq( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + CAF_CM_STATIC_FUNC("CMessageHeaderUtils", "getBoolReq"); + + if (headers->find(tag) == headers->end()) { + CAF_CM_EXCEPTION_VA1(ERROR_NOT_FOUND, "Header not found: %s", tag.c_str()); + } + return getBoolOpt(headers, tag); +} + +bool CMessageHeaderUtils::getBoolOpt( + const IIntMessage::SmartPtrCHeaders& headers, + const std::string& tag) { + + bool rc = false; + IIntMessage::CHeaders::const_iterator header = headers->find(tag); + if (header != headers->end()) { + if (g_variant_is_of_type(header->second.first->get(), G_VARIANT_TYPE_BOOLEAN)) { + rc = g_variant_get_boolean(header->second.first->get()); + } else { + const std::string val = header->second.first->toString(); + + rc = true; + if ((val == "0") + || (g_ascii_strncasecmp(val.c_str(), "false", val.length()) == 0)) { + rc = false; + } + } + } + return rc; +} + +void CMessageHeaderUtils::log( + const IIntMessage::SmartPtrCHeaders& headers, + const log4cpp::Priority::PriorityLevel priorityLevel) { + CAF_CM_STATIC_FUNC_LOG_ONLY("CMessageHeaderUtils", "log"); + + if (_logger.isPriorityEnabled(priorityLevel)) { + for (IIntMessage::CHeaders::const_iterator headerIter = headers->begin(); + headerIter != headers->end(); + headerIter++) { + std::stringstream logMessage; + logMessage << '[' + << headerIter->first + << '=' + << headerIter->second.first->toString() + << ']'; + _logger.logVA(priorityLevel, _cm_funcName_, __LINE__, logMessage.str().c_str()); + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplate.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplate.cpp new file mode 100644 index 000000000..7866937da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplate.cpp @@ -0,0 +1,154 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "ICafObject.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/Core/CMessageHandler.h" +#include "Integration/Core/CSimpleAsyncTaskExecutor.h" +#include "Integration/Core/CSourcePollingChannelAdapter.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IPollableChannel.h" +#include "Integration/ITaskExecutor.h" +#include "Integration/Core/CMessagingTemplate.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CMessagingTemplate::CMessagingTemplate() : + _isInitialized(false), + _isRunning(false), + CAF_CM_INIT_LOG("CMessagingTemplate") { +} + +CMessagingTemplate::~CMessagingTemplate() { +} + +void CMessagingTemplate::initialize( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrIIntegrationObject& inputIntegrationObject, + const SmartPtrIMessageChannel& errorMessageChannel, + const SmartPtrIMessageChannel& outputMessageChannel, + const SmartPtrICafObject& messageHandlerObj) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + CAF_CM_VALIDATE_INTERFACE(inputIntegrationObject); + CAF_CM_VALIDATE_INTERFACE(errorMessageChannel); + // outputMessageChannel is optional + // + // messageHandlerObj optional but if provided must be one of + // ITransformer + // IMessageProcessor + // IMessageSplitter + // IMessageRouter + // IMessageHandler + // + // messageHandlerObj may also support IErrorProcessor + + _inputId = inputIntegrationObject->getId(); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _inputId, + outputMessageChannel, + messageHandlerObj); + + SmartPtrIPollableChannel inputPollableChannel; + inputPollableChannel.QueryInterface(inputIntegrationObject, false); + _inputSubscribableChannel.QueryInterface(inputIntegrationObject, false); + + if (! _inputSubscribableChannel.IsNull()) { + _messagingTemplateHandler.CreateInstance(); + _messagingTemplateHandler->initialize(messageHandler); + } else if (! inputPollableChannel.IsNull()) { + _taskExecutor = createTaskExecutor( + channelResolver, messageHandler, inputPollableChannel, errorMessageChannel); + } else { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Input object does not support any required interfaces - %s", _inputId.c_str()); + } + + _isInitialized = true; +} + +void CMessagingTemplate::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (! _taskExecutor.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("Executing task - %s", _inputId.c_str()); + _taskExecutor->execute(timeoutMs); + } else if (! _inputSubscribableChannel.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("Subscribing handler - %s", _inputId.c_str()); + _inputSubscribableChannel->subscribe(_messagingTemplateHandler); + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, E_UNEXPECTED, + "Nothing to start: %s", _inputId.c_str()); + } +} + +void CMessagingTemplate::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Stopping"); + + if (! _taskExecutor.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("Canceling task - %s", _inputId.c_str()); + _taskExecutor->cancel(timeoutMs); + } else if (! _inputSubscribableChannel.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("Unsubscribing handler - %s", _inputId.c_str()); + _inputSubscribableChannel->unsubscribe(_messagingTemplateHandler); + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, E_UNEXPECTED, + "Nothing to stop: %s", _inputId.c_str()); + } +} + +bool CMessagingTemplate::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + bool isRunning = true; + if (! _taskExecutor.IsNull()) { + isRunning = (_taskExecutor->getState() == ITaskExecutor::ETaskStateStarted); + } + + return isRunning; +} + +SmartPtrITaskExecutor CMessagingTemplate::createTaskExecutor( + const SmartPtrIChannelResolver& channelResolver, + const SmartPtrCMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIMessageChannel& errorMessageChannel) const { + CAF_CM_FUNCNAME_VALIDATE("createTaskExecutor"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + CAF_CM_VALIDATE_SMARTPTR(messageHandler); + CAF_CM_VALIDATE_INTERFACE(inputPollableChannel); + CAF_CM_VALIDATE_INTERFACE(errorMessageChannel); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize(messageHandler, inputPollableChannel, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(sourcePollingChannelAdapter, errorHandler); + + return simpleAsyncTaskExecutor; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplateHandler.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplateHandler.cpp new file mode 100644 index 000000000..81ac2931d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CMessagingTemplateHandler.cpp @@ -0,0 +1,53 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IIntMessage.h" +#include "Integration/IMessageHandler.h" +#include "Integration/Core/CMessagingTemplateHandler.h" + +using namespace Caf; + +CMessagingTemplateHandler::CMessagingTemplateHandler() : + _isInitialized(false), + CAF_CM_INIT("CMessagingTemplateHandler") { +} + +CMessagingTemplateHandler::~CMessagingTemplateHandler() { +} + +void CMessagingTemplateHandler::initialize( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(messageHandler); + + _messageHandler = messageHandler; + _isInitialized = true; +} + +void CMessagingTemplateHandler::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _messageHandler->handleMessage(message); +} + +SmartPtrIIntMessage CMessagingTemplateHandler::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _messageHandler->getSavedMessage(); +} + +void CMessagingTemplateHandler::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _messageHandler->clearSavedMessage();; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp new file mode 100644 index 000000000..5b35f82fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp @@ -0,0 +1,230 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CAutoMutex.h" +#include "Integration/Core/CIntException.h" +#include "Integration/Core/CSimpleAsyncTaskExecutorState.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IRunnable.h" +#include "Integration/ITaskExecutor.h" +#include "Integration/Core/CSimpleAsyncTaskExecutor.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CSimpleAsyncTaskExecutor::CSimpleAsyncTaskExecutor() : + _isInitialized(false), + _thread(NULL), + CAF_CM_INIT_LOG("CSimpleAsyncTaskExecutor") { + CAF_CM_FUNCNAME("CSimpleAsyncTaskExecutor"); + + try { + CAF_CM_INIT_THREADSAFE; + CAF_THREADSIGNAL_INIT; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +CSimpleAsyncTaskExecutor::~CSimpleAsyncTaskExecutor() { + CAF_CM_FUNCNAME("~CSimpleAsyncTaskExecutor"); + + try { + cancel(0); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + try { + if (_thread) { + CThreadUtils::join(_thread); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CSimpleAsyncTaskExecutor::initialize( + const SmartPtrIRunnable& runnable, + const SmartPtrIErrorHandler& errorHandler) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(runnable); + CAF_CM_VALIDATE_INTERFACE(errorHandler); + + _state.CreateInstance(); + _state->initialize(runnable, errorHandler); + + _isInitialized = true; +} + +void CSimpleAsyncTaskExecutor::execute( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME("execute"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (ITaskExecutor::ETaskStateNotStarted == _state->getState()) { + // The mutex must be locked before calling waitForStart + // and before letting the thread spin up to avoid + // a race condition. See g_cond_timed_wait() + // + // Scope the CAF_THREADSIGNAL_LOCK_UNLOCK so that the + // mutex is guaranteed to unlock + { + CAF_CM_LOG_DEBUG_VA0("Starting the thread"); + CAF_THREADSIGNAL_LOCK_UNLOCK; + CThreadData threadData = std::make_pair( + CAF_THREADSIGNAL_MUTEX, + _state.GetNonAddRefedInterface()); + CAF_CM_VALIDATE_NULLPTR(_thread); + _thread = CThreadUtils::startJoinable(threadFunc, &threadData); + + CAF_CM_UNLOCK_LOCK; + _state->waitForStart(CAF_THREADSIGNAL_MUTEX, timeoutMs); + } + if (_state->getState() != ITaskExecutor::ETaskStateStarted) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_STATE, + "Not Started: %s", _state->getStateStr().c_str()); + } + } else if (ITaskExecutor::ETaskStateStarted != _state->getState()) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_STATE, + "Invalid State: %s", _state->getStateStr().c_str()); + } + + CAF_CM_LOG_INFO_VA0("Started"); +} + +void CSimpleAsyncTaskExecutor::cancel( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME("cancel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (ITaskExecutor::ETaskStateStarted == _state->getState()) { + CAF_CM_LOG_INFO_VA0("Stopping"); + _state->setState(ITaskExecutor::ETaskStateStopping); + } + + if (ITaskExecutor::ETaskStateStopping == _state->getState()) { + _state->getRunnable()->cancel(); + + // The mutex must be locked before calling waitForStop + // and before letting the thread spin up to avoid + // a race condition. See g_cond_timed_wait() + // + // Scope the CAF_THREADSIGNAL_LOCK_UNLOCK so that the + // mutex is guaranteed to unlock + { + CAF_THREADSIGNAL_LOCK_UNLOCK; + CAF_CM_UNLOCK_LOCK; + while (! _state->getHasThreadExited()) { + _state->waitForStop(CAF_THREADSIGNAL_MUTEX, timeoutMs); + } + } + + if (_thread) { + CThreadUtils::join(_thread); + _thread = NULL; + } + + if (_state->getState() != ITaskExecutor::ETaskStateFinished) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_STATE, "Not Stopped: %s", + _state->getStateStr().c_str()); + } + } else if (!((ITaskExecutor::ETaskStateFinished == _state->getState()) || + (ITaskExecutor::ETaskStateFailed == _state->getState()))) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_STATE, "Invalid State: %s", + _state->getStateStr().c_str()); + } + + CAF_CM_LOG_INFO_VA0("Stopped"); +} + +ITaskExecutor::ETaskState CSimpleAsyncTaskExecutor::getState() const { + CAF_CM_FUNCNAME_VALIDATE("getState"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _state->getState(); +} + +void* CSimpleAsyncTaskExecutor::threadFunc(void* data) { + CAF_CM_STATIC_FUNC_LOG("CSimpleAsyncTaskExecutor", "threadFunc"); + + SmartPtrCSimpleAsyncTaskExecutorState state; + SmartPtrCAutoMutex mutex; + ITaskExecutor::ETaskState stateState = ITaskExecutor::ETaskStateFailed; + + try { + CAF_CM_VALIDATE_PTR(data); + CThreadData *threadData = static_cast(data); + CAF_CM_VALIDATE_PTR(threadData->first); + CAF_CM_VALIDATE_PTR(threadData->second); + mutex = threadData->first; + state = static_cast(threadData->second); + CAF_CM_VALIDATE_SMARTPTR(state); + + try { + state->setState(ITaskExecutor::ETaskStateStarted); + + CAF_CM_LOCK_UNLOCK1(mutex); + state->signalStart(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + if (!CAF_CM_ISEXCEPTION) { + try { + state->getRunnable()->run(); + stateState = ITaskExecutor::ETaskStateFinished; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + } + + try { + if (CAF_CM_ISEXCEPTION) { + SmartPtrCIntException intException; + intException.CreateInstance(); + intException->initialize(CAF_CM_GETEXCEPTION); + state->getErrorHandler()->handleError(intException, SmartPtrIIntMessage()); + + CAF_CM_CLEAREXCEPTION; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + if (! state.IsNull()) { + try { + state->setState(stateState); + state->setThreadExited(); + + CAF_CM_LOCK_UNLOCK1(mutex); + state->signalStop(); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + + CAF_CM_LOG_INFO_VA0("**** Thread exiting ****"); + + return NULL; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp new file mode 100644 index 000000000..04f07477b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp @@ -0,0 +1,159 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CAutoMutex.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IRunnable.h" +#include "Integration/Core/CSimpleAsyncTaskExecutorState.h" + +using namespace Caf; + +CSimpleAsyncTaskExecutorState::CSimpleAsyncTaskExecutorState() : + _isInitialized(false), + _hasThreadExited(false), + _runnableState(ITaskExecutor::ETaskStateNotStarted), + CAF_CM_INIT_LOG("CSimpleAsyncTaskExecutorState") { + CAF_CM_INIT_THREADSAFE; +} + +CSimpleAsyncTaskExecutorState::~CSimpleAsyncTaskExecutorState() { +} + +void CSimpleAsyncTaskExecutorState::initialize( + const SmartPtrIRunnable& runnable, + const SmartPtrIErrorHandler& errorHandler) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(runnable); + CAF_CM_VALIDATE_INTERFACE(errorHandler); + + _runnable = runnable; + _errorHandler = errorHandler; + + _threadSignalStart.initialize("Start"); + _threadSignalStop.initialize("Stop"); + + _isInitialized = true; +} + +ITaskExecutor::ETaskState CSimpleAsyncTaskExecutorState::getState() const { + CAF_CM_FUNCNAME_VALIDATE("getState"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _runnableState; +} + +std::string CSimpleAsyncTaskExecutorState::getStateStr() const { + CAF_CM_FUNCNAME_VALIDATE("getStateStr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rc; + switch(getState()) { + case ITaskExecutor::ETaskStateNotStarted: + rc = "NotStarted"; + break; + case ITaskExecutor::ETaskStateStarted: + rc = "Started"; + break; + case ITaskExecutor::ETaskStateStopping: + rc = "Stopping"; + break; + case ITaskExecutor::ETaskStateFinished: + rc = "Finished"; + break; + case ITaskExecutor::ETaskStateFailed: + rc = "Failed"; + break; + default: + rc = "Unknown"; + break; + } + + return rc; +} + +void CSimpleAsyncTaskExecutorState::setState( + const ITaskExecutor::ETaskState runnableState) { + CAF_CM_FUNCNAME_VALIDATE("setState"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _runnableState = runnableState; +} + +bool CSimpleAsyncTaskExecutorState::getHasThreadExited() { + CAF_CM_FUNCNAME_VALIDATE("getHasThreadExited"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _hasThreadExited; +} + +void CSimpleAsyncTaskExecutorState::setThreadExited() { + CAF_CM_FUNCNAME_VALIDATE("setThreadExited"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _hasThreadExited = true; +} + +SmartPtrIRunnable CSimpleAsyncTaskExecutorState::getRunnable() const { + CAF_CM_FUNCNAME_VALIDATE("getRunnable"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _runnable; +} + +SmartPtrIErrorHandler CSimpleAsyncTaskExecutorState::getErrorHandler() const { + CAF_CM_FUNCNAME_VALIDATE("getErrorHandler"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _errorHandler; +} + +void CSimpleAsyncTaskExecutorState::signalStart() { + CAF_CM_FUNCNAME_VALIDATE("signalStart"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA2("Signal (%s) - %p", _threadSignalStart.getName().c_str(), this); + _threadSignalStart.signal(); +} + +void CSimpleAsyncTaskExecutorState::waitForStart( + SmartPtrCAutoMutex& mutex, + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("waitForStart"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA2("Wait (%s) - waitMs: %d", _threadSignalStart.getName().c_str(), timeoutMs); + _threadSignalStart.wait(mutex, timeoutMs); +} + +void CSimpleAsyncTaskExecutorState::signalStop() { + CAF_CM_FUNCNAME_VALIDATE("signalStop"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA1("Signal (%s)", _threadSignalStop.getName().c_str()); + _threadSignalStop.signal(); +} + +void CSimpleAsyncTaskExecutorState::waitForStop( + SmartPtrCAutoMutex& mutex, + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("waitForStop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA2("Wait (%s) - waitMs: %d", _threadSignalStop.getName().c_str(), timeoutMs); + _threadSignalStop.wait(mutex, timeoutMs); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp new file mode 100644 index 000000000..20ead150d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp @@ -0,0 +1,138 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Core/CIntException.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageHandler.h" +#include "Integration/IPollableChannel.h" +#include "Integration/Core/CSourcePollingChannelAdapter.h" + +using namespace Caf; + +CSourcePollingChannelAdapter::CSourcePollingChannelAdapter() : + _isInitialized(false), + _isCancelled(false), + _isTimeoutSet(false), + _timeout(0), + CAF_CM_INIT_LOG("CSourcePollingChannelAdapter") { + CAF_CM_INIT_THREADSAFE; + CAF_THREADSIGNAL_INIT; +} + +CSourcePollingChannelAdapter::~CSourcePollingChannelAdapter() { +} + +void CSourcePollingChannelAdapter::initialize( + const SmartPtrIMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIErrorHandler& errorHandler) { + + initialize( + messageHandler, + inputPollableChannel, + errorHandler, + 0); + _isTimeoutSet = false; +} + +void CSourcePollingChannelAdapter::initialize( + const SmartPtrIMessageHandler& messageHandler, + const SmartPtrIPollableChannel& inputPollableChannel, + const SmartPtrIErrorHandler& errorHandler, + const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + CAF_CM_VALIDATE_INTERFACE(inputPollableChannel); + CAF_CM_VALIDATE_INTERFACE(errorHandler); + + _messageHandler = messageHandler; + _inputPollableChannel = inputPollableChannel; + _pollerMetadata = inputPollableChannel->getPollerMetadata(); + _errorHandler = errorHandler; + _timeout = timeout; + _isTimeoutSet = true; + + _threadSignalCancel.initialize("Cancel"); + + _isInitialized = true; +} + +void CSourcePollingChannelAdapter::run() { + CAF_CM_FUNCNAME("run"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + uint32 messageCount = 0; + SmartPtrIIntMessage message; + while (! getIsCancelled()) { + try { + message = NULL; + if (_isTimeoutSet) { + message = _inputPollableChannel->receive(_timeout); + } else { + message = _inputPollableChannel->receive(); + } + if (! message.IsNull()) { + messageCount++; + _messageHandler->handleMessage(message); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + if (CAF_CM_ISEXCEPTION) { + SmartPtrIIntMessage savedMessage = _messageHandler->getSavedMessage(); + if (savedMessage.IsNull()) { + savedMessage = message; + } + + SmartPtrCIntException intException; + intException.CreateInstance(); + intException->initialize(CAF_CM_GETEXCEPTION); + _errorHandler->handleError(intException, savedMessage); + + CAF_CM_CLEAREXCEPTION; + } + + if (message.IsNull() + || (messageCount >= _pollerMetadata->getMaxMessagesPerPoll())) { + { + CAF_THREADSIGNAL_LOCK_UNLOCK; +// CAF_CM_LOG_DEBUG_VA2("Wait (%s) - waitMs: %d", +// _threadSignalCancel.getName().c_str(), +// _pollerMetadata->getFixedRate()); + _threadSignalCancel.waitOrTimeout( + CAF_THREADSIGNAL_MUTEX, _pollerMetadata->getFixedRate()); + } + + messageCount = 0; + } + } + + CAF_CM_LOG_DEBUG_VA0("Finished"); +} + +void CSourcePollingChannelAdapter::cancel() { + CAF_CM_FUNCNAME_VALIDATE("cancel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA1("Signal (%s)", _threadSignalCancel.getName().c_str()); + _isCancelled = true; + _threadSignalCancel.signal(); +} + +bool CSourcePollingChannelAdapter::getIsCancelled() const { + CAF_CM_FUNCNAME_VALIDATE("getIsCancelled"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _isCancelled; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CUnicastingDispatcher.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CUnicastingDispatcher.cpp new file mode 100644 index 000000000..1457e27da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/CUnicastingDispatcher.cpp @@ -0,0 +1,116 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Core/CIntException.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageHandler.h" +#include "Integration/Core/CUnicastingDispatcher.h" + +using namespace Caf; + +CUnicastingDispatcher::CUnicastingDispatcher() : + _isInitialized(false), + CAF_CM_INIT_LOG("CUnicastingDispatcher") { +} + +CUnicastingDispatcher::~CUnicastingDispatcher() { +} + +void CUnicastingDispatcher::initialize( + const SmartPtrIErrorHandler& errorHandler) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(errorHandler); + + _errorHandler = errorHandler; + _messageHandlerCollection.CreateInstance(); + + _isInitialized = true; +} + +void CUnicastingDispatcher::addHandler( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("addHandler"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + const void* handlerPtr = messageHandler.GetNonAddRefedInterface(); + _messageHandlerCollection->insert(std::make_pair(handlerPtr, messageHandler)); + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Added handler - %llX", handlerPtr); +#else + CAF_CM_LOG_DEBUG_VA1("Added handler - %X", handlerPtr); +#endif +} + +void CUnicastingDispatcher::removeHandler( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("removeHandler"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + const void* handlerPtr = messageHandler.GetNonAddRefedInterface(); + _messageHandlerCollection->erase(handlerPtr); + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Removed handler - %llX", handlerPtr); +#else + CAF_CM_LOG_DEBUG_VA1("Removed handler - %X", handlerPtr); +#endif +} + +bool CUnicastingDispatcher::dispatch( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("dispatch"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + bool isMessageHandled = false; + + for (TSmartConstMapIterator messageHandlerIter(*_messageHandlerCollection); + ! isMessageHandled && messageHandlerIter; messageHandlerIter++) { + const SmartPtrIMessageHandler messageHandler = *messageHandlerIter; + +#ifdef __x86_64__ + CAF_CM_LOG_DEBUG_VA1("Dispatching to handler - %llX", messageHandlerIter.getKey()); +#else + CAF_CM_LOG_DEBUG_VA1("Dispatching to handler - %X", messageHandlerIter.getKey()); +#endif + try { + messageHandler->handleMessage(message); + isMessageHandled = true; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + try { + if (CAF_CM_ISEXCEPTION) { + CAF_CM_VALIDATE_INTERFACE(messageHandler); + SmartPtrIIntMessage savedMessage = messageHandler->getSavedMessage(); + if (savedMessage.IsNull()) { + savedMessage = message; + } + + SmartPtrCIntException intException; + intException.CreateInstance(); + intException->initialize(CAF_CM_GETEXCEPTION); + _errorHandler->handleError(intException, savedMessage); + + CAF_CM_CLEAREXCEPTION; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } + + return isMessageHandled; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/FileHeaders.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/FileHeaders.cpp new file mode 100644 index 000000000..6701a117c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/FileHeaders.cpp @@ -0,0 +1,16 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Integration/Core/FileHeaders.h" + +namespace Caf { + namespace FileHeaders { + const char* _sFILENAME = "file_name"; + const char* _sORIGINAL_FILE = "file_originalFile"; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/MessageHeaders.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/MessageHeaders.cpp new file mode 100644 index 000000000..6c325a102 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/MessageHeaders.cpp @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: 10/19/2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Integration/Core/MessageHeaders.h" + +namespace Caf { + namespace MessageHeaders { + // UUID stored as a string + const char* _sID = "id"; + + // int64 + const char* _sTIMESTAMP = "timestamp"; + + // string + const char* _sCORRELATION_ID = "correlationId"; + + // string + const char* _sREPLY_CHANNEL = "replyChannel"; + + // string + const char* _sERROR_CHANNEL = "errorChannel"; + + // int64 + const char* _sEXPIRATION_DATE = "expirationDate"; + + // int32 + const char* _sPRIORITY = "priority"; + + // int32 + const char* _sSEQUENCE_NUMBER = "sequenceNumber"; + + // int32 + const char* _sSEQUENCE_SIZE = "sequenceSize"; + + const char* _sIS_THROWABLE = "_isThrowable_"; + + // string + const char* _sREQUEST_ID = "caf.msg.requestid"; + + // boolean + const char* _sMULTIPART = "caf.msg.multipart"; + + // string + const char* _sMULTIPART_WORKING_DIR = "cafcomm.internal.multipart-working-dir"; + + // string + const char* _sPROTOCOL_TYPE = "caf.protocolType"; + + // string + const char* _sPROTOCOL_CONNSTR = "caf.connStr"; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/stdafx.h new file mode 100644 index 000000000..2087eb94d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Integration/Core/stdafx.h @@ -0,0 +1,23 @@ +/* + * Author: bwilliams + * Created: Oct 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define INTEGRATIONCORE_LINKAGE __declspec(dllexport) +#else + #define INTEGRATIONCORE_LINKAGE +#endif + +#include +#include + +#include "Integration/Core/FileHeaders.h" +#include "Integration/Core/MessageHeaders.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.cpp new file mode 100644 index 000000000..5d51759a5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.cpp @@ -0,0 +1,116 @@ +/* + * Author: bwilliams + * Created: 1/14/2011 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CLogger.h" + +using namespace Caf; + +CLogger::CLogger(const char* className) : + _category(log4cpp::Category::getInstance(className)) { +} + +CLogger::~CLogger() { +} + +void CLogger::log( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const CCafException* cafException) const { + + if(_category.isPriorityEnabled(priority) && (NULL != cafException)) { + logVA(priority, funcName, lineNumber, "0x%08X %s", cafException->getError(), + cafException->getFullMsg().c_str()); + logBacktrace(log4cpp::Priority::INFO, funcName, lineNumber, + *cafException->getBacktrace()); + } +} + +void CLogger::logMessage( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const char* message) const { + + if(_category.isPriorityEnabled(priority)) { + std::stringstream fullMsg; + fullMsg << + funcName << "|" << + lineNumber << "|" << + message; + + _category.log(priority, fullMsg.str()); + } +} + +void CLogger::logVA( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const char* format, + ...) const { + + const int16 logLineLen = 1024; + if(_category.isPriorityEnabled(priority)) { + char buffer [logLineLen]; + va_list args; + va_start(args, format); +#ifdef WIN32 + // Returns -1 if the buffer is truncated. + const int rc = vsnprintf_s(buffer, logLineLen, _TRUNCATE, format, args); + if (! ((rc > 0) || (rc == -1))) { + ::strcpy_s(buffer, "*** INTERNAL ERROR: UNABLE TO FORMAT MESSAGE ***"); +#else + const int rc = vsnprintf(buffer, logLineLen, format, args); + if (! (rc > 0)) { + ::strcpy(buffer, "*** INTERNAL ERROR: UNABLE TO FORMAT MESSAGE ***"); +#endif + } + + std::stringstream fullMsg; + fullMsg << + funcName << "|" << + lineNumber << "|" << + buffer; + + _category.log(priority, fullMsg.str()); + + va_end(args); + } +} + +bool CLogger::isPriorityEnabled(const log4cpp::Priority::Value priority) const { + return _category.isPriorityEnabled(priority); +} + +log4cpp::Priority::Value CLogger::getPriority() const { + return _category.getPriority(); +} + +void CLogger::setPriority(const log4cpp::Priority::Value priority) const { + _category.setPriority(priority); +} + +void CLogger::logBacktrace( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const std::deque& backtrace) const { + + if (backtrace.empty()) { + logVA(priority, funcName, lineNumber, "Backtrace is empty"); + } else { + for (std::deque::const_iterator iter = backtrace.begin(); + iter != backtrace.end(); iter++) { + std::string name = *iter; + if (!name.empty()) { + logVA(priority, funcName, lineNumber, "%s", name.c_str()); + } + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.h new file mode 100644 index 000000000..9530d850d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/CLogger.h @@ -0,0 +1,62 @@ +/* + * Author: bwilliams + * Created: 1/14/2011 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CLogger_h_ +#define CLogger_h_ + +namespace Caf { + +class LOGGING_LINKAGE CLogger +{ +public: + CLogger(const char* className); + virtual ~CLogger(); + +public: + void log( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const CCafException* cafException) const; + + void logMessage( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const char* message) const; + + void logVA( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const char* format, + ...) const; + + void logBacktrace( + const log4cpp::Priority::PriorityLevel priority, + const char* funcName, + const int32 lineNumber, + const std::deque& backtrace) const; + +public: + bool isPriorityEnabled(const log4cpp::Priority::Value priority) const; + + log4cpp::Priority::Value getPriority() const; + + void setPriority(const log4cpp::Priority::Value priority) const; + +private: + log4cpp::Category& _category; + +private: + CLogger(const CLogger&); + CLogger& operator=(const CLogger&); +}; + +} + +#endif // #define CLogger_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingLink.h new file mode 100644 index 000000000..7448a2e87 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingLink.h @@ -0,0 +1,37 @@ +/* + * Author: bwilliams + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef LOGGINGLINK_H_ +#define LOGGINGLINK_H_ + +#ifndef LOGGING_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define LOGGING_LINKAGE __declspec(dllexport) + #else + #define LOGGING_LINKAGE __declspec(dllimport) + #endif + #else + #define LOGGING_LINKAGE + #endif +#endif + +#include +#include +#define LOG4CPP_FIX_ERROR_COLLISION 1 +#include +#include +#include +#include +#include + +#include "../Exception/ExceptionLink.h" + +#include "CLogger.h" +#include "LoggingMacros.h" + +#endif /* LOGGINGLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingMacros.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingMacros.h new file mode 100644 index 000000000..677d355b2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/LoggingMacros.h @@ -0,0 +1,250 @@ +/* + * Author: bwilliams + * Created: 1/14/2011 + * + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef LoggingMacros_h_ +#define LoggingMacros_h_ + +#define CAF_CM_CREATE_LOG \ + private: \ + CLogger _logger + +#define CAF_CM_INIT_LOG( _className_ ) \ + _cm_className_( _className_ ), \ + _logger(_className_) + +#define CAF_CM_STATIC_FUNC_LOG_VALIDATE( _scope_, _funcName_ ) \ + CLogger _logger(_scope_); \ + CAF_CM_STATIC_FUNC_VALIDATE( _scope_, _funcName_ ) + +#define CAF_CM_STATIC_FUNC_LOG_ONLY( _scope_, _funcName_ ) \ + CLogger _logger(_scope_); \ + CAF_CM_FUNCNAME_VALIDATE( _funcName_ ) + +#define CAF_CM_STATIC_FUNC_LOG( _scope_, _funcName_ ) \ + CLogger _logger(_scope_); \ + CAF_CM_STATIC_FUNC( _scope_, _funcName_ ) + +#define CAF_CM_LOG_GET_PRIORITY (_logger.getPriority()) +#define CAF_CM_LOG_SET_PRIORITY(_priorityLevel_) (_logger.setPriority(_priorityLevel_)) +#define CAF_CM_IS_LOG_ENABLED(_priorityLevel_) (_logger.isPriorityEnabled(_priorityLevel_)) +#define CAF_CM_IS_LOG_DEBUG_ENABLED (_logger.isPriorityEnabled(log4cpp::Priority::DEBUG)) +#define CAF_CM_IS_LOG_INFO_ENABLED (_logger.isPriorityEnabled(log4cpp::Priority::INFO)) +#define CAF_CM_IS_LOG_WARN_ENABLED (_logger.isPriorityEnabled(log4cpp::Priority::WARN)) +#define CAF_CM_IS_LOG_ERROR_ENABLED (_logger.isPriorityEnabled(log4cpp::Priority::ERROR)) +#define CAF_CM_IS_LOG_CRIT_ENABLED (_logger.isPriorityEnabled(log4cpp::Priority::CRIT)) + +/* + * Provide priority level + */ +#define CAF_CM_LOG_CAFEXCEPTION(_priorityLevel_) { \ + _logger.log(_priorityLevel_, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_VA0(_priorityLevel_, _msg_) { \ + _logger.logMessage(_priorityLevel_, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_VA1(_priorityLevel_, _fmt_, _arg1_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_VA2(_priorityLevel_, _fmt_, _arg1_, _arg2_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_VA3(_priorityLevel_, _fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_VA4(_priorityLevel_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_VA5(_priorityLevel_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_VA6(_priorityLevel_, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(_priorityLevel_, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +/* + * Debug Macros + */ +#define CAF_CM_LOG_DEBUG_CAFEXCEPTION { \ + _logger.log(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_DEBUG_VA0(_msg_) { \ + _logger.logMessage(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_DEBUG_VA1(_fmt_, _arg1_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_DEBUG_VA2(_fmt_, _arg1_, _arg2_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_DEBUG_VA3(_fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_DEBUG_VA4(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_DEBUG_VA5(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_DEBUG_VA6(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(log4cpp::Priority::DEBUG, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +/* + * Info Macros + */ +#define CAF_CM_LOG_INFO_CAFEXCEPTION { \ + _logger.log(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_INFO_VA0(_msg_) { \ + _logger.logMessage(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_INFO_VA1(_fmt_, _arg1_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_INFO_VA2(_fmt_, _arg1_, _arg2_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_INFO_VA3(_fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_INFO_VA4(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_INFO_VA5(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_INFO_VA6(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(log4cpp::Priority::INFO, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +/* + * Warn Macros + */ +#define CAF_CM_LOG_WARN_CAFEXCEPTION { \ + _logger.log(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_WARN_VA0(_msg_) { \ + _logger.logMessage(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_WARN_VA1(_fmt_, _arg1_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_WARN_VA2(_fmt_, _arg1_, _arg2_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_WARN_VA3(_fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_WARN_VA4(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_WARN_VA5(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_WARN_VA6(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(log4cpp::Priority::WARN, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +/* + * Error Macros + */ +#define CAF_CM_LOG_ERROR_CAFEXCEPTION { \ + _logger.log(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_ERROR_VA0(_msg_) { \ + _logger.logMessage(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_ERROR_VA1(_fmt_, _arg1_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_ERROR_VA2(_fmt_, _arg1_, _arg2_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_ERROR_VA3(_fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_ERROR_VA4(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_ERROR_VA5(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_ERROR_VA6(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(log4cpp::Priority::ERROR, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +/* + * Crit Macros + */ +#define CAF_CM_LOG_CRIT_CAFEXCEPTION { \ + _logger.log(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _cm_exception_); \ + } + +#define CAF_CM_LOG_CRIT_VA0(_msg_) { \ + _logger.logMessage(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _msg_); \ + } + +#define CAF_CM_LOG_CRIT_VA1(_fmt_, _arg1_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_); \ + } + +#define CAF_CM_LOG_CRIT_VA2(_fmt_, _arg1_, _arg2_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_); \ + } + +#define CAF_CM_LOG_CRIT_VA3(_fmt_, _arg1_, _arg2_, _arg3_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_); \ + } + +#define CAF_CM_LOG_CRIT_VA4(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_); \ + } + +#define CAF_CM_LOG_CRIT_VA5(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_); \ + } + +#define CAF_CM_LOG_CRIT_VA6(_fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_) { \ + _logger.logVA(log4cpp::Priority::CRIT, _cm_funcName_, __LINE__, _fmt_, _arg1_, _arg2_, _arg3_, _arg4_, _arg5_, _arg6_); \ + } + +#endif // #define LoggingMacros_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/stdafx.h new file mode 100644 index 000000000..38d6f0328 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Logging/stdafx.h @@ -0,0 +1,34 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define LOGGING_LINKAGE __declspec(dllexport) + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) +#else + #define LOGGING_LINKAGE + #define COMMONAGGREGATOR_LINKAGE +#endif + +#include +#include +#include +#define LOG4CPP_FIX_ERROR_COLLISION 1 +#include +//#include +//#include +//#include +//#include + +#include "../Exception/ExceptionLink.h" + +#include "CLogger.h" +#include "LoggingMacros.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformIID.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformIID.cpp new file mode 100644 index 000000000..47379106f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformIID.cpp @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "PlatformIID.h" + +#include +#include +#ifndef WIN32 +#include +#include +#endif + +GMutex BasePlatform::gs_BaseIIDInitMutex; + +using namespace std; + +namespace BasePlatform { + +BASEPLATFORM_LINKAGE std::string UuidToString(const UUID& uuid) { + stringstream str; + str.fill('0'); + str.setf(ios_base::uppercase); + str.setf(ios_base::hex, ios_base::basefield); + str << setw(8) << uuid.Data1; + str << '-' << setw(4) << uuid.Data2; + str << '-' << setw(4) << uuid.Data3; + str << '-' << setw(2) << (int32)uuid.Data4[0]; + str << setw(2) << (int32)uuid.Data4[1]; + str << '-' << setw(2) << (int32)uuid.Data4[2]; + str << setw(2) << (int32)uuid.Data4[3]; + str << setw(2) << (int32)uuid.Data4[4]; + str << setw(2) << (int32)uuid.Data4[5]; + str << setw(2) << (int32)uuid.Data4[6]; + str << setw(2) << (int32)uuid.Data4[7]; + return str.str(); +} + +unsigned char Char2Bin(const unsigned char cucValue) +{ + unsigned char ucBinValue = 0; + if ('0' <= cucValue && '9' >= cucValue) + { + ucBinValue = cucValue - '0'; + } + else + { + ucBinValue = ::tolower(cucValue) - 'a' + 10; + } + return ucBinValue; +} + +BASEPLATFORM_LINKAGE HRESULT UuidFromString(const char* pszUuid, UUID& uuid) { + if (pszUuid) + { + // Check to see if the guid is surrounded by '{' '}' + if (*pszUuid == '{') { + pszUuid = &pszUuid[1]; + } + + if (::strlen(pszUuid) >= 36) + { + if (('-' != pszUuid[8]) || ('-' != pszUuid[13]) || + ('-' != pszUuid[18]) || ('-' != pszUuid[23])) + { + return E_INVALIDARG; + } + + for (int32 iLoop = 0; iLoop < 36; ++iLoop) + { + if (8 != iLoop && 13 != iLoop && 18 != iLoop && 23 != iLoop) + { +#if defined (__APPLE__) || defined (__hpux__) || defined (__sun__) || (defined (__linux__) && OS_RELEASE_MAJOR == 2) + if (!isxdigit(pszUuid[iLoop])) +#else + if (!::isxdigit(pszUuid[iLoop])) +#endif + { + return E_INVALIDARG; + } + } + } + + // so we've validated the string, so now we need to BCD it into + // the UUID structure - make a temporary and then memcpy it + uuid.Data1 = Char2Bin(pszUuid[0]) << 28; + uuid.Data1 |= Char2Bin(pszUuid[1]) << 24; + uuid.Data1 |= Char2Bin(pszUuid[2]) << 20; + uuid.Data1 |= Char2Bin(pszUuid[3]) << 16; + uuid.Data1 |= Char2Bin(pszUuid[4]) << 12; + uuid.Data1 |= Char2Bin(pszUuid[5]) << 8; + uuid.Data1 |= Char2Bin(pszUuid[6]) << 4; + uuid.Data1 |= Char2Bin(pszUuid[7]); + + uuid.Data2 = Char2Bin(pszUuid[9]) << 12; + uuid.Data2 |= Char2Bin(pszUuid[10]) << 8; + uuid.Data2 |= Char2Bin(pszUuid[11]) << 4; + uuid.Data2 |= Char2Bin(pszUuid[12]); + + uuid.Data3 = Char2Bin(pszUuid[14]) << 12; + uuid.Data3 |= Char2Bin(pszUuid[15]) << 8; + uuid.Data3 |= Char2Bin(pszUuid[16]) << 4; + uuid.Data3 |= Char2Bin(pszUuid[17]); + + uuid.Data4[0] = Char2Bin(pszUuid[19]) << 4; + uuid.Data4[0] |= Char2Bin(pszUuid[20]); + uuid.Data4[1] = Char2Bin(pszUuid[21]) << 4; + uuid.Data4[1] |= Char2Bin(pszUuid[22]); + uuid.Data4[2] = Char2Bin(pszUuid[24]) << 4; + uuid.Data4[2] |= Char2Bin(pszUuid[25]); + uuid.Data4[3] = Char2Bin(pszUuid[26]) << 4; + uuid.Data4[3] |= Char2Bin(pszUuid[27]); + uuid.Data4[4] = Char2Bin(pszUuid[28]) << 4; + uuid.Data4[4] |= Char2Bin(pszUuid[29]); + uuid.Data4[5] = Char2Bin(pszUuid[30]) << 4; + uuid.Data4[5] |= Char2Bin(pszUuid[31]); + uuid.Data4[6] = Char2Bin(pszUuid[32]) << 4; + uuid.Data4[6] |= Char2Bin(pszUuid[33]); + uuid.Data4[7] = Char2Bin(pszUuid[34]) << 4; + uuid.Data4[7] |= Char2Bin(pszUuid[35]); + + return S_OK; + } + else + { + return E_INVALIDARG; + } + } + + return E_INVALIDARG; +} +} +#ifndef WIN32 + +HRESULT UuidCreate(UUID* uuid) { + if (uuid) { + // a uuid is 16 bytes - we'll fill them with a + // random number (1st 4 bytes) + // the current time in seconds (2nd 4 bytes) + // the hostid of the machine (3rd 4 bytes) + // the current micro seconds (last 4 bytes) + int32 iRand = ::rand(); + struct timeval stTimeVal; + ::gettimeofday(&stTimeVal, NULL); + int32 iHostId = ::gethostid(); + + byte * pbUuid = reinterpret_cast(uuid); + ::memcpy(pbUuid, &iRand, 4); + ::memcpy(pbUuid+4, &stTimeVal.tv_sec, 4); + ::memcpy(pbUuid+8, &iHostId, 4); + ::memcpy(pbUuid+12, &stTimeVal.tv_usec, 4); + return S_OK; + } + else { + return OLE_E_BLANK; + } +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformStringFunc.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformStringFunc.cpp new file mode 100644 index 000000000..6ee8606bf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/PlatformStringFunc.cpp @@ -0,0 +1,36 @@ +/* + * Author: mdonahue + * Created: Jan 13, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "PlatformStringFunc.h" +#include + +using namespace std; + +namespace BasePlatform { +#ifdef fix +std::wstring A2W(const std::string& str) +{ + wstringstream wstm ; + const ctype& ctfacet = use_facet< ctype >(wstm.getloc()); + for (size_t i = 0; i < str.size(); ++i) { + wstm << ctfacet.widen(str[i]); + } + return wstm.str(); +} + +std::string W2A(const std::wstring& str) +{ + ostringstream stm; + const ctype& ctfacet = use_facet< ctype >(stm.getloc()); + for (size_t i = 0; i < str.size(); ++i) { + stm << ctfacet.narrow(str[i], 0); + } + return stm.str(); +} +#endif +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.cpp new file mode 100644 index 000000000..8000a4051 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.cpp @@ -0,0 +1,829 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "CEcmDllManager.h" + +#ifndef WIN32 + #include + #include + #include + #include +#endif + +#define _MAX_PATH_LARGE 32768 + +using namespace Caf; + +GRecMutex CEcmDllManager::ms_mutex; + +#if !defined( WIN32 ) +std::map CEcmDllManager::ms_mapLoadedModuleRefCounts; +std::map CEcmDllManager::ms_mapLoadedModules; +#endif + +// Here is where we work out which Unix OS style of dl functions we are +// going to use +// 1. we have all dl functions we need dlopen, dlclose, dladdr and dlsym +// 2. we have all dl functions except dladdr (AIX) +#if defined ( __sun__ ) || defined ( __linux__ ) || defined ( WIN32 ) || defined ( __hpux__ ) || defined (__APPLE__) +// we have everything we need +#elif defined ( _AIX ) + #include + #include + #include + extern "C" + { + extern int32 getargs(struct procsinfo*, int32, char*, int32); + } +#else + #error "Not yet ported to this platform" +#endif + +typedef BOOL (*DllMainPtr) (HINSTANCE, uint32, LPVOID); +static const char *gs_cszDllMainFunctionName = "DllMain"; +static const char *gs_cszMainFunctionName = "main"; +#ifdef _AIX +static const char *gs_cszInitFunctionName = "_GLOBAL__DI"; +#else +static const char *gs_cszInitFunctionName = "_init"; +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// LoadLibrary +// Loads a shared library from any OS +// +////////////////////////////////////////////////////////////////////////////// +HMODULE CEcmDllManager::LoadLibrary( + const char * cszLibName, + bool bMustInvokeDllMain, + bool bThrowExceptionUponFailure/* = true */) +{ + CAF_CM_STATIC_FUNC( "CEcmDllManager", "LoadLibrary" ); + CAF_CM_VALIDATE_STRINGPTRA( cszLibName ); + + HMODULE hRetModule = NULL; + bool bIsLoaded = false; + +#if defined (WIN32) + const char* libPrefix = NULL; + const char* libSuffix = ".dll"; +#elif defined (__APPLE__) + const char* libPrefix = "lib"; + const char* libSuffix = ".dylib"; +#elif defined (__linux__) + const char* libPrefix = "lib"; + const char* libSuffix = ".so"; +#else +#error 'NOT IMPLEMENTED FOR THIS OPERATING SYSTEM' +#endif + + std::string libName(cszLibName); + if (libPrefix != NULL && libName.compare(0, std::string::npos, libPrefix) != 0) { + libName.insert(0, libPrefix); + } + if (libName.find(libSuffix) == std::string::npos) { + libName += libSuffix; + } + + try + { +#if defined ( WIN32 ) + hRetModule = ::LoadLibraryExA( libName.c_str(), NULL, 0 ); + uint32 rc = ::GetLastError(); + + if ( NULL != hRetModule ) + { + bIsLoaded = true; + } + else + { + std::string strSystemMessage; + if ( ERROR_SUCCESS != rc ) + { + strSystemMessage = BasePlatform::PlatformApi::GetApiErrorMessage(rc); + } + else + { + strSystemMessage = "GetLastError() returned ERROR_SUCCESS but hRetModule is NULL"; + } + + CAF_CM_EXCEPTION_VA2( + rc, + "Failed to load library: %s Error: %s", + libName.c_str(), + strSystemMessage.c_str()); + } +#else + bool bLogLoading = ( ::getenv( "SYSLOG_DLOPENS" ) != NULL ); + + // this needs to be thread safe so that we dont lose the last error + // generated if a new thread also calls dlerror - unlike windows, the + // error message is not per thread. + CAutoMutexLockUnlockRaw oCS( &ms_mutex ); + + if ( bLogLoading ) + ::syslog(LOG_DEBUG, "---- Loading %s", libName.c_str() ); + + + // Let's see if we've already loaded it + std::map::iterator it = ms_mapLoadedModuleRefCounts.find( libName.c_str() ); + if ( it != ms_mapLoadedModuleRefCounts.end() ) + { + it->second.m_iRefCount++; + hRetModule = it->second.m_hModule; + if ( bLogLoading ) +#ifdef __x86_64__ + ::syslog(LOG_DEBUG," ------ Already loaded as %p count is now %d", hRetModule, it->second.m_iRefCount ); +#else + ::syslog(LOG_DEBUG," ------ Already loaded as %p count is now %d", hRetModule, it->second.m_iRefCount ); +#endif + } + else + { + hRetModule = ::dlopen( libName.c_str(), RTLD_NOW | RTLD_LOCAL ); + if ( bLogLoading ) +#ifdef __x86_64__ + ::syslog(LOG_DEBUG," ------ Loaded as %p" , hRetModule); +#else + ::syslog(LOG_DEBUG," ------ Loaded as %p" , hRetModule); +#endif + + if ( NULL == hRetModule ) + { + std::string strSystemMessage; + const char * pszMessage = dlerror(); + if ( NULL != pszMessage ) + { + strSystemMessage = pszMessage; + } + else + { + strSystemMessage = "dlerror() returned NULL"; + } + + CAF_CM_EXCEPTIONEX_VA2( + LibraryFailedToLoadException, + 0, + "Failed to load library: %s Error: %s", + libName.c_str(), + strSystemMessage.c_str()); + } + else + { + bIsLoaded = true; + std::string strSubErrorMessage; + + // not all compilers will call a method on initializing + // a shared library, so we will force ourselves to call one + // we will mimic the Windows DllMain functionality + DllMainPtr pfnDllMain = (DllMainPtr) + CEcmDllManager::GetFunctionAddress( + hRetModule, + gs_cszDllMainFunctionName, + strSubErrorMessage ); + + + if ( NULL != pfnDllMain ) + { + BOOL result = ( *pfnDllMain )( hRetModule, DLL_PROCESS_ATTACH, NULL ); + if ( false == result ) + { + CAF_CM_EXCEPTION_VA2(E_FAIL, + "%s in library %s returned false - library not loaded", + gs_cszDllMainFunctionName, + libName.c_str()); + } + } + else if ( bMustInvokeDllMain ) + { + CAF_CM_EXCEPTION_VA3(E_FAIL, + "Unable to find %s in library %s, Error: %s - library not loaded", + gs_cszDllMainFunctionName, + libName.c_str(), + strSubErrorMessage.c_str()); + } + SModuleRefCount stRefCount; + stRefCount.m_iRefCount = 1; + stRefCount.m_hModule = hRetModule; + std::string strModuleName( libName.c_str() ); + ms_mapLoadedModuleRefCounts.insert( std::make_pair(strModuleName, stRefCount ) ); + ms_mapLoadedModules.insert( std::make_pair( hRetModule, strModuleName ) ); + } + } +#endif + } + catch (CCafException *e) + { + _cm_exception_ = e; + } + + if ( _cm_exception_ ) + { + try + { + if ( bIsLoaded ) + { + CEcmDllManager::UnloadLibrary( hRetModule, false ); + } + } + catch (CCafException *e) + { + e->Release(); + } + + + // If we were told to eat the exception then do so + hRetModule = NULL; + if( !bThrowExceptionUponFailure ) + { + _cm_exception_->Release(); + } + else + { + _cm_exception_->throwSelf(); + } + } + return hRetModule; +} + +////////////////////////////////////////////////////////////////////////////// +// +// UnloadLibrary +// Unloads a shared library from any OS +// +////////////////////////////////////////////////////////////////////////////// +void CEcmDllManager::UnloadLibrary( HMODULE hLibraryHandle, bool bMustInvokeDllMain ) +{ + CAF_CM_STATIC_FUNC( "CEcmDllManager", "UnloadLibrary" ); + CAF_CM_VALIDATE_PTR( hLibraryHandle ); + +#if defined ( WIN32 ) + if ( ! ::FreeLibrary( hLibraryHandle ) ) + { + uint32 rc = ::GetLastError(); + std::string strSystemMessage; + if ( ERROR_SUCCESS != rc ) + { + strSystemMessage = BasePlatform::PlatformApi::GetApiErrorMessage(rc); + } + else + { + strSystemMessage = "GetLastError() returned ERROR_SUCCESS"; + } + + CAF_CM_EXCEPTION_VA1( + rc, + "::FreeLibrary failed: %s", + strSystemMessage.c_str()); + } +#else + // this needs to be thread safe so that we dont lose the last error + // generated if a new thread also calls dlerror - unlike windows, the + // error message is not per thread. + bool bLogLoading = ( ::getenv( "SYSLOG_DLOPENS" ) != NULL ); + + CAutoMutexLockUnlockRaw oCS( &ms_mutex ); + + if ( bLogLoading ) +#ifdef __x86_64__ + ::syslog( LOG_DEBUG, "---- Unloading %p", hLibraryHandle ); +#else + ::syslog( LOG_DEBUG, "---- Unloading %p", hLibraryHandle ); +#endif + // look for the specific library in our loaded list - + // we'll unload if the ref count hits 0 or if it doesn't exist + int32 iRefCount = 0; + std::map::iterator it = ms_mapLoadedModules.find( hLibraryHandle ); + if ( it != ms_mapLoadedModules.end() ) + { + if ( bLogLoading ) { + ::syslog( LOG_DEBUG, "------ Is Library %s", it->second.c_str() ); + } + + std::map::iterator itCnt = + ms_mapLoadedModuleRefCounts.find (it->second); + if ( itCnt != ms_mapLoadedModuleRefCounts.end() ) + { + iRefCount = --itCnt->second.m_iRefCount; + if ( iRefCount == 0 ) + ms_mapLoadedModuleRefCounts.erase( itCnt ); + } + if ( iRefCount == 0 ) + { + ms_mapLoadedModules.erase( it ); + } + } + + if ( bLogLoading ) + ::syslog( LOG_DEBUG, "------ ref count is %d", iRefCount ); + + if ( iRefCount == 0 ) + { + // not all compilers will call a method on initializing + // a shared library, so we will force ourselves to call one + // we will mimic the Windows DllMain functionality + std::string strSubErrorMessage; + DllMainPtr pfnDllMain = (DllMainPtr) CEcmDllManager::GetFunctionAddress( + hLibraryHandle, + gs_cszDllMainFunctionName, strSubErrorMessage ); + + if ( NULL != pfnDllMain ) + { + BOOL result = ( *pfnDllMain )( hLibraryHandle, DLL_PROCESS_DETACH, NULL ); + if ( false == result ) + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "%s returned false - library not unloaded", + gs_cszDllMainFunctionName); + } + } + else if ( bMustInvokeDllMain ) + { + CAF_CM_EXCEPTION_VA2(E_FAIL, + "Unable to find %s, Error: %s, returned false - library not unloaded", + gs_cszDllMainFunctionName, + strSubErrorMessage.c_str()); + } + + if ( 0 != ::dlclose( hLibraryHandle ) ) + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Unable to unload library %s", + ::dlerror()); + } + } +#endif +} + +////////////////////////////////////////////////////////////////////////////// +// +// GetFunctionAddress +// +// Finds the specified symbol in a library +// +////////////////////////////////////////////////////////////////////////////// +void * CEcmDllManager::GetFunctionAddress( HMODULE hLibraryHandle, const char * cszFunctionName, std::string & rstrErrorMessage ) +{ + CAF_CM_STATIC_FUNC_VALIDATE( "CEcmDllManager", "GetFunctionAddress" ); + CAF_CM_VALIDATE_STRINGPTRA( cszFunctionName ); + // It is legal for a NULL handle to be passed in - NULL is the + // executable + + void * pvRetAddress = NULL; + + rstrErrorMessage = ""; + +#if defined ( WIN32 ) + + pvRetAddress = ::GetProcAddress( hLibraryHandle, cszFunctionName ); + if ( NULL == pvRetAddress ) + { + uint32 rc = ::GetLastError(); + rstrErrorMessage = "Unable to locate function "; + rstrErrorMessage += cszFunctionName; + rstrErrorMessage += ", Error : "; + if ( ERROR_SUCCESS != rc ) + { + rstrErrorMessage += BasePlatform::PlatformApi::GetApiErrorMessage(rc); + } + else + { + rstrErrorMessage += "GetLastError() returned ERROR_SUCCESS"; + } + } +#else + CAutoMutexLockUnlockRaw oCS( &ms_mutex ); + try + { + pvRetAddress = ::dlsym( hLibraryHandle, cszFunctionName ); + } + catch (...) + { + // if we were passed a bad handle, this can cause a seg + // violation - so treat it as a regular error + // Note : Sometimes we can do nothing about it and the + // program will crash + pvRetAddress = NULL; + } + + if ( NULL == pvRetAddress ) + { + rstrErrorMessage = "Unable to locate function "; + rstrErrorMessage += cszFunctionName; + rstrErrorMessage += ", Error : "; + const char * pszError = ::dlerror(); + if ( NULL != pszError ) + { + rstrErrorMessage += pszError; + } + else + { + rstrErrorMessage += "dlerror() returned NULL"; + } + } +#endif + + return pvRetAddress; +} + +////////////////////////////////////////////////////////////////////////////// +// +// GetLibraryNameFromHandle +// Determines the name of a library from its handle. +// We are going to need to add functionality here for AIX 4.3.3 and HPUX10.20 +// +////////////////////////////////////////////////////////////////////////////// +void CEcmDllManager::GetLibraryNameFromHandle ( HMODULE hLibraryHandle, std::string & rstrLibName ) +{ + CAF_CM_STATIC_FUNC( "CEcmDllManager", "GetLibraryNameFromHandle" ); + // it is legal for hLibraryModule to be NULL (it's the executable) + // so don't validate it + + rstrLibName = ""; +#if defined ( WIN32 ) + char szFilePath[ _MAX_PATH_LARGE ] = {0}; + if (0 != ::GetModuleFileNameA( hLibraryHandle, szFilePath, _MAX_PATH_LARGE - 1)) + { + rstrLibName = szFilePath; + } + else + { + uint32 rc = ::GetLastError(); + std::string strErrorMessage( "Error Getting Module Name " ); + strErrorMessage += ", Error : "; + if ( ERROR_SUCCESS != rc ) + { + strErrorMessage += BasePlatform::PlatformApi::GetApiErrorMessage(rc); + } + else + { + strErrorMessage += "GetLastError() returned ERROR_SUCCESS"; + } + CAF_CM_EXCEPTION_VA0(rc, strErrorMessage.c_str()); + } +#else + // we know that all of our libs must have a DllMain function + // so look it up in the specified library and then + // use its address to find the name + std::string strSubErrorMessage; + void * vpAddress = NULL; + + if ( NULL == hLibraryHandle ) + { + // if its the NULL handle, we really want to look + // at the main program, on AIX we need to get the 1st entry from + // loadquery, otherwise we can use dlopen on NULL + GetMainProgramName( rstrLibName ); + } + else + { + // In a dll we need to look for DllMain + vpAddress = CEcmDllManager::GetFunctionAddress( hLibraryHandle, + gs_cszDllMainFunctionName, + strSubErrorMessage ); + + + if ( NULL == vpAddress ) + { + // try looking for main as well + vpAddress = CEcmDllManager::GetFunctionAddress( hLibraryHandle, + gs_cszMainFunctionName, + strSubErrorMessage ); + } + + if ( NULL == vpAddress ) + { + // try looking for _init as well + vpAddress = CEcmDllManager::GetFunctionAddress( hLibraryHandle, + gs_cszInitFunctionName, + strSubErrorMessage ); + } + + if ( vpAddress ) + { + CEcmDllManager::GetLibraryNameFromAddress( vpAddress, rstrLibName ); + } + else + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Cannot find symbol in library, cannot resolve library handle to file name: %s", + strSubErrorMessage.c_str()); + } + } +#endif +} + +////////////////////////////////////////////////////////////////////////////// +// +// GetLibraryNameFromAddress +// Determines which library/exe contains the specific address (Unix only). +// We are going to need to add functionality here for AIX 4.3.3 and HPUX10.20 +// +////////////////////////////////////////////////////////////////////////////// +void CEcmDllManager::GetLibraryNameFromAddress( const void * cpvAddressInLibrary, std::string & rstrLibName ) +{ + CAF_CM_STATIC_FUNC( "CEcmDllManager", "GetLibraryNameFromAddress" ); + + char * szBuffer = NULL; + + try + { +#if defined ( WIN32 ) + CAF_CM_EXCEPTION_VA0( + E_NOTIMPL, + "CEcmDllManager::GetLibraryNameFromAddress not implemented"); + +#elif defined ( __sun__ ) || defined ( __linux__ ) || defined ( __hpux__ ) || defined (__APPLE__) + + CAutoMutexLockUnlockRaw oCS( &ms_mutex ); + Dl_info stDlInfo; + + if ( 0 != ::dladdr( const_cast( cpvAddressInLibrary ), &stDlInfo ) ) + { + char szFilePath[ 32768 ]; + ::realpath( stDlInfo.dli_fname, szFilePath ); + rstrLibName = szFilePath; + } + else + { + std::string strErrorMessage( "Unable to locate address in library " ); + strErrorMessage += ", Error : "; + const char * pszError = ::dlerror(); + if ( NULL != pszError ) + { + strErrorMessage += pszError; + } + else + { + strErrorMessage += "dlerror() returned NULL"; + } + CAF_CM_EXCEPTION_EFAIL(strErrorMessage.c_str()); + } + +#elif defined ( _AIX ) + + szBuffer = static_cast( ::malloc(1024) ); + int32 iSize = 1024; + + int32 iRc = ::loadquery( L_GETINFO, static_cast( szBuffer ),iSize); + + while ( ( -1 == iRc ) && ( ENOMEM == errno ) ) + { + ::free( szBuffer ); + iSize += 1024; + szBuffer = static_cast( ::malloc( iSize ) ); + iRc = ::loadquery( L_GETINFO, static_cast( szBuffer ),iSize); + } + + if ( -1 == iRc ) + { + ::free( szBuffer ); + szBuffer = NULL; + CAF_CM_EXCEPTION( "::loadquery failed", errno ); + } + + + ld_info * pLdInfo = reinterpret_cast( szBuffer ); + + while ( pLdInfo ) + { + void * pvUpper = reinterpret_cast( + reinterpret_cast( pLdInfo->ldinfo_dataorg) + + pLdInfo->ldinfo_datasize ); + + if ( ( cpvAddressInLibrary >= pLdInfo->ldinfo_dataorg ) && + ( cpvAddressInLibrary < pvUpper ) ) + { + char szFilePath[ _MAX_PATH ]; + ::realpath( pLdInfo->ldinfo_filename, szFilePath ); + rstrLibName = szFilePath; + break; + } + else + { + if ( pLdInfo->ldinfo_next == 0 ) + pLdInfo = NULL; + else + pLdInfo = reinterpret_cast ( + reinterpret_cast( pLdInfo ) + + pLdInfo->ldinfo_next ); + } + } + + ::free( szBuffer ); + szBuffer = NULL; + + if ( rstrLibName.length() == 0 ) + { + CAF_CM_EXCEPTION_EFAIL("Unable to locate address in library"); + } + +#else +#error "Not yet implemented on this platform"; +#endif + } + catch(CCafException *e) + { + _cm_exception_ = e; + } + + if ( szBuffer ) + { + ::free( szBuffer ); + } + + if ( _cm_exception_ ) + { + throw _cm_exception_; + } +} + +////////////////////////////////////////////////////////////////////////////// +// +// GetMainProgramName +// Determines the name of the current program. +// We are going to need to add functionality here for AIX 4.3.3 and HPUX10.20 +// +////////////////////////////////////////////////////////////////////////////// +void CEcmDllManager::GetMainProgramName ( std::string & rstrProgName ) +{ + CAF_CM_STATIC_FUNC( "CEcmDllManager", "GetMainProgramName" ); + + char * szBuffer = NULL; + HMODULE hSearchModule = NULL; + std::string strSubErrorMessage; + try + { + rstrProgName = ""; +#if defined ( WIN32 ) + + char szFilePath[ _MAX_PATH_LARGE] = {0}; + if ( 0 != ::GetModuleFileNameA( NULL, szFilePath, _MAX_PATH_LARGE-1) ) + { + rstrProgName = szFilePath; + } + else + { + uint32 rc = ::GetLastError(); + std::string strErrorMessage( "Error Getting Module Name " ); + strErrorMessage += ", Error : "; + if ( ERROR_SUCCESS != rc ) + { + strErrorMessage += BasePlatform::PlatformApi::GetApiErrorMessage(rc); + } + else + { + strErrorMessage += "GetLastError() returned ERROR_SUCCESS"; + } + CAF_CM_EXCEPTION_VA0(rc, strErrorMessage.c_str()); + } +#elif defined ( _AIX ) + + // on AIX we need to get the 1st entry from + // loadquery, otherwise we can use dlopen on NULL + szBuffer = static_cast( ::malloc(1024) ); + int32 iSize = 1024; + + int32 iRc = ::loadquery( L_GETINFO, + static_cast( szBuffer ),iSize); + + while ( ( -1 == iRc ) && ( ENOMEM == errno ) ) + { + ::free( szBuffer ); + iSize += 1024; + szBuffer = static_cast( ::malloc( iSize ) ); + iRc = ::loadquery( L_GETINFO, + static_cast( szBuffer ),iSize); + } + + if ( -1 == iRc ) + { + ::free( szBuffer ); + szBuffer = NULL; + CAF_CM_EXCEPTION( "::loadquery failed", errno ); + } + + + ld_info * pLdInfo = reinterpret_cast( szBuffer ); + + char szFilePath[ _MAX_PATH ]; + if ( NULL == ::realpath( pLdInfo->ldinfo_filename, szFilePath ) ) + { + std::string strError( "::realpath failed for " ); + strError += pLdInfo->ldinfo_filename; + strError += " attempting ::getargs"; + CAF_CM_WARNING( static_cast( strError ) ); + + // use getargs to get arg 0 + struct procsinfo stProcInfo; + stProcInfo.pi_pid = ::getpid(); + char aszArgs[_MAX_PATH * 2]; + if ( 0 == ::getargs( &stProcInfo, sizeof(procsinfo), + aszArgs, _MAX_PATH * 2 ) ) + { + if ( NULL == ::realpath( aszArgs, szFilePath ) ) + { + std::string strError( "::realpath failed - using result of getargs "); + strError += pLdInfo->ldinfo_filename ; + CAF_CM_ERROR( static_cast( strError ), + errno ); + } + else + { + rstrProgName = szFilePath; + } + } + else + { + std::string strError( "::getargs failed - using result of loadquery " ); + strError += pLdInfo->ldinfo_filename; + CAF_CM_ERROR( static_cast( strError ), + errno ); + } + } + else + { + // set from the realpath command + rstrProgName = szFilePath; + } + + ::free( szBuffer ); + szBuffer = NULL; + +#elif defined ( __linux__ ) || defined ( __sun__ ) + // we know that all of our libs must have a DllMain function + // so look it up in the specified library and then + // use its address to find the name + void * vpAddress = NULL; + hSearchModule = ::dlopen( NULL, RTLD_LAZY | RTLD_LOCAL ); + + if ( ! hSearchModule ) + { + CAF_CM_EXCEPTION_EFAIL(::dlerror()); + } + + // In a dll we need to look for DllMain + vpAddress = CEcmDllManager::GetFunctionAddress( hSearchModule, + gs_cszDllMainFunctionName, + strSubErrorMessage ); + + + if ( NULL == vpAddress ) + { + // try looking for main as well + vpAddress = CEcmDllManager::GetFunctionAddress( hSearchModule, + gs_cszMainFunctionName, + strSubErrorMessage ); + } + + if ( NULL == vpAddress ) + { + // try looking for _init as well + vpAddress = CEcmDllManager::GetFunctionAddress( hSearchModule, + gs_cszInitFunctionName, + strSubErrorMessage ); + } + + if ( vpAddress ) + { + CEcmDllManager::GetLibraryNameFromAddress( vpAddress, rstrProgName ); + } + else + { + std::string strErrorMessage( "Cannot find symbol in library, cannot resolve library handle to file name" ); + strErrorMessage += strSubErrorMessage; + CAF_CM_EXCEPTION_EFAIL(strErrorMessage.c_str()); + } +#else + CAF_CM_EXCEPTION_VA0(E_NOTIMPL, "Not Yet Ported to this platform"); +#endif + } + catch (CCafException* e) + { + _cm_exception_ = e; + } + +#ifndef WIN32 + if ( hSearchModule ) + { + ::dlclose(hSearchModule); + } +#endif + + if ( szBuffer ) + { + ::free( szBuffer ); + } + + if ( _cm_exception_ ) + { + throw _cm_exception_; + } +} + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.h new file mode 100644 index 000000000..f6a26982c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmDllManager.h @@ -0,0 +1,47 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ +#ifndef _CEcmDllManager_H +#define _CEcmDllManager_H + +#include +#include + +namespace Caf { + +class SUBSYSTEMBASE_LINKAGE CEcmDllManager { +public: + static HMODULE LoadLibrary( const char * cpszLibName, bool bMustInvokeDllMain,bool bThrowExceptionUponFailure = true ); + static void UnloadLibrary( HMODULE hLibraryHandle, bool bMustInvokeDllMain ); + static void * GetFunctionAddress( HMODULE hLibraryHandle, const char * cpszFunctionName, std::string & rstrErrorMessage ); + static void GetLibraryNameFromHandle ( HMODULE hLibraryHandle, std::string & rstrLibName ); + +private: // a purely static class + CEcmDllManager(); + ~CEcmDllManager(); + CEcmDllManager( const CEcmDllManager& ); + CEcmDllManager& operator=( const CEcmDllManager& ); + +private: // used internally on Unix platforms + static void GetLibraryNameFromAddress( const void * cpvAddressInLibrary, std::string & rstrLibName ); + static void GetMainProgramName( std::string & rstrProgName ); + +private: + static GRecMutex ms_mutex; + +#ifndef WIN32 + struct SModuleRefCount + { + HMODULE m_hModule; + int32 m_iRefCount; + }; + static std::map ms_mapLoadedModuleRefCounts; + static std::map ms_mapLoadedModules; +#endif +}; +} + +#endif // _CEcmDllManager_H + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.cpp new file mode 100644 index 000000000..be7b333c2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.cpp @@ -0,0 +1,339 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "CEcmSubSystem.h" +#include "EcmSubSystemBase.h" +#include "CEcmSubSystemRegistry.h" + +#ifdef WIN32 +#ifdef CFC_AS_STATIC_LIB +#define IStream ::IStream +#endif +#include +#ifdef CFC_AS_STATIC_LIB +#undef IStream +#endif +#endif + +#include "CEcmDllManager.h" + +using namespace Caf; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// +std::map CEcmSubSystem::m_mapModuleCache; + +GRecMutex CEcmSubSystem::m_oModuleCacheMutex; + +CEcmSubSystem::CEcmSubSystem(bool bIsUnloadable) : + CAF_CM_INIT_LOG("CEcmSubSystem"), + m_bIsUnloadable(bIsUnloadable), + m_hModule(NULL), + m_pfnCreateInstance(NULL), + m_pfnCanUnloadNow(NULL) +{ +} + +CEcmSubSystem::~CEcmSubSystem() +{ +} + +bool CEcmSubSystem::IsRegistered( const std::string & rstrSubSystemIdentifier ) +{ + CAF_CM_FUNCNAME_VALIDATE("IsRegistered"); + + bool bRetVal = false; + + CAF_CM_VALIDATE_STRINGPTRA(rstrSubSystemIdentifier.c_str()); + bRetVal = CEcmSubSystemRegistry::IsRegistered( rstrSubSystemIdentifier ); + + return bRetVal; +} + +void CEcmSubSystem::Load(const std::string& rstrSubSystemIdentifier) +{ + CAF_CM_FUNCNAME("Load"); + + // Make sure that we have sub-system name. + CAF_CM_VALIDATE_STRINGPTRA(rstrSubSystemIdentifier.c_str()); + + // If this is an unloadable sub-system... + if(m_bIsUnloadable) + { + // make sure it is unlaoded before loading the next one. + Unload(); + } + // Otherwise... + else + { + // if there is already a module loaded by this sub-system + // object... + if(NULL != m_hModule) + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "The sub-system %s is already loaded. Load may not be called again.", + rstrSubSystemIdentifier.c_str()); + } + } + + // Create a helper to make sure we unlock the critical section. + CAutoMutexLockUnlockRaw oCS( &m_oModuleCacheMutex ); + + // Before we do the lookup again, lets check the cache to see if we + // already have the module. + std::map::iterator iterModule = + m_mapModuleCache.find(rstrSubSystemIdentifier); + + // If we found the module in the cache... + if(iterModule != m_mapModuleCache.end()) + { + // set from the cache, and we're done. + m_hModule = iterModule->second; + m_strSubSystemIdentifier = rstrSubSystemIdentifier; + + //CAF_CM_LOG_DEBUG_VA2("Found the subsystem in the cache - id: %s, module: %p", + // m_strSubSystemIdentifier.c_str(), m_hModule); + } + // Otherwise, look in the registry for the sub-system module. + else + { + // Create a registry object. + if (CEcmSubSystemRegistry::IsRegistered( rstrSubSystemIdentifier )) { + std::string modulePath = CEcmSubSystemRegistry::GetModulePath( rstrSubSystemIdentifier ); + if ( modulePath.length() ) + { + // load the DLL. + m_hModule = CEcmDllManager::LoadLibrary( modulePath.c_str(), true ); + + // Record the sub-system identifier. + m_strSubSystemIdentifier = rstrSubSystemIdentifier; + + // Insert the sub-system id to module mapping entry. + m_mapModuleCache.insert( + std::pair + (rstrSubSystemIdentifier, m_hModule)); + + //CAF_CM_LOG_DEBUG_VA3("Loaded the subsystem - id: %s, path: %s, module: %p", + // m_strSubSystemIdentifier.c_str(), modulePath.c_str(), m_hModule); + } + else + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Failed to load subsystem %s - Registered but modulePath is empty", + rstrSubSystemIdentifier.c_str()); + } + } + else + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Failed to load subsystem %s - Not registered", + rstrSubSystemIdentifier.c_str()); + } + } +} + +bool CEcmSubSystem::Unload( const bool cbMustUnloadNow /* = true */ ) +{ + CAF_CM_FUNCNAME("Unload"); + + bool bSubsystemWasUnloaded = false; + // If the sub-system is unloadable... + if(m_bIsUnloadable) + { + // and there is a module actually loaded... + if(NULL != m_hModule) + { + // if we don't already have it... + if(NULL == m_pfnCanUnloadNow) + { + std::string strErrorMessage; + // get the address of the sub-system's can unload function. + m_pfnCanUnloadNow = (CanUnloadNowFunc) + CEcmDllManager::GetFunctionAddress(m_hModule, CAN_UNLOAD_NOW, strErrorMessage ); + + // If we did not got the function pointer... + if(NULL == m_pfnCanUnloadNow) + { + // throw an exception indicating that the can unload + // function could not be found. + CAF_CM_EXCEPTION_EFAIL(strErrorMessage); + } + } + + if(m_pfnCanUnloadNow()) + { + // free the library, and + CEcmDllManager::UnloadLibrary( m_hModule, true ); + // Create a helper to make sure we unlock the critical section. + CAutoMutexLockUnlockRaw oCS( &m_oModuleCacheMutex ); + + // try to find the module entry. + std::map::iterator iterModule = + m_mapModuleCache.find(m_strSubSystemIdentifier); + + // If we found the module in the cache... + if(iterModule != m_mapModuleCache.end()) + { + // remove if from the cache. + m_mapModuleCache.erase(iterModule); + } + + bSubsystemWasUnloaded = true; + // Reset the member variables to an initialized state. + m_hModule = NULL; + m_pfnCreateInstance = NULL; + m_pfnCanUnloadNow = NULL; + m_strSubSystemIdentifier = ""; + } + // Otherwise, the sub-system is telling us it cannot safely be + // unloaded at this time, if the caller indicated that it must + // unload now we fail unload + else if ( cbMustUnloadNow ) + { + // throw an exception indicating the condition. + CAF_CM_EXCEPTION_EFAIL("Unable to safely unload the sub-system at this time."); + } + } + + // Otherwise, they are trying to unload nothing, so let them. + } + // If the sub-system is not unloadable... + else + { + // and there is a module actually loaded... + if(NULL != m_hModule) + { + // throw an exception. + CAF_CM_EXCEPTION_EFAIL("Unable to unload an unloadable sub-system."); + } + + // Otherwise, they are trying to unload nothing, so let them. + } + + return bSubsystemWasUnloaded; +} + +void CEcmSubSystem::CreateInstance( const std::string & rstrIdentifier, const IID & riid, void ** ppv ) +{ + CAF_CM_FUNCNAME( "CreateInstance" ); + + // If the sub-system is not loaded... + if(NULL == m_hModule) + { + // throw an exception indicating that the sub-system must be + // loaded before object instance can be created from it. + CAF_CM_EXCEPTION_EFAIL("No sub-system is loaded. You must call Load before " + "object instances can be created."); + } + + // If we don't already have a pointer to the CreateInstance + // function provided by the sub-system DLL... + if(NULL == m_pfnCreateInstance) + { + //CAF_CM_LOG_DEBUG_VA2("Getting CreateInstance - id: %s, module: %p", + // rstrIdentifier.c_str(), m_hModule); + + std::string strErrorMessage; + // get the address of the CreateInstance function. + m_pfnCreateInstance = + (void (*)( const char* rstrIdentifier, const IID & riid, void ** ppv )) + CEcmDllManager::GetFunctionAddress(m_hModule, CREATE_INSTANCE, strErrorMessage ); + + // If we did not get the function pointer... + if(NULL == m_pfnCreateInstance) + { + // throw an exception indicating that the create instance + // could not be found. + CAF_CM_EXCEPTION_EFAIL(strErrorMessage); + } + } + + // Call the function, passing in the supplied arguments. + m_pfnCreateInstance(rstrIdentifier.c_str(), riid, ppv); +} + + +//////////////////////////////////////////////////////////////////////// +// +// CEcmSubSystem::CEcmSubSystem( CEcmSubSystem ) +// +// overloaded copy constructor +// +//////////////////////////////////////////////////////////////////////// +CEcmSubSystem::CEcmSubSystem( const CEcmSubSystem& crCEcmSubSystem ) : + CAF_CM_INIT_LOG("CEcmSubSystem") +{ + m_bIsUnloadable = crCEcmSubSystem.m_bIsUnloadable; + m_strSubSystemIdentifier = crCEcmSubSystem.m_strSubSystemIdentifier; + m_hModule = crCEcmSubSystem.m_hModule; + m_pfnCreateInstance = crCEcmSubSystem.m_pfnCreateInstance; + m_pfnCanUnloadNow = crCEcmSubSystem.m_pfnCanUnloadNow; +} + + + +//////////////////////////////////////////////////////////////////////// +// +// CEcmSubSystem::operator=() +// +// overloaded = operator +// +//////////////////////////////////////////////////////////////////////// +CEcmSubSystem& CEcmSubSystem::operator=( const CEcmSubSystem& crCEcmSubSystem ) +{ + m_bIsUnloadable = crCEcmSubSystem.m_bIsUnloadable; + m_strSubSystemIdentifier = crCEcmSubSystem.m_strSubSystemIdentifier; + m_hModule = crCEcmSubSystem.m_hModule; + m_pfnCreateInstance = crCEcmSubSystem.m_pfnCreateInstance; + m_pfnCanUnloadNow = crCEcmSubSystem.m_pfnCanUnloadNow; + + return *this; + +} + + + +//////////////////////////////////////////////////////////////////////// +// +// CEcmSubSystem::IsUnloadable() +// +// returns true if this subsystem is unloadable, false if it isn't +// +//////////////////////////////////////////////////////////////////////// +bool CEcmSubSystem::IsUnloadable() const +{ + return m_bIsUnloadable; +} + + + +//////////////////////////////////////////////////////////////////////// +// +// CEcmSubSystem::GetSubSystemID() +// +// returns the subystem identifier +// +//////////////////////////////////////////////////////////////////////// +std::string CEcmSubSystem::GetSubSystemID() const +{ + return m_strSubSystemIdentifier; +} + + +//////////////////////////////////////////////////////////////////////// +// +// CEcmSubSystem::operator<() +// +// overloaded < operator +// +//////////////////////////////////////////////////////////////////////// +bool CEcmSubSystem::operator< ( const CEcmSubSystem& crCEcmSubsystemRight ) const +{ + return (::strcmp(m_strSubSystemIdentifier.c_str(), crCEcmSubsystemRight.GetSubSystemID().c_str()) < 0); +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.h new file mode 100644 index 000000000..aefecde41 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystem.h @@ -0,0 +1,70 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _CEcmSubSystem_H_ +#define _CEcmSubSystem_H_ + +#include + +namespace Caf { + +// Typedef the function pointers. +typedef void ( * CreateInstanceFunc )( const char*, const IID & riid, void ** ppv ) ; + +typedef bool( * CanUnloadNowFunc )(); + +// Class declaration +class SUBSYSTEMBASE_LINKAGE CEcmSubSystem +{ +public: + CEcmSubSystem( bool bIsUnloadable = false ); + virtual ~ CEcmSubSystem(); + + bool IsRegistered( const std::string & rstrSubSystemIdentifier ); + void Load( const std::string & rstrSubSystemIdentifier ); + bool IsUnloadable() const; + std::string GetSubSystemID() const; + bool Unload( const bool cbMustUnloadNow = true ); + void GetVersionInfo(); + void CreateInstance( const std::string & rstrIdentifier, const IID & riid, + void ** ppv ); + +public: // copy constructor and assignment operator + CEcmSubSystem( const CEcmSubSystem& crCEcmSubSystem); + CEcmSubSystem& operator= ( const CEcmSubSystem& crCEcmSubSystem ); + +public: // less than, allows use in associative containers + bool operator< ( const CEcmSubSystem& ) const; + +private: + // Standard ECM macro for a standard object. + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + + // Flag indicating whether a sub-system is able to be unloaded. + bool m_bIsUnloadable; + + // Sub-system identifier. + std::string m_strSubSystemIdentifier; + + // Sub-system DLL module handle. + HMODULE m_hModule; + + // A map to hold a module cache. + static std::map m_mapModuleCache; + + // A critical section to protect the module cache. + static GRecMutex m_oModuleCacheMutex; + + // A pointer to the create instance of the function of the sub-system. + CreateInstanceFunc m_pfnCreateInstance; + + // A pointer to the can unload function of the sub-system. + CanUnloadNowFunc m_pfnCanUnloadNow; +}; +} + +#endif // _CEcmSubSystem_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.cpp new file mode 100644 index 000000000..8178c0786 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.cpp @@ -0,0 +1,300 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "CEcmSubSystemModule.h" +#include "CEcmSubSystemRegistry.h" +#include "CEcmDllManager.h" +#include "TCafSubSystemCreator.h" + +using namespace Caf; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CEcmSubSystemModule::CEcmSubSystemModule() : + CAF_CM_INIT_LOG("CEcmSubSystemModule"), + m_pObjectEntries(NULL), + m_hInstance(NULL), + m_lLockCount(0) +{ + +} + +CEcmSubSystemModule::~CEcmSubSystemModule() +{ +} + +void CEcmSubSystemModule::Init(const _CAF_OBJECT_ENTRY* const pObjectEntries, + const HINSTANCE hInstance) +{ + CAF_CM_FUNCNAME("Init"); + + try + { + // Initialize the QI maps of all registered objects + // to prevent multithreading problems + uint32 dwIdx = 0; + while (pObjectEntries[dwIdx].pfnGetEntries) + { + // Ignore the return value - we are just causing + // the QI map to initialize by calling the func + (void)pObjectEntries[dwIdx].pfnGetEntries(); + + CAF_CM_LOG_DEBUG_VA3("Initializing object entries - index: %d, objId: %s, module: %p", + dwIdx, pObjectEntries[dwIdx].pfnIdentifier(), hInstance); + + ++dwIdx; + } + + // Initialize the member variables + m_pObjectEntries = pObjectEntries; + m_hInstance = hInstance; + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; +} + +void CEcmSubSystemModule::Term() +{ + CAF_CM_FUNCNAME("Term"); + + try + { + // Loop through the Object Entries table and release the singletons + uint32 dwIndex = 0; + while(m_pObjectEntries && m_pObjectEntries[dwIndex].pfnCreator) + { + // If this is a sub-system... + if(m_pObjectEntries[dwIndex].bIsSingleton && m_pObjectEntries[dwIndex].pCachedObject) + { + ( m_pObjectEntries[dwIndex].pCachedObject )->Release(); + m_pObjectEntries[dwIndex].pCachedObject = NULL; + } + + // Increment the index. + ++ dwIndex; + } + } + CAF_CM_CATCH_ALL; + CAF_CM_CLEAREXCEPTION; + + // Set the instance handle to NULL. + m_hInstance = NULL; + + // Set the object entries pointer to NULL. + m_pObjectEntries = NULL; +} + +void CEcmSubSystemModule::Lock() +{ + g_atomic_int_inc(&m_lLockCount); +} + +void CEcmSubSystemModule::Unlock() +{ + (void)g_atomic_int_dec_and_test(&m_lLockCount); +} + +void CEcmSubSystemModule::CreateInstance(const char* crstrIdentifier, const IID& criid, void** ppv) +{ + CAF_CM_FUNCNAME("CreateInstance"); + + CAF_CM_VALIDATE_STRINGPTRA(crstrIdentifier); + CAF_CM_VALIDATE_PTR(ppv); + + // Initialize the out-param + *ppv = NULL; + + // Declare flag indicating that the identifier was found in the map. + bool bFoundIdentifier = false; + + // Declare and index for iterating over the object map. + uint32 dwIndex = 0; + + // Loop through the Object Entries table... + CAF_CM_LOG_DEBUG_VA1("Looking for ID - %s", crstrIdentifier); + while(m_pObjectEntries && m_pObjectEntries[dwIndex].pfnCreator) + { + // comparing the supplied identifier to the identifier in the + // table. If we find a match... + CAF_CM_LOG_DEBUG_VA2("Comparing to - index: %d, objId: %s", + dwIndex, m_pObjectEntries[dwIndex].pfnIdentifier()); + if(::strcmp(crstrIdentifier, m_pObjectEntries[dwIndex].pfnIdentifier()) == 0) + { + // indicate we found the identifier + bFoundIdentifier = true; + +#ifdef IMPLEMENT_SINGLETONS + // If this is the subsystem singleton manager... + if(::strcmp(crstrIdentifier, _sObjIdSubsystemSingletonManager) == 0) + { + // Check for a cached object. + if(m_pObjectEntries[dwIndex].pCachedObject) + { + // Use the cached object. + m_pObjectEntries[dwIndex].pCachedObject->QueryInterface(criid, ppv); + } + else + { + // Call the creator function associated with the identifier. + createInstanceException = true; + ICafObject* pEcmObject = 0; + TCafSubSystemCreator::CreateInstance( m_pObjectEntries[dwIndex].pfnCreator, + CAF_IIDOF(ICafObject), + reinterpret_cast(&pEcmObject)); + + // Cache the object. + pEcmObject->QueryInterface(criid, ppv); + m_pObjectEntries[dwIndex].pCachedObject = pEcmObject; + createInstanceException = false; + } + } + // If this is a singleton... + else if(m_pObjectEntries[dwIndex].bIsSingleton) + { + // Create a pointer to a subsystem singleton manager. + IEcmSubsystemSingletonManager* piSingletonMgr = NULL; + + CAF_CM_TRY + { + // Create a subsystem object. + CEcmSubSystem oSubSystem; + + // See if the subsystem is registered before trying to load it. + if(oSubSystem.IsRegistered(gs_cstrObjIdEcmSubsystemSingletonManagerSubsystem)) + { + // Load the subsystem singleton manager subsystem. + oSubSystem.Load(gs_cstrObjIdEcmSubsystemSingletonManagerSubsystem); + + // Create an instance of the subsystem singleton manager object. + oSubSystem.CreateInstance(gs_cstrObjIdEcmSubsystemSingletonManagerSubsystem, + CSI_IIDOF(IEcmSubsystemSingletonManager), reinterpret_cast(&piSingletonMgr)); + } + } + CAF_CM_CATCH_KEEPEXCEPTION; + + // If we did not get an exception or is the singleton manager not registered. + if(!(CAF_CM_ISEXCEPTION) && piSingletonMgr) + { + // Declare a IEcmObject pointer for local use. + IEcmObject* pObject = NULL; + + // Check for a cached object. + piSingletonMgr->GetSingleton(crstrIdentifier, &pObject); + + // Make sure the pointer is good. + if(pObject) + { + // Query for the interface. + pObject->QueryInterface(criid, ppv); + + // Release the object. + pObject->Release(); + pObject = NULL; + } + // No cached object, so... + else + { + // Call the creator function associated with the identifier. + createInstanceException = true; + TCafSubSystemCreator::CreateInstance( m_pObjectEntries[dwIndex].pfnCreator, + CSI_IIDOF(IEcmObject), + reinterpret_cast(&pObject)); + + // Query for the interface. + pObject->QueryInterface(criid, ppv); + createInstanceException = false; + + // Cache the object. + piSingletonMgr->RegisterSingleton(crstrIdentifier, pObject); + + // Release the object we got back from CreateInstance. + pObject->Release(); + pObject = NULL; + } + + // Release the singleton manager. + piSingletonMgr->Release(); + piSingletonMgr = NULL; + } + // We got an exception or the subsystem singleton manager is not registered. + else + { + // Clean up the exception. + if(CAF_CM_ISEXCEPTION) + { + CAF_CM_CLEAREXCEPTION; + } + + // Release the piSingletonMgr if it is not null + if(piSingletonMgr) + { + piSingletonMgr->Release(); + piSingletonMgr = NULL; + } + + // Check for a cached object. + if(m_pObjectEntries[dwIndex].pCachedObject) + { + // Use the cached object. + m_pObjectEntries[dwIndex].pCachedObject->QueryInterface(criid, ppv); + } + else + { + // Call the creator function associated with the identifier. + createInstanceException = true; + IEcmObject* pEcmObject = 0; + TCafSubSystemCreator::CreateInstance( m_pObjectEntries[dwIndex].pfnCreator, + CSI_IIDOF(IEcmObject), + reinterpret_cast(&pEcmObject)); + + // Cache the object. + pEcmObject->QueryInterface(criid, ppv); + m_pObjectEntries[dwIndex].pCachedObject = pEcmObject; + createInstanceException = false; + } + } + } + else + +#endif // IMPLEMENT_SINGLETONS + { + // call the creator function associated with the identifier. + TCafSubSystemCreator::CreateInstance( m_pObjectEntries[dwIndex].pfnCreator, + criid, + ppv); + } + + // If we are here then an object was created + break; + } + + // Increment the index. + ++ dwIndex; + } + + // If we were unable to find the identifier in the map... + if(!bFoundIdentifier) + { + CAF_CM_EXCEPTION_VA1(E_FAIL, + "Unable to find object with provided identifier [%s]", + crstrIdentifier); + } +} + +bool CEcmSubSystemModule::CanUnload() +{ + gint value = g_atomic_int_get(&m_lLockCount); + return (value == 0 ); +} + +HINSTANCE CEcmSubSystemModule::GetModuleHandle() +{ + return m_hInstance; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.h new file mode 100644 index 000000000..5ffd9ae8d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemModule.h @@ -0,0 +1,43 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _CEcmSubSystemModule_H_ +#define _CEcmSubSystemModule_H_ + +namespace Caf { + +struct _CAF_OBJECT_ENTRY; + +class SUBSYSTEMBASE_LINKAGE CEcmSubSystemModule +{ +public: + CEcmSubSystemModule(); + virtual ~CEcmSubSystemModule(); + + void Init(const _CAF_OBJECT_ENTRY* const pObjectEntries, const HINSTANCE hInstance); + void Term(); + + void Lock(); + void Unlock(); + + void CreateInstance(const char* crstrIdentifier, const IID& criid, void** ppv); + + bool CanUnload(); + + HINSTANCE GetModuleHandle(); + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + const _CAF_OBJECT_ENTRY* m_pObjectEntries; + HINSTANCE m_hInstance; + gint m_lLockCount; +}; + +} + +#endif // _CEcmSubSystemModule_H_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp new file mode 100644 index 000000000..ac75fd19d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp @@ -0,0 +1,26 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Common/IAppConfig.h" +#include "CEcmSubSystemRegistry.h" +#include "CEcmDllManager.h" +#include + +using namespace Caf; + +bool CEcmSubSystemRegistry::IsRegistered( const std::string & crstrSubSystemIdentifier ) +{ + std::string modulePath; + return getAppConfig()->getString("subsystems", crstrSubSystemIdentifier, modulePath, IConfigParams::PARAM_OPTIONAL); +} + +std::string CEcmSubSystemRegistry::GetModulePath( const std::string & crstrSubSystemIdentifier ) +{ + std::string modulePath; + getAppConfig()->getString("subsystems", crstrSubSystemIdentifier, modulePath, IConfigParams::PARAM_REQUIRED); + return modulePath; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.h new file mode 100644 index 000000000..f1cca23b0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/CEcmSubSystemRegistry.h @@ -0,0 +1,22 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ +#ifndef _CEcmSubSystemRegistry_H_ +#define _CEcmSubSystemRegistry_H_ + +#include + +namespace Caf { + +class SUBSYSTEMBASE_LINKAGE CEcmSubSystemRegistry +{ +public: + static bool IsRegistered( const std::string & crstrSubSystemIdentifier ); + + static std::string GetModulePath( const std::string & crstrSubSystemIdentifier ); +}; +} + +#endif // _CEcmSubSystem_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.cpp new file mode 100644 index 000000000..43b6e7126 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.cpp @@ -0,0 +1,108 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "EcmSubSystemBase.h" +#include +#include + +using namespace Caf; + +////////////////////////////////////////////////////////////////////////////// +// ECM Sub-System Constant Definitions +////////////////////////////////////////////////////////////////////////////// + +// The value name for retrieving the module's path +const char* Caf::MODULE_PATH_VALUE_NAME = "ModulePath"; + +// The DLL exported function names +const char* Caf::CREATE_INSTANCE = "CafCreateInstance"; +const char* Caf::CAN_UNLOAD_NOW = "CafDllCanUnloadNow"; + +//////////////////////////////////////////////////////////////////////// +// +// Global implementation of CreateObject - helper functions for +// TEcmSmartPtr that can't go inside of TEcmSmartPtr because gcc barfs. +// +//////////////////////////////////////////////////////////////////////// + +// Suppress warning about throwing an exception: we want C linkage, +// but we also want to throw exceptions +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4297) // function assumed not to throw an exception but does +#endif + +// The function is extern "C" and /EHc is specified +extern "C" SUBSYSTEMBASE_LINKAGE void Caf::CreateObject (const char *cszObjectId, const IID &criid, void **ppv) +{ + CAF_CM_STATIC_FUNC_VALIDATE( "SubSystemBase", "CreateObject" ); + CAF_CM_VALIDATE_STRINGPTRA(cszObjectId); + CAF_CM_VALIDATE_PTR(ppv); + + #ifdef WIN32 + char* objId = ::_strdup(cszObjectId); + #else + char* objId = ::strdup(cszObjectId); + #endif + + try + { + // Determine the type of object to create based on Id. + // QI object id's are of the form :ClassName. +// char *szColon = ::strchr(objId, ':'); +// +// if (szColon) +// { +// // Create a QI object +// *szColon = NULL; +// CreateQIObject(objId, szColon + 1, criid, ppv); +// } +// else +// { + // Create a subsystem object + CEcmSubSystem oSubSystem; + oSubSystem.Load(cszObjectId); + oSubSystem.CreateInstance(cszObjectId, criid, ppv); +// } + } + catch (CCafException *e) + { + ::free(objId); + throw e; + } + catch (std::exception& e) + { + ::free(objId); + throw e; + } + catch (...) + { + ::free(objId); + throw; + } + + ::free(objId); +} + +//extern "C" SUBSYSTEMBASE_LINKAGE void Caf::CreateQIObject (const char *cszFactoryId, const char* cszClassName, const IID &criid, void **ppv) +//{ +// CAF_CM_STATIC_FUNC( "SubSystemBase", "CreateObject" ); +// CAF_CM_VALIDATE_STRINGPTRA(cszFactoryId); +// CAF_CM_VALIDATE_STRINGPTRA(cszClassName); +// CAF_CM_VALIDATE_PTR(ppv); +// +//// SmartSbICfcClassFactory spsFactory; +//// spsFactory.CreateInstance(cwszFactoryId); +//// *ppv = NULL; +//// spsFactory->CreateObject(cwszClassName, criid, ppv); +//// CAF_CM_ASSERT_MSG(*ppv, "Failed to create object"); +//} + +#ifdef _MSC_VER +#pragma warning(pop) +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.h new file mode 100644 index 000000000..0578571b8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/EcmSubSystemBase.h @@ -0,0 +1,164 @@ +/* + * Created: Oct 09, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _EcmSubSystemBase_H_ +#define _EcmSubSystemBase_H_ + +namespace Caf { + +////////////////////////////////////////////////////////////////////// +// Forward Declarations +////////////////////////////////////////////////////////////////////// +struct _CAF_INTMAP_ENTRY; + +////////////////////////////////////////////////////////////////////////////// +// ECM Sub-System Constants +////////////////////////////////////////////////////////////////////////////// + +// The value name for retrieving the module's path +extern SUBSYSTEMBASE_LINKAGE const char* MODULE_PATH_VALUE_NAME; + +// The DLL exported function names +extern SUBSYSTEMBASE_LINKAGE const char* CREATE_INSTANCE; +extern SUBSYSTEMBASE_LINKAGE const char* CAN_UNLOAD_NOW; + +////////////////////////////////////////////////////////////////////////////// +// ECM Object Map Support +////////////////////////////////////////////////////////////////////////////// +struct _CAF_OBJECT_ENTRY +{ + const char* (*pfnIdentifier)(); + const UUID* cpclsidClassId; + uint32 (*pfnCreator)(const IID& riid, void** ppv); + mutable ICafObject* pCachedObject; + bool bIsSingleton; + const _CAF_INTMAP_ENTRY* (*pfnGetEntries)(); +}; + +} + +#define CAF_BEGIN_OBJECT_MAP(x) static _CAF_OBJECT_ENTRY x[] = { + +#define CAF_END_OBJECT_MAP() { NULL, NULL, NULL, NULL, false, NULL }}; + +#define CAF_OBJECT_ENTRY(className)\ + { className::GetObjectIdentifier,\ + NULL,\ + className::Creator,\ + NULL,\ + false,\ + className::_GetEntries }, + +#define CAF_OBJECT_ENTRY2(className, objectIdentifier)\ + { objectIdentifier,\ + NULL,\ + className::Creator,\ + NULL,\ + false,\ + className::_GetEntries }, + +/*#define CAF_OBJECT_ENTRY_SINGLETON(className)\ + { className::GetObjectIdentifier,\ + NULL,\ + className::Creator,\ + NULL,\ + true,\ + className::_GetEntries },*/ + +////////////////////////////////////////////////////////////////////////////// +// ECM Interface Map Support +////////////////////////////////////////////////////////////////////////////// +namespace Caf { +struct _CAF_INTMAP_ENTRY +{ + const IID* cpiid; + SUBSYS_INTPTR offset; +}; +} + +#define _CAF_PACKING 8 +#define CAF_offsetofclass(base, derived)\ + ((SUBSYS_INTPTR)(static_cast((derived*)_CAF_PACKING))-_CAF_PACKING) + +#define CAF_BEGIN_INTERFACE_MAP(x) public: \ + typedef x _CafMapClass; \ + ICafObject* _GetRawObjectInterface() \ + { return (ICafObject*)((SUBSYS_INTPTR)this+_GetEntries()->offset); } \ + ICafObject* GetObjectInterface() { return _GetRawObjectInterface(); }\ + void _InternalQueryInterface(const IID& iid, void** ppv) \ + { InternalQueryInterface(this, _GetEntries(), iid, ppv); } \ + static const _CAF_INTMAP_ENTRY* _GetEntries() \ + { static const _CAF_INTMAP_ENTRY _entries[] = { + +#define CAF_END_INTERFACE_MAP() {NULL, SUBSYS_INTPTR_INVALID}}; return _entries;} \ + virtual void AddRef() = 0;\ + virtual void Release() = 0;\ + virtual void QueryInterface(const IID&, void**) = 0; + +#define CAF_INTERFACE_ENTRY(x)\ + {&CAF_IIDOF(x), \ + CAF_offsetofclass(x, _CafMapClass)}, + +#define CAF_INTERFACE_ENTRY_IID(iid, x)\ + {&iid,\ + offsetofclass(x, _CafMapClass)}, + +#define CAF_INTERFACE_ENTRY2(x, x2)\ + {&CSI_IIDOF(x),\ + (SUBSYS_INTPTR)((x*)(x2*)((_CafMapClass*)_CAF_PACKING))-_CAF_PACKING}, + +#define CAF_INTERFACE_ENTRY2_IID(iid, x, x2)\ + {&iid,\ + (SUBSYS_INTPTR)((x*)(x2*)((_CafMapClass*)_CAF_PACKING))-_CAF_PACKING}, + +////////////////////////////////////////////////////////////////////////////// +// ECM Helper Macros +////////////////////////////////////////////////////////////////////////////// + +// Place in class to be exposed from a sub-system in order to +// specify its identifier. +#define CAF_DECLARE_OBJECT_IDENTIFIER(x)\ + public: \ + static const char* GetObjectIdentifier()\ + {\ + return x;\ + } \ + const char* GetObjectId () const \ + { \ + return x;\ + } + +////////////////////////////////////////////////////////////////////////////// +// ECM Sub-System Standard Function Exports +////////////////////////////////////////////////////////////////////////////// +// Place in module that contains DllMain +#define CAF_DECLARE_SUBSYSTEM_EXPORTS()\ + extern "C" void __declspec(dllexport) CafCreateInstance(\ + const char* rstrIdentifier, const IID & riid, void ** ppv )\ + {\ + _Module.CreateInstance(rstrIdentifier, riid, ppv);\ + }\ + extern "C" bool __declspec(dllexport) EcmDllCanUnloadNow()\ + {\ + return _Module.CanUnload();\ + } + +////////////////////////////////////////////////////////////////////////////// +// ECM Sub-System Standard Includes +////////////////////////////////////////////////////////////////////////////// +#include "CEcmSubSystemModule.h" + +#ifdef CAF_SUBSYSTEM +extern Caf::CEcmSubSystemModule _Module; +#endif + +#include "TCafSubSystemObject.h" +#include "TCafSubSystemObjectRoot.h" +#include "CEcmSubSystem.h" + + +#endif // _EcmSubSystemBase_H_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseInc.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseInc.h new file mode 100644 index 000000000..695f838b7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseInc.h @@ -0,0 +1,13 @@ +/* + * Created: Mar 11, 2004 + * + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _SubSystemBaseInc_h_ +#define _SubSystemBaseInc_h_ + +#include "TCafSubSystemObjectRoot.h" +#include "TCafSubSystemSmartCl.h" + +#endif // #ifndef _SubSystemBaseInc_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseLink.h new file mode 100644 index 000000000..fcb6a7029 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/SubSystemBaseLink.h @@ -0,0 +1,29 @@ +/* + * Created: Nov 21, 2003 + * + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef SubSystemBaseLink_h_ +#define SubSystemBaseLink_h_ + +#ifndef SUBSYSTEMBASE_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define SUBSYSTEMBASE_LINKAGE __declspec(dllexport) + #else + #define SUBSYSTEMBASE_LINKAGE __declspec(dllimport) + #endif + #else + #define SUBSYSTEMBASE_LINKAGE + #endif +#endif + +#include "SubSystemBaseInc.h" + +#include "CEcmDllManager.h" +#include "CEcmSubSystem.h" +#include "CEcmSubSystemModule.h" +#include "CEcmSubSystemRegistry.h" + +#endif // #ifndef SubSystemBaseLink_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemCreator.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemCreator.h new file mode 100644 index 000000000..34f85fa20 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemCreator.h @@ -0,0 +1,132 @@ +/* + * Created: Jan 30, 2003 + * + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _TCafSubSystemCreator_H_ +#define _TCafSubSystemCreator_H_ + +#include "Exception/CCafException.h" + +namespace Caf { + +template< typename Derived, typename SmartPtr = TCafSmartPtr< Derived > > +class TCafSubSystemCreator +{ +public: + static SmartPtr CreateInstance(); + + static void CreateInstance( uint32(*pfn)(const IID& criid, void** ppv), const IID& criid, void** ppv ); + +private: + static void ValidateResultCode(const uint32 cdwRc); +}; + +//////////////////////////////////////////////////////// +// +// CreateInstance() +// +// Creates an instance of the object and returns is as +// the supplied smart class type. +// +////////////////////////////////////////////////////////template +template +SmartPtr TCafSubSystemCreator::CreateInstance() +{ + CAF_CM_STATIC_FUNC( "TCafSubSystemCreator", + "CreateInstance()" ); + + // This local smart class object is transient. + // If the lvalue is of the proper type then the + // reference count will go to 2. When the trasient + // object dies then count will go to 1. Perfect. + // + // If the lvalue is not the proper type then + // the reference count will remain at 1. When the + // transient object dies the count will go to 0 + // and the Derived object will be destroyed. Perfect. + SmartPtr spcReturn; + + // Verify that the smart class template argument + // is really a smart class object by calling + // a method on it that must exist + (void)spcReturn.GetNonAddRefedInterface(); + + // Create a derived raw pointer + Derived* pDerived = NULL; + ValidateResultCode( Derived::Creator( &pDerived ) ); + + // Assign it to the smart class which + // will do an AddRef - count now = 2 + spcReturn = pDerived; + + // Release the raw pointer - count now = 1 + pDerived->Release(); + + return spcReturn; +} + +//////////////////////////////////////////////////////// +// +// CreateInstance() +// +// Creates an instance of the object QI'd to the requested interface +// using the supplied creator function. +// +////////////////////////////////////////////////////////template +template +void TCafSubSystemCreator::CreateInstance( uint32(*pfn)(const IID& criid, void** ppv), const IID& criid, void** ppv ) +{ + ValidateResultCode( (*pfn)( criid, ppv ) ); +} + +//////////////////////////////////////////////////////// +// +// ValidateResultCode() +// +// Maps the TCafSubSystemObjectRoot<>::Creator function result code +// to an exception and throw it. +// +////////////////////////////////////////////////////////template +template +void TCafSubSystemCreator::ValidateResultCode(const uint32 cdwRc) +{ + CAF_CM_STATIC_FUNC( "TCafSubSystemCreator", + "ValidateResultCode" ); + + if(TCafSubSystemObjectRoot::Success == cdwRc) + { + // No point in evalulating the remaining clauses + } + // Otherwise, if the interface was not supported... + else if(TCafSubSystemObjectRoot::InterfaceNotSupported == cdwRc) + { + // throw an exception. + CAF_CM_EXCEPTION_VA0(E_NOINTERFACE, + "The requested interface is not supported by the object requested."); + } + // Otherwise, if we are out of memory... + else if(TCafSubSystemObjectRoot::OutOfMemory == cdwRc) + { + // throw an exception. + CAF_CM_EXCEPTION_EFAIL("Out of memory."); + } + // Otherwise, if the ppv was null... + else if(TCafSubSystemObjectRoot::InvalidPointerValue == cdwRc) + { + // throw an exception. + CAF_CM_EXCEPTION_EFAIL("The ppv argument must not be NULL."); + } + // Otherwise, if something unexpected happened... + else if(TCafSubSystemObjectRoot::UnknownFailure == cdwRc) + { + // throw an exception. + CAF_CM_EXCEPTION_EFAIL("An unexpected exception occurred while " + "trying to create requested object."); + } +} + +} + +#endif // #ifndef _TCafSubSystemCreator_H_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObject.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObject.h new file mode 100644 index 000000000..d15089b8f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObject.h @@ -0,0 +1,72 @@ +/* + * Created: Oct 9, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _TCafSubSystemObject_H_ +#define _TCafSubSystemObject_H_ + +namespace Caf { + +template +class TCafSubSystemObject : public Base +{ +public: // Constructor / Destructor + TCafSubSystemObject() : m_lRefCnt( 0 ) + { + // There is no module to lock if we are not in a sub-system + // project, so conditionally define. + #ifdef CAF_SUBSYSTEM + + // Lock the module. + _Module.Lock(); + + #endif + } + + virtual ~TCafSubSystemObject() + { + // There is no module to unlock if we are not in a sub-system + // project, so conditionally define. + #ifdef CAF_SUBSYSTEM + + // Unlock the module. + _Module.Unlock(); + + #endif + } + +public: // IEcmSubSystemObject Implementations + virtual void AddRef() + { + g_atomic_int_inc(&m_lRefCnt); + } + + virtual void Release() + { + // If the ref-count is greater than 0... + if (g_atomic_int_dec_and_test(&m_lRefCnt)) + { + // delete self. + delete this; + } + } + + virtual void QueryInterface(const IID& riid, void** ppv) + { + this->_InternalQueryInterface(riid, ppv); + } + +private: + gint m_lRefCnt; + +private: // Deny copy and assignment + TCafSubSystemObject(const TCafSubSystemObject&); + TCafSubSystemObject& operator=(const TCafSubSystemObject&); +}; + +} + +#endif // _TCafSubSystemObject_H_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObjectRoot.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObjectRoot.h new file mode 100644 index 000000000..a6e40d10d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemObjectRoot.h @@ -0,0 +1,214 @@ +/* + * Created: Oct 9, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _TCafSubSystemObjectRoot_H_ +#define _TCafSubSystemObjectRoot_H_ + +#include "EcmSubSystemBase.h" + +namespace Caf { + +template > +class TCafSubSystemObjectRoot +{ +public: + enum ReturnCodes { + Success = 0x0, // The call succeeded + InvalidPointerValue, // An invalid pointer was passed + OutOfMemory, // We're out of memory + InterfaceNotSupported, // The interface requested in not supported + UnknownFailure // Something happened that we didn't expect + }; + + // Creator Function + static uint32 Creator(const IID& criid, void** ppv); + static uint32 Creator(Derived** ppDerived); + +protected: + static void InternalQueryInterface(const void* cpThis, + const _CAF_INTMAP_ENTRY* cpEntries, + const IID& criid, + void** ppv); + +protected: + TCafSubSystemObjectRoot() {;} + virtual ~TCafSubSystemObjectRoot() {;} + +private: + TCafSubSystemObjectRoot(const TCafSubSystemObjectRoot&) {;} + TCafSubSystemObjectRoot& operator=(const TCafSubSystemObjectRoot&) { return *this; } +}; + +// Default Creator Function (can be overridden in Derived) - returns a QI'd void* +template +uint32 TCafSubSystemObjectRoot::Creator(const IID& criid, void** ppv) +{ + uint32 dwRetCode = Success; + + try + { + // Make sure the outer pointer seems valid. + if(ppv != NULL) + { + // Initialize the out-param + *ppv = NULL; + + // Create a new derived object + Derived* pObj = NULL; + dwRetCode = Creator( &pObj ); + + if( Success == dwRetCode ) + { + // QI to the requested interface + pObj->QueryInterface(criid, ppv); + + // if *ppv is NULL... + if(NULL == *ppv) + { + // then the interface requested is not supported. + dwRetCode = InterfaceNotSupported; + } + + // decrement the reference count. + pObj->Release(); + } + } + // Otherwise... + else + { + // set the return code to indicate an invalid pointer was passed. + dwRetCode = InvalidPointerValue; + } + } + // No exceptions should be thrown, but if one is... + catch(...) + { + // set the return code to unknown failure occurred. + dwRetCode = UnknownFailure; + } + + return dwRetCode; +} + +// Creator Function (can be overridden in Derived) - returns a pDerived +template +uint32 TCafSubSystemObjectRoot::Creator(Derived** ppDerived) +{ + uint32 dwRetCode = Success; + + try + { + // Make sure the outer pointer seems valid. + if(ppDerived != NULL) + { + // Create the out-param + *ppDerived = new LifetimeManager; + + // If we were able to allocate and create... + if(NULL != *ppDerived) + { + // Increment the ref count + (*ppDerived)->AddRef(); + } + else + { + // set the return code to indicate out of memory. + dwRetCode = OutOfMemory; + } + } + // Otherwise... + else + { + // set the return code to indicate an invalid pointer was passed. + dwRetCode = InvalidPointerValue; + } + } + // No exceptions should be thrown, but if one is... + catch(...) + { + // set the return code to unknown failure occurred. + dwRetCode = UnknownFailure; + } + + return dwRetCode; +} + +// Table driven query interface +template +void TCafSubSystemObjectRoot::InternalQueryInterface(const void* cpThis, + const _CAF_INTMAP_ENTRY* cpEntries, + const IID& criid, + void** ppv) +{ + if(NULL != cpThis) + { + if(cpEntries != NULL) + { + if(ppv != NULL) + { + // Initialize the out-param + *ppv = NULL; + + // If the iid passed in is the iid of IEcmObject... + if(::IsEqualIID(criid, CAF_IIDOF(ICafObject))) + { + // get the first interface in the map, + ICafObject* pObj = + reinterpret_cast( + (SUBSYS_INTPTR)cpThis+cpEntries->offset); + + // increment the reference count, + pObj->AddRef(); + + // set the out-param equal to the interface pointer. + *ppv = pObj; + } + // Otherwise, we are looking for something other than + // IEcmObject, so... + else + { + // get a copy of the pointer to the entries so we can + // increment it, + _CAF_INTMAP_ENTRY* pEntries = + const_cast<_CAF_INTMAP_ENTRY*>(cpEntries); + + // loop through the interface map entries... + while((pEntries->cpiid != NULL) && + (pEntries->offset != SUBSYS_INTPTR_INVALID)) + { + // if we find a matching IID... + if ((NULL != pEntries->cpiid) && + (::IsEqualIID(*(pEntries->cpiid), criid))) + { + // get the interface at the offset from the map, + ICafObject* pObj = + reinterpret_cast( + (SUBSYS_INTPTR)cpThis+pEntries->offset); + + // increment the reference count, + pObj->AddRef(); + + // set the out-param equal to the interface + // pointer, and + *ppv = pObj; + + // break out of the loop. + break; + } + + // Move to the next entry in the interface map. + pEntries++; + } + } + } + } + } +} + +} + +#endif // _TCafSubSystemObjectRoot_H_ + diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemSmartCl.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemSmartCl.h new file mode 100644 index 000000000..ea3d14d0b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/TCafSubSystemSmartCl.h @@ -0,0 +1,608 @@ +/* + * Created: Oct 9, 2002 + * + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ +#ifndef _TCafSubSystemSmartCl_H +#define _TCafSubSystemSmartCl_H + +#include "EcmSubSystemBase.h" +#include "Exception/CCafException.h" +#include "CEcmSubSystem.h" +#include + +namespace Caf { + +struct CafSubSystemSmartClToken { ICafObject *m_pCl; CafSubSystemSmartClToken(ICafObject* p) : m_pCl(p) {} }; + +// this routine should really be moved to a real extern +inline BOOL CafSubSystemSmartClIsSameObject(ICafObject *pObj1, ICafObject *pObj2) +{ + BOOL bResult = TRUE; + if( pObj1 != pObj2) + { + ICafObject *p1 = 0, *p2 = 0; + pObj1->QueryInterface(CAF_IIDOF(ICafObject), (void**)&p1); + if( p1 ) p1->Release(); else p1 = 0; + pObj2->QueryInterface(CAF_IIDOF(ICafObject), (void**)&p2); + if( p2 ) p2->Release(); else p2 = 0; + bResult = (p1 == p2); // values do not change after release + } + return bResult; +} + +inline BOOL CafSubSystemSmartClIsSameObject(ICafObject *pObj1, const CafSubSystemSmartClToken& pObj2) +{ + return CafSubSystemSmartClIsSameObject(pObj1, pObj2.m_pCl); +} + +inline BOOL CafSubSystemSmartClIsSameObject(const CafSubSystemSmartClToken& pObj1, ICafObject *pObj2) +{ + return CafSubSystemSmartClIsSameObject(pObj1.m_pCl, pObj2); +} + +inline BOOL CafSubSystemSmartClIsSameObject(const CafSubSystemSmartClToken& pObj1, const CafSubSystemSmartClToken& pObj2) +{ + return CafSubSystemSmartClIsSameObject(pObj1.m_pCl, pObj2.m_pCl); +} + +/** + * @brief Template for classes exposed as subsystem objects + */ +template +class TCafSubSystemSmartCl +{ +private: + typedef TCafSubSystemSmartCl SameSmartType; + +public: // constructors/destructors + + // default constructor + TCafSubSystemSmartCl(void) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl( 0 ) + { + } + + // homogeneous raw constructor + TCafSubSystemSmartCl(Cl* rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl( rhs ) + { + if( NULL != m_pCl ) + m_pCl->AddRef(); + } + + // homogeneous smart constructor + TCafSubSystemSmartCl(const SameSmartType& rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl( rhs.m_pCl ) + { + if( NULL != m_pCl ) + m_pCl->AddRef(); + } + + // heterogeneous raw constructor + TCafSubSystemSmartCl(ICafObject* rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl( 0 ) + { + if( rhs ) + { + // Do QueryInterface (throws exception if QI fails) + rhs->QueryInterface( GetIID(), ( void ** ) &m_pCl ); + } + } + + // heterogeneous smart constructor + TCafSubSystemSmartCl(const CafSubSystemSmartClToken& rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl( 0 ) + { + if( rhs.m_pCl ) + { + // Do QueryInterface (throws exception if QI fails) + rhs.m_pCl->QueryInterface( GetIID(), ( void ** ) &m_pCl ); + } + } + + // destructor + ~TCafSubSystemSmartCl(void) + { + SafeRelease(); + } + + operator CafSubSystemSmartClToken(void) const + { + return CafSubSystemSmartClToken( m_pCl ); + } + +public: // Attach operations + + // homogeneous raw attachment + void Attach(Cl* rhs) + { + if( rhs != m_pCl ) + { + SafeRelease(); + if( m_pCl = rhs ) + m_pCl->AddRef(); + } + } + + // homogeneous smart attachment + void Attach(const SameSmartType& rhs) + { + Attach( rhs.m_pCl ); + } + + // heterogeneous raw attachment + void Attach(ICafObject* rhs) + { + SafeRelease(); + if( rhs ) + { + rhs->QueryInterface( GetIID(), ( void ** ) &m_pCl ); + } + } + + // heterogeneous smart attachment + void Attach(const CafSubSystemSmartClToken& rhs) + { + Attach( rhs.m_pCl ); + } + +public: // assignment operators + + // homogeneous raw assignment + SameSmartType& operator = (Cl *rhs) + { + Attach( rhs ); + return *this; + } + + // homogeneous smart assignment + SameSmartType& operator = (const SameSmartType& rhs) + { + Attach( rhs ); + return *this; + } + + // heterogeneous raw assignment + SameSmartType& operator = (ICafObject * rhs) + { + Attach( rhs ); + return *this; + } + + // heterogeneous smart assignment + SameSmartType& operator = (const CafSubSystemSmartClToken& rhs) + { + Attach( rhs ); + return *this; + } + +public: // equivalence operators (note - no identity tests performed here!) + + BOOL operator == (Cl * rhs) + { + return m_pCl == rhs; + } + + BOOL operator == (const SameSmartType& rhs) + { + return m_pCl == rhs.m_pCl; + } + + BOOL operator != (Cl *rhs) + { + return m_pCl != rhs; + } + + BOOL operator != (const SameSmartType& rhs) + { + return m_pCl != rhs.m_pCl; + } + +public: // CoCreateInstance wrappers + void CreateInstance(const std::string& strClassIdentifier, const bool cbIsExceptionOnFailure = true) + { + CCafException* _cm_exception_ = NULL; + SafeRelease(); + + try + { + CEcmSubSystem oSubSystem; + oSubSystem.Load(strClassIdentifier); + oSubSystem.CreateInstance(strClassIdentifier, GetIID(), AsPPVArg()); + } + catch (CCafException *e) + { + _cm_exception_ = e; + } + + if( _cm_exception_ ) + { + if( cbIsExceptionOnFailure ) + { + _cm_exception_->throwSelf(); + } + else + { + _cm_exception_->Release(); + } + } + } + +private: + const IID& GetIID(void) const + { + return CAF_IIDOF(Cl); + } + + void** AsPPVArg(void) + { + SafeRelease(); + return (void **)&m_pCl; + } + +public: // operations + +// note: no Cl * operator is allowed, as it makes it very +// easy to break the protocol of COM. Instead, these +// four operations require the user to be explicit + + Cl* GetAddRefedInterface(void) const + { + if( m_pCl) + m_pCl->AddRef(); + return m_pCl; + } + + Cl* GetNonAddRefedInterface(void) const + { + return m_pCl; + } + + Cl** GetReleasedInterfaceReference(void) + { + SafeRelease(); + return &m_pCl; + } + + Cl** GetNonReleasedInterfaceReference(void) + { + return &m_pCl; + } + + BOOL operator ! (void) const + { + return m_pCl == 0; + } + + BOOL IsOK(void) const + { + return m_pCl != 0; + } + + // instead of operator bool, we return a fake ptr type to allow if( pFoo) usage + // but to disallow if( pFoo == pBar) which is probably wrong + class PseudoBool {}; + operator PseudoBool * (void) const + { + return (PseudoBool *)m_pCl; + } + + // the arrow operator returns a pointer with AddRef and Release disabled + class NoAddRefOrRelease : public Cl { + private: + virtual void AddRef() = 0; + virtual void Release() = 0; + }; + + NoAddRefOrRelease *operator ->(void) + { + return (NoAddRefOrRelease *)m_pCl; + } + + NoAddRefOrRelease *operator ->(void) const + { + return (NoAddRefOrRelease *)m_pCl; + } + + static Cl* GetAddRefedQueryInterface(ICafObject* pICafObject) + { + CAF_CM_STATIC_FUNC( "TCafSubSystemSmartC", "GetAddRefedQueryInterface" ); + CAF_CM_VALIDATE_INTERFACEPTR( pICafObject ); + + // QI to the interface and validate that the QI was successful. + Cl* pCl = 0; + pICafObject->QueryInterface( CAF_IIDOF(Cl), ( void ** ) &pCl ); + + return pCl; + } + + static Cl* GetNonAddRefedQueryInterface(ICafObject* pICafObject) + { + CAF_CM_STATIC_FUNC( "TCafSubSystemSmartC", "GetNonAddRefedQueryInterface" ); + CAF_CM_VALIDATE_INTERFACEPTR( pICafObject ); + + // QI to the interface and validate that the QI was successful. + Cl* pCl = 0; + pICafObject->QueryInterface( CAF_IIDOF(Cl), ( void ** ) &pCl ); + + // QueryInterface automatically AddRefs the interface, so it must be released. + if( pCl ) + pCl->Release(); + + return pCl; + } + +private: + CAF_CM_CREATE; + Cl* m_pCl; + +private: + void SafeRelease(void) + { + if( m_pCl ) + m_pCl->Release(); + m_pCl = 0; + } +}; + +template <> +class TCafSubSystemSmartCl +{ +private: + typedef ICafObject Cl; + typedef TCafSubSystemSmartCl SameSmartType; + +public: // constructors/destructors + + // default constructor + TCafSubSystemSmartCl(void) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl(0) + { + } + + // homogeneous raw constructor + TCafSubSystemSmartCl(Cl *rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl(rhs) + { + if (NULL != m_pCl) + m_pCl->AddRef(); + } + + // homogeneous smart constructor + TCafSubSystemSmartCl(const SameSmartType& rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl(rhs.m_pCl) + { + if (NULL != m_pCl) + m_pCl->AddRef(); + } + + operator CafSubSystemSmartClToken (void) const + { + return CafSubSystemSmartClToken(m_pCl); + } + + // heterogeneous smart constructor (AddRef's instead of QI) + TCafSubSystemSmartCl(const CafSubSystemSmartClToken& rhs) : + CAF_CM_INIT( "TCafSubSystemSmartC" ), + m_pCl(0) + { + if ( rhs.m_pCl ) + { + m_pCl = rhs.m_pCl; + m_pCl->AddRef(); + } + } + + // destructor + ~TCafSubSystemSmartCl(void) + { + SafeRelease(); + } + +public: // Attach operations + + // homogeneous raw attachment + void Attach(Cl * rhs) + { + if (rhs != m_pCl) + { + SafeRelease(); + if ( rhs ) + { + m_pCl = rhs; + m_pCl->AddRef(); + } + } + } + + // homogeneous smart attachment + void Attach(const SameSmartType& rhs) + { + Attach(rhs.m_pCl); + } + + // heterogeneous smart attachment + void Attach(const CafSubSystemSmartClToken& rhs) + { + Attach(rhs.m_pCl); + } + +public: // assignment operators + // homogeneous raw assignment + SameSmartType& operator = (Cl *rhs) + { + Attach(rhs); + return *this; + } + + // homogeneous smart assignment + SameSmartType& operator = (const SameSmartType& rhs) + { + Attach(rhs); + return *this; + } + + // heterogeneous smart assignment + SameSmartType& operator = (const CafSubSystemSmartClToken& rhs) + { + Attach(rhs); + return *this; + } + + // equivalence operators (note - no identity tests performed here!) + BOOL operator == (Cl * rhs) + { + return m_pCl == rhs; + } + + BOOL operator == (const SameSmartType& rhs) + { + return m_pCl == rhs.m_pCl; + } + + BOOL operator != (Cl *rhs) + { + return m_pCl != rhs; + } + + BOOL operator != (const SameSmartType& rhs) + { + return m_pCl != rhs.m_pCl; + } + +public: // CoCreateInstance wrappers + void CreateInstance(const std::string& strClassIdentifier, + const bool cbIsExceptionOnFailure = true) + { + CCafException* _cm_exception_ = NULL; + SafeRelease(); + + try + { + CEcmSubSystem oSubSystem; + oSubSystem.Load(strClassIdentifier); + oSubSystem.CreateInstance(strClassIdentifier, GetIID(), AsPPVArg()); + } + catch (CCafException* e) + { + _cm_exception_ = e; + } + + if(_cm_exception_) + { + if( cbIsExceptionOnFailure ) + { + _cm_exception_->throwSelf(); + } + else + { + _cm_exception_->Release(); + } + } + } + +public: // Interface pointer accessors + // note: no If * operator is allowed, as it makes it very + // easy to break the protocol of COM. Instead, these + // four operations require the user to be explicit + + Cl * GetAddRefedInterface(void) const + { + if (m_pCl) + m_pCl->AddRef(); + return m_pCl; + } + + Cl * GetNonAddRefedInterface(void) const + { + return m_pCl; + } + + Cl **GetReleasedInterfaceReference(void) + { + SafeRelease(); + return &m_pCl; + } + + Cl **GetNonReleasedInterfaceReference(void) + { + return &m_pCl; + } + +public: // operations + const IID GetIID(void) const + { + return CAF_IIDOF(ICafObject); + } + + void * * AsPPVArg(void) + { + SafeRelease(); + return (void **)&m_pCl; + } + + BOOL operator ! (void) const + { + return m_pCl == 0; + } + + BOOL IsOK(void) const + { + return m_pCl != 0; + } + + // instead of operator bool, we return a fake ptr type to allow if (pFoo) usage + // but to disallow if (pFoo == pBar) which is probably wrong + class PseudoBool {}; + operator PseudoBool * (void) const + { + return (PseudoBool *)m_pCl; + } + + // the arrow operator returns a pointer with AddRef and Release disabled + class NoAddRefOrRelease : public Cl { + private: + virtual void AddRef() = 0; + virtual void Release() = 0; + }; + + NoAddRefOrRelease *operator ->(void) + { + CAF_CM_FUNCNAME_VALIDATE( "operator ->" ); + CAF_CM_VALIDATE_PTR( m_pCl ); + + return (NoAddRefOrRelease *)m_pCl; + } + + NoAddRefOrRelease *operator ->(void) const + { + CAF_CM_FUNCNAME_VALIDATE( "operator ->" ); + CAF_CM_VALIDATE_PTR( m_pCl ); + + return (NoAddRefOrRelease *)m_pCl; + } +private: + CAF_CM_CREATE; + Cl* m_pCl; + +private: + void SafeRelease(void) + { + if( m_pCl ) + m_pCl->Release(); + m_pCl = 0; + } +}; + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/stdafx.h new file mode 100644 index 000000000..ff169b0e7 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/SubSystemBase/stdafx.h @@ -0,0 +1,19 @@ +/* + * Created: Mar 21, 2004 + * + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +#ifdef WIN32 + #define SUBSYSTEMBASE_LINKAGE __declspec(dllexport) +#else + #define SUBSYSTEMBASE_LINKAGE +#endif + +#include +#include "../Common/CommonAggregatorLink.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/CMarkupParser.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/CMarkupParser.cpp new file mode 100644 index 000000000..d4585b445 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/CMarkupParser.cpp @@ -0,0 +1,250 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Xml/MarkupParser/CMarkupParser.h" +#include "Exception/CCafException.h" +#include +#include + +namespace Caf { namespace MarkupParser { + +std::string _xml; + +struct SParserState { + SParserState() : + depth(0) { + } + + SmartPtrElement root; + std::deque stack; + uint32 depth; + +private: + CAF_CM_DECLARE_NOCOPY(SParserState); +}; + +void cb_start_element(GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error) { + CAF_CM_STATIC_FUNC("MarkupParser", "cb_start_element"); + + try { + SParserState& state = *(reinterpret_cast(user_data)); + CAF_CM_ASSERT(state.depth == state.stack.size()); + if (state.depth == 0) { + //TODO-BLW: For some reason the root is already created, so temporarily + // remove the assert and re-create the root. + //CAF_CM_ASSERT(!state.root); + state.root.CreateInstance(); + state.stack.push_back(state.root); + } + else { + SmartPtrElement element; + element.CreateInstance(); + state.stack.back()->children.push_back(element); + state.stack.push_back(element); + } + + ++state.depth; + SmartPtrElement element = state.stack.back(); + element->name = element_name; + + const gchar **attr_name_cursor = attribute_names; + const gchar **attr_value_cursor = attribute_values; + while (*attr_name_cursor) { + element->attributes.push_back(Attribute(*attr_name_cursor, *attr_value_cursor)); + ++attr_name_cursor; + ++attr_value_cursor; + } + } + catch(CCafException *e) { + std::string msg(e->getFullMsg()); + e->Release(); + *error = g_error_new_literal(G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, msg.c_str()); + } +} + +void cb_text(GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error) { + SParserState& state = *(reinterpret_cast(user_data)); + if (text_len) { + state.stack.back()->value.append(text, text_len); + } +} + +void cb_end_element(GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error) { + CAF_CM_STATIC_FUNC("MarkupParser", "cb_end_element"); + + try { + SParserState& state = *(reinterpret_cast(user_data)); + CAF_CM_ASSERT((state.depth) && (state.depth == state.stack.size())); + --state.depth; + state.stack.pop_back(); + } + catch(CCafException *e) { + std::string msg(e->getFullMsg()); + e->Release(); + *error = g_error_new_literal(G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, msg.c_str()); + } +} + +void cb_destroy_user_data(gpointer data) { + delete (SParserState*)data; +} + +static GMarkupParser _markupParser = { cb_start_element, + cb_end_element, + cb_text, + NULL, + NULL }; + +SmartPtrElement parseString(const std::string& xml) { + CAF_CM_STATIC_FUNC("MarkupParser", "parseString"); + CAF_CM_VALIDATE_STRINGPTRA(xml.c_str()); + + _xml = xml; + + SParserState *parserState = new SParserState(); + GError *parserError = NULL; + GMarkupParseContext *context = + g_markup_parse_context_new(&_markupParser, + G_MARKUP_TREAT_CDATA_AS_TEXT, + parserState, + cb_destroy_user_data); + + SmartPtrElement root; + try { + if (g_markup_parse_context_parse(context, + xml.c_str(), + xml.length(), + &parserError)) { + root = parserState->root; + } + else { + CAF_CM_EXCEPTION_VA0(parserError->code, parserError->message); + } + } + catch (...) { + if (parserError) { + g_error_free(parserError); + } + + if (context) { + g_markup_parse_context_free(context); + } + throw; + } + + if (parserError) { + g_error_free(parserError); + } + + if (context) { + g_markup_parse_context_free(context); + } + + return root; +} + +SmartPtrElement parseFile(const std::string& file) { + CAF_CM_STATIC_FUNC("MarkupParser", "parseFile"); + CAF_CM_VALIDATE_STRINGPTRA(file.c_str()); + + gchar* text = NULL; + GError *fileError = NULL; + SmartPtrElement root; + try { + if (g_file_get_contents(file.c_str(), &text, NULL, &fileError)) { + if (! text || (text[ 0 ] == L'\0' )) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA, "File is empty - %s", file.c_str()); + } + root = parseString(text); + } + else { + CAF_CM_EXCEPTION_VA0(fileError->code, fileError->message); + } + } + catch (...) { + if (fileError) { + g_error_free(fileError); + } + + if (text) { + g_free(text); + } + throw; + } + + if (fileError) { + g_error_free(fileError); + } + + if (text) { + g_free(text); + } + + return root; +} + +ChildIterator findChild(SmartPtrElement& element, const std::string& name) { + CAF_CM_STATIC_FUNC_VALIDATE("MarkupParser", "findChild"); + CAF_CM_VALIDATE_SMARTPTR(element); + CAF_CM_VALIDATE_STRING(name); + + ChildIterator rc = element->children.end(); + for(ChildIterator childIter = element->children.begin(); + childIter != element->children.end(); + childIter++) { + if((*childIter)->name.compare(name) == 0) { + rc = childIter; + } + } + return rc; +/* + return std::find_if(element->children.begin(), + element->children.end(), + std::bind2nd(ElementName(), name)); +*/ +} + +AttributeIterator findAttribute(Attributes& attributes, const std::string& name) { + CAF_CM_STATIC_FUNC_VALIDATE("MarkupParser", "findAttribute"); + CAF_CM_VALIDATE_STRING(name); + return std::find_if(attributes.begin(), + attributes.end(), + std::bind2nd(AttributeName(), name)); +} + +std::string getAttributeValue(SmartPtrElement& element, const std::string& name) { + CAF_CM_STATIC_FUNC("MarkupParser", "getAttributeValue"); + CAF_CM_VALIDATE_SMARTPTR(element); + CAF_CM_VALIDATE_STRING(name); + std::string rc; + + AttributeIterator iter = findAttribute(element->attributes, name); + if (iter != element->attributes.end()) { + rc = iter->second; + } else { + CAF_CM_EXCEPTION_VA2(ERROR_TAG_NOT_FOUND, + "Element %s does not contain attribute %s", + element->name.c_str(), + name.c_str()); + } + return rc; +} + +}} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/MarkupParserLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/MarkupParserLink.h new file mode 100644 index 000000000..54caf0a0e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/MarkupParserLink.h @@ -0,0 +1,24 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef MARKUPPARSERLINK_H_ +#define MARKUPPARSERLINK_H_ + +#ifndef MARKUPPARSER_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define MARKUPPARSER_LINKAGE __declspec(dllexport) + #else + #define MARKUPPARSER_LINKAGE __declspec(dllimport) + #endif + #else + #define MARKUPPARSER_LINKAGE + #endif +#endif + + +#endif /* MARKUPPARSERLINK_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/stdafx.h new file mode 100644 index 000000000..7cf7940b3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/MarkupParser/stdafx.h @@ -0,0 +1,24 @@ +/* + * Author: mdonahue + * Created: Jan 20, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define MARKUPPARSER_LINKAGE __declspec(dllexport) + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) +#else + #define MARKUPPARSER_LINKAGE + #define COMMONAGGREGATOR_LINKAGE +#endif + +#include +#include +#include "../../Common/CAutoMutexLockUnlock.h" +#include "../../Exception/ExceptionLink.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlElement.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlElement.cpp new file mode 100644 index 000000000..abf30630b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlElement.cpp @@ -0,0 +1,417 @@ +/* + * Author: mdonahue + * Created: Dec 3, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +const std::string CXmlElement::CDATA_BEG = ""; + +CXmlElement::CXmlElement() : + _isInitialized(false), + CAF_CM_INIT_LOG("CXmlElement") { +} + +CXmlElement::~CXmlElement() { +} + +void CXmlElement::initialize( + const MarkupParser::SmartPtrElement& element, + const std::string& path) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_PTR(element); + CAF_CM_VALIDATE_STRING(path); + + _element = element; + _path = path; + _isInitialized = true; +} + +MarkupParser::SmartPtrElement CXmlElement::getInternalElement() { + return _element; +} + +std::string CXmlElement::findRequiredAttribute(const std::string& name) const { + CAF_CM_FUNCNAME("findRequiredAttribute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + CAF_CM_VALIDATE_COND_VA3(!_element->attributes.empty(), + "element (%s) does not contain any attributes (%s) in %s", _element->name.c_str(), + name.c_str(), _path.c_str()); + + MarkupParser::AttributeIterator iter = MarkupParser::findAttribute( + _element->attributes, name); + CAF_CM_VALIDATE_COND_VA3(iter != _element->attributes.end(), + "element (%s) does not contain required attribute (%s) in %s", + _element->name.c_str(), name.c_str(), _path.c_str()); + + std::string rc = iter->second; + CAF_CM_VALIDATE_STRING(rc); + + return rc; +} + +std::string CXmlElement::findOptionalAttribute(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalAttribute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + std::string rc; + if (!_element->attributes.empty()) { + MarkupParser::AttributeIterator iter = MarkupParser::findAttribute( + _element->attributes, name); + if (iter != _element->attributes.end()) { + rc = iter->second; + } + } + + return rc; +} + +SmartPtrCXmlElement CXmlElement::findRequiredChild(const std::string& name) const { + CAF_CM_FUNCNAME("findRequiredChild"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + const MarkupParser::ChildIterator iter = MarkupParser::findChild(_element, name); + if (iter == _element->children.end()) { + CAF_CM_LOG_INFO_VA1("Child not found: %s", name.c_str()); + } + CAF_CM_VALIDATE_COND_VA3(iter != _element->children.end(), + "element (%s) does not contain required child (%s) in %s", _element->name.c_str(), + name.c_str(), _path.c_str()); + + SmartPtrCXmlElement rc; + rc.CreateInstance(); + rc->initialize(*iter, _path); + + return rc; +} + +SmartPtrCXmlElement CXmlElement::findOptionalChild(const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalChild"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + SmartPtrCXmlElement rc; + const MarkupParser::ChildIterator iter = MarkupParser::findChild(_element, name); + if (iter != _element->children.end()) { + rc.CreateInstance(); + rc->initialize(*iter, _path); + } + + return rc; +} + +CXmlElement::SmartPtrCAttributeCollection CXmlElement::getAllAttributes() const { + CAF_CM_FUNCNAME_VALIDATE("getAllAttributes"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCAttributeCollection rc; + rc.CreateInstance(); + + for (TConstIterator attribute(_element->attributes); + attribute; attribute++) { + rc->insert(std::make_pair((*attribute).first, (*attribute).second)); + } + + return rc; +} + +CXmlElement::SmartPtrCElementCollection CXmlElement::getAllChildren() const { + CAF_CM_FUNCNAME_VALIDATE("getAllChildren"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCElementCollection rc; + rc.CreateInstance(); + + SmartPtrCXmlElement xmlElement; + for (TConstIterator child(_element->children); child; + child++) { + xmlElement.CreateInstance(); + xmlElement->initialize(*child, _path); + rc->insert(std::make_pair((*child)->name, xmlElement)); + } + + return rc; +} + +CXmlElement::SmartPtrCOrderedElementCollection CXmlElement::getAllChildrenInOrder() const { + CAF_CM_FUNCNAME_VALIDATE("getAllChildrenInOrder"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCOrderedElementCollection rc; + rc.CreateInstance(); + + SmartPtrCXmlElement xmlElement; + for (TConstIterator child(_element->children); child; + child++) { + xmlElement.CreateInstance(); + xmlElement->initialize(*child, _path); + rc->push_back(xmlElement); + } + + return rc; +} + +CXmlElement::SmartPtrCElementCollection CXmlElement::findRequiredChildren( + const std::string& name) const { + CAF_CM_FUNCNAME("findRequiredChildren"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + SmartPtrCElementCollection rc = findOptionalChildren(name); + + if (rc.IsNull() || rc->empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Children not found: %s", name.c_str()); + } + + return rc; +} + +CXmlElement::SmartPtrCElementCollection CXmlElement::findOptionalChildren( + const std::string& name) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalChildren"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + SmartPtrCElementCollection rc; + rc.CreateInstance(); + + SmartPtrCXmlElement xmlElement; + for (TConstIterator child(_element->children); child; + child++) { + if (((*child)->name).compare(name) == 0) { + xmlElement.CreateInstance(); + xmlElement->initialize(*child, _path); + rc->insert(std::make_pair((*child)->name, xmlElement)); + } + } + + return rc; +} + +std::string CXmlElement::getName() const { + CAF_CM_FUNCNAME_VALIDATE("getName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _element->name; +} + +std::string CXmlElement::getValue() const { + CAF_CM_FUNCNAME_VALIDATE("getValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _element->value; +} + +std::string CXmlElement::getCDataValue() const { + CAF_CM_FUNCNAME_VALIDATE("getCDataValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rc = _element->value; + if (! rc.empty()) { + const std::string::size_type cdataBegPos = rc.find(CDATA_BEG); + const std::string::size_type cdataEndPos = rc.find(CDATA_END); + if ((0 == cdataBegPos) && (std::string::npos != cdataEndPos)) { + rc = rc.substr(0, cdataEndPos); + rc = rc.substr(cdataBegPos + CDATA_BEG.length()); + } + } + + return rc; +} + +std::string CXmlElement::getPath() const { + CAF_CM_FUNCNAME_VALIDATE("getPath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _path; +} + +void CXmlElement::addAttribute(const std::string& name, const std::string& value) { + CAF_CM_FUNCNAME("addAttribute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_STRING(value); + + if (!_element->attributes.empty()) { + MarkupParser::AttributeIterator iter = MarkupParser::findAttribute( + _element->attributes, name); + CAF_CM_VALIDATE_COND_VA3(iter == _element->attributes.end(), + "element (%s) already contains attribute (%s) in %s", _element->name.c_str(), + name.c_str(), _path.c_str()); + } + + _element->attributes.push_back(std::make_pair(name, value)); +} + +void CXmlElement::removeAttribute(const std::string& name) { + + CAF_CM_FUNCNAME_VALIDATE("removeAttribute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + if (!_element->attributes.empty()) { + MarkupParser::AttributeIterator iter = MarkupParser::findAttribute( + _element->attributes, name); + if (iter != _element->attributes.end()) { + _element->attributes.erase(iter); + } + } +} + +void CXmlElement::setAttribute(const std::string& name, const std::string& value) { + CAF_CM_FUNCNAME("setAttribute"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_STRING(value); + + CAF_CM_VALIDATE_COND_VA3(!_element->attributes.empty(), + "element (%s) does not contain any attributes (%s) in %s", + _element->name.c_str(), name.c_str(), _path.c_str()); + + MarkupParser::AttributeIterator iter = MarkupParser::findAttribute( + _element->attributes, name); + CAF_CM_VALIDATE_COND_VA3(iter != _element->attributes.end(), + "element (%s) does not contain required attribute (%s) in %s", + _element->name.c_str(), name.c_str(), _path.c_str()); + + iter->second = value; +} + +SmartPtrCXmlElement CXmlElement::createAndAddElement(const std::string& name) { + CAF_CM_FUNCNAME_VALIDATE("createAndAddElement"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + MarkupParser::SmartPtrElement element; + element.CreateInstance(); + element->name = name; + + SmartPtrCXmlElement rc; + rc.CreateInstance(); + rc->initialize(element, _path); + + _element->children.push_back(element); + + return rc; +} + +void CXmlElement::addChild(const SmartPtrCXmlElement& xmlElement) { + CAF_CM_FUNCNAME_VALIDATE("addChild"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(xmlElement); + + _element->children.push_back(xmlElement->getInternalElement()); +} + +void CXmlElement::removeChild(const std::string& name) { + CAF_CM_FUNCNAME_VALIDATE("removeChild"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + + const MarkupParser::ChildIterator iter = MarkupParser::findChild(_element, name); + if (iter != _element->children.end()) { + _element->children.erase(iter); + } +} + +void CXmlElement::setValue(const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("setValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(value); + + _element->value = value; +} + +void CXmlElement::setCDataValue(const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("setCDataValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(value); + + if (std::string::npos == value.find(CDATA_BEG)) { + _element->value = CDATA_BEG + value + CDATA_END; + } else { + _element->value = value; + } +} + +void CXmlElement::appendValue(const std::string& value) { + CAF_CM_FUNCNAME_VALIDATE("appendValue"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(value); + + if (_element->value.empty()) { + _element->value = ""; + } + + _element->value += value; +} + +void CXmlElement::saveToFile(const std::string& filename) const { + CAF_CM_FUNCNAME_VALIDATE("saveToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(filename); + + CAF_CM_LOG_INFO_VA1("Saving XML to file \"%s\"", filename.c_str()); + + const std::string xml = saveToString(); + FileSystemUtils::saveTextFile(filename, xml); +} + +std::string CXmlElement::saveToString() const { + CAF_CM_FUNCNAME_VALIDATE("saveToString"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rc = ""; + saveToString(_element, rc); + + return rc; +} + +std::string CXmlElement::saveToStringRaw() const { + CAF_CM_FUNCNAME_VALIDATE("saveToStringRaw"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::string rc; + saveToString(_element, rc); + + return rc; +} + +void CXmlElement::saveToString( + const MarkupParser::SmartPtrElement& element, + std::string& xml) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CXmlElement", "saveToString"); + CAF_CM_VALIDATE_PTR(element); + + xml += "<" + element->name; + for (TConstIterator attribute(element->attributes); + attribute; attribute++) { + xml += " " + attribute->first + "=\"" + attribute->second + "\""; + } + + if (element->value.empty() && element->children.empty()) { + xml += "/>"; + } else { + xml += ">" + element->value; + for (TConstIterator child(element->children); + child; child++) { + saveToString(*child, xml); + } + xml += "name + ">"; + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.cpp b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.cpp new file mode 100644 index 000000000..efe7b57dc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.cpp @@ -0,0 +1,135 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Xml/MarkupParser/CMarkupParser.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Exception/CCafException.h" +#include "CXmlUtils.h" + +using namespace Caf; + +SmartPtrCXmlElement CXmlUtils::parseFile( + const std::string& path, + const std::string& rootName) { + CAF_CM_STATIC_FUNC("CXmlUtils", "parseFile"); + CAF_CM_VALIDATE_STRING(path); + // rootName is optional + + if (!FileSystemUtils::doesFileExist(path)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, "File not found: %s", path.c_str()); + } + + const MarkupParser::SmartPtrElement element = MarkupParser::parseFile(path); + CAF_CM_VALIDATE_SMARTPTR(element); + CAF_CM_VALIDATE_STRING(element->name); + if (!rootName.empty()) { + CAF_CM_VALIDATE_COND_VA3(element->name == rootName, + "root not valid (\"%s\" != \"%s\") in %s", rootName.c_str(), + element->name.c_str(), path.c_str()); + } + + SmartPtrCXmlElement xmlElement; + xmlElement.CreateInstance(); + xmlElement->initialize(element, path); + + return xmlElement; +} + +SmartPtrCXmlElement CXmlUtils::parseString( + const std::string& xml, + const std::string& rootName) { + CAF_CM_STATIC_FUNC("CXmlUtils", "parseString"); + CAF_CM_VALIDATE_STRING(xml); + // rootName is optional + + const std::string path = "fromString"; + + const MarkupParser::SmartPtrElement element = MarkupParser::parseString(xml); + CAF_CM_VALIDATE_SMARTPTR(element); + CAF_CM_VALIDATE_STRING(element->name); + if (!rootName.empty()) { + CAF_CM_VALIDATE_COND_VA3(element->name == rootName, + "root not valid (\"%s\" != \"%s\") in %s", rootName.c_str(), + element->name.c_str(), path.c_str()); + } + + SmartPtrCXmlElement xmlElement; + xmlElement.CreateInstance(); + xmlElement->initialize(element, path); + + return xmlElement; +} + +SmartPtrCXmlElement CXmlUtils::createRootElement( + const std::string& rootName, + const std::string& rootNamespace) { + CAF_CM_STATIC_FUNC_VALIDATE("CXmlUtils", "createRootElement"); + CAF_CM_VALIDATE_STRING(rootName); + CAF_CM_VALIDATE_STRING(rootNamespace); + + return createRootElement(rootName, rootNamespace, std::string()); +} + +SmartPtrCXmlElement CXmlUtils::createRootElement( + const std::string& rootName, + const std::string& rootNamespace, + const std::string& schemaLocation) { + CAF_CM_STATIC_FUNC_VALIDATE("CXmlUtils", "createRootElement"); + CAF_CM_VALIDATE_STRING(rootName); + CAF_CM_VALIDATE_STRING(rootNamespace); + // schemaLocation is optional + + MarkupParser::SmartPtrElement element; + element.CreateInstance(); + + SmartPtrCXmlElement xmlElement; + xmlElement.CreateInstance(); + xmlElement->initialize(element, "createRootElement"); + xmlElement->addAttribute("xmlns:caf", rootNamespace); + + if (!schemaLocation.empty()) { + const std::string fullSchemaLocation = rootNamespace + " " + schemaLocation; + xmlElement->addAttribute("xmlns:xsi", + "http://www.w3.org/2001/XMLSchema-instance"); + xmlElement->addAttribute("xsi:schemaLocation", fullSchemaLocation); + } + + element->name = "caf:" + rootName; + + return xmlElement; +} + +std::string CXmlUtils::escape(const std::string& text) { + CAF_CM_STATIC_FUNC("CXmlUtils", "escape"); + + std::string rc; + gchar* gRc = NULL; + + try { + CAF_CM_VALIDATE_STRING(text); + + gRc = g_markup_escape_text(text.c_str(), -1); + if (gRc) { + rc = gRc; + g_free(gRc); + gRc = NULL; + } + } + CAF_CM_CATCH_DEFAULT + + try { + if (gRc) { + g_free(gRc); + } + } + CAF_CM_CATCH_DEFAULT + CAF_CM_THROWEXCEPTION; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.h new file mode 100644 index 000000000..ee9119106 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/CXmlUtils.h @@ -0,0 +1,45 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CXmlUtils_H_ +#define CXmlUtils_H_ + + + +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + +class XMLUTILS_LINKAGE CXmlUtils { +public: + static SmartPtrCXmlElement parseFile( + const std::string& path, + const std::string& rootName); + + static SmartPtrCXmlElement parseString( + const std::string& xml, + const std::string& rootName); + + static SmartPtrCXmlElement createRootElement( + const std::string& rootName, + const std::string& rootNamespace); + + static SmartPtrCXmlElement createRootElement( + const std::string& rootName, + const std::string& rootNamespace, + const std::string& schemaLocation); + + static std::string escape( + const std::string& text); + +private: + CAF_CM_DECLARE_NOCREATE(CXmlUtils); +}; + +} + +#endif /* CXmlUtils_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/XmlUtilsLink.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/XmlUtilsLink.h new file mode 100644 index 000000000..1165f99d6 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/XmlUtilsLink.h @@ -0,0 +1,25 @@ +/* + * Author: mdonahue + * Created: Sep 28, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef XMLUTILSLINK_H_ +#define XMLUTILSLINK_H_ + +#ifndef XMLUTILS_LINKAGE + #ifdef WIN32 + #ifdef FRAMEWORK_BUILD + #define XMLUTILS_LINKAGE __declspec(dllexport) + #else + #define XMLUTILS_LINKAGE __declspec(dllimport) + #endif + #else + #define XMLUTILS_LINKAGE + #endif +#endif + +#include "CXmlUtils.h" + +#endif diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/stdafx.h new file mode 100644 index 000000000..da0ed97cd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/Xml/XmlUtils/stdafx.h @@ -0,0 +1,27 @@ +/* + * Author: mdonahue + * Created: Sep 28, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef STDAFX_H_ +#define STDAFX_H_ + +#ifdef WIN32 + #define XMLUTILS_LINKAGE __declspec(dllexport) + #define COMMONAGGREGATOR_LINKAGE __declspec(dllexport) +#else + #define XMLUTILS_LINKAGE + #define COMMONAGGREGATOR_LINKAGE +#endif + +#include +#include +#include "../../Exception/ExceptionLink.h" +#include "../../Logging/LoggingLink.h" +#include "../../Collections/Iterators/IteratorsInc.h" +#include "../../Common/CFileSystemUtils.h" +#include "../MarkupParser/MarkupParserLink.h" + +#endif /* STDAFX_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Framework/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/stdafx.h new file mode 100644 index 000000000..d4c73201c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Framework/src/stdafx.h @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +#ifdef WIN32 + #define BASEPLATFORM_LINKAGE __declspec(dllexport) +#else + #define BASEPLATFORM_LINKAGE +#endif + +#include +#include "BasePlatformInc.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Makefile.am b/open-vm-tools/common-agent/Cpp/Framework/Makefile.am new file mode 100644 index 000000000..1c5e6c1da --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Makefile.am @@ -0,0 +1,428 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +AUTOMAKE_OPTIONS = subdir-objects +subsysdir = @CAF_SUBSYS_DIR@ +subsys_LTLIBRARIES = +caflibdir = @CAF_PME_LIB_DIR@ +caflib_LTLIBRARIES = +caflib_LTLIBRARIES += libFramework.la + +libFramework_la_SOURCES= +libFramework_la_SOURCES += Framework/src/BasePlatform.cpp +libFramework_la_SOURCES += Framework/src/Common/AppConfigUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CAppConfig.cpp +libFramework_la_SOURCES += Framework/src/Common/CApplicationContext.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoCondition.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoFileUnlock.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoMutex.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoMutexLockUnlock.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoMutexLockUnlockRaw.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoMutexUnlockLock.cpp +libFramework_la_SOURCES += Framework/src/Common/CAutoRecMutex.cpp +libFramework_la_SOURCES += Framework/src/Common/CCafRegex.cpp +libFramework_la_SOURCES += Framework/src/Common/CCmdLineOptions.cpp +libFramework_la_SOURCES += Framework/src/Common/CConfigParams.cpp +libFramework_la_SOURCES += Framework/src/Common/CConfigParamsChain.cpp +libFramework_la_SOURCES += Framework/src/Common/CDaemonUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CDateTimeUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CEnvironmentUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CFileLock.cpp +libFramework_la_SOURCES += Framework/src/Common/CFileSystemUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CHexCodec.cpp +libFramework_la_SOURCES += Framework/src/Common/CIniFile.cpp +libFramework_la_SOURCES += Framework/src/Common/CLoggingSetter.cpp +libFramework_la_SOURCES += Framework/src/Common/CLoggingUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CManagedThreadPool.cpp +libFramework_la_SOURCES += Framework/src/Common/CPersistenceUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CProcessUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CStringUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CThreadPool.cpp +libFramework_la_SOURCES += Framework/src/Common/CThreadSignal.cpp +libFramework_la_SOURCES += Framework/src/Common/CThreadUtils.cpp +libFramework_la_SOURCES += Framework/src/Common/CTimeUnit.cpp +libFramework_la_SOURCES += Framework/src/Common/CVariant.cpp +libFramework_la_SOURCES += Framework/src/Common/CafInitialize.cpp +libFramework_la_SOURCES += Framework/src/Common/UriUtils.cpp +libFramework_la_SOURCES += Framework/src/CommonGlobals.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAddInsDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CAuthnAuthzDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CClassFiltersDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CClassSpecifierDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CInlineAttachmentCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CInlineAttachmentDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CLoggingLevelCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CLoggingLevelElemDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/COperationDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CParameterCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CPropertyCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CPropertyDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CProtocolCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CProtocolDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestConfigDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestHeaderDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestInstanceParameterDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CRequestParameterDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafCoreTypesDoc/CStatisticsDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafInstallRequestDoc/CFullPackageElemDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafInstallRequestDoc/CGetInventoryJobDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallBatchDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallPackageSpecDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallProviderJobDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallProviderSpecDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafInstallRequestDoc/CInstallRequestDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafInstallRequestDoc/CMinPackageElemDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafInstallRequestDoc/CPackageDefnDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/CafInstallRequestDoc/CUninstallProviderJobDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/DiagRequestDoc/CDiagRequestDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagBatchDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagCollectInstancesDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagDeleteValueDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagSetValueCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/DiagTypesDoc/CDiagSetValueDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MgmtRequestDoc/CMgmtRequestDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtBatchDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectInstancesDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtCollectSchemaDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MgmtTypesDoc/CMgmtInvokeOperationDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtBatchDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CMultiPmeMgmtRequestDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/MultiPmeMgmtRequestDoc/CPmeIdCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/PersistenceDoc/CCertCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/PersistenceDoc/CCertPathCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/PersistenceDoc/CLocalSecurityDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceProtocolCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/PersistenceDoc/CPersistenceProtocolDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/PersistenceDoc/CRemoteSecurityCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/PersistenceDoc/CRemoteSecurityDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderInfraDoc/CClassCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderInfraDoc/CProviderRegDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderInfraDoc/CSchemaSummaryDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderBatchDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectInstancesDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderInvokeOperationDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestConfigDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderRequestDoc/CProviderRequestHeaderDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderResultsDoc/CCdifDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderResultsDoc/CRequestIdentifierDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ProviderResultsDoc/CSchemaDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ResponseDoc/CErrorResponseDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ResponseDoc/CEventKeyCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ResponseDoc/CEventKeyDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ResponseDoc/CEventManifestDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ResponseDoc/CManifestCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ResponseDoc/CManifestDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ResponseDoc/CProviderEventResponseDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ResponseDoc/CProviderResponseDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ResponseDoc/CResponseDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/ResponseDoc/CResponseHeaderDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassInstanceCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CActionClassInstanceDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassCardinalityDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassFieldDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassIdentifierDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassInstancePropertyDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CClassPropertyDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CCmdlMetadataDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CCmdlUnionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CCollectMethodDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassInstanceCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassInstanceDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassPropertyDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CDataClassSubInstanceDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceOperationCollectionDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceOperationDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CInstanceParameterDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CJoinTypeDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CLogicalRelationshipDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CMethodDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CMethodParameterDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CPhysicalRelationshipDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocDoc/SchemaTypesDoc/CRelationshipDoc.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocUtils/AttachmentUtils.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocUtils/DefnObjectConverter.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocUtils/DocXmlUtils.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocUtils/EnumConvertersXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocUtils/ParameterUtils.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AddInCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AddInsXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentNameCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AttachmentXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/AuthnAuthzXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/ClassFiltersXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/ClassSpecifierXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/FullyQualifiedClassGroupXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/LoggingLevelElemXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/OperationXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/ParameterCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/PropertyXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/ProtocolXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestConfigXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestHeaderXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestInstanceParameterXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestParameterXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/RequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafCoreTypesXml/StatisticsXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/FullPackageElemXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/GetInventoryJobXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallBatchXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallPackageSpecXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallProviderSpecXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/InstallRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/MinPackageElemXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/PackageDefnXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagBatchXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagCollectInstancesXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagDeleteValueXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/DiagTypesXml/DiagSetValueXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtRequestXml/MgmtRequestXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtBatchXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectInstancesXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtCollectSchemaXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MgmtTypesXml/MgmtInvokeOperationXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtBatchXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/MultiPmeMgmtRequestXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/MultiPmeMgmtRequestXml/PmeIdCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PayloadEnvelopeXml/PayloadEnvelopeXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/CertCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/CertPathCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/LocalSecurityXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceProtocolXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/PersistenceXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/PersistenceXml/RemoteSecurityXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ClassCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/ProviderRegXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderInfraXml/SchemaSummaryXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderBatchXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectInstancesXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderCollectSchemaRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderInvokeOperationXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestConfigXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestHeaderXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/CdifXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/DefinitionObjectCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/RequestIdentifierXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ProviderResultsXml/SchemaXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ErrorResponseXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/EventKeyCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/EventKeyXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/EventManifestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ManifestCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ManifestXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ProviderEventResponseXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ProviderResponseXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ResponseHeaderXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ResponseXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/ResponseXml/ResponseXmlRoots.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassInstanceXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ActionClassXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassCardinalityXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassFieldXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassIdentifierXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassInstancePropertyXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/ClassPropertyXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CmdlMetadataXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CmdlUnionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/CollectMethodXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassInstanceXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassPropertyXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassSubInstanceXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/DataClassXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationCollectionXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceOperationXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/InstanceParameterXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/JoinTypeXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/LogicalRelationshipXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/MethodParameterXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/MethodXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/PhysicalRelationshipXml.cpp +libFramework_la_SOURCES += Framework/src/Doc/DocXml/SchemaTypesXml/RelationshipXml.cpp +libFramework_la_SOURCES += Framework/src/Exception/CBacktraceUtils.cpp +libFramework_la_SOURCES += Framework/src/Exception/CCafException.cpp +libFramework_la_SOURCES += Framework/src/Exception/CCafExceptionEx.cpp +libFramework_la_SOURCES += Framework/src/Exception/CValidate.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CBeanPropertiesHelper.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageCreator.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageHeaders.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessageHeadersWriter.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessagePayload.cpp +libFramework_la_SOURCES += Framework/src/Integration/Caf/CCafMessagePayloadParser.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractMessageChannel.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractMessageRouter.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CAbstractPollableChannel.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CBroadcastingDispatcher.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CChannelInterceptorAdapter.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CChannelResolver.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CDocument.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CErrorHandler.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CExpressionHandler.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CIntException.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CIntMessage.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CIntMessageHeaders.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CIntegrationAppContext.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CMessageHandler.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CMessageHeaderUtils.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CMessagingTemplate.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CMessagingTemplateHandler.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CSimpleAsyncTaskExecutor.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CSimpleAsyncTaskExecutorState.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CSourcePollingChannelAdapter.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/CUnicastingDispatcher.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/FileHeaders.cpp +libFramework_la_SOURCES += Framework/src/Integration/Core/MessageHeaders.cpp +libFramework_la_SOURCES += Framework/src/Logging/CLogger.cpp +libFramework_la_SOURCES += Framework/src/PlatformIID.cpp +libFramework_la_SOURCES += Framework/src/PlatformStringFunc.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmDllManager.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystem.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystemModule.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/CEcmSubSystemRegistry.cpp +libFramework_la_SOURCES += Framework/src/SubSystemBase/EcmSubSystemBase.cpp +libFramework_la_SOURCES += Framework/src/Xml/MarkupParser/CMarkupParser.cpp +libFramework_la_SOURCES += Framework/src/Xml/XmlUtils/CXmlElement.cpp +libFramework_la_SOURCES += Framework/src/Xml/XmlUtils/CXmlUtils.cpp + +libFramework_la_CPPFLAGS = +libFramework_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libFramework_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ + +libFramework_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libFramework_la_LIBADD = +libFramework_la_LIBADD += @GLIB2_LIBS@ +libFramework_la_LIBADD += @LOG4CPP_LIBS@ +libFramework_la_LIBADD += -ldl + +libFramework_la_LDFLAGS = -shared + +subsys_LTLIBRARIES += libIntegrationSubsys.la +libIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libIntegrationSubsys_la_SOURCES= +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CDirectChannelInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CErrorChannel.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CErrorChannelInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CFileInboundChannelAdapterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CFileReadingMessageSource.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CFileToStringTransformerInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CHeaderEnricherTransformerInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CHeaderExpressionInvoker.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CHeaderValueRouterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CIntegrationObjectFactory.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CLoggingChannelAdapterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CMessageHandlerChainInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CNullChannel.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CNullChannelInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CObjectFactoryTables.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CPayloadContentRouterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CPublishSubscribeChannelInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CQueueChannelInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CRecipientListRouterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CRouterInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CServiceActivatorInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CWireTapInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CXPathHeaderEnricherItem.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.cpp +libIntegrationSubsys_la_SOURCES += Subsystems/Integration/src/Integration.cpp + +libIntegrationSubsys_la_CPPFLAGS = +libIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ + +libIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Subsystems/Integration/include +libIntegrationSubsys_la_LIBADD = +libIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libIntegrationSubsys_la_LIBADD += -ldl +libIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la + +libIntegrationSubsys_la_LDFLAGS += -shared + +subsys_LTLIBRARIES += libCafIntegrationSubsys.la +libCafIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libCafIntegrationSubsys_la_SOURCES= +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CErrorToResponseTransformer.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CPayloadHeaderEnricher.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.cpp +libCafIntegrationSubsys_la_SOURCES += Subsystems/CafIntegration/src/CafIntegration.cpp + +libCafIntegrationSubsys_la_CPPFLAGS = +libCafIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libCafIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ + +libCafIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libCafIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Subsystems/CafIntegration/include +libCafIntegrationSubsys_la_LIBADD = +libCafIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libCafIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libCafIntegrationSubsys_la_LIBADD += -ldl +libCafIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la + +libCafIntegrationSubsys_la_LDFLAGS += -shared diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/include/CEnvelopeToPayloadTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/include/CEnvelopeToPayloadTransformerInstance.h new file mode 100644 index 000000000..f4e14ac06 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/include/CEnvelopeToPayloadTransformerInstance.h @@ -0,0 +1,91 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CEnvelopeToPayloadTransformerInstance_h_ +#define CEnvelopeToPayloadTransformerInstance_h_ + +#include "Common/IAppContext.h" +#include "CafIntegrationSubsys.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" + +#include "Integration/IErrorProcessor.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CEnvelopeToPayloadTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer, + public IErrorProcessor { +public: + struct SExpandedFileAlias { + std::string _filePath; + std::string _encoding; + }; + CAF_DECLARE_SMART_POINTER(SExpandedFileAlias); + +public: + CEnvelopeToPayloadTransformerInstance(); + virtual ~CEnvelopeToPayloadTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdEnvelopeToPayloadTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CEnvelopeToPayloadTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_INTERFACE_ENTRY(IErrorProcessor) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrCDynamicByteArray findPayload( + const std::deque& attachmentCollection) const; + + std::deque removePayload( + const std::deque& attachmentCollection) const; + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CEnvelopeToPayloadTransformerInstance); +}; + +} + +#endif // #ifndef CEnvelopeToPayloadTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/include/CafIntegrationSubsys.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/include/CafIntegrationSubsys.h new file mode 100644 index 000000000..39ff668fb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/include/CafIntegrationSubsys.h @@ -0,0 +1,20 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CafIntegrationSubsys_h_ +#define CafIntegrationSubsys_h_ + +namespace Caf { + extern const char* _sObjIdErrorToResponseTransformerInstance; + extern const char* _sObjIdErrorToResponseTransformer; + extern const char* _sObjIdPayloadHeaderEnricherInstance; + extern const char* _sObjIdPayloadHeaderEnricher; + extern const char* _sObjIdEnvelopeToPayloadTransformerInstance; + extern const char* _sObjIdEnvelopeToPayloadTransformer; +} + +#endif // #ifndef CafIntegrationSubsys_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.cpp new file mode 100644 index 000000000..cc010ab48 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.cpp @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CEnvelopeToPayloadTransformer.h" + +using namespace Caf; + +CEnvelopeToPayloadTransformer::CEnvelopeToPayloadTransformer() : + _isInitialized(false), + CAF_CM_INIT("CEnvelopeToPayloadTransformer") { +} + +CEnvelopeToPayloadTransformer::~CEnvelopeToPayloadTransformer() { +} + +void CEnvelopeToPayloadTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + _ctorArgs = ctorArgs; + _properties = properties; + + initialize(); +} + +void CEnvelopeToPayloadTransformer::terminateBean() { +} + +void CEnvelopeToPayloadTransformer::initialize() { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _isInitialized = true; +} + +bool CEnvelopeToPayloadTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + return false; +} + +SmartPtrIIntegrationObject CEnvelopeToPayloadTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + rc.CreateInstance(_sObjIdEnvelopeToPayloadTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.h new file mode 100644 index 000000000..e525d8fc8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformer.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CEnvelopeToPayloadTransformer_h_ +#define CEnvelopeToPayloadTransformer_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CEnvelopeToPayloadTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CEnvelopeToPayloadTransformer(); + virtual ~CEnvelopeToPayloadTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdEnvelopeToPayloadTransformer) + + CAF_BEGIN_INTERFACE_MAP(CEnvelopeToPayloadTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CEnvelopeToPayloadTransformer); +}; + +} + +#endif // #ifndef CEnvelopeToPayloadTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.cpp new file mode 100644 index 000000000..dbdae1803 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CEnvelopeToPayloadTransformerInstance.cpp @@ -0,0 +1,138 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "CEnvelopeToPayloadTransformerInstance.h" +#include "Exception/CCafException.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" +#include "Integration/Caf/CCafMessageCreator.h" + +using namespace Caf; + +CEnvelopeToPayloadTransformerInstance::CEnvelopeToPayloadTransformerInstance() : + _isInitialized(false), + CAF_CM_INIT("CEnvelopeToPayloadTransformerInstance") { +} + +CEnvelopeToPayloadTransformerInstance::~CEnvelopeToPayloadTransformerInstance() { +} + +void CEnvelopeToPayloadTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _isInitialized = true; +} + +std::string CEnvelopeToPayloadTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CEnvelopeToPayloadTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +SmartPtrIIntMessage CEnvelopeToPayloadTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + const std::deque attachmentCollection = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + + const SmartPtrCDynamicByteArray payload= findPayload(attachmentCollection); + const std::deque attachmentCollectionRm = + removePayload(attachmentCollection); + + return CCafMessageCreator::create( + payload, attachmentCollectionRm, message->getHeaders()); +} + +SmartPtrIIntMessage CEnvelopeToPayloadTransformerInstance::processErrorMessage( + const SmartPtrIIntMessage& message) { + return transformMessage(message); +} + +SmartPtrCDynamicByteArray CEnvelopeToPayloadTransformerInstance::findPayload( + const std::deque& attachmentCollection) const { + CAF_CM_FUNCNAME("findPayload"); + CAF_CM_VALIDATE_STL(attachmentCollection); + + std::string payloadPath; + for (TConstIterator > attachmentIter(attachmentCollection); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + if (attachment->getName().compare("_EnvelopePayload_") == 0) { + UriUtils::SUriRecord sourceUriRecord; + UriUtils::parseUriString(attachment->getUri(), sourceUriRecord); + + if (sourceUriRecord.protocol.compare("file") != 0) { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_STATE, + "Payload attachment must be a file - uri: %s", + attachment->getUri().c_str()); + } + + UriUtils::SFileUriRecord sourceFileUriRecord; + UriUtils::parseFileAddress(sourceUriRecord.address, sourceFileUriRecord); + payloadPath = sourceFileUriRecord.path; + + if (!FileSystemUtils::doesFileExist(payloadPath)) { + CAF_CM_EXCEPTION_VA1(ERROR_FILE_NOT_FOUND, + "File not found - %s", payloadPath.c_str()); + } + } + } + + if (payloadPath.empty()) { + CAF_CM_EXCEPTION_VA0(ERROR_NOT_FOUND, "Payload attachment not found"); + } + + return FileSystemUtils::loadByteFile(payloadPath); +} + +std::deque CEnvelopeToPayloadTransformerInstance::removePayload( + const std::deque& attachmentCollection) const { + CAF_CM_FUNCNAME_VALIDATE("removePayload"); + CAF_CM_VALIDATE_STL(attachmentCollection); + + std::deque rc; + for (TConstIterator > attachmentIter(attachmentCollection); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + if (attachment->getName().compare("_EnvelopePayload_") != 0) { + rc.push_back(attachment); + } + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.cpp new file mode 100644 index 000000000..0b7e01be9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CErrorToResponseTransformer.h" + +using namespace Caf; + +CErrorToResponseTransformer::CErrorToResponseTransformer() : + _isInitialized(false), + CAF_CM_INIT("CErrorToResponseTransformer") { +} + +CErrorToResponseTransformer::~CErrorToResponseTransformer() { +} + +void CErrorToResponseTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CErrorToResponseTransformer::terminateBean() { +} + +void CErrorToResponseTransformer::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CErrorToResponseTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CErrorToResponseTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdErrorToResponseTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.h new file mode 100644 index 000000000..13dffa9e8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformer.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CErrorToResponseTransformer_h_ +#define CErrorToResponseTransformer_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CErrorToResponseTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CErrorToResponseTransformer(); + virtual ~CErrorToResponseTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdErrorToResponseTransformer) + + CAF_BEGIN_INTERFACE_MAP(CErrorToResponseTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CErrorToResponseTransformer); +}; + +} + +#endif // #ifndef CErrorToResponseTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.cpp new file mode 100644 index 000000000..a894d3a77 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.cpp @@ -0,0 +1,135 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Caf/CCafMessageHeaders.h" +#include "Common/IAppContext.h" +#include "Doc/ResponseDoc/CErrorResponseDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CErrorToResponseTransformerInstance.h" +#include "Integration/Caf/CCafMessageCreator.h" + +using namespace Caf; + +CErrorToResponseTransformerInstance::CErrorToResponseTransformerInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CErrorToResponseTransformerInstance") { +} + +CErrorToResponseTransformerInstance::~CErrorToResponseTransformerInstance() { +} + +void CErrorToResponseTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CErrorToResponseTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CErrorToResponseTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CErrorToResponseTransformerInstance::processErrorMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("processErrorMessage"); + + SmartPtrIIntMessage newMessage; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA1("Called - %s", _id.c_str()); + + const SmartPtrCCafMessageHeaders cafMessageHeaders = + CCafMessageHeaders::create(message->getHeaders()); + + const std::string errorMessage = message->getPayloadStr(); + const UUID clientId = cafMessageHeaders->getClientIdOpt(); + const UUID requestId = cafMessageHeaders->getRequestIdOpt(); + const std::string pmeIdStr = cafMessageHeaders->getPmeIdOpt(); + const UUID sessionId = cafMessageHeaders->getSessionIdOpt(); + + const std::string version = "1.0"; + const std::string createdDateTime = CDateTimeUtils::getCurrentDateTime(); + const uint32 sequenceNumber = 0; + const bool isFinalResponse = true; + + SmartPtrCResponseHeaderDoc responseHeader; + responseHeader.CreateInstance(); + responseHeader->initialize( + version, + createdDateTime, + sequenceNumber, + isFinalResponse, + sessionId); + + SmartPtrCErrorResponseDoc errorResponse; + errorResponse.CreateInstance(); + errorResponse->initialize( + clientId, + requestId, + pmeIdStr, + responseHeader, + errorMessage); + + const std::string randomUuidStr = CStringUtils::createRandomUuid(); + const std::string relFilename = randomUuidStr + "_" + _sErrorResponseFilename; + + newMessage = CCafMessageCreator::createPayloadEnvelope( + errorResponse, relFilename, message->getHeaders()); + + // Writing the error response for debugging purposes + const std::string tmpDir = AppConfigUtils::getRequiredString(_sConfigTmpDir); + FileSystemUtils::saveTextFile(tmpDir, _sErrorResponseFilename, + newMessage->getPayloadStr()); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + return newMessage; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.h new file mode 100644 index 000000000..072d52af2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CErrorToResponseTransformerInstance.h @@ -0,0 +1,68 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CErrorToResponseTransformerInstance_h_ +#define CErrorToResponseTransformerInstance_h_ + +#include "CafIntegrationSubsys.h" +#include "Common/IAppContext.h" +#include "Integration/IErrorProcessor.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" + +namespace Caf { + +class CErrorToResponseTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public IErrorProcessor { +public: + CErrorToResponseTransformerInstance(); + virtual ~CErrorToResponseTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdErrorToResponseTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CErrorToResponseTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(IErrorProcessor) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CErrorToResponseTransformerInstance); +}; + +} + +#endif // #ifndef CErrorToResponseTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.cpp new file mode 100644 index 000000000..548b13e11 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.cpp @@ -0,0 +1,85 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CPayloadHeaderEnricher.h" + +using namespace Caf; + +CPayloadHeaderEnricher::CPayloadHeaderEnricher() : + _isInitialized(false), + CAF_CM_INIT("CPayloadHeaderEnricher") { +} + +CPayloadHeaderEnricher::~CPayloadHeaderEnricher() { +} + +void CPayloadHeaderEnricher::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + _ctorArgs = ctorArgs; + _properties = properties; + + initialize(); + } + CAF_CM_EXIT; +} + +void CPayloadHeaderEnricher::terminateBean() { +} + +void CPayloadHeaderEnricher::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CPayloadHeaderEnricher::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CPayloadHeaderEnricher::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdPayloadHeaderEnricherInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.h new file mode 100644 index 000000000..d988c0d2e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricher.h @@ -0,0 +1,65 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CPayloadHeaderEnricher_h_ +#define CPayloadHeaderEnricher_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CPayloadHeaderEnricher : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CPayloadHeaderEnricher(); + virtual ~CPayloadHeaderEnricher(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdPayloadHeaderEnricher) + + CAF_BEGIN_INTERFACE_MAP(CPayloadHeaderEnricher) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CPayloadHeaderEnricher); +}; + +} + +#endif // #ifndef CPayloadHeaderEnricher_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.cpp new file mode 100644 index 000000000..474470991 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.cpp @@ -0,0 +1,109 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Caf/CBeanPropertiesHelper.h" +#include "Integration/Caf/CCafMessageHeadersWriter.h" +#include "Common/IAppContext.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CPayloadHeaderEnricherInstance.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" + +using namespace Caf; + +CPayloadHeaderEnricherInstance::CPayloadHeaderEnricherInstance() : + _isInitialized(false), + _includeFilename(false), + CAF_CM_INIT_LOG("CPayloadHeaderEnricherInstance") { +} + +CPayloadHeaderEnricherInstance::~CPayloadHeaderEnricherInstance() { +} + +void CPayloadHeaderEnricherInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const SmartPtrCBeanPropertiesHelper beanProperties = + CBeanPropertiesHelper::create(properties); + _includeFilename = beanProperties->getOptionalBool("includeFilename", true); + + _isInitialized = true; +} + +std::string CPayloadHeaderEnricherInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CPayloadHeaderEnricherInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +SmartPtrIIntMessage CPayloadHeaderEnricherInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + const std::string payloadType = payloadEnvelope->getPayloadType(); + const std::string clientIdStr = + BasePlatform::UuidToString(payloadEnvelope->getClientId()); + const std::string requestIdStr = + BasePlatform::UuidToString(payloadEnvelope->getRequestId()); + const std::string pmeIdStr = payloadEnvelope->getPmeId(); + const std::string version = payloadEnvelope->getVersion(); + const std::string payloadVersion = payloadEnvelope->getPayloadVersion(); + + SmartPtrCCafMessageHeadersWriter messageHeadersWriter = + CCafMessageHeadersWriter::create(); + messageHeadersWriter->setPayloadType(payloadType); + messageHeadersWriter->setClientId(clientIdStr); + messageHeadersWriter->setRequestId(requestIdStr); + messageHeadersWriter->setPmeId(pmeIdStr); + messageHeadersWriter->setVersion(version); + messageHeadersWriter->setPayloadVersion(payloadVersion); + + if (_includeFilename) { + std::string relFilename = FileSystemUtils::buildPath( + clientIdStr, requestIdStr, pmeIdStr); + relFilename = FileSystemUtils::buildPath(relFilename, _sPayloadRequestFilename); + + messageHeadersWriter->setRelFilename(relFilename); + + CAF_CM_LOG_DEBUG_VA2( + "Enhanced the headers - payloadType: \"%s\", filename: \"%s\"", + payloadType.c_str(), relFilename.c_str()); + } + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), + messageHeadersWriter->getHeaders(), message->getHeaders()); + + return messageImpl; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.h new file mode 100644 index 000000000..14f0b57ac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CPayloadHeaderEnricherInstance.h @@ -0,0 +1,70 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CPayloadHeaderEnricherInstance_h_ +#define CPayloadHeaderEnricherInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CPayloadHeaderEnricherInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CPayloadHeaderEnricherInstance(); + virtual ~CPayloadHeaderEnricherInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdPayloadHeaderEnricherInstance) + + CAF_BEGIN_INTERFACE_MAP(CPayloadHeaderEnricherInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + bool _includeFilename; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPayloadHeaderEnricherInstance); +}; + +} + +#endif // #ifndef CPayloadHeaderEnricherInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CafIntegration.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CafIntegration.cpp new file mode 100644 index 000000000..d7c24afb5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/CafIntegration.cpp @@ -0,0 +1,56 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CEnvelopeToPayloadTransformerInstance.h" + +using namespace Caf; + +namespace Caf { + const char* _sObjIdErrorToResponseTransformerInstance = "com.vmware.commonagent.cafintegration.errortoresponsetransformerinstance"; + const char* _sObjIdErrorToResponseTransformer = "com.vmware.commonagent.cafintegration.errortoresponsetransformer"; + const char* _sObjIdPayloadHeaderEnricherInstance = "com.vmware.commonagent.cafintegration.payloadheaderenricherinstance"; + const char* _sObjIdPayloadHeaderEnricher = "com.vmware.commonagent.cafintegration.payloadheaderenricher"; + const char* _sObjIdEnvelopeToPayloadTransformerInstance = "com.vmware.commonagent.cafintegration.envelopetopayloadtransformerinstance"; + const char* _sObjIdEnvelopeToPayloadTransformer = "com.vmware.commonagent.cafintegration.envelopetopayloadtransformer"; +} + +CEcmSubSystemModule _Module; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) + CAF_OBJECT_ENTRY(CErrorToResponseTransformer) + CAF_OBJECT_ENTRY(CErrorToResponseTransformerInstance) + CAF_OBJECT_ENTRY(CPayloadHeaderEnricher) + CAF_OBJECT_ENTRY(CPayloadHeaderEnricherInstance) + CAF_OBJECT_ENTRY(CEnvelopeToPayloadTransformer) + CAF_OBJECT_ENTRY(CEnvelopeToPayloadTransformerInstance) +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/stdafx.h new file mode 100644 index 000000000..4dd72888a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/CafIntegration/src/stdafx.h @@ -0,0 +1,25 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include + +#include "CErrorToResponseTransformerInstance.h" +#include "CErrorToResponseTransformer.h" + +#include "CPayloadHeaderEnricherInstance.h" +#include "CPayloadHeaderEnricher.h" + +#include "CEnvelopeToPayloadTransformer.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CFileReadingMessageSource.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CFileReadingMessageSource.h new file mode 100644 index 000000000..5f81cf5fc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CFileReadingMessageSource.h @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CFileReadingMessageSource_h_ +#define CFileReadingMessageSource_h_ + +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/Core/CAbstractPollableChannel.h" + +namespace Caf { + +class CFileReadingMessageSource : + public CAbstractPollableChannel +{ +private: + typedef std::map CFileCollection; + CAF_DECLARE_SMART_POINTER(CFileCollection); + +public: + CFileReadingMessageSource(); + virtual ~CFileReadingMessageSource(); + +public: + void initialize( + const SmartPtrIDocument& configSection); + +protected: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + SmartPtrCFileCollection itemsInDirectory( + const std::string& directory, + const std::string& filenameRegex) const; + + SmartPtrCFileCollection merge( + const SmartPtrCFileCollection& newFileCollection, + const SmartPtrCFileCollection& existingFileCollection) const; + + std::string calcNextFile( + SmartPtrCFileCollection& fileCollection) const; + + uint64 getTimeSec() const; + + bool isRefreshNecessary( + const uint32 refreshSec, + const uint64 lastRefreshSec) const; + +private: + bool _isInitialized; + std::string _id; + std::string _directory; + std::string _filenameRegex; + bool _preventDuplicates; + uint32 _refreshSec; + uint64 _lastRefreshSec; + + SmartPtrCFileCollection _fileCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CFileReadingMessageSource); +}; + +CAF_DECLARE_SMART_POINTER(CFileReadingMessageSource); + +} + +#endif // #ifndef CFileReadingMessageSource_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CMessageHandlerChainInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CMessageHandlerChainInstance.h new file mode 100644 index 000000000..da03f262e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CMessageHandlerChainInstance.h @@ -0,0 +1,167 @@ +/* + * Created on: Aug 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMessageHandlerChainInstance_h +#define CMessageHandlerChainInstance_h + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "ICafObject.h" +#include "Integration/Core/CMessageHandler.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/ISubscribableChannel.h" +#include "Integration/ITaskExecutor.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IMessageHandler.h" + +namespace Caf { + +class CMessageHandlerChainInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IMessageHandler +{ +public: + CMessageHandlerChainInstance(); + virtual ~CMessageHandlerChainInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IMessageHandler) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + +private: + void logMessage(const SmartPtrIIntMessage& message) const; + +private: + class ChainedMessageHandler { + public: + ChainedMessageHandler(); + + void init( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + void setId(const std::string& id); + void setOutputChannel(const SmartPtrIMessageChannel& channel); + void setMessageHandler(const SmartPtrICafObject& handlerObj); + void handleMessage(const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + + private: + void logMessage(const SmartPtrIIntMessage& message) const; + + private: + bool _isInitialized; + std::string _id; + SmartPtrIMessageChannel _outputChannel; + SmartPtrICafObject _messageHandlerObj; + SmartPtrCMessageHandler _messageHandler; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(ChainedMessageHandler); + }; + CAF_DECLARE_SMART_POINTER(ChainedMessageHandler); + typedef std::deque MessageHandlers; + + class InterconnectChannel : public IMessageChannel { + public: + InterconnectChannel(); + virtual ~InterconnectChannel(); + void init(const SmartPtrChainedMessageHandler& nextHandler); + bool send( + const SmartPtrIIntMessage& message); + bool send( + const SmartPtrIIntMessage& message, + const int32 timeout); + + private: + SmartPtrChainedMessageHandler _nextHandler; + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(InterconnectChannel); + }; + CAF_DECLARE_SMART_POINTER(InterconnectChannel); + + struct ChainLink { + CMessageHandlerChainInstance::SmartPtrChainedMessageHandler handler; + std::string id; + bool isMessageProducer; + }; + CAF_DECLARE_SMART_POINTER(ChainLink); + typedef std::vector ChainLinks; + + class SelfWeakReference : public IMessageHandler { + public: + SelfWeakReference(); + void setReference(IMessageHandler *handler); + public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + private: + IMessageHandler *_reference; + CAF_CM_CREATE_THREADSAFE; + }; + CAF_DECLARE_SMART_POINTER(SelfWeakReference); + +private: + bool _isInitialized; + bool _isRunning; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + SmartPtrIDocument _configSection; + std::string _id; + SmartPtrISubscribableChannel _subscribableInputChannel; + SmartPtrITaskExecutor _taskExecutor; + SmartPtrSelfWeakReference _weakRefSelf; + MessageHandlers _messageHandlers; + SmartPtrIIntMessage _savedMessage; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CMessageHandlerChainInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CMessageHandlerChainInstance); + +} + +#endif /* CMessageHandlerChainInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CXPathHeaderEnricherItem.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CXPathHeaderEnricherItem.h new file mode 100644 index 000000000..9b4ffe404 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/CXPathHeaderEnricherItem.h @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CXPathHeaderEnricherItem_h_ +#define CXPathHeaderEnricherItem_h_ + + +#include "Integration/IDocument.h" + +namespace Caf { + +class CXPathHeaderEnricherItem { +private: + typedef std::map CFileCollection; + CAF_DECLARE_SMART_POINTER(CFileCollection); + +public: + CXPathHeaderEnricherItem(); + virtual ~CXPathHeaderEnricherItem(); + +public: + void initialize( + const SmartPtrIDocument& configSection, + const bool& defaultOverwrite); + +public: + std::string getName() const; + std::string getEvaluationType() const; + bool getOverwrite() const; + std::string getXpathExpression() const; + std::string getXpathExpressionRef() const; + +private: + bool _isInitialized; + + std::string _name; + std::string _evaluationType; + bool _overwrite; + std::string _xpathExpression; + std::string _xpathExpressionRef; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CXPathHeaderEnricherItem); +}; + +CAF_DECLARE_SMART_POINTER(CXPathHeaderEnricherItem); + +} + +#endif // #ifndef CXPathHeaderEnricherItem_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/IntegrationSubsys.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/IntegrationSubsys.h new file mode 100644 index 000000000..9fa6ccc58 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/include/IntegrationSubsys.h @@ -0,0 +1,19 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef IntegrationSubsys_h_ +#define IntegrationSubsys_h_ + +namespace Caf { + // Integration Contracts + extern const char* _sObjIdIntegrationObjectFactory; + extern const char* _sObjIdErrorChannel; + extern const char* _sObjIdNullChannel; + extern const char* _sObjIdHeaderExpressionInvoker; +} + +#endif // #ifndef IntegrationSubsys_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.cpp new file mode 100644 index 000000000..bc5cf8116 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.cpp @@ -0,0 +1,119 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/Core/CUnicastingDispatcher.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IMessageHandler.h" +#include "Exception/CCafException.h" +#include "CDirectChannelInstance.h" + +using namespace Caf; + +CDirectChannelInstance::CDirectChannelInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CDirectChannelInstance"){ +} + +CDirectChannelInstance::~CDirectChannelInstance() { +} + +void CDirectChannelInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; +} + +std::string CDirectChannelInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CDirectChannelInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCUnicastingDispatcher unicastingDispatcher; + unicastingDispatcher.CreateInstance(); + unicastingDispatcher->initialize(errorHandler); + _messageDispatcher = unicastingDispatcher; +} + +void CDirectChannelInstance::subscribe( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("subscribe"); + + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->addHandler(messageHandler); +} + +void CDirectChannelInstance::unsubscribe( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("unsubscribe"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->removeHandler(messageHandler); +} + +bool CDirectChannelInstance::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME("doSend"); + + bool sent = false; + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA1("Dispatching message - %s", _id.c_str()); + sent = _messageDispatcher->dispatch(message); + if (!sent) { + CAF_CM_LOG_WARN_VA1("Nothing handled the message - channel: %s", _id.c_str()); + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + return sent; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.h new file mode 100644 index 000000000..1cf1406b8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CDirectChannelInstance.h @@ -0,0 +1,85 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CDirectChannelInstance_h_ +#define CDirectChannelInstance_h_ + +#include "Integration/IIntegrationComponentInstance.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageDispatcher.h" +#include "Integration/IMessageHandler.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ISubscribableChannel.h" +#include "Integration/Core/CAbstractMessageChannel.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CDirectChannelInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ISubscribableChannel, + public CAbstractMessageChannel +{ +public: + CDirectChannelInstance(); + virtual ~CDirectChannelInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ISubscribableChannel) + CAF_QI_ENTRY(IMessageChannel) + CAF_QI_ENTRY(IChannelInterceptorSupport) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ISubscribableChannel + void subscribe( + const SmartPtrIMessageHandler& messageHandler); + + void unsubscribe( + const SmartPtrIMessageHandler& messageHandler); + + +protected: // CAbstractMessageChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + +private: + bool _isInitialized; + SmartPtrIDocument _configSection; + std::string _id; + SmartPtrIMessageDispatcher _messageDispatcher; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CDirectChannelInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CDirectChannelInstance); + +} + +#endif // #ifndef CDirectChannelInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.cpp new file mode 100644 index 000000000..635bef809 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.cpp @@ -0,0 +1,91 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CErrorChannel.h" +#include "CErrorChannelInstance.h" + +using namespace Caf; + +CErrorChannel::CErrorChannel() : + _isInitialized(false), + CAF_CM_INIT("CErrorChannel"){ +} + +CErrorChannel::~CErrorChannel() { +} + +void CErrorChannel::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + _ctorArgs = ctorArgs; + _properties = properties; + + initialize(); + } + CAF_CM_EXIT; +} + +void CErrorChannel::terminateBean() { +} + +void CErrorChannel::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CErrorChannel::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CErrorChannel::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // configSection is optional + + SmartPtrCErrorChannelInstance instance; + instance.CreateInstance(); + instance->initialize(_ctorArgs, _properties, configSection); + rc.QueryInterface(instance, false); + CAF_CM_VALIDATE_INTERFACE(rc); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.h new file mode 100644 index 000000000..83f41311c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannel.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CErrorChannel_h_ +#define CErrorChannel_h_ + + +#include "IBean.h" + +#include "IntegrationSubsys.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CErrorChannel : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent +{ +public: + CErrorChannel(); + virtual ~CErrorChannel(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdErrorChannel) + + CAF_BEGIN_INTERFACE_MAP(CErrorChannel) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + void initialize(); + +public: // IBean + void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CErrorChannel); +}; + +} + +#endif // #ifndef CErrorChannel_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.cpp new file mode 100644 index 000000000..5c1715a5e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.cpp @@ -0,0 +1,142 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/Core/CUnicastingDispatcher.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IMessageHandler.h" +#include "Exception/CCafException.h" +#include "CErrorChannelInstance.h" + +using namespace Caf; + +CErrorChannelInstance::CErrorChannelInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CErrorChannelInstance") { +} + +CErrorChannelInstance::~CErrorChannelInstance() { +} + +void CErrorChannelInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + // configSection is optional + + _id = "errorChannel"; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CErrorChannelInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CErrorChannelInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIMessageChannel nullMessageChannel = + channelResolver->resolveChannelName("nullChannel"); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, nullMessageChannel); + + SmartPtrCUnicastingDispatcher unicastingDispatcher; + unicastingDispatcher.CreateInstance(); + unicastingDispatcher->initialize(errorHandler); + _messageDispatcher = unicastingDispatcher; + } + CAF_CM_EXIT; +} + +void CErrorChannelInstance::subscribe(const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("subscribe"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->addHandler(messageHandler); + } + CAF_CM_EXIT; +} + +void CErrorChannelInstance::unsubscribe(const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("unsubscribe"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->removeHandler(messageHandler); + } + CAF_CM_EXIT; +} + +bool CErrorChannelInstance::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME("doSend"); + + bool sent = false; + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA1("Dispatching message - %s", _id.c_str()); + sent = _messageDispatcher->dispatch(message); + if (!sent) { + CAF_CM_LOG_WARN_VA1("Nothing handled the message - channel: %s", _id.c_str()); + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + return sent; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.h new file mode 100644 index 000000000..468190aee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CErrorChannelInstance.h @@ -0,0 +1,81 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CErrorChannelInstance_h_ +#define CErrorChannelInstance_h_ + +#include "Integration/IIntegrationComponentInstance.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageDispatcher.h" +#include "Integration/IMessageHandler.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ISubscribableChannel.h" +#include "Integration/Core/CAbstractMessageChannel.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CErrorChannelInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ISubscribableChannel, + public CAbstractMessageChannel +{ +public: + CErrorChannelInstance(); + virtual ~CErrorChannelInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ISubscribableChannel) + CAF_QI_ENTRY(IMessageChannel) + CAF_QI_ENTRY(IChannelInterceptorSupport) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ISubscribableChannel + void subscribe( + const SmartPtrIMessageHandler& messageHandler); + + void unsubscribe( + const SmartPtrIMessageHandler& messageHandler); + +protected: // CAbstractMessageChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + +private: + bool _isInitialized; + std::string _id; + SmartPtrIMessageDispatcher _messageDispatcher; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CErrorChannelInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CErrorChannelInstance); +} + +#endif // #ifndef CErrorChannelInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..e9e7606db --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.cpp @@ -0,0 +1,161 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CFileReadingMessageSource.h" +#include "Common/IAppContext.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/Core/CMessageHandler.h" +#include "Integration/Core/CSimpleAsyncTaskExecutor.h" +#include "Integration/Core/CSourcePollingChannelAdapter.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IMessageChannel.h" +#include "CFileInboundChannelAdapterInstance.h" + +using namespace Caf; + +CFileInboundChannelAdapterInstance::CFileInboundChannelAdapterInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CFileInboundChannelAdapterInstance") { +} + +CFileInboundChannelAdapterInstance::~CFileInboundChannelAdapterInstance() { +} + +void CFileInboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CFileInboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CFileInboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const std::string outputChannelStr = + _configSection->findRequiredAttribute("channel"); + + SmartPtrCFileReadingMessageSource fileReadingMessageSource; + fileReadingMessageSource.CreateInstance(); + fileReadingMessageSource->initialize(_configSection); + + const SmartPtrIMessageChannel outputMessageChannel = + channelResolver->resolveChannelName(outputChannelStr); + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _id, + outputMessageChannel, + SmartPtrICafObject()); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize( + messageHandler, fileReadingMessageSource, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(sourcePollingChannelAdapter, errorHandler); + _taskExecutor = simpleAsyncTaskExecutor; + } + CAF_CM_EXIT; +} + +void CFileInboundChannelAdapterInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Starting the executor"); + _taskExecutor->execute(timeoutMs); + } + CAF_CM_EXIT; +} + +void CFileInboundChannelAdapterInstance::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Stopping the executor"); + _taskExecutor->cancel(timeoutMs); + } + CAF_CM_EXIT; +} + +bool CFileInboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc = (_taskExecutor->getState() == ITaskExecutor::ETaskStateStarted); + } + CAF_CM_EXIT; + + return rc; +} + +bool CFileInboundChannelAdapterInstance::isMessageProducer() const { + CAF_CM_FUNCNAME_VALIDATE("isMessageProducer"); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc = true; + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.h new file mode 100644 index 000000000..aab1eabbb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileInboundChannelAdapterInstance.h @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CFileInboundChannelAdapterInstance_h_ +#define CFileInboundChannelAdapterInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/ITaskExecutor.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" +#include "Integration/IMessageProducer.h" + +namespace Caf { + +class CFileInboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IMessageProducer { +public: + CFileInboundChannelAdapterInstance(); + virtual ~CFileInboundChannelAdapterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IMessageProducer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IMessageProducer + bool isMessageProducer() const; + +private: + bool _isInitialized; + SmartPtrIDocument _configSection; + std::string _id; + SmartPtrITaskExecutor _taskExecutor; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CFileInboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CFileInboundChannelAdapterInstance); + +} + +#endif // #ifndef CFileInboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..1d2d7a887 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.cpp @@ -0,0 +1,186 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Exception/CCafException.h" +#include "CFileOutboundChannelAdapterInstance.h" +#include "CDirectChannelInstance.h" +#include "Integration/Core/FileHeaders.h" + +using namespace Caf; + +CFileOutboundChannelAdapterInstance::CFileOutboundChannelAdapterInstance() : + _isInitialized(false), + _autoCreateDirectory(false), + _deleteSourceFiles(false), + CAF_CM_INIT_LOG("CFileOutboundChannelAdapterInstance") { +} + +CFileOutboundChannelAdapterInstance::~CFileOutboundChannelAdapterInstance() { +} + +void CFileOutboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const std::string directoryStr = configSection->findRequiredAttribute("directory"); + const std::string autoCreateDirectoryStr = configSection->findOptionalAttribute( + "auto-create-directory"); + const std::string deleteSourceFilesStr = configSection->findOptionalAttribute( + "delete-source-files"); + const std::string temporaryFileSuffixStr = configSection->findOptionalAttribute( + "temporary-file-suffix"); + _modeStr = configSection->findOptionalAttribute("mode"); + + _directory = CStringUtils::expandEnv(directoryStr); + _deleteSourceFiles = + (deleteSourceFilesStr.empty() || deleteSourceFilesStr.compare("false") == 0) ? + false : true; + _autoCreateDirectory = + (autoCreateDirectoryStr.empty() || autoCreateDirectoryStr.compare("true") == 0) ? + true : false; + _temporaryFileSuffix = + temporaryFileSuffixStr.empty() ? ".writing" : temporaryFileSuffixStr; + + _isInitialized = true; +} + +std::string CFileOutboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CFileOutboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +void CFileOutboundChannelAdapterInstance::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + savePayloadToFile(message); + deleteSourceFiles(message); +} + +SmartPtrIIntMessage CFileOutboundChannelAdapterInstance::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CFileOutboundChannelAdapterInstance::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} + +SmartPtrIIntMessage CFileOutboundChannelAdapterInstance::processErrorMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("processErrorMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + savePayloadToFile(message); + deleteSourceFiles(message); + + return SmartPtrIIntMessage(); +} + +void CFileOutboundChannelAdapterInstance::savePayloadToFile( + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME("savePayloadToFile"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + const std::string relFilename = generateFilename(message); + const std::string filePath = FileSystemUtils::buildPath(_directory, relFilename); + const std::string fileDir = FileSystemUtils::getDirname(filePath); + + if (! _autoCreateDirectory && ! FileSystemUtils::doesDirectoryExist(fileDir)) { + CAF_CM_EXCEPTION_VA1(ERROR_PATH_NOT_FOUND, + "Directory does not exist - %s", fileDir.c_str()); + } + + const SmartPtrCDynamicByteArray payload = message->getPayload(); + FileSystemUtils::saveByteFile(filePath, payload->getPtr(), payload->getByteCount(), + translateMode(_modeStr), _temporaryFileSuffix); +} + +std::string CFileOutboundChannelAdapterInstance::generateFilename( + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME_VALIDATE("generateFilename"); + CAF_CM_VALIDATE_INTERFACE(message); + + std::string relFilename = message->findOptionalHeaderAsString( + FileHeaders::_sFILENAME); + if (relFilename.empty()) { + relFilename = CStringUtils::createRandomUuid() + ".msg"; + } + + return relFilename; +} + +FileSystemUtils::FILE_MODE_TYPE CFileOutboundChannelAdapterInstance::translateMode( + const std::string modeStr) const { + CAF_CM_FUNCNAME("translateMode"); + + FileSystemUtils::FILE_MODE_TYPE modeType; + if (modeStr.empty() || (modeStr.compare("REPLACE") == 0)) { + modeType = FileSystemUtils::FILE_MODE_REPLACE; + } else if (modeStr.compare("FAIL") == 0) { + modeType = FileSystemUtils::FILE_MODE_FAIL; + } else if (modeStr.compare("IGNORE") == 0) { + modeType = FileSystemUtils::FILE_MODE_IGNORE; + } else if (modeStr.compare("APPEND") == 0) { + CAF_CM_EXCEPTION_VA0(ERROR_INVALID_DATA, + "Invalid mode - APPEND not currently supported"); + } else { + CAF_CM_EXCEPTION_VA1(ERROR_INVALID_DATA, "Invalid mode - %s", modeStr.c_str()); + } + + return modeType; +} + +void CFileOutboundChannelAdapterInstance::deleteSourceFiles( + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME_VALIDATE("deleteSourceFiles"); + CAF_CM_VALIDATE_INTERFACE(message); + + if (_deleteSourceFiles) { + const std::string originalFile = message->findOptionalHeaderAsString( + FileHeaders::_sORIGINAL_FILE); + if (!originalFile.empty()) { + if (FileSystemUtils::doesFileExist(originalFile)) { + CAF_CM_LOG_INFO_VA1("Removing original file - %s", originalFile.c_str()); + FileSystemUtils::removeFile(originalFile); + } + } + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.h new file mode 100644 index 000000000..f92b2b388 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileOutboundChannelAdapterInstance.h @@ -0,0 +1,96 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CFileOutboundChannelAdapterInstance_h_ +#define CFileOutboundChannelAdapterInstance_h_ + + +#include "Integration/IErrorProcessor.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageHandler.h" + +namespace Caf { + +class CFileOutboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public IMessageHandler, + public IErrorProcessor { +public: + CFileOutboundChannelAdapterInstance(); + virtual ~CFileOutboundChannelAdapterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageHandler) + CAF_QI_ENTRY(IErrorProcessor) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + + SmartPtrIIntMessage getSavedMessage() const; + + void clearSavedMessage(); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + std::string _directory; + std::string _temporaryFileSuffix; + std::string _modeStr; + bool _autoCreateDirectory; + bool _deleteSourceFiles; + SmartPtrIIntMessage _savedMessage; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CFileOutboundChannelAdapterInstance); + +private: + void savePayloadToFile( + const SmartPtrIIntMessage& message) const; + + std::string generateFilename( + const SmartPtrIIntMessage& message) const; + + FileSystemUtils::FILE_MODE_TYPE translateMode( + const std::string modeStr) const; + + void deleteSourceFiles( + const SmartPtrIIntMessage& message) const; +}; +CAF_DECLARE_SMART_QI_POINTER(CFileOutboundChannelAdapterInstance); +} + +#endif // #ifndef CFileOutboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileReadingMessageSource.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileReadingMessageSource.cpp new file mode 100644 index 000000000..6961d736d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileReadingMessageSource.cpp @@ -0,0 +1,207 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Core/CIntMessage.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CFileReadingMessageSource.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CFileReadingMessageSource::CFileReadingMessageSource() : + _isInitialized(false), + _preventDuplicates(true), + _refreshSec(0), + _lastRefreshSec(0), + CAF_CM_INIT_LOG("CFileReadingMessageSource") { +} + +CFileReadingMessageSource::~CFileReadingMessageSource() { +} + +void CFileReadingMessageSource::initialize( + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + const std::string directoryStr = configSection->findRequiredAttribute("directory"); + const std::string filenameRegexStr = configSection->findOptionalAttribute("filename-regex"); + const std::string preventDuplicatesStr = configSection->findOptionalAttribute("prevent-duplicates"); + const std::string autoCreateDirectoryStr = configSection->findOptionalAttribute("auto-create-directory"); + const SmartPtrIDocument pollerDoc = configSection->findOptionalChild("poller"); + + _refreshSec = 0; + + _directory = CStringUtils::expandEnv(directoryStr); + setPollerMetadata(pollerDoc); + _preventDuplicates = + (preventDuplicatesStr.empty() || preventDuplicatesStr.compare("true") == 0) ? true : false; + + if (filenameRegexStr.empty()) { + _filenameRegex = FileSystemUtils::REGEX_MATCH_ALL; + } else { + _filenameRegex = filenameRegexStr; + } + + const bool autoCreateDirectory = + (autoCreateDirectoryStr.empty() || autoCreateDirectoryStr.compare("true") == 0) ? true : false; + if (autoCreateDirectory && ! FileSystemUtils::doesDirectoryExist(_directory)) { + FileSystemUtils::createDirectory(_directory); + } + + CAF_CM_LOG_DEBUG_VA2( + "Monitoring inbound directory - dir: %s, fileRegex: %s", + _directory.c_str(), _filenameRegex.c_str()); + + _fileCollection.CreateInstance(); + _isInitialized = true; +} + +bool CFileReadingMessageSource::doSend( + const SmartPtrIIntMessage&, + int32) { + CAF_CM_FUNCNAME("doSend"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOTIMPL, + "This is not a sending channel: %s", _id.c_str()); +} + +SmartPtrIIntMessage CFileReadingMessageSource::doReceive(const int32 timeout) { + CAF_CM_FUNCNAME("receive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } + + if (isRefreshNecessary(_refreshSec, _lastRefreshSec)) { + const SmartPtrCFileCollection newFileCollection = + itemsInDirectory(_directory, _filenameRegex); + + if (_preventDuplicates) { + _fileCollection = merge(newFileCollection, _fileCollection); + } else { + _fileCollection = newFileCollection; + } + + _lastRefreshSec = getTimeSec(); + } + + SmartPtrIIntMessage message; + const std::string filename = calcNextFile(_fileCollection); + if (! filename.empty()) { + CAF_CM_LOG_DEBUG_VA1("Creating message with filename - %s", filename.c_str()); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(filename, IIntMessage::SmartPtrCHeaders(), IIntMessage::SmartPtrCHeaders()); + message = messageImpl; + } + + return message; +} + +CFileReadingMessageSource::SmartPtrCFileCollection +CFileReadingMessageSource::itemsInDirectory( + const std::string& directory, + const std::string& filenameRegex) const { + CAF_CM_FUNCNAME_VALIDATE("itemsInDirectory"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(directory); + // filenameRegex defaults to FileSystemUtils::REGEX_MATCH_ALL + + SmartPtrCFileCollection rc; + rc.CreateInstance(); + + const FileSystemUtils::DirectoryItems directoryItems = + FileSystemUtils::itemsInDirectory(directory, filenameRegex); + const FileSystemUtils::Files files = directoryItems.files; + for (TConstIterator fileIter(files); fileIter; fileIter++) { + const std::string filename = *fileIter; + const std::string filePath = FileSystemUtils::buildPath( + directory, filename); + + rc->insert(std::make_pair(filePath, false)); + } + + return rc; +} + +CFileReadingMessageSource::SmartPtrCFileCollection +CFileReadingMessageSource::merge( + const SmartPtrCFileCollection& newFileCollection, + const SmartPtrCFileCollection& existingFileCollection) const { + CAF_CM_FUNCNAME_VALIDATE("merge"); + CAF_CM_VALIDATE_SMARTPTR(newFileCollection); + CAF_CM_VALIDATE_SMARTPTR(existingFileCollection); + + SmartPtrCFileCollection newFileCollectionRc = newFileCollection; + for (TMapIterator newFileIter(*newFileCollectionRc); + newFileIter; newFileIter++) { + const std::string newFile = newFileIter.getKey(); + + CFileCollection::const_iterator existingFileIter = + existingFileCollection->find(newFile); + if (existingFileIter != existingFileCollection->end()) { + *newFileIter = existingFileIter->second; + } + } + + return newFileCollectionRc; +} + +std::string CFileReadingMessageSource::calcNextFile( + SmartPtrCFileCollection& fileCollection) const { + CAF_CM_FUNCNAME_VALIDATE("calcNextFile"); + CAF_CM_VALIDATE_SMARTPTR(fileCollection); + + std::string filename; + for (TMapIterator fileIter(*fileCollection); + filename.empty() && fileIter; fileIter++) { + const bool isFileReceived = *fileIter; + if (! isFileReceived) { + filename = fileIter.getKey(); + *fileIter = true; + } + } + + return filename; +} + +bool CFileReadingMessageSource::isRefreshNecessary( + const uint32 refreshSec, + const uint64 lastRefreshSec) const { + bool rc = false; + + if (refreshSec == 0) { + rc = true; + } else { + const uint64 currentTimeSec = getTimeSec(); + if ((currentTimeSec - lastRefreshSec) > refreshSec) { + rc = true; + } + } + + return rc; +} + +uint64 CFileReadingMessageSource::getTimeSec() const { + GTimeVal curTime; + ::g_get_current_time(&curTime); + uint64 rc = curTime.tv_sec; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.cpp new file mode 100644 index 000000000..ba027a7ee --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.cpp @@ -0,0 +1,109 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/Core/CIntMessageHeaders.h" +#include "CFileToStringTransformerInstance.h" +#include "Integration/Core/FileHeaders.h" + +using namespace Caf; + +CFileToStringTransformerInstance::CFileToStringTransformerInstance() : + _isInitialized(false), + _deleteFiles(false), + CAF_CM_INIT_LOG("CFileToStringTransformerInstance") { +} + +CFileToStringTransformerInstance::~CFileToStringTransformerInstance() { +} + +void CFileToStringTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const std::string deleteFilesStr = configSection->findOptionalAttribute("delete-files"); + _deleteFiles = (deleteFilesStr.empty() || deleteFilesStr.compare("true") == 0) ? true : false; + + CAF_CM_LOG_DEBUG_VA2("deleteFilesStr: %s, deleteFiles: %s", deleteFilesStr.c_str(), _deleteFiles ? "true" : "false"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CFileToStringTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CFileToStringTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CFileToStringTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string filename = message->getPayloadStr(); + const std::string fileContents = FileSystemUtils::loadTextFile(filename); + + CIntMessageHeaders messageHeaders; + if (_deleteFiles) { + CAF_CM_LOG_INFO_VA1("Removing file - %s", filename.c_str()); + FileSystemUtils::removeFile(filename); + } else { + messageHeaders.insertString(FileHeaders::_sORIGINAL_FILE, filename); + } + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(fileContents, messageHeaders.getHeaders(), message->getHeaders()); + newMessage = messageImpl; + } + CAF_CM_EXIT; + + return newMessage; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.h new file mode 100644 index 000000000..b68f7de86 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CFileToStringTransformerInstance.h @@ -0,0 +1,69 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CFileToStringTransformerInstance_h_ +#define CFileToStringTransformerInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CFileToStringTransformerInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer +{ +public: + CFileToStringTransformerInstance(); + virtual ~CFileToStringTransformerInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ITransformer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + bool _deleteFiles; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CFileToStringTransformerInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CFileToStringTransformerInstance); + +} + +#endif // #ifndef CFileToStringTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.cpp new file mode 100644 index 000000000..e5cf4c114 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.cpp @@ -0,0 +1,184 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IBean.h" +#include "IVariant.h" +#include "Integration/Core/CExpressionHandler.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/ITransformer.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#include "CHeaderEnricherTransformerInstance.h" +#include "Integration/Core/MessageHeaders.h" + +using namespace Caf; + +CHeaderEnricherTransformerInstance::CHeaderEnricherTransformerInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CHeaderEnricherTransformerInstance") { +} + +CHeaderEnricherTransformerInstance::~CHeaderEnricherTransformerInstance() { +} + +void CHeaderEnricherTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _configSection = configSection; + + if (_configSection->getAllChildren()->empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_INVALID_DATA, + "Configuration section is empty - %s", _id.c_str()); + } + + _isInitialized = true; +} + +std::string CHeaderEnricherTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CHeaderEnricherTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + SmartPtrIAppConfig appConfig = getAppConfig(); + + const IDocument::SmartPtrCChildCollection configChildren = + _configSection->getAllChildren(); + for (TSmartConstMapIterator configIter(*configChildren); + configIter; configIter++) { + const SmartPtrIDocument config = *configIter; + + if (config->getName().compare("header") == 0) { + const std::string headerName = config->findRequiredAttribute("name"); + const std::string headerRef = config->findOptionalAttribute("ref"); + const std::string headerValue = config->findOptionalAttribute("value"); + const std::string expressionValue = config->findOptionalAttribute("expression"); + + if (! headerRef.empty()) { + CAF_CM_LOG_DEBUG_VA2("Creating the header enricher bean - %s = %s", + headerName.c_str(), + headerRef.c_str()); + SmartPtrIBean bean = appContext->getBean(headerRef); + SmartPtrITransformer transformer; + transformer.QueryInterface(bean, false); + if (transformer.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchInterfaceException, + 0, + "Bean is not a transformer - %s", + headerRef.c_str()); + } + _headerWithRef.insert(std::make_pair(headerName, transformer)); + } else if (! headerValue.empty()) { + CAF_CM_LOG_DEBUG_VA2("Creating the header enricher value - %s = %s", + headerName.c_str(), headerValue.c_str()); + _headerWithValue.insert(std::make_pair(headerName, headerValue)); + } else if (! expressionValue.empty()) { + CAF_CM_LOG_DEBUG_VA2("Creating the header enricher expression - %s = %s", + headerName.c_str(), expressionValue.c_str()); + SmartPtrCExpressionHandler expressionHandler; + expressionHandler.CreateInstance(); + expressionHandler->init( + appConfig, + appContext, + expressionValue); + _headerWithExpression.insert(std::make_pair(headerName, expressionHandler)); + } else { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + ERROR_INVALID_DATA, + "Configuration error: unrecognized header value type attribute: [id='%s'][header='%s']", + _id.c_str(), + headerName.c_str()); + } + } else if (config->getName().compare("error-channel") == 0) { + _errorChannelRef = config->findRequiredAttribute("ref"); + } else { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_INVALID_DATA, + "Configuration section contains unrecognized entry - %s", _id.c_str()); + } + } +} + +SmartPtrIIntMessage CHeaderEnricherTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), + message->getHeaders(), IIntMessage::SmartPtrCHeaders()); + SmartPtrIIntMessage newMessage = messageImpl; + + for (TSmartMapIterator headerWithRefIter(_headerWithRef); + headerWithRefIter; headerWithRefIter++) { + const SmartPtrIIntMessage transformMessage = + headerWithRefIter->transformMessage(newMessage); + SmartPtrCIntMessage tmpMessageImpl; + tmpMessageImpl.CreateInstance(); + tmpMessageImpl->initialize(message->getPayload(), + transformMessage->getHeaders(), newMessage->getHeaders()); + newMessage = tmpMessageImpl; + } + + IIntMessage::SmartPtrCHeaders newHeaders = newMessage->getHeaders(); + + for (TSmartMapIterator expressionIter(_headerWithExpression); + expressionIter; + expressionIter++) { + const SmartPtrIVariant value = expressionIter->evaluate(newMessage); + CAF_CM_LOG_DEBUG_VA2( + "Inserting/updating a header value - %s = %s", + expressionIter.getKey().c_str(), + value->toString().c_str()); + (*newHeaders)[expressionIter.getKey()] = + std::make_pair(value, SmartPtrICafObject()); + } + + if (! _errorChannelRef.empty()) { + CAF_CM_LOG_DEBUG_VA1("Inserting/updating a new error channel - %s", + _errorChannelRef.c_str()); + (*newHeaders)[MessageHeaders::_sERROR_CHANNEL] = + std::make_pair(CVariant::createString(_errorChannelRef), + SmartPtrICafObject()); + } + + for (TConstMapIterator headerWithValueIter(_headerWithValue); + headerWithValueIter; headerWithValueIter++) { + const std::string name = headerWithValueIter.getKey(); + const std::string value = *headerWithValueIter; + + CAF_CM_LOG_DEBUG_VA2("Inserting/updating a header value - %s = %s", + name.c_str(), value.c_str()); + (*newHeaders)[name] = + std::make_pair(CVariant::createString(value), SmartPtrICafObject()); + } + + return newMessage; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.h new file mode 100644 index 000000000..cbbdcd7f3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderEnricherTransformerInstance.h @@ -0,0 +1,76 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CHeaderEnricherTransformerInstance_h_ +#define CHeaderEnricherTransformerInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/Core/CExpressionHandler.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/ITransformer.h" +#include "Integration/IIntegrationObject.h" + +namespace Caf { + +class CHeaderEnricherTransformerInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer +{ +public: + CHeaderEnricherTransformerInstance(); + virtual ~CHeaderEnricherTransformerInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ITransformer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + std::string _errorChannelRef; + SmartPtrIDocument _configSection; + typedef std::map Transformers; + Transformers _headerWithRef; + typedef std::map Expressions; + Expressions _headerWithExpression; + Cmapstrstr _headerWithValue; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CHeaderEnricherTransformerInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CHeaderEnricherTransformerInstance); + +} + +#endif // #ifndef CHeaderEnricherTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.cpp new file mode 100644 index 000000000..b4266fc4f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.cpp @@ -0,0 +1,84 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "IVariant.h" +#include "Integration/IIntMessage.h" +#include "Exception/CCafException.h" +#include "CHeaderExpressionInvoker.h" + +using namespace Caf; + +CHeaderExpressionInvoker::CHeaderExpressionInvoker() : + _isInitialized(false), + CAF_CM_INIT("CHeaderExpressionInvoker") { +} + +CHeaderExpressionInvoker::~CHeaderExpressionInvoker() { +} + +void CHeaderExpressionInvoker::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_ASSERT(ctorArgs.size() == 0); + CAF_CM_ASSERT(properties.size() == 0); + _isInitialized = true; +} + +void CHeaderExpressionInvoker::terminateBean() { +} + +SmartPtrIVariant CHeaderExpressionInvoker::invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("invokeExpression"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(methodName); + CAF_CM_VALIDATE_STL(methodParams); + CAF_CM_VALIDATE_INTERFACE(message); + + SmartPtrIVariant result; + const IIntMessage::SmartPtrCHeaders& headers = message->getHeaders(); + if (methodName == "containsKey") { + CAF_CM_ASSERT(1 == methodParams.size()); + result = CVariant::createBool(headers->end() != headers->find(methodParams.front())); + } else if (methodName == "notContainsKey") { + CAF_CM_ASSERT(1 == methodParams.size()); + result = CVariant::createBool(headers->end() == headers->find(methodParams.front())); + } else if (methodName == "toString") { + CAF_CM_ASSERT(1 == methodParams.size()); + const SmartPtrIVariant value = message->findRequiredHeader(methodParams.front()); + result = CVariant::createString(value->toString()); + } else if (methodName == "prependToString") { + CAF_CM_ASSERT(2 == methodParams.size()); + const SmartPtrIVariant value = message->findRequiredHeader(methodParams.front()); + result = CVariant::createString(methodParams.back() + value->toString()); + } else if (methodName == "appendToString") { + CAF_CM_ASSERT(2 == methodParams.size()); + const SmartPtrIVariant value = message->findRequiredHeader(methodParams.front()); + result = CVariant::createString(value->toString() + methodParams.back()); + } else if (methodName == "isEqualString") { + CAF_CM_ASSERT(2 == methodParams.size()); + const SmartPtrIVariant value = message->findRequiredHeader(methodParams.front()); + result = CVariant::createBool(value->toString().compare(methodParams.back()) == 0); + } else if (methodName == "isNotEqualString") { + CAF_CM_ASSERT(2 == methodParams.size()); + const SmartPtrIVariant value = message->findRequiredHeader(methodParams.front()); + result = CVariant::createBool(value->toString().compare(methodParams.back()) != 0); + } else { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchMethodException, + 0, + "%s", + methodName.c_str()); + } + return result; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.h new file mode 100644 index 000000000..2a4ad44fd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderExpressionInvoker.h @@ -0,0 +1,59 @@ +/* + * Created on: Jul 23, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CHEADEREXPRESSIONINVOKER_H_ +#define CHEADEREXPRESSIONINVOKER_H_ + + +#include "IBean.h" + +#include "IVariant.h" +#include "IntegrationSubsys.h" +#include "Integration/IIntMessage.h" +#include "Integration/IExpressionInvoker.h" + +namespace Caf { + +class CHeaderExpressionInvoker : + public TCafSubSystemObjectRoot, + public IBean, + public IExpressionInvoker { +public: + CHeaderExpressionInvoker(); + virtual ~CHeaderExpressionInvoker(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdHeaderExpressionInvoker) + + CAF_BEGIN_INTERFACE_MAP(CHeaderExpressionInvoker) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IExpressionInvoker) + CAF_END_INTERFACE_MAP() + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // IExpressionInvoker + SmartPtrIVariant invokeExpression( + const std::string& methodName, + const Cdeqstr& methodParams, + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CHeaderExpressionInvoker); +}; + +} + +#endif /* CHEADEREXPRESSIONINVOKER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.cpp new file mode 100644 index 000000000..d3db85248 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.cpp @@ -0,0 +1,208 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Exception/CCafException.h" +#include "CHeaderValueRouterInstance.h" + +using namespace Caf; + +CHeaderValueRouterInstance::CHeaderValueRouterInstance() : + _isInitialized(false), + _resolutionRequired(false), + CAF_CM_INIT_LOG("CHeaderValueRouterInstance") { +} + +CHeaderValueRouterInstance::~CHeaderValueRouterInstance() { +} + +void CHeaderValueRouterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _headerName = configSection->findRequiredAttribute("header-name"); + _defaultOutputChannelId = + configSection->findOptionalAttribute("default-output-channel"); + + const std::string resolutionRequiredStr = configSection->findOptionalAttribute("resolution-required"); + _resolutionRequired = + (resolutionRequiredStr.empty() || resolutionRequiredStr.compare("true") == 0) ? true : false; + + const IDocument::SmartPtrCChildCollection childCollection = configSection->getAllChildren(); + for(TConstIterator childIter(*childCollection); childIter; childIter++) { + const std::string sectionName = childIter->first; + if (sectionName.compare("mapping") == 0) { + const SmartPtrIDocument document = childIter->second; + const std::string value = document->findRequiredAttribute("value"); + const std::string channel = document->findRequiredAttribute("channel"); + _valueToChannelMapping.insert(std::make_pair(value, channel)); + } + } + + if (_valueToChannelMapping.empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "No mapping sections found - %s", _id.c_str()); + } + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CHeaderValueRouterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CHeaderValueRouterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + _channelResolver = channelResolver; + + SmartPtrIMessageChannel defaultOutputChannel; + if (_defaultOutputChannelId.length()) { + try { + defaultOutputChannel = + _channelResolver->resolveChannelName(_defaultOutputChannelId); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + if (defaultOutputChannel) { + CAF_CM_LOG_INFO_VA2( + "Successfully resolved default channel - id: %s, defaultOutputChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } else { + CAF_CM_EXCEPTIONEX_VA2( + NoSuchElementException, + 0, + "Failed to resolve default channel - id: %s, defaultChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } + } + + CAbstractMessageRouter::init(defaultOutputChannel, false, -1); + } + CAF_CM_EXIT; +} + +CHeaderValueRouterInstance::ChannelCollection CHeaderValueRouterInstance::getTargetChannels( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("getTargetChannels"); + + ChannelCollection messageChannels; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string outputChannel = calcOutputChannel(message); + if (outputChannel.empty() && _defaultOutputChannelId.empty()) { + CAF_CM_EXCEPTIONEX_VA2(NoSuchElementException, ERROR_NOT_FOUND, + "Did not find output channel and default channel not " + "provided - id: %s, headerName: %s", + _id.c_str(), _headerName.c_str()); + } + + SmartPtrIMessageChannel messageChannel; + if (! outputChannel.empty()) { + try { + messageChannel = _channelResolver->resolveChannelName(outputChannel); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + if (messageChannel.IsNull() && _resolutionRequired) { + CAF_CM_EXCEPTIONEX_VA3(NoSuchElementException, ERROR_NOT_FOUND, + "Failed to resolve channel when resolution is required - id: %s, " + "headerName: %s, outputChannel: %s", + _id.c_str(), _headerName.c_str(), outputChannel.c_str()); + } + + if (! messageChannel.IsNull()) { + CAF_CM_LOG_INFO_VA3( + "Successfully resolved channel - id: %s, headerName: %s, outputChannel: %s", + _id.c_str(), _headerName.c_str(), outputChannel.c_str()); + } + } + + if (messageChannel.IsNull() && _defaultOutputChannelId.empty()) { + CAF_CM_EXCEPTIONEX_VA3(NoSuchElementException, ERROR_NOT_FOUND, + "Failed to resolve channel when resolution is not required and default " + "channel is not available - id: %s, headerName: %s, outputChannel: %s", + _id.c_str(), _headerName.c_str(), outputChannel.c_str()); + } + + if (!messageChannel.IsNull()) { + messageChannels.push_back(messageChannel); + } + } + CAF_CM_EXIT; + + return messageChannels; +} + +std::string CHeaderValueRouterInstance::calcOutputChannel( + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME_VALIDATE("calcOutputChannel"); + + std::string outputChannel; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + const std::string headerValue = message->findOptionalHeaderAsString(_headerName); + if (headerValue.empty()) { + CAF_CM_LOG_WARN_VA2("Header name not found in headers - id: %s, headerName: %s", + _id.c_str(), _headerName.c_str()); + } else { + const Cmapstrstr::const_iterator valueToChannelIter = + _valueToChannelMapping.find(headerValue); + if (valueToChannelIter == _valueToChannelMapping.end()) { + CAF_CM_LOG_WARN_VA3("Header name found in headers, but not config - id: %s, name: %s, val: %s", + _id.c_str(), _headerName.c_str(), headerValue.c_str()); + } else { + outputChannel = valueToChannelIter->second; + } + } + } + CAF_CM_EXIT; + + return outputChannel; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.h new file mode 100644 index 000000000..97436dbb1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CHeaderValueRouterInstance.h @@ -0,0 +1,74 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CHeaderValueRouterInstance_h_ +#define CHeaderValueRouterInstance_h_ + +#include "Integration/IIntegrationComponentInstance.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/Core/CAbstractMessageRouter.h" + +namespace Caf { + +class CHeaderValueRouterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractMessageRouter +{ +public: + CHeaderValueRouterInstance(); + virtual ~CHeaderValueRouterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageRouter) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +private: + ChannelCollection getTargetChannels( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + std::string _defaultOutputChannelId; + bool _resolutionRequired; + std::string _headerName; + Cmapstrstr _valueToChannelMapping; + SmartPtrIChannelResolver _channelResolver; + +private: + std::string calcOutputChannel( + const SmartPtrIIntMessage& message) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CHeaderValueRouterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CHeaderValueRouterInstance); +} + +#endif // #ifndef CHeaderValueRouterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.cpp new file mode 100644 index 000000000..94eeb4dc2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.cpp @@ -0,0 +1,76 @@ +/* + * Created on: Aug 8, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Exception/CCafException.h" +#include "CIntegrationObjectFactory.h" +#include "CObjectFactoryTables.h" +#include "CDirectChannelInstance.h" +#include "CQueueChannelInstance.h" + +CIntegrationObjectFactory::CIntegrationObjectFactory() : + CAF_CM_INIT("CIntegrationObjectFactory") { +} + +CIntegrationObjectFactory::~CIntegrationObjectFactory() { +} + +void CIntegrationObjectFactory::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; +} + +void CIntegrationObjectFactory::terminateBean() { +} + +bool CIntegrationObjectFactory::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_VALIDATE_INTERFACE(configSection); + return CObjectFactoryTables::objectCreatorMap.find( + configSection->getName()) != CObjectFactoryTables::objectCreatorMap.end(); +} + +SmartPtrIIntegrationObject CIntegrationObjectFactory::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME("createObject"); + ObjectCreatorMap::const_iterator entry = + CObjectFactoryTables::objectCreatorMap.find(configSection->getName()); + CAF_CM_ASSERT(entry != CObjectFactoryTables::objectCreatorMap.end()); + + SmartPtrIIntegrationObject object; + if (entry->second) { + object = (entry->second)(); + } else if (configSection->getName() == "channel") { + if (configSection->findOptionalChild("queue")) { + SmartPtrCQueueChannelInstance channel; + channel.CreateInstance(); + object = channel; + } else { + SmartPtrCDirectChannelInstance channel; + channel.CreateInstance(); + object = channel; + } + } else { + CAF_CM_EXCEPTIONEX_VA1( + IllegalStateException, + 0, + "config section '%s' is not handled by this factory. report this as a bug.", + configSection->getName().c_str()); + } + + object->initialize(_ctorArgs, _properties, configSection); + return object; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.h new file mode 100644 index 000000000..20e201a34 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CIntegrationObjectFactory.h @@ -0,0 +1,61 @@ +/* + * Created on: Aug 8, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CIntegrationObjectFactory_h +#define CIntegrationObjectFactory_h + + +#include "IBean.h" + +#include "IntegrationSubsys.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +class CIntegrationObjectFactory : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CIntegrationObjectFactory(); + virtual ~CIntegrationObjectFactory(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdIntegrationObjectFactory) + + CAF_BEGIN_INTERFACE_MAP(CIntegrationObjectFactory) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CIntegrationObjectFactory); +}; + +} + +#endif /* CIntegrationObjectFactory_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.cpp new file mode 100644 index 000000000..c05e0d0b1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.cpp @@ -0,0 +1,128 @@ +/* + * Created on: Jan 31, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Exception/CCafException.h" +#include "CLoggingChannelAdapterInstance.h" + +using namespace Caf; + +CLoggingChannelAdapterInstance::CLoggingChannelAdapterInstance() : + _isInitialized(false), + _level(log4cpp::Priority::INFO), + _logFullMessage(false), + _category(NULL), + CAF_CM_INIT("CLoggingChannelAdapterInstance") { +} + +CLoggingChannelAdapterInstance::~CLoggingChannelAdapterInstance() { +} + +void CLoggingChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _category = &log4cpp::Category::getInstance(_id.c_str()); + std::string arg = configSection->findOptionalAttribute("level"); + if (!arg.empty()) { + if (g_ascii_strncasecmp(arg.c_str(), "crit", arg.length()) == 0) { + _level = log4cpp::Priority::CRIT; + } else if (g_ascii_strncasecmp(arg.c_str(), "error", arg.length()) == 0) { + _level = log4cpp::Priority::ERROR; + } else if (g_ascii_strncasecmp(arg.c_str(), "warn", arg.length()) == 0) { + _level = log4cpp::Priority::WARN; + } else if (g_ascii_strncasecmp(arg.c_str(), "info", arg.length()) == 0) { + _level = log4cpp::Priority::INFO; + } else if (g_ascii_strncasecmp(arg.c_str(), "debug", arg.length()) == 0) { + _level = log4cpp::Priority::DEBUG; + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "'%s' is not a valid logging level. " + "Choices are 'debug', 'info', 'warn', 'error' and 'crit'", + arg.c_str()); + } + } + arg = configSection->findOptionalAttribute("log-full-message"); + if (!arg.empty()) { + if (g_ascii_strncasecmp(arg.c_str(), "true", arg.length()) == 0) { + _logFullMessage = true; + } else if (g_ascii_strncasecmp(arg.c_str(), "false", arg.length()) == 0) { + _logFullMessage = false; + } else { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "'%s' is not a valid log-full-message value. " + "Choices are 'true' and 'false'", + arg.c_str()); + } + } + + _isInitialized = true; +} + +std::string CLoggingChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CLoggingChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +void CLoggingChannelAdapterInstance::handleMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _savedMessage = message; + _category->log(_level, message->getPayloadStr().c_str()); + if (_logFullMessage) { + IIntMessage::SmartPtrCHeaders headers = message->getHeaders(); + for (IIntMessage::CHeaders::const_iterator headerIter = headers->begin(); + headerIter != headers->end(); + headerIter++) { + std::stringstream logMessage; + logMessage << '[' + << headerIter->first + << '=' + << headerIter->second.first->toString() + << ']'; + _category->log(_level, logMessage.str()); + } + } +} + +SmartPtrIIntMessage CLoggingChannelAdapterInstance::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CLoggingChannelAdapterInstance::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.h new file mode 100644 index 000000000..d6df13e7a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CLoggingChannelAdapterInstance.h @@ -0,0 +1,70 @@ +/* + * Created on: Jan 31, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CLOGGINGCHANNELADAPTERINSTANCE_H_ +#define CLOGGINGCHANNELADAPTERINSTANCE_H_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageHandler.h" + +namespace Caf { + +class CLoggingChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public IMessageHandler { +public: + CLoggingChannelAdapterInstance(); + virtual ~CLoggingChannelAdapterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageHandler) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IMessageHandler + void handleMessage(const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + +private: + bool _isInitialized; + std::string _id; + log4cpp::Priority::PriorityLevel _level; + bool _logFullMessage; + log4cpp::Category* _category; + SmartPtrIIntMessage _savedMessage; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CLoggingChannelAdapterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CLoggingChannelAdapterInstance); +} + +#endif /* CLOGGINGCHANNELADAPTERINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CMessageHandlerChainInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CMessageHandlerChainInstance.cpp new file mode 100644 index 000000000..30eed0902 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CMessageHandlerChainInstance.cpp @@ -0,0 +1,474 @@ +/* + * Created on: Aug 10, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IBean.h" +#include "ICafObject.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/Core/CSimpleAsyncTaskExecutor.h" +#include "Integration/Core/CSourcePollingChannelAdapter.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationComponent.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IPollableChannel.h" +#include "CMessageHandlerChainInstance.h" +#include "Exception/CCafException.h" +#include "CObjectFactoryTables.h" +#include "Integration/Core/CMessageHeaderUtils.h" + +using namespace Caf; + +CMessageHandlerChainInstance::CMessageHandlerChainInstance() : + _isInitialized(false), + _isRunning(false), + CAF_CM_INIT_LOG("CMessageHandlerChainInstance") { +} + +CMessageHandlerChainInstance::~CMessageHandlerChainInstance() { + if (_weakRefSelf) { + _weakRefSelf->setReference(NULL); + _weakRefSelf = NULL; + } +} + +void CMessageHandlerChainInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + _ctorArgs = ctorArgs; + _properties = properties; + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + _isInitialized = true; +} + +std::string CMessageHandlerChainInstance::getId() const { + return _id; +} + +void CMessageHandlerChainInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + // no point in doing a bunch of work if there are no chained components + IDocument::SmartPtrCOrderedChildCollection handlerConfigs = + _configSection->getAllChildrenInOrder(); + if (!handlerConfigs->size()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, 0, + "No message handlers are present in the chain '%s'", _id.c_str()); + } + + // an input channel is required + const std::string inputChannelId = _configSection->findRequiredAttribute( + "input-channel"); + SmartPtrIMessageChannel inputChannel = channelResolver->resolveChannelName( + inputChannelId); + SmartPtrIPollableChannel inputPollableChannel; + inputPollableChannel.QueryInterface(inputChannel, false); + _subscribableInputChannel.QueryInterface(inputChannel, false); + if (!inputPollableChannel && !_subscribableInputChannel) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchInterfaceException, 0, + "Input channel '%s' does not support any required interfaces", + inputChannelId.c_str()); + } + + // an output channel may be required - we'll figure it out in a bit + const std::string outputChannelId = _configSection->findOptionalAttribute( + "output-channel"); + SmartPtrIMessageChannel outputChannel; + if (outputChannelId.length()) { + outputChannel = channelResolver->resolveChannelName(outputChannelId); + } + + // build up a collection of messaging objects comprising the chain + ChainLinks chainLinks; + for (TSmartConstIterator handlerConfig( + *handlerConfigs); handlerConfig; handlerConfig++) { + CAF_CM_LOG_DEBUG_VA2("Found handler config '%s' chain '%s'", + handlerConfig->getName().c_str(), _id.c_str()); + const std::string& handlerType = handlerConfig->getName(); + MessageHandlerObjectCreatorMap::const_iterator handlerMapEntry = + CObjectFactoryTables::messageHandlerObjectCreatorMap.find(handlerType); + if (handlerMapEntry + == CObjectFactoryTables::messageHandlerObjectCreatorMap.end()) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, 0, + "Message handler type '%s' is not allowed to be part of a chain", + handlerType.c_str()); + } + + // Get the messaging object + std::string messageHandlerId; + SmartPtrICafObject messageHandlerObj; + + if (handlerMapEntry->second.first) { + SmartPtrIIntegrationObject intObj; + intObj = (handlerMapEntry->second.first)(); + intObj->initialize(_ctorArgs, _properties, *handlerConfig); + messageHandlerId = intObj->getId(); + messageHandlerObj = intObj; + } else { + messageHandlerId = handlerConfig->findRequiredAttribute("id"); + const std::string refStr = handlerConfig->findRequiredAttribute("ref"); + SmartPtrIBean bean = appContext->getBean(refStr); + SmartPtrIIntegrationComponent integrationComponent; + integrationComponent.QueryInterface(bean, false); + if (integrationComponent) { + messageHandlerObj = integrationComponent->createObject(*handlerConfig); + } else { + messageHandlerObj = bean; + } + } + + // Create a partially initialized chain link. + SmartPtrChainedMessageHandler handler; + handler.CreateInstance(); + handler->setId(messageHandlerId); + handler->setMessageHandler(messageHandlerObj); + + SmartPtrChainLink chainLink; + chainLink.CreateInstance(); + chainLink->handler = handler; + chainLink->id = messageHandlerId; + chainLink->isMessageProducer = handlerMapEntry->second.second; + chainLinks.push_back(chainLink); + CAF_CM_LOG_DEBUG_VA2("Adding message handler '%s' to chain '%s'", + messageHandlerId.c_str(), _id.c_str()); + } + + // Configure the chain links. + // All handlers in the chain except for the last one must be message producers. + // If the last object is a message producer than the output-channel must be set. + for (size_t i = 0; i < chainLinks.size(); ++i) { + SmartPtrChainLink chainLink = chainLinks[i]; + if (i < chainLinks.size() - 1) { + if (!chainLink->isMessageProducer) { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, 0, + "Handler '%s' in chain '%s' is not a message producer. " + "All handlers except for the last one in the chain must " + "be message producers.", chainLink->id.c_str(), _id.c_str()); + } + + SmartPtrInterconnectChannel nextChannel; + nextChannel.CreateInstance(); + nextChannel->init(chainLinks[i + 1]->handler); + chainLink->handler->setOutputChannel(nextChannel); + } else { + if (outputChannel && !chainLink->isMessageProducer) { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, 0, + "Handler '%s' in chain '%s' - " + "An output channel was provided but the last handler " + "in the chain is not a message producer.", chainLink->id.c_str(), + _id.c_str()); + } else if (!outputChannel && chainLink->isMessageProducer) { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, 0, + "Handler '%s' in chain '%s' - " + "An output channel was not provided but the last handler " + "in the chain is a message producer.", chainLink->id.c_str(), + _id.c_str()); + } + if (chainLink->isMessageProducer) { + chainLink->handler->setOutputChannel(outputChannel); + } + } + } + + // Initialize the chain link handlers and store them + // in this object's state + for (TSmartConstIterator chainLink(chainLinks); chainLink; chainLink++) { + chainLink->handler->init(appContext, channelResolver); + _messageHandlers.push_back(chainLink->handler); + } + + _weakRefSelf.CreateInstance(); + _weakRefSelf->setReference(this); + + if (!_subscribableInputChannel) { + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, + channelResolver->resolveChannelName("errorChannel")); + + SmartPtrCSourcePollingChannelAdapter channelAdapter; + channelAdapter.CreateInstance(); + channelAdapter->initialize(_weakRefSelf, inputPollableChannel, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor taskExecutor; + taskExecutor.CreateInstance(); + taskExecutor->initialize(channelAdapter, errorHandler); + + _taskExecutor = taskExecutor; + } +} + +void CMessageHandlerChainInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_subscribableInputChannel) { + CAF_CM_LOG_DEBUG_VA1("Subscribing handler - %s", _id.c_str()); + _subscribableInputChannel->subscribe(_weakRefSelf); + } else if (_taskExecutor) { + CAF_CM_LOG_DEBUG_VA1("Executing task - %s", _id.c_str()); + _taskExecutor->execute(timeoutMs); + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, 0, + "handler '%s' : you should not see this. report this bug.", _id.c_str()); + } + _isRunning = true; +} + +void CMessageHandlerChainInstance::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + try { + if (_subscribableInputChannel) { + CAF_CM_LOG_DEBUG_VA1("Unsubscribing handler - %s", _id.c_str()); + _subscribableInputChannel->subscribe(_weakRefSelf); + } else if (_taskExecutor) { + CAF_CM_LOG_DEBUG_VA1("Stopping task - %s", _id.c_str()); + _taskExecutor->cancel(timeoutMs); + } else { + CAF_CM_EXCEPTIONEX_VA1(IllegalStateException, 0, + "handler '%s' : you should not see this. report this bug.", _id.c_str()); + } + } + CAF_CM_CATCH_ALL; + _weakRefSelf->setReference(NULL); + _isRunning = false; + CAF_CM_THROWEXCEPTION; +} + +bool CMessageHandlerChainInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _isRunning; +} + +void CMessageHandlerChainInstance::handleMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("handleMessage"); + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL(_messageHandlers); + CAF_CM_VALIDATE_INTERFACE(message); + //logMessage(message); + + for (TSmartConstIterator messageHandlerIter(_messageHandlers); + messageHandlerIter; messageHandlerIter++) { + const SmartPtrChainedMessageHandler messageHandler = *messageHandlerIter; + CAF_CM_VALIDATE_SMARTPTR(messageHandler); + messageHandler->clearSavedMessage(); + } + + _savedMessage = message; + CAF_CM_VALIDATE_SMARTPTR(_messageHandlers.front()); + _messageHandlers.front()->handleMessage(message); + } + CAF_CM_CATCH_ALL; + + try { + for (TSmartConstIterator messageHandlerIter(_messageHandlers); + messageHandlerIter; messageHandlerIter++) { + const SmartPtrChainedMessageHandler messageHandler = *messageHandlerIter; + CAF_CM_VALIDATE_SMARTPTR(messageHandler); + const SmartPtrIIntMessage savedMessage = messageHandler->getSavedMessage(); + if (!savedMessage.IsNull()) { + _savedMessage = savedMessage; + } + } + } + CAF_CM_CATCH_ALL; + CAF_CM_THROWEXCEPTION; +} + +SmartPtrIIntMessage CMessageHandlerChainInstance::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CMessageHandlerChainInstance::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} + +CMessageHandlerChainInstance::ChainedMessageHandler::ChainedMessageHandler() : + _isInitialized(false), + CAF_CM_INIT("CMessageHandlerChainInstance::ChainedMessageHandler") { +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::init( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("init"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + CAF_CM_VALIDATE_STRING(_id); + CAF_CM_VALIDATE_INTERFACE(_messageHandlerObj); + // output channel is optional + + // The underlying component may need to be wired + SmartPtrIIntegrationComponentInstance intInstance; + intInstance.QueryInterface(_messageHandlerObj, false); + if (intInstance) { + intInstance->wire(appContext, channelResolver); + } + + _messageHandler.CreateInstance(); + _messageHandler->initialize(_id, _outputChannel, _messageHandlerObj); + _isInitialized = true; +} +void CMessageHandlerChainInstance::ChainedMessageHandler::setId(const std::string& id) { + CAF_CM_FUNCNAME_VALIDATE("setId"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(id); + _id = id; +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::setOutputChannel( + const SmartPtrIMessageChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("setOutputChannel"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(channel); + _outputChannel = channel; +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::setMessageHandler( + const SmartPtrICafObject& handlerObj) { + CAF_CM_FUNCNAME_VALIDATE("setMessageHandler"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(handlerObj); + _messageHandlerObj = handlerObj; +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + //logMessage(message); + _messageHandler->handleMessage(message); +} + +SmartPtrIIntMessage CMessageHandlerChainInstance::ChainedMessageHandler::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _messageHandler->getSavedMessage(); +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _messageHandler->clearSavedMessage(); +} + +CMessageHandlerChainInstance::InterconnectChannel::InterconnectChannel() : + CAF_CM_INIT("CMessageHandlerChainInstance::InterconnectChannel") { +} + +CMessageHandlerChainInstance::InterconnectChannel::~InterconnectChannel() { +} + +void CMessageHandlerChainInstance::InterconnectChannel::init( + const SmartPtrChainedMessageHandler& nextHandler) { + _nextHandler = nextHandler; +} + +bool CMessageHandlerChainInstance::InterconnectChannel::send( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("send"); + CAF_CM_VALIDATE_SMARTPTR(_nextHandler); + _nextHandler->handleMessage(message); + return true; +} + +bool CMessageHandlerChainInstance::InterconnectChannel::send( + const SmartPtrIIntMessage& message, + const int32 timeout) { + return send(message); +} + +CMessageHandlerChainInstance::SelfWeakReference::SelfWeakReference() : + _reference(NULL) { + CAF_CM_INIT_THREADSAFE; +} + +void CMessageHandlerChainInstance::SelfWeakReference::setReference( + IMessageHandler *handler) { + CAF_CM_LOCK_UNLOCK; + _reference = handler; +} + +void CMessageHandlerChainInstance::SelfWeakReference::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_LOCK_UNLOCK; + if (_reference) { + _reference->handleMessage(message); + } +} + +SmartPtrIIntMessage CMessageHandlerChainInstance::SelfWeakReference::getSavedMessage() const { + CAF_CM_LOCK_UNLOCK; + SmartPtrIIntMessage savedMessage; + if (_reference) { + savedMessage = _reference->getSavedMessage(); + } + + return savedMessage; +} + +void CMessageHandlerChainInstance::SelfWeakReference::clearSavedMessage() { + CAF_CM_LOCK_UNLOCK; + if (_reference) { + _reference->clearSavedMessage(); + } +} + +void CMessageHandlerChainInstance::logMessage( + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME_VALIDATE("logMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string prefix = _id.empty() ? "NULL" : _id; + if (message.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("%s - NULL Message", prefix.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA2("%s - payload: %s", prefix.c_str(), + message->getPayloadStr().c_str()); + CMessageHeaderUtils::log(message->getHeaders()); + } +} + +void CMessageHandlerChainInstance::ChainedMessageHandler::logMessage( + const SmartPtrIIntMessage& message) const { + CAF_CM_STATIC_FUNC_LOG_ONLY("ChainedMessageHandler", "logMessage"); + + const std::string prefix = _id.empty() ? "NULL" : _id; + if (message.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("%s - NULL Message", prefix.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA2("%s - payload: %s", prefix.c_str(), + message->getPayloadStr().c_str()); + CMessageHeaderUtils::log(message->getHeaders()); + } +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.cpp new file mode 100644 index 000000000..dff97e716 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.cpp @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CNullChannel.h" +#include "CNullChannelInstance.h" + +using namespace Caf; + +CNullChannel::CNullChannel() : + _isInitialized(false), + CAF_CM_INIT("CNullChannel") { +} + +CNullChannel::~CNullChannel() { +} + +void CNullChannel::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CNullChannel::terminateBean() { +} + +void CNullChannel::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CNullChannel::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CNullChannel::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // configSection is optional + + SmartPtrCNullChannelInstance instance; + instance.CreateInstance(); + instance->initialize(_ctorArgs, _properties, configSection); + rc.QueryInterface(instance, false); + CAF_CM_VALIDATE_INTERFACE(rc); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.h new file mode 100644 index 000000000..e2bf860cb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannel.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CNullChannel_h_ +#define CNullChannel_h_ + + +#include "IBean.h" + +#include "IntegrationSubsys.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CNullChannel : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent +{ +public: + CNullChannel(); + virtual ~CNullChannel(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdNullChannel) + + CAF_BEGIN_INTERFACE_MAP(CNullChannel) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + void initialize(); + +public: // IBean + void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(CNullChannel); +}; + +} + +#endif // #ifndef CNullChannel_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.cpp new file mode 100644 index 000000000..b0068444d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CNullChannelInstance.h" + +using namespace Caf; + +CNullChannelInstance::CNullChannelInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CNullChannelInstance") { +} + +CNullChannelInstance::~CNullChannelInstance() { +} + +void CNullChannelInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + // configSection is optional + + _id = "nullChannel"; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CNullChannelInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CNullChannelInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + } + CAF_CM_EXIT; +} + +bool CNullChannelInstance::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("doSend"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + CAF_CM_LOG_DEBUG_VA1("Received message - %s", message->getPayloadStr().c_str()); + } + CAF_CM_EXIT; + return true; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.h new file mode 100644 index 000000000..0400cf601 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CNullChannelInstance.h @@ -0,0 +1,70 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CNullChannelInstance_h_ +#define CNullChannelInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/Core/CAbstractMessageChannel.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CNullChannelInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractMessageChannel +{ +public: + CNullChannelInstance(); + virtual ~CNullChannelInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageChannel) + CAF_QI_ENTRY(IChannelInterceptorSupport) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +protected: // CAbstractMessageChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CNullChannelInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CNullChannelInstance); +} + +#endif // #ifndef CNullChannelInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.cpp new file mode 100644 index 000000000..6f957bae8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.cpp @@ -0,0 +1,156 @@ +/* + * Created on: Aug 13, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CMessageHandlerChainInstance.h" +#include "CObjectFactoryTables.h" +#include "CServiceActivatorInstance.h" +#include "CWireTapInstance.h" +#include "CPublishSubscribeChannelInstance.h" +#include "CFileInboundChannelAdapterInstance.h" +#include "CFileOutboundChannelAdapterInstance.h" +#include "CFileToStringTransformerInstance.h" +#include "CHeaderEnricherTransformerInstance.h" +#include "CHeaderValueRouterInstance.h" +#include "CPayloadContentRouterInstance.h" +#include "CLoggingChannelAdapterInstance.h" +#include "CRecipientListRouterInstance.h" +#include "CRouterInstance.h" +#include "CXPathHeaderEnricherTransformerInstance.h" + +using namespace Caf; + +const ObjectCreatorMap::value_type CObjectFactoryTables::objectCreatorEntries[] = { + ObjectCreatorMap::value_type( + "file-to-string-transformer", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "header-enricher", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "transformer", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "header-value-router", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "payload-content-router", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "splitter", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "service-activator", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "logging-channel-adapter", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "wire-tap", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "publish-subscribe-channel", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "file-inbound-channel-adapter", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "file-outbound-channel-adapter", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "channel", + NULL), + ObjectCreatorMap::value_type( + "recipient-list-router", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "chain", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "router", + CreateIntegrationObject), + ObjectCreatorMap::value_type( + "xpath-header-enricher", + CreateIntegrationObject), + }; + +const ObjectCreatorMap CObjectFactoryTables::objectCreatorMap( + objectCreatorEntries, + objectCreatorEntries + + (sizeof(objectCreatorEntries)/sizeof(objectCreatorEntries[0]))); + + +const MessageHandlerObjectCreatorMap::value_type + CObjectFactoryTables::messageHandlerObjectCreatorEntries[] = { + MessageHandlerObjectCreatorMap::value_type( + "service-activator", + MessageHandlerObjectCreatorMap::mapped_type( + NULL, + true)), + MessageHandlerObjectCreatorMap::value_type( + "file-to-string-transformer", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + true)), + MessageHandlerObjectCreatorMap::value_type( + "header-enricher", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + true)), + MessageHandlerObjectCreatorMap::value_type( + "header-value-router", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "payload-content-router", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "logging-channel-adapter", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "splitter", + MessageHandlerObjectCreatorMap::mapped_type( + NULL, + true)), + MessageHandlerObjectCreatorMap::value_type( + "transformer", + MessageHandlerObjectCreatorMap::mapped_type( + NULL, + true)), + MessageHandlerObjectCreatorMap::value_type( + "recipient-list-router", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "router", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "file-outbound-channel-adapter", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + false)), + MessageHandlerObjectCreatorMap::value_type( + "xpath-header-enricher", + MessageHandlerObjectCreatorMap::mapped_type( + CreateIntegrationObject, + true)) + }; + +const MessageHandlerObjectCreatorMap CObjectFactoryTables::messageHandlerObjectCreatorMap( + messageHandlerObjectCreatorEntries, + messageHandlerObjectCreatorEntries + + (sizeof(messageHandlerObjectCreatorEntries)/ + sizeof(messageHandlerObjectCreatorEntries[0]))); diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.h new file mode 100644 index 000000000..6eef51761 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CObjectFactoryTables.h @@ -0,0 +1,23 @@ +/* + * Created on: Aug 13, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CObjectFactoryTables_h +#define CObjectFactoryTables_h + +namespace Caf { + +struct CObjectFactoryTables { + static const ObjectCreatorMap objectCreatorMap; + static const ObjectCreatorMap::value_type objectCreatorEntries[]; + + static const MessageHandlerObjectCreatorMap messageHandlerObjectCreatorMap; + static const MessageHandlerObjectCreatorMap::value_type messageHandlerObjectCreatorEntries[]; +}; + +} + +#endif /* CObjectFactoryTables_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.cpp new file mode 100644 index 000000000..cf483cdde --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.cpp @@ -0,0 +1,208 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CCafRegex.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Exception/CCafException.h" +#include "CPayloadContentRouterInstance.h" + +using namespace Caf; + +CPayloadContentRouterInstance::CPayloadContentRouterInstance() : + _isInitialized(false), + _resolutionRequired(false), + CAF_CM_INIT_LOG("CPayloadContentRouterInstance") { +} + +CPayloadContentRouterInstance::~CPayloadContentRouterInstance() { +} + +void CPayloadContentRouterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _defaultOutputChannelId = configSection->findOptionalAttribute("default-output-channel"); + + const std::string resolutionRequiredStr = configSection->findOptionalAttribute("resolution-required"); + _resolutionRequired = + (resolutionRequiredStr.empty() || resolutionRequiredStr.compare("true") == 0) ? true : false; + + const IDocument::SmartPtrCChildCollection childCollection = configSection->getAllChildren(); + for(TConstIterator childIter(*childCollection); childIter; childIter++) { + const std::string sectionName = childIter->first; + if (sectionName.compare("mapping") == 0) { + const SmartPtrIDocument document = childIter->second; + const std::string value = document->findRequiredAttribute("value"); + const std::string channel = document->findRequiredAttribute("channel"); + _valueToChannelMapping.insert(std::make_pair(value, channel)); + } + } + + if (_valueToChannelMapping.empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "No mapping sections found - %s", _id.c_str()); + } + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CPayloadContentRouterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CPayloadContentRouterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + _channelResolver = channelResolver; + + SmartPtrIMessageChannel defaultOutputChannel; + if (_defaultOutputChannelId.length()) { + try { + defaultOutputChannel = + _channelResolver->resolveChannelName(_defaultOutputChannelId); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + if (defaultOutputChannel) { + CAF_CM_LOG_INFO_VA2( + "Successfully resolved default channel - id: %s, defaultOutputChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } else { + CAF_CM_EXCEPTIONEX_VA2( + NoSuchElementException, + 0, + "Failed to resolve default channel - id: %s, defaultChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } + } + + CAbstractMessageRouter::init(defaultOutputChannel, false, -1); + } + CAF_CM_EXIT; +} + +CPayloadContentRouterInstance::ChannelCollection CPayloadContentRouterInstance::getTargetChannels( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("getTargetChannels"); + + ChannelCollection messageChannels; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const IIntMessage::SmartPtrCHeaders headers = message->getHeaders(); + + const std::string outputChannel = calcOutputChannel(message->getPayload()); + + if (outputChannel.empty() && _defaultOutputChannelId.empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Did not find output channel and default channel not provided - id: %s", _id.c_str()); + } + + SmartPtrIMessageChannel messageChannel; + if (! outputChannel.empty()) { + try { + messageChannel = _channelResolver->resolveChannelName(outputChannel); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + if (messageChannel.IsNull() && _resolutionRequired) { + CAF_CM_EXCEPTIONEX_VA2(NoSuchElementException, ERROR_NOT_FOUND, + "Failed to resolve channel when resolution is required - id: %s, outputChannel: %s", + _id.c_str(), outputChannel.c_str()); + } + + if (! messageChannel.IsNull()) { + CAF_CM_LOG_INFO_VA2( + "Successfully resolved channel - id: %s, outputChannel: %s", + _id.c_str(), outputChannel.c_str()); + } + } + + if (messageChannel.IsNull() && _defaultOutputChannelId.empty()) { + CAF_CM_EXCEPTIONEX_VA2(NoSuchElementException, ERROR_NOT_FOUND, + "Failed to resolve channel when resolution is not required and default channel is not available - id: %s, outputChannel: %s", + _id.c_str(), outputChannel.c_str()); + } + if (!messageChannel.IsNull()) { + messageChannels.push_back(messageChannel); + } + } + CAF_CM_EXIT; + + return messageChannels; +} + +std::string CPayloadContentRouterInstance::calcOutputChannel( + const SmartPtrCDynamicByteArray& payload) const { + CAF_CM_FUNCNAME_VALIDATE("calcOutputChannel"); + + std::string outputChannel; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payload); + + const std::string payloadStr = reinterpret_cast(payload->getPtr()); + CAF_CM_VALIDATE_STRING(payloadStr); + + for(TConstIterator valueToChannelIter(_valueToChannelMapping); valueToChannelIter; valueToChannelIter++) { + const std::string value = valueToChannelIter->first; + + SmartPtrCCafRegex regex; + regex.CreateInstance(); + regex->initialize(value); + + if (regex->isMatched(payloadStr)) { + outputChannel = valueToChannelIter->second; + CAF_CM_LOG_DEBUG_VA2("Matched channel - regex: %s, channel: %s", value.c_str(), outputChannel.c_str()); + break; + } + } + } + CAF_CM_EXIT; + + return outputChannel; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.h new file mode 100644 index 000000000..328d423c8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPayloadContentRouterInstance.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CPayloadContentRouterInstance_h_ +#define CPayloadContentRouterInstance_h_ + +#include "Integration/IIntegrationComponentInstance.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/Core/CAbstractMessageRouter.h" + +namespace Caf { + +class CPayloadContentRouterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractMessageRouter { +public: + CPayloadContentRouterInstance(); + virtual ~CPayloadContentRouterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageRouter) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +private: // CAbstractMessageRouter + ChannelCollection getTargetChannels( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + std::string _defaultOutputChannelId; + bool _resolutionRequired; + Cmapstrstr _valueToChannelMapping; + SmartPtrIChannelResolver _channelResolver; + +private: + std::string calcOutputChannel( + const SmartPtrCDynamicByteArray& payload) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPayloadContentRouterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CPayloadContentRouterInstance); +} + +#endif // #ifndef CPayloadContentRouterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.cpp new file mode 100644 index 000000000..4e3d78f6a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.cpp @@ -0,0 +1,138 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Integration/Core/CBroadcastingDispatcher.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IMessageHandler.h" +#include "Exception/CCafException.h" +#include "CPublishSubscribeChannelInstance.h" + +using namespace Caf; + +CPublishSubscribeChannelInstance::CPublishSubscribeChannelInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CPublishSubscribeChannelInstance") { +} + +CPublishSubscribeChannelInstance::~CPublishSubscribeChannelInstance() { +} + +void CPublishSubscribeChannelInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CPublishSubscribeChannelInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CPublishSubscribeChannelInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCBroadcastingDispatcher broadcastingDispatcher; + broadcastingDispatcher.CreateInstance(); + broadcastingDispatcher->initialize(errorHandler); + _messageDispatcher = broadcastingDispatcher; + } + CAF_CM_EXIT; +} + +void CPublishSubscribeChannelInstance::subscribe( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("subscribe"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->addHandler(messageHandler); + } + CAF_CM_EXIT; +} + +void CPublishSubscribeChannelInstance::unsubscribe( + const SmartPtrIMessageHandler& messageHandler) { + CAF_CM_FUNCNAME_VALIDATE("unsubscribe"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(messageHandler); + + _messageDispatcher->removeHandler(messageHandler); + } + CAF_CM_EXIT; +} + +bool CPublishSubscribeChannelInstance::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME("doSend"); + + bool sent = false; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } + + CAF_CM_LOG_DEBUG_VA1("Dispatching message - %s", _id.c_str()); + sent = _messageDispatcher->dispatch(message); + if (!sent) { + CAF_CM_LOG_ERROR_VA1("Nothing handled the message - channel: %s", _id.c_str()); + } + } + CAF_CM_EXIT; + return sent; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.h new file mode 100644 index 000000000..0d76b55b3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CPublishSubscribeChannelInstance.h @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CPublishSubscribeChannelInstance_h_ +#define CPublishSubscribeChannelInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageDispatcher.h" +#include "Integration/IMessageHandler.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ISubscribableChannel.h" +#include "Integration/Core/CAbstractMessageChannel.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CPublishSubscribeChannelInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ISubscribableChannel, + public CAbstractMessageChannel +{ +public: + CPublishSubscribeChannelInstance(); + virtual ~CPublishSubscribeChannelInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ISubscribableChannel) + CAF_QI_ENTRY(IMessageChannel) + CAF_QI_ENTRY(IChannelInterceptorSupport) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ISubscribableChannel + void subscribe( + const SmartPtrIMessageHandler& messageHandler); + + void unsubscribe( + const SmartPtrIMessageHandler& messageHandler); + +protected: // CAbstractMessageChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + +private: + bool _isInitialized; + SmartPtrIDocument _configSection; + std::string _id; + SmartPtrIMessageDispatcher _messageDispatcher; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPublishSubscribeChannelInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CPublishSubscribeChannelInstance); + +} + +#endif // #ifndef CPublishSubscribeChannelInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.cpp new file mode 100644 index 000000000..27494f536 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.cpp @@ -0,0 +1,120 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Exception/CCafException.h" +#include "CQueueChannelInstance.h" + +using namespace Caf; + +CQueueChannelInstance::CQueueChannelInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CQueueChannelInstance") { + CAF_CM_INIT_THREADSAFE; +} + +CQueueChannelInstance::~CQueueChannelInstance() { +} + +void CQueueChannelInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + setPollerMetadata(_configSection->findOptionalChild("poller")); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CQueueChannelInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string id; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + id = _id; + } + CAF_CM_EXIT; + + return id; +} + +void CQueueChannelInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + } + CAF_CM_EXIT; +} + +bool CQueueChannelInstance::doSend( + const SmartPtrIIntMessage& message, + int32 timeout) { + CAF_CM_FUNCNAME("doSend"); + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Queue channel with timeout not currently supported: %s", _id.c_str()); + } + + CAF_CM_LOG_DEBUG_VA2("Queueing message %d - %s", _messageQueue.size(), _id.c_str()); + _messageQueue.push_front(message); + } + CAF_CM_UNLOCK_AND_EXIT; + return true; +} + +SmartPtrIIntMessage CQueueChannelInstance::doReceive(const int32 timeout) { + CAF_CM_FUNCNAME("doReceive"); + + SmartPtrIIntMessage message; + + CAF_CM_ENTER_AND_LOCK { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Queue channel with timeout not currently supported: %s", _id.c_str()); + } + + if (! _messageQueue.empty()) { + CAF_CM_LOG_DEBUG_VA2("Receiving message %d - %s", _messageQueue.size(), _id.c_str()); + + message = _messageQueue.back(); + _messageQueue.pop_back(); + } + } + CAF_CM_UNLOCK_AND_EXIT; + + return message; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.h new file mode 100644 index 000000000..0398bc3ec --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CQueueChannelInstance.h @@ -0,0 +1,75 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CQueueChannelInstance_h_ +#define CQueueChannelInstance_h_ + +#include "Integration/IIntegrationComponentInstance.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/Core/CAbstractPollableChannel.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CQueueChannelInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractPollableChannel { +public: + CQueueChannelInstance(); + virtual ~CQueueChannelInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IPollableChannel) + CAF_QI_ENTRY(IMessageChannel) + CAF_QI_ENTRY(IChannelInterceptorSupport) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +protected: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + bool _isInitialized; + SmartPtrIDocument _configSection; + std::string _id; + std::deque _messageQueue; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CQueueChannelInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CQueueChannelInstance); + +} + +#endif // #ifndef CQueueChannelInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.cpp new file mode 100644 index 000000000..0f1f40815 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.cpp @@ -0,0 +1,198 @@ +/* + * Created on: Aug 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IVariant.h" +#include "Integration/Core/CExpressionHandler.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#include "CRecipientListRouterInstance.h" + +using namespace Caf; + +CRecipientListRouterInstance::CRecipientListRouterInstance() : + _isInitialized(false), + _ignoreSendFailures(false), + _timeout(-1), + CAF_CM_INIT_LOG("CRecipientListRouterInstance") { +} + +CRecipientListRouterInstance::~CRecipientListRouterInstance() { +} + +void CRecipientListRouterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + std::string val = configSection->findOptionalAttribute("timeout"); + if (val.length()) { + _timeout = CStringConv::fromString(val); + } + + val = configSection->findOptionalAttribute("ignore-send-failures"); + _ignoreSendFailures = (val == "true"); + + Csetstr channelIds; + const IDocument::SmartPtrCChildCollection childCollection = configSection->getAllChildren(); + for(TSmartConstMultimapIterator childIter(*childCollection); + childIter; + childIter++) { + const std::string sectionName = childIter.getKey(); + if (sectionName == "recipient") { + const SmartPtrIDocument document = *childIter; + const std::string channelId = document->findRequiredAttribute("channel"); + const std::string selectorExpression + = document->findOptionalAttribute("selector-expression"); + + if (!channelIds.insert(channelId).second) { + CAF_CM_EXCEPTIONEX_VA2( + DuplicateElementException, + 0, + "Duplicate channelId '%s' in " + "recipient-list-router definition '%s'", + channelId.c_str(), + _id.c_str()); + } + + if (selectorExpression.length()) { + _selectorDefinitions.insert( + Cmapstrstr::value_type(channelId, selectorExpression)); + } else { + _staticChannelIds.push_back(channelId); + } + } + } + + if (!_staticChannelIds.size() && !_selectorDefinitions.size()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "No recipients were listed in the definition of " + "recipient-list-router '%s'", + _id.c_str()); + } + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CRecipientListRouterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CRecipientListRouterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + SmartPtrIAppConfig appConfig = getAppConfig(); + + for (TConstIterator channelId(_staticChannelIds); + channelId; + channelId++) { + _staticChannels.push_back( + channelResolver->resolveChannelName(*channelId)); + } + + for (TConstMapIterator selectorPair(_selectorDefinitions); + selectorPair; + selectorPair++) { + SmartPtrIMessageChannel channel = + channelResolver->resolveChannelName(selectorPair.getKey()); + SmartPtrCExpressionHandler handler; + handler.CreateInstance(); + handler->init( + appConfig, + appContext, + *selectorPair); + _selectorChannels.push_back(std::make_pair(handler, channel)); + } + + CAbstractMessageRouter::init( + SmartPtrIMessageChannel(), + _ignoreSendFailures, + _timeout); + } + CAF_CM_EXIT; +} + +CRecipientListRouterInstance::ChannelCollection +CRecipientListRouterInstance::getTargetChannels( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("getTargetChannels"); + ChannelCollection channels; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + // Static channels always get the message + std::copy( + _staticChannels.begin(), + _staticChannels.end(), + std::back_inserter(channels)); + + // Execute the selector expression(s) on the message + // and add the channels for the expressions that return 'true' + for (TConstIterator selector(_selectorChannels); + selector; + selector++) { + SmartPtrIVariant evalResult = selector->first->evaluate(message); + if (evalResult->isBool()) { + if (CAF_CM_IS_LOG_DEBUG_ENABLED) { + CAF_CM_LOG_DEBUG_VA3( + "recipient-list-router [%s] selector-expression [%s] returned '%s'", + _id.c_str(), + selector->first->toString().c_str(), + evalResult->toString().c_str()); + } + if (g_variant_get_boolean(evalResult->get())) { + channels.push_back(selector->second); + } + } else { + CAF_CM_EXCEPTIONEX_VA2( + InvalidArgumentException, + 0, + "recipient-list-router [%s] illegal selector-expression [%s] : " + "selector-expression results must return boolean values.", + _id.c_str(), + selector->first->toString().c_str()); + } + } + } + CAF_CM_EXIT; + + return channels; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.h new file mode 100644 index 000000000..ecb32ca4a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRecipientListRouterInstance.h @@ -0,0 +1,72 @@ +/* + * Created on: Aug 9, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CRecipientListRouterInstance_h +#define CRecipientListRouterInstance_h + +#include "Integration/IIntegrationComponentInstance.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/Core/CAbstractMessageRouter.h" + +namespace Caf { + +class CRecipientListRouterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractMessageRouter { +public: + CRecipientListRouterInstance(); + virtual ~CRecipientListRouterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageRouter) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +private: // CAbstractMessageRouter + ChannelCollection getTargetChannels( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + bool _ignoreSendFailures; + int32 _timeout; + Cdeqstr _staticChannelIds; + Cmapstrstr _selectorDefinitions; + std::deque _staticChannels; + typedef std::deque > SelectorChannelCollection; + SelectorChannelCollection _selectorChannels; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CRecipientListRouterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CRecipientListRouterInstance); +} + +#endif /* CRecipientListRouterInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.cpp new file mode 100644 index 000000000..80beed473 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.cpp @@ -0,0 +1,198 @@ +/* + * Created on: Aug 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IVariant.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#include "CRouterInstance.h" + +using namespace Caf; + +CRouterInstance::CRouterInstance() : + _isInitialized(false), + _timeout(-1), + _resolutionRequired(false), + CAF_CM_INIT_LOG("CRouterInstance") { +} + +CRouterInstance::~CRouterInstance() { +} + +void CRouterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + std::string val = configSection->findOptionalAttribute("timeout"); + if (val.length()) { + _timeout = CStringConv::fromString(val); + } + + _defaultOutputChannelId = + configSection->findOptionalAttribute("default-output-channel"); + + _expressionStr = configSection->findRequiredAttribute("expression"); + + const std::string resolutionRequiredStr = configSection->findOptionalAttribute("resolution-required"); + _resolutionRequired = + (resolutionRequiredStr.empty() || resolutionRequiredStr.compare("true") == 0) ? true : false; + + const IDocument::SmartPtrCChildCollection childCollection = configSection->getAllChildren(); + for(TConstIterator childIter(*childCollection); childIter; childIter++) { + const std::string sectionName = childIter->first; + if (sectionName.compare("mapping") == 0) { + const SmartPtrIDocument document = childIter->second; + const std::string value = document->findRequiredAttribute("value"); + const std::string channel = document->findRequiredAttribute("channel"); + _valueToChannelMapping.insert(std::make_pair(value, channel)); + } + } + + if (_valueToChannelMapping.empty()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "No mapping sections found - %s", + _id.c_str()); + } + + _isInitialized = true; +} + +std::string CRouterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _id; +} + +void CRouterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + _channelResolver = channelResolver; + + SmartPtrIMessageChannel defaultOutputChannel; + if (_defaultOutputChannelId.length()) { + try { + defaultOutputChannel = + _channelResolver->resolveChannelName(_defaultOutputChannelId); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + if (defaultOutputChannel) { + CAF_CM_LOG_INFO_VA2( + "Successfully resolved default channel - id: %s, defaultOutputChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } else { + CAF_CM_EXCEPTIONEX_VA2( + NoSuchElementException, + 0, + "Failed to resolve default channel - id: %s, defaultChannelId: %s", + _id.c_str(), + _defaultOutputChannelId.c_str()); + } + } + + _expressionHandler.CreateInstance(); + _expressionHandler->init( + getAppConfig(), + appContext, + _expressionStr); + + CAbstractMessageRouter::init(defaultOutputChannel, false, -1); +} + +CRouterInstance::ChannelCollection CRouterInstance::getTargetChannels( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("getTargetChannels"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + ChannelCollection messageChannels; + + std::string exprValueStr; + try { + SmartPtrIVariant exprValue = _expressionHandler->evaluate(message); + exprValueStr = exprValue->toString(); + CAF_CM_VALIDATE_STRING(exprValueStr); + CAF_CM_LOG_DEBUG_VA2( + "router '%s' expression returned '%s'", + _id.c_str(), + exprValueStr.c_str()); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_ERROR_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + SmartPtrIMessageChannel outputChannel; + std::string outputChannelId; + if (exprValueStr.length()) { + Cmapstrstr::const_iterator valueIter = _valueToChannelMapping.find(exprValueStr); + if (valueIter != _valueToChannelMapping.end()) { + outputChannelId = valueIter->second; + try { + outputChannel = _channelResolver->resolveChannelName(outputChannelId); + CAF_CM_LOG_DEBUG_VA3( + "Successfully resolved channel " + "- id: %s, expression value: %s, outputChannel: %s", + _id.c_str(), + exprValueStr.c_str(), + outputChannelId.c_str()); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_WARN_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + } else { + CAF_CM_LOG_WARN_VA2( + "Expression value not found in mappings - " + "id: '%s', value: '%s'", + _id.c_str(), + exprValueStr.c_str()); + } + } + + if (outputChannel) { + messageChannels.push_back(outputChannel); + } else { + if (_resolutionRequired) { + CAF_CM_EXCEPTIONEX_VA3( + NoSuchElementException, + 0, + "Failed to resolve channel when resolution is required " + "- id: %s, expression value: '%s', outputChannel: '%s'", + _id.c_str(), + exprValueStr.c_str(), + outputChannelId.c_str()); + } else if (_defaultOutputChannelId.empty()) { + CAF_CM_EXCEPTIONEX_VA2( + NoSuchElementException, + 0, + "Did not resolve output channel and default channel not provided " + "- id: %s, expression value: %s", + _id.c_str(), + exprValueStr.c_str()); + } + } + return messageChannels; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.h new file mode 100644 index 000000000..9cd850f4f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CRouterInstance.h @@ -0,0 +1,72 @@ +/* + * Created on: Aug 15, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CRouterInstance_h +#define CRouterInstnace_h + +#include "Integration/IIntegrationComponentInstance.h" +#include "Common/IAppContext.h" +#include "Integration/Core/CExpressionHandler.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/Core/CAbstractMessageRouter.h" + +namespace Caf { + +class CRouterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public CAbstractMessageRouter { +public: + CRouterInstance(); + virtual ~CRouterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(IMessageRouter) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +private: + ChannelCollection getTargetChannels( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + int32 _timeout; + std::string _defaultOutputChannelId; + bool _resolutionRequired; + std::string _expressionStr; + SmartPtrCExpressionHandler _expressionHandler; + Cmapstrstr _valueToChannelMapping; + SmartPtrIChannelResolver _channelResolver; + + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CRouterInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CRouterInstance); +} + + +#endif /* CRouterInstance_h */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.cpp new file mode 100644 index 000000000..fd96adf4d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.cpp @@ -0,0 +1,199 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "IBean.h" +#include "ICafObject.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationComponent.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageChannel.h" +#include "Exception/CCafException.h" +#include "CServiceActivatorInstance.h" +#include "CObjectFactoryTables.h" + +using namespace Caf; + +CServiceActivatorInstance::CServiceActivatorInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CServiceActivatorInstance") { +} + +CServiceActivatorInstance::~CServiceActivatorInstance() { +} + +void CServiceActivatorInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _ctorArgs = ctorArgs; + _properties = properties; + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CServiceActivatorInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CServiceActivatorInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + MessageHandlerObjectCreatorMap::const_iterator objectCreatorEntry = + CObjectFactoryTables::messageHandlerObjectCreatorMap.find( + _configSection->getName()); + if (objectCreatorEntry == + CObjectFactoryTables::messageHandlerObjectCreatorMap.end()) { + CAF_CM_EXCEPTIONEX_VA1( + NoSuchElementException, + 0, + "Configuration section '%s' is not handled by this object", + _configSection->getName().c_str()); + } + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + std::string inputChannelStr; + SmartPtrIMessageChannel outputMessageChannel; + if (objectCreatorEntry->second.second) { + inputChannelStr = _configSection->findRequiredAttribute("input-channel"); + + const std::string outputChannelStr = _configSection->findRequiredAttribute("output-channel"); + outputMessageChannel = channelResolver->resolveChannelName(outputChannelStr); + } else { + inputChannelStr = _configSection->findOptionalAttribute("channel"); + if (inputChannelStr.empty()) { + inputChannelStr = _configSection->findRequiredAttribute("input-channel"); + } + } + const SmartPtrIIntegrationObject inputIntegrationObject = + channelResolver->resolveChannelNameToObject(inputChannelStr); + + SmartPtrICafObject messageHandlerObj; + if (_configSection->getName().compare("service-activator") == 0) { + const std::string refStr = _configSection->findRequiredAttribute("ref"); + CAF_CM_LOG_DEBUG_VA1("Creating the message processor - %s", refStr.c_str()); + const SmartPtrIBean bean = appContext->getBean(refStr); + messageHandlerObj.QueryInterface(bean, false); + CAF_CM_VALIDATE_INTERFACE(messageHandlerObj); + + SmartPtrIIntegrationComponentInstance integrationComponentInstance; + integrationComponentInstance.QueryInterface(bean, false); + if (!integrationComponentInstance.IsNull()) { + // Bean is also an integration component instance...wire + integrationComponentInstance->wire(appContext, channelResolver); + } + } else { + SmartPtrIIntegrationObject integrationObject; + if (objectCreatorEntry->second.first) { + integrationObject = (objectCreatorEntry->second.first)(); + integrationObject->initialize(_ctorArgs, _properties, _configSection); + } else { + const std::string& beanId = _configSection->findRequiredAttribute("ref"); + const SmartPtrIBean bean = appContext->getBean(beanId); + SmartPtrIIntegrationComponent integrationComponent; + integrationComponent.QueryInterface(bean, false); + if (!integrationComponent) { + CAF_CM_EXCEPTIONEX_VA1( + InvalidArgumentException, + 0, + "Bean is not an integration component - %s", + beanId.c_str()); + } + integrationObject = integrationComponent->createObject(_configSection); + } + SmartPtrIIntegrationComponentInstance integrationComponentInstance; + integrationComponentInstance.QueryInterface(integrationObject, false); + CAF_CM_VALIDATE_INTERFACE(integrationComponentInstance); + integrationComponentInstance->wire(appContext, channelResolver); + messageHandlerObj.QueryInterface(integrationObject, false); + CAF_CM_VALIDATE_INTERFACE(messageHandlerObj); + } + + _messagingTemplate.CreateInstance(); + _messagingTemplate->initialize( + channelResolver, + inputIntegrationObject, + errorMessageChannel, + outputMessageChannel, + messageHandlerObj); + } + CAF_CM_EXIT; +} + +void CServiceActivatorInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Starting"); + _messagingTemplate->start(timeoutMs); + } + CAF_CM_EXIT; +} + +void CServiceActivatorInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Stopping"); + _messagingTemplate->stop(timeoutMs); + } + CAF_CM_EXIT; +} + +bool CServiceActivatorInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + + bool rc = false; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + rc = _messagingTemplate->isRunning(); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.h new file mode 100644 index 000000000..6b212b5d4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CServiceActivatorInstance.h @@ -0,0 +1,73 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CServiceActivatorInstance_h_ +#define CServiceActivatorInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/Core/CMessagingTemplate.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" + +namespace Caf { + +class CServiceActivatorInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle +{ +public: + CServiceActivatorInstance(); + virtual ~CServiceActivatorInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + SmartPtrIDocument _configSection; + std::string _id; + SmartPtrCMessagingTemplate _messagingTemplate; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CServiceActivatorInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CServiceActivatorInstance); + +} + +#endif // #ifndef CServiceActivatorInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.cpp new file mode 100644 index 000000000..7a7b29809 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.cpp @@ -0,0 +1,184 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "CWireTapInstance.h" + +CWireTapInstance::CWireTapInstance() : + _order(0), + _timeout(0), + _isRunning(false), + _pattern(NULL), + _isInitialized(false), + CAF_CM_INIT_LOG("CWireTapInstance") { +} + +CWireTapInstance::~CWireTapInstance() { + if (_pattern) { + g_regex_unref(_pattern); + } +} + +void CWireTapInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + const std::string orderAttr = _configSection->findOptionalAttribute("order"); + if (!orderAttr.empty()) { + _order = CStringConv::fromString(orderAttr); + } + + const std::string timeoutAttr = _configSection->findOptionalAttribute("timeout"); + if (!timeoutAttr.empty()) { + _timeout = CStringConv::fromString(timeoutAttr); + } + + const std::string pattern = _configSection->findRequiredAttribute("pattern"); + GError *error = NULL; + _pattern = g_regex_new( + pattern.c_str(), + (GRegexCompileFlags)(G_REGEX_OPTIMIZE | G_REGEX_UNGREEDY | G_REGEX_RAW), + (GRegexMatchFlags)(G_REGEX_MATCH_ANCHORED | G_REGEX_MATCH_NOTEMPTY), + &error); + if (error) { + throw error; + } + + _channelId = _configSection->findRequiredAttribute("channel"); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CWireTapInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + std::string rc; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + return rc; +} + +void CWireTapInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + _channel = channelResolver->resolveChannelName(_channelId); + } + CAF_CM_EXIT; +} + +void CWireTapInstance::start(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isRunning = true; + } + CAF_CM_EXIT; +} + +void CWireTapInstance::stop(const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isRunning = false; + } + CAF_CM_EXIT; +} + +bool CWireTapInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + bool rc = false; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _isRunning; + } + CAF_CM_EXIT; + return rc; +} + +SmartPtrIIntMessage& CWireTapInstance::preSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel) { + CAF_CM_FUNCNAME_VALIDATE("preSend"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_INTERFACE(message); + CAF_CM_VALIDATE_INTERFACE(channel); + + // If the channel passed in is the + // output channel for this wire-tap then + // log a message and no-op this. + if (_channel == channel) { + CAF_CM_LOG_DEBUG_VA2( + "WireTap (%s) will not intercept its own " + "channel (%s),", + _id.c_str(), + _channelId.c_str()); + } else if (_isRunning) { + if (_timeout) { + _channel->send(message); + } else { + _channel->send(message, _timeout); + } + } + } + CAF_CM_EXIT; + return message; +} + +uint32 CWireTapInstance::getOrder() const { + CAF_CM_FUNCNAME_VALIDATE("getOrder"); + uint32 rc; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _order; + } + CAF_CM_EXIT; + return rc; +} + +bool CWireTapInstance::isChannelIdMatched(const std::string& channelId) const { + CAF_CM_FUNCNAME_VALIDATE("isChannelIdMatched"); + bool rc = false; + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(channelId); + rc = g_regex_match( + _pattern, + channelId.c_str(), + (GRegexMatchFlags)0, + NULL); + } + CAF_CM_EXIT; + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.h new file mode 100644 index 000000000..3afbf6c3d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CWireTapInstance.h @@ -0,0 +1,90 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CWIRETAPINSTANCE_H_ +#define CWIRETAPINSTANCE_H_ + +#include "Integration/IChannelInterceptorInstance.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" +#include "Integration/Core/CChannelInterceptorAdapter.h" + +namespace Caf { + +class CWireTapInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IChannelInterceptorInstance, + public CChannelInterceptorAdapter { +public: + CWireTapInstance(); + virtual ~CWireTapInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IChannelInterceptor) + CAF_QI_ENTRY(IChannelInterceptorInstance) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IChannelIntercepter + SmartPtrIIntMessage& preSend( + SmartPtrIIntMessage& message, + SmartPtrIMessageChannel& channel); + +public: // IChannelInterceptorInstance + uint32 getOrder() const; + + bool isChannelIdMatched(const std::string& channelId) const; + +private: + SmartPtrIDocument _configSection; + std::string _id; + uint32 _order; + int32 _timeout; + bool _isRunning; + std::string _channelId; + SmartPtrIMessageChannel _channel; + GRegex* _pattern; + bool _isInitialized; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CWireTapInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CWireTapInstance); + +} + +#endif /* CWIRETAPINSTANCE_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherItem.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherItem.cpp new file mode 100644 index 000000000..08ac6e96d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherItem.cpp @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "CXPathHeaderEnricherItem.h" + +using namespace Caf; + +CXPathHeaderEnricherItem::CXPathHeaderEnricherItem() : + _isInitialized(false), + _overwrite(true), + CAF_CM_INIT("CXPathHeaderEnricherItem") { +} + +CXPathHeaderEnricherItem::~CXPathHeaderEnricherItem() { +} + +void CXPathHeaderEnricherItem::initialize( + const SmartPtrIDocument& configSection, + const bool& defaultOverwrite) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _name = configSection->findRequiredAttribute("name"); + _evaluationType = configSection->findOptionalAttribute("evaluation-type"); + _xpathExpression = configSection->findOptionalAttribute("xpath-expression"); + _xpathExpressionRef = configSection->findOptionalAttribute("xpath-expression-ref"); + + _overwrite = defaultOverwrite; + const std::string overwriteStr = configSection->findOptionalAttribute("overwrite"); + if (! overwriteStr.empty()) { + _overwrite = (overwriteStr.compare("true") == 0); + } + + if (_evaluationType.empty()) { + _evaluationType = "STRING_RESULT"; + } + + _isInitialized = true; +} + +std::string CXPathHeaderEnricherItem::getName() const { + return _name; +} + +std::string CXPathHeaderEnricherItem::getEvaluationType() const { + return _evaluationType; +} + +bool CXPathHeaderEnricherItem::getOverwrite() const { + return _overwrite; +} + +std::string CXPathHeaderEnricherItem::getXpathExpression() const { + return _xpathExpression; +} + +std::string CXPathHeaderEnricherItem::getXpathExpressionRef() const { + return _xpathExpressionRef; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.cpp new file mode 100644 index 000000000..90824b67c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.cpp @@ -0,0 +1,216 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CXPathHeaderEnricherItem.h" +#include "Common/IAppContext.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" + +#include "CXPathHeaderEnricherTransformerInstance.h" + +using namespace Caf; + +CXPathHeaderEnricherTransformerInstance::CXPathHeaderEnricherTransformerInstance() : + _isInitialized(false), + _defaultOverwrite(true), + _shouldSkipNulls(true), + CAF_CM_INIT_LOG("CXPathHeaderEnricherTransformerInstance") { +} + +CXPathHeaderEnricherTransformerInstance::~CXPathHeaderEnricherTransformerInstance() { +} + +void CXPathHeaderEnricherTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _configSection = configSection; + + if (_configSection->getAllChildren()->empty()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_INVALID_DATA, + "Configuration section is empty - %s", _id.c_str()); + } + + _isInitialized = true; +} + +std::string CXPathHeaderEnricherTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CXPathHeaderEnricherTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + SmartPtrIAppConfig appConfig = getAppConfig(); + + const std::string defaultOverwriteStr = + _configSection->findOptionalAttribute("default-overwrite"); + const std::string shouldSkipNullsStr = + _configSection->findOptionalAttribute("should-skip-nulls"); + + _defaultOverwrite = + (defaultOverwriteStr.empty() || defaultOverwriteStr.compare("true") == 0) ? true : false; + _shouldSkipNulls = + (shouldSkipNullsStr.empty() || shouldSkipNullsStr.compare("true") == 0) ? true : false; + + const IDocument::SmartPtrCChildCollection configChildren = + _configSection->getAllChildren(); + for (TSmartConstMapIterator configIter(*configChildren); + configIter; configIter++) { + const SmartPtrIDocument config = *configIter; + + if (config->getName().compare("header") == 0) { + SmartPtrCXPathHeaderEnricherItem item; + item.CreateInstance(); + item->initialize(config, _defaultOverwrite); + + _headerItems.insert(std::make_pair(item->getName(), item)); + } else { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_INVALID_DATA, + "Configuration section contains unrecognized entry - %s", _id.c_str()); + } + } +} + +SmartPtrIIntMessage CXPathHeaderEnricherTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), + message->getHeaders(), IIntMessage::SmartPtrCHeaders()); + SmartPtrIIntMessage newMessage = messageImpl; + + IIntMessage::SmartPtrCHeaders newHeaders = newMessage->getHeaders(); + const std::string payloadXmlStr = newMessage->getPayloadStr(); + + for (TConstMapIterator headerItemIter(_headerItems); + headerItemIter; headerItemIter++) { + const std::string name = headerItemIter.getKey(); + const SmartPtrCXPathHeaderEnricherItem value = *headerItemIter; + + if (isInsertable(name, value, newHeaders)) { + const std::string xpathRc = evaluateXPathExpression(name, value, payloadXmlStr); + if (xpathRc.empty()) { + if (! _shouldSkipNulls) { + CAF_CM_LOG_INFO_VA1("Removing header from unresolvable expression - %s", + name.c_str()); + newHeaders->erase(name); + } + } else { + CAF_CM_LOG_DEBUG_VA2("Inserting/updating a header value - %s = %s", + name.c_str(), xpathRc.c_str()); + (*newHeaders)[name] = + std::make_pair(CVariant::createString(xpathRc), SmartPtrICafObject()); + } + } + } + + return newMessage; +} + +bool CXPathHeaderEnricherTransformerInstance::isInsertable( + const std::string& name, + const SmartPtrCXPathHeaderEnricherItem& value, + const IIntMessage::SmartPtrCHeaders& headers) { + CAF_CM_FUNCNAME_VALIDATE("isInsertable"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_SMARTPTR(value); + CAF_CM_VALIDATE_SMARTPTR(headers); + + bool rc = false; + if (value->getEvaluationType().compare("STRING_RESULT") == 0) { + if (headers->find(name) == headers->end()) { + rc = true; + } else { + if (value->getOverwrite()) { + CAF_CM_LOG_DEBUG_VA1("Existing header will be overwritten - name: %s", + name.c_str()); + rc = true; + } else { + CAF_CM_LOG_WARN_VA1("Existing header will not be overwritten - name: %s", + name.c_str()); + } + } + } else { + CAF_CM_LOG_ERROR_VA2("Evaluation type not supported - name: %s, type: %s", + name.c_str(), value->getEvaluationType().c_str()); + } + + return rc; +} + +std::string CXPathHeaderEnricherTransformerInstance::evaluateXPathExpression( + const std::string& name, + const SmartPtrCXPathHeaderEnricherItem& value, + const std::string& payloadXmlStr) { + CAF_CM_FUNCNAME_VALIDATE("isInsertable"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_SMARTPTR(value); + CAF_CM_VALIDATE_STRING(payloadXmlStr); + + std::string rc; + const std::string expr = value->getXpathExpression(); + if (expr.empty()) { + CAF_CM_LOG_ERROR_VA1( + "xpath-expression is required until xpath-expression-ref is supported - name: %s", + name.c_str()); + } else { + if (! value->getXpathExpressionRef().empty()) { + CAF_CM_LOG_WARN_VA1( + "Both xpath-expression and xpath-expression-ref cannot be specified... Using xpath-expression - name: %s", + name.c_str()); + } + + if (expr.find_first_of('@') != 0) { + CAF_CM_LOG_ERROR_VA2( + "Currently, only root-level attributes are supported - name: %s, xpath-expression: %s", + name.c_str(), expr.c_str()); + } else { + const std::string attr = expr.substr(1); + + const SmartPtrCXmlElement rootXml = + CXmlUtils::parseString(payloadXmlStr, std::string()); + + const std::string payloadType = rootXml->getName(); + const std::string attrVal = rootXml->findOptionalAttribute(attr); + if (attrVal.empty()) { + CAF_CM_LOG_WARN_VA2( + "Attribute not found at root level: %s", + name.c_str(), expr.c_str()); + } else { + rc = attrVal; + } + } + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.h new file mode 100644 index 000000000..08d204c61 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/CXPathHeaderEnricherTransformerInstance.h @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CXPathHeaderEnricherTransformerInstance_h_ +#define CXPathHeaderEnricherTransformerInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "CXPathHeaderEnricherItem.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CXPathHeaderEnricherTransformerInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer +{ +public: + CXPathHeaderEnricherTransformerInstance(); + virtual ~CXPathHeaderEnricherTransformerInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ITransformer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + bool isInsertable( + const std::string& name, + const SmartPtrCXPathHeaderEnricherItem& value, + const IIntMessage::SmartPtrCHeaders& headers); + + std::string evaluateXPathExpression( + const std::string& name, + const SmartPtrCXPathHeaderEnricherItem& value, + const std::string& payloadXmlStr); + +private: + bool _isInitialized; + std::string _id; + SmartPtrIDocument _configSection; + + bool _defaultOverwrite; + bool _shouldSkipNulls; + typedef std::map Items; + Items _headerItems; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CXPathHeaderEnricherTransformerInstance); +}; +CAF_DECLARE_SMART_QI_POINTER(CXPathHeaderEnricherTransformerInstance); + +} + +#endif // #ifndef CXPathHeaderEnricherTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/Integration.cpp b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/Integration.cpp new file mode 100644 index 000000000..2b8029eca --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/Integration.cpp @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CIntegrationObjectFactory.h" +#include "CErrorChannel.h" +#include "CNullChannel.h" +#include "CHeaderExpressionInvoker.h" + +using namespace Caf; + +namespace Caf { + const char* _sObjIdIntegrationObjectFactory = "com.vmware.commonagent.integration.objectfactory"; + const char* _sObjIdErrorChannel = "com.vmware.commonagent.integration.channels.errorchannel"; + const char* _sObjIdNullChannel = "com.vmware.commonagent.integration.channels.nullchannel"; + const char* _sObjIdHeaderExpressionInvoker = "com.vmware.commonagent.integration.headerexpressioninvoker"; +} + +CEcmSubSystemModule _Module; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) + CAF_OBJECT_ENTRY(CIntegrationObjectFactory) + CAF_OBJECT_ENTRY(CErrorChannel) + CAF_OBJECT_ENTRY(CNullChannel) + CAF_OBJECT_ENTRY(CHeaderExpressionInvoker) +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/stdafx.h b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/stdafx.h new file mode 100644 index 000000000..dfe740a3c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/Framework/Subsystems/Integration/src/stdafx.h @@ -0,0 +1,43 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include + +#include "Integration/IIntegrationObject.h" +#include + +namespace Caf { + +// template function to create integration objects +template +SmartPtrIIntegrationObject CreateIntegrationObject() { + Object object; + object.CreateInstance(); + return object; +}; + +// function pointer for integration object creation +typedef SmartPtrIIntegrationObject(*FNOBJECT_CREATOR)(); + +// map of configuration section names to function pointers that create the +// integration object +typedef std::map ObjectCreatorMap; + +// map of configuration section names to a pair: +// pair.first - function pointer that creates the integration object +// pair.second - true if the integration object produces messages +typedef std::map< + std::string, + std::pair > MessageHandlerObjectCreatorMap; +} + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/include/CIniFileWithoutSection.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/include/CIniFileWithoutSection.h new file mode 100644 index 000000000..0b2a353ed --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/include/CIniFileWithoutSection.h @@ -0,0 +1,104 @@ +/* + * Author: bwilliams + * Created: May 18, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CINIFILEWITHOUTSECTION_H_ +#define CINIFILEWITHOUTSECTION_H_ + + +#include "Common/CCafRegex.h" +#include "Common/CIniFile.h" + +namespace Caf { + +class CIniFileWithoutSection { +public: + struct SIniEntry { + std::string _name; + std::string _valueRaw; + std::string _valueExpanded; + }; + CAF_DECLARE_SMART_POINTER(SIniEntry); + +public: + CIniFileWithoutSection(); + virtual ~CIniFileWithoutSection(); + +public: + void initialize(const std::string& configFilePath); + + std::deque getEntryCollection(); + + SmartPtrSIniEntry findOptionalEntry( + const std::string& keyName); + + SmartPtrSIniEntry findRequiredEntry( + const std::string& keyName); + + std::string findOptionalString( + const std::string& keyName); + + std::string findRequiredString( + const std::string& keyName); + + std::string findOptionalRawString( + const std::string& keyName); + + std::string findRequiredRawString( + const std::string& keyName); + + void log(); + + void setValue( + const std::string valueName, + const std::string valueValue); + + void deleteValue( + const std::string valueName); + +private: + struct SReplacement { + SmartPtrCCafRegex _regex; + std::string _value; + }; + CAF_DECLARE_SMART_POINTER(SReplacement); + +private: + std::deque parse( + const std::string& configFilePath) const; + + SmartPtrSReplacement createReplacement( + const std::string& keyName, + const std::string& value) const; + + SmartPtrSIniEntry createIniEntry( + const std::string& keyName, + const std::string& valueRaw, + const std::string& valueExpanded) const; + + std::deque loadTextFileIntoCollection( + const std::string& filePath) const; + + void saveTextFile( + const std::deque fileContents, + const std::string filePath) const; + +private: + bool _isInitialized; + std::string _configFilePath; + std::deque _entryCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CIniFileWithoutSection); +}; + +CAF_DECLARE_SMART_POINTER(CIniFileWithoutSection); + +} + +#endif /* CINIFILEWITHOUTSECTION_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.cpp new file mode 100644 index 000000000..c010a53ba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.cpp @@ -0,0 +1,510 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CIniFileWithoutSection.h" +#include "Common/CIniFile.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h" +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" +#include "Integration/IDocument.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Exception/CCafException.h" +#include "CConfigProvider.h" +#include "IProviderRequest.h" +#include "IProviderResponse.h" + +using namespace Caf; + +CConfigProvider::CConfigProvider() : + _fileAliasPrefix("diagFileAlias_"), + _keyPathDelimStr("/"), + _keyPathDelimChar('/'), + CAF_CM_INIT_LOG("CConfigProvider") { +} + +CConfigProvider::~CConfigProvider() { +} + +const SmartPtrCSchemaDoc CConfigProvider::getSchema() const { + + std::deque dc1Props; + dc1Props.push_back(CProviderDocHelper::createClassProperty("name", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("value", PROPERTY_STRING, true)); + + std::deque dc2Props; + dc2Props.push_back(CProviderDocHelper::createClassProperty("filePath", PROPERTY_STRING, true)); + dc2Props.push_back(CProviderDocHelper::createClassProperty("encoding", PROPERTY_STRING, true)); + + std::deque instanceProperties; + instanceProperties.push_back(CProviderDocHelper::createClassInstanceProperty( + "configEntry", + CProviderDocHelper::createClassIdentifier("caf", "ConfigEntry", "1.0.0"), + true, + false, + true)); + + std::deque dataClasses; + dataClasses.push_back(CProviderDocHelper::createDataClass("caf", "ConfigEntry", "1.0.0", dc1Props)); + dataClasses.push_back(CProviderDocHelper::createDataClass("caf", "ConfigData", "1.0.0", dc2Props, instanceProperties)); + + std::deque collectMethodParams; + collectMethodParams.push_back(CProviderDocHelper::createMethodParameter("filePath", PARAMETER_STRING, false)); + collectMethodParams.push_back(CProviderDocHelper::createMethodParameter("encoding", PARAMETER_STRING, false)); + + std::deque m1Params; + m1Params.push_back(CProviderDocHelper::createMethodParameter("filePath", PARAMETER_STRING, false)); + m1Params.push_back(CProviderDocHelper::createMethodParameter("encoding", PARAMETER_STRING, false)); + m1Params.push_back(CProviderDocHelper::createMethodParameter("valueName", PARAMETER_STRING, false)); + m1Params.push_back(CProviderDocHelper::createMethodParameter("valueData", PARAMETER_STRING, false)); + + std::deque m2Params; + m2Params.push_back(CProviderDocHelper::createMethodParameter("filePath", PARAMETER_STRING, false)); + m2Params.push_back(CProviderDocHelper::createMethodParameter("encoding", PARAMETER_STRING, false)); + m2Params.push_back(CProviderDocHelper::createMethodParameter("valueName", PARAMETER_STRING, false)); + + std::deque methods; + methods.push_back(CProviderDocHelper::createMethod("setValue", m1Params)); + methods.push_back(CProviderDocHelper::createMethod("deleteValue", m2Params)); + + std::deque actionClasses; + actionClasses.push_back( + CProviderDocHelper::createActionClass( + "caf", + "ConfigActions", + "1.0.0", + CProviderDocHelper::createCollectMethod("collectInstances", collectMethodParams), + methods)); + + return CProviderDocHelper::createSchema(dataClasses, actionClasses); +} + +void CConfigProvider::collect(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("collect"); + + CAF_CM_ENTER { + SmartPtrCProviderCollectInstancesDoc doc = request.getCollectInstances(); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCParameterCollectionDoc parameterCollection = + doc->getParameterCollection(); + const std::string filePath = ParameterUtils::findRequiredParameterAsString( + "filePath", parameterCollection); + const std::string encoding = ParameterUtils::findRequiredParameterAsString( + "encoding", parameterCollection); + + if (FileSystemUtils::doesFileExist(filePath)) { + CAF_CM_LOG_DEBUG_VA2("Parsing file - path: %s, encoding: %s", filePath.c_str(), encoding.c_str()); + + std::deque > propertyCollection; + if (encoding.compare("iniFileWithoutSection") == 0) { + propertyCollection = createIniFileWithoutSectionPropertyCollection(filePath); + } else if (encoding.compare("iniFile") == 0) { + propertyCollection = createIniFilePropertyCollection(filePath); + } else if (encoding.compare("xmlFile") == 0) { + propertyCollection = createXmlFilePropertyCollection(filePath); + } else { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, E_INVALIDARG, + "URI encoding is not recognized - path: %s, encoding: %s", filePath.c_str(), encoding.c_str()); + } + + const SmartPtrCDataClassInstanceDoc dataClassInstance = + createDataClassInstance(filePath, encoding, propertyCollection); + response.addInstance(dataClassInstance); + } else { + CAF_CM_LOG_WARN_VA2( + "File not found - path: %s, encoding: %s", filePath.c_str(), encoding.c_str()); + } + } + CAF_CM_EXIT; +} + +void CConfigProvider::invoke(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("invoke"); + + CAF_CM_ENTER { + SmartPtrCProviderInvokeOperationDoc doc = request.getInvokeOperations(); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCOperationDoc operation = doc->getOperation(); + const std::string operationName = operation->getName(); + + const SmartPtrCParameterCollectionDoc parameterCollection = + operation->getParameterCollection(); + const std::string filePath = ParameterUtils::findRequiredParameterAsString( + "filePath", parameterCollection); + const std::string encoding = ParameterUtils::findRequiredParameterAsString( + "encoding", parameterCollection); + const std::string valueName = ParameterUtils::findRequiredParameterAsString( + "valueName", parameterCollection); + + if (operationName.compare("setValue") == 0) { + const std::string valueData = ParameterUtils::findRequiredParameterAsString( + "valueData", parameterCollection); + + setValue(filePath, encoding, valueName, valueData); + } else if (operationName.compare("deleteValue") == 0) { + deleteValue(filePath, encoding, valueName); + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Invalid operation name (must be \'setValue\' or \'deleteValue\') - %s", operationName.c_str()) + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassInstanceDoc CConfigProvider::createDataClassInstance( + const std::string& filePath, + const std::string& encoding, + const std::deque >& propertyCollection) const { + CAF_CM_FUNCNAME_VALIDATE("createDataClassInstance"); + + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_STRING(encoding); + CAF_CM_VALIDATE_STL(propertyCollection); + + std::deque subInstances; + for(TConstIterator > > propertyIter(propertyCollection); + propertyIter; propertyIter++) { + + std::deque siProperties; + siProperties.push_back(CProviderDocHelper::createDataClassProperty("name", propertyIter->first)); + siProperties.push_back(CProviderDocHelper::createDataClassProperty("value", propertyIter->second)); + subInstances.push_back(CProviderDocHelper::createDataClassSubInstance( + "configEntry", + siProperties)); + } + + std::deque dataClassProperties; + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("filePath", filePath)); + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("encoding", encoding)); + + return CProviderDocHelper::createDataClassInstance( + "caf", + "ConfigData", + "1.0.0", + dataClassProperties, + subInstances); +} + +void CConfigProvider::setValue( + const std::string& filePath, + const std::string& encoding, + const std::string& valueName, + const std::string& valueData) const { + CAF_CM_FUNCNAME("setValue"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_STRING(encoding); + CAF_CM_VALIDATE_STRING(valueName); + CAF_CM_VALIDATE_STRING(valueData); + + if (encoding.compare("iniFileWithoutSection") == 0) { + SmartPtrCIniFileWithoutSection iniFileWithoutSection; + iniFileWithoutSection.CreateInstance(); + iniFileWithoutSection->initialize(filePath); + iniFileWithoutSection->setValue(valueName, valueData); + } else if (encoding.compare("iniFile") == 0) { + std::string sectionName; + std::string keyName; + parseIniFileValuePath(valueName, sectionName, keyName); + + SmartPtrCIniFile iniFile; + iniFile.CreateInstance(); + iniFile->initialize(filePath); + iniFile->setValue(sectionName, keyName, valueData); + } else if (encoding.compare("xmlFile") == 0) { + std::string keyName; + std::deque keyPathCollection; + parseKeyPath(valueName, keyPathCollection, keyName); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, std::string()); + const SmartPtrCXmlElement parentXml = findXmlElement(keyPathCollection, rootXml); + + const SmartPtrCXmlElement foundElement = parentXml->findOptionalChild(keyName); + if (! foundElement.IsNull()) { + foundElement->setValue(valueData); + } else { + const std::string foundAttribute = parentXml->findOptionalAttribute(keyName); + if (! foundAttribute.empty()) { + parentXml->setAttribute(keyName, valueData); + } else { + const SmartPtrCXmlElement createdElement = parentXml->createAndAddElement(keyName); + createdElement->setValue(valueData); + } + } + rootXml->saveToFile(filePath); + } else { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, E_INVALIDARG, + "URI encoding is not recognized - filePath: %s, encoding: %s", + filePath.c_str(), encoding.c_str()); + } + } + CAF_CM_EXIT; +} + +void CConfigProvider::deleteValue( + const std::string& filePath, + const std::string& encoding, + const std::string& valueName) const { + CAF_CM_FUNCNAME("deleteValue"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + CAF_CM_VALIDATE_STRING(encoding); + CAF_CM_VALIDATE_STRING(valueName); + + if (encoding.compare("iniFileWithoutSection") == 0) { + SmartPtrCIniFileWithoutSection iniFileWithoutSection; + iniFileWithoutSection.CreateInstance(); + iniFileWithoutSection->initialize(filePath); + iniFileWithoutSection->deleteValue(valueName); + } else if (encoding.compare("iniFile") == 0) { + std::string sectionName; + std::string keyName; + parseIniFileValuePath(valueName, sectionName, keyName); + + SmartPtrCIniFile iniFile; + iniFile.CreateInstance(); + iniFile->initialize(filePath); + iniFile->deleteValue(sectionName, keyName); + } else if (encoding.compare("xmlFile") == 0) { + std::string keyName; + std::deque keyPathCollection; + parseKeyPath(valueName, keyPathCollection, keyName); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, std::string()); + const SmartPtrCXmlElement parentXml = findXmlElement(keyPathCollection, rootXml); + + const SmartPtrCXmlElement foundElement = parentXml->findOptionalChild(keyName); + if (! foundElement.IsNull()) { + parentXml->removeChild(keyName); + } else { + parentXml->removeAttribute(keyName); + } + rootXml->saveToFile(filePath); + } else { + CAF_CM_EXCEPTIONEX_VA2(InvalidArgumentException, E_INVALIDARG, + "URI encoding is not recognized - filePath: %s, encoding: %s", + filePath.c_str(), encoding.c_str()); + } + } + CAF_CM_EXIT; +} + +std::deque > CConfigProvider::createIniFileWithoutSectionPropertyCollection( + const std::string& filePath) const { + CAF_CM_FUNCNAME_VALIDATE("createIniFileWithoutSectionPropertyCollection"); + + std::deque > propertyCollection; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + SmartPtrCIniFileWithoutSection iniFileWithoutSection; + iniFileWithoutSection.CreateInstance(); + iniFileWithoutSection->initialize(filePath); + + const std::deque entryCollection = + iniFileWithoutSection->getEntryCollection(); + + for(TConstIterator > iniEntryIter(entryCollection); + iniEntryIter; iniEntryIter++) { + const CIniFileWithoutSection::SmartPtrSIniEntry iniEntry = *iniEntryIter; + propertyCollection.push_back(std::make_pair(iniEntry->_name, iniEntry->_valueExpanded)); + } + } + CAF_CM_EXIT; + + return propertyCollection; +} + +std::deque > CConfigProvider::createIniFilePropertyCollection( + const std::string& filePath) const { + CAF_CM_FUNCNAME_VALIDATE("createIniFilePropertyCollection"); + + std::deque > propertyCollection; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + SmartPtrCIniFile iniFile; + iniFile.CreateInstance(); + iniFile->initialize(filePath); + + const std::deque sectionCollection = iniFile->getSectionCollection(); + for (TConstIterator > iniSectionIter(sectionCollection); + iniSectionIter; iniSectionIter++) { + const CIniFile::SmartPtrSIniSection iniSection = *iniSectionIter; + const std::string sectionName = iniSection->_sectionName; + + for (TConstIterator > iniEntryIter(iniSection->_entryCollection); + iniEntryIter; iniEntryIter++) { + const CIniFile::SmartPtrSIniEntry iniEntry = *iniEntryIter; + const std::string keyName = iniEntry->_name; + const std::string value = iniEntry->_valueRaw; + + const std::string keyPath = sectionName + _keyPathDelimStr + keyName; + propertyCollection.push_back(std::make_pair(keyPath, value)); + } + } + } + CAF_CM_EXIT; + + return propertyCollection; +} + +std::deque > CConfigProvider::createXmlFilePropertyCollection( + const std::string& filePath) const { + CAF_CM_FUNCNAME_VALIDATE("createXmlFilePropertyCollection"); + + std::deque > propertyCollection; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(filePath); + + const SmartPtrCXmlElement rootXml = CXmlUtils::parseFile(filePath, std::string()); + + const std::string keyPath = rootXml->getName(); + createXmlPropertyCollection(keyPath, rootXml, propertyCollection); + } + CAF_CM_EXIT; + + return propertyCollection; +} + +void CConfigProvider::createXmlPropertyCollection( + const std::string& keyPath, + const SmartPtrCXmlElement& thisXml, + std::deque >& propertyCollection) const { + CAF_CM_FUNCNAME_VALIDATE("createXmlPropertyCollection"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(keyPath); + CAF_CM_VALIDATE_SMARTPTR(thisXml); + // propertyCollection is optional + + const CXmlElement::SmartPtrCAttributeCollection attributeCollection = thisXml->getAllAttributes(); + if (! attributeCollection.IsNull() && ! attributeCollection->empty()) { + for (TConstIterator attributeXmlIter(*attributeCollection); + attributeXmlIter; attributeXmlIter++) { + const std::string attributeName = attributeXmlIter->first; + const std::string attributeValue = attributeXmlIter->second; + + const std::string newKeyPath = keyPath + _keyPathDelimStr + attributeName; + propertyCollection.push_back(std::make_pair(newKeyPath, attributeValue)); + } + } + + const CXmlElement::SmartPtrCElementCollection childrenXml = thisXml->getAllChildren(); + if (! childrenXml.IsNull() && ! childrenXml->empty()) { + for (TConstIterator childrenXmlIter(*childrenXml); + childrenXmlIter; childrenXmlIter++) { + const SmartPtrCXmlElement childXml = childrenXmlIter->second; + const std::string newKeyPath = keyPath + _keyPathDelimStr + childXml->getName(); + + const std::string value = childXml->getValue(); + if (! value.empty()) { + propertyCollection.push_back(std::make_pair(newKeyPath, value)); + } + + createXmlPropertyCollection(newKeyPath, childXml, propertyCollection); + } + } + } + CAF_CM_EXIT; +} + +void CConfigProvider::parseIniFileValuePath( + const std::string& valuePath, + std::string& valueName, + std::string& valueValue) const { + CAF_CM_FUNCNAME("parseIniFileValuePath"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(valuePath); + + const std::string::size_type delimPos = valuePath.find_first_of("/"); + if (delimPos == std::string::npos) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Delim not found in valuePath - valuePath: %s", valuePath.c_str()); + } + + valueName = valuePath.substr(0, delimPos); + valueValue = valuePath.substr(delimPos + 1); + + CAF_CM_LOG_DEBUG_VA3("Parsed valuePath - valuePath: %s, valueName: %s, valueValue: %s", + valuePath.c_str(), valueName.c_str(), valueValue.c_str()); + } + CAF_CM_EXIT; +} + +void CConfigProvider::parseKeyPath( + const std::string& keyPath, + std::deque& keyPathCollection, + std::string& keyName) const { + CAF_CM_FUNCNAME_VALIDATE("parseKeyPath"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(keyPath); + + std::string token; + std::stringstream stream(keyPath); + while(std::getline(stream, token, _keyPathDelimChar)) { + keyPathCollection.push_back(token); + } + + keyName = keyPathCollection.back(); + keyPathCollection.pop_back(); + } + CAF_CM_EXIT; +} + +SmartPtrCXmlElement CConfigProvider::findXmlElement( + const std::deque& keyPathCollection, + const SmartPtrCXmlElement& rootXml) const { + CAF_CM_FUNCNAME("findXmlElement"); + + SmartPtrCXmlElement xmlRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STL(keyPathCollection); + CAF_CM_VALIDATE_SMARTPTR(rootXml); + + xmlRc = rootXml; + for (std::deque::const_iterator keyPathIter = keyPathCollection.begin(); + keyPathIter != keyPathCollection.end(); + keyPathIter++) { + const std::string keyPath = *keyPathIter; + + if (keyPathIter == keyPathCollection.begin()) { + if (xmlRc->getName().compare(keyPath) != 0) { + CAF_CM_EXCEPTIONEX_VA2(NoSuchElementException, ERROR_NOT_FOUND, + "Root element does not match - %s != %s", keyPath.c_str(), xmlRc->getName().c_str()); + } + } else { + xmlRc = xmlRc->findRequiredChild(keyPath); + } + } + } + CAF_CM_EXIT; + + return xmlRc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.h new file mode 100644 index 000000000..8cb1344ff --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CConfigProvider.h @@ -0,0 +1,103 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CConfigProvider_h_ +#define CConfigProvider_h_ + + +#include "IInvokedProvider.h" + +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Xml/XmlUtils/CXmlElement.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CConfigProvider : public IInvokedProvider { +public: + CConfigProvider(); + virtual ~CConfigProvider(); + +public: // IInvokedProvider + const std::string getProviderNamespace() const { + return "caf"; + } + + const std::string getProviderName() const { + return "ConfigProvider"; + } + + const std::string getProviderVersion() const { + return "1.0.0"; + } + + const SmartPtrCSchemaDoc getSchema() const; + + void collect(const IProviderRequest& request, IProviderResponse& response) const; + + void invoke(const IProviderRequest& request, IProviderResponse& response) const; + +private: + std::string _fileAliasPrefix; + std::string _keyPathDelimStr; + char _keyPathDelimChar; + +private: + SmartPtrCDataClassInstanceDoc createDataClassInstance( + const std::string& filePath, + const std::string& encoding, + const std::deque >& propertyCollection) const; + + void setValue( + const std::string& filePath, + const std::string& encoding, + const std::string& valueName, + const std::string& valueValue) const; + + void deleteValue( + const std::string& filePath, + const std::string& encoding, + const std::string& valueName) const; + + std::deque > createIniFileWithoutSectionPropertyCollection( + const std::string& filePath) const; + + std::deque > createIniFilePropertyCollection( + const std::string& filePath) const; + + std::deque > createXmlFilePropertyCollection( + const std::string& filePath) const; + + void createXmlPropertyCollection( + const std::string& keyPath, + const SmartPtrCXmlElement& thisXml, + std::deque >& propertyCollection) const; + + void parseIniFileValuePath( + const std::string& valuePath, + std::string& valueName, + std::string& valueValue) const; + + void parseKeyPath( + const std::string& keyPath, + std::deque& keyPathCollection, + std::string& keyName) const; + + SmartPtrCXmlElement findXmlElement( + const std::deque& keyPathCollection, + const SmartPtrCXmlElement& rootXml) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigProvider); +}; + +} + +#endif // #ifndef CConfigProvider_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CIniFileWithoutSection.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CIniFileWithoutSection.cpp new file mode 100644 index 000000000..4df09213e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/CIniFileWithoutSection.cpp @@ -0,0 +1,479 @@ +/* + * Author: bwilliams + * Created: May 18, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/CCafRegex.h" +#include "Common/CIniFile.h" +#include "CIniFileWithoutSection.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CIniFileWithoutSection::CIniFileWithoutSection() : + _isInitialized(false), + CAF_CM_INIT_LOG("CIniFileWithoutSection") { +} + +CIniFileWithoutSection::~CIniFileWithoutSection() { +} + +void CIniFileWithoutSection::initialize( + const std::string& configFilePath) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(configFilePath); + + _configFilePath = configFilePath; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::deque CIniFileWithoutSection::getEntryCollection() { + CAF_CM_FUNCNAME_VALIDATE("getEntryCollection"); + + std::deque entryCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_entryCollection.empty()) { + _entryCollection = parse(_configFilePath); + } + + entryCollection = _entryCollection; + } + CAF_CM_EXIT; + + return entryCollection; +} + +CIniFileWithoutSection::SmartPtrSIniEntry CIniFileWithoutSection::findOptionalEntry( + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalEntry"); + + CIniFileWithoutSection::SmartPtrSIniEntry iniEntry; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + if (_entryCollection.empty()) { + _entryCollection = parse(_configFilePath); + } + + for (TConstIterator > iniEntryIter(_entryCollection); + iniEntryIter; iniEntryIter++) { + const SmartPtrSIniEntry iniEntryTmp = *iniEntryIter; + const std::string keyNameTmp = iniEntryTmp->_name; + if (keyNameTmp.compare(keyName) == 0) { + iniEntry = iniEntryTmp; + break; + } + } + } + CAF_CM_EXIT; + + return iniEntry; +} + +CIniFileWithoutSection::SmartPtrSIniEntry CIniFileWithoutSection::findRequiredEntry( + const std::string& keyName) { + CAF_CM_FUNCNAME("findRequiredEntry"); + + SmartPtrSIniEntry iniEntry; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + iniEntry = findOptionalEntry(keyName); + if (iniEntry.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(NoSuchElementException, ERROR_NOT_FOUND, + "Value not found - keyName: %s", keyName.c_str()); + } + } + CAF_CM_EXIT; + + return iniEntry; +} + +std::string CIniFileWithoutSection::findOptionalString( + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalString"); + + std::string value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findOptionalEntry(keyName); + if (! iniEntry.IsNull()) { + value = iniEntry->_valueExpanded; + } + } + CAF_CM_EXIT; + + return value; +} + +std::string CIniFileWithoutSection::findRequiredString( + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findRequiredString"); + + std::string value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findRequiredEntry(keyName); + value = iniEntry->_valueExpanded; + } + CAF_CM_EXIT; + + return value; +} + +std::string CIniFileWithoutSection::findOptionalRawString( + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findOptionalRawString"); + + std::string value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findOptionalEntry(keyName); + if (! iniEntry.IsNull()) { + value = iniEntry->_valueRaw; + } + } + CAF_CM_EXIT; + + return value; +} + +std::string CIniFileWithoutSection::findRequiredRawString( + const std::string& keyName) { + CAF_CM_FUNCNAME_VALIDATE("findRequiredRawString"); + + std::string value; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(keyName); + + const SmartPtrSIniEntry iniEntry = findRequiredEntry(keyName); + value = iniEntry->_valueRaw; + } + CAF_CM_EXIT; + + return value; +} + +void CIniFileWithoutSection::log() { + CAF_CM_FUNCNAME_VALIDATE("log"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (_entryCollection.empty()) { + _entryCollection = parse(_configFilePath); + } + + for (TConstIterator > iniEntryIter(_entryCollection); + iniEntryIter; iniEntryIter++) { + const SmartPtrSIniEntry iniEntry = *iniEntryIter; + CAF_CM_LOG_DEBUG_VA3("Entry - %s=%s (%s)", + iniEntry->_name.c_str(), iniEntry->_valueRaw.c_str(), iniEntry->_valueExpanded.c_str()); + } + } + CAF_CM_EXIT; +} + +void CIniFileWithoutSection::setValue( + const std::string valueName, + const std::string valueValue) { + CAF_CM_FUNCNAME_VALIDATE("setValue"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(valueName); + CAF_CM_VALIDATE_STRING(valueValue); + + const std::string srchValueName = valueName + "="; + const std::string newFileLine = valueName + "=" + valueValue + "\n"; + + bool isValueNameFnd = false; + std::deque newFileContents; + const std::deque fileContents = loadTextFileIntoCollection(_configFilePath); + for(TConstIterator > fileLineIter(fileContents); + fileLineIter; fileLineIter++) { + const std::string fileLine = *fileLineIter; + + if (fileLine.find(srchValueName) == 0) { + CAF_CM_LOG_DEBUG_VA2("Matched line... changing - valueName: %s, valueValue: %s", + valueName.c_str(), valueValue.c_str()); + + isValueNameFnd = true; + newFileContents.push_back(newFileLine); + } else { + newFileContents.push_back(fileLine); + } + } + + if (! isValueNameFnd) { + CAF_CM_LOG_WARN_VA1("Value name not found, adding... - %s", newFileLine.c_str()); + newFileContents.push_back(newFileLine); + } + + _entryCollection.clear(); + saveTextFile(newFileContents, _configFilePath); + } + CAF_CM_EXIT; +} + +void CIniFileWithoutSection::deleteValue( + const std::string valueName) { + CAF_CM_FUNCNAME_VALIDATE("deleteValue"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(valueName); + + const std::string srchValueName = valueName + "="; + + std::deque newFileContents; + const std::deque FileContents = loadTextFileIntoCollection(_configFilePath); + for(TConstIterator > fileLineIter(FileContents); + fileLineIter; fileLineIter++) { + const std::string fileLine = *fileLineIter; + + if (fileLine.find(srchValueName) == 0) { + CAF_CM_LOG_DEBUG_VA2("Matched line... deleting - srchValueName: %s, line: %s", + srchValueName.c_str(), fileLine.c_str()); + } else { + newFileContents.push_back(fileLine); + } + } + + _entryCollection.clear(); + saveTextFile(newFileContents, _configFilePath); + } + CAF_CM_EXIT; +} + +std::deque CIniFileWithoutSection::parse( + const std::string& configFilePath) const { + CAF_CM_FUNCNAME_VALIDATE("parse"); + + std::deque entryCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(configFilePath); + + std::deque replacementCollection; + + SmartPtrCCafRegex goodLineRegex; + goodLineRegex.CreateInstance(); + goodLineRegex->initialize("^[A-Za-z0-9]"); + + SmartPtrCCafRegex newLineRegex; + newLineRegex.CreateInstance(); + newLineRegex->initialize("\n"); + + const std::deque fileContents = loadTextFileIntoCollection(configFilePath); + for(TConstIterator > fileLineIter(fileContents); + fileLineIter; fileLineIter++) { + const std::string fileLine = *fileLineIter; + const std::string newFileLine = newLineRegex->replaceLiteral(fileLine, " "); + + if (goodLineRegex->isMatched(newFileLine)) { + const Cdeqstr fileLineTokens = CStringUtils::split(newFileLine, '='); + if (fileLineTokens.size() == 2) { + const std::string keyName = fileLineTokens[0]; + const std::string valueRaw = fileLineTokens[1]; + + std::string valueExpanded = CStringUtils::expandEnv(valueRaw); + for (TConstIterator > replacementIter(replacementCollection); + replacementIter; replacementIter++ ) { + const SmartPtrSReplacement replacement = *replacementIter; + if (replacement->_regex->isMatched(valueExpanded)) { + valueExpanded = replacement->_regex->replaceLiteral(valueExpanded, replacement->_value); + break; + } + } + + const SmartPtrSReplacement replacement = createReplacement(keyName, valueExpanded); + replacementCollection.push_back(replacement); + + const SmartPtrSIniEntry iniEntry = createIniEntry(keyName, valueRaw, valueExpanded); + entryCollection.push_back(iniEntry); + } else { + CAF_CM_LOG_WARN_VA2("Invalid line - file: %s, line: %s", configFilePath.c_str(), newFileLine.c_str()); + } + } + } + } + CAF_CM_EXIT; + + return entryCollection; +} + +CIniFileWithoutSection::SmartPtrSReplacement CIniFileWithoutSection::createReplacement( + const std::string& keyName, + const std::string& value) const { + CAF_CM_FUNCNAME_VALIDATE("createReplacement"); + + SmartPtrSReplacement replacement; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(keyName); + + std::string pattern("\\$\\{"); + pattern += keyName; + pattern += "\\}"; + + SmartPtrCCafRegex regex; + regex.CreateInstance(); + regex->initialize(pattern); + + replacement.CreateInstance(); + replacement->_regex = regex; + replacement->_value = value; + } + CAF_CM_EXIT; + + return replacement; +} + +CIniFileWithoutSection::SmartPtrSIniEntry CIniFileWithoutSection::createIniEntry( + const std::string& keyName, + const std::string& valueRaw, + const std::string& valueExpanded) const { + CAF_CM_FUNCNAME_VALIDATE("createIniEntry"); + + SmartPtrSIniEntry iniEntry; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(keyName); + CAF_CM_VALIDATE_STRING(valueRaw); + CAF_CM_VALIDATE_STRING(valueExpanded); + + iniEntry.CreateInstance(); + iniEntry->_name = keyName; + iniEntry->_valueRaw = valueRaw; + iniEntry->_valueExpanded = valueExpanded; + } + CAF_CM_EXIT; + + return iniEntry; +} + +std::deque CIniFileWithoutSection::loadTextFileIntoCollection( + const std::string& filePath) const { + CAF_CM_FUNCNAME("loadTextFileIntoCollection"); + + std::deque rc; + const uint32 maxLineLen = 512; + + FILE* fileHandle = NULL; + + try { + CAF_CM_VALIDATE_STRING(filePath); + + if (! FileSystemUtils::doesFileExist(filePath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "File not found - %s", filePath.c_str()); + } + +#ifdef WIN32 + const errno_t fopenRc = ::fopen_s(&fileHandle, filePath.c_str(), "r" ); + if ((fopenRc != 0) || (fileHandle == NULL)) { + CAF_CM_EXCEPTIONEX_VA1(InvalidHandleException, E_UNEXPECTED, + "Failed to open file - %s", filePath.c_str()); + } +#else + fileHandle = ::fopen(filePath.c_str(), "r" ); + if (fileHandle == NULL) { + CAF_CM_EXCEPTIONEX_VA1(InvalidHandleException, E_UNEXPECTED, + "Failed to open file - %s", filePath.c_str()); + } +#endif + + char buffer[maxLineLen]; + while(::fgets(buffer, maxLineLen, fileHandle) != NULL) { + rc.push_back(buffer); + } + } + CAF_CM_CATCH_ALL; + + try { + if (fileHandle != NULL) { + ::fclose(fileHandle); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_THROWEXCEPTION; + + return rc; +} + +void CIniFileWithoutSection::saveTextFile( + const std::deque fileContents, + const std::string filePath) const { + CAF_CM_FUNCNAME("saveTextFile"); + + FILE* fileHandle = NULL; + + try { + CAF_CM_VALIDATE_STL(fileContents); + CAF_CM_VALIDATE_STRING(filePath); + + if (! FileSystemUtils::doesFileExist(filePath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "File not found - %s", filePath.c_str()); + } + +#ifdef WIN32 + const errno_t fopenRc = ::fopen_s(&fileHandle, filePath.c_str(), "w" ); + if ((fopenRc != 0) || (fileHandle == NULL)) { + CAF_CM_EXCEPTIONEX_VA1(InvalidHandleException, E_UNEXPECTED, + "Failed to open file - %s", filePath.c_str()); + } +#else + fileHandle = ::fopen(filePath.c_str(), "w" ); + if (fileHandle == NULL) { + CAF_CM_EXCEPTIONEX_VA1(InvalidHandleException, E_UNEXPECTED, + "Failed to open file - %s", filePath.c_str()); + } +#endif + + for(TConstIterator > fileLineIter(fileContents); + fileLineIter; fileLineIter++) { + const std::string fileLine = *fileLineIter; + ::fputs(fileLine.c_str(), fileHandle); + } + } + CAF_CM_CATCH_ALL; + + try { + if (fileHandle != NULL) { + ::fclose(fileHandle); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_THROWEXCEPTION; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/ConfigProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/ConfigProvider.cpp new file mode 100644 index 000000000..0bc062fc1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/ConfigProvider.cpp @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf; + +int main(int csz, char* asz[]) { + CAF_CM_STATIC_FUNC_LOG("ConfigProvider", "main"); + + int rc = 0; + try { + CConfigProvider provider; + rc = CProviderDriver::processProviderCommandline(provider, csz, asz); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + rc = CAF_CM_ISEXCEPTION ? 1 : rc; + CAF_CM_CLEAREXCEPTION; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/stdafx.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/stdafx.h new file mode 100644 index 000000000..58307a6a8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Config_Provider/src/stdafx.h @@ -0,0 +1,19 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include + +#include "CConfigProvider.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/CPackageInstaller.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/CPackageInstaller.h new file mode 100644 index 000000000..0a445b12f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/CPackageInstaller.h @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CPackageInstaller_h_ +#define CPackageInstaller_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Doc/CafInstallRequestDoc/CFullPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CMinPackageElemDoc.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CPackageInstaller { +public: + typedef std::deque CInstallPackageSpecCollection; + CAF_DECLARE_SMART_POINTER(CInstallPackageSpecCollection); + + struct CInstallPackageMatch { + CInstallUtils::MATCH_STATUS _matchStatus; + SmartPtrCInstallPackageSpecDoc _matchedInstallPackageSpec; + }; + CAF_DECLARE_SMART_POINTER(CInstallPackageMatch); + +public: + static void installPackages( + const std::deque& fullPackageElemCollection, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir); + + static void uninstallPackages( + const std::deque& minPackageElemCollection, + const std::deque& installProviderSpecCollection, + const std::string& outputDir); + +private: + static void installPackage( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const SmartPtrCInstallPackageSpecDoc& uninstallPackageSpec, + const std::string& outputDir); + + static void executePackage( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const std::string& startupArgument, + const std::string& outputDir); + + static SmartPtrCInstallPackageSpecDoc resolveAndCopyAttachments( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec); + + static void saveInstallPackageSpec( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec); + + static std::map orderFullPackageElems( + const std::deque& fullPackageElemCollection); + + static std::map orderMinPackageElems( + const std::deque& minPackageElemCollection); + + static SmartPtrCAttachmentCollectionDoc resolveAttachments( + const SmartPtrCAttachmentNameCollectionDoc& attachmentNameCollection, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection); + + static SmartPtrCAttachmentCollectionDoc copyAttachments( + const SmartPtrCAttachmentDoc& startupAttachment, + const SmartPtrCAttachmentDoc& packageAttachment, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir); + + static SmartPtrCInstallPackageMatch matchInstallPackageSpec( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec); + + static SmartPtrCInstallPackageSpecCollection readInstallPackageSpecs(); + + static uint32 countPackageReferences( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const std::deque& installProviderSpecCollection); + + static void logDebug( + const std::string& message, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec1, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec2); + + static void logWarn( + const std::string& message, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec1, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec2); + + static void cleanupPackage( + const SmartPtrCInstallPackageMatch& installPackageMatch); + +private: + CAF_CM_DECLARE_NOCREATE(CPackageInstaller); +}; + +} + +#endif // #ifndef CPackageInstaller_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/CProviderInstaller.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/CProviderInstaller.h new file mode 100644 index 000000000..19a12414e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/CProviderInstaller.h @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProviderInstaller_h_ +#define CProviderInstaller_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" + +namespace Caf { + +class CProviderInstaller { +public: + typedef std::deque CInstallProviderSpecCollection; + CAF_DECLARE_SMART_POINTER(CInstallProviderSpecCollection); + + struct CInstallProviderMatch { + CInstallUtils::MATCH_STATUS _matchStatus; + SmartPtrCInstallProviderSpecDoc _matchedInstallProviderSpec; + }; + CAF_DECLARE_SMART_POINTER(CInstallProviderMatch); + +public: + static void installProvider( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir); + + static void uninstallProvider( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob, + const std::string& outputDir); + + static SmartPtrCInstallProviderSpecCollection readInstallProviderSpecs(); + +private: + static void installProviderLow( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir); + + static void uninstallProviderLow( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec, + const std::string& outputDir); + + static void storeInstallProviderSpec( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec); + + static SmartPtrCInstallProviderMatch matchInstallProviderSpec( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec); + + static SmartPtrCInstallProviderSpecDoc createInstallProviderSpec( + const SmartPtrCInstallProviderJobDoc& installProviderJob); + + static void logDebug( + const std::string& message, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec1, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec2); + + static void logWarn( + const std::string& message, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec1, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec2); + + static void cleanupProvider( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec); + + static std::string calcProviderFqn( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec); + + static std::string calcProviderFqn( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob); + +private: + CAF_CM_DECLARE_NOCREATE(CProviderInstaller); +}; + +} + +#endif // #ifndef CProviderInstaller_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/IPackage.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/IPackage.h new file mode 100644 index 000000000..a64c5362a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/include/IPackage.h @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: July 25, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _InstallProvider_IPackage_h_ +#define _InstallProvider_IPackage_h_ + + +#include "ICafObject.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) +IPackage : public ICafObject { + CAF_DECL_UUID("e372d4bc-2384-4fcc-8042-f916f2d11bd2") + + virtual void fullPackageElem( + const SmartPtrCAttachmentDoc packageAttachment, + const std::string arguments, + const SmartPtrCAttachmentCollectionDoc supportingAttachmentCollection, + const std::string outputDir) = 0; + + virtual void unfullPackageElem( + const SmartPtrCAttachmentDoc packageAttachment, + const std::string arguments, + const SmartPtrCAttachmentCollectionDoc supportingAttachmentCollection, + const std::string outputDir) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IPackage); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.cpp new file mode 100644 index 000000000..6faa329cc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.cpp @@ -0,0 +1,253 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" + +#include "CProviderInstaller.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CMinPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h" +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Exception/CCafException.h" +#include "CInstallProvider.h" +#include "IProviderResponse.h" +#include "IProviderRequest.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" +#include "Integration/Caf/CCafMessagePayload.h" + +using namespace Caf; + +CInstallProvider::CInstallProvider() : + CAF_CM_INIT_LOG("CInstallProvider") { +} + +CInstallProvider::~CInstallProvider() { +} + +const SmartPtrCSchemaDoc CInstallProvider::getSchema() const { + std::deque dc1Props; + dc1Props.push_back(CProviderDocHelper::createClassProperty("index", PROPERTY_UINT32, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("packageNamespace", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("packageName", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("packageVersion", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("startupAttachmentName", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("packageAttachmentName", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("arguments", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("supportingAttachmentName", PROPERTY_STRING, false, false, true)); + + std::deque dc2Props; + dc2Props.push_back(CProviderDocHelper::createClassProperty("clientId", PROPERTY_STRING, true)); + dc2Props.push_back(CProviderDocHelper::createClassProperty("providerNamespace", PROPERTY_STRING, true)); + dc2Props.push_back(CProviderDocHelper::createClassProperty("providerName", PROPERTY_STRING, true)); + dc2Props.push_back(CProviderDocHelper::createClassProperty("providerVersion", PROPERTY_STRING, true)); + dc2Props.push_back(CProviderDocHelper::createClassProperty("packageOSType", PROPERTY_STRING, true)); + + std::deque instanceProperties; + instanceProperties.push_back(CProviderDocHelper::createClassInstanceProperty( + "fullPackageElem", + CProviderDocHelper::createClassIdentifier("caf", "FullPackageElem", "1.0.0"), + true, + false, + true)); + instanceProperties.push_back(CProviderDocHelper::createClassInstanceProperty( + "unfullPackageElem", + CProviderDocHelper::createClassIdentifier("caf", "FullPackageElem", "1.0.0"), + true, + false, + true)); + + std::deque dc3Props; + dc3Props.push_back(CProviderDocHelper::createClassProperty("packageOSType", PROPERTY_STRING, true)); + dc3Props.push_back(CProviderDocHelper::createClassProperty("clientId", PROPERTY_STRING, true)); + dc3Props.push_back(CProviderDocHelper::createClassProperty("providerNamespace", PROPERTY_STRING, true)); + dc3Props.push_back(CProviderDocHelper::createClassProperty("providerName", PROPERTY_STRING, true)); + dc3Props.push_back(CProviderDocHelper::createClassProperty("providerVersion", PROPERTY_STRING, true)); + dc3Props.push_back(CProviderDocHelper::createClassProperty("packageOSType", PROPERTY_STRING, true)); + + std::deque dataClasses; + dataClasses.push_back(CProviderDocHelper::createDataClass("caf", "FullPackageElem", "1.0.0", dc1Props)); + dataClasses.push_back(CProviderDocHelper::createDataClass("caf", "InstallProviderJob", "1.0.0", dc2Props, instanceProperties)); + dataClasses.push_back(CProviderDocHelper::createDataClass("caf", "UninstallProviderJob", "1.0.0", dc3Props)); + + std::deque m1InstanceParams; + m1InstanceParams.push_back(CProviderDocHelper::createInstanceParameter( + "installProviderJob", + "caf", + "InstallProviderJob", + "1.0.0", + false)); + + std::deque m2InstanceParams; + m2InstanceParams.push_back(CProviderDocHelper::createInstanceParameter( + "uninstallProviderJob", + "caf", + "UninstallProviderJob", + "1.0.0", + false)); + + std::deque emptyParams; + + std::deque methods; + methods.push_back(CProviderDocHelper::createMethod("installProviderJob", emptyParams, m1InstanceParams)); + methods.push_back(CProviderDocHelper::createMethod("uninstallProviderJob", emptyParams, m2InstanceParams)); + + std::deque actionClasses; + actionClasses.push_back( + CProviderDocHelper::createActionClass( + "caf", + "InstallActions", + "1.0.0", + CProviderDocHelper::createCollectMethod("collectInstances"), + methods)); + + return CProviderDocHelper::createSchema(dataClasses, actionClasses); +} + +void CInstallProvider::collect(const IProviderRequest& request, IProviderResponse& response) const { + + const CProviderInstaller::SmartPtrCInstallProviderSpecCollection installProviderSpecCollection = + CProviderInstaller::readInstallProviderSpecs(); + if (!installProviderSpecCollection.IsNull()) { + for (TConstIterator > + installProviderSpecIter(*installProviderSpecCollection); installProviderSpecIter; installProviderSpecIter++) { + const SmartPtrCInstallProviderSpecDoc installProviderSpec = + *installProviderSpecIter; + + const SmartPtrCDataClassInstanceDoc dataClassInstance = createDataClassInstance( + installProviderSpec); + + response.addInstance(dataClassInstance); + } + } +} + +void CInstallProvider::invoke(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("invoke"); + + SmartPtrCProviderInvokeOperationDoc doc = request.getInvokeOperations(); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCOperationDoc operation = doc->getOperation(); + const std::string operationName = operation->getName(); + + const SmartPtrCParameterCollectionDoc parameterCollection = + operation->getParameterCollection(); + + const std::string outputDir = doc->getOutputDir(); + + if (operationName.compare("installProviderJob") == 0) { + const std::string installProviderJobStr = + ParameterUtils::findRequiredInstanceParameterAsString("installProviderJob", + parameterCollection); + CAF_CM_VALIDATE_STRING(installProviderJobStr); + + const SmartPtrCDynamicByteArray payload = + CCafMessagePayload::createBufferFromStr(installProviderJobStr); + const SmartPtrCInstallProviderJobDoc installProviderJob = + CCafMessagePayloadParser::getInstallProviderJob(payload); + + if (isCurrentOS(installProviderJob->getPackageOSType())) { + CProviderInstaller::installProvider(installProviderJob, request.getAttachments(), outputDir); + } + } else if (operationName.compare("uninstallProviderJob") == 0) { + const std::string uninstallProviderJobStr = + ParameterUtils::findRequiredInstanceParameterAsString("uninstallProviderJob", + parameterCollection); + + const SmartPtrCDynamicByteArray payload = + CCafMessagePayload::createBufferFromStr(uninstallProviderJobStr); + const SmartPtrCUninstallProviderJobDoc uninstallProviderJob = + CCafMessagePayloadParser::getUninstallProviderJob(payload); + + if (isCurrentOS(uninstallProviderJob->getPackageOSType())) { + CProviderInstaller::uninstallProvider(uninstallProviderJob, outputDir); + } + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Invalid operation name (must be \'installProviderJob\' or \'uninstallProviderJob\') - %s", operationName.c_str()) + } +} + +SmartPtrCDataClassInstanceDoc CInstallProvider::createDataClassInstance( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) const { + CAF_CM_FUNCNAME_VALIDATE("createDataClassInstance"); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + + const std::deque minPackageElemCollection = + installProviderSpec->getPackageCollection(); + + std::deque subInstances; + for (TConstIterator > minPackageElemIter( + minPackageElemCollection); minPackageElemIter; minPackageElemIter++) { + const SmartPtrCMinPackageElemDoc minPackageElem = *minPackageElemIter; + + const std::string packageNamespace = minPackageElem->getPackageNamespace(); + const std::string packageName = minPackageElem->getPackageName(); + const std::string packageVersion = minPackageElem->getPackageVersion(); + + std::deque siProperties; + siProperties.push_back(CProviderDocHelper::createDataClassProperty("packageNamespace", packageNamespace)); + siProperties.push_back(CProviderDocHelper::createDataClassProperty("packageName", packageName)); + siProperties.push_back(CProviderDocHelper::createDataClassProperty("packageVersion", packageVersion)); + subInstances.push_back(CProviderDocHelper::createDataClassSubInstance( + "fullPackageElem", + siProperties)); + } + + const std::string clientId = + BasePlatform::UuidToString(installProviderSpec->getClientId()); + const std::string providerNamespace = installProviderSpec->getProviderNamespace(); + const std::string providerName = installProviderSpec->getProviderName(); + const std::string providerVersion = installProviderSpec->getProviderVersion(); + + std::deque dataClassProperties; + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("clientId", clientId)); + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("providerNamespace", providerNamespace)); + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("providerName", providerName)); + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("providerVersion", providerVersion)); + return CProviderDocHelper::createDataClassInstance( + "caf", + "CafProviderInventory", + "1.0.0", + dataClassProperties, + subInstances); +} + +bool CInstallProvider::isCurrentOS(const PACKAGE_OS_TYPE& packageOSType) const { + CAF_CM_FUNCNAME_VALIDATE("isCurrentOS"); + +#ifdef WIN32 + const PACKAGE_OS_TYPE packageOSTypeLocal = PACKAGE_OS_WIN; +#else + const PACKAGE_OS_TYPE packageOSTypeLocal = PACKAGE_OS_NIX; +#endif + + bool rc = false; + if ((packageOSType == packageOSTypeLocal) || (packageOSType == PACKAGE_OS_ALL)) { + rc = true; + } else { + CAF_CM_LOG_WARN_VA0("Wrong OS... Skipping package"); + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.h new file mode 100644 index 000000000..c987f6145 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallProvider.h @@ -0,0 +1,60 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CInstallProvider_h_ +#define CInstallProvider_h_ + + +#include "IInvokedProvider.h" +#include "Doc/CafInstallRequestDoc/CafInstallRequestDocTypes.h" + +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CInstallProvider : public IInvokedProvider { +public: + CInstallProvider(); + virtual ~CInstallProvider(); + +public: // IInvokedProvider + const std::string getProviderNamespace() const { + return "caf"; + } + + const std::string getProviderName() const { + return "InstallProvider"; + } + + const std::string getProviderVersion() const { + return "1.0.0"; + } + + const SmartPtrCSchemaDoc getSchema() const; + + void collect(const IProviderRequest& request, IProviderResponse& response) const; + + void invoke(const IProviderRequest& request, IProviderResponse& response) const; + +private: + SmartPtrCDataClassInstanceDoc createDataClassInstance( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) const; + + bool isCurrentOS(const PACKAGE_OS_TYPE& packageOSType) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CInstallProvider); +}; + +} + +#endif // #ifndef CInstallProvider_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.cpp new file mode 100644 index 000000000..2cd210327 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.cpp @@ -0,0 +1,58 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "CInstallUtils.h" + +using namespace Caf; + +CInstallUtils::MATCH_STATUS CInstallUtils::compareVersions( + const std::string& packageVersion1, + const std::string& packageVersion2) { + CAF_CM_STATIC_FUNC_LOG("CInstallUtils", "compareVersions"); + + MATCH_STATUS matchStatus = MATCH_NOTEQUAL; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(packageVersion1); + CAF_CM_VALIDATE_STRING(packageVersion2); + + const Cdeqstr packageVersionTokens1 = CStringUtils::split(packageVersion1, '.'); + if (packageVersionTokens1.size() != 3) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Package version 1 has a bad format - %s", + packageVersion1.c_str()); + } + + const Cdeqstr packageVersionTokens2 = CStringUtils::split(packageVersion2, '.'); + if (packageVersionTokens2.size() != 3) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Package version 2 has a bad format - %s", + packageVersion2.c_str()); + } + + if ((packageVersionTokens1[0].compare(packageVersionTokens2[0]) == 0) + && (packageVersionTokens1[1].compare(packageVersionTokens2[1]) == 0)) { + const uint32 lastVersionPos1 = CStringConv::fromString( + packageVersionTokens1[2]); + const uint32 lastVersionPos2 = CStringConv::fromString( + packageVersionTokens2[2]); + if (lastVersionPos1 == lastVersionPos2) { + matchStatus = MATCH_VERSION_EQUAL; + } else if (lastVersionPos1 < lastVersionPos2) { + matchStatus = MATCH_VERSION_LESS; + } else { + matchStatus = MATCH_VERSION_GREATER; + } + } + } + CAF_CM_EXIT; + + return matchStatus; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.h new file mode 100644 index 000000000..038988dad --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CInstallUtils.h @@ -0,0 +1,32 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CInstallUtils_h_ +#define CInstallUtils_h_ + +namespace Caf { + +class CInstallUtils { +public: + typedef enum { + MATCH_NOTEQUAL, + MATCH_VERSION_EQUAL, + MATCH_VERSION_LESS, + MATCH_VERSION_GREATER + } MATCH_STATUS; + + static MATCH_STATUS compareVersions( + const std::string& packageVersion1, + const std::string& packageVersion2); + +private: + CAF_CM_DECLARE_NOCREATE(CInstallUtils); +}; + +} + +#endif // #ifndef CInstallUtils_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.cpp new file mode 100644 index 000000000..777e973cd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.cpp @@ -0,0 +1,158 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Exception/CCafException.h" +#include "CPackageExecutor.h" + +using namespace Caf; + +void CPackageExecutor::executePackage( + const SmartPtrCAttachmentDoc& startupAttachment, + const std::string& startupArgument, + const SmartPtrCAttachmentDoc& packageAttachment, + const std::string& packageArguments, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageExecutor", "executePackage"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(startupAttachment); + CAF_CM_VALIDATE_STRING(startupArgument); + CAF_CM_VALIDATE_SMARTPTR(packageAttachment); + // packageArguments is optional + // supportingAttachmentCollection is optional + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string installInvoker = createInstallInvoker(startupAttachment, + startupArgument, packageAttachment, packageArguments, + supportingAttachmentCollection, outputDir); + + runInstallInvoker(installInvoker, outputDir); + } + CAF_CM_EXIT; +} + +std::string CPackageExecutor::createInstallInvoker( + const SmartPtrCAttachmentDoc& startupAttachment, + const std::string& startupArgument, + const SmartPtrCAttachmentDoc& packageAttachment, + const std::string& packageArguments, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageExecutor", "createInstallInvoker"); + + std::string installInvoker; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(startupAttachment); + CAF_CM_VALIDATE_STRING(startupArgument); + CAF_CM_VALIDATE_SMARTPTR(packageAttachment); + // packageArguments is optional + // supportingAttachmentCollection is optional + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string inputDir = CPathBuilder::getRootConfigDir(_sConfigInputDir); +#ifdef WIN32 + const std::string installProviderHeaderPath = + FileSystemUtils::buildPath(inputDir, "installProviderHeader.bat"); +#else + const std::string installProviderHeaderPath = + FileSystemUtils::buildPath(inputDir, "installProviderHeader.sh"); +#endif + const std::string installProviderHeader = FileSystemUtils::loadTextFile( + installProviderHeaderPath); + + std::string attachmentUris = ""; + if (!supportingAttachmentCollection.IsNull()) { + const std::deque attachmentCollectionInner = + supportingAttachmentCollection->getAttachment(); + for (TConstIterator > attachmentIter( + attachmentCollectionInner); attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + attachmentUris += attachment->getUri() + ";"; + } + } + + const std::string startupAttachmentUri = startupAttachment->getUri(); + std::string startupAttachmentFile = UriUtils::parseRequiredFilePath( + startupAttachmentUri); + + const std::string packageAttachmentUri = packageAttachment->getUri(); + std::string packageAttachmentFile = UriUtils::parseRequiredFilePath( + packageAttachmentUri); + + const std::string packageArgumentsTmp = packageArguments.empty() ? "" + : packageArguments; + +#ifdef WIN32 + const std::string newLine = "\r\n"; + const std::string fileContents = + installProviderHeader + newLine + + std::string("set CAF_PACKAGE_FILE=") + packageAttachmentFile + newLine + + std::string("set CAF_PACKAGE_ARGS=") + packageArgumentsTmp + newLine + + std::string("set CAF_ATTACHMENT_URIS=") + attachmentUris + newLine + + startupAttachmentFile + " " + startupArgument + newLine; + installInvoker = FileSystemUtils::buildPath(outputDir, "CafInstallInvoker.bat"); +#else + const std::string newLine = "\n"; + const std::string fileContents = + installProviderHeader + newLine + + std::string("export CAF_PACKAGE_FILE=") + packageAttachmentFile + newLine + + std::string("export CAF_PACKAGE_ARGS=") + packageArgumentsTmp + newLine + + std::string("export CAF_ATTACHMENT_URIS=") + attachmentUris + newLine + + startupAttachmentFile + " " + startupArgument + newLine; + installInvoker = FileSystemUtils::buildPath(outputDir, "CafInstallInvoker"); +#endif + + const uint32 exeByOwner = 0100; + const uint32 writeByOwner = 0200; + const uint32 readByOwner = 0400; + const uint32 fileMode = exeByOwner | writeByOwner | readByOwner; + + FileSystemUtils::saveTextFile(installInvoker, fileContents); + FileSystemUtils::chmod(installInvoker, fileMode); + FileSystemUtils::chmod(startupAttachmentFile, fileMode); + FileSystemUtils::chmod(packageAttachmentFile, fileMode); + } + CAF_CM_EXIT; + + return installInvoker; +} + +void CPackageExecutor::runInstallInvoker( + const std::string& installInvoker, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG("CPackageExecutor", "runInstallInvoker"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(installInvoker); + CAF_CM_VALIDATE_STRING(outputDir); + + if (!FileSystemUtils::doesFileExist(installInvoker)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Install invoker not found - %s", installInvoker.c_str()); + } + + const std::string stdoutPath = FileSystemUtils::buildPath(outputDir, + _sStdoutFilename); + const std::string stderrPath = FileSystemUtils::buildPath(outputDir, + _sStderrFilename); + + Cdeqstr argv; + argv.push_back(installInvoker); + + ProcessUtils::runSyncToFiles(argv, stdoutPath, stderrPath); + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.h new file mode 100644 index 000000000..a355ffa11 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageExecutor.h @@ -0,0 +1,47 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CPackageExecutor_h_ +#define CPackageExecutor_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" + +namespace Caf { + +/// Utilities used in the install process. +class CPackageExecutor { +public: + static void executePackage( + const SmartPtrCAttachmentDoc& startupAttachment, + const std::string& startupArgument, + const SmartPtrCAttachmentDoc& packageAttachment, + const std::string& packageArguments, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir); + +private: + static std::string createInstallInvoker( + const SmartPtrCAttachmentDoc& startupAttachment, + const std::string& startupArgument, + const SmartPtrCAttachmentDoc& packageAttachment, + const std::string& packageArguments, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir); + + static void runInstallInvoker( + const std::string& installInvoker, + const std::string& outputDir); + +private: + CAF_CM_DECLARE_NOCREATE(CPackageExecutor); +}; + +} + +#endif // #ifndef CPackageExecutor_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageInstaller.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageInstaller.cpp new file mode 100644 index 000000000..b4868e379 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPackageInstaller.cpp @@ -0,0 +1,656 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h" +#include "Doc/CafInstallRequestDoc/CFullPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallPackageSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CMinPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CPackageDefnDoc.h" +#include "CPackageInstaller.h" + +using namespace Caf; + +void CPackageInstaller::installPackages( + const std::deque& fullPackageElemCollection, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "installPackages"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(fullPackageElemCollection); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::map orderedFullPackageElemCollection = + orderFullPackageElems(fullPackageElemCollection); + + for (TConstMapIterator > fullPackageElemIter( + orderedFullPackageElemCollection); fullPackageElemIter; fullPackageElemIter++) { + const SmartPtrCFullPackageElemDoc fullPackageElem = *fullPackageElemIter; + + const SmartPtrCPackageDefnDoc installPackageDefn = + fullPackageElem->getInstallPackage(); + + SmartPtrCInstallPackageSpecDoc installPackageSpec; + installPackageSpec.CreateInstance(); + installPackageSpec->initialize(fullPackageElem->getPackageNamespace(), + fullPackageElem->getPackageName(), fullPackageElem->getPackageVersion(), + installPackageDefn->getStartupAttachmentName(), + installPackageDefn->getPackageAttachmentName(), + installPackageDefn->getSupportingAttachmentNameCollection(), attachmentCollection, + installPackageDefn->getArguments()); + + const SmartPtrCPackageDefnDoc uninstallPackageDefn = + fullPackageElem->getUninstallPackage(); + + SmartPtrCInstallPackageSpecDoc uninstallPackageSpec; + uninstallPackageSpec.CreateInstance(); + uninstallPackageSpec->initialize(fullPackageElem->getPackageNamespace(), + fullPackageElem->getPackageName(), fullPackageElem->getPackageVersion(), + uninstallPackageDefn->getStartupAttachmentName(), + uninstallPackageDefn->getPackageAttachmentName(), + uninstallPackageDefn->getSupportingAttachmentNameCollection(), + attachmentCollection, uninstallPackageDefn->getArguments()); + + installPackage(installPackageSpec, uninstallPackageSpec, outputDir); + } + } + CAF_CM_EXIT; +} + +void CPackageInstaller::uninstallPackages( + const std::deque& minPackageElemCollection, + const std::deque& installProviderSpecCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "uninstallPackages"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(minPackageElemCollection); + // installProviderSpecCollection is optional + CAF_CM_VALIDATE_STRING(outputDir); + + const std::map + orderedProviderPackageElemCollection = orderMinPackageElems( + minPackageElemCollection); + + for (TConstMapIterator > + minPackageElemIter(orderedProviderPackageElemCollection); minPackageElemIter; minPackageElemIter++) { + const SmartPtrCMinPackageElemDoc minPackageElem = *minPackageElemIter; + + const std::string installPackageDir = CPathBuilder::calcInstallPackageDir( + minPackageElem->getPackageNamespace(), minPackageElem->getPackageName(), + minPackageElem->getPackageVersion()); + + const std::string installPackageSpecPath = FileSystemUtils::buildPath( + installPackageDir, _sInstallPackageSpecFilename); + + const SmartPtrCInstallPackageSpecDoc installPackageSpec = + XmlRoots::parseInstallPackageSpecFromFile(installPackageSpecPath); + + const uint32 packageRefCnt = countPackageReferences(installPackageSpec, + installProviderSpecCollection); + if (packageRefCnt == 1) { + try { + CPackageInstaller::executePackage(installPackageSpec, "-uninstall", outputDir); + } catch (ProcessFailedException* ex) { + CAF_CM_LOG_DEBUG_VA1("Removing package directory - %s", installPackageDir.c_str()); + FileSystemUtils::recursiveRemoveDirectory(installPackageDir); + ex->throwSelf(); + } + + CAF_CM_LOG_DEBUG_VA1("Removing package directory - %s", installPackageDir.c_str()); + FileSystemUtils::recursiveRemoveDirectory(installPackageDir); + } else { + CAF_CM_LOG_WARN_VA4("Package referenced from more than one provider... not uninstalling - %s::%s::%s = %d", + minPackageElem->getPackageNamespace().c_str(), minPackageElem->getPackageName().c_str(), + minPackageElem->getPackageVersion().c_str(), packageRefCnt); + } + } + } + CAF_CM_EXIT; +} + +void CPackageInstaller::installPackage( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const SmartPtrCInstallPackageSpecDoc& uninstallPackageSpec, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "installPackage"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + CAF_CM_VALIDATE_SMARTPTR(uninstallPackageSpec); + CAF_CM_VALIDATE_STRING(outputDir); + + const SmartPtrCInstallPackageMatch installPackageMatch = matchInstallPackageSpec( + installPackageSpec); + + switch (installPackageMatch->_matchStatus) { + case CInstallUtils::MATCH_NOTEQUAL: { + const SmartPtrCInstallPackageSpecDoc resolvedInstallPackageSpec = + resolveAndCopyAttachments(uninstallPackageSpec); + executePackage(installPackageSpec, "-install", outputDir); + saveInstallPackageSpec(resolvedInstallPackageSpec); + } + break; + case CInstallUtils::MATCH_VERSION_EQUAL: { + logWarn("Package already installed", installPackageSpec, + installPackageMatch->_matchedInstallPackageSpec); + } + break; + case CInstallUtils::MATCH_VERSION_LESS: { + logWarn("More recent package already installed", installPackageSpec, + installPackageMatch->_matchedInstallPackageSpec); + } + break; + case CInstallUtils::MATCH_VERSION_GREATER: { + logWarn("Upgrading installed version", installPackageSpec, + installPackageMatch->_matchedInstallPackageSpec); + + try { + executePackage(installPackageMatch->_matchedInstallPackageSpec, + "-upgrade_uninstall", outputDir); + } catch (ProcessFailedException* ex) { + cleanupPackage(installPackageMatch); + ex->throwSelf(); + } + + cleanupPackage(installPackageMatch); + + const SmartPtrCInstallPackageSpecDoc resolvedInstallPackageSpec = + resolveAndCopyAttachments(uninstallPackageSpec); + executePackage(installPackageSpec, "-upgrade_install", outputDir); + saveInstallPackageSpec(resolvedInstallPackageSpec); + } + break; + } + } + CAF_CM_EXIT; +} + +void CPackageInstaller::executePackage( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const std::string& startupArgument, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "executePackage"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + CAF_CM_VALIDATE_STRING(outputDir); + + const SmartPtrCAttachmentCollectionDoc attachmentCollection = + installPackageSpec->getAttachmentCollection(); + + const SmartPtrCAttachmentDoc startupAttachment = AttachmentUtils::findRequiredAttachment( + installPackageSpec->getStartupAttachmentName(), attachmentCollection); + const SmartPtrCAttachmentDoc packageAttachment = AttachmentUtils::findRequiredAttachment( + installPackageSpec->getPackageAttachmentName(), attachmentCollection); + + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection = + installPackageSpec->getSupportingAttachmentNameCollection(); + const SmartPtrCAttachmentCollectionDoc supportingAttachmentCollection = + resolveAttachments(attachmentNameCollection, attachmentCollection); + + const std::string packageDir = CPathBuilder::calcDir( + installPackageSpec->getPackageNamespace(), installPackageSpec->getPackageName(), + installPackageSpec->getPackageVersion(), outputDir); + + const std::string packageArguments = installPackageSpec->getArguments(); + + if (!FileSystemUtils::doesDirectoryExist(packageDir)) { + FileSystemUtils::createDirectory(packageDir); + } + + CPackageExecutor::executePackage(startupAttachment, startupArgument, + packageAttachment, packageArguments, supportingAttachmentCollection, packageDir); + } + CAF_CM_EXIT; +} + +SmartPtrCInstallPackageSpecDoc CPackageInstaller::resolveAndCopyAttachments( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "resolveAndCopyAttachments"); + + SmartPtrCInstallPackageSpecDoc installPackageSpecRc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + + const std::string installPackageDir = CPathBuilder::calcInstallPackageDir( + installPackageSpec->getPackageNamespace(), installPackageSpec->getPackageName(), + installPackageSpec->getPackageVersion()); + + const SmartPtrCAttachmentCollectionDoc attachmentCollection = + installPackageSpec->getAttachmentCollection(); + + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection = + installPackageSpec->getSupportingAttachmentNameCollection(); + + const SmartPtrCAttachmentCollectionDoc resolvedAttachmentCollection = resolveAttachments( + attachmentNameCollection, attachmentCollection); + + const SmartPtrCAttachmentDoc startupAttachment = AttachmentUtils::findRequiredAttachment( + installPackageSpec->getStartupAttachmentName(), attachmentCollection); + const SmartPtrCAttachmentDoc packageAttachment = AttachmentUtils::findRequiredAttachment( + installPackageSpec->getPackageAttachmentName(), attachmentCollection); + + const SmartPtrCAttachmentCollectionDoc copiedAttachmentCollection = copyAttachments( + startupAttachment, packageAttachment, resolvedAttachmentCollection, installPackageDir); + + installPackageSpecRc.CreateInstance(); + installPackageSpecRc->initialize(installPackageSpec->getPackageNamespace(), + installPackageSpec->getPackageName(), installPackageSpec->getPackageVersion(), + installPackageSpec->getStartupAttachmentName(), + installPackageSpec->getPackageAttachmentName(), attachmentNameCollection, + copiedAttachmentCollection, installPackageSpec->getArguments()); + } + CAF_CM_EXIT; + + return installPackageSpecRc; +} + +void CPackageInstaller::saveInstallPackageSpec( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "saveInstallPackageSpec"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + + const std::string installPackageDir = CPathBuilder::calcInstallPackageDir( + installPackageSpec->getPackageNamespace(), installPackageSpec->getPackageName(), + installPackageSpec->getPackageVersion()); + + const std::string installPackageSpecPath = FileSystemUtils::buildPath(installPackageDir, + _sInstallPackageSpecFilename); + + XmlRoots::saveInstallPackageSpecToFile(installPackageSpec, installPackageSpecPath); + } + CAF_CM_EXIT; +} + +std::map CPackageInstaller::orderFullPackageElems( + const std::deque& fullPackageElemCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "orderFullPackageElems"); + + std::map orderedFullPackageElemCollection; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(fullPackageElemCollection); + + for (TConstIterator > fullPackageElemIter( + fullPackageElemCollection); fullPackageElemIter; fullPackageElemIter++) { + const SmartPtrCFullPackageElemDoc fullPackageElem = *fullPackageElemIter; + orderedFullPackageElemCollection.insert( + std::make_pair(fullPackageElem->getIndex(), fullPackageElem)); + } + } + CAF_CM_EXIT; + + return orderedFullPackageElemCollection; +} + +std::map CPackageInstaller::orderMinPackageElems( + const std::deque& minPackageElemCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "orderProviderPackageElems"); + + std::map orderedMinPackageElemCollection; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STL(minPackageElemCollection); + + for (TConstIterator > minPackageElemIter( + minPackageElemCollection); minPackageElemIter; minPackageElemIter++) { + const SmartPtrCMinPackageElemDoc minPackageElem = *minPackageElemIter; + orderedMinPackageElemCollection.insert( + std::make_pair(minPackageElem->getIndex(), minPackageElem)); + } + } + CAF_CM_EXIT; + + return orderedMinPackageElemCollection; +} + +SmartPtrCAttachmentCollectionDoc CPackageInstaller::resolveAttachments( + const SmartPtrCAttachmentNameCollectionDoc& attachmentNameCollection, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "resolveAttachments"); + + SmartPtrCAttachmentCollectionDoc rc; + + CAF_CM_ENTER + { + // attachmentNameCollection is optional + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + + if (!attachmentNameCollection.IsNull()) { + const std::deque attachmentNameCollectionInner = + attachmentNameCollection->getName(); + + std::deque attachmentCollectionInner; + for (TConstIterator > attachmentNameIter( + attachmentNameCollectionInner); attachmentNameIter; attachmentNameIter++) { + const std::string attachmentName = *attachmentNameIter; + + const SmartPtrCAttachmentDoc attachment = AttachmentUtils::findRequiredAttachment( + attachmentName, attachmentCollection); + attachmentCollectionInner.push_back(attachment); + } + + if (!attachmentCollectionInner.empty()) { + rc.CreateInstance(); + rc->initialize(attachmentCollectionInner, + std::deque()); + } + } + } + CAF_CM_EXIT; + + return rc; +} + +SmartPtrCAttachmentCollectionDoc CPackageInstaller::copyAttachments( + const SmartPtrCAttachmentDoc& startupAttachment, + const SmartPtrCAttachmentDoc& packageAttachment, + const SmartPtrCAttachmentCollectionDoc& supportingAttachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "copyAttachments"); + + SmartPtrCAttachmentCollectionDoc attachmentCollectionRc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(startupAttachment); + CAF_CM_VALIDATE_SMARTPTR(packageAttachment); + // supportingAttachmentCollection is optional + CAF_CM_VALIDATE_STRING(outputDir); + + std::deque attachmentCollectionInner; + + attachmentCollectionInner.push_back(startupAttachment); + attachmentCollectionInner.push_back(packageAttachment); + + if (!supportingAttachmentCollection.IsNull()) { + for (TConstIterator > supportingAttachmentIter( + supportingAttachmentCollection->getAttachment()); supportingAttachmentIter; supportingAttachmentIter++) { + attachmentCollectionInner.push_back(*supportingAttachmentIter); + } + } + + std::deque attachmentCollectionInnerRc; + for (TConstIterator > attachmentIter( + attachmentCollectionInner); attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + const std::string attachmentUri = attachment->getUri(); + const std::string attachmentFilePath = UriUtils::parseRequiredFilePath(attachmentUri); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachmentUri, uriRecord); + + std::string dstAttachmentDir = outputDir; + std::string relPath = FileSystemUtils::getBasename(attachmentFilePath); + const std::map::const_iterator iterParam = + uriRecord.parameters.find("relPath"); + if (iterParam != uriRecord.parameters.end()) { + relPath = iterParam->second; + const std::string tmpPath = FileSystemUtils::buildPath(outputDir, relPath); + dstAttachmentDir = FileSystemUtils::getDirname(tmpPath); + } else { + CAF_CM_LOG_DEBUG_VA1("Attachment URI does not contain relPath - %s", attachmentUri.c_str()); + } + + if (!FileSystemUtils::doesDirectoryExist(dstAttachmentDir)) { + FileSystemUtils::createDirectory(dstAttachmentDir); + } + + const std::string dstAttachmentFilePath = FileSystemUtils::buildPath(outputDir, + relPath); + + if (FileSystemUtils::doesFileExist(dstAttachmentFilePath)) { + CAF_CM_LOG_WARN_VA2("Destination file already exists... not copying \"%s\" to \"%s\"", + attachmentFilePath.c_str(), dstAttachmentFilePath.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA2("Copying attachment from \"%s\" to \"%s\"", + attachmentFilePath.c_str(), dstAttachmentFilePath.c_str()); + FileSystemUtils::copyFile(attachmentFilePath, dstAttachmentFilePath); + } + + std::string dstAttachmentUri = "file:///" + dstAttachmentFilePath; + if (!relPath.empty()) { + dstAttachmentUri += "?relPath=" + relPath; + } + + SmartPtrCAttachmentDoc dstAttachment; + dstAttachment.CreateInstance(); + dstAttachment->initialize(attachment->getName(), attachment->getType(), + dstAttachmentUri, false, attachment->getCmsPolicy()); + + attachmentCollectionInnerRc.push_back(dstAttachment); + } + + attachmentCollectionRc.CreateInstance(); + attachmentCollectionRc->initialize(attachmentCollectionInnerRc, + std::deque()); + } + CAF_CM_EXIT; + + return attachmentCollectionRc; +} + +CPackageInstaller::SmartPtrCInstallPackageMatch CPackageInstaller::matchInstallPackageSpec( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "matchInstallPackageSpec"); + + SmartPtrCInstallPackageMatch installPackageMatch; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + + installPackageMatch.CreateInstance(); + installPackageMatch->_matchStatus = CInstallUtils::MATCH_NOTEQUAL; + + const SmartPtrCInstallPackageSpecCollection installPackageSpecCollection = + readInstallPackageSpecs(); + + if (!installPackageSpecCollection.IsNull()) { + const std::string packageNamespace = installPackageSpec->getPackageNamespace(); + const std::string packageName = installPackageSpec->getPackageName(); + const std::string packageVersion = installPackageSpec->getPackageVersion(); + + for (TConstIterator > + installPackageSpecIter(*installPackageSpecCollection); installPackageSpecIter; installPackageSpecIter++) { + const SmartPtrCInstallPackageSpecDoc installPackageSpecCur = + *installPackageSpecIter; + + const std::string packageNamespaceCur = + installPackageSpecCur->getPackageNamespace(); + const std::string packageNameCur = installPackageSpecCur->getPackageName(); + + if ((packageNamespace.compare(packageNamespaceCur) == 0) && (packageName.compare( + packageNameCur) == 0)) { + const std::string packageVersionCur = + installPackageSpecCur->getPackageVersion(); + installPackageMatch->_matchStatus = CInstallUtils::compareVersions( + packageVersion, packageVersionCur); + if (installPackageMatch->_matchStatus != CInstallUtils::MATCH_NOTEQUAL) { + installPackageMatch->_matchedInstallPackageSpec = installPackageSpecCur; + break; + } + } else { + logDebug("Package did not match", installPackageSpec, installPackageSpecCur); + } + } + } + } + CAF_CM_EXIT; + + return installPackageMatch; +} + +CPackageInstaller::SmartPtrCInstallPackageSpecCollection CPackageInstaller::readInstallPackageSpecs() { + CAF_CM_STATIC_FUNC_LOG_ONLY("CPackageInstaller", "readInstallPackageSpecs"); + + SmartPtrCInstallPackageSpecCollection installPackageSpecCollection; + + CAF_CM_ENTER + { + const std::string installPackageDir = CPathBuilder::calcInstallPackageDir(); + + const std::deque installPackageSpecFiles = + FileSystemUtils::findOptionalFiles(installPackageDir, _sInstallPackageSpecFilename); + + if (installPackageSpecFiles.empty()) { + CAF_CM_LOG_WARN_VA2("No package install specs found - dir: %s, filename: %s", + installPackageDir.c_str(), _sInstallPackageSpecFilename); + } else { + installPackageSpecCollection.CreateInstance(); + + for (TConstIterator > installPackageSpecFileIter( + installPackageSpecFiles); installPackageSpecFileIter; installPackageSpecFileIter++) { + const std::string installPackageSpecFilePath = *installPackageSpecFileIter; + + CAF_CM_LOG_DEBUG_VA1("Found package install spec - %s", + installPackageSpecFilePath.c_str()); + + const SmartPtrCInstallPackageSpecDoc installPackageSpec = + XmlRoots::parseInstallPackageSpecFromFile(installPackageSpecFilePath); + + installPackageSpecCollection->push_back(installPackageSpec); + } + } + } + CAF_CM_EXIT; + + return installPackageSpecCollection; +} + +uint32 CPackageInstaller::countPackageReferences( + const SmartPtrCInstallPackageSpecDoc& installPackageSpec, + const std::deque& installProviderSpecCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "countPackageReferences"); + + uint32 refCnt = 0; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec); + // installProviderSpecCollection is optional + + const std::string packageNamespace = installPackageSpec->getPackageNamespace(); + const std::string packageName = installPackageSpec->getPackageName(); + const std::string packageVersion = installPackageSpec->getPackageVersion(); + + for (TConstIterator > installProviderSpecIter( + installProviderSpecCollection); installProviderSpecIter; installProviderSpecIter++) { + const SmartPtrCInstallProviderSpecDoc installProviderSpec = *installProviderSpecIter; + + const std::deque minPackageElemCollection = + installProviderSpec->getPackageCollection(); + for (TConstIterator > + minPackageElemIter(minPackageElemCollection); minPackageElemIter; minPackageElemIter++) { + const SmartPtrCMinPackageElemDoc minPackageElem = + *minPackageElemIter; + + const std::string packageNamespaceCur = minPackageElem->getPackageNamespace(); + const std::string packageNameCur = minPackageElem->getPackageName(); + + if ((packageNamespace.compare(packageNamespaceCur) == 0) && (packageName.compare( + packageNameCur) == 0)) { + const std::string packageVersionCur = minPackageElem->getPackageVersion(); + const CInstallUtils::MATCH_STATUS matchStatus = + CInstallUtils::compareVersions(packageVersion, packageVersionCur); + if (matchStatus != CInstallUtils::MATCH_NOTEQUAL) { + refCnt++; + } + } + } + } + + CAF_CM_LOG_DEBUG_VA4("Package ref cnt - %s::%s::%s = %d", + packageNamespace.c_str(), packageName.c_str(), packageVersion.c_str(), refCnt); + } + CAF_CM_EXIT; + + return refCnt; +} + +void CPackageInstaller::logDebug( + const std::string& message, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec1, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec2) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "logDebug"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(message); + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec1); + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec2); + + const std::string fullMessage = message + " - %s::%s::%s, %s::%s::%s"; + CAF_CM_LOG_DEBUG_VA6(fullMessage.c_str(), + installPackageSpec1->getPackageNamespace().c_str(), + installPackageSpec1->getPackageName().c_str(), + installPackageSpec1->getPackageVersion().c_str(), + installPackageSpec2->getPackageNamespace().c_str(), + installPackageSpec2->getPackageName().c_str(), + installPackageSpec2->getPackageVersion().c_str()); + } + CAF_CM_EXIT; +} + +void CPackageInstaller::logWarn( + const std::string& message, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec1, + const SmartPtrCInstallPackageSpecDoc& installPackageSpec2) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "logWarn"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(message); + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec1); + CAF_CM_VALIDATE_SMARTPTR(installPackageSpec2); + + const std::string fullMessage = message + " - %s::%s::%s, %s::%s::%s"; + CAF_CM_LOG_DEBUG_VA6(fullMessage.c_str(), + installPackageSpec1->getPackageNamespace().c_str(), + installPackageSpec1->getPackageName().c_str(), + installPackageSpec1->getPackageVersion().c_str(), + installPackageSpec2->getPackageNamespace().c_str(), + installPackageSpec2->getPackageName().c_str(), + installPackageSpec2->getPackageVersion().c_str()); + } + CAF_CM_EXIT; +} + +void CPackageInstaller::cleanupPackage( + const SmartPtrCInstallPackageMatch& installPackageMatch) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPackageInstaller", "cleanupPackage"); + CAF_CM_VALIDATE_SMARTPTR(installPackageMatch); + + const std::string installPackageDir = CPathBuilder::calcInstallPackageDir( + installPackageMatch->_matchedInstallPackageSpec->getPackageNamespace(), + installPackageMatch->_matchedInstallPackageSpec->getPackageName(), + installPackageMatch->_matchedInstallPackageSpec->getPackageVersion()); + CAF_CM_LOG_DEBUG_VA1("Removing package directory - %s", installPackageDir.c_str()); + FileSystemUtils::recursiveRemoveDirectory(installPackageDir); +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.cpp new file mode 100644 index 000000000..cd77651b5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.cpp @@ -0,0 +1,203 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CPathBuilder.h" + +using namespace Caf; + +std::string CPathBuilder::calcInstallProviderDir() { + std::string installProviderDir; + + CAF_CM_ENTER + { + const std::string installDir = getProviderHostConfigDir( + _sConfigInstallDir); + installProviderDir = FileSystemUtils::buildPath(installDir, "providers"); + + if (!FileSystemUtils::doesDirectoryExist(installProviderDir)) { + FileSystemUtils::createDirectory(installProviderDir); + } + } + CAF_CM_EXIT; + + return installProviderDir; +} + +std::string CPathBuilder::calcInstallPackageDir() { + std::string installPackageDir; + + CAF_CM_ENTER + { + const std::string installDir = getProviderHostConfigDir( + _sConfigInstallDir); + installPackageDir = FileSystemUtils::buildPath(installDir, "packages"); + + if (!FileSystemUtils::doesDirectoryExist(installPackageDir)) { + FileSystemUtils::createDirectory(installPackageDir); + } + } + CAF_CM_EXIT; + + return installPackageDir; +} + +std::string CPathBuilder::calcInstallProviderDir( + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "calcInstallProviderDir"); + + std::string installProviderDir; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(providerNamespace); + CAF_CM_VALIDATE_STRING(providerName); + CAF_CM_VALIDATE_STRING(providerVersion); + + const std::string installDir = getProviderHostConfigDir( + _sConfigInstallDir); + const std::string providersDir = FileSystemUtils::buildPath(installDir, "providers"); + installProviderDir = calcDir(providerNamespace, providerName, providerVersion, + providersDir); + + if (!FileSystemUtils::doesDirectoryExist(installProviderDir)) { + FileSystemUtils::createDirectory(installProviderDir); + } + } + CAF_CM_EXIT; + + return installProviderDir; +} + +std::string CPathBuilder::calcInstallPackageDir( + const std::string& packageNamespace, + const std::string& packageName, + const std::string& packageVersion) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "calcInstallPackageDir"); + + std::string installPackageDir; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(packageNamespace); + CAF_CM_VALIDATE_STRING(packageName); + CAF_CM_VALIDATE_STRING(packageVersion); + + const std::string installDir = getProviderHostConfigDir( + _sConfigInstallDir); + const std::string packagesDir = FileSystemUtils::buildPath(installDir, "packages"); + installPackageDir = calcDir(packageNamespace, packageName, packageVersion, packagesDir); + + if (!FileSystemUtils::doesDirectoryExist(installPackageDir)) { + FileSystemUtils::createDirectory(installPackageDir); + } + } + CAF_CM_EXIT; + + return installPackageDir; +} + +std::string CPathBuilder::calcProviderSchemaCacheDir( + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "calcProviderSchemaCacheDir"); + + std::string providerSchemaCacheDir; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(providerNamespace); + CAF_CM_VALIDATE_STRING(providerName); + CAF_CM_VALIDATE_STRING(providerVersion); + + const std::string schemaCacheDir = getProviderHostConfigDir( + _sConfigSchemaCacheDir); + providerSchemaCacheDir = calcDir(providerNamespace, providerName, providerVersion, + schemaCacheDir); + } + CAF_CM_EXIT; + + return providerSchemaCacheDir; +} + +std::string CPathBuilder::calcDir( + const std::string& thisNamespace, + const std::string& thisName, + const std::string& thisVersion, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "calcDir"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(thisNamespace); + CAF_CM_VALIDATE_STRING(thisName); + CAF_CM_VALIDATE_STRING(thisVersion); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string dirName = thisNamespace + "_" + thisName + "_" + thisVersion; + rc = FileSystemUtils::buildPath(outputDir, dirName); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CPathBuilder::getRootConfigDir(const std::string& configName) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "getRootConfigDir"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(configName); + + const std::string configDir = AppConfigUtils::getRequiredString(configName); + const std::string configDirExp = CStringUtils::expandEnv(configDir); + if (!FileSystemUtils::doesDirectoryExist(configDirExp)) { + CAF_CM_LOG_DEBUG_VA2( + "AppConfig directory does not exist... Creating - name: %s, dir: %s", + configName.c_str(), configDirExp.c_str()); + FileSystemUtils::createDirectory(configDirExp); + } + + rc = FileSystemUtils::normalizePathForPlatform(configDirExp); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CPathBuilder::getProviderHostConfigDir(const std::string& configName) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CPathBuilder", "getProviderHostConfigDir"); + + std::string rc; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(configName); + + const std::string configDir = AppConfigUtils::getRequiredString(_sProviderHostArea, + configName); + const std::string configDirExp = CStringUtils::expandEnv(configDir); + if (!FileSystemUtils::doesDirectoryExist(configDirExp)) { + CAF_CM_LOG_DEBUG_VA2( + "AppConfig directory does not exist... Creating - name: %s, dir: %s", + configName.c_str(), configDirExp.c_str()); + FileSystemUtils::createDirectory(configDirExp); + } + + rc = FileSystemUtils::normalizePathForPlatform(configDirExp); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.h new file mode 100644 index 000000000..4df2c4e6d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CPathBuilder.h @@ -0,0 +1,50 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CPathBuilder_h_ +#define CPathBuilder_h_ + +namespace Caf { + +class CPathBuilder { +public: + static std::string calcInstallPackageDir(); + + static std::string calcInstallProviderDir(); + + static std::string calcInstallProviderDir( + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion); + + static std::string calcInstallPackageDir( + const std::string& packageNamespace, + const std::string& packageName, + const std::string& packageVersion); + + static std::string calcProviderSchemaCacheDir( + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion); + + static std::string calcDir( + const std::string& thisNamespace, + const std::string& thisName, + const std::string& thisVersion, + const std::string& outputDir); + + static std::string getRootConfigDir(const std::string& configName); + + static std::string getProviderHostConfigDir(const std::string& configName); + +private: + CAF_CM_DECLARE_NOCREATE( CPathBuilder); +}; + +} + +#endif // #ifndef CPathBuilder_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CProviderInstaller.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CProviderInstaller.cpp new file mode 100644 index 000000000..91207e011 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/CProviderInstaller.cpp @@ -0,0 +1,411 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafInstallRequestXml/CafInstallRequestXmlRoots.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafInstallRequestDoc/CFullPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderSpecDoc.h" +#include "Doc/CafInstallRequestDoc/CMinPackageElemDoc.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" +#include "CProviderInstaller.h" +#include "CPackageInstaller.h" + +using namespace Caf; + +void CProviderInstaller::installProvider( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "installProvider"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderJob); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + CAF_CM_VALIDATE_STRING(outputDir); + + const SmartPtrCInstallProviderSpecDoc installProviderSpec = createInstallProviderSpec( + installProviderJob); + + const SmartPtrCInstallProviderMatch installProviderMatch = matchInstallProviderSpec( + installProviderSpec); + + switch (installProviderMatch->_matchStatus) { + case CInstallUtils::MATCH_NOTEQUAL: { + installProviderLow(installProviderJob, attachmentCollection, outputDir); + } + break; + case CInstallUtils::MATCH_VERSION_EQUAL: { + logWarn("Provider already installed", installProviderSpec, + installProviderMatch->_matchedInstallProviderSpec); + } + break; + case CInstallUtils::MATCH_VERSION_LESS: { + logWarn("More recent provider already installed", installProviderSpec, + installProviderMatch->_matchedInstallProviderSpec); + } + break; + case CInstallUtils::MATCH_VERSION_GREATER: { + logWarn("Upgrading provider", installProviderSpec, + installProviderMatch->_matchedInstallProviderSpec); + + uninstallProviderLow(installProviderMatch->_matchedInstallProviderSpec, outputDir); + installProviderLow(installProviderJob, attachmentCollection, outputDir); + } + break; + } + } + CAF_CM_EXIT; +} + +void CProviderInstaller::uninstallProvider( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "uninstallProvider"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(uninstallProviderJob); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string installProviderDir = CPathBuilder::calcInstallProviderDir( + uninstallProviderJob->getProviderNamespace(), uninstallProviderJob->getProviderName(), + uninstallProviderJob->getProviderVersion()); + const std::string installProviderSpecPath = FileSystemUtils::buildPath(installProviderDir, + _sInstallProviderSpecFilename); + + if (FileSystemUtils::doesFileExist(installProviderSpecPath)) { + const SmartPtrCInstallProviderSpecDoc installProviderSpec = + XmlRoots::parseInstallProviderSpecFromFile(installProviderSpecPath); + + uninstallProviderLow(installProviderSpec, outputDir); + } else { + CAF_CM_LOG_INFO_VA1("Uninstall unnecessary... provider is not installed - %s", + calcProviderFqn(uninstallProviderJob).c_str()); + } + } + CAF_CM_EXIT; +} + +CProviderInstaller::SmartPtrCInstallProviderSpecCollection CProviderInstaller::readInstallProviderSpecs() { + CAF_CM_STATIC_FUNC_LOG_ONLY("CProviderInstaller", "readInstallProviderSpecs"); + + SmartPtrCInstallProviderSpecCollection installProviderSpecCollection; + + CAF_CM_ENTER + { + const std::string installProviderDir = CPathBuilder::calcInstallProviderDir(); + + const std::deque installProviderSpecFiles = + FileSystemUtils::findOptionalFiles(installProviderDir, _sInstallProviderSpecFilename); + + if (installProviderSpecFiles.empty()) { + CAF_CM_LOG_WARN_VA2("No provider install specs found - dir: %s, filename: %s", + installProviderDir.c_str(), _sInstallProviderSpecFilename); + } else { + installProviderSpecCollection.CreateInstance(); + + for (TConstIterator > installProviderSpecFileIter( + installProviderSpecFiles); installProviderSpecFileIter; installProviderSpecFileIter++) { + const std::string installProviderSpecFilePath = *installProviderSpecFileIter; + + CAF_CM_LOG_DEBUG_VA1("Found provider install spec - %s", + installProviderSpecFilePath.c_str()); + + const SmartPtrCInstallProviderSpecDoc installProviderSpec = + XmlRoots::parseInstallProviderSpecFromFile(installProviderSpecFilePath); + + installProviderSpecCollection->push_back(installProviderSpec); + } + } + } + CAF_CM_EXIT; + + return installProviderSpecCollection; +} + +void CProviderInstaller::installProviderLow( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "installProviderLow"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderJob); + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::deque fullPackageElemCollection = + installProviderJob->getPackageCollection(); + + CPackageInstaller::installPackages(fullPackageElemCollection, attachmentCollection, + outputDir); + + const SmartPtrCInstallProviderSpecDoc uninstallProviderSpec = createInstallProviderSpec( + installProviderJob); + storeInstallProviderSpec(uninstallProviderSpec); + } + CAF_CM_EXIT; +} + +void CProviderInstaller::uninstallProviderLow( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "uninstallProviderLow"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::deque minPackageElemCollection = + installProviderSpec->getPackageCollection(); + + const SmartPtrCInstallProviderSpecCollection installProviderSpecCollection = + readInstallProviderSpecs(); + + std::deque installProviderSpecCollectionInner; + if (!installProviderSpecCollection.IsNull()) { + installProviderSpecCollectionInner = *installProviderSpecCollection; + } + + try { + CPackageInstaller::uninstallPackages(minPackageElemCollection, + installProviderSpecCollectionInner, outputDir); + } catch (ProcessFailedException* ex) { + cleanupProvider(installProviderSpec); + ex->throwSelf(); + } + + cleanupProvider(installProviderSpec); + } + CAF_CM_EXIT; +} + +void CProviderInstaller::storeInstallProviderSpec( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "storeInstallProviderSpec"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + + const std::string installProviderDir = CPathBuilder::calcInstallProviderDir( + installProviderSpec->getProviderNamespace(), installProviderSpec->getProviderName(), + installProviderSpec->getProviderVersion()); + + const std::string installProviderSpecPath = FileSystemUtils::buildPath(installProviderDir, + _sInstallProviderSpecFilename); + + XmlRoots::saveInstallProviderSpecToFile(installProviderSpec, installProviderSpecPath); + } + CAF_CM_EXIT; +} + +CProviderInstaller::SmartPtrCInstallProviderMatch CProviderInstaller::matchInstallProviderSpec( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "matchInstallProviderSpec"); + + SmartPtrCInstallProviderMatch installProviderMatch; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + + installProviderMatch.CreateInstance(); + installProviderMatch->_matchStatus = CInstallUtils::MATCH_NOTEQUAL; + + const SmartPtrCInstallProviderSpecCollection installProviderSpecCollection = + readInstallProviderSpecs(); + + if (!installProviderSpecCollection.IsNull()) { + const std::string providerNamespace = installProviderSpec->getProviderNamespace(); + const std::string providerName = installProviderSpec->getProviderName(); + const std::string providerVersion = installProviderSpec->getProviderVersion(); + + for (TConstIterator > + installProviderSpecIter(*installProviderSpecCollection); installProviderSpecIter; installProviderSpecIter++) { + const SmartPtrCInstallProviderSpecDoc installProviderSpecCur = + *installProviderSpecIter; + + const std::string providerNamespaceCur = + installProviderSpecCur->getProviderNamespace(); + const std::string providerNameCur = installProviderSpecCur->getProviderName(); + + if ((providerNamespace.compare(providerNamespaceCur) == 0) + && (providerName.compare(providerNameCur) == 0)) { + const std::string providerVersionCur = + installProviderSpecCur->getProviderVersion(); + installProviderMatch->_matchStatus = CInstallUtils::compareVersions( + providerVersion, providerVersionCur); + if (installProviderMatch->_matchStatus != CInstallUtils::MATCH_NOTEQUAL) { + installProviderMatch->_matchedInstallProviderSpec = installProviderSpecCur; + break; + } + } else { + logDebug("Provider did not match", installProviderSpec, installProviderSpecCur); + } + } + } + } + CAF_CM_EXIT; + + return installProviderMatch; +} + +SmartPtrCInstallProviderSpecDoc CProviderInstaller::createInstallProviderSpec( + const SmartPtrCInstallProviderJobDoc& installProviderJob) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "createInstallProviderSpec"); + + SmartPtrCInstallProviderSpecDoc installProviderSpec; + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_SMARTPTR(installProviderJob); + + const std::deque fullPackageElemCollection = + installProviderJob->getPackageCollection(); + + std::deque minPackageElemCollection; + for (TConstIterator > fullPackageElemIter( + fullPackageElemCollection); fullPackageElemIter; fullPackageElemIter++) { + const SmartPtrCFullPackageElemDoc fullPackageElem = *fullPackageElemIter; + + SmartPtrCMinPackageElemDoc minPackageElem; + minPackageElem.CreateInstance(); + minPackageElem->initialize(fullPackageElem->getIndex(), + fullPackageElem->getPackageNamespace(), fullPackageElem->getPackageName(), + fullPackageElem->getPackageVersion()); + + minPackageElemCollection.push_back(minPackageElem); + } + + installProviderSpec.CreateInstance(); + installProviderSpec->initialize(installProviderJob->getClientId(), + installProviderJob->getProviderNamespace(), installProviderJob->getProviderName(), + installProviderJob->getProviderVersion(), minPackageElemCollection); + } + CAF_CM_EXIT; + + return installProviderSpec; +} + +void CProviderInstaller::logDebug( + const std::string& message, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec1, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec2) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "logDebug"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(message); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec1); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec2); + + const std::string fullMessage = message + " - %s::%s::%s, %s::%s::%s"; + CAF_CM_LOG_DEBUG_VA6(fullMessage.c_str(), + installProviderSpec1->getProviderNamespace().c_str(), + installProviderSpec1->getProviderName().c_str(), + installProviderSpec1->getProviderVersion().c_str(), + installProviderSpec2->getProviderNamespace().c_str(), + installProviderSpec2->getProviderName().c_str(), + installProviderSpec2->getProviderVersion().c_str()); + } + CAF_CM_EXIT; +} + +void CProviderInstaller::logWarn( + const std::string& message, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec1, + const SmartPtrCInstallProviderSpecDoc& installProviderSpec2) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "logWarn"); + + CAF_CM_ENTER + { + CAF_CM_VALIDATE_STRING(message); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec1); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec2); + + const std::string fullMessage = message + " - %s::%s::%s, %s::%s::%s"; + CAF_CM_LOG_DEBUG_VA6(fullMessage.c_str(), + installProviderSpec1->getProviderNamespace().c_str(), + installProviderSpec1->getProviderName().c_str(), + installProviderSpec1->getProviderVersion().c_str(), + installProviderSpec2->getProviderNamespace().c_str(), + installProviderSpec2->getProviderName().c_str(), + installProviderSpec2->getProviderVersion().c_str()); + } + CAF_CM_EXIT; +} + +void CProviderInstaller::cleanupProvider( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "cleanupProvider"); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + + const std::string providerNamespace = installProviderSpec->getProviderNamespace(); + const std::string providerName = installProviderSpec->getProviderName(); + const std::string providerVersion = installProviderSpec->getProviderVersion(); + const std::string providerFqn = calcProviderFqn(installProviderSpec); + + const std::string installProviderDir = CPathBuilder::calcInstallProviderDir( + providerNamespace, providerName, providerVersion); + if (FileSystemUtils::doesDirectoryExist(installProviderDir)) { + FileSystemUtils::recursiveRemoveDirectory(installProviderDir); + } + + const std::string providerSchemaCacheDir = CPathBuilder::calcProviderSchemaCacheDir( + providerNamespace, providerName, providerVersion); + if (FileSystemUtils::doesDirectoryExist(providerSchemaCacheDir)) { + FileSystemUtils::recursiveRemoveDirectory(providerSchemaCacheDir); + } + + const std::string providerRegDir = AppConfigUtils::getRequiredString( + _sProviderHostArea, _sConfigProviderRegDir); + const std::string providerRegDirExp = CStringUtils::expandEnv(providerRegDir); + const std::string providerRegFilename = providerFqn + ".xml"; + const std::string providerRegPath = FileSystemUtils::buildPath(providerRegDirExp, + providerRegFilename); + if (FileSystemUtils::doesFileExist(providerRegPath)) { + FileSystemUtils::removeFile(providerRegPath); + } + + const std::string invokersDir = AppConfigUtils::getRequiredString( + _sProviderHostArea, _sConfigInvokersDir); + const std::string invokersDirExp = CStringUtils::expandEnv(invokersDir); + const std::string invokersFilename = providerFqn; + const std::string invokersPath = FileSystemUtils::buildPath(invokersDirExp, + invokersFilename); + if (FileSystemUtils::doesFileExist(invokersPath)) { + FileSystemUtils::removeFile(invokersPath); + } +} + +std::string CProviderInstaller::calcProviderFqn( + const SmartPtrCInstallProviderSpecDoc& installProviderSpec) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "calcProviderFqn"); + CAF_CM_VALIDATE_SMARTPTR(installProviderSpec); + + return installProviderSpec->getProviderNamespace() + "_" + + installProviderSpec->getProviderName() + "_" + + installProviderSpec->getProviderVersion(); +} + +std::string CProviderInstaller::calcProviderFqn( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CProviderInstaller", "calcProviderFqn"); + CAF_CM_VALIDATE_SMARTPTR(uninstallProviderJob); + + return uninstallProviderJob->getProviderNamespace() + "_" + + uninstallProviderJob->getProviderName() + "_" + + uninstallProviderJob->getProviderVersion(); +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/InstallProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/InstallProvider.cpp new file mode 100644 index 000000000..b6fd112be --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/InstallProvider.cpp @@ -0,0 +1,33 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf; + +namespace Caf { + const char* _sInstallPackageSpecFilename = "installPackageSpec.xml"; + const char* _sInstallProviderSpecFilename = "installProviderSpec.xml"; +} + +int main(int csz, char* asz[]) { + CAF_CM_STATIC_FUNC_LOG("InstallProvider", "main"); + + int rc = 0; + try { + CInstallProvider provider; + rc = CProviderDriver::processProviderCommandline(provider, csz, asz); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + rc = CAF_CM_ISEXCEPTION ? 1 : rc; + CAF_CM_CLEAREXCEPTION; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/stdafx.h b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/stdafx.h new file mode 100644 index 000000000..1fd74fb76 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Install_Provider/src/stdafx.h @@ -0,0 +1,31 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include +#include + +namespace Caf { + extern const char* _sInstallPackageSpecFilename; + extern const char* _sInstallProviderSpecFilename; +} + + +#include "CInstallUtils.h" +#include "CPathBuilder.h" + +#include "CPackageExecutor.h" + +#include "CInstallProvider.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/Makefile.am b/open-vm-tools/common-agent/Cpp/InternalProviders/Makefile.am new file mode 100644 index 000000000..e9cb4eddf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/Makefile.am @@ -0,0 +1,113 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +AUTOMAKE_OPTIONS = subdir-objects +cafbindir = @CAF_PME_BIN_DIR@ +cafbin_PROGRAMS = + +cafbin_PROGRAMS += ConfigProvider + +ConfigProvider_SOURCES= +ConfigProvider_SOURCES += Config_Provider/src/CConfigProvider.cpp +ConfigProvider_SOURCES += Config_Provider/src/CIniFileWithoutSection.cpp +ConfigProvider_SOURCES += Config_Provider/src/ConfigProvider.cpp + +ConfigProvider_CPPFLAGS = +ConfigProvider_CPPFLAGS += @GLIB2_CPPFLAGS@ +ConfigProvider_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +ConfigProvider_CPPFLAGS += @SSL_CPPFLAGS@ +ConfigProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +ConfigProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +ConfigProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include +ConfigProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/InternalProviders/Config_Provider/include +ConfigProvider_LDADD = +ConfigProvider_LDADD += @GLIB2_LIBS@ +ConfigProvider_LDADD += @LOG4CPP_LIBS@ +ConfigProvider_LDADD += -ldl +ConfigProvider_LDADD += ../Framework/libFramework.la +ConfigProvider_LDADD += ../ProviderFx/libProviderFx.la + +cafbin_PROGRAMS += InstallProvider + +InstallProvider_SOURCES= +InstallProvider_SOURCES += Install_Provider/src/CInstallProvider.cpp +InstallProvider_SOURCES += Install_Provider/src/CInstallUtils.cpp +InstallProvider_SOURCES += Install_Provider/src/CPackageExecutor.cpp +InstallProvider_SOURCES += Install_Provider/src/CPackageInstaller.cpp +InstallProvider_SOURCES += Install_Provider/src/CPathBuilder.cpp +InstallProvider_SOURCES += Install_Provider/src/CProviderInstaller.cpp +InstallProvider_SOURCES += Install_Provider/src/InstallProvider.cpp + +InstallProvider_CPPFLAGS = +InstallProvider_CPPFLAGS += @GLIB2_CPPFLAGS@ +InstallProvider_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +InstallProvider_CPPFLAGS += @SSL_CPPFLAGS@ +InstallProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +InstallProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +InstallProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include +InstallProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/InternalProviders/Install_Provider/include +InstallProvider_LDADD = +InstallProvider_LDADD += @GLIB2_LIBS@ +InstallProvider_LDADD += @LOG4CPP_LIBS@ +InstallProvider_LDADD += -ldl +InstallProvider_LDADD += ../Framework/libFramework.la +InstallProvider_LDADD += ../ProviderFx/libProviderFx.la + +cafbin_PROGRAMS += RemoteCommandProvider + +RemoteCommandProvider_SOURCES= +RemoteCommandProvider_SOURCES += RemoteCommand_Provider/src/CRemoteCommandProvider.cpp +RemoteCommandProvider_SOURCES += RemoteCommand_Provider/src/RemoteCommandProvider.cpp + +RemoteCommandProvider_CPPFLAGS = +RemoteCommandProvider_CPPFLAGS += @GLIB2_CPPFLAGS@ +RemoteCommandProvider_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +RemoteCommandProvider_CPPFLAGS += @SSL_CPPFLAGS@ +RemoteCommandProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +RemoteCommandProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +RemoteCommandProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include +RemoteCommandProvider_LDADD = +RemoteCommandProvider_LDADD += @GLIB2_LIBS@ +RemoteCommandProvider_LDADD += @LOG4CPP_LIBS@ +RemoteCommandProvider_LDADD += -ldl +RemoteCommandProvider_LDADD += ../Framework/libFramework.la +RemoteCommandProvider_LDADD += ../ProviderFx/libProviderFx.la + +cafbin_PROGRAMS += TestInfraProvider + +TestInfraProvider_SOURCES= +TestInfraProvider_SOURCES += TestInfra_Provider/src/CTestInfraProvider.cpp +TestInfraProvider_SOURCES += TestInfra_Provider/src/TestInfraProvider.cpp + +TestInfraProvider_CPPFLAGS = +TestInfraProvider_CPPFLAGS += @GLIB2_CPPFLAGS@ +TestInfraProvider_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +TestInfraProvider_CPPFLAGS += @SSL_CPPFLAGS@ +TestInfraProvider_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +TestInfraProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +TestInfraProvider_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include +TestInfraProvider_LDADD = +TestInfraProvider_LDADD += @GLIB2_LIBS@ +TestInfraProvider_LDADD += @LOG4CPP_LIBS@ +TestInfraProvider_LDADD += -ldl +TestInfraProvider_LDADD += ../Framework/libFramework.la +TestInfraProvider_LDADD += ../ProviderFx/libProviderFx.la + diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.cpp new file mode 100644 index 000000000..5d1031f22 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.cpp @@ -0,0 +1,195 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" +#include "Exception/CCafException.h" +#include "CRemoteCommandProvider.h" +#include "IProviderRequest.h" + +using namespace Caf; + +CRemoteCommandProvider::CRemoteCommandProvider() : + CAF_CM_INIT_LOG("CRemoteCommandProvider") { +} + +CRemoteCommandProvider::~CRemoteCommandProvider() { +} + +const SmartPtrCSchemaDoc CRemoteCommandProvider::getSchema() const { + std::deque m1Params; + m1Params.push_back(CProviderDocHelper::createMethodParameter("scriptAttachmentName", PARAMETER_STRING, false)); + m1Params.push_back(CProviderDocHelper::createMethodParameter("scriptParameters", PARAMETER_STRING, false)); + m1Params.push_back(CProviderDocHelper::createMethodParameter("attachmentNames", PARAMETER_STRING, false)); + + std::deque m2Params; + m2Params.push_back(CProviderDocHelper::createMethodParameter("inlineScript", PARAMETER_STRING, false)); + m2Params.push_back(CProviderDocHelper::createMethodParameter("scriptParameters", PARAMETER_STRING, true, true)); + m2Params.push_back(CProviderDocHelper::createMethodParameter("attachmentNames", PARAMETER_STRING, true, true)); + + std::deque methods; + methods.push_back(CProviderDocHelper::createMethod("executeScript", m1Params)); + methods.push_back(CProviderDocHelper::createMethod("executeInlineScript", m2Params)); + + std::deque actionClasses; + actionClasses.push_back( + CProviderDocHelper::createActionClass( + "caf", + "RemoteCommandActions", + "1.0.0", + SmartPtrCCollectMethodDoc(), + methods)); + + return CProviderDocHelper::createSchema(std::deque(), actionClasses); +} + +void CRemoteCommandProvider::collect(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("collect"); + + CAF_CM_EXCEPTIONEX_VA0(UnsupportedOperationException, E_NOTIMPL, + "Collect not implemented for Remote Commands") +} + +void CRemoteCommandProvider::invoke(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("invoke"); + + SmartPtrCProviderInvokeOperationDoc doc = request.getInvokeOperations(); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCOperationDoc operation = doc->getOperation(); + const std::string operationName = operation->getName(); + + const SmartPtrCParameterCollectionDoc parameterCollection = + operation->getParameterCollection(); + + const std::string outputDir = doc->getOutputDir(); + const std::string scriptResultsDir = + FileSystemUtils::buildPath(outputDir, "scriptResults"); + if (! FileSystemUtils::doesDirectoryExist(scriptResultsDir)) { + FileSystemUtils::createDirectory(scriptResultsDir); + } + + const std::deque scriptParameters = + ParameterUtils::findOptionalParameterAsStringCollection("scriptParameters", + parameterCollection); + const std::deque attachmentNames = + ParameterUtils::findOptionalParameterAsStringCollection("attachmentNames", + parameterCollection); + + const std::string attachmentUris = createAttachmentUris( + attachmentNames, request.getAttachments()); + + std::string scriptPath; + if (operationName.compare("executeScript") == 0) { + const std::string scriptAttachmentName = + ParameterUtils::findRequiredParameterAsString("scriptAttachmentName", + parameterCollection); + + SmartPtrCAttachmentDoc scriptAttachment = AttachmentUtils::findRequiredAttachment( + scriptAttachmentName, request.getAttachments()); + CAF_CM_VALIDATE_BOOL(scriptAttachment->getIsReference() == FALSE); + const std::string attachmentUri = scriptAttachment->getUri(); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachmentUri, uriRecord); + + CAF_CM_LOG_DEBUG_VA3("Parsed URI - Uri: %s, protocol: %s, address: %s", + attachmentUri.c_str(), uriRecord.protocol.c_str(), + uriRecord.address.c_str()); + + CAF_CM_VALIDATE_BOOL(uriRecord.protocol.compare("file") == 0); + UriUtils::SFileUriRecord scriptFileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, scriptFileUriRecord); + scriptPath = scriptFileUriRecord.path; + } else if (operationName.compare("executeInlineScript") == 0) { + const std::string inlineScript = + ParameterUtils::findRequiredParameterAsString("inlineScript", + parameterCollection); + +#ifdef WIN32 + scriptPath = FileSystemUtils::buildPath(outputDir, "script.bat"); +#else + scriptPath = FileSystemUtils::buildPath(outputDir, "_script_"); +#endif + FileSystemUtils::saveTextFile(scriptPath, inlineScript); + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Invalid operation name (must be \'executeScript\' or \'executeInlineScript\') - %s", + operationName.c_str()) + } + + FileSystemUtils::chmod(scriptPath); + executeScript(scriptPath, scriptResultsDir, scriptParameters, attachmentUris); +} + +void CRemoteCommandProvider::executeScript( + const std::string& scriptPath, + const std::string& scriptResultsDir, + const std::deque& scriptParameters, + const std::string& attachmentUris) const { + CAF_CM_FUNCNAME_VALIDATE("executeScript"); + CAF_CM_VALIDATE_STRING(scriptPath); + CAF_CM_VALIDATE_STRING(scriptResultsDir); + // scriptParameters are optional + // attachmentUris are optional + + Cdeqstr argv; + argv.push_back(scriptPath); + argv.push_back("-o"); + argv.push_back(scriptResultsDir); + if (! attachmentUris.empty()) { + argv.push_back("-u"); + argv.push_back(attachmentUris); + } + if (! scriptParameters.empty()) { + for(TConstIterator scriptParameterIter(scriptParameters); + scriptParameterIter; scriptParameterIter++) { + argv.push_back(*scriptParameterIter); + } + } + + const std::string stdoutPath = FileSystemUtils::buildPath( + scriptResultsDir, _sStdoutFilename); + const std::string stderrPath = FileSystemUtils::buildPath( + scriptResultsDir, _sStderrFilename); + + ProcessUtils::runSyncToFiles(argv, stdoutPath, stderrPath); + +} + +std::string CRemoteCommandProvider::createAttachmentUris( + const std::deque& attachmentNames, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection) const { + CAF_CM_FUNCNAME_VALIDATE("createAttachmentUris"); + + std::string rc; + if (! attachmentNames.empty()) { + CAF_CM_VALIDATE_SMARTPTR(attachmentCollection); + + rc += "\""; + for(TConstIterator attachmentNameIter(attachmentNames); + attachmentNameIter; attachmentNameIter++) { + const std::string attachmentName = *attachmentNameIter; + const SmartPtrCAttachmentDoc attachment = + AttachmentUtils::findRequiredAttachment( + attachmentName, attachmentCollection); + rc += attachment->getName() + "^" + attachment->getUri() + "|"; + } + rc += "\""; + } + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.h b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.h new file mode 100644 index 000000000..a7e3c850b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/CRemoteCommandProvider.h @@ -0,0 +1,63 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CRemoteCommandProvider_h_ +#define CRemoteCommandProvider_h_ + + +#include "IInvokedProvider.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CRemoteCommandProvider : public IInvokedProvider { +public: + CRemoteCommandProvider(); + virtual ~CRemoteCommandProvider(); + +public: // IInvokedProvider + const std::string getProviderNamespace() const { + return "caf"; + } + + const std::string getProviderName() const { + return "RemoteCommandProvider"; + } + + const std::string getProviderVersion() const { + return "1.0.0"; + } + + const SmartPtrCSchemaDoc getSchema() const; + + void collect(const IProviderRequest& request, IProviderResponse& response) const; + + void invoke(const IProviderRequest& request, IProviderResponse& response) const; + +private: + void executeScript( + const std::string& script, + const std::string& scriptResultsDir, + const std::deque& scriptParameters, + const std::string& attachmentUris) const; + + std::string createAttachmentUris( + const std::deque& attachmentNamesStr, + const SmartPtrCAttachmentCollectionDoc& attachmentCollection) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CRemoteCommandProvider); +}; + +} + +#endif // #ifndef CRemoteCommandProvider_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/RemoteCommandProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/RemoteCommandProvider.cpp new file mode 100644 index 000000000..b0a4635c4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/RemoteCommandProvider.cpp @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf; + +int main(int csz, char* asz[]) { + CAF_CM_STATIC_FUNC_LOG("RemoteCommandProvider", "main"); + + int rc = 0; + try { + CRemoteCommandProvider provider; + rc = CProviderDriver::processProviderCommandline(provider, csz, asz); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + rc = CAF_CM_ISEXCEPTION ? 1 : rc; + CAF_CM_CLEAREXCEPTION; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/stdafx.h b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/stdafx.h new file mode 100644 index 000000000..2b77904af --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/RemoteCommand_Provider/src/stdafx.h @@ -0,0 +1,19 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include + +#include "CRemoteCommandProvider.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.cpp new file mode 100644 index 000000000..74802974f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.cpp @@ -0,0 +1,150 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" +#include "Exception/CCafException.h" +#include "CTestInfraProvider.h" +#include "IProviderResponse.h" +#include "IProviderRequest.h" + +using namespace Caf; + +CTestInfraProvider::CTestInfraProvider() : + CAF_CM_INIT_LOG("CTestInfraProvider") { +} + +CTestInfraProvider::~CTestInfraProvider() { +} + +const SmartPtrCSchemaDoc CTestInfraProvider::getSchema() const { + std::deque dc1Props; + dc1Props.push_back(CProviderDocHelper::createClassProperty("name", PROPERTY_STRING, true)); + dc1Props.push_back(CProviderDocHelper::createClassProperty("value", PROPERTY_STRING, true)); + + std::deque dataClasses; + dataClasses.push_back(CProviderDocHelper::createDataClass("cafTestInfra", "TestDataClass", "1.0.0", dc1Props)); + + std::deque m1Params; + m1Params.push_back(CProviderDocHelper::createMethodParameter("requestAttachmentName", PARAMETER_STRING, false)); + + std::deque m2Params; + m2Params.push_back(CProviderDocHelper::createMethodParameter("param1", PARAMETER_STRING, false)); + m2Params.push_back(CProviderDocHelper::createMethodParameter("param2", PARAMETER_STRING, false)); + + std::deque methods; + methods.push_back(CProviderDocHelper::createMethod("echoRequest", m1Params)); + methods.push_back(CProviderDocHelper::createMethod("testMethod", m2Params)); + + std::deque actionClasses; + actionClasses.push_back( + CProviderDocHelper::createActionClass( + "cafTestInfra", + "TestActionClass", + "1.0.0", + CProviderDocHelper::createCollectMethod("collectInstances"), + methods)); + + return CProviderDocHelper::createSchema(dataClasses, actionClasses); +} + +void CTestInfraProvider::collect(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_ENTER { + const SmartPtrCDataClassInstanceDoc dataClassInstance = + createDataClassInstance("testName", "testValue"); + response.addInstance(dataClassInstance); + } + CAF_CM_EXIT; +} + +void CTestInfraProvider::invoke(const IProviderRequest& request, IProviderResponse& response) const { + CAF_CM_FUNCNAME("invoke"); + + CAF_CM_ENTER { + SmartPtrCProviderInvokeOperationDoc doc = request.getInvokeOperations(); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCOperationDoc operation = doc->getOperation(); + const std::string operationName = operation->getName(); + const SmartPtrCParameterCollectionDoc parameterCollection = + operation->getParameterCollection(); + + if (operationName.compare("testMethod") == 0) { + const std::string param1 = ParameterUtils::findRequiredParameterAsString( + "param1", parameterCollection); + const std::string param2Str = ParameterUtils::findRequiredParameterAsString( + "param2", parameterCollection); + const int32 param2 = CStringConv::fromString(param2Str); + + CAF_CM_LOG_DEBUG_VA2("testMethod() called - param1: %s, param2: %d", + param1.c_str(), param2); + } else if (operationName.compare("echoRequest") == 0) { + const std::string requestAttachmentName = ParameterUtils::findRequiredParameterAsString( + "requestAttachmentName", parameterCollection); + + SmartPtrCAttachmentCollectionDoc attachmentCollection = request.getAttachments(); + if (attachmentCollection.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Attachment collection is empty - %s", requestAttachmentName.c_str()) + } + + SmartPtrCAttachmentDoc attachmentFnd; + const std::deque attachmentCollectionInner = + attachmentCollection->getAttachment(); + for (TConstIterator > attachmentIter(attachmentCollectionInner); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + const std::string attachmentName = attachment->getName(); + if (attachmentName.compare(requestAttachmentName) == 0) { + attachmentFnd = attachment; + } + } + + if (attachmentFnd.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Request Attachment not found - %s", requestAttachmentName.c_str()) + } + + response.addAttachment(attachmentFnd); + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Invalid operation name (must be \'echoRequest\') - %s", operationName.c_str()) + } + } + CAF_CM_EXIT; +} + +SmartPtrCDataClassInstanceDoc CTestInfraProvider::createDataClassInstance( + const std::string& name, + const std::string& value) const { + CAF_CM_FUNCNAME_VALIDATE("createDataClassInstance"); + CAF_CM_VALIDATE_STRING(name); + CAF_CM_VALIDATE_STRING(value); + + std::deque dataClassProperties; + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("name", name)); + dataClassProperties.push_back(CProviderDocHelper::createDataClassProperty("value", value)); + + return CProviderDocHelper::createDataClassInstance( + "cafTestInfra", + "TestDataClass", + "1.0.0", + dataClassProperties); +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.h b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.h new file mode 100644 index 000000000..641143ef2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/CTestInfraProvider.h @@ -0,0 +1,57 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CTestInfraProvider_h_ +#define CTestInfraProvider_h_ + + +#include "IInvokedProvider.h" + +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CTestInfraProvider : public IInvokedProvider { +public: + CTestInfraProvider(); + virtual ~CTestInfraProvider(); + +public: // IInvokedProvider + const std::string getProviderNamespace() const { + return "cafTestInfra"; + } + + const std::string getProviderName() const { + return "CafTestInfraProvider"; + } + + const std::string getProviderVersion() const { + return "1.0.0"; + } + + const SmartPtrCSchemaDoc getSchema() const; + + void collect(const IProviderRequest& request, IProviderResponse& response) const; + + void invoke(const IProviderRequest& request, IProviderResponse& response) const; + +private: + SmartPtrCDataClassInstanceDoc createDataClassInstance( + const std::string& name, + const std::string& value) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CTestInfraProvider); +}; + +} + +#endif // #ifndef CTestInfraProvider_h_ diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/TestInfraProvider.cpp b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/TestInfraProvider.cpp new file mode 100644 index 000000000..86b4fa498 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/TestInfraProvider.cpp @@ -0,0 +1,28 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +using namespace Caf; + +int main(int csz, char* asz[]) { + CAF_CM_STATIC_FUNC_LOG("TestInfraProvider", "main"); + + int rc = 0; + try { + CTestInfraProvider provider; + rc = CProviderDriver::processProviderCommandline(provider, csz, asz); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + rc = CAF_CM_ISEXCEPTION ? 1 : rc; + CAF_CM_CLEAREXCEPTION; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/stdafx.h b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/stdafx.h new file mode 100644 index 000000000..02fc87d5c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/InternalProviders/TestInfra_Provider/src/stdafx.h @@ -0,0 +1,19 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include + +#include "../../TestInfra_Provider/src/CTestInfraProvider.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Makefile.am b/open-vm-tools/common-agent/Cpp/ManagementAgent/Makefile.am new file mode 100644 index 000000000..216226064 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Makefile.am @@ -0,0 +1,126 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +AUTOMAKE_OPTIONS = subdir-objects +subsysdir = @CAF_SUBSYS_DIR@ +subsys_LTLIBRARIES = +cafbindir = @CAF_PME_BIN_DIR@ +cafbin_PROGRAMS = +subsys_LTLIBRARIES += libMaIntegrationSubsys.la +libMaIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libMaIntegrationSubsys_la_SOURCES= +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CAttachmentRequestTransformer.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CCollectSchemaExecutor.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnv.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnvMerge.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnvMessageHandler.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CMonitorInboundChannelAdapterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CMonitorReadingMessageSource.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceMerge.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceMessageHandler.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceNamespaceDb.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CProviderExecutor.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CProviderExecutorRequest.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CResponseFactory.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CSchemaCacheManager.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CVersionTransformer.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/CVersionTransformerInstance.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/IntegrationObjects.cpp +libMaIntegrationSubsys_la_SOURCES += Subsystems/MaIntegration/src/MaIntegration.cpp + +libMaIntegrationSubsys_la_CPPFLAGS = +libMaIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libMaIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ + +libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Subsystems/CafIntegration/include +libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ManagementAgent/ManagementAgent/include +libMaIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include +libMaIntegrationSubsys_la_LIBADD = +libMaIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libMaIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libMaIntegrationSubsys_la_LIBADD += -ldl +libMaIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la + +libMaIntegrationSubsys_la_LDFLAGS += -shared + +cafbin_PROGRAMS += ManagementAgentHost + +ManagementAgentHost_SOURCES= +ManagementAgentHost_SOURCES += ManagementAgent/src/CManagementAgentHostWork.cpp +ManagementAgentHost_SOURCES += ManagementAgent/src/ManagementAgentHost.cpp +ManagementAgentHost_SOURCES += ManagementAgent/src/ManagementAgentHostMain.cpp + +ManagementAgentHost_CPPFLAGS = +ManagementAgentHost_CPPFLAGS += @GLIB2_CPPFLAGS@ +ManagementAgentHost_CPPFLAGS += @LOG4CPP_CPPFLAGS@ + +ManagementAgentHost_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +ManagementAgentHost_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ManagementAgent/ManagementAgent/include +ManagementAgentHost_LDADD = +ManagementAgentHost_LDADD += @GLIB2_LIBS@ +ManagementAgentHost_LDADD += @LOG4CPP_LIBS@ +ManagementAgentHost_LDADD += -ldl +ManagementAgentHost_LDADD += ../Framework/libFramework.la +ManagementAgentHost_LDADD += $(top_builddir)/vgauth/lib/libvgauth.la + +subsys_LTLIBRARIES += libVgAuthIntegrationSubsys.la +libVgAuthIntegrationSubsys_la_LDFLAGS = @CAF_SUBSYS_LDFLAGS@ + +libVgAuthIntegrationSubsys_la_SOURCES= +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CGuestAuthenticator.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CGuestAuthenticatorInstance.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CVgAuthContext.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CVgAuthError.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CVgAuthImpersonation.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CVgAuthInitializer.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/CVgAuthUserHandle.cpp +libVgAuthIntegrationSubsys_la_SOURCES += Subsystems/VgAuth/src/VgAuthIntegration.cpp + +libVgAuthIntegrationSubsys_la_CPPFLAGS = +libVgAuthIntegrationSubsys_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libVgAuthIntegrationSubsys_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/vgauth/public + +libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ManagementAgent/ManagementAgent/include +libVgAuthIntegrationSubsys_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include +libVgAuthIntegrationSubsys_la_LIBADD = +libVgAuthIntegrationSubsys_la_LIBADD += @GLIB2_LIBS@ +libVgAuthIntegrationSubsys_la_LIBADD += @LOG4CPP_LIBS@ +libVgAuthIntegrationSubsys_la_LIBADD += -ldl +libVgAuthIntegrationSubsys_la_LIBADD += ../Framework/libFramework.la +libVgAuthIntegrationSubsys_la_LIBADD += $(top_builddir)/vgauth/lib/libvgauth.la + +libVgAuthIntegrationSubsys_la_LDFLAGS += -shared + diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/include/CManagementAgentHostWork.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/include/CManagementAgentHostWork.h new file mode 100644 index 000000000..c7339dc41 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/include/CManagementAgentHostWork.h @@ -0,0 +1,44 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CManagementAgentHostWork_h_ +#define CManagementAgentHostWork_h_ + +#include "Common/IWork.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CManagementAgentHostWork : + public IWork +{ +public: + CManagementAgentHostWork(); + virtual ~CManagementAgentHostWork(); + +public: + void initialize(); + +public: // IWork + void doWork(); + void stopWork(); + +private: + bool _isInitialized; + bool _isWorking; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CManagementAgentHostWork); +}; + +CAF_DECLARE_SMART_POINTER(CManagementAgentHostWork); + +} + +#endif // #ifndef CManagementAgentHostWork_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CManagementAgentHostWork.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CManagementAgentHostWork.cpp new file mode 100644 index 000000000..910eac621 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/CManagementAgentHostWork.cpp @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: June 29, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Core/CIntegrationAppContext.h" +#include "CManagementAgentHostWork.h" +#include "Common/CLoggingUtils.h" + +using namespace Caf; + +CManagementAgentHostWork::CManagementAgentHostWork() : + _isInitialized(false), + _isWorking(false), + CAF_CM_INIT_LOG("CManagementAgentHostWork") { +} + +CManagementAgentHostWork::~CManagementAgentHostWork() { +} + +void CManagementAgentHostWork::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CManagementAgentHostWork::doWork() { + CAF_CM_FUNCNAME("doWork"); + + SmartPtrCIntegrationAppContext integrationAppContext; + + uint32 hostIntegrationTimeoutMs = 5000; + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _isWorking = true; + + CLoggingUtils::setStartupConfigFile( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogConfigFile), + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogDir)); + + const uint32 hostDelaySec = AppConfigUtils::getRequiredUint32( + _sManagementAgentArea, "host_delay_sec"); + hostIntegrationTimeoutMs = AppConfigUtils::getRequiredUint32( + _sManagementAgentArea, "host_integration_timeout_ms"); + + integrationAppContext.CreateInstance(); + integrationAppContext->initialize(hostIntegrationTimeoutMs); + + while (_isWorking) { + CThreadUtils::sleep(hostDelaySec * 1000); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + try { + if (! integrationAppContext.IsNull()) { + integrationAppContext->terminate(hostIntegrationTimeoutMs); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_THROWEXCEPTION; +} + +void CManagementAgentHostWork::stopWork() { + CAF_CM_FUNCNAME_VALIDATE("stopWork"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + _isWorking = false; + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHost.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHost.cpp new file mode 100644 index 000000000..e3d8d9536 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHost.cpp @@ -0,0 +1,16 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +extern "C" { + +BOOL APIENTRY DllMain(HMODULE hModule, uint32 dwReason, LPVOID lpReserved) { + return TRUE; +} + +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHostMain.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHostMain.cpp new file mode 100644 index 000000000..137c29277 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/ManagementAgentHostMain.cpp @@ -0,0 +1,190 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CManagementAgentHostWork.h" +#include "Common/CLoggingUtils.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#ifndef WIN32 +#include +#endif + +bool _gDaemonized = true; +bool _gSysLogInfos = false; +SmartPtrCManagementAgentHostWork _gManagementAgentHostWork; + +using namespace Caf; + +#ifndef WIN32 +extern "C" void TermHandler(int32 signum); +#endif + +int32 main(int32 argc, char** argv) { + HRESULT hr = CafInitialize::init(); + + if (hr != S_OK) { +#ifndef WIN32 + ::syslog(LOG_ERR, "ManagementAgentHost: CafInitialize::init() failed 0x%08X.", hr); +#endif + ::fprintf(stderr, "ManagementAgentHost: CafInitialize::init() failed 0x%08X\n", hr); + return 1; + } + + + SmartPtrIAppConfig appConfig; + try { + CafInitialize::serviceConfig(); + + std::string appConfigEnv; + CEnvironmentUtils::readEnvironmentVar("CAF_APPCONFIG", appConfigEnv); + if (appConfigEnv.empty()) { + Cdeqstr deqstr; + deqstr.push_back("cafenv-appconfig"); + deqstr.push_back("persistence-appconfig"); + deqstr.push_back("ma-appconfig"); + deqstr.push_back("custom-appconfig"); + appConfig = getAppConfig(deqstr); + } else { + appConfig = getAppConfig(); + } + } catch(CCafException *ex) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "ManagementAgentHost: getAppConfig() failed . %s", + ex->getFullMsg().c_str()); +#endif + ::fprintf( + stderr, + "ManagementAgentHost: getAppConfig() failed . %s\n", + ex->getFullMsg().c_str()); + ex->Release(); + } catch (std::exception ex) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "ManagementAgentHost: getAppConfig() failed . %s", + ex.what()); +#endif + ::fprintf( + stderr, + "ManagementAgentHost: getAppConfig() failed . %s\n", + ex.what()); + } catch (...) { +#ifndef WIN32 + ::syslog( + LOG_ERR, + "ManagementAgentHost: getAppConfig() failed . unknown exception"); +#endif + ::fprintf( + stderr, + "ManagementAgentHost: getAppConfig() failed . unknown exception\n"); + } + + CAF_CM_STATIC_FUNC_LOG("ManagementAgentHostMain", "main"); + int32 iRc = 0; + try { + if (!appConfig) { + CafInitialize::term(); + return 1; + } + + const std::string cafBinDir = AppConfigUtils::getRequiredString("globals", "bin_dir"); + g_setenv("CAF_BIN_DIR", cafBinDir.c_str(), TRUE); + + const std::string cafLibDir = AppConfigUtils::getRequiredString("globals", "lib_dir"); + g_setenv("CAF_LIB_DIR", cafLibDir.c_str(), TRUE); + + _gManagementAgentHostWork.CreateInstance(); + _gManagementAgentHostWork->initialize(); + + const uint32 maxStrLen = 4096; + if ((argc < 1) || (NULL == argv) || (NULL == argv[0]) || (::strnlen(argv[0], maxStrLen) >= maxStrLen)) { + CAF_CM_EXCEPTION_VA0(E_INVALIDARG, "argc/argv are invalid"); + } + +#ifdef WIN32 + CWinService::initialize(_gManagementAgentHostWork); + CWinService::execute(argc, argv); +#else + if (S_OK != hr) { + ::syslog(LOG_ERR, "CafInitialize::init() failed (0x%08X.", hr); + return 1; + } + + const std::string procPath(argv[0]); + CDaemonUtils::MakeDaemon( + argc, + argv, + procPath, + "ManagementAgentHost", + TermHandler, + _gDaemonized, + _gSysLogInfos); + + CLoggingUtils::setStartupConfigFile( + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogConfigFile), + AppConfigUtils::getRequiredString(_sAppConfigGlobalParamLogDir)); + + _gManagementAgentHostWork->doWork(); +#endif + + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + if (CAF_CM_ISEXCEPTION) { + const std::string msg = CAF_CM_EXCEPTION_GET_FULLMSG; +#ifndef WIN32 + ::syslog( + LOG_ERR, + "ManagementAgentHost: %s", + msg.c_str()); +#endif + + ::fprintf( + stderr, + "ManagementAgentHost: %s\n", + msg.c_str()); + iRc = 1; + } + CAF_CM_CLEAREXCEPTION; + + CafInitialize::term(); + + return iRc; +} + +#ifndef WIN32 +extern "C" void TermHandler(int32 signum) { + CAF_CM_STATIC_FUNC_LOG_ONLY( "ManagementAgentHost", "TermHandler" ); + + CAF_CM_ENTER { + switch (signum) { + case SIGTERM: + CAF_CM_LOG_INFO_VA0( "Received SIGTERM" ); + if (! _gManagementAgentHostWork.IsNull()) { + _gManagementAgentHostWork->stopWork(); + } + break; + case SIGINT: + CAF_CM_LOG_INFO_VA0( "Received SIGINT" ); + if (! _gManagementAgentHostWork.IsNull()) { + _gManagementAgentHostWork->stopWork(); + } + break; + default: + CAF_CM_LOG_ERROR_VA1( "Ignoring Unexpected signal %d", signum); + break; + } + } + CAF_CM_EXIT; +} +#endif diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/stdafx.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/stdafx.h new file mode 100644 index 000000000..ee66cc11e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/ManagementAgent/src/stdafx.h @@ -0,0 +1,19 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +#include +#include + +#ifdef WIN32 +#include "CWinService.h" +#endif + + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CAttachmentRequestTransformerInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CAttachmentRequestTransformerInstance.h new file mode 100644 index 000000000..0f2e75044 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CAttachmentRequestTransformerInstance.h @@ -0,0 +1,92 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAttachmentRequestTransformerInstance_h_ +#define CAttachmentRequestTransformerInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CAttachmentRequestTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + struct SExpandedFileAlias { + std::string _filePath; + std::string _encoding; + }; + CAF_DECLARE_SMART_POINTER(SExpandedFileAlias); + +public: + CAttachmentRequestTransformerInstance(); + virtual ~CAttachmentRequestTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdAttachmentRequestTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CAttachmentRequestTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + std::string calcOutputDirPath( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope) const; + + std::string calcFilePath( + const UriUtils::SUriRecord& uriRecord) const; + + std::string calcRelPath( + const std::string& filePath, + const UriUtils::SUriRecord& uriRecord) const; + + void moveFile( + const std::string& srcFilePath, + const std::string& dstFilePath) const; + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CAttachmentRequestTransformerInstance); +}; + +} + +#endif // #ifndef CAttachmentRequestTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CConfigEnvReadingMessageSource.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CConfigEnvReadingMessageSource.h new file mode 100644 index 000000000..08f665108 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CConfigEnvReadingMessageSource.h @@ -0,0 +1,56 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_CConfigEnvReadingMessageSource_h_ +#define _MaIntegration_CConfigEnvReadingMessageSource_h_ + +#include "IConfigEnv.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/Core/CAbstractPollableChannel.h" + +namespace Caf { + +class CConfigEnvReadingMessageSource : + public CAbstractPollableChannel { +private: + typedef std::map CFileCollection; + CAF_DECLARE_SMART_POINTER(CFileCollection); + +public: + CConfigEnvReadingMessageSource(); + virtual ~CConfigEnvReadingMessageSource(); + +public: + void initialize( + const SmartPtrIDocument& configSection, + const SmartPtrIConfigEnv& configEnv); + +protected: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + bool _isInitialized; + std::string _id; + + SmartPtrIConfigEnv _configEnv; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigEnvReadingMessageSource); +}; + +CAF_DECLARE_SMART_POINTER(CConfigEnvReadingMessageSource); + +} + +#endif // #ifndef _MaIntegration_CConfigEnvReadingMessageSource_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CDiagToMgmtRequestTransformerInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CDiagToMgmtRequestTransformerInstance.h new file mode 100644 index 000000000..9fdf29091 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CDiagToMgmtRequestTransformerInstance.h @@ -0,0 +1,121 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CDiagToMgmtRequestTransformerInstance_h_ +#define CDiagToMgmtRequestTransformerInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "CEnvelopeToPayloadTransformerInstance.h" +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h" +#include "Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h" +#include "Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CDiagToMgmtRequestTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + struct SExpandedFileAlias { + std::string _filePath; + std::string _encoding; + }; + CAF_DECLARE_SMART_POINTER(SExpandedFileAlias); + +public: + CDiagToMgmtRequestTransformerInstance(); + virtual ~CDiagToMgmtRequestTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdDiagToMgmtRequestTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CDiagToMgmtRequestTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrCMgmtCollectInstancesCollectionDoc createMgmtCollectInstancesCollection( + const SmartPtrCDiagCollectInstancesDoc& diagCollectInstances) const; + + SmartPtrCMgmtInvokeOperationCollectionDoc createMgmtInvokeOperationCollection( + const SmartPtrCDiagSetValueCollectionDoc& diagSetValueCollection, + const SmartPtrCDiagDeleteValueCollectionDoc& diagDeleteValueCollection) const; + + SmartPtrCMgmtCollectInstancesDoc createCollectInstances( + const UUID& jobId, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const; + + SmartPtrCOperationDoc createSetValueOperation( + const std::string& valueName, + const std::deque& valueCollection, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const; + + SmartPtrCOperationDoc createDeleteValueOperation( + const std::string& valueName, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const; + + SmartPtrCMgmtInvokeOperationDoc createInvokeOperation( + const UUID& jobId, + const SmartPtrCOperationDoc operation) const; + + std::deque expandFileAliases() const; + + SmartPtrSExpandedFileAlias expandFileAlias( + const std::string& fileAlias) const; + + std::string findUriParameter( + const std::string& parameterName, + const UriUtils::SUriRecord& uri) const; + +private: + bool _isInitialized; + std::string _id; + + std::string _fileAliasPrefix; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CDiagToMgmtRequestTransformerInstance); +}; + +} + +#endif // #ifndef CDiagToMgmtRequestTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CMonitorReadingMessageSource.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CMonitorReadingMessageSource.h new file mode 100644 index 000000000..795240555 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CMonitorReadingMessageSource.h @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_CMonitorReadingMessageSource_h_ +#define _MaIntegration_CMonitorReadingMessageSource_h_ + +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/Core/CAbstractPollableChannel.h" + +namespace Caf { + +class CMonitorReadingMessageSource : + public CAbstractPollableChannel { +private: + typedef std::map CFileCollection; + CAF_DECLARE_SMART_POINTER(CFileCollection); + +public: + CMonitorReadingMessageSource(); + virtual ~CMonitorReadingMessageSource(); + +public: + void initialize( + const SmartPtrIDocument& configSection); + +protected: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + bool isListenerRunning() const; + + void startListener( + const std::string& reason) const; + + void stopListener( + const std::string& reason) const; + + void restartListener( + const std::string& reason) const; + + std::string executeScript( + const std::string& scriptPath, + const std::string& scriptResultsDir) const; + + bool areSystemResourcesLow() const; + + bool isTimeForListenerRestart() const; + + uint64 calcListenerRestartMs() const; + +private: + bool _isInitialized; + std::string _id; + + uint64 _listenerStartTimeMs; + uint64 _listenerRestartMs; + + std::string _monitorDir; + std::string _restartListenerPath; + std::string _listenerConfiguredStage2Path; + + std::string _scriptOutputDir; + std::string _stopListenerScript; + std::string _startListenerScript; + std::string _isListenerRunningScript; + + std::string _listenerStartupType; + int32 _listenerRetryCnt; + int32 _listenerRetryMax; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CMonitorReadingMessageSource); +}; + +CAF_DECLARE_SMART_POINTER(CMonitorReadingMessageSource); + +} + +#endif // #ifndef _MaIntegration_CMonitorReadingMessageSource_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CPersistenceReadingMessageSource.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CPersistenceReadingMessageSource.h new file mode 100644 index 000000000..5994b1cd1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CPersistenceReadingMessageSource.h @@ -0,0 +1,56 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_CPersistenceReadingMessageSource_h_ +#define _MaIntegration_CPersistenceReadingMessageSource_h_ + +#include "IPersistence.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/Core/CAbstractPollableChannel.h" + +namespace Caf { + +class CPersistenceReadingMessageSource : + public CAbstractPollableChannel { +private: + typedef std::map CFileCollection; + CAF_DECLARE_SMART_POINTER(CFileCollection); + +public: + CPersistenceReadingMessageSource(); + virtual ~CPersistenceReadingMessageSource(); + +public: + void initialize( + const SmartPtrIDocument& configSection, + const SmartPtrIPersistence& persistence); + +protected: // CAbstractPollableChannel + bool doSend( + const SmartPtrIIntMessage& message, + int32 timeout); + + SmartPtrIIntMessage doReceive(const int32 timeout); + +private: + bool _isInitialized; + std::string _id; + + SmartPtrIPersistence _persistence; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPersistenceReadingMessageSource); +}; + +CAF_DECLARE_SMART_POINTER(CPersistenceReadingMessageSource); + +} + +#endif // #ifndef _MaIntegration_CPersistenceReadingMessageSource_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CProviderExecutorRequest.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CProviderExecutorRequest.h new file mode 100644 index 000000000..b21189e79 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CProviderExecutorRequest.h @@ -0,0 +1,48 @@ +/* + * Author: brets + * Created: Nov 20, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProviderExecutorRequest_h_ +#define CProviderExecutorRequest_h_ + + +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Integration/IIntMessage.h" + +namespace Caf { + +/// TODO - describe class +class CProviderExecutorRequest { +public: + CProviderExecutorRequest(); + virtual ~CProviderExecutorRequest(); + +public: + void initialize(const SmartPtrIIntMessage& request); + + const SmartPtrIIntMessage getInternalRequest() const; + const SmartPtrCProviderRequestDoc getRequest() const; + const std::string& getOutputDirectory() const; + const std::string& getProviderUri() const; + +private: + bool _isInitialized; + SmartPtrIIntMessage _internalRequest; + SmartPtrCProviderRequestDoc _request; + std::string _outputDir; + std::string _providerUri; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderExecutorRequest); +}; + +CAF_DECLARE_SMART_POINTER(CProviderExecutorRequest); + +} + +#endif // #ifndef CProviderExecutorRequest_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CProviderExecutorRequestHandler.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CProviderExecutorRequestHandler.h new file mode 100644 index 000000000..f3461ddc5 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CProviderExecutorRequestHandler.h @@ -0,0 +1,74 @@ +/* + * Author: brets + * Created: Nov 20, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProviderExecutorRequestHandler_h_ +#define CProviderExecutorRequestHandler_h_ + + +#include "Integration/IRunnable.h" + +#include "CProviderExecutorRequest.h" +#include "Common/CAutoMutex.h" +#include "Integration/IErrorHandler.h" +#include "Integration/ITaskExecutor.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +/// TODO - describe class +class CProviderExecutorRequestHandler : public IRunnable { +public: + CProviderExecutorRequestHandler(); + virtual ~CProviderExecutorRequestHandler(); + +public: + void initialize(const std::string& providerUri, + const SmartPtrITransformer beginImpersonationTransformer, + const SmartPtrITransformer endImpersonationTransformer, + const SmartPtrIErrorHandler errorHandler); + + void handleRequest(const SmartPtrCProviderExecutorRequest request); + +public: // IRunnable + void run(); + void cancel(); + +private: + SmartPtrCProviderExecutorRequest getNextPendingRequest(); + + void processRequest(const SmartPtrCProviderExecutorRequest& request) const; + + void executeRequestAsync( + const SmartPtrCProviderExecutorRequest& request); + + std::deque removeFinishedTaskExecutors( + const std::deque taskExecutors) const; + +private: + bool _isInitialized; + bool _isCancelled; + std::string _providerPath; + std::string _providerUri; + std::deque _taskExecutors; + SmartPtrCAutoMutex _mutex; + std::deque _pendingRequests; + SmartPtrITransformer _beginImpersonationTransformer; + SmartPtrITransformer _endImpersonationTransformer; + SmartPtrIErrorHandler _errorHandler; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CProviderExecutorRequestHandler); +}; + +CAF_DECLARE_SMART_POINTER(CProviderExecutorRequestHandler); + +} + +#endif // #ifndef CProviderExecutorRequestHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CResponseFactory.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CResponseFactory.h new file mode 100644 index 000000000..197ca9ef1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CResponseFactory.h @@ -0,0 +1,89 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CResponseFactory_h_ +#define CResponseFactory_h_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Doc/ResponseDoc/CManifestCollectionDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Doc/ResponseDoc/CResponseDoc.h" + +namespace Caf { + +/// Builds the response XML document. +class CResponseFactory { +public: + static SmartPtrCResponseDoc createResponse( + const SmartPtrCProviderCollectSchemaRequestDoc& providerCollectSchemaRequest, + const std::string& outputDir, + const std::string& schemaCacheDir); + + static SmartPtrCResponseDoc createResponse( + const SmartPtrCProviderRequestDoc& providerRequest, + const std::string& outputDir); + +private: + static void findAndStoreGlobalAttachmentsAndProviderResponses( + const std::string& outputDir, + const std::string& schemaCacheDir, + SmartPtrCManifestCollectionDoc& manifestCollection, + SmartPtrCAttachmentCollectionDoc& attachmentCollection); + + static void findAndStoreProviderResponses( + const std::string& outputDir, + const std::string& schemaCacheDir, + std::map& globalAttachmentCollection, + std::deque& manifestCollection); + + static void findAndStoreGlobalAttachments( + const std::string& outputDir, + std::map& globalAttachmentCollection); + + static void resolveAndStoreGlobalAttachments( + const std::deque attachmentCollectionInner, + const std::string& outputDir, + const std::string& schemaCacheDir, + std::map& globalAttachmentCollection); + + static void storeGlobalAttachments( + const std::string& attachmentName, + const std::string& attachmentType, + const std::deque& attachmentPathCollection, + const std::string& baseDir, + std::map& attachmentCollection); + + static void storeGlobalAttachment( + const std::string& attachmentName, + const std::string& attachmentType, + const std::string& attachmentPath, + const std::string& baseDir, + std::map& attachmentCollection); + + static void resolveAttachmentPath( + const std::string& attachmentPath, + const std::string& baseDir, + std::string& relPath, + std::string& attachmentPathNew); + + static std::string removeLeadingChars( + const std::string& sourceStr, + const char leadingChar); + +private: + CAF_CM_DECLARE_NOCREATE(CResponseFactory); +}; + +CAF_DECLARE_SMART_POINTER(CResponseFactory); + +} + +#endif // #ifndef CResponseFactory_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CSchemaCacheManager.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CSchemaCacheManager.h new file mode 100644 index 000000000..273d46655 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CSchemaCacheManager.h @@ -0,0 +1,71 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CSchemaCacheManager_h_ +#define CSchemaCacheManager_h_ + + +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Doc/ProviderInfraDoc/CSchemaSummaryDoc.h" + +namespace Caf { + +/// Simple container class for identifying a class. +class CClassId { +public: + SmartPtrCFullyQualifiedClassGroupDoc _fqc; + std::string toString() const { + return _fqc->getClassNamespace() + "::" + _fqc->getClassName() + "::" + _fqc->getClassVersion(); + } +}; +bool operator< (const CClassId& lhs, const CClassId& rhs); + +/// Creates a provider request. +class CSchemaCacheManager { +private: + typedef std::map CClassCollection; + +public: + CSchemaCacheManager(); + virtual ~CSchemaCacheManager(); + +public: + void initialize(); + + std::string findProvider( + const SmartPtrCFullyQualifiedClassGroupDoc& fqc); + +private: + void processSchemaSummaries( + const std::string& schemaCacheDirPath, + CClassCollection& classCollection) const; + + void addNewClasses( + const SmartPtrCSchemaSummaryDoc& schemaSummary, + const std::string& schemaSummaryFilePath, + CClassCollection& classCollection) const; + + void waitForSchemaCacheCreation( + const std::string& schemaCacheDir, + const uint16 maxWaitSecs) const; + +private: + bool _isInitialized; + std::string _schemaCacheDirPath; + CClassCollection _classCollection; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CSchemaCacheManager); +}; + +CAF_DECLARE_SMART_POINTER(CSchemaCacheManager); + +} + +#endif // #ifndef CSchemaCacheManager_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CSinglePmeRequestSplitterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CSinglePmeRequestSplitterInstance.h new file mode 100644 index 000000000..557bea8c9 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/CSinglePmeRequestSplitterInstance.h @@ -0,0 +1,141 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CSinglePmeRequestSplitterInstance_h_ +#define CSinglePmeRequestSplitterInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "CSchemaCacheManager.h" +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageSplitter.h" + +namespace Caf { + +// Moved the following typedefs from the class because Windows produced +// the warning "decorated name length exceeded, name was truncated" because +// their name included CSinglePmeRequestSplitterInstance. +struct CSplitterJob { + SmartPtrCFullyQualifiedClassGroupDoc _fqc; + SmartPtrCMgmtCollectInstancesDoc _mgmtCollectInstances; + SmartPtrCMgmtInvokeOperationDoc _mgmtInvokeOperation; +}; +CAF_DECLARE_SMART_POINTER(CSplitterJob); + +typedef std::deque CSplitterJobsCollection; +CAF_DECLARE_SMART_POINTER(CSplitterJobsCollection); + +typedef std::map CProviderJobsCollection; +CAF_DECLARE_SMART_POINTER(CProviderJobsCollection); + +class CSinglePmeRequestSplitterInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public IMessageSplitter { +private: + typedef std::deque CClassCollection; + CAF_DECLARE_SMART_POINTER(CClassCollection); + +public: + CSinglePmeRequestSplitterInstance(); + virtual ~CSinglePmeRequestSplitterInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdSinglePmeRequestSplitterInstance) + + CAF_BEGIN_INTERFACE_MAP(CSinglePmeRequestSplitterInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(IMessageSplitter) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IMessageSplitter + SmartPtrCMessageCollection splitMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrCProviderCollectSchemaRequestDoc createCollectSchemaRequest( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const SmartPtrCMgmtCollectSchemaDoc& mgmtCollectSchema, + const SmartPtrCProviderRequestHeaderDoc& providerRequestHeader, + const std::string& outputDir) const; + + SmartPtrCProviderRequestDoc createProviderRequest( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const SmartPtrCSplitterJobsCollection& jobsCollection, + const SmartPtrCProviderRequestHeaderDoc& providerRequestHeader, + const std::string& outputDir) const; + + void addCollectInstancesJobs( + const SmartPtrCMgmtCollectInstancesCollectionDoc& mgmtCollectInstancesCollection, + SmartPtrCProviderJobsCollection& providerJobsCollection) const; + + void addInvokeOperationJobs( + const SmartPtrCMgmtInvokeOperationCollectionDoc& mgmtInvokeOperationCollection, + SmartPtrCProviderJobsCollection& providerJobsCollection) const; + + SmartPtrCClassCollection resolveClassSpecifier( + const SmartPtrCClassSpecifierDoc& classSpecifier) const; + + std::string findProviderUri( + const SmartPtrCFullyQualifiedClassGroupDoc& fqc) const; + + void createDirectory( + const std::string& directory) const; + + void saveRequest( + const std::string& outputDir, + const SmartPtrCDynamicByteArray& payload) const; + + SmartPtrCProviderRequestHeaderDoc convertRequestHeader( + const SmartPtrCRequestHeaderDoc& requestHeader) const; + +private: + bool _isInitialized; + std::string _id; + SmartPtrCSchemaCacheManager _schemaCacheManager; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CSinglePmeRequestSplitterInstance); +}; + +} + +#endif // #ifndef CSinglePmeRequestSplitterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/IConfigEnv.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/IConfigEnv.h new file mode 100644 index 000000000..f4ad39395 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/IConfigEnv.h @@ -0,0 +1,38 @@ +/* + * Author: bwilliams + * Created: Nov 12, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaContracts_IConfigEnv_h_ +#define _MaContracts_IConfigEnv_h_ + + +#include "ICafObject.h" + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "IPersistence.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) +IConfigEnv : public ICafObject { + CAF_DECL_UUID("dea6cea4-9385-458e-b549-d05640382da6") + + virtual void initialize( + const SmartPtrIPersistence& persistenceRemove = SmartPtrIPersistence()) = 0; + + virtual SmartPtrCPersistenceDoc getUpdated( + const int32 timeout) = 0; + + virtual void update( + const SmartPtrCPersistenceDoc& persistence) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IConfigEnv); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/IPersistence.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/IPersistence.h new file mode 100644 index 000000000..44608658e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/IPersistence.h @@ -0,0 +1,39 @@ +/* + * Author: bwilliams + * Created: Nov 12, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaContracts_IPersistence_h_ +#define _MaContracts_IPersistence_h_ + + +#include "ICafObject.h" + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" + +namespace Caf { + +/// TODO - describe interface +struct __declspec(novtable) +IPersistence : public ICafObject { + CAF_DECL_UUID("5b48f8ef-7023-4583-9d2d-b15ae566b0cc") + + virtual void initialize() = 0; + + virtual SmartPtrCPersistenceDoc getUpdated( + const int32 timeout) = 0; + + virtual void update( + const SmartPtrCPersistenceDoc& persistence) = 0; + + virtual void remove( + const SmartPtrCPersistenceDoc& persistence) = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IPersistence); + +} + +#endif diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/MaIntegration.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/MaIntegration.h new file mode 100644 index 000000000..9a8b5f8c2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/include/MaIntegration.h @@ -0,0 +1,38 @@ +/* + * Created on: Nov 11, 2015 + * Author: bwilliams + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_h_ +#define _MaIntegration_h_ + +namespace Caf { + +/** @brief CAF AMQP Integration */ +namespace MaIntegration { + extern const char* _sObjIdIntegrationObjects; +}} + +namespace Caf { + extern const char* _sObjIdCollectSchemaExecutor; + extern const char* _sObjIdProviderCollectSchemaExecutor; + extern const char* _sObjIdProviderExecutor; + extern const char* _sObjIdSinglePmeRequestSplitterInstance; + extern const char* _sObjIdSinglePmeRequestSplitter; + extern const char* _sObjIdDiagToMgmtRequestTransformerInstance; + extern const char* _sObjIdDiagToMgmtRequestTransformer; + extern const char* _sObjIdInstallToMgmtRequestTransformerInstance; + extern const char* _sObjIdInstallToMgmtRequestTransformer; + + extern const char* _sObjIdAttachmentRequestTransformerInstance; + extern const char* _sObjIdAttachmentRequestTransformer; + extern const char* _sObjIdVersionTransformerInstance; + extern const char* _sObjIdVersionTransformer; + + extern const char* _sObjIdPersistenceNamespaceDb; + extern const char* _sObjIdConfigEnv; +} + +#endif /* _MaIntegration_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.cpp new file mode 100644 index 000000000..9fb838779 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CAttachmentRequestTransformer.h" + +using namespace Caf; + +CAttachmentRequestTransformer::CAttachmentRequestTransformer() : + _isInitialized(false), + CAF_CM_INIT_LOG("CAttachmentRequestTransformer") { +} + +CAttachmentRequestTransformer::~CAttachmentRequestTransformer() { +} + +void CAttachmentRequestTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CAttachmentRequestTransformer::terminateBean() { +} + +void CAttachmentRequestTransformer::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CAttachmentRequestTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CAttachmentRequestTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdAttachmentRequestTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.h new file mode 100644 index 000000000..76fcbf80d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformer.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CAttachmentRequestTransformer_h_ +#define CAttachmentRequestTransformer_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CAttachmentRequestTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CAttachmentRequestTransformer(); + virtual ~CAttachmentRequestTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdAttachmentRequestTransformer) + + CAF_BEGIN_INTERFACE_MAP(CAttachmentRequestTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CAttachmentRequestTransformer); +}; + +} + +#endif // #ifndef CAttachmentRequestTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.cpp new file mode 100644 index 000000000..b3ae62a28 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CAttachmentRequestTransformerInstance.cpp @@ -0,0 +1,247 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CAttachmentRequestTransformerInstance.h" +#include "Exception/CCafException.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" +#include "Integration/Caf/CCafMessageCreator.h" + +using namespace Caf; + +CAttachmentRequestTransformerInstance::CAttachmentRequestTransformerInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CAttachmentRequestTransformerInstance") { +} + +CAttachmentRequestTransformerInstance::~CAttachmentRequestTransformerInstance() { +} + +void CAttachmentRequestTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CAttachmentRequestTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CAttachmentRequestTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CAttachmentRequestTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + newMessage = message; + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + // The standard is for an optional attachment collection at the root of all + // documents. + const std::deque attachmentCollection = + payloadEnvelope->getAttachmentCollection()->getAttachment(); + + if (! attachmentCollection.empty()) { + const std::string outputDirPath = calcOutputDirPath(payloadEnvelope); + + std::deque newAttachmentCollection; + for (TConstIterator > attachmentIter(attachmentCollection); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + const std::string attachmentName = attachment->getName(); + const std::string attachmentUri = attachment->getUri(); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachmentUri, uriRecord); + + SmartPtrCAttachmentDoc newAttachment = attachment; + if(uriRecord.protocol.compare("file") == 0) { + const std::string origFilePath = calcFilePath(uriRecord); + const std::string relPath = calcRelPath(origFilePath, uriRecord); + const std::string newFilePath = FileSystemUtils::buildPath( + outputDirPath, relPath); + + if (origFilePath.compare(newFilePath) == 0) { + CAF_CM_LOG_DEBUG_VA1("File path unchanged... no-op - %s", newFilePath.c_str()); + } else { + moveFile(origFilePath, newFilePath); + + const std::string newUri = "file:///" + newFilePath + "?relPath=" + relPath; + + newAttachment.CreateInstance(); + newAttachment->initialize(attachment->getName(), + attachment->getType(), newUri, false, + attachment->getCmsPolicy()); + } + } + + newAttachmentCollection.push_back(newAttachment); + } + + newMessage = CCafMessageCreator::createPayloadEnvelope( + payloadEnvelope, newAttachmentCollection, message->getHeaders()); + } + } + CAF_CM_EXIT; + + return newMessage; +} + +std::string CAttachmentRequestTransformerInstance::calcOutputDirPath( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope) const { + CAF_CM_FUNCNAME_VALIDATE("calcOutputDirPath"); + + std::string outputDirPath; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + + const std::string clientIdStr = + BasePlatform::UuidToString(payloadEnvelope->getClientId()); + const std::string requestIdStr = + BasePlatform::UuidToString(payloadEnvelope->getRequestId()); + const std::string pmeIdStr = payloadEnvelope->getPmeId(); + + const std::string outputDir = AppConfigUtils::getRequiredString(_sConfigOutputDir); + + outputDirPath = FileSystemUtils::buildPath( + outputDir, "att", clientIdStr, requestIdStr, pmeIdStr); + + outputDirPath = CStringUtils::expandEnv(outputDirPath); + if (! FileSystemUtils::doesDirectoryExist(outputDirPath)) { + CAF_CM_LOG_DEBUG_VA1("Creating output directory - %s", outputDirPath.c_str()); + FileSystemUtils::createDirectory(outputDirPath); + } + } + CAF_CM_EXIT; + + return outputDirPath; +} + +std::string CAttachmentRequestTransformerInstance::calcFilePath( + const UriUtils::SUriRecord& uriRecord) const { + CAF_CM_FUNCNAME("calcFilePath"); + + std::string filePath; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + + filePath = CStringUtils::expandEnv(fileUriRecord.path); + if(! FileSystemUtils::doesFileExist(filePath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "URI file not found - %s", filePath.c_str()); + } + } + CAF_CM_EXIT; + + return filePath; +} + +std::string CAttachmentRequestTransformerInstance::calcRelPath( + const std::string& filePath, + const UriUtils::SUriRecord& uriRecord) const { + CAF_CM_FUNCNAME_VALIDATE("calcRelPath"); + + std::string relPath; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::map::const_iterator iterParam = + uriRecord.parameters.find("relPath"); + if (iterParam != uriRecord.parameters.end()) { + relPath = iterParam->second; + } else { + CAF_CM_LOG_DEBUG_VA1("Attachment URI does not contain relPath - %s", uriRecord.address.c_str()); + CAF_CM_VALIDATE_STRING(filePath); + relPath = FileSystemUtils::getBasename(filePath); + } + } + CAF_CM_EXIT; + + return relPath; +} + +void CAttachmentRequestTransformerInstance::moveFile( + const std::string& srcFilePath, + const std::string& dstFilePath) const { + CAF_CM_FUNCNAME_VALIDATE("moveFile"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(srcFilePath); + CAF_CM_VALIDATE_STRING(dstFilePath); + + if (FileSystemUtils::doesFileExist(dstFilePath)) { + CAF_CM_LOG_WARN_VA1("File already exists - %s", dstFilePath.c_str()); + } else { + const std::string newDirPath = FileSystemUtils::getDirname(dstFilePath); + if (! FileSystemUtils::doesDirectoryExist(newDirPath)) { + CAF_CM_LOG_DEBUG_VA1("Creating input directory - %s", newDirPath.c_str()); + FileSystemUtils::createDirectory(newDirPath); + } + + CAF_CM_LOG_DEBUG_VA2("Moving file - \"%s\" to \"%s\"", + srcFilePath.c_str(), dstFilePath.c_str()); + + FileSystemUtils::moveFile(srcFilePath, dstFilePath); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.cpp new file mode 100644 index 000000000..54e3f42c2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.cpp @@ -0,0 +1,110 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h" + +#include "Integration/Caf/CCafMessageHeaders.h" +#include "Common/CLoggingSetter.h" +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" +#include "Doc/ResponseDoc/CResponseDoc.h" +#include "Integration/IIntMessage.h" +#include "CCollectSchemaExecutor.h" +#include "CResponseFactory.h" +#include "Integration/Caf/CCafMessageCreator.h" + +using namespace Caf; + +CCollectSchemaExecutor::CCollectSchemaExecutor() : + _isInitialized(false), + CAF_CM_INIT_LOG("CCollectSchemaExecutor") { +} + +CCollectSchemaExecutor::~CCollectSchemaExecutor() +{ +} + +void CCollectSchemaExecutor::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER + { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + const std::string schemaCacheDirPath = + AppConfigUtils::getRequiredString(_sProviderHostArea, _sConfigSchemaCacheDir); + const std::string schemaCacheDirPathExp = CStringUtils::expandEnv(schemaCacheDirPath); + if (!FileSystemUtils::doesDirectoryExist(schemaCacheDirPathExp)) { + CAF_CM_LOG_INFO_VA1( + "Schema cache directory does not exist... creating - %s", + schemaCacheDirPathExp.c_str()); + FileSystemUtils::createDirectory(schemaCacheDirPathExp); + } + + _schemaCacheDirPath = schemaCacheDirPathExp; + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CCollectSchemaExecutor::terminateBean() { + +} + +SmartPtrIIntMessage CCollectSchemaExecutor::processMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("processMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + CAF_CM_LOG_DEBUG_VA1("Called - schemaCacheDirPath: %s", _schemaCacheDirPath.c_str()); + + const SmartPtrCCafMessageHeaders cafMessageHeaders = + CCafMessageHeaders::create(message->getHeaders()); + + const std::string configOutputDir = + AppConfigUtils::getRequiredString(_sConfigOutputDir); + const std::string relDirectory = cafMessageHeaders->getRelDirectory(); + const std::string outputDir = FileSystemUtils::buildPath( + configOutputDir, _sProviderHostArea, relDirectory); + + SmartPtrCLoggingSetter loggingSetter; + loggingSetter.CreateInstance(); + loggingSetter->initialize(outputDir); + + const std::string providerCollectSchemaMem = message->getPayloadStr(); + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequest = + XmlRoots::parseProviderCollectSchemaRequestFromString(providerCollectSchemaMem); + + CAF_CM_LOG_DEBUG_VA2("Copying directory from \"%s\" to \"%s\"", + _schemaCacheDirPath.c_str(), outputDir.c_str()); + FileSystemUtils::recursiveCopyDirectory(_schemaCacheDirPath, outputDir); + + const SmartPtrCResponseDoc response = + CResponseFactory::createResponse(providerCollectSchemaRequest, outputDir, + _schemaCacheDirPath); + + const std::string randomUuidStr = CStringUtils::createRandomUuid(); + const std::string relFilename = randomUuidStr + "_" + _sResponseFilename; + + newMessage = CCafMessageCreator::createPayloadEnvelope( + response, relFilename, message->getHeaders()); + } + CAF_CM_EXIT; + + return newMessage; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.h new file mode 100644 index 000000000..7f21706c1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CCollectSchemaExecutor.h @@ -0,0 +1,56 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CCollectSchemaExecutor_h_ +#define CCollectSchemaExecutor_h_ + + +#include "IBean.h" + +#include "Integration/IIntMessage.h" +#include "Integration/IMessageProcessor.h" + +using namespace Caf; + +/// TODO - describe class +class CCollectSchemaExecutor : + public TCafSubSystemObjectRoot, + public IBean, + public IMessageProcessor { +public: + CCollectSchemaExecutor(); + virtual ~CCollectSchemaExecutor(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdCollectSchemaExecutor) + + CAF_BEGIN_INTERFACE_MAP(CCollectSchemaExecutor) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IMessageProcessor) + CAF_END_INTERFACE_MAP() + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IMessageProcessor + SmartPtrIIntMessage processMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _schemaCacheDirPath; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CCollectSchemaExecutor); +}; + +#endif // #ifndef CCollectSchemaExecutor_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.cpp new file mode 100644 index 000000000..ec20955a8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.cpp @@ -0,0 +1,239 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "IPersistence.h" +#include "Exception/CCafException.h" +#include "CConfigEnv.h" + +using namespace Caf; + +CConfigEnv::CConfigEnv() : + _isInitialized(false), + CAF_CM_INIT_LOG("CConfigEnv") { + CAF_CM_INIT_THREADSAFE; +} + +CConfigEnv::~CConfigEnv() { +} + +void CConfigEnv::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { +} + +void CConfigEnv::terminateBean() { +} + +void CConfigEnv::initialize( + const SmartPtrIPersistence& persistenceRemove) { + CAF_CM_LOCK_UNLOCK; + + if (_isInitialized) { + if (! persistenceRemove.IsNull() && _persistenceRemove.IsNull()) { + _persistenceRemove = persistenceRemove; + } + } else { + _persistenceRemove = persistenceRemove; + + _persistenceDir = AppConfigUtils::getRequiredString("persistence_dir"); + + _configDir = AppConfigUtils::getRequiredString("config_dir"); + _persistenceAppconfigPath = FileSystemUtils::buildPath(_configDir, "persistence-appconfig"); + + _monitorDir = AppConfigUtils::getRequiredString("monitor_dir"); + _restartListenerPath = FileSystemUtils::buildPath(_monitorDir, "restartListener.txt"); + _listenerConfiguredStage1Path = FileSystemUtils::buildPath( + _monitorDir, "listenerConfiguredStage1.txt"); + _listenerConfiguredStage2Path = FileSystemUtils::buildPath( + _monitorDir, "listenerConfiguredStage2.txt"); + + std::string guestProxyDir; +#ifdef _WIN32 + std::string programData; + CEnvironmentUtils::readEnvironmentVar("ProgramData", programData); + guestProxyDir = FileSystemUtils::buildPath(programData, "VMware", "VMware Tools", "GuestProxyData"); +#else + guestProxyDir = "/etc/vmware-tools/GuestProxyData"; +#endif + + _vcidPath = FileSystemUtils::buildPath(guestProxyDir, "VmVcUuid", "vm.vc.uuid"); + _cacertPath = FileSystemUtils::buildPath(guestProxyDir, "server", "cert.pem"); + + _isInitialized = true; + } +} + +SmartPtrCPersistenceDoc CConfigEnv::getUpdated( + const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("getUpdated"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (FileSystemUtils::doesFileExist(_listenerConfiguredStage1Path)) { + if (_persistence.IsNull()) { + _persistence = CPersistenceUtils::loadPersistence(_persistenceDir); + if (FileSystemUtils::doesFileExist(_listenerConfiguredStage2Path)) { + _persistenceUpdated = _persistence; + } + } + + const SmartPtrCPersistenceDoc persistenceTmp = + CConfigEnvMerge::mergePersistence(_persistence, _cacertPath, _vcidPath); + if (! persistenceTmp.IsNull()) { + CPersistenceUtils::savePersistence(persistenceTmp, _persistenceDir); + _persistence = CPersistenceUtils::loadPersistence(_persistenceDir); + _persistenceUpdated = _persistence; + + savePersistenceAppconfig(_persistence, _configDir); + + const std::string reason = "Info changed in env"; + listenerConfiguredStage2(reason); + restartListener(reason); + } + } + + SmartPtrCPersistenceDoc rc; + if (! _persistenceUpdated.IsNull()) { + CAF_CM_LOG_DEBUG_VA1("Returning persistence info - %s", _persistenceDir.c_str()); + rc = _persistenceUpdated; + _persistenceUpdated = SmartPtrCPersistenceDoc(); + } + + return rc; +} + +void CConfigEnv::update( + const SmartPtrCPersistenceDoc& persistence) { + CAF_CM_FUNCNAME_VALIDATE("update"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCPersistenceDoc persistenceTmp1 = + CPersistenceMerge::mergePersistence(_persistence, persistence); + + const SmartPtrCPersistenceDoc persistenceIn = persistenceTmp1.IsNull() ? _persistence : persistenceTmp1; + const SmartPtrCPersistenceDoc persistenceTmp2 = + CConfigEnvMerge::mergePersistence(persistenceIn, _cacertPath, _vcidPath); + + const SmartPtrCPersistenceDoc persistenceTmp = persistenceTmp2.IsNull() ? persistenceTmp1 : persistenceTmp2; + + if (! persistenceTmp.IsNull()) { + CPersistenceUtils::savePersistence(persistenceTmp, _persistenceDir); + _persistence = CPersistenceUtils::loadPersistence(_persistenceDir); + _persistenceUpdated = _persistence; + + savePersistenceAppconfig(_persistence, _configDir); + removePrivateKey(_persistence, _persistenceRemove); + + const std::string reason = "Info changed at source"; + listenerConfiguredStage1(reason); + listenerConfiguredStage2(reason); + restartListener(reason); + } +} + +void CConfigEnv::savePersistenceAppconfig( + const SmartPtrCPersistenceDoc& persistence, + const std::string& configDir) const { + CAF_CM_FUNCNAME_VALIDATE("savePersistenceAppconfig"); + CAF_CM_VALIDATE_SMARTPTR(persistence); + CAF_CM_VALIDATE_STRING(configDir); + + const SmartPtrCPersistenceProtocolDoc persistenceProtocol = + CPersistenceUtils::loadPersistenceProtocol( + persistence->getPersistenceProtocolCollection()); + if (persistenceProtocol.IsNull() || persistenceProtocol->getUri().empty()) { + CAF_CM_LOG_DEBUG_VA1( + "Can't create persistence-appconfig until protocol is established - %s", + configDir.c_str()); + } else { +#ifdef WIN32 + const std::string newLine = "\r\n"; +#else + const std::string newLine = "\n"; +#endif + + CAF_CM_LOG_DEBUG_VA1("Saving persistence-appconfig - %s", configDir.c_str()); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(persistenceProtocol->getUri(), uriRecord); + CAF_CM_VALIDATE_STRING(uriRecord.path); + + const std::string listenerContext = calcListenerContext(uriRecord.protocol, configDir); + + CAF_CM_LOG_DEBUG_VA2("Calculated listener context - uri: %s, protocol: %s", + persistenceProtocol->getUri().c_str(), uriRecord.protocol.c_str()); + + std::string appconfigContents; + appconfigContents = "[globals]" + newLine; + appconfigContents += "reactive_request_amqp_queue_id=" + uriRecord.path + newLine; + appconfigContents += "comm_amqp_listener_context=" + listenerContext + newLine; + + FileSystemUtils::saveTextFile(_persistenceAppconfigPath, appconfigContents); + } +} + +void CConfigEnv::removePrivateKey( + const SmartPtrCPersistenceDoc& persistence, + const SmartPtrIPersistence& persistenceRemove) const { + CAF_CM_FUNCNAME_VALIDATE("removePrivateKey"); + CAF_CM_VALIDATE_SMARTPTR(persistence); + + if (! persistenceRemove.IsNull() + && ! persistence->getLocalSecurity()->getPrivateKey().empty()) { + CAF_CM_LOG_DEBUG_VA0("Removing private key"); + + SmartPtrCLocalSecurityDoc localSecurity; + localSecurity.CreateInstance(); + localSecurity->initialize(std::string(), "removePrivateKey"); + + SmartPtrCPersistenceDoc persistenceRemoveTmp; + persistenceRemoveTmp.CreateInstance(); + persistenceRemoveTmp->initialize(localSecurity); + + persistenceRemove->remove(persistenceRemoveTmp); + } +} + +std::string CConfigEnv::calcListenerContext( + const std::string& uriSchema, + const std::string& configDir) const { + CAF_CM_FUNCNAME("calcListenerContext"); + CAF_CM_VALIDATE_STRING(uriSchema); + CAF_CM_VALIDATE_STRING(configDir); + + std::string rc; + if (uriSchema.compare("amqp") == 0) { + rc = FileSystemUtils::buildPath(configDir, "CommAmqpListener-context-amqp.xml"); + } else if (uriSchema.compare("tunnel") == 0) { + rc = FileSystemUtils::buildPath(configDir, "CommAmqpListener-context-tunnel.xml"); + } else { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "Unknown URI schema: %s", uriSchema.c_str()); + } + + return FileSystemUtils::normalizePathWithForward(rc); +} + +void CConfigEnv::restartListener( + const std::string& reason) const { + FileSystemUtils::saveTextFile(_restartListenerPath, reason); +} + +void CConfigEnv::listenerConfiguredStage1( + const std::string& reason) const { + FileSystemUtils::saveTextFile(_listenerConfiguredStage1Path, reason); +} + +void CConfigEnv::listenerConfiguredStage2( + const std::string& reason) const { + FileSystemUtils::saveTextFile(_listenerConfiguredStage2Path, reason); +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.h new file mode 100644 index 000000000..35a19eeac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnv.h @@ -0,0 +1,102 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_CConfigEnv_h_ +#define _MaIntegration_CConfigEnv_h_ + + +#include "IBean.h" + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "IPersistence.h" +#include "IConfigEnv.h" + +using namespace Caf; + +/// TODO - describe class +class CConfigEnv : + public TCafSubSystemObjectRoot, + public IBean, + public IConfigEnv { +public: + CConfigEnv(); + virtual ~CConfigEnv(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdConfigEnv) + + CAF_BEGIN_INTERFACE_MAP(CConfigEnv) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IConfigEnv) + CAF_END_INTERFACE_MAP() + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IConfigEnv + void initialize( + const SmartPtrIPersistence& persistenceRemove); + + SmartPtrCPersistenceDoc getUpdated( + const int32 timeout); + + void update( + const SmartPtrCPersistenceDoc& persistence); + +private: + void savePersistenceAppconfig( + const SmartPtrCPersistenceDoc& persistence, + const std::string& configDir) const; + + void executeScript( + const std::string& scriptPath, + const std::string& scriptResultsDir) const; + + void removePrivateKey( + const SmartPtrCPersistenceDoc& persistence, + const SmartPtrIPersistence& persistenceRemove) const; + + std::string calcListenerContext( + const std::string& uriSchema, + const std::string& configDir) const; + + void restartListener( + const std::string& reason) const; + + void listenerConfiguredStage1( + const std::string& reason) const; + + void listenerConfiguredStage2( + const std::string& reason) const; + +private: + bool _isInitialized; + std::string _persistenceDir; + std::string _configDir; + std::string _persistenceAppconfigPath; + std::string _monitorDir; + std::string _restartListenerPath; + std::string _listenerConfiguredStage1Path; + std::string _listenerConfiguredStage2Path; + std::string _vcidPath; + std::string _cacertPath; + + SmartPtrCPersistenceDoc _persistence; + SmartPtrCPersistenceDoc _persistenceUpdated; + SmartPtrIPersistence _persistenceRemove; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CConfigEnv); +}; + +#endif // #ifndef _MaIntegration_CConfigEnv_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..a780e8522 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.cpp @@ -0,0 +1,144 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CConfigEnvReadingMessageSource.h" +#include "Common/IAppContext.h" +#include "IBean.h" +#include "IConfigEnv.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/Core/CMessageHandler.h" +#include "Integration/Core/CSimpleAsyncTaskExecutor.h" +#include "Integration/Core/CSourcePollingChannelAdapter.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IMessageChannel.h" +#include "CConfigEnvInboundChannelAdapterInstance.h" + +using namespace Caf; + +CConfigEnvInboundChannelAdapterInstance::CConfigEnvInboundChannelAdapterInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CConfigEnvInboundChannelAdapterInstance") { +} + +CConfigEnvInboundChannelAdapterInstance::~CConfigEnvInboundChannelAdapterInstance() { +} + +void CConfigEnvInboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; +} + +std::string CConfigEnvInboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CConfigEnvInboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const std::string outputChannelStr = + _configSection->findRequiredAttribute("channel"); + + const SmartPtrIConfigEnv configEnv = createConfigEnv(appContext); + + SmartPtrCConfigEnvReadingMessageSource configEnvReadingMessageSource; + configEnvReadingMessageSource.CreateInstance(); + configEnvReadingMessageSource->initialize(_configSection, configEnv); + + const SmartPtrIMessageChannel outputMessageChannel = + channelResolver->resolveChannelName(outputChannelStr); + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _id, + outputMessageChannel, + SmartPtrICafObject()); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize( + messageHandler, configEnvReadingMessageSource, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(sourcePollingChannelAdapter, errorHandler); + _taskExecutor = simpleAsyncTaskExecutor; +} + +void CConfigEnvInboundChannelAdapterInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Starting the executor"); + _taskExecutor->execute(timeoutMs); +} + +void CConfigEnvInboundChannelAdapterInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Stopping the executor"); + _taskExecutor->cancel(timeoutMs); +} + +bool CConfigEnvInboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const bool rc = (_taskExecutor->getState() == ITaskExecutor::ETaskStateStarted); + return rc; +} + +bool CConfigEnvInboundChannelAdapterInstance::isMessageProducer() const { + CAF_CM_FUNCNAME_VALIDATE("isMessageProducer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return true; +} + +SmartPtrIConfigEnv CConfigEnvInboundChannelAdapterInstance::createConfigEnv( + const SmartPtrIAppContext& appContext) const { + CAF_CM_FUNCNAME_VALIDATE("createConfigEnv"); + CAF_CM_VALIDATE_INTERFACE(appContext); + + SmartPtrIConfigEnv rc; + const std::string refStr = _configSection->findRequiredAttribute("ref"); + CAF_CM_LOG_DEBUG_VA1("Creating the configenv impl - %s", refStr.c_str()); + const SmartPtrIBean bean = appContext->getBean(refStr); + rc.QueryInterface(bean, false); + CAF_CM_VALIDATE_INTERFACE(rc); + rc->initialize(); + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.h new file mode 100644 index 000000000..608b6eec0 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvInboundChannelAdapterInstance.h @@ -0,0 +1,83 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CConfigEnvInboundChannelAdapterInstance_h_ +#define CConfigEnvInboundChannelAdapterInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "IConfigEnv.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/ITaskExecutor.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" +#include "Integration/IMessageProducer.h" + +namespace Caf { + +class CConfigEnvInboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IMessageProducer { +public: + CConfigEnvInboundChannelAdapterInstance(); + virtual ~CConfigEnvInboundChannelAdapterInstance(); + +public: + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IMessageProducer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IMessageProducer + bool isMessageProducer() const; + +private: + SmartPtrIConfigEnv createConfigEnv( + const SmartPtrIAppContext& appContext) const; + +private: + bool _isInitialized; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrITaskExecutor _taskExecutor; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigEnvInboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CConfigEnvInboundChannelAdapterInstance); + +} + +#endif // #ifndef CConfigEnvInboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.cpp new file mode 100644 index 000000000..5d6483f27 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.cpp @@ -0,0 +1,301 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "Exception/CCafException.h" +#include "CConfigEnvMerge.h" + +#ifdef WIN32 + #include + #pragma comment (lib, "wsock32.lib") +#else + #include + #include + #include +#endif + +using namespace Caf; + +SmartPtrCPersistenceDoc CConfigEnvMerge::mergePersistence( + const SmartPtrCPersistenceDoc& persistence, + const std::string& cacertPath, + const std::string& vcidPath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CConfigEnvMerge", "mergePersistence"); + CAF_CM_VALIDATE_SMARTPTR(persistence); + CAF_CM_VALIDATE_STRING(cacertPath); + CAF_CM_VALIDATE_STRING(vcidPath); + + const std::string localId = mergeLocalId(persistence, vcidPath); + + std::string localIdDiff; + if (persistence->getLocalSecurity()->getLocalId().compare(localId) != 0) { + CAF_CM_LOG_DEBUG_VA2("LocalId changed - %s != %s", + persistence->getLocalSecurity()->getLocalId().c_str(), localId.c_str()); + localIdDiff = localId; + } + + const std::string cacert = loadTextFile(cacertPath); + + const std::deque persistenceProtocolCollectionInnerDiff = + mergePersistenceProtocolCollectionInner( + persistence->getPersistenceProtocolCollection()->getPersistenceProtocol(), + localId, cacert); + + SmartPtrCPersistenceDoc rc; + if (! localIdDiff.empty() || ! persistenceProtocolCollectionInnerDiff.empty()) { + SmartPtrCLocalSecurityDoc localSecurity = persistence->getLocalSecurity(); + if (! localIdDiff.empty()) { + CAF_CM_LOG_DEBUG_VA0("Creating local security diff"); + localSecurity.CreateInstance(); + localSecurity->initialize( + localIdDiff, + persistence->getLocalSecurity()->getPrivateKey(), + persistence->getLocalSecurity()->getCert(), + persistence->getLocalSecurity()->getPrivateKeyPath(), + persistence->getLocalSecurity()->getCertPath()); + } + + SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollection = + persistence->getPersistenceProtocolCollection(); + if (! persistenceProtocolCollectionInnerDiff.empty()) { + CAF_CM_LOG_DEBUG_VA0("Creating persistence protocol diff"); + persistenceProtocolCollection.CreateInstance(); + persistenceProtocolCollection->initialize(persistenceProtocolCollectionInnerDiff); + } + + rc.CreateInstance(); + rc->initialize( + localSecurity, + persistence->getRemoteSecurityCollection(), + persistenceProtocolCollection, + persistence->getVersion()); + } + + return rc; +} + +std::string CConfigEnvMerge::mergeLocalId( + const SmartPtrCPersistenceDoc& persistence, + const std::string& vcidPath) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CConfigEnvMerge", "mergeLocalId"); + CAF_CM_VALIDATE_SMARTPTR(persistence); + CAF_CM_VALIDATE_STRING(vcidPath); + + std::string rc = loadTextFile(vcidPath); + if (rc.empty()) { + if (persistence->getLocalSecurity()->getLocalId().empty()) { + rc = CStringUtils::createRandomUuid(); + } else { + rc = persistence->getLocalSecurity()->getLocalId(); + } + } + + return rc; +} + +std::deque CConfigEnvMerge::mergePersistenceProtocolCollectionInner( + const std::deque& persistenceProtocolCollectionInner, + const std::string& localId, + const std::string& cacert) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CConfigEnvMerge", "mergePersistenceProtocolCollectionInner"); + CAF_CM_VALIDATE_BOOL(persistenceProtocolCollectionInner.size() == 1); + CAF_CM_VALIDATE_STRING(localId); + + const bool isTunnelEnabled = isTunnelEnabledFunc(); + + std::deque rc; + std::deque persistenceProtocolCollectionInnerDiff; + std::deque persistenceProtocolCollectionInnerAll; + for (TConstIterator > persistenceProtocolIter(persistenceProtocolCollectionInner); + persistenceProtocolIter; persistenceProtocolIter++) { + const SmartPtrCPersistenceProtocolDoc persistenceProtocol = *persistenceProtocolIter; + + const std::string uriDiff = mergeUri(persistenceProtocol, localId, isTunnelEnabled); + const SmartPtrCCertCollectionDoc tlsCertCollectionDiff = + mergeTlsCertCollection(persistenceProtocol->getTlsCertCollection(), cacert); + + SmartPtrCPersistenceProtocolDoc persistenceProtocolDiff; + persistenceProtocolDiff.CreateInstance(); + persistenceProtocolDiff->initialize( + persistenceProtocol->getProtocolName(), + ! uriDiff.empty() ? uriDiff : persistenceProtocol->getUri(), + ! uriDiff.empty() && ! isTunnelEnabled ? uriDiff : persistenceProtocol->getUriAmqp(), + ! uriDiff.empty() && isTunnelEnabled ? uriDiff : persistenceProtocol->getUriTunnel(), + persistenceProtocol->getTlsCert(), + persistenceProtocol->getTlsProtocol(), + persistenceProtocol->getTlsCipherCollection(), + tlsCertCollectionDiff.IsNull() ? persistenceProtocol->getTlsCertCollection() : tlsCertCollectionDiff, + persistenceProtocol->getUriAmqpPath(), + persistenceProtocol->getUriTunnelPath(), + persistenceProtocol->getTlsCertPath(), + persistenceProtocol->getTlsCertPathCollection()); + persistenceProtocolCollectionInnerAll.push_back(persistenceProtocolDiff); + + CAF_CM_LOG_DEBUG_VA2("uriDiff=%s, isTunnelEnabled=%s", uriDiff.c_str(), isTunnelEnabled?"true":"false" ); + + if (! uriDiff.empty() || ! tlsCertCollectionDiff.IsNull()) { + persistenceProtocolCollectionInnerDiff.push_back(persistenceProtocolDiff); + } + } + + if (! persistenceProtocolCollectionInnerDiff.empty()) { + rc = persistenceProtocolCollectionInnerAll; + } + + return rc; +} + +std::string CConfigEnvMerge::mergeUri( + const SmartPtrCPersistenceProtocolDoc& persistenceProtocol, + const std::string& localId, + const bool isTunnelEnabled) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CConfigEnvMerge", "mergeUri"); + CAF_CM_VALIDATE_SMARTPTR(persistenceProtocol); + CAF_CM_VALIDATE_STRING(localId); + + const std::string uri = persistenceProtocol->getUri(); + const std::string uriNew = isTunnelEnabled ? + persistenceProtocol->getUriTunnel() : + persistenceProtocol->getUriAmqp(); + CAF_CM_VALIDATE_STRING(uriNew); + + CAF_CM_LOG_DEBUG_VA3("uri: %s, uriNew: %s, localId: %s", + uri.c_str(), uriNew.c_str(), localId.c_str()); + + UriUtils::SUriRecord uriDataNew; + UriUtils::parseUriString(uriNew, uriDataNew); + + std::string rc; + std::string pathNew(localId); + if (isTunnelEnabled) { + pathNew += "-agentId1"; + } + if ((uri.compare(uriNew) != 0) || (uriDataNew.path.compare(pathNew) != 0)) { + uriDataNew.path = pathNew; + rc = UriUtils::buildUriString(uriDataNew); + CAF_CM_LOG_DEBUG_VA4("uri changed - %s != %s || %s != %s", + uri.c_str(), rc.c_str(), pathNew.c_str(), uriDataNew.path.c_str()); + } + CAF_CM_LOG_DEBUG_VA1("rc: %s", rc.c_str()); + + return rc; +} + +SmartPtrCCertCollectionDoc CConfigEnvMerge::mergeTlsCertCollection( + const SmartPtrCCertCollectionDoc& tlsCertCollection, + const std::string& cacert) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CConfigEnvMerge", "mergeTlsCertCollection"); + CAF_CM_VALIDATE_SMARTPTR(tlsCertCollection); + + SmartPtrCCertCollectionDoc rc; + if (! cacert.empty()) { + const Cdeqstr tlsCertCollectionInner = tlsCertCollection->getCert(); + if (tlsCertCollectionInner.size() == 1) { + const std::string tlsCert = tlsCertCollectionInner.front(); + if (tlsCert.compare(cacert) != 0) { + CAF_CM_LOG_DEBUG_VA2("cacert changed - %s != %s", cacert.c_str(), tlsCert.c_str()); + + Cdeqstr tlsCertCollectionInnerTmp; + tlsCertCollectionInnerTmp.push_back(cacert); + + rc.CreateInstance(); + rc->initialize(tlsCertCollectionInnerTmp); + } + } + } + + return rc; +} + +bool CConfigEnvMerge::isTunnelEnabledFunc() { + CAF_CM_STATIC_FUNC_LOG("CConfigEnvMerge", "isTunnelEnabledFunc"); + + bool rc = false; + +#ifdef WIN32 + try { + WSADATA wsaData; + int result = ::WSAStartup(MAKEWORD(2, 2), &wsaData); + if (result != NO_ERROR) { + CAF_CM_EXCEPTION_VA0(E_UNEXPECTED, "WSAStartup() Failed"); + } + + SOCKADDR_IN socketClient; + memset(&socketClient, 0, sizeof(SOCKADDR_IN)); + socketClient.sin_family = AF_INET; + socketClient.sin_addr.s_addr = ::inet_addr("127.0.0.1"); + socketClient.sin_port = ::htons(6672); + + SOCKET socketFd = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (socketFd == INVALID_SOCKET) { + CAF_CM_EXCEPTION_VA1(E_UNEXPECTED, "Failed to open socket - %s", WSAGetLastError()); + } + + rc = (0 == ::connect(socketFd, (SOCKADDR*) &socketClient, sizeof(socketClient))); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + WSACleanup(); +#else + int socketFd = -1; + try { + socketFd = ::socket(AF_INET, SOCK_STREAM, 0); + if (socketFd < 0) { + CAF_CM_EXCEPTION_VA0(E_UNEXPECTED, "Failed to open socket"); + } + + struct sockaddr_in socketClient; + memset(&socketClient, 0, sizeof(sockaddr_in)); + socketClient.sin_family = AF_INET; + socketClient.sin_port = htons(6672); + + int result = ::inet_aton("127.0.0.1", &socketClient.sin_addr); + if (0 == result) { + CAF_CM_EXCEPTION_VA0(ERROR_PATH_NOT_FOUND, + "Failed to get address of 127.0.0.1"); + } + + rc = (0 == ::connect(socketFd, (struct sockaddr *) &socketClient, + sizeof(socketClient))); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + if (socketFd >= 0) { + ::close(socketFd); + } +#endif + + return rc; +} + +std::string CConfigEnvMerge::loadTextFile( + const std::string& path) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CConfigEnvMerge", "loadTextFile"); + CAF_CM_VALIDATE_STRING(path); + + std::string rc; + if (FileSystemUtils::doesFileExist(path)) { + rc = FileSystemUtils::loadTextFile(path); + rc = CStringUtils::trimRight(rc); + } else { + CAF_CM_LOG_DEBUG_VA1("File does not exist - %s", path.c_str()); + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.h new file mode 100644 index 000000000..50c66f2be --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.h @@ -0,0 +1,55 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_CConfigEnvMerge_h_ +#define _MaIntegration_CConfigEnvMerge_h_ + + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" + +using namespace Caf; + +/// TODO - describe class +class CConfigEnvMerge { +public: + static SmartPtrCPersistenceDoc mergePersistence( + const SmartPtrCPersistenceDoc& persistence, + const std::string& cacertPath, + const std::string& vcidPath); + +private: + static std::deque mergePersistenceProtocolCollectionInner( + const std::deque& persistenceProtocolCollectionInner, + const std::string& localId, + const std::string& cacert); + + static std::string mergeLocalId( + const SmartPtrCPersistenceDoc& persistence, + const std::string& vcidPath); + + static std::string mergeUri( + const SmartPtrCPersistenceProtocolDoc& persistenceProtocol, + const std::string& localId, + const bool isTunnelEnabled); + + static SmartPtrCCertCollectionDoc mergeTlsCertCollection( + const SmartPtrCCertCollectionDoc& tlsCertCollection, + const std::string& cacert); + +private: + static bool isTunnelEnabledFunc(); + + static std::string loadTextFile( + const std::string& path); + +private: + CAF_CM_DECLARE_NOCREATE(CConfigEnvMerge); +}; + +#endif // #ifndef _MaIntegration_CConfigEnvMerge_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.cpp new file mode 100644 index 000000000..34aa1501d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h" + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "IConfigEnv.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CConfigEnvMessageHandler.h" + +using namespace Caf; + +CConfigEnvMessageHandler::CConfigEnvMessageHandler() : + _isInitialized(false), + CAF_CM_INIT_LOG("CConfigEnvMessageHandler") { +} + +CConfigEnvMessageHandler::~CConfigEnvMessageHandler() { +} + +void CConfigEnvMessageHandler::initialize( + const SmartPtrIDocument& configSection, + const SmartPtrIConfigEnv& configEnv) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + CAF_CM_VALIDATE_SMARTPTR(configEnv); + + _id = configSection->findRequiredAttribute("id"); + + _configEnv = configEnv; + + _isInitialized = true; +} + +void CConfigEnvMessageHandler::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + + SmartPtrCPersistenceDoc persistence; + const std::string payloadStr = message->getPayloadStr(); + if (! payloadStr.empty()) { + persistence = XmlRoots::parsePersistenceFromString(payloadStr); + } + + _configEnv->update(persistence); +} + +SmartPtrIIntMessage CConfigEnvMessageHandler::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CConfigEnvMessageHandler::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} + +SmartPtrIIntMessage CConfigEnvMessageHandler::processErrorMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("processErrorMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + + //TODO: Verify that I'm receiving the error message and decide what + //to do with it. + + return SmartPtrIIntMessage(); +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.h new file mode 100644 index 000000000..c0a7f5d11 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMessageHandler.h @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_CConfigEnvMessageHandler_h_ +#define _MaIntegration_CConfigEnvMessageHandler_h_ + + +#include "Integration/IErrorProcessor.h" + +#include "IConfigEnv.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageHandler.h" + +namespace Caf { + +class CConfigEnvMessageHandler : + public IMessageHandler, + public IErrorProcessor { +public: + CConfigEnvMessageHandler(); + virtual ~CConfigEnvMessageHandler(); + +public: + CAF_BEGIN_QI() + CAF_QI_ENTRY(IMessageHandler) + CAF_QI_ENTRY(IErrorProcessor) + CAF_END_QI() + +public: + void initialize( + const SmartPtrIDocument& configSection, + const SmartPtrIConfigEnv& configEnv); + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + + SmartPtrIIntMessage getSavedMessage() const; + + void clearSavedMessage(); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + SmartPtrIConfigEnv _configEnv; + SmartPtrIIntMessage _savedMessage; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigEnvMessageHandler); +}; + +CAF_DECLARE_SMART_QI_POINTER(CConfigEnvMessageHandler); + +} + +#endif // #ifndef _MaIntegration_CConfigEnvMessageHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..ddd8a5f88 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.cpp @@ -0,0 +1,160 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CConfigEnvMessageHandler.h" +#include "Common/IAppContext.h" +#include "IBean.h" +#include "IConfigEnv.h" +#include "IPersistence.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IMessageHandler.h" +#include "CConfigEnvOutboundChannelAdapterInstance.h" + +using namespace Caf; + +CConfigEnvOutboundChannelAdapterInstance::CConfigEnvOutboundChannelAdapterInstance() : + _isInitialized(false), + _isRunning(false), + CAF_CM_INIT_LOG("CConfigEnvOutboundChannelAdapterInstance") { +} + +CConfigEnvOutboundChannelAdapterInstance::~CConfigEnvOutboundChannelAdapterInstance() { +} + +void CConfigEnvOutboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _configSection = configSection; + + _isInitialized = true; +} + +std::string CConfigEnvOutboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CConfigEnvOutboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + const std::string inputChannelStr = _configSection->findRequiredAttribute("channel"); + SmartPtrIMessageChannel inputChannel = channelResolver->resolveChannelName(inputChannelStr); + SmartPtrIIntegrationObject inputChannelObj; + inputChannelObj.QueryInterface(inputChannel); + + const SmartPtrIConfigEnv configEnv = createConfigEnv(appContext); + + SmartPtrCConfigEnvMessageHandler configEnvMessageHandler; + configEnvMessageHandler.CreateInstance(); + configEnvMessageHandler->initialize(_configSection, configEnv); + SmartPtrIMessageHandler messageHandler; + messageHandler.QueryInterface(configEnvMessageHandler); + + _messagingTemplate.CreateInstance(); + _messagingTemplate->initialize( + channelResolver, + inputChannelObj, + errorMessageChannel, + SmartPtrIMessageChannel(), + messageHandler); +} + +void CConfigEnvOutboundChannelAdapterInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(!_isRunning); + + _isRunning = true; + _messagingTemplate->start(0); +} + +void CConfigEnvOutboundChannelAdapterInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_isRunning); + + _isRunning = false; + _messagingTemplate->stop(0); +} + +bool CConfigEnvOutboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _isRunning; +} + +SmartPtrIConfigEnv CConfigEnvOutboundChannelAdapterInstance::createConfigEnv( + const SmartPtrIAppContext& appContext) const { + CAF_CM_FUNCNAME_VALIDATE("createConfigEnv"); + CAF_CM_VALIDATE_INTERFACE(appContext); + + const SmartPtrIPersistence persistenceRemove = createOptPersistence(appContext); + + SmartPtrIConfigEnv rc; + const std::string refStr = _configSection->findRequiredAttribute("ref"); + CAF_CM_LOG_DEBUG_VA1("Creating the configenv impl - %s", refStr.c_str()); + const SmartPtrIBean bean = appContext->getBean(refStr); + rc.QueryInterface(bean, false); + CAF_CM_VALIDATE_INTERFACE(rc); + rc->initialize(persistenceRemove); + + return rc; +} + +SmartPtrIPersistence CConfigEnvOutboundChannelAdapterInstance::createOptPersistence( + const SmartPtrIAppContext& appContext) const { + CAF_CM_FUNCNAME("createOptPersistence"); + CAF_CM_VALIDATE_INTERFACE(appContext); + + SmartPtrIPersistence rc; + const std::string removeRefStr = _configSection->findOptionalAttribute("remove-ref"); + if (! removeRefStr.empty()) { + CAF_CM_LOG_DEBUG_VA1("Creating the persistence impl - %s", removeRefStr.c_str()); + const SmartPtrIBean bean = appContext->getBean(removeRefStr); + rc.QueryInterface(bean, false); + CAF_CM_VALIDATE_INTERFACE(rc); + + try { + rc->initialize(); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_WARN_VA2("initialize failed - ref: %s, msg: %s", + removeRefStr.c_str(), (CAF_CM_EXCEPTION_GET_FULLMSG).c_str()); + rc = SmartPtrIPersistence(); + CAF_CM_CLEAREXCEPTION; + } + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.h new file mode 100644 index 000000000..0abaab42a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvOutboundChannelAdapterInstance.h @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CConfigEnvOutboundChannelAdapterInstance_h_ +#define CConfigEnvOutboundChannelAdapterInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "IConfigEnv.h" +#include "IPersistence.h" +#include "Integration/Core/CMessagingTemplate.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" + +namespace Caf { + +class CConfigEnvOutboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle { +public: + CConfigEnvOutboundChannelAdapterInstance(); + virtual ~CConfigEnvOutboundChannelAdapterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + + void stop(const uint32 timeoutMs); + + bool isRunning() const; + +private: + SmartPtrIConfigEnv createConfigEnv( + const SmartPtrIAppContext& appContext) const; + + SmartPtrIPersistence createOptPersistence( + const SmartPtrIAppContext& appContext) const; + +private: + bool _isInitialized; + bool _isRunning; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrCMessagingTemplate _messagingTemplate; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CConfigEnvOutboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CConfigEnvOutboundChannelAdapterInstance); +} + +#endif // #ifndef CConfigEnvOutboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.cpp new file mode 100644 index 000000000..93a8b1d59 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvReadingMessageSource.cpp @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "IConfigEnv.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CConfigEnvReadingMessageSource.h" +#include "Exception/CCafException.h" +#include "Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h" + +using namespace Caf; + +CConfigEnvReadingMessageSource::CConfigEnvReadingMessageSource() : + _isInitialized(false), + CAF_CM_INIT_LOG("CConfigEnvReadingMessageSource") { +} + +CConfigEnvReadingMessageSource::~CConfigEnvReadingMessageSource() { +} + +void CConfigEnvReadingMessageSource::initialize( + const SmartPtrIDocument& configSection, + const SmartPtrIConfigEnv& configEnv) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + CAF_CM_VALIDATE_INTERFACE(configEnv); + + _id = configSection->findRequiredAttribute("id"); + const SmartPtrIDocument pollerDoc = configSection->findOptionalChild("poller"); + + _configEnv = configEnv; + + setPollerMetadata(pollerDoc); + + _isInitialized = true; +} + +bool CConfigEnvReadingMessageSource::doSend( + const SmartPtrIIntMessage&, + int32) { + CAF_CM_FUNCNAME("doSend"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOTIMPL, + "This is not a sending channel: %s", _id.c_str()); +} + +SmartPtrIIntMessage CConfigEnvReadingMessageSource::doReceive( + const int32 timeout) { + CAF_CM_FUNCNAME("receive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } + + SmartPtrIIntMessage message; + const SmartPtrCPersistenceDoc persistence = _configEnv->getUpdated(0); + if (! persistence.IsNull()) { + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(XmlRoots::savePersistenceToString(persistence), + IIntMessage::SmartPtrCHeaders(), IIntMessage::SmartPtrCHeaders()); + message = messageImpl; + } + + return message; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.cpp new file mode 100644 index 000000000..4e8c4ae74 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CDiagToMgmtRequestTransformer.h" + +using namespace Caf; + +CDiagToMgmtRequestTransformer::CDiagToMgmtRequestTransformer() : + _isInitialized(false), + CAF_CM_INIT_LOG("CDiagToMgmtRequestTransformer") { +} + +CDiagToMgmtRequestTransformer::~CDiagToMgmtRequestTransformer() { +} + +void CDiagToMgmtRequestTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CDiagToMgmtRequestTransformer::terminateBean() { +} + +void CDiagToMgmtRequestTransformer::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CDiagToMgmtRequestTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CDiagToMgmtRequestTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdDiagToMgmtRequestTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.h new file mode 100644 index 000000000..6a268adb2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformer.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CDiagToMgmtRequestTransformer_h_ +#define CDiagToMgmtRequestTransformer_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CDiagToMgmtRequestTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CDiagToMgmtRequestTransformer(); + virtual ~CDiagToMgmtRequestTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdDiagToMgmtRequestTransformer) + + CAF_BEGIN_INTERFACE_MAP(CDiagToMgmtRequestTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CDiagToMgmtRequestTransformer); +}; + +} + +#endif // #ifndef CDiagToMgmtRequestTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.cpp new file mode 100644 index 000000000..b3ded4351 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CDiagToMgmtRequestTransformerInstance.cpp @@ -0,0 +1,491 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/DiagRequestXml/DiagRequestXmlRoots.h" + +#include "CEnvelopeToPayloadTransformerInstance.h" +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestParameterDoc.h" +#include "Doc/DiagRequestDoc/CDiagRequestDoc.h" +#include "Doc/DiagTypesDoc/CDiagCollectInstancesDoc.h" +#include "Doc/DiagTypesDoc/CDiagDeleteValueCollectionDoc.h" +#include "Doc/DiagTypesDoc/CDiagDeleteValueDoc.h" +#include "Doc/DiagTypesDoc/CDiagSetValueCollectionDoc.h" +#include "Doc/DiagTypesDoc/CDiagSetValueDoc.h" +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CDiagToMgmtRequestTransformerInstance.h" +#include "Exception/CCafException.h" +#include "Integration/Caf/CCafMessageCreator.h" + +using namespace Caf; + +CDiagToMgmtRequestTransformerInstance::CDiagToMgmtRequestTransformerInstance() : + _isInitialized(false), + _fileAliasPrefix("diagFileAlias_"), + CAF_CM_INIT_LOG("CDiagToMgmtRequestTransformerInstance") { +} + +CDiagToMgmtRequestTransformerInstance::~CDiagToMgmtRequestTransformerInstance() { +} + +void CDiagToMgmtRequestTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CDiagToMgmtRequestTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CDiagToMgmtRequestTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CDiagToMgmtRequestTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string diagRequestXml = message->getPayloadStr(); + + CAF_CM_LOG_DEBUG_VA1("diagRequestXml - %s", diagRequestXml.c_str()); + + const SmartPtrCDiagRequestDoc diagRequestDoc = + XmlRoots::parseDiagRequestFromString(diagRequestXml); + + const SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollection = createMgmtCollectInstancesCollection( + diagRequestDoc->getBatch()->getCollectInstances()); + + const SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollection = createMgmtInvokeOperationCollection( + diagRequestDoc->getBatch()->getSetValueCollection(), diagRequestDoc->getBatch()->getDeleteValueCollection()); + + SmartPtrCMgmtBatchDoc mgmtBatch; + mgmtBatch.CreateInstance(); + mgmtBatch->initialize( + SmartPtrCMgmtCollectSchemaDoc(), + mgmtCollectInstancesCollection, + mgmtInvokeOperationCollection); + + SmartPtrCMgmtRequestDoc mgmtRequest; + mgmtRequest.CreateInstance(); + mgmtRequest->initialize( + diagRequestDoc->getClientId(), + diagRequestDoc->getRequestId(), + diagRequestDoc->getPmeId(), + diagRequestDoc->getRequestHeader(), + mgmtBatch, + SmartPtrCAttachmentCollectionDoc()); + + newMessage = CCafMessageCreator::create(mgmtRequest, message->getHeaders()); + } + CAF_CM_EXIT; + + return newMessage; +} + +SmartPtrCMgmtCollectInstancesCollectionDoc CDiagToMgmtRequestTransformerInstance::createMgmtCollectInstancesCollection( + const SmartPtrCDiagCollectInstancesDoc& diagCollectInstances) const { + CAF_CM_FUNCNAME_VALIDATE("createMgmtCollectInstancesCollection"); + + SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // diagCollectInstances is optional + + if (! diagCollectInstances.IsNull()) { + std::deque mgmtCollectInstancesCollectionInner; + + UUID jobId = diagCollectInstances->getJobId(); + const std::deque expandedFileAliasCollection = expandFileAliases(); + for(TConstIterator > expandedFileAliasIter(expandedFileAliasCollection); + expandedFileAliasIter; expandedFileAliasIter++) { + const SmartPtrSExpandedFileAlias expandedFileAlias = *expandedFileAliasIter; + + const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstances = + createCollectInstances(jobId, expandedFileAlias); + + mgmtCollectInstancesCollectionInner.push_back(mgmtCollectInstances); + + jobId = CStringUtils::createRandomUuidRaw(); + } + + mgmtCollectInstancesCollection.CreateInstance(); + mgmtCollectInstancesCollection->initialize( + mgmtCollectInstancesCollectionInner); + } + } + CAF_CM_EXIT; + + return mgmtCollectInstancesCollection; +} + +SmartPtrCMgmtInvokeOperationCollectionDoc CDiagToMgmtRequestTransformerInstance::createMgmtInvokeOperationCollection( + const SmartPtrCDiagSetValueCollectionDoc& diagSetValueCollection, + const SmartPtrCDiagDeleteValueCollectionDoc& diagDeleteValueCollection) const { + CAF_CM_FUNCNAME_VALIDATE("createMgmtInvokeOperationCollection"); + + SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // diagSetValueCollection is optional + // diagDeleteValueCollection is optional + + std::deque mgmtInvokeOperationCollectionInner; + + if (! diagSetValueCollection.IsNull()) { + const std::deque diagSetValueCollectionInner = + diagSetValueCollection->getSetValueCollection(); + for(TConstIterator > diagSetValueIter(diagSetValueCollectionInner); + diagSetValueIter; diagSetValueIter++) { + const SmartPtrCDiagSetValueDoc diagSetValue = *diagSetValueIter; + + const std::string fileAlias = diagSetValue->getFileAlias(); + const SmartPtrSExpandedFileAlias expandedFileAlias = expandFileAlias(fileAlias); + + const SmartPtrCPropertyDoc valueProperty = diagSetValue->getValue(); + const SmartPtrCOperationDoc setValueOperation = createSetValueOperation( + valueProperty->getName(), valueProperty->getValue(), expandedFileAlias); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation = createInvokeOperation( + diagSetValue->getJobId(), setValueOperation); + + mgmtInvokeOperationCollectionInner.push_back(mgmtInvokeOperation); + } + } + + if (! diagDeleteValueCollection.IsNull()) { + const std::deque diagDeleteValueCollectionInner = + diagDeleteValueCollection->getDeleteValueCollection(); + for(TConstIterator > diagDeleteValueIter(diagDeleteValueCollectionInner); + diagDeleteValueIter; diagDeleteValueIter++) { + const SmartPtrCDiagDeleteValueDoc diagDeleteValue = *diagDeleteValueIter; + + const std::string fileAlias = diagDeleteValue->getFileAlias(); + const SmartPtrSExpandedFileAlias expandedFileAlias = expandFileAlias(fileAlias); + + const SmartPtrCOperationDoc setValueOperation = createDeleteValueOperation( + diagDeleteValue->getValueName(), expandedFileAlias); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation = createInvokeOperation( + diagDeleteValue->getJobId(), setValueOperation); + + mgmtInvokeOperationCollectionInner.push_back(mgmtInvokeOperation); + } + } + + if (! mgmtInvokeOperationCollectionInner.empty()) { + mgmtInvokeOperationCollection.CreateInstance(); + mgmtInvokeOperationCollection->initialize( + mgmtInvokeOperationCollectionInner); + } + } + CAF_CM_EXIT; + + return mgmtInvokeOperationCollection; +} + +SmartPtrCMgmtCollectInstancesDoc CDiagToMgmtRequestTransformerInstance::createCollectInstances( + const UUID& jobId, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const { + CAF_CM_FUNCNAME_VALIDATE("createCollectInstances"); + + SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstances; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_GUID(jobId); + CAF_CM_VALIDATE_SMARTPTR(expandedFileAlias); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass; + fullyQualifiedClass.CreateInstance(); + fullyQualifiedClass->initialize("caf", "ConfigActions", "1.0.0"); + + SmartPtrCClassSpecifierDoc classSpecifier; + classSpecifier.CreateInstance(); + classSpecifier->initialize(fullyQualifiedClass, SmartPtrCClassFiltersDoc()); + + const SmartPtrCRequestParameterDoc filePathParameter = + ParameterUtils::createParameter("filePath", expandedFileAlias->_filePath); + const SmartPtrCRequestParameterDoc encodingParameter = + ParameterUtils::createParameter("encoding", expandedFileAlias->_encoding); + + std::deque parameterCollectionInner; + parameterCollectionInner.push_back(filePathParameter); + parameterCollectionInner.push_back(encodingParameter); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + parameterCollectionInner, std::deque()); + + mgmtCollectInstances.CreateInstance(); + mgmtCollectInstances->initialize(jobId, classSpecifier, parameterCollection); + } + CAF_CM_EXIT; + + return mgmtCollectInstances; +} + +SmartPtrCOperationDoc CDiagToMgmtRequestTransformerInstance::createSetValueOperation( + const std::string& valueName, + const std::deque& valueCollection, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const { + CAF_CM_FUNCNAME_VALIDATE("createSetValueOperation"); + + SmartPtrCOperationDoc operation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(valueName); + CAF_CM_VALIDATE_STL(valueCollection); + CAF_CM_VALIDATE_SMARTPTR(expandedFileAlias); + + const SmartPtrCRequestParameterDoc filePathParameter = + ParameterUtils::createParameter("filePath", expandedFileAlias->_filePath); + const SmartPtrCRequestParameterDoc encodingParameter = + ParameterUtils::createParameter("encoding", expandedFileAlias->_encoding); + const SmartPtrCRequestParameterDoc valueNameParameter = + ParameterUtils::createParameter("valueName", valueName); + const SmartPtrCRequestParameterDoc valueDataParameter = + ParameterUtils::createParameter("valueData", valueCollection); + + std::deque parameterCollectionInner; + parameterCollectionInner.push_back(filePathParameter); + parameterCollectionInner.push_back(encodingParameter); + parameterCollectionInner.push_back(valueNameParameter); + parameterCollectionInner.push_back(valueDataParameter); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + parameterCollectionInner, std::deque()); + + operation.CreateInstance(); + operation->initialize("setValue", parameterCollection); + } + CAF_CM_EXIT; + + return operation; +} + +SmartPtrCOperationDoc CDiagToMgmtRequestTransformerInstance::createDeleteValueOperation( + const std::string& valueName, + const SmartPtrSExpandedFileAlias& expandedFileAlias) const { + CAF_CM_FUNCNAME_VALIDATE("createDeleteValueOperation"); + + SmartPtrCOperationDoc operation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(valueName); + CAF_CM_VALIDATE_SMARTPTR(expandedFileAlias); + + const SmartPtrCRequestParameterDoc filePathParameter = + ParameterUtils::createParameter("filePath", expandedFileAlias->_filePath); + const SmartPtrCRequestParameterDoc encodingParameter = + ParameterUtils::createParameter("encoding", expandedFileAlias->_encoding); + const SmartPtrCRequestParameterDoc valueNameParameter = + ParameterUtils::createParameter("valueName", valueName); + + std::deque parameterCollectionInner; + parameterCollectionInner.push_back(filePathParameter); + parameterCollectionInner.push_back(encodingParameter); + parameterCollectionInner.push_back(valueNameParameter); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + parameterCollectionInner, std::deque()); + + operation.CreateInstance(); + operation->initialize("deleteValue", parameterCollection); + } + CAF_CM_EXIT; + + return operation; +} + +SmartPtrCMgmtInvokeOperationDoc CDiagToMgmtRequestTransformerInstance::createInvokeOperation( + const UUID& jobId, + const SmartPtrCOperationDoc operation) const { + CAF_CM_FUNCNAME_VALIDATE("createInvokeOperation"); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_GUID(jobId); + CAF_CM_VALIDATE_SMARTPTR(operation); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass; + fullyQualifiedClass.CreateInstance(); + fullyQualifiedClass->initialize("caf", "ConfigActions", "1.0.0"); + + SmartPtrCClassSpecifierDoc classSpecifier; + classSpecifier.CreateInstance(); + classSpecifier->initialize(fullyQualifiedClass, SmartPtrCClassFiltersDoc()); + + mgmtInvokeOperation.CreateInstance(); + mgmtInvokeOperation->initialize(jobId, classSpecifier, operation); + } + CAF_CM_EXIT; + + return mgmtInvokeOperation; +} + +std::deque +CDiagToMgmtRequestTransformerInstance::expandFileAliases() const { + CAF_CM_FUNCNAME_VALIDATE("expandFileAliases"); + + std::deque expandedFileAliasCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string diagFileAliases = AppConfigUtils::getRequiredString("provider", "diagFileAliases"); + const Cdeqstr diagFileAliasCollection = CStringUtils::split(diagFileAliases, ':'); + + for(TConstIterator diagFileAliasIter(diagFileAliasCollection); + diagFileAliasIter; diagFileAliasIter++) { + const std::string fileAlias = *diagFileAliasIter; + + const SmartPtrSExpandedFileAlias expandedFileAlias = expandFileAlias(fileAlias); + if (! expandedFileAlias.IsNull()) { + expandedFileAliasCollection.push_back(expandedFileAlias); + } + } + } + CAF_CM_EXIT; + + return expandedFileAliasCollection; +} + +CDiagToMgmtRequestTransformerInstance::SmartPtrSExpandedFileAlias +CDiagToMgmtRequestTransformerInstance::expandFileAlias( + const std::string& fileAlias) const { + CAF_CM_FUNCNAME_VALIDATE("expandFileAlias"); + + SmartPtrSExpandedFileAlias expandedFileAlias; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string fullFileAlias = _fileAliasPrefix + fileAlias; + const std::string diagFileUriStr = AppConfigUtils::getOptionalString("provider", fullFileAlias); + + if (diagFileUriStr.empty()) { + CAF_CM_LOG_WARN_VA1( + "Diag file alias not found in appconfig file - alias: %s", fullFileAlias.c_str()); + } else { + UriUtils::SUriRecord diagFileUri; + UriUtils::parseUriString(diagFileUriStr, diagFileUri); + if (diagFileUri.protocol.compare("file") != 0) { + CAF_CM_LOG_WARN_VA2( + "Diag file alias URI must use \'file\' protocol - alias: %s, uri: %s", + fullFileAlias.c_str(), diagFileUriStr.c_str()) + } else { + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(diagFileUri.address, fileUriRecord); + + const std::string diagFile = fileUriRecord.path; + if (! FileSystemUtils::doesFileExist(diagFile)) { + CAF_CM_LOG_WARN_VA2( + "Diag file alias file not found - alias: %s, file: %s", + fullFileAlias.c_str(), diagFile.c_str()); + } else { + expandedFileAlias.CreateInstance(); + expandedFileAlias->_filePath = diagFile; + expandedFileAlias->_encoding = findUriParameter("encoding", diagFileUri); + } + } + } + } + CAF_CM_EXIT; + + return expandedFileAlias; +} + +std::string CDiagToMgmtRequestTransformerInstance::findUriParameter( + const std::string& parameterName, + const UriUtils::SUriRecord& uri) const { + CAF_CM_FUNCNAME("findUriParameter"); + + std::string parameterValue; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(parameterName); + + std::map parameters = uri.parameters; + std::map::const_iterator iterParameter = parameters.find(parameterName); + if (iterParameter == parameters.end()) { + CAF_CM_EXCEPTIONEX_VA3(InvalidArgumentException, E_INVALIDARG, + "URI does not contain required parameter - parameter: %s, protocol: %s, address: %s", + parameterName.c_str(), uri.protocol.c_str(), uri.address.c_str()); + } + + parameterValue = iterParameter->second; + } + CAF_CM_EXIT; + + return parameterValue; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.cpp new file mode 100644 index 000000000..ab9620420 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CInstallToMgmtRequestTransformer.h" + +using namespace Caf; + +CInstallToMgmtRequestTransformer::CInstallToMgmtRequestTransformer() : + _isInitialized(false), + CAF_CM_INIT_LOG("CInstallToMgmtRequestTransformer") { +} + +CInstallToMgmtRequestTransformer::~CInstallToMgmtRequestTransformer() { +} + +void CInstallToMgmtRequestTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CInstallToMgmtRequestTransformer::terminateBean() { +} + +void CInstallToMgmtRequestTransformer::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CInstallToMgmtRequestTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CInstallToMgmtRequestTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdInstallToMgmtRequestTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.h new file mode 100644 index 000000000..8a4772fbc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformer.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CInstallToMgmtRequestTransformer_h_ +#define CInstallToMgmtRequestTransformer_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CInstallToMgmtRequestTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CInstallToMgmtRequestTransformer(); + virtual ~CInstallToMgmtRequestTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdInstallToMgmtRequestTransformer) + + CAF_BEGIN_INTERFACE_MAP(CInstallToMgmtRequestTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CInstallToMgmtRequestTransformer); +}; + +} + +#endif // #ifndef CInstallToMgmtRequestTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.cpp new file mode 100644 index 000000000..4cad013f8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.cpp @@ -0,0 +1,385 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/CafInstallRequestXml/InstallProviderJobXml.h" +#include "Doc/DocXml/CafInstallRequestXml/UninstallProviderJobXml.h" + +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/CafCoreTypesDoc/CParameterCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestInstanceParameterDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestParameterDoc.h" +#include "Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallRequestDoc.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Xml/XmlUtils/CXmlElement.h" +#include "Exception/CCafException.h" +#include "CInstallToMgmtRequestTransformerInstance.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" +#include "Integration/Caf/CCafMessageCreator.h" + +using namespace Caf; + +CInstallToMgmtRequestTransformerInstance::CInstallToMgmtRequestTransformerInstance() : + _isInitialized(false), + _fileAliasPrefix("installFileAlias_"), + CAF_CM_INIT_LOG("CInstallToMgmtRequestTransformerInstance") { +} + +CInstallToMgmtRequestTransformerInstance::~CInstallToMgmtRequestTransformerInstance() { +} + +void CInstallToMgmtRequestTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CInstallToMgmtRequestTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CInstallToMgmtRequestTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CInstallToMgmtRequestTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCInstallRequestDoc installRequestDoc = + CCafMessagePayloadParser::getInstallRequest(message->getPayload()); + + const SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollection = createMgmtCollectInstancesCollection( + installRequestDoc->getBatch()->getGetInventory()); + + const SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollection = createMgmtInvokeOperationCollection( + installRequestDoc->getBatch()->getInstallProvider(), installRequestDoc->getBatch()->getUninstallProvider()); + + SmartPtrCMgmtBatchDoc mgmtBatch; + mgmtBatch.CreateInstance(); + mgmtBatch->initialize( + SmartPtrCMgmtCollectSchemaDoc(), + mgmtCollectInstancesCollection, + mgmtInvokeOperationCollection); + + SmartPtrCMgmtRequestDoc mgmtRequest; + mgmtRequest.CreateInstance(); + mgmtRequest->initialize( + installRequestDoc->getClientId(), + installRequestDoc->getRequestId(), + installRequestDoc->getPmeId(), + installRequestDoc->getRequestHeader(), + mgmtBatch, + installRequestDoc->getAttachmentCollection()); + + newMessage = CCafMessageCreator::create(mgmtRequest, message->getHeaders()); + } + CAF_CM_EXIT; + + return newMessage; +} + +SmartPtrCMgmtCollectInstancesCollectionDoc CInstallToMgmtRequestTransformerInstance::createMgmtCollectInstancesCollection( + const SmartPtrCGetInventoryJobDoc& getInventoryJob) const { + CAF_CM_FUNCNAME_VALIDATE("createMgmtCollectInstancesCollection"); + + SmartPtrCMgmtCollectInstancesCollectionDoc mgmtCollectInstancesCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // getInventoryJob is optional + + if (! getInventoryJob.IsNull()) { + UUID jobId = getInventoryJob->getJobId(); + const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstances = + createCollectInstances(jobId); + + std::deque mgmtCollectInstancesCollectionInner; + mgmtCollectInstancesCollectionInner.push_back(mgmtCollectInstances); + + mgmtCollectInstancesCollection.CreateInstance(); + mgmtCollectInstancesCollection->initialize( + mgmtCollectInstancesCollectionInner); + } + } + CAF_CM_EXIT; + + return mgmtCollectInstancesCollection; +} + +SmartPtrCMgmtInvokeOperationCollectionDoc CInstallToMgmtRequestTransformerInstance::createMgmtInvokeOperationCollection( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) const { + CAF_CM_FUNCNAME_VALIDATE("createMgmtInvokeOperationCollection"); + + SmartPtrCMgmtInvokeOperationCollectionDoc mgmtInvokeOperationCollection; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // installSetValueCollection is optional + // installDeleteValueCollection is optional + + std::deque mgmtInvokeOperationCollectionInner; + + if (! installProviderJob.IsNull()) { + const SmartPtrCOperationDoc installProviderJobOperation = createInstallProviderOperation(installProviderJob); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation = createInvokeOperation(installProviderJobOperation); + + mgmtInvokeOperationCollectionInner.push_back(mgmtInvokeOperation); + } + + if (! uninstallProviderJob.IsNull()) { + const SmartPtrCOperationDoc uninstallProviderJobOperation = createUninstallProviderJobOperation(uninstallProviderJob); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation = createInvokeOperation(uninstallProviderJobOperation); + + mgmtInvokeOperationCollectionInner.push_back(mgmtInvokeOperation); + } + + if (! mgmtInvokeOperationCollectionInner.empty()) { + mgmtInvokeOperationCollection.CreateInstance(); + mgmtInvokeOperationCollection->initialize( + mgmtInvokeOperationCollectionInner); + } + } + CAF_CM_EXIT; + + return mgmtInvokeOperationCollection; +} + +SmartPtrCMgmtCollectInstancesDoc CInstallToMgmtRequestTransformerInstance::createCollectInstances( + const UUID& jobId) const { + CAF_CM_FUNCNAME_VALIDATE("createCollectInstances"); + + SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstances; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_GUID(jobId); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass; + fullyQualifiedClass.CreateInstance(); + fullyQualifiedClass->initialize("caf", "InstallActions", "1.0.0"); + + SmartPtrCClassSpecifierDoc classSpecifier; + classSpecifier.CreateInstance(); + classSpecifier->initialize(fullyQualifiedClass, SmartPtrCClassFiltersDoc()); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + std::deque(), + std::deque()); + + mgmtCollectInstances.CreateInstance(); + mgmtCollectInstances->initialize(jobId, classSpecifier, parameterCollection); + } + CAF_CM_EXIT; + + return mgmtCollectInstances; +} + +SmartPtrCOperationDoc CInstallToMgmtRequestTransformerInstance::createInstallProviderOperation( + const SmartPtrCInstallProviderJobDoc& installProviderJob) const { + CAF_CM_FUNCNAME_VALIDATE("createInstallProviderOperation"); + + SmartPtrCOperationDoc operation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(installProviderJob); + + const std::string installProviderJobStr = + saveInstallProviderJobToString(installProviderJob); + std::deque valueCollection; + valueCollection.push_back(installProviderJobStr); + + SmartPtrCRequestInstanceParameterDoc instanceParameter; + instanceParameter.CreateInstance(); + instanceParameter->initialize( + "installProviderJob", "caf", "InstallProviderJob", "1.0.0", valueCollection); + + std::deque instanceParameterCollectionInner; + instanceParameterCollectionInner.push_back(instanceParameter); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + std::deque(), instanceParameterCollectionInner); + + operation.CreateInstance(); + operation->initialize("installProviderJob", parameterCollection); + } + CAF_CM_EXIT; + + return operation; +} + +SmartPtrCOperationDoc CInstallToMgmtRequestTransformerInstance::createUninstallProviderJobOperation( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) const { + CAF_CM_FUNCNAME_VALIDATE("createUninstallProviderJobOperation"); + + SmartPtrCOperationDoc operation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(uninstallProviderJob); + + const std::string& uninstallProviderJobJobStr = + saveUninstallProviderJobToString(uninstallProviderJob); + std::deque valueCollection; + valueCollection.push_back(uninstallProviderJobJobStr); + + SmartPtrCRequestInstanceParameterDoc instanceParameter; + instanceParameter.CreateInstance(); + instanceParameter->initialize( + "uninstallProviderJob", "caf", "InstallProviderJob", "1.0.0", valueCollection); + + std::deque instanceParameterCollectionInner; + instanceParameterCollectionInner.push_back(instanceParameter); + + SmartPtrCParameterCollectionDoc parameterCollection; + parameterCollection.CreateInstance(); + parameterCollection->initialize( + std::deque(), instanceParameterCollectionInner); + + operation.CreateInstance(); + operation->initialize("uninstallProviderJob", parameterCollection); + } + CAF_CM_EXIT; + + return operation; +} + +SmartPtrCMgmtInvokeOperationDoc CInstallToMgmtRequestTransformerInstance::createInvokeOperation( + const SmartPtrCOperationDoc& operation) const { + CAF_CM_FUNCNAME("createInvokeOperation"); + + SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(operation); + + SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass; + fullyQualifiedClass.CreateInstance(); + fullyQualifiedClass->initialize("caf", "InstallActions", "1.0.0"); + + SmartPtrCClassSpecifierDoc classSpecifier; + classSpecifier.CreateInstance(); + classSpecifier->initialize(fullyQualifiedClass, SmartPtrCClassFiltersDoc()); + + UUID jobId; + if (S_OK != ::UuidCreate(&jobId)) { + CAF_CM_EXCEPTIONEX_VA0(InvalidHandleException, E_UNEXPECTED, + "Failed to create the UUID"); + } + + mgmtInvokeOperation.CreateInstance(); + mgmtInvokeOperation->initialize(jobId, classSpecifier, operation); + } + CAF_CM_EXIT; + + return mgmtInvokeOperation; +} + +std::string CInstallToMgmtRequestTransformerInstance::saveInstallProviderJobToString( + const SmartPtrCInstallProviderJobDoc& installProviderJob) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveInstallProviderJobToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(installProviderJob); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "cafInstallProviderJob", schemaNamespace); + InstallProviderJobXml::add(installProviderJob, rootXml); + + rc = rootXml->saveToStringRaw(); + } + CAF_CM_EXIT; + + return rc; +} + +std::string CInstallToMgmtRequestTransformerInstance::saveUninstallProviderJobToString( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) { + CAF_CM_STATIC_FUNC_VALIDATE("XmlRoots", "saveUninstallProviderJobToString"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(uninstallProviderJob); + + const std::string schemaNamespace = DocXmlUtils::getSchemaNamespace("fx"); + + const SmartPtrCXmlElement rootXml = CXmlUtils::createRootElement( + "cafUninstallProviderJob", schemaNamespace); + UninstallProviderJobXml::add(uninstallProviderJob, rootXml); + + rc = rootXml->saveToStringRaw(); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.h new file mode 100644 index 000000000..6feddf68d --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CInstallToMgmtRequestTransformerInstance.h @@ -0,0 +1,106 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CInstallToMgmtRequestTransformerInstance_h_ +#define CInstallToMgmtRequestTransformerInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/COperationDoc.h" +#include "Doc/CafInstallRequestDoc/CGetInventoryJobDoc.h" +#include "Doc/CafInstallRequestDoc/CInstallProviderJobDoc.h" +#include "Doc/CafInstallRequestDoc/CUninstallProviderJobDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CInstallToMgmtRequestTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { + +public: + CInstallToMgmtRequestTransformerInstance(); + virtual ~CInstallToMgmtRequestTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdInstallToMgmtRequestTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CInstallToMgmtRequestTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrCMgmtCollectInstancesCollectionDoc createMgmtCollectInstancesCollection( + const SmartPtrCGetInventoryJobDoc& getInventoryJob) const; + + SmartPtrCMgmtInvokeOperationCollectionDoc createMgmtInvokeOperationCollection( + const SmartPtrCInstallProviderJobDoc& installProviderJob, + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) const; + + SmartPtrCMgmtCollectInstancesDoc createCollectInstances( + const UUID& jobId) const; + + SmartPtrCMgmtInvokeOperationDoc createInvokeOperation( + const SmartPtrCOperationDoc& operation) const; + + SmartPtrCOperationDoc createInstallProviderOperation( + const SmartPtrCInstallProviderJobDoc& installProviderJob) const; + + SmartPtrCOperationDoc createUninstallProviderJobOperation( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob) const; + + static std::string saveInstallProviderJobToString( + const SmartPtrCInstallProviderJobDoc& installProviderJob); + + static std::string saveUninstallProviderJobToString( + const SmartPtrCUninstallProviderJobDoc& uninstallProviderJob); + +private: + bool _isInitialized; + std::string _id; + + std::string _fileAliasPrefix; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CInstallToMgmtRequestTransformerInstance); +}; + +} + +#endif // #ifndef CInstallToMgmtRequestTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorInboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorInboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..8e572beac --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorInboundChannelAdapterInstance.cpp @@ -0,0 +1,124 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CMonitorReadingMessageSource.h" +#include "Common/IAppContext.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/Core/CMessageHandler.h" +#include "Integration/Core/CSimpleAsyncTaskExecutor.h" +#include "Integration/Core/CSourcePollingChannelAdapter.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IMessageChannel.h" +#include "CMonitorInboundChannelAdapterInstance.h" + +using namespace Caf; + +CMonitorInboundChannelAdapterInstance::CMonitorInboundChannelAdapterInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CMonitorInboundChannelAdapterInstance") { +} + +CMonitorInboundChannelAdapterInstance::~CMonitorInboundChannelAdapterInstance() { +} + +void CMonitorInboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; +} + +std::string CMonitorInboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CMonitorInboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const std::string outputChannelStr = + _configSection->findRequiredAttribute("channel"); + + SmartPtrCMonitorReadingMessageSource monitorReadingMessageSource; + monitorReadingMessageSource.CreateInstance(); + monitorReadingMessageSource->initialize(_configSection); + + const SmartPtrIMessageChannel outputMessageChannel = + channelResolver->resolveChannelName(outputChannelStr); + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _id, + outputMessageChannel, + SmartPtrICafObject()); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize( + messageHandler, monitorReadingMessageSource, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(sourcePollingChannelAdapter, errorHandler); + _taskExecutor = simpleAsyncTaskExecutor; +} + +void CMonitorInboundChannelAdapterInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Starting the executor"); + _taskExecutor->execute(timeoutMs); +} + +void CMonitorInboundChannelAdapterInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Stopping the executor"); + _taskExecutor->cancel(timeoutMs); +} + +bool CMonitorInboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const bool rc = (_taskExecutor->getState() == ITaskExecutor::ETaskStateStarted); + return rc; +} + +bool CMonitorInboundChannelAdapterInstance::isMessageProducer() const { + CAF_CM_FUNCNAME_VALIDATE("isMessageProducer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return true; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorInboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorInboundChannelAdapterInstance.h new file mode 100644 index 000000000..ab71bb3f1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorInboundChannelAdapterInstance.h @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CMonitorInboundChannelAdapterInstance_h_ +#define CMonitorInboundChannelAdapterInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/ITaskExecutor.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" +#include "Integration/IMessageProducer.h" + +namespace Caf { + +class CMonitorInboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IMessageProducer { +public: + CMonitorInboundChannelAdapterInstance(); + virtual ~CMonitorInboundChannelAdapterInstance(); + +public: + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IMessageProducer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IMessageProducer + bool isMessageProducer() const; + +private: + bool _isInitialized; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrITaskExecutor _taskExecutor; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CMonitorInboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CMonitorInboundChannelAdapterInstance); + +} + +#endif // #ifndef CMonitorInboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorReadingMessageSource.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorReadingMessageSource.cpp new file mode 100644 index 000000000..e31b09c91 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CMonitorReadingMessageSource.cpp @@ -0,0 +1,227 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Core/CIntMessage.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CMonitorReadingMessageSource.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +CMonitorReadingMessageSource::CMonitorReadingMessageSource() : + _isInitialized(false), + _listenerStartTimeMs(0), + _listenerRestartMs(0), + _listenerRetryCnt(0), + _listenerRetryMax(0), + CAF_CM_INIT_LOG("CMonitorReadingMessageSource") { +} + +CMonitorReadingMessageSource::~CMonitorReadingMessageSource() { +} + +void CMonitorReadingMessageSource::initialize( + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const SmartPtrIDocument pollerDoc = configSection->findOptionalChild("poller"); + setPollerMetadata(pollerDoc); + + _monitorDir = AppConfigUtils::getRequiredString("monitor_dir"); + _restartListenerPath = FileSystemUtils::buildPath(_monitorDir, "restartListener.txt"); + _listenerConfiguredStage2Path = FileSystemUtils::buildPath(_monitorDir, "listenerConfiguredStage2.txt"); + + _scriptOutputDir = AppConfigUtils::getRequiredString(_sConfigTmpDir); + _listenerStartupType = AppConfigUtils::getRequiredString("monitor", "listener_startup_type"); + _listenerRetryMax = AppConfigUtils::getRequiredInt32("monitor", "listener_retry_max"); + + _listenerRestartMs = calcListenerRestartMs(); + CAF_CM_LOG_DEBUG_VA1("_listenerRestartMs: %d", _listenerRestartMs); + + const std::string scriptsDir = AppConfigUtils::getRequiredString("scripts_dir"); +#ifdef _WIN32 + _stopListenerScript = FileSystemUtils::buildPath(scriptsDir, "stop-listener.bat"); + _startListenerScript = FileSystemUtils::buildPath(scriptsDir, "start-listener.bat"); + _isListenerRunningScript = FileSystemUtils::buildPath(scriptsDir, "is-listener-running.bat"); +#else + _stopListenerScript = FileSystemUtils::buildPath(scriptsDir, "stop-listener"); + _startListenerScript = FileSystemUtils::buildPath(scriptsDir, "start-listener"); + _isListenerRunningScript = FileSystemUtils::buildPath(scriptsDir, "is-listener-running"); +#endif + + if (! FileSystemUtils::doesDirectoryExist(_monitorDir)) { + FileSystemUtils::createDirectory(_monitorDir); + } + _isInitialized = true; +} + +bool CMonitorReadingMessageSource::doSend( + const SmartPtrIIntMessage&, + int32) { + CAF_CM_FUNCNAME("doSend"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOTIMPL, + "This is not a sending channel: %s", _id.c_str()); +} + +SmartPtrIIntMessage CMonitorReadingMessageSource::doReceive( + const int32 timeout) { + CAF_CM_FUNCNAME("doReceive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } + + std::string reason; + if (FileSystemUtils::doesFileExist(_listenerConfiguredStage2Path)) { + if (FileSystemUtils::doesFileExist(_restartListenerPath)) { + reason = FileSystemUtils::loadTextFile(_restartListenerPath); + FileSystemUtils::removeFile(_restartListenerPath); + _listenerRetryCnt = 0; + _listenerStartTimeMs = CDateTimeUtils::getTimeMs(); + restartListener(reason); + } else { + if (isListenerRunning()) { + _listenerRetryCnt = 0; + if (areSystemResourcesLow()) { + reason = "Listener running... Stopping due to low system resources"; + stopListener(reason); + } else if (isTimeForListenerRestart()) { + reason = "Listener running... Restarting due to expired timeout"; + _listenerStartTimeMs = CDateTimeUtils::getTimeMs(); + restartListener(reason); + } + } else { + if (_listenerStartupType.compare("Automatic") == 0) { + if ((_listenerRetryMax < 0) || (_listenerRetryCnt < _listenerRetryMax)) { + reason = "Listener not running... Starting - " + + CStringConv::toString(_listenerRetryCnt + 1) + " of " + + CStringConv::toString(_listenerRetryMax); + _listenerRetryCnt++; + _listenerStartTimeMs = CDateTimeUtils::getTimeMs(); + startListener(reason); + } else { + reason = "Listener not running... Retries exhausted - " + + CStringConv::toString(_listenerRetryCnt + 1) + " of " + + CStringConv::toString(_listenerRetryMax); + CAF_CM_LOG_WARN_VA0(reason.c_str()); + } + } else { + reason = "Listener not running... Not Automatic startup - " + _listenerStartupType; + CAF_CM_LOG_WARN_VA0(reason.c_str()); + _listenerRetryCnt = 0; + } + } + } + } else { + reason = "Listener not configured"; + _listenerRetryCnt = 0; + } + + SmartPtrCIntMessage messageImpl; + if (! reason.empty()) { + messageImpl.CreateInstance(); + messageImpl->initializeStr(reason, + IIntMessage::SmartPtrCHeaders(), IIntMessage::SmartPtrCHeaders()); + } + + return messageImpl; +} + +bool CMonitorReadingMessageSource::isListenerRunning() const { + const std::string stdoutStr = executeScript(_isListenerRunningScript, _scriptOutputDir); + return (stdoutStr.compare("true") == 0); +} + +void CMonitorReadingMessageSource::startListener( + const std::string& reason) const { + CAF_CM_FUNCNAME_VALIDATE("startListener"); + + CAF_CM_LOG_DEBUG_VA1( + "Starting the listener - reason: %s", reason.c_str()); + executeScript(_startListenerScript, _scriptOutputDir); +} + +void CMonitorReadingMessageSource::stopListener( + const std::string& reason) const { + CAF_CM_FUNCNAME_VALIDATE("stopListener"); + + CAF_CM_LOG_DEBUG_VA1( + "Stopping the listener - reason: %s", reason.c_str()); + executeScript(_stopListenerScript, _scriptOutputDir); +} + +void CMonitorReadingMessageSource::restartListener( + const std::string& reason) const { + CAF_CM_FUNCNAME_VALIDATE("restartListener"); + + CAF_CM_LOG_DEBUG_VA1( + "Restarting the listener - reason: %s", reason.c_str()); + executeScript(_stopListenerScript, _scriptOutputDir); + executeScript(_startListenerScript, _scriptOutputDir); +} + +std::string CMonitorReadingMessageSource::executeScript( + const std::string& scriptPath, + const std::string& scriptResultsDir) const { + CAF_CM_FUNCNAME_VALIDATE("executeScript"); + CAF_CM_VALIDATE_STRING(scriptPath); + CAF_CM_VALIDATE_STRING(scriptResultsDir); + + Cdeqstr argv; + argv.push_back(scriptPath); + + const std::string stdoutPath = FileSystemUtils::buildPath( + scriptResultsDir, "stdout"); + const std::string stderrPath = FileSystemUtils::buildPath( + scriptResultsDir, "stderr"); + + ProcessUtils::runSyncToFiles(argv, stdoutPath, stderrPath); + + std::string rc; + if (FileSystemUtils::doesFileExist(stdoutPath)) { + rc = FileSystemUtils::loadTextFile(stdoutPath); + } + + return rc; +} + +bool CMonitorReadingMessageSource::areSystemResourcesLow() const { + // TODO: Implement + return false; +} + +bool CMonitorReadingMessageSource::isTimeForListenerRestart() const { + return (_listenerRestartMs > 0) && (CDateTimeUtils::calcRemainingTime(_listenerStartTimeMs, _listenerRestartMs) == 0); +} + +uint64 CMonitorReadingMessageSource::calcListenerRestartMs() const { + const uint32 listenerRestartDays = AppConfigUtils::getOptionalUint32("monitor", "listener_restart_days"); + const uint32 listenerRestartHours = AppConfigUtils::getOptionalUint32("monitor", "listener_restart_hours"); + const uint32 listenerRestartMins = AppConfigUtils::getOptionalUint32("monitor", "listener_restart_mins"); + const uint32 listenerRestartSecs = AppConfigUtils::getOptionalUint32("monitor", "listener_restart_secs"); + + uint64 rc = 0; + rc = (rc == 0) && (listenerRestartDays > 0) ? CTimeUnit::DAYS::toMilliseconds(listenerRestartDays) : rc; + rc = (rc == 0) && (listenerRestartHours > 0) ? CTimeUnit::HOURS::toMilliseconds(listenerRestartHours) : rc; + rc = (rc == 0) && (listenerRestartMins > 0) ? CTimeUnit::MINUTES::toMilliseconds(listenerRestartMins) : rc; + rc = (rc == 0) && (listenerRestartSecs > 0) ? CTimeUnit::SECONDS::toMilliseconds(listenerRestartSecs) : rc; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..6962b3abb --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.cpp @@ -0,0 +1,162 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CPersistenceReadingMessageSource.h" +#include "Common/IAppContext.h" +#include "IBean.h" +#include "IPersistence.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/Core/CMessageHandler.h" +#include "Integration/Core/CSimpleAsyncTaskExecutor.h" +#include "Integration/Core/CSourcePollingChannelAdapter.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IMessageChannel.h" +#include "CPersistenceInboundChannelAdapterInstance.h" + +using namespace Caf; + +CPersistenceInboundChannelAdapterInstance::CPersistenceInboundChannelAdapterInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CPersistenceInboundChannelAdapterInstance") { +} + +CPersistenceInboundChannelAdapterInstance::~CPersistenceInboundChannelAdapterInstance() { +} + +void CPersistenceInboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + _configSection = configSection; + _id = _configSection->findRequiredAttribute("id"); + + _isInitialized = true; +} + +std::string CPersistenceInboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CPersistenceInboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIPersistence persistence = createPersistence(appContext); + if (! persistence.IsNull()) { + const std::string outputChannelStr = + _configSection->findRequiredAttribute("channel"); + + SmartPtrCPersistenceReadingMessageSource persistenceReadingMessageSource; + persistenceReadingMessageSource.CreateInstance(); + persistenceReadingMessageSource->initialize(_configSection, persistence); + + const SmartPtrIMessageChannel outputMessageChannel = + channelResolver->resolveChannelName(outputChannelStr); + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + SmartPtrCMessageHandler messageHandler; + messageHandler.CreateInstance(); + messageHandler->initialize( + _id, + outputMessageChannel, + SmartPtrICafObject()); + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, errorMessageChannel); + + SmartPtrCSourcePollingChannelAdapter sourcePollingChannelAdapter; + sourcePollingChannelAdapter.CreateInstance(); + sourcePollingChannelAdapter->initialize( + messageHandler, persistenceReadingMessageSource, errorHandler); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(sourcePollingChannelAdapter, errorHandler); + _taskExecutor = simpleAsyncTaskExecutor; + } +} + +void CPersistenceInboundChannelAdapterInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (! _taskExecutor.IsNull()) { + CAF_CM_LOG_DEBUG_VA0("Starting the executor"); + _taskExecutor->execute(timeoutMs); + } +} + +void CPersistenceInboundChannelAdapterInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (! _taskExecutor.IsNull()) { + CAF_CM_LOG_DEBUG_VA0("Stopping the executor"); + _taskExecutor->cancel(timeoutMs); + } +} + +bool CPersistenceInboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const bool rc = ! _taskExecutor.IsNull() + && (_taskExecutor->getState() == ITaskExecutor::ETaskStateStarted); + return rc; +} + +bool CPersistenceInboundChannelAdapterInstance::isMessageProducer() const { + CAF_CM_FUNCNAME_VALIDATE("isMessageProducer"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return true; +} + +SmartPtrIPersistence CPersistenceInboundChannelAdapterInstance::createPersistence( + const SmartPtrIAppContext& appContext) const { + CAF_CM_FUNCNAME("createPersistence"); + CAF_CM_VALIDATE_INTERFACE(appContext); + + SmartPtrIPersistence rc; + const std::string removeRefStr = _configSection->findRequiredAttribute("ref"); + CAF_CM_LOG_DEBUG_VA1("Creating the persistence impl - %s", removeRefStr.c_str()); + const SmartPtrIBean bean = appContext->getBean(removeRefStr); + rc.QueryInterface(bean, false); + CAF_CM_VALIDATE_INTERFACE(rc); + + try { + rc->initialize(); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_WARN_VA2("initialize failed - ref: %s, msg: %s", + removeRefStr.c_str(), (CAF_CM_EXCEPTION_GET_FULLMSG).c_str()); + rc = SmartPtrIPersistence(); + CAF_CM_CLEAREXCEPTION; + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.h new file mode 100644 index 000000000..a1b095385 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceInboundChannelAdapterInstance.h @@ -0,0 +1,83 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CPersistenceInboundChannelAdapterInstance_h_ +#define CPersistenceInboundChannelAdapterInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "IPersistence.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/ITaskExecutor.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" +#include "Integration/IMessageProducer.h" + +namespace Caf { + +class CPersistenceInboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle, + public IMessageProducer { +public: + CPersistenceInboundChannelAdapterInstance(); + virtual ~CPersistenceInboundChannelAdapterInstance(); + +public: + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_QI_ENTRY(IMessageProducer) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + void stop(const uint32 timeoutMs); + bool isRunning() const; + +public: // IMessageProducer + bool isMessageProducer() const; + +private: + SmartPtrIPersistence createPersistence( + const SmartPtrIAppContext& appContext) const; + +private: + bool _isInitialized; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrITaskExecutor _taskExecutor; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPersistenceInboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CPersistenceInboundChannelAdapterInstance); + +} + +#endif // #ifndef CPersistenceInboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMerge.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMerge.cpp new file mode 100644 index 000000000..a9bd20501 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMerge.cpp @@ -0,0 +1,419 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityDoc.h" +#include "CPersistenceMerge.h" + +using namespace Caf; + +SmartPtrCPersistenceDoc CPersistenceMerge::mergePersistence( + const SmartPtrCPersistenceDoc& persistenceLoaded, + const SmartPtrCPersistenceDoc& persistenceIn) { + SmartPtrCPersistenceDoc rc; + if (persistenceLoaded.IsNull()) { + if (! persistenceIn.IsNull()) { + rc = persistenceIn; + } + } else { + if (persistenceIn.IsNull()) { + rc = persistenceLoaded; + } else { + const SmartPtrCLocalSecurityDoc localSecurity = mergeLocalSecurity( + persistenceLoaded->getLocalSecurity(), + persistenceIn->getLocalSecurity()); + const SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollection = mergePersistenceProtocolCollection( + persistenceLoaded->getPersistenceProtocolCollection(), + persistenceIn->getPersistenceProtocolCollection()); + const SmartPtrCRemoteSecurityCollectionDoc remoteSecurityCollection = mergeRemoteSecurityCollection( + persistenceLoaded->getRemoteSecurityCollection(), + persistenceIn->getRemoteSecurityCollection()); + if (! localSecurity.IsNull() || ! persistenceProtocolCollection.IsNull() || ! remoteSecurityCollection.IsNull()) { + rc.CreateInstance(); + rc->initialize( + localSecurity.IsNull() ? persistenceIn->getLocalSecurity() : localSecurity, + remoteSecurityCollection.IsNull() ? persistenceIn->getRemoteSecurityCollection() : remoteSecurityCollection, + persistenceProtocolCollection.IsNull() ? persistenceIn->getPersistenceProtocolCollection() : persistenceProtocolCollection, + persistenceIn->getVersion()); + } + } + } + + return rc; +} + +SmartPtrCLocalSecurityDoc CPersistenceMerge::mergeLocalSecurity( + const SmartPtrCLocalSecurityDoc& localSecurityLoaded, + const SmartPtrCLocalSecurityDoc& localSecurityIn) { + SmartPtrCLocalSecurityDoc rc; + if (localSecurityLoaded.IsNull()) { + if (! localSecurityIn.IsNull()) { + rc = localSecurityIn; + } + } else { + if (localSecurityIn.IsNull()) { + rc = localSecurityLoaded; + } else { + const std::string localId = mergeStrings( + localSecurityLoaded->getLocalId(), localSecurityIn->getLocalId()); + const std::string privateKey = mergeStrings( + localSecurityIn->getPrivateKey(), localSecurityLoaded->getPrivateKey()); + const std::string certPath = mergeStrings( + localSecurityIn->getCert(), localSecurityLoaded->getCertPath()); + if (! localId.empty() || ! privateKey.empty() || ! certPath.empty()) { + rc.CreateInstance(); + rc->initialize( + localId.empty() ? localSecurityIn->getLocalId() : localId, + privateKey.empty() ? localSecurityIn->getPrivateKey() : privateKey, + certPath.empty() ? localSecurityIn->getCertPath() : certPath, + localSecurityLoaded->getPrivateKeyPath(), + localSecurityLoaded->getCertPath()); + } + } + } + + return rc; +} + +SmartPtrCPersistenceProtocolCollectionDoc CPersistenceMerge::mergePersistenceProtocolCollection( + const SmartPtrCPersistenceProtocolCollectionDoc& persistenceProtocolCollectionLoaded, + const SmartPtrCPersistenceProtocolCollectionDoc& persistenceProtocolCollectionIn) { + SmartPtrCPersistenceProtocolCollectionDoc rc; + if (persistenceProtocolCollectionLoaded.IsNull()) { + if (! persistenceProtocolCollectionIn.IsNull()) { + rc = persistenceProtocolCollectionIn; + } + } else { + if (persistenceProtocolCollectionIn.IsNull()) { + rc = persistenceProtocolCollectionLoaded; + } else { + const std::deque persistenceProtocolCollectionInner = mergePersistenceProtocolCollectionInner( + persistenceProtocolCollectionLoaded->getPersistenceProtocol(), + persistenceProtocolCollectionIn->getPersistenceProtocol()); + if (! persistenceProtocolCollectionInner.empty()) { + rc.CreateInstance(); + rc->initialize(persistenceProtocolCollectionInner); + } + } + } + + return rc; +} + +std::deque CPersistenceMerge::mergePersistenceProtocolCollectionInner( + const std::deque& persistenceProtocolCollectionInnerLoaded, + const std::deque& persistenceProtocolCollectionInnerIn) { + CAF_CM_STATIC_FUNC_VALIDATE("CConfigEnvMerge", "mergePersistenceProtocolCollectionInner"); + + std::deque rc; + if (persistenceProtocolCollectionInnerLoaded.empty()) { + if (! persistenceProtocolCollectionInnerIn.empty()) { + rc = persistenceProtocolCollectionInnerIn; + } + } else { + if (persistenceProtocolCollectionInnerIn.empty()) { + rc = persistenceProtocolCollectionInnerLoaded; + } else { + CAF_CM_VALIDATE_BOOL(persistenceProtocolCollectionInnerLoaded.size() == 1); + CAF_CM_VALIDATE_BOOL(persistenceProtocolCollectionInnerIn.size() == 1); + + typedef std::map > CPersistenceProtocolMap; + CPersistenceProtocolMap persistenceProtocolMap; + for (TConstIterator > persistenceProtocolLoadedIter(persistenceProtocolCollectionInnerLoaded); + persistenceProtocolLoadedIter; persistenceProtocolLoadedIter++) { + const SmartPtrCPersistenceProtocolDoc persistenceProtocolLoaded = *persistenceProtocolLoadedIter; + persistenceProtocolMap.insert(std::make_pair( + persistenceProtocolLoaded->getProtocolName(), + std::make_pair(persistenceProtocolLoaded, SmartPtrCPersistenceProtocolDoc()))); + } + for (TConstIterator > persistenceProtocolInIter(persistenceProtocolCollectionInnerIn); + persistenceProtocolInIter; persistenceProtocolInIter++) { + const SmartPtrCPersistenceProtocolDoc persistenceProtocolIn = *persistenceProtocolInIter; + if (persistenceProtocolMap.find(persistenceProtocolIn->getProtocolName()) == persistenceProtocolMap.end()) { + CAF_CM_VALIDATE_BOOL(persistenceProtocolMap.empty()); + persistenceProtocolMap.insert(std::make_pair( + persistenceProtocolIn->getProtocolName(), + std::make_pair(SmartPtrCPersistenceProtocolDoc(), persistenceProtocolIn))); + } else { + persistenceProtocolMap.find(persistenceProtocolIn->getProtocolName())->second.second = persistenceProtocolIn; + } + } + + CAF_CM_VALIDATE_BOOL(persistenceProtocolMap.size() == 1); + for (TConstMapIterator persistenceProtocolMapIter(persistenceProtocolMap); + persistenceProtocolMapIter; persistenceProtocolMapIter++) { + const SmartPtrCPersistenceProtocolDoc persistenceProtocolLoaded = persistenceProtocolMapIter->first; + const SmartPtrCPersistenceProtocolDoc persistenceProtocolIn = persistenceProtocolMapIter->second; + const SmartPtrCPersistenceProtocolDoc persistenceProtocolTmp = + mergePersistenceProtocol(persistenceProtocolLoaded, persistenceProtocolIn); + if (! persistenceProtocolTmp.IsNull()) { + rc.push_back(persistenceProtocolTmp); + } + } + } + } + + return rc; +} + +SmartPtrCPersistenceProtocolDoc CPersistenceMerge::mergePersistenceProtocol( + const SmartPtrCPersistenceProtocolDoc& persistenceProtocolLoaded, + const SmartPtrCPersistenceProtocolDoc& persistenceProtocolIn) { + SmartPtrCPersistenceProtocolDoc rc; + if (persistenceProtocolLoaded.IsNull()) { + if (! persistenceProtocolIn.IsNull()) { + rc = persistenceProtocolIn; + } + } else { + if (persistenceProtocolIn.IsNull()) { + rc = persistenceProtocolLoaded; + } else { + const std::string protocolName = mergeStrings( + persistenceProtocolLoaded->getProtocolName(), persistenceProtocolIn->getProtocolName()); + const std::string uri = mergeUri( + persistenceProtocolLoaded->getUri(), persistenceProtocolIn->getUri()); + const std::string tlsCert = mergeStrings( + persistenceProtocolIn->getTlsCert(), persistenceProtocolLoaded->getTlsCert()); + const std::string tlsProtocol = mergeStrings( + persistenceProtocolIn->getTlsProtocol(), persistenceProtocolLoaded->getTlsProtocol()); + const Cdeqstr tlsCipherCollection = mergeDeqstr( + persistenceProtocolIn->getTlsCipherCollection(), persistenceProtocolLoaded->getTlsCipherCollection()); + const SmartPtrCCertCollectionDoc tlsCertCollection = mergeCertCollection( + persistenceProtocolIn->getTlsCertCollection(), persistenceProtocolLoaded->getTlsCertCollection()); + + if (! protocolName.empty() || ! uri.empty() || ! tlsCert.empty() || + ! tlsProtocol.empty() || ! tlsCipherCollection.empty() || ! tlsCertCollection.IsNull()) { + rc.CreateInstance(); + rc->initialize( + protocolName.empty() ? persistenceProtocolIn->getProtocolName() : protocolName, + uri.empty() ? persistenceProtocolIn->getUri() : uri, + persistenceProtocolLoaded->getUriAmqp(), + persistenceProtocolLoaded->getUriTunnel(), + tlsCert.empty() ? persistenceProtocolIn->getTlsCert() : tlsCert, + tlsProtocol.empty() ? persistenceProtocolIn->getTlsProtocol() : tlsProtocol, + tlsCipherCollection.empty() ? persistenceProtocolIn->getTlsCipherCollection() : tlsCipherCollection, + tlsCertCollection.IsNull() ? persistenceProtocolIn->getTlsCertCollection() : tlsCertCollection, + persistenceProtocolLoaded->getUriAmqpPath(), + persistenceProtocolLoaded->getUriTunnelPath(), + persistenceProtocolLoaded->getTlsCertPath(), + persistenceProtocolLoaded->getTlsCertPathCollection()); + } + } + } + + return rc; +} + +SmartPtrCRemoteSecurityCollectionDoc CPersistenceMerge::mergeRemoteSecurityCollection( + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollectionLoaded, + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollectionIn) { + SmartPtrCRemoteSecurityCollectionDoc rc; + if (remoteSecurityCollectionLoaded.IsNull()) { + if (! remoteSecurityCollectionIn.IsNull()) { + rc = remoteSecurityCollectionIn; + } + } else { + if (remoteSecurityCollectionIn.IsNull()) { + rc = remoteSecurityCollectionLoaded; + } else { + const std::deque remoteSecurityCollectionInner = mergeRemoteSecurityCollectionInner( + remoteSecurityCollectionLoaded->getRemoteSecurity(), + remoteSecurityCollectionIn->getRemoteSecurity()); + if (! remoteSecurityCollectionInner.empty()) { + rc.CreateInstance(); + rc->initialize(remoteSecurityCollectionInner); + } + } + } + + return rc; +} + +std::deque CPersistenceMerge::mergeRemoteSecurityCollectionInner( + const std::deque& remoteSecurityCollectionInnerLoaded, + const std::deque& remoteSecurityCollectionInnerIn) { + std::deque rc; + if (remoteSecurityCollectionInnerLoaded.empty()) { + if (! remoteSecurityCollectionInnerIn.empty()) { + rc = remoteSecurityCollectionInnerIn; + } + } else { + if (remoteSecurityCollectionInnerIn.empty()) { + rc = remoteSecurityCollectionInnerLoaded; + } else { + typedef std::map > CRemoteSecurityMap; + CRemoteSecurityMap remoteSecurityMap; + for (TConstIterator > remoteSecurityLoadedIter(remoteSecurityCollectionInnerLoaded); + remoteSecurityLoadedIter; remoteSecurityLoadedIter++) { + const SmartPtrCRemoteSecurityDoc remoteSecurityLoaded = *remoteSecurityLoadedIter; + remoteSecurityMap.insert(std::make_pair( + remoteSecurityLoaded->getRemoteId(), + std::make_pair(remoteSecurityLoaded, SmartPtrCRemoteSecurityDoc()))); + } + for (TConstIterator > remoteSecurityInIter(remoteSecurityCollectionInnerIn); + remoteSecurityInIter; remoteSecurityInIter++) { + const SmartPtrCRemoteSecurityDoc remoteSecurityIn = *remoteSecurityInIter; + if (remoteSecurityMap.find(remoteSecurityIn->getRemoteId()) == remoteSecurityMap.end()) { + remoteSecurityMap.insert(std::make_pair( + remoteSecurityIn->getRemoteId(), + std::make_pair(SmartPtrCRemoteSecurityDoc(), remoteSecurityIn))); + } else { + remoteSecurityMap.find(remoteSecurityIn->getRemoteId())->second.second = remoteSecurityIn; + } + } + for (TConstMapIterator remoteSecurityMapIter(remoteSecurityMap); + remoteSecurityMapIter; remoteSecurityMapIter++) { + const SmartPtrCRemoteSecurityDoc remoteSecurityLoaded = (*remoteSecurityMapIter).first; + const SmartPtrCRemoteSecurityDoc remoteSecurityIn = (*remoteSecurityMapIter).second; + const SmartPtrCRemoteSecurityDoc remoteSecurityTmp = + mergeRemoteSecurity(remoteSecurityLoaded, remoteSecurityIn); + if (! remoteSecurityTmp.IsNull()) { + rc.push_back(remoteSecurityTmp); + } + } + } + } + + return rc; +} + +SmartPtrCRemoteSecurityDoc CPersistenceMerge::mergeRemoteSecurity( + const SmartPtrCRemoteSecurityDoc& remoteSecurityLoaded, + const SmartPtrCRemoteSecurityDoc& remoteSecurityIn) { + SmartPtrCRemoteSecurityDoc rc; + if (remoteSecurityLoaded.IsNull()) { + if (! remoteSecurityIn.IsNull()) { + rc = remoteSecurityIn; + } + } else { + if (remoteSecurityIn.IsNull()) { + rc = remoteSecurityLoaded; + } else { + const std::string remoteId = mergeStrings( + remoteSecurityLoaded->getRemoteId(), remoteSecurityIn->getRemoteId()); + const std::string protocolName = mergeStrings( + remoteSecurityLoaded->getProtocolName(), remoteSecurityIn->getProtocolName()); + const std::string cmsCert = mergeStrings( + remoteSecurityIn->getCmsCert(), remoteSecurityLoaded->getCmsCert()); + const std::string cmsCipherName = mergeStrings( + remoteSecurityIn->getCmsCipherName(), remoteSecurityLoaded->getCmsCipherName()); + const SmartPtrCCertCollectionDoc cmsCertCollection = mergeCertCollection( + remoteSecurityIn->getCmsCertCollection(), remoteSecurityLoaded->getCmsCertCollection()); + + if (! remoteId.empty() || ! protocolName.empty() || ! cmsCert.empty() || + ! cmsCipherName.empty() || ! cmsCertCollection.IsNull()) { + rc.CreateInstance(); + rc->initialize( + remoteId.empty() ? remoteSecurityIn->getRemoteId() : remoteId, + protocolName.empty() ? remoteSecurityIn->getProtocolName() : protocolName, + cmsCert.empty() ? remoteSecurityIn->getCmsCert() : cmsCert, + cmsCipherName.empty() ? remoteSecurityIn->getCmsCipherName() : cmsCipherName, + cmsCertCollection.IsNull() ? remoteSecurityIn->getCmsCertCollection() : cmsCertCollection, + remoteSecurityLoaded->getCmsCertPath(), + remoteSecurityLoaded->getCmsCertPathCollection()); + } + } + } + + return rc; +} + +SmartPtrCCertCollectionDoc CPersistenceMerge::mergeCertCollection( + const SmartPtrCCertCollectionDoc& certCollectionLoaded, + const SmartPtrCCertCollectionDoc& certCollectionIn) { + SmartPtrCCertCollectionDoc rc; + if (certCollectionLoaded.IsNull()) { + if (! certCollectionIn.IsNull()) { + rc = certCollectionIn; + } + } else { + if (certCollectionIn.IsNull()) { + rc = certCollectionLoaded; + } else { + const std::deque certCollectionInner = mergeDeqstr( + certCollectionLoaded->getCert(), + certCollectionIn->getCert()); + if (! certCollectionInner.empty()) { + rc.CreateInstance(); + rc->initialize(certCollectionInner); + } + } + } + + return rc; +} + +std::string CPersistenceMerge::mergeUri( + const std::string& uriPreferred, + const std::string& uriOther) { + CAF_CM_STATIC_FUNC_LOG_ONLY("CPersistenceMerge", "mergeUri"); + std::string rc; + if (! uriPreferred.empty() && ! uriOther.empty()) { + UriUtils::SUriRecord uriRecordPreferred; + UriUtils::parseUriString(uriPreferred, uriRecordPreferred); + + UriUtils::SUriRecord uriRecordOther; + UriUtils::parseUriString(uriOther, uriRecordOther); + + if (! uriRecordOther.host.empty() && (uriRecordPreferred.host.length() > 1) + && ('#' == uriRecordPreferred.host[0]) + && ('#' == uriRecordPreferred.host[uriRecordPreferred.host.length() - 1])) { + CAF_CM_LOG_DEBUG_VA2("URI host changed - %s != %s", + uriRecordPreferred.host.c_str(), uriRecordOther.host.c_str()); + uriRecordPreferred.host = uriRecordOther.host; + } + if (! uriRecordOther.username.empty() && (uriRecordPreferred.username.length() > 1) + && ('#' == uriRecordPreferred.username[0]) + && ('#' == uriRecordPreferred.username[uriRecordPreferred.username.length() - 1])) { + CAF_CM_LOG_DEBUG_VA2("URI username changed - %s != %s", + uriRecordPreferred.username.c_str(), uriRecordOther.username.c_str()); + uriRecordPreferred.username = uriRecordOther.username; + } + if (! uriRecordOther.username.empty() && (uriRecordPreferred.password.length() > 1) + && ('#' == uriRecordPreferred.password[0]) + && ('#' == uriRecordPreferred.password[uriRecordPreferred.password.length() - 1])) { + CAF_CM_LOG_DEBUG_VA0("URI password changed"); + uriRecordPreferred.password = uriRecordOther.password; + } + + rc = UriUtils::buildUriString(uriRecordPreferred); + } else { + rc = mergeStrings(uriPreferred, uriOther); + } + + return rc; +} + +std::string CPersistenceMerge::mergeStrings( + const std::string& strPreferred, + const std::string& strOther) { + return (strPreferred.compare(strOther) == 0) ? std::string() : strPreferred; +} + +Cdeqstr CPersistenceMerge::mergeDeqstr( + const Cdeqstr& deqstrPreferred, + const Cdeqstr& deqstrOther) { + Cdeqstr rc; + if (deqstrPreferred.empty()) { + if (! deqstrOther.empty()) { + rc = deqstrOther; + } + } else { + if (deqstrOther.empty()) { + rc = deqstrPreferred; + } + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMerge.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMerge.h new file mode 100644 index 000000000..c170f815f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMerge.h @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_CPersistenceMerge_h_ +#define _MaIntegration_CPersistenceMerge_h_ + + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityDoc.h" + +using namespace Caf; + +/// TODO - describe class +class CPersistenceMerge { +public: + static SmartPtrCPersistenceDoc mergePersistence( + const SmartPtrCPersistenceDoc& persistenceLoaded, + const SmartPtrCPersistenceDoc& persistenceIn); + +private: + static SmartPtrCLocalSecurityDoc mergeLocalSecurity( + const SmartPtrCLocalSecurityDoc& localSecurityLoaded, + const SmartPtrCLocalSecurityDoc& localSecurityIn); + + static SmartPtrCPersistenceProtocolCollectionDoc mergePersistenceProtocolCollection( + const SmartPtrCPersistenceProtocolCollectionDoc& persistenceProtocolCollectionLoaded, + const SmartPtrCPersistenceProtocolCollectionDoc& persistenceProtocolCollectionIn); + + static std::deque mergePersistenceProtocolCollectionInner( + const std::deque& persistenceProtocolCollectionInnerLoaded, + const std::deque& persistenceProtocolCollectionInnerIn); + + static SmartPtrCPersistenceProtocolDoc mergePersistenceProtocol( + const SmartPtrCPersistenceProtocolDoc& persistenceProtocolLoaded, + const SmartPtrCPersistenceProtocolDoc& persistenceProtocolIn); + + static SmartPtrCRemoteSecurityCollectionDoc mergeRemoteSecurityCollection( + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollectionLoaded, + const SmartPtrCRemoteSecurityCollectionDoc& remoteSecurityCollectionIn); + + static std::deque mergeRemoteSecurityCollectionInner( + const std::deque& remoteSecurityCollectionInnerLoaded, + const std::deque& remoteSecurityCollectionInnerIn); + + static SmartPtrCRemoteSecurityDoc mergeRemoteSecurity( + const SmartPtrCRemoteSecurityDoc& remoteSecurityLoaded, + const SmartPtrCRemoteSecurityDoc& remoteSecurityIn); + + static SmartPtrCCertCollectionDoc mergeCertCollection( + const SmartPtrCCertCollectionDoc& certCollectionLoaded, + const SmartPtrCCertCollectionDoc& certCollectionIn); + + static std::string mergeStrings( + const std::string& strLoaded, + const std::string& strIn); + + static std::string mergeUri( + const std::string& uriLoaded, + const std::string& uriIn); + + static Cdeqstr mergeDeqstr( + const Cdeqstr& deqstrPreferred, + const Cdeqstr& deqstrOther); + +private: + CAF_CM_DECLARE_NOCREATE(CPersistenceMerge); +}; + +#endif // #ifndef _MaIntegration_CPersistenceMerge_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.cpp new file mode 100644 index 000000000..064685e92 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.cpp @@ -0,0 +1,83 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h" + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "IPersistence.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CPersistenceMessageHandler.h" + +using namespace Caf; + +CPersistenceMessageHandler::CPersistenceMessageHandler() : + _isInitialized(false), + CAF_CM_INIT_LOG("CPersistenceMessageHandler") { +} + +CPersistenceMessageHandler::~CPersistenceMessageHandler() { +} + +void CPersistenceMessageHandler::initialize( + const SmartPtrIDocument& configSection, + const SmartPtrIPersistence& persistence) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + CAF_CM_VALIDATE_SMARTPTR(persistence); + + _id = configSection->findRequiredAttribute("id"); + _persistence = persistence; + + _isInitialized = true; +} + +void CPersistenceMessageHandler::handleMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + + SmartPtrCPersistenceDoc persistence; + const std::string payloadStr = message->getPayloadStr(); + if (! payloadStr.empty()) { + persistence = XmlRoots::parsePersistenceFromString(payloadStr); + } + + _persistence->update(persistence); +} + +SmartPtrIIntMessage CPersistenceMessageHandler::getSavedMessage() const { + CAF_CM_FUNCNAME_VALIDATE("getSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _savedMessage; +} + +void CPersistenceMessageHandler::clearSavedMessage() { + CAF_CM_FUNCNAME_VALIDATE("clearSavedMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + _savedMessage = NULL; +} + +SmartPtrIIntMessage CPersistenceMessageHandler::processErrorMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("processErrorMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + _savedMessage = message; + + //TODO: Verify that I'm receiving the error message and decide what + //to do with it. + + return SmartPtrIIntMessage(); +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.h new file mode 100644 index 000000000..71c8a11aa --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceMessageHandler.h @@ -0,0 +1,67 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_CPersistenceMessageHandler_h_ +#define _MaIntegration_CPersistenceMessageHandler_h_ + + +#include "Integration/IErrorProcessor.h" + +#include "IPersistence.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageHandler.h" + +namespace Caf { + +class CPersistenceMessageHandler : + public IMessageHandler, + public IErrorProcessor { +public: + CPersistenceMessageHandler(); + virtual ~CPersistenceMessageHandler(); + +public: + CAF_BEGIN_QI() + CAF_QI_ENTRY(IMessageHandler) + CAF_QI_ENTRY(IErrorProcessor) + CAF_END_QI() + +public: + void initialize( + const SmartPtrIDocument& configSection, + const SmartPtrIPersistence& persistence); + +public: // IMessageHandler + void handleMessage( + const SmartPtrIIntMessage& message); + + SmartPtrIIntMessage getSavedMessage() const; + + void clearSavedMessage(); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + SmartPtrIPersistence _persistence; + SmartPtrIIntMessage _savedMessage; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPersistenceMessageHandler); +}; + +CAF_DECLARE_SMART_QI_POINTER(CPersistenceMessageHandler); + +} + +#endif // #ifndef _MaIntegration_CPersistenceMessageHandler_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.cpp new file mode 100644 index 000000000..c5cd5a64a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.cpp @@ -0,0 +1,606 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CCertCollectionDoc.h" +#include "Doc/PersistenceDoc/CLocalSecurityDoc.h" +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolCollectionDoc.h" +#include "Doc/PersistenceDoc/CPersistenceProtocolDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityCollectionDoc.h" +#include "Doc/PersistenceDoc/CRemoteSecurityDoc.h" +#include "Exception/CCafException.h" +#include "CPersistenceNamespaceDb.h" +#include + +using namespace Caf; + +CPersistenceNamespaceDb::CPersistenceNamespaceDb() : + _isInitialized(false), + _isReady(false), + _dataReady2Read(false), + _dataReady2Update(false), + _dataReady2Remove(false), + _polledDuringStart(false), + _pollingIntervalSecs(86400), + _pollingStartedTimeMs(0), + CAF_CM_INIT_LOG("CPersistenceNamespaceDb") { + CAF_CM_INIT_THREADSAFE; + _nsdbNamespace = "com.vmware.caf.guest.rw"; +} + +CPersistenceNamespaceDb::~CPersistenceNamespaceDb() { +} + +void CPersistenceNamespaceDb::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { +} + +void CPersistenceNamespaceDb::terminateBean() { +} + +void CPersistenceNamespaceDb::initialize() { + CAF_CM_LOCK_UNLOCK; + + if (! _isInitialized) { + _polledDuringStart = false; + _nsdbPollerSignalFile = AppConfigUtils::getRequiredString("monitor", "nsdb_poller_signal_file"); + _pollingIntervalSecs = AppConfigUtils::getRequiredUint32("monitor", "nsdb_polling_interval_secs"); + _pollingStartedTimeMs = CDateTimeUtils::getTimeMs(); + setCmd(); + _isInitialized = true; + } +} + +SmartPtrCPersistenceDoc CPersistenceNamespaceDb::getUpdated( + const int32 timeout) { + CAF_CM_FUNCNAME_VALIDATE("getUpdated"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("getUpdated"); + SmartPtrCPersistenceDoc rc; + if (isDataReady2Read() && isReady()) { + const std::string updatesCur = getValue("updates"); + if (_updates.compare(updatesCur) != 0) { + _updates = updatesCur; + const std::string version = getValue("version"); + + //EP Doc + const std::string epLocalId = getValue("ep.local_id"); + const std::string epPrivateKey = getValue("ep.private_key"); + const std::string epCert = getValue("ep.cert"); + + SmartPtrCLocalSecurityDoc endpoint; + endpoint.CreateInstance(); + endpoint->initialize(epLocalId, epPrivateKey, epCert); + + //App collection + std::deque applicationCollectionInner; + const std::string applications = getValue("applications"); + Cdeqstr appList = CStringUtils::split(applications, ','); + for (Cdeqstr::iterator appIt = appList.begin(); appIt != appList.end(); appIt++) { + const std::string appKey = "app." + *appIt; + const std::string appId = getValue(appKey + ".remote_id"); + const std::string appProtocolName = getValue(appKey + ".protocol_name"); + const std::string appCmsCipher = getValue(appKey + ".cms.cipher"); + + std::deque cmsCertCollectionInner; + const std::string appCmsCertChain = getValue(appKey + ".cms.cert_chain"); + Cdeqstr appCertList = CStringUtils::split(appCmsCertChain, ','); + for (Cdeqstr::iterator appCertIt = appCertList.begin(); appCertIt != appCertList.end(); appCertIt++) { + cmsCertCollectionInner.push_back(*appCertIt); + } + + SmartPtrCCertCollectionDoc cmsCertCollection; + cmsCertCollection.CreateInstance(); + cmsCertCollection->initialize(cmsCertCollectionInner); + + const std::string cmsCert = getValue(appKey + ".cms.cert"); + SmartPtrCRemoteSecurityDoc application; + application.CreateInstance(); + application->initialize(appId, appProtocolName, cmsCert, appCmsCipher, + cmsCertCollection); + + applicationCollectionInner.push_back(application); + } + + SmartPtrCRemoteSecurityCollectionDoc applicationCollection; + applicationCollection.CreateInstance(); + applicationCollection->initialize(applicationCollectionInner); + + const std::string protocols = getValue("protocols"); + Cdeqstr protocolList = CStringUtils::split(protocols, ','); + std::deque persistenceProtocolCollectionInner; + for (Cdeqstr::iterator protocolIt = protocolList.begin(); protocolIt != protocolList.end(); protocolIt++) { + const std::string protocolKey = "protocol." + *protocolIt; + //Protoccol Doc + std::deque tlsCertCollectionInner; + const std::string tlsCertChain = getValue(protocolKey + ".tls.cert.chain"); + Cdeqstr tlsCertList = CStringUtils::split(tlsCertChain, ','); + for (Cdeqstr::iterator tlsCertIt = tlsCertList.begin(); tlsCertIt != tlsCertList.end(); tlsCertIt++) { + tlsCertCollectionInner.push_back(*tlsCertIt); + } + + Cdeqstr tlsCipherCollection; + const std::string tlsCiphers = getValue(protocolKey + ".tls.ciphers"); + Cdeqstr tlsCipherList = CStringUtils::split(tlsCiphers, ','); + for (Cdeqstr::iterator tlsCipherIt = tlsCipherList.begin(); tlsCipherIt != tlsCipherList.end(); tlsCipherIt++) { + tlsCipherCollection.push_back(*tlsCipherIt); + } + + SmartPtrCCertCollectionDoc tlsCertCollection; + tlsCertCollection.CreateInstance(); + tlsCertCollection->initialize(tlsCertCollectionInner); + + //For now, we only support one broker. + const std::string protocolName = getValue(protocolKey + ".protocol_name"); + const std::string tlsCert = getValue(protocolKey + ".tls.cert"); + const std::string tlsProtocol = getValue(protocolKey + ".tls.protocol"); + const std::string uri = getValue(protocolKey + ".uri"); + const std::string uriAmqp = getValue(protocolKey + ".uri.amqp"); + const std::string uriTunnel = getValue(protocolKey + ".uri.tunnel"); + + SmartPtrCPersistenceProtocolDoc persistenceProtocol; + persistenceProtocol.CreateInstance(); + persistenceProtocol->initialize( + protocolName, uri, uriAmqp, uriTunnel, tlsCert, tlsProtocol, + tlsCipherCollection, tlsCertCollection); + + persistenceProtocolCollectionInner.push_back(persistenceProtocol); + } + + SmartPtrCPersistenceProtocolCollectionDoc persistenceProtocolCollection; + persistenceProtocolCollection.CreateInstance(); + persistenceProtocolCollection->initialize(persistenceProtocolCollectionInner); + + // Persist doc + rc.CreateInstance(); + rc->initialize(endpoint, applicationCollection, persistenceProtocolCollection, version); + } + } + + if (rc.IsNull()) { + rc = _persistenceUpdate; + } + + _dataReady2Read = false; + + + return rc; +} + +void CPersistenceNamespaceDb::update( + const SmartPtrCPersistenceDoc& persistenceDoc) { + CAF_CM_FUNCNAME("update"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("update"); + if (isDataReady2Update() && isReady()) { + const SmartPtrCPersistenceDoc persistenceCur = persistenceDoc.IsNull() ? _persistenceUpdate : persistenceDoc; + if (! persistenceCur.IsNull()) { + _persistenceUpdate = SmartPtrCPersistenceDoc(); + setValue("version", persistenceCur->getVersion()); + + //Update LocalSecurity info + if (!persistenceCur->getLocalSecurity().IsNull()){ + setValue("ep.local_id", persistenceCur->getLocalSecurity()->getLocalId()); + setValue("ep.private_key", persistenceCur->getLocalSecurity()->getPrivateKey()); + setValue("ep.cert", persistenceCur->getLocalSecurity()->getCert()); + } + + //Update RemoteSecurity info + if (!persistenceCur->getRemoteSecurityCollection().IsNull()){ + std::deque applications = + persistenceCur->getRemoteSecurityCollection()->getRemoteSecurity(); + for (std::deque::iterator appIt = applications.begin(); appIt != applications.end(); appIt++) { + const std::string appKey = "app." + (*appIt)->getRemoteId(); + + setValue(appKey + ".remote_id", (*appIt)->getRemoteId()); + setValue(appKey + ".cms.cert", (*appIt)->getCmsCert()); + setValue(appKey + ".cms.cipher", (*appIt)->getCmsCipherName()); + setValue(appKey + ".protocol_name", (*appIt)->getProtocolName()); + + std::string cmsCertChain; + if (! (*appIt)->getCmsCertCollection().IsNull()) { + Cdeqstr cmsCertList = (*appIt)->getCmsCertCollection()->getCert(); + for (Cdeqstr::iterator cmsCertIt=cmsCertList.begin(); cmsCertIt != cmsCertList.end(); cmsCertIt++) { + if (!cmsCertChain.empty()) { + cmsCertChain += ","; + } + cmsCertChain += *cmsCertIt; + } + + setValue(appKey + ".cms.cert_chain", cmsCertChain); + } + } + } + + //Update PersistenceProtocol info + if (!persistenceCur->getPersistenceProtocolCollection().IsNull()) { + //For now, we only support one broker. + CAF_CM_ASSERT(persistenceCur->getPersistenceProtocolCollection()->getPersistenceProtocol().size() <= 1); + + std::deque brokerList = persistenceCur->getPersistenceProtocolCollection()->getPersistenceProtocol(); + for (std::deque::iterator protIt=brokerList.begin(); protIt != brokerList.end(); protIt++) { + const std::string protocolKey = "protocol." + (*protIt)->getProtocolName(); + setValue(protocolKey + ".protocol_name", (*protIt)->getProtocolName()); + setValue(protocolKey + ".uri", (*protIt)->getUri()); + setValue(protocolKey + ".uri.amqp", (*protIt)->getUriAmqp()); + setValue(protocolKey + ".uri.tunnel", (*protIt)->getUriTunnel()); + setValue(protocolKey + ".tls.cert", (*protIt)->getTlsCert()); + setValue(protocolKey + ".tls.protocol", (*protIt)->getTlsProtocol()); + + Cdeqstr tlsCipherList = (*protIt)->getTlsCipherCollection(); + std::string tlsCiphers; + for (Cdeqstr::iterator tlsCipherIt=tlsCipherList.begin(); tlsCipherIt != tlsCipherList.end(); tlsCipherIt++) { + if (!tlsCiphers.empty()) { + tlsCiphers += ","; + } + tlsCiphers += *tlsCipherIt; + } + setValue(protocolKey + ".tls.ciphers", tlsCiphers); + + if (! (*protIt)->getTlsCertCollection().IsNull()) { + Cdeqstr tlsCertList = (*protIt)->getTlsCertCollection()->getCert(); + std::string tlsCerts; + for (Cdeqstr::iterator tlsCertIt=tlsCertList.begin(); tlsCertIt != tlsCertList.end(); tlsCertIt++) { + if (!tlsCerts.empty()) { + tlsCerts += ","; + } + tlsCerts += *tlsCertIt; + } + setValue(protocolKey + ".tls.cert_chain", tlsCerts); + } + } + } + } + } else { + if (! persistenceDoc.IsNull()) { + _persistenceUpdate = persistenceDoc; + } + } + + _dataReady2Update = false; +} + +void CPersistenceNamespaceDb::remove( + const SmartPtrCPersistenceDoc& persistenceDoc) { + CAF_CM_FUNCNAME("remove"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("remove"); + if (isDataReady2Remove() && isReady()) { + const SmartPtrCPersistenceDoc persistenceCur = persistenceDoc.IsNull() ? _persistenceRemove : persistenceDoc; + if (! persistenceCur.IsNull()) { + _persistenceRemove = SmartPtrCPersistenceDoc(); + if (!persistenceCur->getLocalSecurity().IsNull()){ + if (!persistenceCur->getLocalSecurity()->getLocalId().empty()) { + removeKey("ep.local_id"); + } + if (!persistenceCur->getLocalSecurity()->getPrivateKey().empty()) { + removeKey("ep.private_key"); + } + if (!persistenceCur->getLocalSecurity()->getCert().empty()) { + removeKey("ep.cert"); + } + } + + //Remove RemoteSecurity info + if (!persistenceCur->getRemoteSecurityCollection().IsNull()){ + std::deque applications = persistenceCur->getRemoteSecurityCollection()->getRemoteSecurity(); + for (std::deque::iterator it=applications.begin(); it != applications.end(); it++) { + std::string appKey = "app." + (*it)->getRemoteId(); + if (!(*it)->getProtocolName().empty()) { + removeKey(appKey + ".protocol_name"); + } + if (!(*it)->getCmsCert().empty()) { + removeKey(appKey + ".cms.cert"); + } + if (!(*it)->getCmsCertCollection().IsNull() && !(*it)->getCmsCertCollection()->getCert().empty()) { + removeKey(appKey + ".cms.cert_chain"); + } + if (!(*it)->getCmsCipherName().empty()) { + removeKey(appKey + ".cms.cipher"); + } + } + } + + //Remove PersistenceProtocol info + if (!persistenceCur->getPersistenceProtocolCollection().IsNull()) { + //For now, we only support one broker. + CAF_CM_ASSERT(persistenceCur->getPersistenceProtocolCollection()->getPersistenceProtocol().size() <= 1); + + std::deque brokerList = persistenceCur->getPersistenceProtocolCollection()->getPersistenceProtocol(); + for (std::deque::iterator it=brokerList.begin(); it != brokerList.end(); it++) { + std::string protocolKey = "protocol." + (*it)->getProtocolName(); + if (!(*it)->getUri().empty()) { + removeKey(protocolKey + "uri"); + } + if (!(*it)->getUriAmqp().empty()) { + removeKey(protocolKey + "uri.amqp"); + } + if (!(*it)->getUriTunnel().empty()) { + removeKey(protocolKey + "uri.tunnel"); + } + if (!(*it)->getTlsCert().empty()) { + removeKey(protocolKey + "tls.cert"); + } + if (!(*it)->getTlsProtocol().empty()) { + removeKey(protocolKey + "tls.protocol"); + } + if (!(*it)->getTlsCipherCollection().empty()) { + removeKey(protocolKey + "tls.ciphers"); + } + if (!(*it)->getTlsCertCollection().IsNull() && !(*it)->getTlsCertCollection()->getCert().empty()) { + removeKey(protocolKey + "tls.cert_chain"); + } + } + } + } + } else { + if (! persistenceDoc.IsNull()) { + _persistenceRemove = persistenceDoc; + } + } + + _dataReady2Remove = false; +} + +void CPersistenceNamespaceDb::setCmd() { + CAF_CM_FUNCNAME("setCmd"); + + std::string nsdbCmdDir; + std::string nsdbCmdFile; +#ifdef WIN32 + // "C:/Program Files/VMware/VMware Tools/VMwareNamespaceCmd.exe"; + // bin_dir=C:/Program Files/VMware/VMware Tools/VMware CAF/pme//bin + nsdbCmdDir = AppConfigUtils::getRequiredString("globals", "bin_dir"); + + //Back up two levels + nsdbCmdDir = FileSystemUtils::getDirname(nsdbCmdDir); + nsdbCmdDir = FileSystemUtils::getDirname(nsdbCmdDir); + + nsdbCmdFile = "VMwareNamespaceCmd.exe"; +#else + nsdbCmdDir = "/usr/sbin"; + nsdbCmdFile = "vmware-namespace-cmd"; +#endif + + _nsdbCmdPath = FileSystemUtils::buildPath(nsdbCmdDir, nsdbCmdFile); + CAF_CM_LOG_DEBUG_VA1("_nsdbCmdPath: %s", _nsdbCmdPath.c_str()); + if (!FileSystemUtils::doesFileExist(_nsdbCmdPath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Namespace DB command not found - %s", _nsdbCmdPath.c_str()); + } +} + +std::string CPersistenceNamespaceDb::getValue(const std::string& key) { + CAF_CM_FUNCNAME("getValue"); + CAF_CM_VALIDATE_STRING(key); + + CAF_CM_LOG_DEBUG_VA0("getValue"); + std::string value; + std::string stdoutContent; + std::string stderrContent; + try { + value = getValueRaw(key, stdoutContent, stderrContent); + } + catch(ProcessFailedException* ex){ + CAF_CM_LOG_DEBUG_VA1("ProcessFailedException - %s", ex->getMsg().c_str()); + CAF_CM_EXCEPTION_VA3(E_UNEXPECTED, + "NamespaceDB command failed - %s: %s: %s", + ex->getMsg().c_str(), + stdoutContent.c_str(), + stderrContent.c_str()); + } + return value; +} + +void CPersistenceNamespaceDb::setValue( + const std::string& key, + const std::string& value) { + CAF_CM_FUNCNAME("setValue"); + CAF_CM_VALIDATE_STRING(key); + + CAF_CM_LOG_DEBUG_VA0("setValue"); + if (_removedKeys.find(key) == _removedKeys.end()) { + if (value.empty()) { + CAF_CM_LOG_DEBUG_VA1("Cannot set empty value: %s", key.c_str()); + return; + } + + std::string stdoutContent; + std::string stderrContent; + Cdeqstr argv; + std::string tmpFile; + + try { + tmpFile = FileSystemUtils::saveTempTextFile("caf_nsdb_XXXXXX", value); + CAF_CM_LOG_DEBUG_VA2("Setting %s to %s", key.c_str(), value.c_str()); + argv.push_back(_nsdbCmdPath); + argv.push_back("set-key"); + argv.push_back(_nsdbNamespace); + argv.push_back("-k"); + argv.push_back(key); + argv.push_back("-f"); + argv.push_back(tmpFile); + + ProcessUtils::runSync(argv, stdoutContent, stderrContent); + } + catch(ProcessFailedException* ex){ + CAF_CM_LOG_DEBUG_VA1("exception: %s", ex->getMsg().c_str()); + CAF_CM_EXCEPTION_VA3(E_UNEXPECTED, + "NamespaceDB command failed - %s: %s: %s", + ex->getMsg().c_str(), + stdoutContent.c_str(), + stderrContent.c_str()); + } + if ( !tmpFile.empty() && FileSystemUtils::doesFileExist(tmpFile)) { + FileSystemUtils::removeFile(tmpFile); + } + } else { + CAF_CM_LOG_DEBUG_VA1("Cannot set a removed key: %s", key.c_str()); + } +} + +void CPersistenceNamespaceDb::removeKey(const std::string& key) { + CAF_CM_FUNCNAME("removeKey"); + CAF_CM_VALIDATE_STRING(key); + + CAF_CM_LOG_DEBUG_VA0("removeKey"); + if (_removedKeys.find(key) == _removedKeys.end()) { + std::string stdoutContent; + std::string stderrContent; + Cdeqstr argv; + + try { + argv.push_back(_nsdbCmdPath); + argv.push_back("delete-key"); + argv.push_back(_nsdbNamespace); + argv.push_back("-k"); + argv.push_back(key); + + ProcessUtils::runSync(argv, stdoutContent, stderrContent); + _removedKeys.insert(key); + } + catch(ProcessFailedException* ex){ + CAF_CM_LOG_DEBUG_VA1("exception: %s", ex->getMsg().c_str()); + CAF_CM_EXCEPTION_VA3(E_UNEXPECTED, + "NamespaceDB command failed - %s: %s: %s", + ex->getMsg().c_str(), + stdoutContent.c_str(), + stderrContent.c_str()); + } + } else { + CAF_CM_LOG_DEBUG_VA1("Key already removed: %s", key.c_str()); + } +} + +bool CPersistenceNamespaceDb::isDataReady() { + CAF_CM_FUNCNAME_VALIDATE("isDataReady"); + + CAF_CM_LOG_DEBUG_VA0("isDataReady method"); + + // Check if data is ready to read/modify + bool rc = false; + if (!_polledDuringStart) { + rc = true; + _polledDuringStart = true; + CAF_CM_LOG_DEBUG_VA0("Set NSDB polling during service start"); + } + if (FileSystemUtils::doesFileExist(_nsdbPollerSignalFile)) { + rc = true; + CAF_CM_LOG_DEBUG_VA1("NSDB poller signal file %s exists.", _nsdbPollerSignalFile.c_str()); + FileSystemUtils::removeFile(_nsdbPollerSignalFile); + } + CAF_CM_LOG_DEBUG_VA4("NSDB poller signal file %s, _pollingStartedTimeMs=%ld, _pollingIntervalSecs=%ld, rc=%s.", + _nsdbPollerSignalFile.c_str(), long(_pollingStartedTimeMs), long(_pollingIntervalSecs), rc?"true":"false"); + if (CDateTimeUtils::calcRemainingTime(_pollingStartedTimeMs, _pollingIntervalSecs * 1000) <= 0) { + rc = true; + CAF_CM_LOG_DEBUG_VA0("The next polling interval reached."); + } + if (rc) { + _pollingStartedTimeMs = CDateTimeUtils::getTimeMs(); + _dataReady2Read = _dataReady2Update = _dataReady2Remove = true; + } + + return rc; +} + +bool CPersistenceNamespaceDb::isDataReady2Read() { + CAF_CM_FUNCNAME_VALIDATE("isDataReady2Read"); + + CAF_CM_LOG_DEBUG_VA1("_dataReady2Read = %s", _dataReady2Read?"true":"false"); + + return (isDataReady() || _dataReady2Read); +} + +bool CPersistenceNamespaceDb::isDataReady2Update() { + CAF_CM_FUNCNAME_VALIDATE("isDataReady2Update"); + + CAF_CM_LOG_DEBUG_VA1("_dataReady2Update = %s", _dataReady2Update?"true":"false"); + return (isDataReady() || _dataReady2Update); + +} + +bool CPersistenceNamespaceDb::isDataReady2Remove() { + CAF_CM_FUNCNAME_VALIDATE("isDataReady2Remove"); + + CAF_CM_LOG_DEBUG_VA1("_dataReady2Remove = %s", _dataReady2Remove?"true":"false"); + return (isDataReady() || _dataReady2Remove); + +} + +bool CPersistenceNamespaceDb::isReady() { + CAF_CM_FUNCNAME("isReady"); + + CAF_CM_LOG_DEBUG_VA0("isReady method"); + + + bool rc = true; + if (! _isReady) { + std::string stdoutContent; + std::string stderrContent; + try { + (void) getValueRaw("updates", stdoutContent, stderrContent); + _isReady = true; + } + catch(ProcessFailedException* ex) { + if ((stderrContent.find("There is no namespace database associated with this virtual machine") != std::string::npos) + || (stderrContent.find("Permission denied") != std::string::npos)) { + CAF_CM_LOG_DEBUG_VA1( + "Received expected exception - msg: %s", ex->getMsg().c_str()); + rc = false; + } else { + CAF_CM_LOG_DEBUG_VA3( + "ProcessFailedException - msg: %s, stdout: %s, stderr: %s", + ex->getMsg().c_str(), stdoutContent.c_str(), stderrContent.c_str()); + CAF_CM_EXCEPTION_VA1(E_UNEXPECTED, + "NamespaceDB command failed - msg: %s", ex->getMsg().c_str()); + } + } + } + + return rc; +} + +std::string CPersistenceNamespaceDb::getValueRaw( + const std::string& key, + std::string& stdoutContent, + std::string& stderrContent) { + CAF_CM_FUNCNAME_VALIDATE("getValueRaw"); + CAF_CM_VALIDATE_STRING(key); + + CAF_CM_LOG_ERROR_VA0("getValueRaw"); + Cdeqstr argv; + argv.push_back(_nsdbCmdPath); + argv.push_back("get-value"); + argv.push_back(_nsdbNamespace); + argv.push_back("-k"); + argv.push_back(key); + + ProcessUtils::runSync(argv, stdoutContent, stderrContent); + std::string value = stdoutContent; + + //strip spaces + value = CStringUtils::trim(value); + //strip quotes + //TODO: make this less of a hack and add it to StringUtils + if (value.length() > 1) { + if (value[0] == '"') + value.erase(0,1); + if (value[value.length()-1] == '"') + value.erase(value.length()-1,1); + } + + return value; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.h new file mode 100644 index 000000000..52b8b53c1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceNamespaceDb.h @@ -0,0 +1,108 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_CPersistenceNamespaceDb_h_ +#define _MaIntegration_CPersistenceNamespaceDb_h_ + + +#include "IBean.h" + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "IPersistence.h" + +using namespace Caf; + +/// TODO - describe class +class CPersistenceNamespaceDb : + public TCafSubSystemObjectRoot, + public IBean, + public IPersistence { +public: + CPersistenceNamespaceDb(); + virtual ~CPersistenceNamespaceDb(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdPersistenceNamespaceDb) + + CAF_BEGIN_INTERFACE_MAP(CPersistenceNamespaceDb) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IPersistence) + CAF_END_INTERFACE_MAP() + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IPersistence + void initialize(); + + SmartPtrCPersistenceDoc getUpdated( + const int32 timeout); + + void update( + const SmartPtrCPersistenceDoc& persistence); + + void remove( + const SmartPtrCPersistenceDoc& persistence); + +private: + void setCmd(); + + std::string getValue( + const std::string& key); + + void setValue( + const std::string& key, + const std::string& value); + + void removeKey(const std::string& key); + + bool isReady(); + + bool isDataReady(); + + bool isDataReady2Read(); + + bool isDataReady2Update(); + + bool isDataReady2Remove(); + + std::string getValueRaw( + const std::string& key, + std::string& stdoutContent, + std::string& stderrContent); + +private: + bool _isInitialized; + bool _isReady; + bool _dataReady2Read; + bool _dataReady2Update; + bool _dataReady2Remove; + + bool _polledDuringStart; + uint32 _pollingIntervalSecs; + uint64 _pollingStartedTimeMs; + + std::string _nsdbCmdPath; + std::string _nsdbNamespace; + std::string _nsdbPollerSignalFile; + Csetstr _removedKeys; + std::string _updates; + + SmartPtrCPersistenceDoc _persistenceUpdate; + SmartPtrCPersistenceDoc _persistenceRemove; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_CREATE_THREADSAFE; + CAF_CM_DECLARE_NOCOPY(CPersistenceNamespaceDb); +}; + +#endif // #ifndef _MaIntegration_CPersistenceNamespaceDb_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.cpp new file mode 100644 index 000000000..9558bb5e4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.cpp @@ -0,0 +1,144 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CPersistenceMessageHandler.h" +#include "Common/IAppContext.h" +#include "IBean.h" +#include "IPersistence.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IMessageChannel.h" +#include "Integration/IMessageHandler.h" +#include "CPersistenceOutboundChannelAdapterInstance.h" + +using namespace Caf; + +CPersistenceOutboundChannelAdapterInstance::CPersistenceOutboundChannelAdapterInstance() : + _isInitialized(false), + _isRunning(false), + CAF_CM_INIT_LOG("CPersistenceOutboundChannelAdapterInstance") { +} + +CPersistenceOutboundChannelAdapterInstance::~CPersistenceOutboundChannelAdapterInstance() { +} + +void CPersistenceOutboundChannelAdapterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _configSection = configSection; + + _isInitialized = true; +} + +std::string CPersistenceOutboundChannelAdapterInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CPersistenceOutboundChannelAdapterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + const SmartPtrIPersistence persistence = createPersistence(appContext); + if (! persistence.IsNull()) { + const SmartPtrIMessageChannel errorMessageChannel = + channelResolver->resolveChannelName("errorChannel"); + + const std::string inputChannelStr = _configSection->findRequiredAttribute("channel"); + SmartPtrIMessageChannel inputChannel = channelResolver->resolveChannelName(inputChannelStr); + SmartPtrIIntegrationObject inputChannelObj; + inputChannelObj.QueryInterface(inputChannel); + + SmartPtrCPersistenceMessageHandler persistenceMessageHandler; + persistenceMessageHandler.CreateInstance(); + persistenceMessageHandler->initialize(_configSection, persistence); + SmartPtrIMessageHandler messageHandler; + messageHandler.QueryInterface(persistenceMessageHandler); + + _messagingTemplate.CreateInstance(); + _messagingTemplate->initialize( + channelResolver, + inputChannelObj, + errorMessageChannel, + SmartPtrIMessageChannel(), + messageHandler); + } +} + +void CPersistenceOutboundChannelAdapterInstance::start( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("start"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(!_isRunning); + + if (! _messagingTemplate.IsNull()) { + _isRunning = true; + _messagingTemplate->start(0); + } +} + +void CPersistenceOutboundChannelAdapterInstance::stop( + const uint32 timeoutMs) { + CAF_CM_FUNCNAME_VALIDATE("stop"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_BOOL(_isRunning); + + if (! _messagingTemplate.IsNull()) { + _isRunning = false; + _messagingTemplate->stop(0); + } +} + +bool CPersistenceOutboundChannelAdapterInstance::isRunning() const { + CAF_CM_FUNCNAME_VALIDATE("isRunning"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _isRunning; +} + +SmartPtrIPersistence CPersistenceOutboundChannelAdapterInstance::createPersistence( + const SmartPtrIAppContext& appContext) const { + CAF_CM_FUNCNAME("createPersistence"); + CAF_CM_VALIDATE_INTERFACE(appContext); + + SmartPtrIPersistence rc; + const std::string removeRefStr = _configSection->findRequiredAttribute("ref"); + CAF_CM_LOG_DEBUG_VA1("Creating the persistence impl - %s", removeRefStr.c_str()); + const SmartPtrIBean bean = appContext->getBean(removeRefStr); + rc.QueryInterface(bean, false); + CAF_CM_VALIDATE_INTERFACE(rc); + + try { + rc->initialize(); + } + CAF_CM_CATCH_CAF + CAF_CM_CATCH_DEFAULT; + + if (CAF_CM_ISEXCEPTION) { + CAF_CM_LOG_WARN_VA2("initialize failed - ref: %s, msg: %s", + removeRefStr.c_str(), (CAF_CM_EXCEPTION_GET_FULLMSG).c_str()); + rc = SmartPtrIPersistence(); + CAF_CM_CLEAREXCEPTION; + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.h new file mode 100644 index 000000000..5341c8cd4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceOutboundChannelAdapterInstance.h @@ -0,0 +1,78 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CPersistenceOutboundChannelAdapterInstance_h_ +#define CPersistenceOutboundChannelAdapterInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "IPersistence.h" +#include "Integration/Core/CMessagingTemplate.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ILifecycle.h" + +namespace Caf { + +class CPersistenceOutboundChannelAdapterInstance : + public IIntegrationObject, + public IIntegrationComponentInstance, + public ILifecycle { +public: + CPersistenceOutboundChannelAdapterInstance(); + virtual ~CPersistenceOutboundChannelAdapterInstance(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(IIntegrationObject) + CAF_QI_ENTRY(IIntegrationComponentInstance) + CAF_QI_ENTRY(ILifecycle) + CAF_END_QI() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ILifecycle + void start(const uint32 timeoutMs); + + void stop(const uint32 timeoutMs); + + bool isRunning() const; + +private: + SmartPtrIPersistence createPersistence( + const SmartPtrIAppContext& appContext) const; + +private: + bool _isInitialized; + bool _isRunning; + std::string _id; + SmartPtrIDocument _configSection; + SmartPtrCMessagingTemplate _messagingTemplate; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CPersistenceOutboundChannelAdapterInstance); +}; + +CAF_DECLARE_SMART_QI_POINTER(CPersistenceOutboundChannelAdapterInstance); +} + +#endif // #ifndef CPersistenceOutboundChannelAdapterInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.cpp new file mode 100644 index 000000000..66225e454 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CPersistenceReadingMessageSource.cpp @@ -0,0 +1,80 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/PersistenceDoc/CPersistenceDoc.h" +#include "IPersistence.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "CPersistenceReadingMessageSource.h" +#include "Exception/CCafException.h" +#include "Doc/DocXml/PersistenceXml/PersistenceXmlRoots.h" + +using namespace Caf; + +CPersistenceReadingMessageSource::CPersistenceReadingMessageSource() : + _isInitialized(false), + CAF_CM_INIT_LOG("CPersistenceReadingMessageSource") { +} + +CPersistenceReadingMessageSource::~CPersistenceReadingMessageSource() { +} + +void CPersistenceReadingMessageSource::initialize( + const SmartPtrIDocument& configSection, + const SmartPtrIPersistence& persistence) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + CAF_CM_VALIDATE_SMARTPTR(persistence); + + _id = configSection->findRequiredAttribute("id"); + const SmartPtrIDocument pollerDoc = configSection->findOptionalChild("poller"); + + _persistence = persistence; + + setPollerMetadata(pollerDoc); + + _isInitialized = true; +} + +bool CPersistenceReadingMessageSource::doSend( + const SmartPtrIIntMessage&, + int32) { + CAF_CM_FUNCNAME("doSend"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_EXCEPTIONEX_VA1( + UnsupportedOperationException, + E_NOTIMPL, + "This is not a sending channel: %s", _id.c_str()); +} + +SmartPtrIIntMessage CPersistenceReadingMessageSource::doReceive( + const int32 timeout) { + CAF_CM_FUNCNAME("receive"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + if (timeout > 0) { + CAF_CM_EXCEPTIONEX_VA1(UnsupportedOperationException, E_INVALIDARG, + "Timeout not currently supported: %s", _id.c_str()); + } + + SmartPtrIIntMessage message; + const SmartPtrCPersistenceDoc persistence = _persistence->getUpdated(0); + if (! persistence.IsNull()) { + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initializeStr(XmlRoots::savePersistenceToString(persistence), + IIntMessage::SmartPtrCHeaders(), IIntMessage::SmartPtrCHeaders()); + message = messageImpl; + } + + return message; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.cpp new file mode 100644 index 000000000..420040aa8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.cpp @@ -0,0 +1,347 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h" +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h" +#include "Doc/DocXml/ResponseXml/ResponseXmlRoots.h" + +#include "Common/CLoggingSetter.h" +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Doc/ProviderInfraDoc/CClassCollectionDoc.h" +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" +#include "Doc/ProviderInfraDoc/CSchemaSummaryDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/ResponseDoc/CProviderResponseDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Exception/CCafException.h" +#include "CProviderCollectSchemaExecutor.h" +#include "Integration/Caf/CCafMessageCreator.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" + +using namespace Caf; + +CProviderCollectSchemaExecutor::CProviderCollectSchemaExecutor() : + _isInitialized(false), + CAF_CM_INIT_LOG("CProviderCollectSchemaExecutor") { +} + +CProviderCollectSchemaExecutor::~CProviderCollectSchemaExecutor() { +} + +void CProviderCollectSchemaExecutor::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + + const std::string schemaCacheDirPath = AppConfigUtils::getRequiredString( + _sProviderHostArea, _sConfigSchemaCacheDir); + const std::string schemaCacheDirPathExp = CStringUtils::expandEnv(schemaCacheDirPath); + if (!FileSystemUtils::doesDirectoryExist(schemaCacheDirPathExp)) { + CAF_CM_LOG_INFO_VA1( + "Schema cache directory does not exist... creating - %s", + schemaCacheDirPathExp.c_str()); + FileSystemUtils::createDirectory(schemaCacheDirPathExp); + } + + const std::string invokersDir = AppConfigUtils::getRequiredString( + _sProviderHostArea, _sConfigInvokersDir); + const std::string invokersDirExp = CStringUtils::expandEnv(invokersDir); + if (!FileSystemUtils::doesDirectoryExist(invokersDirExp)) { + CAF_CM_LOG_INFO_VA1( + "Invokers directory does not exist... creating - %s", + invokersDirExp.c_str()); + FileSystemUtils::createDirectory(invokersDirExp); + } + + _schemaCacheDirPath = schemaCacheDirPathExp; + _invokersDir = invokersDirExp; + _isInitialized = true; +} + +void CProviderCollectSchemaExecutor::terminateBean() { + +} + +SmartPtrIIntMessage CProviderCollectSchemaExecutor::processMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("processMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + CAF_CM_LOG_DEBUG_VA2("Called - schemaCacheDirPath: %s, invokersDir: %s", + _schemaCacheDirPath.c_str(), _invokersDir.c_str()); + + SmartPtrCLoggingSetter loggingSetter; + loggingSetter.CreateInstance(); + + const SmartPtrCProviderRegDoc providerReg = + CCafMessagePayloadParser::getProviderReg(message->getPayload()); + + const std::string providerNamespace = providerReg->getProviderNamespace(); + const std::string providerName = providerReg->getProviderName(); + const std::string providerVersion = providerReg->getProviderVersion(); + + std::string providerVersionNew = providerVersion; + std::replace(providerVersionNew.begin(), providerVersionNew.end(), '.', '_'); + + const std::string providerDirName = + providerNamespace + "_" + providerName + "_" + providerVersionNew; + const std::string providerSchemaCacheDir = + FileSystemUtils::buildPath(_schemaCacheDirPath, providerDirName); + const std::string providerResponsePath = + FileSystemUtils::buildPath(providerSchemaCacheDir, _sProviderResponseFilename); + + executeProvider(providerReg, _invokersDir, providerSchemaCacheDir, + providerResponsePath, loggingSetter); + + const std::string relFilename = + FileSystemUtils::buildPath(providerDirName, _sProviderResponseFilename); + const SmartPtrCDynamicByteArray providerResponse = + FileSystemUtils::loadByteFile(providerResponsePath); + + return CCafMessageCreator::createFromProviderResponse( + providerResponse, relFilename, message->getHeaders()); +} + +void CProviderCollectSchemaExecutor::executeProvider( + const SmartPtrCProviderRegDoc& providerReg, + const std::string& invokersDir, + const std::string& providerSchemaCacheDir, + const std::string& providerResponsePath, + SmartPtrCLoggingSetter& loggingSetter) const { + CAF_CM_FUNCNAME("executeProvider"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(providerReg); + CAF_CM_VALIDATE_STRING(invokersDir); + CAF_CM_VALIDATE_STRING(providerSchemaCacheDir); + CAF_CM_VALIDATE_STRING(providerResponsePath); + CAF_CM_VALIDATE_SMARTPTR(loggingSetter); + + const std::string providerNamespace = providerReg->getProviderNamespace(); + const std::string providerName = providerReg->getProviderName(); + const std::string providerVersion = providerReg->getProviderVersion(); + const std::string invokerRelPath = providerReg->getInvokerRelPath(); + + const std::string schemaSummaryPath = + FileSystemUtils::buildPath(providerSchemaCacheDir, _sSchemaSummaryFilename); + + if (FileSystemUtils::doesFileExist(schemaSummaryPath)) { + CAF_CM_LOG_INFO_VA1( + "Schema summary file already exists - %s", schemaSummaryPath.c_str()); + } else { + std::string invokerPath; + if (! invokerRelPath.empty()) { + const std::string invokerRelPathExp = CStringUtils::expandEnv(invokerRelPath); + invokerPath = FileSystemUtils::buildPath(invokersDir, invokerRelPathExp); + + if (!FileSystemUtils::doesFileExist(invokerPath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Invoker does not exist - %s", invokerPath.c_str()); + } + + setupSchemaCacheDir(providerSchemaCacheDir, loggingSetter); + runProvider(invokerPath, providerSchemaCacheDir); + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Unrecognized provider URI protocol in Provider Registration file - %s", providerName.c_str()); + } + + const std::string schemaPath = findSchemaPath(providerResponsePath); + const SmartPtrCSchemaSummaryDoc schemaSummary = createSchemaSummary( + schemaPath, invokerPath, providerNamespace, providerName, providerVersion); + + const std::string schemaSummaryMem = XmlRoots::saveSchemaSummaryToString(schemaSummary); + FileSystemUtils::saveTextFile(schemaSummaryPath, schemaSummaryMem); + } +} + +void CProviderCollectSchemaExecutor::setupSchemaCacheDir( + const std::string& providerSchemaCacheDir, + const SmartPtrCLoggingSetter& loggingSetter) const { + CAF_CM_FUNCNAME_VALIDATE("setupSchemaCacheDir"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(providerSchemaCacheDir); + CAF_CM_VALIDATE_SMARTPTR(loggingSetter); + + if (FileSystemUtils::doesDirectoryExist(providerSchemaCacheDir)) { + CAF_CM_LOG_INFO_VA1( + "Removing the schema cache directory because it appears to be incomplete - %s", + providerSchemaCacheDir.c_str()); + FileSystemUtils::recursiveRemoveDirectory(providerSchemaCacheDir); + } + + FileSystemUtils::createDirectory(providerSchemaCacheDir); + loggingSetter->initialize(providerSchemaCacheDir); +} + +void CProviderCollectSchemaExecutor::runProvider( + const std::string& invokerPath, + const std::string& providerSchemaCacheDir) const { + CAF_CM_FUNCNAME_VALIDATE("runProvider"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(invokerPath); + CAF_CM_VALIDATE_STRING(providerSchemaCacheDir); + + CAF_CM_LOG_DEBUG_VA2( + "Executing the command - %s --schema -o %s", + invokerPath.c_str(), providerSchemaCacheDir.c_str()); + + std::string newProviderSchemaCacheDir = FileSystemUtils::normalizePathWithForward( + providerSchemaCacheDir); + + Cdeqstr argv; + argv.push_back(invokerPath); + argv.push_back("--schema"); + argv.push_back("-o"); + argv.push_back(newProviderSchemaCacheDir); + + const std::string stdoutPath = FileSystemUtils::buildPath( + newProviderSchemaCacheDir, _sStdoutFilename); + const std::string stderrPath = FileSystemUtils::buildPath( + newProviderSchemaCacheDir, _sStderrFilename); + + ProcessUtils::runSyncToFiles(argv, stdoutPath, stderrPath); +} + +SmartPtrCSchemaSummaryDoc CProviderCollectSchemaExecutor::createSchemaSummary( + const std::string& schemaPath, + const std::string& invokerPath, + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion) const { + CAF_CM_FUNCNAME_VALIDATE("createSchemaSummary"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(schemaPath); + CAF_CM_VALIDATE_STRING(invokerPath); + CAF_CM_VALIDATE_STRING(providerNamespace); + CAF_CM_VALIDATE_STRING(providerName); + CAF_CM_VALIDATE_STRING(providerVersion); + + std::deque fqcCollection; + + const std::string schemaMem = FileSystemUtils::loadTextFile(schemaPath); + const SmartPtrCSchemaDoc schema = XmlRoots::parseSchemaFromString(schemaMem); + + const std::deque dataClassCollection = schema->getDataClassCollection(); + for (TConstIterator > dataClassIter(dataClassCollection); + dataClassIter; dataClassIter++) { + const SmartPtrCDataClassDoc dataClass = *dataClassIter; + + SmartPtrCFullyQualifiedClassGroupDoc fqc; + fqc.CreateInstance(); + fqc->initialize(dataClass->getNamespaceVal(), dataClass->getName(), dataClass->getVersion()); + + fqcCollection.push_back(fqc); + } + + const std::deque actionClassCollection = schema->getActionClassCollection(); + for (TConstIterator > actionClassIter(actionClassCollection); + actionClassIter; actionClassIter++) { + const SmartPtrCActionClassDoc actionClass = *actionClassIter; + + SmartPtrCFullyQualifiedClassGroupDoc fqc; + fqc.CreateInstance(); + fqc->initialize(actionClass->getNamespaceVal(), actionClass->getName(), actionClass->getVersion()); + + fqcCollection.push_back(fqc); + } + + SmartPtrCClassCollectionDoc classCollection; + classCollection.CreateInstance(); + classCollection->initialize(fqcCollection); + + SmartPtrCSchemaSummaryDoc schemaSummary; + schemaSummary.CreateInstance(); + schemaSummary->initialize(providerNamespace, providerName, providerVersion, + classCollection, invokerPath); + + return schemaSummary; +} + +std::string CProviderCollectSchemaExecutor::findSchemaPath( + const std::string& providerResponsePath) const { + CAF_CM_FUNCNAME("findSchemaPath"); + CAF_CM_VALIDATE_STRING(providerResponsePath); + + const std::string providerResponseMem = FileSystemUtils::loadTextFile(providerResponsePath); + const SmartPtrCProviderResponseDoc providerResponse = + XmlRoots::parseProviderResponseFromString(providerResponseMem); + + std::string schemaPath; + const SmartPtrCAttachmentCollectionDoc attachmentCollection = providerResponse->getAttachmentCollection(); + if (attachmentCollection.IsNull()) { + CAF_CM_LOG_INFO_VA1( + "Provider response doesn't contain an attachment collection - %s", + providerResponsePath.c_str()); + } else { + const std::deque attachmentCollectionInner = attachmentCollection->getAttachment(); + if (attachmentCollectionInner.empty()) { + CAF_CM_LOG_INFO_VA1( + "Provider response contains an empty attachment collection - %s", + providerResponsePath.c_str()); + } else { + for(TConstIterator > attachmentIter(attachmentCollectionInner); + attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + const std::string attachmentName = attachment->getName(); + const std::string attachmentType = attachment->getType(); + + if((attachmentType.compare("cdif") == 0) && + (attachmentName.find("-collectSchema-") != std::string::npos)) { + if(! schemaPath.empty()) { + CAF_CM_EXCEPTIONEX_VA3(DuplicateElementException, ERROR_ALREADY_EXISTS, + "Found multiple schema files - \"%s\" and \"%s\" in %s", + attachmentName.c_str(), schemaPath.c_str(), providerResponsePath.c_str()); + } + + const std::string attachmentUri = attachment->getUri(); + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachmentUri, uriRecord); + + if(uriRecord.protocol.compare("file") != 0) { + CAF_CM_EXCEPTIONEX_VA3(InvalidArgumentException, ERROR_INVALID_DATA, + "Unsupported protocol (%s != \"file\") - %s in %s", + uriRecord.protocol.c_str(), attachmentUri.c_str(), providerResponsePath.c_str()); + } + + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + + schemaPath = CStringUtils::expandEnv(fileUriRecord.path); + if(! FileSystemUtils::doesFileExist(schemaPath)) { + CAF_CM_EXCEPTIONEX_VA2(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Schema file not found - %s in manifest %s", + schemaPath.c_str(), providerResponsePath.c_str()); + } + } else { + CAF_CM_LOG_DEBUG_VA3( + "Provider response attachment is not a cdif collectSchema - type: %s, name: %s, path: %s", + attachmentType.c_str(), attachmentName.c_str(), + providerResponsePath.c_str()); + } + } + } + } + + if(schemaPath.empty()) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Schema not found in manifest - %s", providerResponsePath.c_str()); + } + + return schemaPath; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.h new file mode 100644 index 000000000..87def45bd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderCollectSchemaExecutor.h @@ -0,0 +1,86 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProviderCollectSchemaExecutor_h_ +#define CProviderCollectSchemaExecutor_h_ + + +#include "IBean.h" + +#include "Common/CLoggingSetter.h" +#include "Doc/ProviderInfraDoc/CProviderRegDoc.h" +#include "Doc/ProviderInfraDoc/CSchemaSummaryDoc.h" +#include "Integration/IIntMessage.h" +#include "Integration/IMessageProcessor.h" + +using namespace Caf; + +/// TODO - describe class +class CProviderCollectSchemaExecutor : + public TCafSubSystemObjectRoot, + public IBean, + public IMessageProcessor { +public: + CProviderCollectSchemaExecutor(); + virtual ~CProviderCollectSchemaExecutor(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdProviderCollectSchemaExecutor) + + CAF_BEGIN_INTERFACE_MAP(CProviderCollectSchemaExecutor) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IMessageProcessor) + CAF_END_INTERFACE_MAP() + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IMessageProcessor + SmartPtrIIntMessage processMessage( + const SmartPtrIIntMessage& message); + +private: + void executeProvider( + const SmartPtrCProviderRegDoc& providerReg, + const std::string& invokersDir, + const std::string& providerSchemaCacheDir, + const std::string& providerResponsePath, + SmartPtrCLoggingSetter& loggingSetter) const; + + void setupSchemaCacheDir( + const std::string& providerSchemaCacheDir, + const SmartPtrCLoggingSetter& loggingSetter) const; + + void runProvider( + const std::string& invokerPath, + const std::string& providerSchemaCacheDir) const; + + SmartPtrCSchemaSummaryDoc createSchemaSummary( + const std::string& schemaPath, + const std::string& invokerPath, + const std::string& providerNamespace, + const std::string& providerName, + const std::string& providerVersion) const; + + std::string findSchemaPath( + const std::string& providerResponsePath) const; + +private: + bool _isInitialized; + std::string _schemaCacheDirPath; + std::string _invokersDir; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderCollectSchemaExecutor); +}; + +#endif // #ifndef CProviderCollectSchemaExecutor_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.cpp new file mode 100644 index 000000000..ef22b4d7c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.cpp @@ -0,0 +1,145 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CProviderExecutorRequest.h" +#include "Common/IAppContext.h" +#include "IBean.h" +#include "Integration/Core/CErrorHandler.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationComponent.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" +#include "Exception/CCafException.h" +#include "CProviderExecutor.h" + +using namespace Caf; + +CProviderExecutor::CProviderExecutor() : + _isInitialized(false), + CAF_CM_INIT_LOG("CProviderExecutor") { +} + +CProviderExecutor::~CProviderExecutor() { +} + +void CProviderExecutor::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + + IBean::Cprops::const_iterator itr = properties.find("beginImpersonationBeanRef"); + if (itr != properties.end()) { + _beginImpersonationBeanId = itr->second; + } + + itr = properties.find("endImpersonationBeanRef"); + if (itr != properties.end()) { + _endImpersonationBeanId = itr->second; + } + + _isInitialized = true; +} + +void CProviderExecutor::terminateBean() { +} + +void CProviderExecutor::wire(const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + + if (AppConfigUtils::getOptionalBoolean(_sManagementAgentArea, "use_impersonation")) { + _beginImpersonationTransformer = loadTransformer(_beginImpersonationBeanId, appContext, channelResolver); + _endImpersonationTransformer = loadTransformer(_endImpersonationBeanId, appContext, channelResolver); + } + + SmartPtrCErrorHandler errorHandler; + errorHandler.CreateInstance(); + errorHandler->initialize(channelResolver, channelResolver->resolveChannelName("errorChannel")); + _errorHandler = errorHandler; +} + +SmartPtrITransformer CProviderExecutor::loadTransformer( + const std::string& id, + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + + CAF_CM_FUNCNAME("loadTransformer"); + + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_STRING(id); + + SmartPtrITransformer transformer; + if (!id.empty()) { + const SmartPtrIBean bean = appContext->getBean(id); + SmartPtrIIntegrationComponent integrationComponent; + integrationComponent.QueryInterface(bean, false); + if (!integrationComponent) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, 0, + "Bean is not an integration component - %s", id.c_str()); + } + + SmartPtrIDocument configSection; + SmartPtrIIntegrationObject integrationObject; + integrationObject = integrationComponent->createObject(configSection); + + SmartPtrIIntegrationComponentInstance integrationComponentInstance; + integrationComponentInstance.QueryInterface(integrationObject, false); + if (!integrationComponentInstance.IsNull()) { + integrationComponentInstance->wire(appContext, channelResolver); + } + + transformer.QueryInterface(integrationObject, false); + CAF_CM_VALIDATE_INTERFACE(transformer); + } + return transformer; +} + +void CProviderExecutor::handleMessage(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("handleMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + CAF_CM_LOG_DEBUG_VA0("Called"); + + SmartPtrCProviderExecutorRequest executorRequest; + executorRequest.CreateInstance(); + executorRequest->initialize(message); + + const std::string& providerUri = executorRequest->getProviderUri(); + SmartPtrCProviderExecutorRequestHandler handler = _handlers[providerUri]; + if (handler == NULL) { + SmartPtrCProviderExecutorRequestHandler requestHandler; + requestHandler.CreateInstance(); + requestHandler->initialize(providerUri, _beginImpersonationTransformer, + _endImpersonationTransformer, _errorHandler); + _handlers[providerUri] = requestHandler; + handler = requestHandler; + } + handler->handleRequest(executorRequest); +} + +SmartPtrIIntMessage CProviderExecutor::getSavedMessage() const { + return NULL; +} + +void CProviderExecutor::clearSavedMessage() { +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.h new file mode 100644 index 000000000..b1b499f6f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutor.h @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProviderExecutor_h_ +#define CProviderExecutor_h_ + + +#include "IBean.h" + +#include "CProviderExecutorRequestHandler.h" +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IIntMessage.h" +#include "Integration/ITransformer.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IMessageHandler.h" + +using namespace Caf; + +/// TODO - describe class +class CProviderExecutor : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponentInstance, + public IMessageHandler { + +public: + CProviderExecutor(); + virtual ~CProviderExecutor(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdProviderExecutor) + + CAF_BEGIN_INTERFACE_MAP(CProviderExecutor) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(IMessageHandler) + CAF_END_INTERFACE_MAP() + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponentInstance + virtual void wire(const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // IMessageHandler + virtual void handleMessage(const SmartPtrIIntMessage& message); + SmartPtrIIntMessage getSavedMessage() const; + void clearSavedMessage(); + +private: + SmartPtrITransformer loadTransformer( + const std::string& id, + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +private: + bool _isInitialized; + std::map _handlers; + std::string _beginImpersonationBeanId; + std::string _endImpersonationBeanId; + SmartPtrITransformer _beginImpersonationTransformer; + SmartPtrITransformer _endImpersonationTransformer; + SmartPtrIErrorHandler _errorHandler; + + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderExecutor); +}; + +#endif // #ifndef CProviderExecutor_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequest.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequest.cpp new file mode 100644 index 000000000..df2999382 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequest.cpp @@ -0,0 +1,86 @@ +/* + * Author: brets + * Created: Nov 20, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/CafCoreTypesDoc/CPropertyDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Integration/IIntMessage.h" +#include "CProviderExecutorRequest.h" +#include "Exception/CCafException.h" +#include "CProviderExecutor.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" + +using namespace Caf; + +CProviderExecutorRequest::CProviderExecutorRequest() : + _isInitialized(false), + CAF_CM_INIT_LOG("CProviderExecutorRequest") { +} + +CProviderExecutorRequest::~CProviderExecutorRequest() { +} + +void CProviderExecutorRequest::initialize(const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + CAF_CM_LOG_DEBUG_VA0("Called"); + + _internalRequest = message; + _request = CCafMessagePayloadParser::getProviderRequest(message->getPayload()); + + std::deque properties = + _request->getRequestHeader()->getEchoPropertyBag()->getProperty(); + + std::string relDirectory; + for(std::deque::const_iterator itr = properties.begin(); itr != properties.end(); itr++) { + if ((*itr)->getName().compare("relDirectory") == 0) { + relDirectory = (*itr)->getValue().front(); + } else if ((*itr)->getName().compare("providerUri") == 0) { + _providerUri = (*itr)->getValue().front(); + } + } + + if (relDirectory.empty() || _providerUri.empty()) { + CAF_CM_EXCEPTIONEX_VA2(Caf::NoSuchElementException, ERROR_NOT_FOUND, + "Missing provider request information - relDirectory: [%s] providerUri: [%s]", + relDirectory.c_str(), _providerUri.c_str()); + } + + const std::string configOutputDir = AppConfigUtils::getRequiredString(_sConfigOutputDir); + _outputDir = FileSystemUtils::buildPath(configOutputDir, _sProviderHostArea, relDirectory); + + _isInitialized = true; +} + +const SmartPtrCProviderRequestDoc CProviderExecutorRequest::getRequest() const { + CAF_CM_FUNCNAME_VALIDATE("getRequest"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _request; +} + +const SmartPtrIIntMessage CProviderExecutorRequest::getInternalRequest() const { + CAF_CM_FUNCNAME_VALIDATE("getRequest"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _internalRequest; +} + +const std::string& CProviderExecutorRequest::getOutputDirectory() const { + CAF_CM_FUNCNAME_VALIDATE("getOutputDirectory"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _outputDir; +} + +const std::string& CProviderExecutorRequest::getProviderUri() const { + CAF_CM_FUNCNAME_VALIDATE("getProviderUri"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + return _providerUri; +} + diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.cpp new file mode 100644 index 000000000..8c1d1ea87 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CProviderExecutorRequestHandler.cpp @@ -0,0 +1,263 @@ +/* + * Author: brets + * Created: Nov 20, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CResponseFactory.h" +#include "CProviderExecutorRequest.h" +#include "Common/CLoggingSetter.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Doc/ResponseDoc/CResponseDoc.h" +#include "Integration/Core/CIntException.h" +#include "Integration/Core/CSimpleAsyncTaskExecutor.h" +#include "Integration/IErrorHandler.h" +#include "Integration/IIntMessage.h" +#include "Integration/ITaskExecutor.h" +#include "Integration/ITransformer.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "CProviderExecutorRequestHandler.h" +#include "Exception/CCafException.h" +#include "Integration/Caf/CCafMessageCreator.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" +#include "Integration/Caf/CCafMessagePayload.h" +#include "Integration/Core/FileHeaders.h" + +using namespace Caf; + +CProviderExecutorRequestHandler::CProviderExecutorRequestHandler() : + _isInitialized(false), + _isCancelled(false), + CAF_CM_INIT_LOG("CProviderExecutorRequestHandler") { + CAF_CM_INIT_THREADSAFE; +} + +CProviderExecutorRequestHandler::~CProviderExecutorRequestHandler() { +} + +void CProviderExecutorRequestHandler::initialize(const std::string& providerUri, + const SmartPtrITransformer beginImpersonationTransformer, + const SmartPtrITransformer endImpersonationTransformer, + const SmartPtrIErrorHandler errorHandler) { + CAF_CM_FUNCNAME("initialize"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(providerUri); + + _providerUri = providerUri; + UriUtils::SUriRecord providerUriRecord; + UriUtils::parseUriString(providerUri, providerUriRecord); + + if (providerUriRecord.protocol.compare("file") != 0) { + CAF_CM_EXCEPTIONEX_VA2(Caf::NoSuchElementException, ERROR_NOT_FOUND, + "Unrecognized provider URI protocol - %s, %s", + providerUriRecord.protocol.c_str(), providerUri.c_str()); + } + + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(providerUriRecord.address, fileUriRecord); + _providerPath = fileUriRecord.path; + + if (!FileSystemUtils::doesFileExist(_providerPath)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Provider path not found - %s", _providerPath.c_str()); + } + + _beginImpersonationTransformer = beginImpersonationTransformer; + _endImpersonationTransformer = endImpersonationTransformer; + _errorHandler = errorHandler; + + _isInitialized = true; +} + +void CProviderExecutorRequestHandler::handleRequest( + const SmartPtrCProviderExecutorRequest request) { + CAF_CM_FUNCNAME("handleRequest"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(request); + + if (_providerUri.compare(request->getProviderUri()) != 0) { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, ERROR_INVALID_PARAMETER, + "Provider request not for current provider - %s", _providerUri.c_str()); + } + + executeRequestAsync(request); +} + +void CProviderExecutorRequestHandler::run() { + CAF_CM_FUNCNAME("run"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrIIntMessage message; + const SmartPtrCProviderExecutorRequest request = getNextPendingRequest(); + if (! request.IsNull()) { + try { + processRequest(request); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + + if (CAF_CM_ISEXCEPTION) { + SmartPtrCIntException intException; + intException.CreateInstance(); + intException->initialize(CAF_CM_GETEXCEPTION); + _errorHandler->handleError(intException, request->getInternalRequest()); + + CAF_CM_CLEAREXCEPTION; + } + } + + CAF_CM_LOG_DEBUG_VA0("Finished"); +} + +void CProviderExecutorRequestHandler::cancel() { + CAF_CM_FUNCNAME_VALIDATE("cancel"); + CAF_CM_LOCK_UNLOCK; + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CAF_CM_LOG_DEBUG_VA0("Canceling"); + _isCancelled = true; +} + +SmartPtrCProviderExecutorRequest CProviderExecutorRequestHandler::getNextPendingRequest() { + + SmartPtrCProviderExecutorRequest rc; + if (! _isCancelled && ! _pendingRequests.empty()) { + rc = _pendingRequests.front(); + _pendingRequests.pop_front(); + } + + return rc; +} + +void CProviderExecutorRequestHandler::processRequest( + const SmartPtrCProviderExecutorRequest& request) const { + CAF_CM_FUNCNAME_VALIDATE("processRequest"); + CAF_CM_VALIDATE_SMARTPTR(request); + + const std::string outputDir = request->getOutputDirectory(); + + SmartPtrCLoggingSetter loggingSetter; + loggingSetter.CreateInstance(); + loggingSetter->initialize(outputDir); + + SmartPtrIIntMessage message = request->getInternalRequest(); + + const std::string providerRequestPath = FileSystemUtils::buildPath(outputDir, _sProviderRequestFilename); + const std::string stdoutPath = FileSystemUtils::buildPath(outputDir, _sStdoutFilename); + const std::string stderrPath = FileSystemUtils::buildPath(outputDir, _sStderrFilename); + + std::string newProviderRequestPath = FileSystemUtils::normalizePathWithForward( + providerRequestPath); + + // Create temporary request file for use by the provider + CCafMessagePayload::saveToFile(message->getPayload(), newProviderRequestPath); + + Cdeqstr argv; + argv.push_back(_providerPath); + argv.push_back("-r"); + argv.push_back(newProviderRequestPath); + + CAF_CM_LOG_INFO_VA2("Running command - %s -r %s", _providerPath.c_str(), + newProviderRequestPath.c_str()); + + ProcessUtils::Priority priority = ProcessUtils::NORMAL; + std::string appConfigPriority = AppConfigUtils::getOptionalString(_sManagementAgentArea, "provider_process_priority"); + if (!appConfigPriority.empty()) { + if (CStringUtils::isEqualIgnoreCase("LOW", appConfigPriority)) { + priority = ProcessUtils::LOW; + } else if (CStringUtils::isEqualIgnoreCase("IDLE", appConfigPriority)) { + priority = ProcessUtils::IDLE; + } + } + + // Begin impersonation + if (!_beginImpersonationTransformer.IsNull()) { + message = _beginImpersonationTransformer->transformMessage(message); + if (message.IsNull()) { + CAF_CM_LOG_WARN_VA0("Begin impersonation transform did not return a message"); + } + } + + { + CAF_CM_UNLOCK_LOCK; + ProcessUtils::runSyncToFiles(argv, stdoutPath, stderrPath, priority); + } + + // End impersonation + if (!_endImpersonationTransformer.IsNull()) { + message = _endImpersonationTransformer->transformMessage(message); + if (message.IsNull()) { + CAF_CM_LOG_WARN_VA0("End impersonation transform did not return a message"); + } + } + + // Delete temporary request file used by the provider + if (FileSystemUtils::doesFileExist(newProviderRequestPath)) { + CAF_CM_LOG_INFO_VA1("Removing handler produced request file - %s", newProviderRequestPath.c_str()); + FileSystemUtils::removeFile(newProviderRequestPath); + } + + // Delete original request + const std::string originalFile = message->findOptionalHeaderAsString(FileHeaders::_sORIGINAL_FILE); + if (!originalFile.empty()) { + if (FileSystemUtils::doesFileExist(originalFile)) { + CAF_CM_LOG_INFO_VA1("Removing original file - %s", originalFile.c_str()); + FileSystemUtils::removeFile(originalFile); + } + } + + // Package response in envelope and write to global response location + const SmartPtrCProviderRequestDoc providerRequest = + CCafMessagePayloadParser::getProviderRequest(message->getPayload()); + const SmartPtrCResponseDoc response = CResponseFactory::createResponse(providerRequest, outputDir); + + const std::string relFilename = CStringUtils::createRandomUuid() + "_" + _sResponseFilename; + + SmartPtrIIntMessage responseMessage = CCafMessageCreator::createPayloadEnvelope( + response, relFilename, message->getHeaders()); + + const std::string directory = AppConfigUtils::getRequiredString("response_dir"); + const std::string filePath = FileSystemUtils::buildPath(directory, relFilename); + + const SmartPtrCDynamicByteArray payload = responseMessage->getPayload(); + FileSystemUtils::saveByteFile(filePath, payload->getPtr(), payload->getByteCount(), + FileSystemUtils::FILE_MODE_REPLACE, ".writing"); +} + +void CProviderExecutorRequestHandler::executeRequestAsync( + const SmartPtrCProviderExecutorRequest& request) { + CAF_CM_FUNCNAME_VALIDATE("executeRequestAsync"); + CAF_CM_VALIDATE_SMARTPTR(request); + + _pendingRequests.push_back(request); + + _taskExecutors = removeFinishedTaskExecutors(_taskExecutors); + + SmartPtrCSimpleAsyncTaskExecutor simpleAsyncTaskExecutor; + simpleAsyncTaskExecutor.CreateInstance(); + simpleAsyncTaskExecutor->initialize(this, _errorHandler); + _taskExecutors.push_back(simpleAsyncTaskExecutor); + simpleAsyncTaskExecutor->execute(0); +} + +std::deque CProviderExecutorRequestHandler::removeFinishedTaskExecutors( + const std::deque taskExecutors) const { + + std::deque taskExecutorsTmp; + for (TConstIterator > iter(taskExecutors); + iter; iter++) { + const SmartPtrITaskExecutor taskExecutorIter = *iter; + if (! ((taskExecutorIter->getState() == ITaskExecutor::ETaskStateFinished) + || (taskExecutorIter->getState() == ITaskExecutor::ETaskStateFailed))) { + taskExecutorsTmp.push_back(taskExecutorIter); + } + } + + return taskExecutorsTmp; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CResponseFactory.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CResponseFactory.cpp new file mode 100644 index 000000000..8fe087f5e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CResponseFactory.cpp @@ -0,0 +1,389 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ResponseXml/ResponseXmlRoots.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Doc/ResponseDoc/CManifestCollectionDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Doc/ResponseDoc/CProviderResponseDoc.h" +#include "Doc/ResponseDoc/CResponseDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "CResponseFactory.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +SmartPtrCResponseDoc CResponseFactory::createResponse( + const SmartPtrCProviderCollectSchemaRequestDoc& providerCollectSchemaRequest, + const std::string& outputDir, + const std::string& schemaCacheDir) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "createResponse"); + CAF_CM_VALIDATE_SMARTPTR(providerCollectSchemaRequest); + CAF_CM_VALIDATE_STRING(outputDir); + CAF_CM_VALIDATE_STRING(schemaCacheDir); + + SmartPtrCManifestCollectionDoc manifestCollection; + SmartPtrCAttachmentCollectionDoc attachmentCollection; + findAndStoreGlobalAttachmentsAndProviderResponses(outputDir, schemaCacheDir, + manifestCollection, attachmentCollection); + + SmartPtrCResponseHeaderDoc responseHeader; + responseHeader.CreateInstance(); + responseHeader->initialize(); + + SmartPtrCResponseDoc response; + response.CreateInstance(); + response->initialize( + providerCollectSchemaRequest->getClientId(), + providerCollectSchemaRequest->getRequestId(), + providerCollectSchemaRequest->getPmeId(), + responseHeader, + manifestCollection, + attachmentCollection, + SmartPtrCStatisticsDoc()); + + return response; +} + +SmartPtrCResponseDoc CResponseFactory::createResponse( + const SmartPtrCProviderRequestDoc& providerRequest, + const std::string& outputDir) { + CAF_CM_STATIC_FUNC_LOG("CResponseFactory", "createResponse"); + CAF_CM_VALIDATE_SMARTPTR(providerRequest); + CAF_CM_VALIDATE_STRING(outputDir); + + SmartPtrCManifestCollectionDoc manifestCollection; + SmartPtrCAttachmentCollectionDoc attachmentCollection; + findAndStoreGlobalAttachmentsAndProviderResponses(outputDir, std::string(), + manifestCollection, attachmentCollection); + + if (manifestCollection.IsNull() && attachmentCollection.IsNull()) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Did not find any attachments - %s", outputDir.c_str()); + } + + SmartPtrCResponseHeaderDoc responseHeader; + responseHeader.CreateInstance(); + responseHeader->initialize(); + + SmartPtrCResponseDoc response; + response.CreateInstance(); + response->initialize( + providerRequest->getClientId(), + providerRequest->getRequestId(), + providerRequest->getPmeId(), + responseHeader, + manifestCollection, + attachmentCollection, + SmartPtrCStatisticsDoc()); + + return response; +} + +void CResponseFactory::findAndStoreGlobalAttachmentsAndProviderResponses( + const std::string& outputDir, + const std::string& schemaCacheDir, + SmartPtrCManifestCollectionDoc& manifestCollection, + SmartPtrCAttachmentCollectionDoc& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "findAndStoreGlobalAttachmentsAndProviderResponses"); + CAF_CM_VALIDATE_STRING(outputDir); + // schemaCacheDir is optional + + std::map globalAttachmentCollection; + std::deque manifestCollectionInner; + findAndStoreGlobalAttachments(outputDir, globalAttachmentCollection); + findAndStoreProviderResponses(outputDir, schemaCacheDir, + globalAttachmentCollection, manifestCollectionInner); + + if (!manifestCollectionInner.empty()) { + manifestCollection.CreateInstance(); + manifestCollection->initialize(manifestCollectionInner); + } + + if (!globalAttachmentCollection.empty()) { + std::deque globalAttachmentCollectionInner; + for (TConstMapIterator > + globalAttachmentIter(globalAttachmentCollection); globalAttachmentIter; globalAttachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *globalAttachmentIter; + globalAttachmentCollectionInner.push_back(attachment); + } + + attachmentCollection.CreateInstance(); + attachmentCollection->initialize(globalAttachmentCollectionInner, + std::deque()); + } +} + +void CResponseFactory::findAndStoreProviderResponses( + const std::string& outputDir, + const std::string& schemaCacheDir, + std::map& globalAttachmentCollection, + std::deque& manifestCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "findAndStoreProviderResponses"); + CAF_CM_VALIDATE_STRING(outputDir); + // schemaCacheDir is optional + + const std::deque providerResponsePathCollection = + FileSystemUtils::findRequiredFiles(outputDir, _sProviderResponseFilename); + + for (TConstIterator > providerResponsePathIter( + providerResponsePathCollection); providerResponsePathIter; providerResponsePathIter++) { + const std::string providerResponsePath = *providerResponsePathIter; + + CAF_CM_LOG_DEBUG_VA1("Parsing provider response - %s", providerResponsePath.c_str()); + + const SmartPtrCProviderResponseDoc providerResponse = + XmlRoots::parseProviderResponseFromFile(providerResponsePath); + + const SmartPtrCManifestDoc providerResponseManifest = + providerResponse->getManifest(); + if (!providerResponseManifest.IsNull()) { + manifestCollection.push_back(providerResponseManifest); + } + + const SmartPtrCAttachmentCollectionDoc providerResponseAttachmentCollection = + providerResponse->getAttachmentCollection(); + + if (!providerResponseAttachmentCollection.IsNull()) { + std::deque + providerResponseAttachmentCollectionInner = + providerResponseAttachmentCollection->getAttachment(); + + resolveAndStoreGlobalAttachments(providerResponseAttachmentCollectionInner, + outputDir, schemaCacheDir, globalAttachmentCollection); + } + } +} + +void CResponseFactory::findAndStoreGlobalAttachments( + const std::string& outputDir, + std::map& globalAttachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "findAndStoreGlobalAttachments"); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string parentOutputDir = FileSystemUtils::buildPath(outputDir, ".."); + const std::string requestPath = FileSystemUtils::findOptionalFile(parentOutputDir, + _sPayloadRequestFilename); + + const std::deque stdoutPathCollection = + FileSystemUtils::findOptionalFiles(outputDir, _sStdoutFilename); + const std::deque stderrPathCollection = + FileSystemUtils::findOptionalFiles(outputDir, _sStderrFilename); + const std::deque maDebugLogPathCollection = + FileSystemUtils::findOptionalFiles(outputDir, "ma-log4cpp.log"); + + if (!requestPath.empty()) { + std::deque requestPathCollection; + requestPathCollection.push_back(requestPath); + storeGlobalAttachments(std::string(), "request", requestPathCollection, + outputDir, globalAttachmentCollection); + } + if (!stdoutPathCollection.empty()) { + storeGlobalAttachments(std::string(), "stdout", stdoutPathCollection, + outputDir, globalAttachmentCollection); + } + if (!stderrPathCollection.empty()) { + storeGlobalAttachments(std::string(), "stderr", stderrPathCollection, + outputDir, globalAttachmentCollection); + } + if (!maDebugLogPathCollection.empty()) { + storeGlobalAttachments(std::string(), "log", maDebugLogPathCollection, + outputDir, globalAttachmentCollection); + } +} + +void CResponseFactory::resolveAndStoreGlobalAttachments( + const std::deque attachmentCollectionInner, + const std::string& outputDir, + const std::string& schemaCacheDir, + std::map& globalAttachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "resolveAndStoreGlobalAttachments"); + CAF_CM_VALIDATE_STL(attachmentCollectionInner); + CAF_CM_VALIDATE_STRING(outputDir); + // schemaCacheDir is optional + + for (TConstIterator > attachmentIter( + attachmentCollectionInner); attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + UriUtils::SUriRecord uriRecord; + UriUtils::parseUriString(attachment->getUri(), uriRecord); + + if (uriRecord.protocol.compare("file") == 0) { + UriUtils::SFileUriRecord fileUriRecord; + UriUtils::parseFileAddress(uriRecord.address, fileUriRecord); + + std::string attachmentPath = fileUriRecord.path; + std::string attachmentPathNew = attachmentPath; + if (!schemaCacheDir.empty()) { + std::string relPath; + resolveAttachmentPath(attachmentPath, outputDir, relPath, + attachmentPathNew); + } + + if (!attachmentPathNew.empty()) { + storeGlobalAttachment(attachment->getName(), attachment->getType(), + attachmentPathNew, outputDir, globalAttachmentCollection); + } + } else { + globalAttachmentCollection.insert( + std::make_pair(attachment->getUri(), attachment)); + } + } +} + +void CResponseFactory::storeGlobalAttachments( + const std::string& attachmentName, + const std::string& attachmentType, + const std::deque& attachmentPathCollection, + const std::string& baseDir, + std::map& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "storeGlobalAttachments"); + // attachmentName is optional + CAF_CM_VALIDATE_STRING(attachmentType); + CAF_CM_VALIDATE_STL(attachmentPathCollection); + CAF_CM_VALIDATE_STRING(baseDir); + + for (TConstIterator > attachmentPathIter( + attachmentPathCollection); attachmentPathIter; attachmentPathIter++) { + const std::string attachmentPath = *attachmentPathIter; + + storeGlobalAttachment(attachmentName, attachmentType, attachmentPath, baseDir, + attachmentCollection); + } +} + +void CResponseFactory::storeGlobalAttachment( + const std::string& attachmentName, + const std::string& attachmentType, + const std::string& attachmentPath, + const std::string& baseDir, + std::map& attachmentCollection) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "storeGlobalAttachment"); + // attachmentName is optional + CAF_CM_VALIDATE_STRING(attachmentType); + CAF_CM_VALIDATE_STRING(attachmentPath); + CAF_CM_VALIDATE_STRING(baseDir); + + std::string relPath; + std::string attachmentPathNew; + resolveAttachmentPath(attachmentPath, baseDir, relPath, attachmentPathNew); + + if (!attachmentPathNew.empty()) { + std::string attachmentNameNew = attachmentName; + if (attachmentName.empty()) { + attachmentNameNew = relPath; + std::replace(attachmentNameNew.begin(), attachmentNameNew.end(), '/', '.'); + } + + attachmentPathNew = FileSystemUtils::normalizePathWithForward(attachmentPathNew); + + const std::string attachmentUri = "file:///" + attachmentPathNew + "?relPath=" + + relPath; + + CAF_CM_LOG_DEBUG_VA3("Creating attachment - name: %s, type: %s, uri: %s", + attachmentNameNew.c_str(), attachmentType.c_str(), attachmentUri.c_str()); + + const std::string cmsPolicyStr = AppConfigUtils::getRequiredString( + "security", "cms_policy"); + + SmartPtrCAttachmentDoc attachment; + attachment.CreateInstance(); + attachment->initialize(attachmentNameNew, attachmentType, attachmentUri, false, + EnumConvertersXml::convertStringToCmsPolicy(cmsPolicyStr)); + + attachmentCollection.insert(std::make_pair(attachmentUri, attachment)); + } +} + +void CResponseFactory::resolveAttachmentPath( + const std::string& attachmentPath, + const std::string& baseDir, + std::string& relPath, + std::string& attachmentPathNew) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CResponseFactory", "resolveAttachmentPath"); + CAF_CM_VALIDATE_STRING(attachmentPath); + CAF_CM_VALIDATE_STRING(baseDir); + + // Initialize the input variables + relPath = std::string(); + attachmentPathNew = attachmentPath; + + std::string baseDirNew = baseDir; + + const std::string baseDirNewTmp = baseDirNew + '/'; + const std::string::size_type fndPos = attachmentPathNew.find(baseDirNewTmp); + if (fndPos != std::string::npos) { + relPath = attachmentPathNew; + relPath.replace(fndPos, baseDirNewTmp.length(), ""); + + relPath = removeLeadingChars(relPath, '.'); + relPath = removeLeadingChars(relPath, '/'); + } + + if (relPath.empty()) { + relPath = FileSystemUtils::getBasename(attachmentPathNew); + attachmentPathNew = FileSystemUtils::buildPath(baseDirNew, relPath); + const std::string attachmentPathTmp = + FileSystemUtils::normalizePathForPlatform(attachmentPath); + + if (attachmentPathTmp.compare(attachmentPathNew) != 0) { + if (FileSystemUtils::doesFileExist(attachmentPathNew)) { + bool isFileNameFound = false; + const std::string origRelPath = relPath; + for (uint32 index = 0; !isFileNameFound; index++) { + relPath = CStringConv::toString(index) + "_" + origRelPath; + attachmentPathNew = FileSystemUtils::buildPath(baseDirNew, relPath); + if (! FileSystemUtils::doesFileExist(attachmentPathNew)) { + CAF_CM_LOG_WARN_VA1("File already exists... calculated new name - %s", + attachmentPathNew.c_str()); + isFileNameFound = true; + } + } + } + + if (FileSystemUtils::isRegularFile(attachmentPathTmp)) { + CAF_CM_LOG_WARN_VA3("Attachment not in specified directory... Copying - attPath: \"%s\", goodDir: \"%s\", newPath: \"%s\"", + attachmentPathTmp.c_str(), baseDirNew.c_str(), attachmentPathNew.c_str()); + FileSystemUtils::copyFile(attachmentPathTmp, attachmentPathNew); + } else { + CAF_CM_LOG_ERROR_VA3("Attachment not in specified or calculated directory - attPath: \"%s\", goodDir: \"%s\", newPath: \"%s\"", + attachmentPathTmp.c_str(), baseDirNew.c_str(), attachmentPathNew.c_str()); + attachmentPathNew = std::string(); + } + } + } +} + +std::string CResponseFactory::removeLeadingChars( + const std::string& sourceStr, + const char leadingChar) { + + std::string rc; + if (!sourceStr.empty()) { + bool isCharFnd = false; + for (size_t index = 0; index < sourceStr.length(); index++) { + if (!isCharFnd && (sourceStr[index] != leadingChar)) { + isCharFnd = true; + } + if (isCharFnd) { + rc += sourceStr[index]; + } + } + } + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSchemaCacheManager.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSchemaCacheManager.cpp new file mode 100644 index 000000000..ee0b0b75a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSchemaCacheManager.cpp @@ -0,0 +1,236 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderInfraXml/ProviderInfraXmlRoots.h" + +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Doc/ProviderInfraDoc/CClassCollectionDoc.h" +#include "Doc/ProviderInfraDoc/CSchemaSummaryDoc.h" +#include "CSchemaCacheManager.h" +#include "Exception/CCafException.h" + +using namespace Caf; + +bool Caf::operator<( + const CClassId& lhs, + const CClassId& rhs) { + bool rc = false; + + if (lhs._fqc->getClassNamespace() < rhs._fqc->getClassNamespace()) { + rc = true; + } else if (lhs._fqc->getClassNamespace() == rhs._fqc->getClassNamespace()) { + if (lhs._fqc->getClassName() < rhs._fqc->getClassName()) { + rc = true; + } else if (lhs._fqc->getClassName() == rhs._fqc->getClassName()) { + if (lhs._fqc->getClassVersion() < rhs._fqc->getClassVersion()) { + rc = true; + } + } + } + + return rc; +} + +CSchemaCacheManager::CSchemaCacheManager() : + _isInitialized(false), + CAF_CM_INIT_LOG("CSchemaCacheManager") { +} + +CSchemaCacheManager::~CSchemaCacheManager() { +} + +void CSchemaCacheManager::initialize() { + + CAF_CM_FUNCNAME("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + + const std::string schemaCacheDirPath = + AppConfigUtils::getRequiredString(_sProviderHostArea, _sConfigSchemaCacheDir); + const std::string schemaCacheDirPathExp = CStringUtils::expandEnv(schemaCacheDirPath); + if (!FileSystemUtils::doesDirectoryExist(schemaCacheDirPathExp)) { + CAF_CM_EXCEPTIONEX_VA1(FileNotFoundException, ERROR_FILE_NOT_FOUND, + "Schema cache directory does not exist: %s", schemaCacheDirPathExp.c_str()); + } + + _schemaCacheDirPath = schemaCacheDirPathExp; + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CSchemaCacheManager::findProvider( + const SmartPtrCFullyQualifiedClassGroupDoc& fqc) { + + CAF_CM_FUNCNAME_VALIDATE("findProvider"); + + std::string providerUri; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(fqc); + + CClassId classId; + classId._fqc = fqc; + + CClassCollection::const_iterator iter = _classCollection.find(classId); + if (iter == _classCollection.end()) { + CAF_CM_LOG_INFO_VA1("Provider not found... refreshing cache - %s", classId.toString().c_str()); + + const uint16 maxWaitSecs = 10; + waitForSchemaCacheCreation(_schemaCacheDirPath, maxWaitSecs); + + processSchemaSummaries(_schemaCacheDirPath, _classCollection); + + CClassCollection::const_iterator iter2 = _classCollection.find(classId); + if (iter2 == _classCollection.end()) { + CAF_CM_LOG_WARN_VA1("Provider not found even after refreshing the cache - %s", classId.toString().c_str()); + } else { + providerUri = iter2->second; + } + } else { + providerUri = iter->second; + } + } + CAF_CM_EXIT; + + return providerUri; +} + +void CSchemaCacheManager::processSchemaSummaries( + const std::string& schemaCacheDirPath, + CClassCollection& classCollection) const { + CAF_CM_FUNCNAME_VALIDATE("processSchemaSummaries"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(schemaCacheDirPath); + + const FileSystemUtils::DirectoryItems schemaCacheDirItems = + FileSystemUtils::itemsInDirectory(schemaCacheDirPath, + FileSystemUtils::REGEX_MATCH_ALL); + + if (schemaCacheDirItems.directories.empty()) { + CAF_CM_LOG_WARN_VA1( + "Schema cache is empty - %s", schemaCacheDirPath.c_str()); + } + + for (TConstIterator schemaCacheDirIter( + schemaCacheDirItems.directories); schemaCacheDirIter; schemaCacheDirIter++) { + const std::string providerSchemaCacheDir = *schemaCacheDirIter; + + const std::string providerSchemaCacheDirPath = FileSystemUtils::buildPath( + schemaCacheDirPath, providerSchemaCacheDir); + const std::string schemaSummaryFilePath = FileSystemUtils::findOptionalFile( + providerSchemaCacheDirPath, _sSchemaSummaryFilename); + + if (schemaSummaryFilePath.empty()) { + CAF_CM_LOG_WARN_VA1( + "Schema cache directory found without schema summary file... might be a timing issue - %s", + providerSchemaCacheDirPath.c_str()); + } else { + CAF_CM_LOG_DEBUG_VA1("Found schema cache summary file - %s", schemaSummaryFilePath.c_str()); + + const SmartPtrCSchemaSummaryDoc schemaSummary = + XmlRoots::parseSchemaSummaryFromFile(schemaSummaryFilePath); + + addNewClasses(schemaSummary, schemaSummaryFilePath, classCollection); + } + } + } + CAF_CM_EXIT; +} + +void CSchemaCacheManager::addNewClasses( + const SmartPtrCSchemaSummaryDoc& schemaSummary, + const std::string& schemaSummaryFilePath, + CClassCollection& classCollection) const { + CAF_CM_FUNCNAME("addNewClasses"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(schemaSummary); + CAF_CM_VALIDATE_STRING(schemaSummaryFilePath); + + const std::string invokerPath = schemaSummary->getInvokerPath(); + + std::string providerUri; + if (! invokerPath.empty()) { + const std::string invokerPathExp = CStringUtils::expandEnv(invokerPath); + if (FileSystemUtils::doesFileExist(invokerPathExp)) { + const std::string invokerPathExpTmp = + FileSystemUtils::normalizePathWithForward(invokerPathExp); + providerUri = "file:///" + invokerPathExpTmp; + } else { + CAF_CM_LOG_ERROR_VA2( + "Invoker path does not exist - invokerPath: %s, filePath: %s", + invokerPathExp.c_str(), schemaSummaryFilePath.c_str()); + } + } else { + CAF_CM_EXCEPTIONEX_VA1(InvalidArgumentException, E_INVALIDARG, + "Schema Summary file missing invokerRelPath - %s", schemaSummaryFilePath.c_str()); + } + + if (! providerUri.empty()) { + const SmartPtrCClassCollectionDoc classCollectionDoc = schemaSummary->getClassCollection(); + const std::deque fqcCollection = classCollectionDoc->getFullyQualifiedClass(); + + for (TConstIterator > fqcIter(fqcCollection); + fqcIter; fqcIter++) { + CClassId classId; + classId._fqc = *fqcIter; + + if (classCollection.find(classId) == classCollection.end()) { + CAF_CM_LOG_DEBUG_VA1("Adding class %s", classId.toString().c_str()); + classCollection.insert(std::make_pair(classId, providerUri)); + } + } + } + } + CAF_CM_EXIT; +} + +void CSchemaCacheManager::waitForSchemaCacheCreation( + const std::string& schemaCacheDir, + const uint16 maxWaitSecs) const { + CAF_CM_FUNCNAME_VALIDATE("waitForSchemaCacheCreation"); + CAF_CM_VALIDATE_STRING(schemaCacheDir); + + const std::string providerRegDir = AppConfigUtils::getRequiredString( + _sProviderHostArea, _sConfigProviderRegDir); + const std::string providerRegDirExp = CStringUtils::expandEnv(providerRegDir); + + if (FileSystemUtils::doesDirectoryExist(providerRegDirExp)) { + size_t numSchemaCacheItems = 0; + size_t numProviderRegItems = 0; + for (uint16 retry = 0; retry < maxWaitSecs; retry++) { + numSchemaCacheItems = FileSystemUtils::itemsInDirectory(schemaCacheDir, + FileSystemUtils::REGEX_MATCH_ALL).directories.size(); + numProviderRegItems = FileSystemUtils::itemsInDirectory(providerRegDir, + FileSystemUtils::REGEX_MATCH_ALL).files.size(); + + if (numSchemaCacheItems >= numProviderRegItems) { + break; + } + + CThreadUtils::sleep(1000); + } + + if (numSchemaCacheItems < numProviderRegItems) { + CAF_CM_LOG_WARN_VA5( + "Schema cache initialization not complete - schemaCache: %s::%d, providerReg: %s::%d, maxWaitSecs: %d", + schemaCacheDir.c_str(), numSchemaCacheItems, providerRegDir.c_str(), + numProviderRegItems, maxWaitSecs); + } + } else { + CAF_CM_LOG_WARN_VA1("Provider Reg directory does not exist - %s", + providerRegDirExp.c_str()); + } +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.cpp new file mode 100644 index 000000000..ab47095df --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CSinglePmeRequestSplitter.h" + +using namespace Caf; + +CSinglePmeRequestSplitter::CSinglePmeRequestSplitter() : + _isInitialized(false), + CAF_CM_INIT_LOG("CSinglePmeRequestSplitter") { +} + +CSinglePmeRequestSplitter::~CSinglePmeRequestSplitter() { +} + +void CSinglePmeRequestSplitter::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CSinglePmeRequestSplitter::terminateBean() { +} + +void CSinglePmeRequestSplitter::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CSinglePmeRequestSplitter::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CSinglePmeRequestSplitter::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdSinglePmeRequestSplitterInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.h new file mode 100644 index 000000000..761844286 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitter.h @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CSinglePmeRequestSplitter_h_ +#define CSinglePmeRequestSplitter_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CSinglePmeRequestSplitter : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CSinglePmeRequestSplitter(); + virtual ~CSinglePmeRequestSplitter(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdSinglePmeRequestSplitter) + + CAF_BEGIN_INTERFACE_MAP(CSinglePmeRequestSplitter) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CSinglePmeRequestSplitter); +}; + +} + +#endif // #ifndef CSinglePmeRequestSplitter_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.cpp new file mode 100644 index 000000000..b35c1efe8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CSinglePmeRequestSplitterInstance.cpp @@ -0,0 +1,458 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CClassSpecifierDoc.h" +#include "Doc/CafCoreTypesDoc/CFullyQualifiedClassGroupDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestConfigDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "Doc/MgmtRequestDoc/CMgmtRequestDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtBatchDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectInstancesDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtCollectSchemaDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationCollectionDoc.h" +#include "Doc/MgmtTypesDoc/CMgmtInvokeOperationDoc.h" +#include "Doc/ProviderRequestDoc/CProviderBatchDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectSchemaRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestConfigDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestHeaderDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "CSinglePmeRequestSplitterInstance.h" +#include "Exception/CCafException.h" +#include "Integration/Caf/CCafMessageCreator.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" +#include "Integration/Caf/CCafMessagePayload.h" + +using namespace Caf; + +CSinglePmeRequestSplitterInstance::CSinglePmeRequestSplitterInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CSinglePmeRequestSplitterInstance") { +} + +CSinglePmeRequestSplitterInstance::~CSinglePmeRequestSplitterInstance() { +} + +void CSinglePmeRequestSplitterInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + _schemaCacheManager.CreateInstance(); + _schemaCacheManager->initialize(); + + _isInitialized = true; +} + +std::string CSinglePmeRequestSplitterInstance::getId() const { + return _id; +} + +void CSinglePmeRequestSplitterInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +IMessageSplitter::SmartPtrCMessageCollection CSinglePmeRequestSplitterInstance::splitMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("splitMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(message); + + CAF_CM_LOG_DEBUG_VA1("Called - %s", _id.c_str()); + + SmartPtrCMessageCollection messageCollection; + messageCollection.CreateInstance(); + + const SmartPtrCMgmtRequestDoc mgmtRequest = + CCafMessagePayloadParser::getMgmtRequest(message->getPayload()); + + const SmartPtrCMgmtBatchDoc mgmtBatch = mgmtRequest->getBatch(); + + const SmartPtrCProviderRequestHeaderDoc providerRequestHeader = + convertRequestHeader(mgmtRequest->getRequestHeader()); + + const std::string configOutputDir = AppConfigUtils::getRequiredString( + _sConfigOutputDir); + const std::string randomUuidStr = CStringUtils::createRandomUuid(); + const std::string absRandomUuidDir = FileSystemUtils::buildPath(configOutputDir, + _sProviderHostArea, randomUuidStr); + + createDirectory(absRandomUuidDir); + saveRequest(absRandomUuidDir, message->getPayload()); + + // Process the collect schema job first since it follows a + // completely different line of execution. + const SmartPtrCMgmtCollectSchemaDoc mgmtCollectSchema = + mgmtBatch->getCollectSchema(); + if (!mgmtCollectSchema.IsNull()) { + const std::string relProviderNumDir = FileSystemUtils::buildPath(randomUuidStr, + CStringConv::toString(0)); + const std::string absProviderNumDir = FileSystemUtils::buildPath( + absRandomUuidDir, CStringConv::toString(0)); + + const SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequest = + createCollectSchemaRequest(mgmtRequest, mgmtCollectSchema, + providerRequestHeader, absProviderNumDir); + + const std::string relFilename = FileSystemUtils::buildPath(relProviderNumDir, + _sProviderRequestFilename); + + const SmartPtrIIntMessage messageNew = CCafMessageCreator::create( + providerCollectSchemaRequest, relFilename, relProviderNumDir, + message->getHeaders()); + + messageCollection->push_back(messageNew); + } + + SmartPtrCProviderJobsCollection providerJobsCollection; + providerJobsCollection.CreateInstance(); + addCollectInstancesJobs(mgmtBatch->getCollectInstancesCollection(), + providerJobsCollection); + addInvokeOperationJobs(mgmtBatch->getInvokeOperationCollection(), + providerJobsCollection); + + uint32 providerCnt = 1; + for (TConstIterator providerJobsIter( + *providerJobsCollection); providerJobsIter; providerJobsIter++) { + const std::string providerUri = providerJobsIter->first; + const SmartPtrCSplitterJobsCollection jobsCollection = providerJobsIter->second; + + const std::string provderCntStr = CStringConv::toString(providerCnt); + const std::string absProviderNumDir = FileSystemUtils::buildPath(absRandomUuidDir, provderCntStr); + + const SmartPtrCProviderRequestDoc providerRequest = createProviderRequest( + mgmtRequest, jobsCollection, providerRequestHeader, absProviderNumDir); + + const std::string relProviderNumDir = FileSystemUtils::buildPath(randomUuidStr, provderCntStr); +// const std::string relFilename = FileSystemUtils::buildPath(relProviderNumDir, +// _sProviderRequestFilename); +// const std::string relProviderNumDir = ""; + const std::string relFilename = randomUuidStr + "_" + provderCntStr + "_" + _sProviderRequestFilename; + + const SmartPtrIIntMessage messageNew = CCafMessageCreator::create(providerRequest, + relFilename, relProviderNumDir, providerUri, message->getHeaders()); + + messageCollection->push_back(messageNew); + + providerCnt++; + } + + return messageCollection; +} + +SmartPtrCProviderCollectSchemaRequestDoc CSinglePmeRequestSplitterInstance::createCollectSchemaRequest( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const SmartPtrCMgmtCollectSchemaDoc& mgmtCollectSchema, + const SmartPtrCProviderRequestHeaderDoc& providerRequestHeader, + const std::string& outputDir) const { + CAF_CM_FUNCNAME_VALIDATE("createCollectSchemaRequest"); + CAF_CM_VALIDATE_SMARTPTR(mgmtRequest); + CAF_CM_VALIDATE_SMARTPTR(mgmtCollectSchema); + CAF_CM_VALIDATE_SMARTPTR(providerRequestHeader); + CAF_CM_VALIDATE_STRING(outputDir); + + SmartPtrCProviderCollectSchemaRequestDoc providerCollectSchemaRequest; + providerCollectSchemaRequest.CreateInstance(); + providerCollectSchemaRequest->initialize(mgmtRequest->getClientId(), + mgmtRequest->getRequestId(), mgmtRequest->getPmeId(), + mgmtCollectSchema->getJobId(), outputDir, providerRequestHeader); + + return providerCollectSchemaRequest; +} + +SmartPtrCProviderRequestDoc CSinglePmeRequestSplitterInstance::createProviderRequest( + const SmartPtrCMgmtRequestDoc& mgmtRequest, + const SmartPtrCSplitterJobsCollection& jobsCollection, + const SmartPtrCProviderRequestHeaderDoc& providerRequestHeader, + const std::string& outputDir) const { + CAF_CM_FUNCNAME_VALIDATE("createProviderRequest"); + CAF_CM_VALIDATE_SMARTPTR(mgmtRequest); + CAF_CM_VALIDATE_SMARTPTR(jobsCollection); + CAF_CM_VALIDATE_SMARTPTR(providerRequestHeader); + CAF_CM_VALIDATE_STRING(outputDir); + + std::deque collectInstancesCollectionInner; + std::deque invokeOperationCollectionInner; + for (TConstIterator > jobIter(*jobsCollection); + jobIter; jobIter++) { + const SmartPtrCSplitterJob job = *jobIter; + + if (!job->_mgmtCollectInstances.IsNull()) { + const UUID jobId = job->_mgmtCollectInstances->getJobId(); + const std::string jobIdStr = BasePlatform::UuidToString(jobId); + const std::string jobOutputDir = FileSystemUtils::buildPath(outputDir, + jobIdStr); + if (FileSystemUtils::doesDirectoryExist(jobOutputDir)) { + FileSystemUtils::recursiveRemoveDirectory(jobOutputDir); + } + FileSystemUtils::createDirectory(jobOutputDir); + + SmartPtrCProviderCollectInstancesDoc providerCollectInstances; + providerCollectInstances.CreateInstance(); + providerCollectInstances->initialize(job->_fqc->getClassNamespace(), + job->_fqc->getClassName(), job->_fqc->getClassVersion(), + job->_mgmtCollectInstances->getJobId(), jobOutputDir, + job->_mgmtCollectInstances->getParameterCollection()); + + collectInstancesCollectionInner.push_back(providerCollectInstances); + } + + if (!job->_mgmtInvokeOperation.IsNull()) { + const UUID jobId = job->_mgmtInvokeOperation->getJobId(); + const std::string jobIdStr = BasePlatform::UuidToString(jobId); + const std::string jobOutputDir = FileSystemUtils::buildPath(outputDir, + jobIdStr); + if (FileSystemUtils::doesDirectoryExist(jobOutputDir)) { + FileSystemUtils::recursiveRemoveDirectory(jobOutputDir); + } + FileSystemUtils::createDirectory(jobOutputDir); + + SmartPtrCProviderInvokeOperationDoc providerInvokeOperation; + providerInvokeOperation.CreateInstance(); + providerInvokeOperation->initialize(job->_fqc->getClassNamespace(), + job->_fqc->getClassName(), job->_fqc->getClassVersion(), + job->_mgmtInvokeOperation->getJobId(), jobOutputDir, + job->_mgmtInvokeOperation->getOperation()); + + invokeOperationCollectionInner.push_back(providerInvokeOperation); + } + } + + SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollection; + if (!collectInstancesCollectionInner.empty()) { + collectInstancesCollection.CreateInstance(); + collectInstancesCollection->initialize(collectInstancesCollectionInner); + } + + SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollection; + if (!invokeOperationCollectionInner.empty()) { + invokeOperationCollection.CreateInstance(); + invokeOperationCollection->initialize(invokeOperationCollectionInner); + } + + SmartPtrCProviderBatchDoc providerBatch; + providerBatch.CreateInstance(); + providerBatch->initialize(outputDir, collectInstancesCollection, + invokeOperationCollection); + + SmartPtrCProviderRequestDoc providerRequest; + providerRequest.CreateInstance(); + providerRequest->initialize(mgmtRequest->getClientId(), + mgmtRequest->getRequestId(), mgmtRequest->getPmeId(), providerRequestHeader, + providerBatch, mgmtRequest->getAttachmentCollection()); + + return providerRequest; +} + +void CSinglePmeRequestSplitterInstance::addCollectInstancesJobs( + const SmartPtrCMgmtCollectInstancesCollectionDoc& mgmtCollectInstancesCollection, + SmartPtrCProviderJobsCollection& providerJobsCollection) const { + CAF_CM_FUNCNAME_VALIDATE("addCollectInstancesJobs"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // mgmtCollectInstancesCollection is optional + CAF_CM_VALIDATE_SMARTPTR(providerJobsCollection); + + if (!mgmtCollectInstancesCollection.IsNull()) { + const std::deque mgmtCollectInstancesCollectionInner = + mgmtCollectInstancesCollection->getCollectInstancesCollection(); + for (TConstIterator > mgmtCollectInstancesIter( + mgmtCollectInstancesCollectionInner); mgmtCollectInstancesIter; + mgmtCollectInstancesIter++) { + const SmartPtrCMgmtCollectInstancesDoc mgmtCollectInstances = + *mgmtCollectInstancesIter; + + const SmartPtrCClassSpecifierDoc classSpecifier = + mgmtCollectInstances->getClassSpecifier(); + const SmartPtrCClassCollection fqcCollection = resolveClassSpecifier( + classSpecifier); + + for (TConstIterator > fqcIter( + *fqcCollection); fqcIter; fqcIter++) { + const SmartPtrCFullyQualifiedClassGroupDoc fqc = *fqcIter; + const std::string providerUri = findProviderUri(fqc); + + SmartPtrCSplitterJob job; + job.CreateInstance(); + job->_fqc = fqc; + job->_mgmtCollectInstances = mgmtCollectInstances; + + CProviderJobsCollection::const_iterator fndIter = + providerJobsCollection->find(providerUri); + if (fndIter == providerJobsCollection->end()) { + SmartPtrCSplitterJobsCollection jobsCollection; + jobsCollection.CreateInstance(); + jobsCollection->push_back(job); + providerJobsCollection->insert( + std::make_pair(providerUri, jobsCollection)); + } else { + fndIter->second->push_back(job); + } + } + } + } +} + +void CSinglePmeRequestSplitterInstance::addInvokeOperationJobs( + const SmartPtrCMgmtInvokeOperationCollectionDoc& mgmtInvokeOperationCollection, + SmartPtrCProviderJobsCollection& providerJobsCollection) const { + CAF_CM_FUNCNAME_VALIDATE("addInvokeOperationJobs"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + // mgmtInvokeOperationCollection is optional + CAF_CM_VALIDATE_SMARTPTR(providerJobsCollection); + + if (!mgmtInvokeOperationCollection.IsNull()) { + const std::deque mgmtInvokeOperationCollectionInner = + mgmtInvokeOperationCollection->getInvokeOperationCollection(); + for (TConstIterator > mgmtInvokeOperationIter( + mgmtInvokeOperationCollectionInner); mgmtInvokeOperationIter; + mgmtInvokeOperationIter++) { + const SmartPtrCMgmtInvokeOperationDoc mgmtInvokeOperation = + *mgmtInvokeOperationIter; + + const SmartPtrCClassSpecifierDoc classSpecifier = + mgmtInvokeOperation->getClassSpecifier(); + const SmartPtrCClassCollection fqcCollection = resolveClassSpecifier( + classSpecifier); + + for (TConstIterator > fqcIter( + *fqcCollection); fqcIter; fqcIter++) { + const SmartPtrCFullyQualifiedClassGroupDoc fqc = *fqcIter; + const std::string providerUri = findProviderUri(fqc); + + SmartPtrCSplitterJob job; + job.CreateInstance(); + job->_fqc = fqc; + job->_mgmtInvokeOperation = mgmtInvokeOperation; + + CProviderJobsCollection::const_iterator fndIter = + providerJobsCollection->find(providerUri); + if (fndIter == providerJobsCollection->end()) { + SmartPtrCSplitterJobsCollection jobsCollection; + jobsCollection.CreateInstance(); + jobsCollection->push_back(job); + providerJobsCollection->insert( + std::make_pair(providerUri, jobsCollection)); + } else { + fndIter->second->push_back(job); + } + } + } + } +} + +CSinglePmeRequestSplitterInstance::SmartPtrCClassCollection CSinglePmeRequestSplitterInstance::resolveClassSpecifier( + const SmartPtrCClassSpecifierDoc& classSpecifier) const { + CAF_CM_FUNCNAME("resolveClassSpecifier"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(classSpecifier); + + SmartPtrCClassCollection classCollection; + classCollection.CreateInstance(); + + const SmartPtrCFullyQualifiedClassGroupDoc fullyQualifiedClass = + classSpecifier->getFullyQualifiedClass(); + if (!fullyQualifiedClass.IsNull()) { + classCollection->push_back(fullyQualifiedClass); + } + + if (classCollection->empty()) { + CAF_CM_EXCEPTION_VA0(ERROR_INVALID_DATA, + "Failed to resolve to any fully-qualified classes"); + } + + return classCollection; +} + +std::string CSinglePmeRequestSplitterInstance::findProviderUri( + const SmartPtrCFullyQualifiedClassGroupDoc& fqc) const { + CAF_CM_FUNCNAME("findProviderUri"); + + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(fqc); + + const std::string providerUri = _schemaCacheManager->findProvider(fqc); + + if (providerUri.empty()) { + CAF_CM_EXCEPTIONEX_VA3(NoSuchElementException, ERROR_NOT_FOUND, + "Provider not found for %s::%s::%s with status %d", + fqc->getClassNamespace().c_str(), fqc->getClassName().c_str(), + fqc->getClassVersion().c_str()); + } + + return providerUri; +} + +void CSinglePmeRequestSplitterInstance::createDirectory( + const std::string& directory) const { + CAF_CM_FUNCNAME_VALIDATE("createDirectory"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(directory); + + if (FileSystemUtils::doesDirectoryExist(directory)) { + CAF_CM_LOG_WARN_VA1( + "Directory already exists (perhaps from a previous failed run)... removing - %s", + directory.c_str()); + FileSystemUtils::recursiveRemoveDirectory(directory); + } + + CAF_CM_LOG_DEBUG_VA1("Creating directory - %s", directory.c_str()); + FileSystemUtils::createDirectory(directory); +} + +void CSinglePmeRequestSplitterInstance::saveRequest( + const std::string& outputDir, + const SmartPtrCDynamicByteArray& payload) const { + CAF_CM_FUNCNAME_VALIDATE("saveRequest"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(outputDir); + CAF_CM_VALIDATE_SMARTPTR(payload); + + const std::string singlePmeRequestPath = FileSystemUtils::buildPath(outputDir, + _sPayloadRequestFilename); + + CCafMessagePayload::saveToFile(payload, singlePmeRequestPath); +} + +SmartPtrCProviderRequestHeaderDoc CSinglePmeRequestSplitterInstance::convertRequestHeader( + const SmartPtrCRequestHeaderDoc& requestHeader) const { + CAF_CM_FUNCNAME_VALIDATE("convertRequestHeader"); + CAF_CM_VALIDATE_SMARTPTR(requestHeader); + + const SmartPtrCRequestConfigDoc requestConfig = requestHeader->getRequestConfig(); + + SmartPtrCProviderRequestConfigDoc providerRequestConfig; + providerRequestConfig.CreateInstance(); + providerRequestConfig->initialize(requestConfig->getResponseFormatType(), + requestConfig->getLoggingLevelCollection()); + + SmartPtrCProviderRequestHeaderDoc providerRequestHeader; + providerRequestHeader.CreateInstance(); + providerRequestHeader->initialize(providerRequestConfig, + requestHeader->getEchoPropertyBag()); + + return providerRequestHeader; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.cpp new file mode 100644 index 000000000..4714a6568 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.cpp @@ -0,0 +1,84 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CVersionTransformer.h" + +using namespace Caf; + +CVersionTransformer::CVersionTransformer() : + _isInitialized(false), + CAF_CM_INIT_LOG("CVersionTransformer") { +} + +CVersionTransformer::~CVersionTransformer() { +} + +void CVersionTransformer::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; + initialize(); + } + CAF_CM_EXIT; +} + +void CVersionTransformer::terminateBean() { +} + +void CVersionTransformer::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CVersionTransformer::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CVersionTransformer::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdVersionTransformerInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.h new file mode 100644 index 000000000..ca228808a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformer.h @@ -0,0 +1,64 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CVersionTransformer_h_ +#define CVersionTransformer_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CVersionTransformer : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CVersionTransformer(); + virtual ~CVersionTransformer(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdVersionTransformer) + + CAF_BEGIN_INTERFACE_MAP(CVersionTransformer) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean(const IBean::Cargs& ctorArgs, const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVersionTransformer); +}; + +} + +#endif // #ifndef CVersionTransformer_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.cpp new file mode 100644 index 000000000..ba111ae8a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.cpp @@ -0,0 +1,181 @@ +/* +G * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Common/IAppContext.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Exception/CCafException.h" +#include "CVersionTransformerInstance.h" +#include "Integration/Caf/CCafMessagePayloadParser.h" + +using namespace Caf; + +CVersionTransformerInstance::CVersionTransformerInstance() : + _isInitialized(false), + CAF_CM_INIT_LOG("CVersionTransformerInstance") { +} + +CVersionTransformerInstance::~CVersionTransformerInstance() { +} + +void CVersionTransformerInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + _isInitialized = true; +} + +std::string CVersionTransformerInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _id; +} + +void CVersionTransformerInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); +} + +SmartPtrIIntMessage CVersionTransformerInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + const SmartPtrCPayloadEnvelopeDoc payloadEnvelope = + CCafMessagePayloadParser::getPayloadEnvelope(message->getPayload()); + + SmartPtrIIntMessage rc = message; + rc = transformEnvelope(payloadEnvelope, rc); + rc = transformPayload(payloadEnvelope, rc); + + return rc; +} + +SmartPtrIIntMessage CVersionTransformerInstance::transformEnvelope( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME("transformEnvelope"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + CAF_CM_VALIDATE_SMARTPTR(message); + + const std::string payloadType = payloadEnvelope->getPayloadType(); + const std::string envelopeVersion = payloadEnvelope->getVersion(); + + std::string receivedMajorVersion; + std::string receivedMinorVersion; + parseVersion(payloadType, envelopeVersion, receivedMajorVersion, receivedMinorVersion); + + // Throwing an unsupported version exception is the last resort. + // If at all possible, transform the old version document into the + // new version. For example, if this is a v1.0 envelope, transform + // it into v1.1 and return it, otherwise throw an unsupported version + // exception. + const std::string expectedMajorVersion = "1"; + const std::string expectedMinorVersion = "0"; + if (receivedMajorVersion.compare(expectedMajorVersion) != 0) { + // Major version incompatibilities are not supported + CAF_CM_EXCEPTIONEX_VA5(UnsupportedVersionException, ERROR_NOT_SUPPORTED, + "Unsupported envelope major version - payloadType: %s, received: %s.%s, expected: %s.%s", + payloadType.c_str(), + receivedMajorVersion.c_str(), receivedMinorVersion.c_str(), + expectedMajorVersion.c_str(), expectedMinorVersion.c_str()); + } + if (receivedMinorVersion.compare(expectedMinorVersion) != 0) { + // Minor version incompatibilities are not supported + CAF_CM_EXCEPTIONEX_VA5(UnsupportedVersionException, ERROR_NOT_SUPPORTED, + "Unsupported envelope minor version - payloadType: %s, received: %s.%s, expected: %s.%s", + payloadType.c_str(), + receivedMajorVersion.c_str(), receivedMinorVersion.c_str(), + expectedMajorVersion.c_str(), expectedMinorVersion.c_str()); + } + + return message; +} + +SmartPtrIIntMessage CVersionTransformerInstance::transformPayload( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrIIntMessage& message) const { + CAF_CM_FUNCNAME("transformPayload"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(payloadEnvelope); + CAF_CM_VALIDATE_SMARTPTR(message); + + const std::string payloadType = payloadEnvelope->getPayloadType(); + const std::string payloadVersion = payloadEnvelope->getPayloadVersion(); + + std::string receivedMajorVersion; + std::string receivedMinorVersion; + parseVersion(payloadType, payloadVersion, receivedMajorVersion, receivedMinorVersion); + + // Throwing an unsupported version exception is the last resort. + // If at all possible, transform the old version document into the + // new version. For example, if this is a v1.0 mgmtRequest, transform + // it into v1.1 and return it, otherwise throw an unsupported version + // exception. The problem is that the payload is probably in an attachment + // that's been signed and encrypted, so it isn't available to be transformed. + // To handle this case, we'll probably do the enforcement here and the + // actual transformation later in the process when the payload has been + // verified and decrypted. + const std::string expectedMajorVersion = "1"; + const std::string expectedMinorVersion = "0"; + if (receivedMajorVersion.compare(expectedMajorVersion) != 0) { + // Major version incompatibilities are not supported + CAF_CM_EXCEPTIONEX_VA5(UnsupportedVersionException, ERROR_NOT_SUPPORTED, + "Unsupported payload major version - payloadType: %s, received: %s.%s, expected: %s.%s", + payloadType.c_str(), + receivedMajorVersion.c_str(), receivedMinorVersion.c_str(), + expectedMajorVersion.c_str(), expectedMinorVersion.c_str()); + } + if (receivedMinorVersion.compare(expectedMinorVersion) != 0) { + // Minor version incompatibilities are not supported + CAF_CM_EXCEPTIONEX_VA5(UnsupportedVersionException, ERROR_NOT_SUPPORTED, + "Unsupported payload minor version - payloadType: %s, received: %s.%s, expected: %s.%s", + payloadType.c_str(), + receivedMajorVersion.c_str(), receivedMinorVersion.c_str(), + expectedMajorVersion.c_str(), expectedMinorVersion.c_str()); + } + + return message; +} + +void CVersionTransformerInstance::parseVersion( + const std::string& messageType, + const std::string& version, + std::string& majorVersion, + std::string& minorVersion) const { + CAF_CM_FUNCNAME("parseVersion"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(messageType); + CAF_CM_VALIDATE_STRING(version); + + const Cdeqstr versionDeq = CStringUtils::split(version, '.'); + if (versionDeq.size() < 2) { + CAF_CM_EXCEPTION_VA2(ERROR_INVALID_DATA, + "Invalid version format - messageType: %s, version: %s", + messageType.c_str(), version.c_str()); + } + + majorVersion = versionDeq[0]; + minorVersion = versionDeq[1]; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.h new file mode 100644 index 000000000..1abc7c6d3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CVersionTransformerInstance.h @@ -0,0 +1,85 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CVersionTransformerInstance_h_ +#define CVersionTransformerInstance_h_ + + +#include "Integration/IIntegrationComponentInstance.h" + +#include "Common/IAppContext.h" +#include "Doc/PayloadEnvelopeDoc/CPayloadEnvelopeDoc.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CVersionTransformerInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer { +public: + CVersionTransformerInstance(); + virtual ~CVersionTransformerInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdVersionTransformerInstance) + + CAF_BEGIN_INTERFACE_MAP(CVersionTransformerInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +private: + SmartPtrIIntMessage transformEnvelope( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrIIntMessage& message) const; + + SmartPtrIIntMessage transformPayload( + const SmartPtrCPayloadEnvelopeDoc& payloadEnvelope, + const SmartPtrIIntMessage& message) const; + + void parseVersion( + const std::string& payloadType, + const std::string& version, + std::string& majorVersion, + std::string& minorVersion) const; + +private: + bool _isInitialized; + std::string _id; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVersionTransformerInstance); +}; + +} + +#endif // #ifndef CVersionTransformerInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.cpp new file mode 100644 index 000000000..49ae85274 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.cpp @@ -0,0 +1,88 @@ +/* + * Created on: Nov 13, 2015 + * Author: bwilliams + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CConfigEnvInboundChannelAdapterInstance.h" +#include "CConfigEnvOutboundChannelAdapterInstance.h" +#include "CMonitorInboundChannelAdapterInstance.h" +#include "CPersistenceOutboundChannelAdapterInstance.h" +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Exception/CCafException.h" +#include "IntegrationObjects.h" +#include "CPersistenceInboundChannelAdapterInstance.h" + +using namespace Caf::MaIntegration; + +IntegrationObjects::IntegrationObjects() : + CAF_CM_INIT("IntegrationObjects") { +} + +IntegrationObjects::~IntegrationObjects() { +} + +void IntegrationObjects::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL_EMPTY(properties); + _ctorArgs = ctorArgs; + _properties = properties; +} + +void IntegrationObjects::terminateBean() { +} + +bool IntegrationObjects::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + CAF_CM_VALIDATE_INTERFACE(configSection); + + const std::string name = configSection->getName(); + return (name.compare("persistence-inbound-channel-adapter") == 0) + || (name.compare("persistence-outbound-channel-adapter") == 0) + || (name.compare("configenv-inbound-channel-adapter") == 0) + || (name.compare("configenv-outbound-channel-adapter") == 0) + || (name.compare("monitor-inbound-channel-adapter") == 0); +} + +SmartPtrIIntegrationObject IntegrationObjects::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME("createObject"); + CAF_CM_VALIDATE_INTERFACE(configSection); + + SmartPtrIIntegrationObject rc; + const std::string name = configSection->getName(); + if (name.compare("persistence-inbound-channel-adapter") == 0) { + SmartPtrCPersistenceInboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("persistence-outbound-channel-adapter") == 0) { + SmartPtrCPersistenceOutboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("configenv-inbound-channel-adapter") == 0) { + SmartPtrCConfigEnvInboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("configenv-outbound-channel-adapter") == 0) { + SmartPtrCConfigEnvOutboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else if (name.compare("monitor-inbound-channel-adapter") == 0) { + SmartPtrCMonitorInboundChannelAdapterInstance object; + object.CreateInstance(); + rc = object; + } else { + CAF_CM_EXCEPTION_VA1(E_INVALIDARG, "Unknown name - %s", name.c_str()); + } + + rc->initialize(_ctorArgs, _properties, configSection); + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.h new file mode 100644 index 000000000..347e9e15b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/IntegrationObjects.h @@ -0,0 +1,61 @@ +/* + * Created on: Nov 13, 2015 + * Author: bwilliams + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _MaIntegration_IntegrationObjects_h_ +#define _MaIntegration_IntegrationObjects_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { namespace MaIntegration { + +class IntegrationObjects : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + IntegrationObjects(); + virtual ~IntegrationObjects(); + +public: + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdIntegrationObjects) + + CAF_BEGIN_INTERFACE_MAP(IntegrationObjects) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: // IBean + void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_DECLARE_NOCOPY(IntegrationObjects); +}; + +}} + +#endif /* _MaIntegration_IntegrationObjects_h_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaContracts.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaContracts.h new file mode 100644 index 000000000..2f9624911 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaContracts.h @@ -0,0 +1,15 @@ +/* + * Author: bwilliams + * Created: 1/20/2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef MaContracts_h_ +#define MaContracts_h_ + +//#include + +// Interfaces + +#endif diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaIntegration.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaIntegration.cpp new file mode 100644 index 000000000..4d562eb7f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/MaIntegration.cpp @@ -0,0 +1,85 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "MaIntegration.h" +#include "IntegrationObjects.h" +#include "CAttachmentRequestTransformerInstance.h" +#include "CDiagToMgmtRequestTransformerInstance.h" +#include "CSinglePmeRequestSplitterInstance.h" + +namespace Caf { + +namespace MaIntegration { + const char* _sObjIdIntegrationObjects = "com.vmware.commonagent.maintegration.integrationobjects"; +}} + +namespace Caf { + const char* _sObjIdCollectSchemaExecutor = "com.vmware.commonagent.maintegration.collectschemaexecutor"; + const char* _sObjIdProviderCollectSchemaExecutor = "com.vmware.commonagent.maintegration.providercollectschemaexecutor"; + const char* _sObjIdProviderExecutor = "com.vmware.commonagent.maintegration.providerexecutor"; + const char* _sObjIdSinglePmeRequestSplitterInstance = "com.vmware.commonagent.maintegration.singlepmerequestsplitterinstance"; + const char* _sObjIdSinglePmeRequestSplitter = "com.vmware.commonagent.maintegration.singlepmerequestsplitter"; + const char* _sObjIdDiagToMgmtRequestTransformerInstance = "com.vmware.commonagent.maintegration.diagtomgmtrequesttransformerinstance"; + const char* _sObjIdDiagToMgmtRequestTransformer = "com.vmware.commonagent.maintegration.diagtomgmtrequesttransformer"; + const char* _sObjIdInstallToMgmtRequestTransformerInstance = "com.vmware.commonagent.maintegration.installtomgmtrequesttransformerinstance"; + const char* _sObjIdInstallToMgmtRequestTransformer = "com.vmware.commonagent.maintegration.installtomgmtrequesttransformer"; + const char* _sObjIdPersistenceNamespaceDb = "com.vmware.commonagent.maintegration.persistencenamespacedb"; + const char* _sObjIdConfigEnv = "com.vmware.commonagent.maintegration.configenv"; + + const char* _sObjIdAttachmentRequestTransformerInstance = "com.vmware.commonagent.maintegration.attachmentrequesttransformerinstance"; + const char* _sObjIdAttachmentRequestTransformer = "com.vmware.commonagent.maintegration.attachmentrequesttransformer"; + const char* _sObjIdVersionTransformerInstance = "com.vmware.commonagent.maintegration.versiontransformerinstance"; + const char* _sObjIdVersionTransformer = "com.vmware.commonagent.maintegration.versiontransformer"; +} + +CEcmSubSystemModule _Module; + +using namespace Caf::MaIntegration; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) + CAF_OBJECT_ENTRY(CAttachmentRequestTransformer) + CAF_OBJECT_ENTRY(CAttachmentRequestTransformerInstance) + CAF_OBJECT_ENTRY(CCollectSchemaExecutor) + CAF_OBJECT_ENTRY(CConfigEnv) + CAF_OBJECT_ENTRY(CDiagToMgmtRequestTransformer) + CAF_OBJECT_ENTRY(CDiagToMgmtRequestTransformerInstance) + CAF_OBJECT_ENTRY(CInstallToMgmtRequestTransformer) + CAF_OBJECT_ENTRY(CInstallToMgmtRequestTransformerInstance) + CAF_OBJECT_ENTRY(CPersistenceNamespaceDb) + CAF_OBJECT_ENTRY(CProviderCollectSchemaExecutor) + CAF_OBJECT_ENTRY(CProviderExecutor) + CAF_OBJECT_ENTRY(CSinglePmeRequestSplitter) + CAF_OBJECT_ENTRY(CSinglePmeRequestSplitterInstance) + CAF_OBJECT_ENTRY(CVersionTransformer) + CAF_OBJECT_ENTRY(CVersionTransformerInstance) + CAF_OBJECT_ENTRY(IntegrationObjects) +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/stdafx.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/stdafx.h new file mode 100644 index 000000000..d5706154b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/stdafx.h @@ -0,0 +1,52 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include + +#include "MaContracts.h" +#include "MaIntegration.h" +#include "IntegrationObjects.h" + +#include "CAttachmentRequestTransformer.h" + +#include "CDiagToMgmtRequestTransformer.h" + +#include "CInstallToMgmtRequestTransformerInstance.h" +#include "CInstallToMgmtRequestTransformer.h" + +#include "CPersistenceNamespaceDb.h" +#include "CPersistenceMessageHandler.h" +#include "CPersistenceInboundChannelAdapterInstance.h" +#include "CPersistenceOutboundChannelAdapterInstance.h" + +#include "CPersistenceMerge.h" +#include "CConfigEnvMerge.h" +#include "CConfigEnv.h" +#include "CConfigEnvMessageHandler.h" +#include "CConfigEnvInboundChannelAdapterInstance.h" +#include "CConfigEnvOutboundChannelAdapterInstance.h" + + +#include "CCollectSchemaExecutor.h" +#include "CProviderCollectSchemaExecutor.h" +#include "CProviderExecutor.h" + +#include "CSinglePmeRequestSplitter.h" + +#include "CMonitorInboundChannelAdapterInstance.h" + +#include "CVersionTransformer.h" +#include "CVersionTransformerInstance.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthContext.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthContext.h new file mode 100644 index 000000000..2c62a2564 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthContext.h @@ -0,0 +1,41 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CVgAuthContext_H_ +#define CVgAuthContext_H_ + +namespace Caf { + +class CVgAuthContext { +public: + CVgAuthContext(); + virtual ~CVgAuthContext(); + +public: + void initialize( + const std::string& applicationName); + + VGAuthContext* getPtr() const; + + std::string getApplicationName() const; + +private: + bool _isInitialized; + VGAuthContext* _vgAuthContext; + std::string _applicationName; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVgAuthContext); +}; + +CAF_DECLARE_SMART_POINTER(CVgAuthContext); + +} + +#endif /* CVgAuthContext_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthImpersonation.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthImpersonation.h new file mode 100644 index 000000000..5fc3caa12 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthImpersonation.h @@ -0,0 +1,54 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CVgAuthImpersonation_H_ +#define CVgAuthImpersonation_H_ + + +#include "CVgAuthContext.h" +#include "CVgAuthUserHandle.h" + +namespace Caf { + +class CVgAuthImpersonation { +public: + CVgAuthImpersonation(); + virtual ~CVgAuthImpersonation(); + +public: + void impersonateAndManage( + const SmartPtrCVgAuthContext& vgAuthContext, + const SmartPtrCVgAuthUserHandle& vgAuthUserHandle); + +public: + static void beginImpersonation( + const SmartPtrCVgAuthContext& vgAuthContext, + const SmartPtrCVgAuthUserHandle& vgAuthUserHandle); + + static void endImpersonation( + const SmartPtrCVgAuthContext& vgAuthContext); + +private: + void impersonateLocal( + const SmartPtrCVgAuthContext& vgAuthContext, + const SmartPtrCVgAuthUserHandle& vgAuthUserHandle) const; + +private: + bool _isInitialized; + SmartPtrCVgAuthContext _vgAuthContext; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVgAuthImpersonation); +}; + +CAF_DECLARE_SMART_POINTER(CVgAuthImpersonation); + +} + +#endif /* CVgAuthImpersonation_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthUserHandle.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthUserHandle.h new file mode 100644 index 000000000..f0a143f60 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/CVgAuthUserHandle.h @@ -0,0 +1,51 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CVgAuthUserHandle_H_ +#define CVgAuthUserHandle_H_ + + +#include "CVgAuthContext.h" + +namespace Caf { + +class CVgAuthUserHandle { +public: + CVgAuthUserHandle(); + virtual ~CVgAuthUserHandle(); + +public: + void initialize( + const SmartPtrCVgAuthContext& vgAuthContext, + const std::string& signedSamlToken); + + void initialize( + const SmartPtrCVgAuthContext& vgAuthContext, + const std::string& signedSamlToken, + const std::string& userName); + +public: + std::string getUserName( + const SmartPtrCVgAuthContext& vgAuthContext) const; + + VGAuthUserHandle* getPtr() const; + +private: + bool _isInitialized; + VGAuthUserHandle* _vgAuthUserHandle; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVgAuthUserHandle); +}; + +CAF_DECLARE_SMART_POINTER(CVgAuthUserHandle); + +} + +#endif /* CVgAuthUserHandle_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/IVgAuthImpersonation.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/IVgAuthImpersonation.h new file mode 100644 index 000000000..c095ac360 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/include/IVgAuthImpersonation.h @@ -0,0 +1,25 @@ +/* + * Created on: Jan 25, 2012 + * Author: mdonahue + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _IVgAuthImpersonation_H_ +#define _IVgAuthImpersonation_H_ + +namespace Caf { + +struct __declspec(novtable) + IVgAuthImpersonation : public ICafObject +{ + CAF_DECL_UUID("63cfac22-e1b8-4977-8907-9582657b7420") + + virtual void endImpersonation() = 0; +}; + +CAF_DECLARE_SMART_INTERFACE_POINTER(IVgAuthImpersonation); + +} + +#endif /* _IVgAuthImpersonation_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.cpp new file mode 100644 index 000000000..67a88792e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.cpp @@ -0,0 +1,88 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "CGuestAuthenticator.h" + +using namespace Caf; + +CGuestAuthenticator::CGuestAuthenticator() : + _isInitialized(false), + CAF_CM_INIT_LOG("CGuestAuthenticator") { +} + +CGuestAuthenticator::~CGuestAuthenticator() { +} + +void CGuestAuthenticator::initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties) { + + CAF_CM_FUNCNAME_VALIDATE("initializeBean"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL(properties); + + _ctorArgs = ctorArgs; + _properties = properties; + + initialize(); + + CAF_CM_LOG_DEBUG_VA1("num properties - %d", properties.size()); + } + CAF_CM_EXIT; +} + +void CGuestAuthenticator::terminateBean() { +} + +void CGuestAuthenticator::initialize() { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + _isInitialized = true; + } + CAF_CM_EXIT; +} + +bool CGuestAuthenticator::isResponsible( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("isResponsible"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + } + CAF_CM_EXIT; + + return false; +} + +SmartPtrIIntegrationObject CGuestAuthenticator::createObject( + const SmartPtrIDocument& configSection) const { + CAF_CM_FUNCNAME_VALIDATE("createObject"); + + SmartPtrIIntegrationObject rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(configSection); + + rc.CreateInstance(_sObjIdGuestAuthenticatorInstance); + rc->initialize(_ctorArgs, _properties, configSection); + } + CAF_CM_EXIT; + + return rc; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.h new file mode 100644 index 000000000..71de5f383 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticator.h @@ -0,0 +1,66 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CGuestAuthenticator_h_ +#define CGuestAuthenticator_h_ + + +#include "IBean.h" + +#include "Integration/IDocument.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/IIntegrationComponent.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CGuestAuthenticator : + public TCafSubSystemObjectRoot, + public IBean, + public IIntegrationComponent { +public: + CGuestAuthenticator(); + virtual ~CGuestAuthenticator(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdGuestAuthenticator) + + CAF_BEGIN_INTERFACE_MAP(CGuestAuthenticator) + CAF_INTERFACE_ENTRY(IBean) + CAF_INTERFACE_ENTRY(IIntegrationComponent) + CAF_END_INTERFACE_MAP() + +public: + virtual void initialize(); + +public: // IBean + virtual void initializeBean( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties); + + virtual void terminateBean(); + +public: // IIntegrationComponent + bool isResponsible( + const SmartPtrIDocument& configSection) const; + + SmartPtrIIntegrationObject createObject( + const SmartPtrIDocument& configSection) const; + +private: + bool _isInitialized; + IBean::Cargs _ctorArgs; + IBean::Cprops _properties; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CGuestAuthenticator); +}; + +} + +#endif // #ifndef CGuestAuthenticator_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.cpp new file mode 100644 index 000000000..7f18cdd13 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.cpp @@ -0,0 +1,271 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Integration/Caf/CCafMessagePayload.h" +#include "CVgAuthImpersonation.h" +#include "CVgAuthInitializer.h" +#include "CVgAuthContext.h" +#include "CVgAuthUserHandle.h" +#include "Common/IAppContext.h" +#include "Doc/CafCoreTypesDoc/CAuthnAuthzCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAuthnAuthzDoc.h" +#include "Doc/CafCoreTypesDoc/CRequestHeaderDoc.h" +#include "ICafObject.h" +#include "IVgAuthImpersonation.h" +#include "Integration/Core/CIntMessage.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Integration/Core/CIntMessageHeaders.h" +#include "CGuestAuthenticatorInstance.h" + +using namespace Caf; + +CGuestAuthenticatorInstance::CGuestAuthenticatorInstance() : + _isInitialized(false), + _beginImpersonation(false), + _endImpersonation(false), + CAF_CM_INIT_LOG("CGuestAuthenticatorInstance") { +} + +CGuestAuthenticatorInstance::~CGuestAuthenticatorInstance() { +} + +void CGuestAuthenticatorInstance::initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection) { + + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STL_EMPTY(ctorArgs); + CAF_CM_VALIDATE_STL(properties); + CAF_CM_VALIDATE_INTERFACE(configSection); + + _id = configSection->findRequiredAttribute("id"); + + const std::string beginImpersonationStr = + findOptionalProperty("beginImpersonation", properties); + const std::string endImpersonationStr = + findOptionalProperty("endImpersonation", properties); + + _beginImpersonation = + (beginImpersonationStr.empty() || beginImpersonationStr.compare("false") == 0) ? false : true; + _endImpersonation = + (endImpersonationStr.empty() || endImpersonationStr.compare("false") == 0) ? false : true; + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CGuestAuthenticatorInstance::getId() const { + CAF_CM_FUNCNAME_VALIDATE("getId"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + rc = _id; + } + CAF_CM_EXIT; + + return rc; +} + +void CGuestAuthenticatorInstance::wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver) { + CAF_CM_FUNCNAME_VALIDATE("wire"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_INTERFACE(appContext); + CAF_CM_VALIDATE_INTERFACE(channelResolver); + } + CAF_CM_EXIT; +} + +SmartPtrIIntMessage CGuestAuthenticatorInstance::transformMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME_VALIDATE("transformMessage"); + + SmartPtrIIntMessage newMessage; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + CAF_CM_LOG_DEBUG_VA1("Called - id: \"%s\"", _id.c_str()); + + CIntMessageHeaders messageHeaders; + + const std::string vgAuthImpersonationStr = "vgAuthImpersonation"; + const SmartPtrICafObject cafObject = + message->findOptionalObjectHeader(vgAuthImpersonationStr); + if (cafObject.IsNull()) { + if (_endImpersonation) { + CAF_CM_LOG_ERROR_VA1("Cannot end impersonation without proper header - %s", + vgAuthImpersonationStr.c_str()); + } else { + SmartPtrCVgAuthInitializer vgAuthInitializer; + vgAuthInitializer.CreateInstance(); + vgAuthInitializer->initialize("CAF"); + const SmartPtrCVgAuthContext vgAuthContext = + vgAuthInitializer->getContext(); + + const std::string signedSamlToken = + getSignedSamlToken(message->getPayload()); + + SmartPtrCVgAuthUserHandle vgAuthUserHandle; + vgAuthUserHandle.CreateInstance(); + vgAuthUserHandle->initialize( + vgAuthContext, signedSamlToken); + + if (_beginImpersonation) { + logUserInfo("Before beginning impersonation"); + CVgAuthImpersonation::beginImpersonation(vgAuthContext, vgAuthUserHandle); + const std::string userName = vgAuthUserHandle->getUserName(vgAuthContext); + logUserInfo("After beginning impersonation"); + + messageHeaders.insertObject(vgAuthImpersonationStr, vgAuthInitializer); + messageHeaders.insertString("AUTHORITY", "IS_AUTHENTICATED_FULLY"); + messageHeaders.insertString("AUTHORITY_USERNAME", userName); + } + } + } else { + if (_endImpersonation) { + SmartPtrIVgAuthImpersonation vgAuthImpersonation; + vgAuthImpersonation.QueryInterface(cafObject, true); + CAF_CM_VALIDATE_SMARTPTR(vgAuthImpersonation); + + logUserInfo("Before ending impersonation"); + vgAuthImpersonation->endImpersonation(); + logUserInfo("After ending impersonation"); + + messageHeaders.insertString("AUTHORITY", "IS_AUTHENTICATED_ANONYMOUSLY"); + messageHeaders.insertString("AUTHORITY_USERNAME", "ANONYMOUS"); + } else { + CAF_CM_LOG_WARN_VA1("Headers contain impersonation interface, but the ending of impersonation was not requested - %s", + vgAuthImpersonationStr.c_str()); + } + + //messageHeaders.insertObject(vgAuthImpersonationStr, SmartPtrICafObject()); + } + + SmartPtrCIntMessage messageImpl; + messageImpl.CreateInstance(); + messageImpl->initialize(message->getPayload(), + messageHeaders.getHeaders(), message->getHeaders()); + newMessage = messageImpl; + } + CAF_CM_EXIT; + + return newMessage; +} + +SmartPtrIIntMessage CGuestAuthenticatorInstance::processErrorMessage( + const SmartPtrIIntMessage& message) { + CAF_CM_FUNCNAME("processErrorMessage"); + + SmartPtrIIntMessage newMessage; + + try { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(message); + + CAF_CM_LOG_DEBUG_VA1("Called - %s", _id.c_str()); + + newMessage = transformMessage(message); + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; + + return newMessage; +} + +std::string CGuestAuthenticatorInstance::getSignedSamlToken( + const SmartPtrCDynamicByteArray& payload) const { + CAF_CM_FUNCNAME_VALIDATE("getSignedSamlToken"); + + std::string signedSamlToken; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(payload); + + const SmartPtrCCafMessagePayload cafMessagePayload = + CCafMessagePayload::create(payload); + + const SmartPtrCRequestHeaderDoc requestHeader = + cafMessagePayload->getRequestHeader(); + const SmartPtrCAuthnAuthzCollectionDoc authnAuthzCollection = + requestHeader->getAuthnAuthzCollection(); + CAF_CM_VALIDATE_SMARTPTR(authnAuthzCollection); + CAF_CM_VALIDATE_STL(authnAuthzCollection->getAuthnAuthz()); + + //TODO: Pass the other types (e.g. username / password) to VgAuth. + //TODO: Use the sequence number to prioritize the types. + //TODO: Consider creating a type for the string "SAML" + for (std::deque::const_iterator authnAuthzIter = + authnAuthzCollection->getAuthnAuthz().begin(); + authnAuthzIter != authnAuthzCollection->getAuthnAuthz().end(); + authnAuthzIter++) { + const SmartPtrCAuthnAuthzDoc authnAuthz = *authnAuthzIter; + if (authnAuthz->getType().compare("SAML") == 0) { + signedSamlToken = authnAuthz->getValue(); + } + } + + CAF_CM_VALIDATE_STRING(signedSamlToken); + } + CAF_CM_EXIT; + + return signedSamlToken; +} + +std::string CGuestAuthenticatorInstance::findOptionalProperty( + const std::string& propertyName, + const IBean::Cprops& properties) const { + CAF_CM_FUNCNAME_VALIDATE("findOptionalProperty"); + + std::string rc; + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(propertyName); + CAF_CM_VALIDATE_STL(properties); + + IBean::Cprops::const_iterator propertiesIter = properties.find(propertyName); + if (propertiesIter != properties.end()) { + rc = propertiesIter->second; + } + } + CAF_CM_EXIT; + + return rc; +} + +void CGuestAuthenticatorInstance::logUserInfo( + const std::string& msg) const { + CAF_CM_FUNCNAME_VALIDATE("logUserInfo"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(msg); + +#ifndef WIN32 + CAF_CM_LOG_DEBUG_VA3("%s - UID: %d, GID: %d", msg.c_str(), ::geteuid(), ::getegid()); +#endif + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.h new file mode 100644 index 000000000..5963fa4cd --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CGuestAuthenticatorInstance.h @@ -0,0 +1,90 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CGuestAuthenticatorInstance_h_ +#define CGuestAuthenticatorInstance_h_ + + +#include "Integration/IErrorProcessor.h" + +#include "Common/IAppContext.h" +#include "Integration/IChannelResolver.h" +#include "Integration/IDocument.h" +#include "Integration/IIntMessage.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Integration/IIntegrationComponentInstance.h" +#include "Integration/IIntegrationObject.h" +#include "Integration/ITransformer.h" + +namespace Caf { + +class CGuestAuthenticatorInstance : + public TCafSubSystemObjectRoot, + public IIntegrationObject, + public IIntegrationComponentInstance, + public ITransformer, + public IErrorProcessor { +public: + CGuestAuthenticatorInstance(); + virtual ~CGuestAuthenticatorInstance(); + + CAF_DECLARE_OBJECT_IDENTIFIER(_sObjIdGuestAuthenticatorInstance) + + CAF_BEGIN_INTERFACE_MAP(CGuestAuthenticatorInstance) + CAF_INTERFACE_ENTRY(IIntegrationObject) + CAF_INTERFACE_ENTRY(IIntegrationComponentInstance) + CAF_INTERFACE_ENTRY(ITransformer) + CAF_INTERFACE_ENTRY(IErrorProcessor) + CAF_END_INTERFACE_MAP() + +public: // IIntegrationObject + void initialize( + const IBean::Cargs& ctorArgs, + const IBean::Cprops& properties, + const SmartPtrIDocument& configSection); + + std::string getId() const; + +public: // IIntegrationComponentInstance + void wire( + const SmartPtrIAppContext& appContext, + const SmartPtrIChannelResolver& channelResolver); + +public: // ITransformer + SmartPtrIIntMessage transformMessage( + const SmartPtrIIntMessage& message); + +public: // IErrorProcessor + SmartPtrIIntMessage processErrorMessage( + const SmartPtrIIntMessage& message); + +private: + bool _isInitialized; + std::string _id; + bool _beginImpersonation; + bool _endImpersonation; + +private: + std::string getSignedSamlToken( + const SmartPtrCDynamicByteArray& payload) const; + + std::string findOptionalProperty( + const std::string& propertyName, + const IBean::Cprops& properties) const; + + void logUserInfo( + const std::string& msg) const; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CGuestAuthenticatorInstance); +}; + +} + +#endif // #ifndef CGuestAuthenticatorInstance_h_ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthContext.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthContext.cpp new file mode 100644 index 000000000..0ed53f6e3 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthContext.cpp @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "CVgAuthContext.h" + +CVgAuthContext::CVgAuthContext() : + _isInitialized(false), + _vgAuthContext(NULL), + CAF_CM_INIT_LOG("CVgAuthContext") { +} + +CVgAuthContext::~CVgAuthContext() { + CAF_CM_FUNCNAME("~CVgAuthContext"); + + try { + if (_isInitialized) { + const VGAuthError vgAuthError = VGAuth_Shutdown(_vgAuthContext); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_Shutdown Failed"); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CVgAuthContext::initialize( + const std::string& applicationName) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(applicationName); + + const VGAuthError vgAuthError = VGAuth_Init(applicationName.c_str(), 0, NULL, &_vgAuthContext); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_Init Failed", applicationName); + CAF_CM_VALIDATE_PTR(_vgAuthContext); + + _applicationName = applicationName; + _isInitialized = true; + } + CAF_CM_EXIT; +} + +VGAuthContext* CVgAuthContext::getPtr() const { + CAF_CM_FUNCNAME_VALIDATE("getPtr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _vgAuthContext; +} + +std::string CVgAuthContext::getApplicationName() const { + CAF_CM_FUNCNAME_VALIDATE("getApplicationName"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _applicationName; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.cpp new file mode 100644 index 000000000..604a4109c --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.cpp @@ -0,0 +1,214 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Exception/CCafException.h" +#include "CVgAuthError.h" + +using namespace Caf; + +void CVgAuthError::checkErrorExc( + const VGAuthError& vgAuthError, + const std::string& msg) { + CAF_CM_STATIC_FUNC("CVgAuthError", "checkErrorExc"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(msg); + + if (VGAUTH_FAILED(vgAuthError)) { + CAF_CM_EXCEPTIONEX_VA2(UnsupportedOperationException, getErrorCode(vgAuthError), + "%s (%s)", msg.c_str(), getErrorMsg(vgAuthError).c_str()); + } + } + CAF_CM_EXIT; +} + +void CVgAuthError::checkErrorExc( + const VGAuthError& vgAuthError, + const std::string& msg, + const std::string& addtlInfo) { + CAF_CM_STATIC_FUNC("CVgAuthError", "checkErrorExc"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(msg); + CAF_CM_VALIDATE_STRING(addtlInfo); + + if (VGAUTH_FAILED(vgAuthError)) { + CAF_CM_EXCEPTIONEX_VA3(UnsupportedOperationException, getErrorCode(vgAuthError), + "%s (%s) - %s", msg.c_str(), getErrorMsg(vgAuthError).c_str(), addtlInfo.c_str()); + } + } + CAF_CM_EXIT; +} + +void CVgAuthError::checkErrorErr( + const VGAuthError& vgAuthError, + const std::string& msg) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CVgAuthError", "checkErrorErr"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(msg); + + if (VGAUTH_FAILED(vgAuthError)) { + CAF_CM_LOG_ERROR_VA2("%s (%s)", msg.c_str(), getErrorMsg(vgAuthError).c_str()); + } + } + CAF_CM_EXIT; +} + +void CVgAuthError::checkErrorErr( + const VGAuthError& vgAuthError, + const std::string& msg, + const std::string& addtlInfo) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CVgAuthError", "checkErrorErr"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_STRING(msg); + CAF_CM_VALIDATE_STRING(addtlInfo); + + if (VGAUTH_FAILED(vgAuthError)) { + CAF_CM_LOG_ERROR_VA3("%s (%s) - %s", msg.c_str(), getErrorMsg(vgAuthError).c_str(), addtlInfo.c_str()); + } + } + CAF_CM_EXIT; +} + +std::string CVgAuthError::getErrorMsg( + const VGAuthError& vgAuthError) { + + std::string vgAuthErrorMsg; + + CAF_CM_ENTER { + switch(vgAuthError) { + case VGAUTH_E_OK: + vgAuthErrorMsg = "VGAUTH_E_OK"; + break; + case VGAUTH_E_FAIL: + vgAuthErrorMsg = "VGAUTH_E_FAIL"; + break; + case VGAUTH_E_INVALID_ARGUMENT: + vgAuthErrorMsg = "VGAUTH_E_INVALID_ARGUMENT"; + break; + case VGAUTH_E_INVALID_CERTIFICATE: + vgAuthErrorMsg = "VGAUTH_E_INVALID_CERTIFICATE"; + break; + case VGAUTH_E_PERMISSION_DENIED: + vgAuthErrorMsg = "VGAUTH_E_PERMISSION_DENIED"; + break; + case VGAUTH_E_OUT_OF_MEMORY: + vgAuthErrorMsg = "VGAUTH_E_OUT_OF_MEMORY"; + break; + case VGAUTH_E_COMM: + vgAuthErrorMsg = "VGAUTH_E_COMM"; + break; + case VGAUTH_E_NOTIMPLEMENTED: + vgAuthErrorMsg = "VGAUTH_E_NOTIMPLEMENTED"; + break; + case VGAUTH_E_NOT_CONNECTED: + vgAuthErrorMsg = "VGAUTH_E_NOT_CONNECTED"; + break; + case VGAUTH_E_VERSION_MISMATCH: + vgAuthErrorMsg = "VGAUTH_E_VERSION_MISMATCH"; + break; + case VGAUTH_E_SECURITY_VIOLATION: + vgAuthErrorMsg = "VGAUTH_E_SECURITY_VIOLATION"; + break; + case VGAUTH_E_CERT_ALREADY_EXISTS: + vgAuthErrorMsg = "VGAUTH_E_CERT_ALREADY_EXISTS"; + break; + case VGAUTH_E_AUTHENTICATION_DENIED: + vgAuthErrorMsg = "VGAUTH_E_AUTHENTICATION_DENIED"; + break; + case VGAUTH_E_INVALID_TICKET: + vgAuthErrorMsg = "VGAUTH_E_INVALID_TICKET"; + break; + case VGAUTH_E_MULTIPLE_MAPPINGS: + vgAuthErrorMsg = "VGAUTH_E_MULTIPLE_MAPPINGS"; + break; + case VGAUTH_E_ALREADY_IMPERSONATING: + vgAuthErrorMsg = "VGAUTH_E_ALREADY_IMPERSONATING"; + break; + case VGAUTH_E_NO_SUCH_USER: + vgAuthErrorMsg = "VGAUTH_E_NO_SUCH_USER"; + break; + case VGAUTH_E_SERVICE_NOT_RUNNING: + vgAuthErrorMsg = "VGAUTH_E_SERVICE_NOT_RUNNING"; + break; + case VGAUTH_E_SYSTEM_ERRNO: + { + const uint32 vgAuthErrorCode = VGAUTH_ERROR_EXTRA_ERROR(vgAuthError); + const std::string errorMsg = CStringConv::toString(vgAuthErrorCode); + vgAuthErrorMsg = std::string("VGAUTH_E_SYSTEM_ERRNO, msg: " + errorMsg); + } + break; + case VGAUTH_E_SYSTEM_WINDOWS: + { + const uint32 vgAuthErrorCode = VGAUTH_ERROR_EXTRA_ERROR(vgAuthError); +#ifdef WIN32 + const std::string errorMsg = BasePlatform::PlatformApi::GetApiErrorMessage(vgAuthErrorCode); +#else + const std::string errorMsg = CStringConv::toString(vgAuthErrorCode); +#endif + vgAuthErrorMsg = std::string("VGAUTH_E_SYSTEM_WINDOWS, msg: " + errorMsg); + } + break; + case VGAUTH_E_TOO_MANY_CONNECTIONS: + vgAuthErrorMsg = "VGAUTH_E_TOO_MANY_CONNECTIONS"; + break; + case VGAUTH_E_UNSUPPORTED: + vgAuthErrorMsg = "VGAUTH_E_UNSUPPORTED"; + break; + default: + vgAuthErrorMsg = "Unknown"; + } + } + CAF_CM_EXIT; + + return vgAuthErrorMsg; +} + +uint32 CVgAuthError::getErrorCode( + const VGAuthError& vgAuthError) { + + uint32 vgAuthErrorCode; + + CAF_CM_ENTER { + switch(vgAuthError) { + case VGAUTH_E_OK: + case VGAUTH_E_FAIL: + case VGAUTH_E_INVALID_ARGUMENT: + case VGAUTH_E_INVALID_CERTIFICATE: + case VGAUTH_E_PERMISSION_DENIED: + case VGAUTH_E_OUT_OF_MEMORY: + case VGAUTH_E_COMM: + case VGAUTH_E_NOTIMPLEMENTED: + case VGAUTH_E_NOT_CONNECTED: + case VGAUTH_E_VERSION_MISMATCH: + case VGAUTH_E_SECURITY_VIOLATION: + case VGAUTH_E_CERT_ALREADY_EXISTS: + case VGAUTH_E_AUTHENTICATION_DENIED: + case VGAUTH_E_INVALID_TICKET: + case VGAUTH_E_MULTIPLE_MAPPINGS: + case VGAUTH_E_ALREADY_IMPERSONATING: + case VGAUTH_E_NO_SUCH_USER: + case VGAUTH_E_SERVICE_NOT_RUNNING: + case VGAUTH_E_TOO_MANY_CONNECTIONS: + case VGAUTH_E_UNSUPPORTED: + vgAuthErrorCode = VGAUTH_ERROR_CODE(vgAuthError); + break; + case VGAUTH_E_SYSTEM_ERRNO: + case VGAUTH_E_SYSTEM_WINDOWS: + vgAuthErrorCode = VGAUTH_ERROR_EXTRA_ERROR(vgAuthError); + break; + default: + vgAuthErrorCode = E_UNEXPECTED; + } + } + CAF_CM_EXIT; + + return vgAuthErrorCode; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.h new file mode 100644 index 000000000..1ccadd8cf --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthError.h @@ -0,0 +1,45 @@ +/* + * Author: bwilliams + * Created: Jan 21, 2011 + * + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CVgAuthError_H_ +#define CVgAuthError_H_ + +namespace Caf { + +class CVgAuthError { +public: + static void checkErrorExc( + const VGAuthError& vgAuthError, + const std::string& msg); + + static void checkErrorExc( + const VGAuthError& vgAuthError, + const std::string& msg, + const std::string& addtlInfo); + + static void checkErrorErr( + const VGAuthError& vgAuthError, + const std::string& msg); + + static void checkErrorErr( + const VGAuthError& vgAuthError, + const std::string& msg, + const std::string& addtlInfo); + + static std::string getErrorMsg( + const VGAuthError& vgAuthError); + + static uint32 getErrorCode( + const VGAuthError& vgAuthError); + +private: + CAF_CM_DECLARE_NOCREATE(CVgAuthError); +}; + +} + +#endif /* CVgAuthError_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthImpersonation.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthImpersonation.cpp new file mode 100644 index 000000000..11fdc8b63 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthImpersonation.cpp @@ -0,0 +1,82 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CVgAuthContext.h" +#include "CVgAuthUserHandle.h" +#include "CVgAuthImpersonation.h" + +CVgAuthImpersonation::CVgAuthImpersonation() : + _isInitialized(false), + CAF_CM_INIT_LOG("CVgAuthImpersonation") { +} + +CVgAuthImpersonation::~CVgAuthImpersonation() { + CAF_CM_FUNCNAME("~CVgAuthImpersonation"); + + try { + if (_isInitialized) { + endImpersonation(_vgAuthContext); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CVgAuthImpersonation::impersonateAndManage( + const SmartPtrCVgAuthContext& vgAuthContext, + const SmartPtrCVgAuthUserHandle& vgAuthUserHandle) { + CAF_CM_FUNCNAME_VALIDATE("impersonateAndManage"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + CAF_CM_VALIDATE_SMARTPTR(vgAuthUserHandle); + + beginImpersonation(vgAuthContext, vgAuthUserHandle); + + _vgAuthContext = vgAuthContext; + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CVgAuthImpersonation::beginImpersonation( + const SmartPtrCVgAuthContext& vgAuthContext, + const SmartPtrCVgAuthUserHandle& vgAuthUserHandle) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CVgAuthImpersonation", "beginImpersonation"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + CAF_CM_VALIDATE_SMARTPTR(vgAuthUserHandle); + + const std::string userName = vgAuthUserHandle->getUserName(vgAuthContext); + CAF_CM_LOG_DEBUG_VA1("Beginning impersonation - %s", userName.c_str()); + + const VGAuthError vgAuthError = VGAuth_Impersonate( + vgAuthContext->getPtr(), vgAuthUserHandle->getPtr(), 0, NULL); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_Impersonate Failed"); + } + CAF_CM_EXIT; +} + +void CVgAuthImpersonation::endImpersonation( + const SmartPtrCVgAuthContext& vgAuthContext) { + CAF_CM_STATIC_FUNC_LOG_VALIDATE("CVgAuthImpersonation", "endImpersonation"); + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + + CAF_CM_LOG_DEBUG_VA0("Ending impersonation"); + + const VGAuthError vgAuthError = VGAuth_EndImpersonation(vgAuthContext->getPtr()); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_EndImpersonation Failed"); + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.cpp new file mode 100644 index 000000000..9ec81d6d4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.cpp @@ -0,0 +1,120 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CVgAuthContext.h" +#include "CVgAuthInitializer.h" +#include "CVgAuthImpersonation.h" + +CVgAuthInitializer::CVgAuthInitializer() : + _isInitialized(false), + CAF_CM_INIT_LOG("CVgAuthInitializer") { +} + +CVgAuthInitializer::~CVgAuthInitializer() { +} + +void CVgAuthInitializer::initialize( + const std::string& applicationName) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_STRING(applicationName); + + VGAuth_SetLogHandler(logHandler, NULL, 0, NULL); + + _vgAuthContext.CreateInstance(); + _vgAuthContext->initialize(applicationName); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +SmartPtrCVgAuthContext CVgAuthInitializer::getContext() const { + CAF_CM_FUNCNAME_VALIDATE("initializeThirdParty"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _vgAuthContext; +} + +void CVgAuthInitializer::installClient() const { + CAF_CM_FUNCNAME_VALIDATE("installClient"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const VGAuthError vgAuthError = VGAuth_InstallClient(_vgAuthContext->getPtr(), 0, NULL); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_InstallClient Failed", _vgAuthContext->getApplicationName()); + } + CAF_CM_EXIT; +} + +void CVgAuthInitializer::uninstallClient() const { + CAF_CM_FUNCNAME_VALIDATE("uninstallClient"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const VGAuthError vgAuthError = VGAuth_UninstallClient(_vgAuthContext->getPtr(), 0, NULL); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_UninstallClient Failed", _vgAuthContext->getApplicationName()); + } + CAF_CM_EXIT; +} + +void CVgAuthInitializer::endImpersonation() { + CAF_CM_FUNCNAME_VALIDATE("endImpersonation"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + CVgAuthImpersonation::endImpersonation(_vgAuthContext); + } + CAF_CM_EXIT; +} + +void CVgAuthInitializer::logHandler( + const char *logDomain, + int32 logLevel, + const char *msg, + void *userData) { + CAF_CM_STATIC_FUNC_LOG_ONLY("CVgAuthInitializer", "logHandler"); + + CAF_CM_ENTER { + switch (logLevel & G_LOG_LEVEL_MASK) { + case G_LOG_LEVEL_ERROR: + CAF_CM_LOG_ERROR_VA2("[ERROR][%s] %s", logDomain ? logDomain : "", msg); + break; + + case G_LOG_LEVEL_CRITICAL: + CAF_CM_LOG_ERROR_VA2("[CRITICAL][%s] %s", logDomain ? logDomain : "", msg); + break; + + case G_LOG_LEVEL_WARNING: + CAF_CM_LOG_WARN_VA2("[WARNING][%s] %s", logDomain ? logDomain : "", msg); + break; + + case G_LOG_LEVEL_INFO: + CAF_CM_LOG_INFO_VA2("[INFO][%s] %s", logDomain ? logDomain : "", msg); + break; + + case G_LOG_LEVEL_MESSAGE: + CAF_CM_LOG_DEBUG_VA2("[MESSAGE][%s] %s", logDomain ? logDomain : "", msg); + break; + + case G_LOG_LEVEL_DEBUG: + CAF_CM_LOG_DEBUG_VA2("[DEBUG][%s] %s", logDomain ? logDomain : "", msg); + break; + + default: + CAF_CM_LOG_WARN_VA2("[default][%s] %s", logDomain ? logDomain : "", msg); + } + } + CAF_CM_EXIT; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.h new file mode 100644 index 000000000..0973a9160 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthInitializer.h @@ -0,0 +1,61 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CVGAUTHINITIALIZER_H_ +#define CVGAUTHINITIALIZER_H_ + + +#include "IVgAuthImpersonation.h" + +#include "CVgAuthContext.h" + +namespace Caf { + +class CVgAuthInitializer : public IVgAuthImpersonation { +public: + CVgAuthInitializer(); + virtual ~CVgAuthInitializer(); + + CAF_BEGIN_QI() + CAF_QI_ENTRY(ICafObject) + CAF_QI_ENTRY(IVgAuthImpersonation) + CAF_END_QI() + +public: + void initialize( + const std::string& applicationName); + +public: + SmartPtrCVgAuthContext getContext() const; + void installClient() const; + void uninstallClient() const; + +public: // IVgAuthImpersonation + void endImpersonation(); + +private: + static void logHandler( + const char *logDomain, + int32 logLevel, + const char *msg, + void *userData); + +private: + bool _isInitialized; + SmartPtrCVgAuthContext _vgAuthContext; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CVgAuthInitializer); +}; + +CAF_DECLARE_SMART_QI_POINTER(CVgAuthInitializer); + +} + +#endif /* CVGAUTHINITIALIZER_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthUserHandle.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthUserHandle.cpp new file mode 100644 index 000000000..981721ffc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/CVgAuthUserHandle.cpp @@ -0,0 +1,102 @@ +/* + * Author: bwilliams + * Created: Aug 16, 2012 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "CVgAuthContext.h" +#include "CVgAuthUserHandle.h" + +CVgAuthUserHandle::CVgAuthUserHandle() : + _isInitialized(false), + _vgAuthUserHandle(NULL), + CAF_CM_INIT_LOG("CVgAuthUserHandle") { +} + +CVgAuthUserHandle::~CVgAuthUserHandle() { + CAF_CM_FUNCNAME("~CVgAuthUserHandle"); + + try { + if (_isInitialized) { + VGAuth_UserHandleFree(_vgAuthUserHandle); + } + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + CAF_CM_CLEAREXCEPTION; +} + +void CVgAuthUserHandle::initialize( + const SmartPtrCVgAuthContext& vgAuthContext, + const std::string& signedSamlToken) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + CAF_CM_VALIDATE_STRING(signedSamlToken); + + const VGAuthError vgAuthError = VGAuth_ValidateSamlBearerToken(vgAuthContext->getPtr(), + signedSamlToken.c_str(), NULL, 0, NULL, &_vgAuthUserHandle); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_ValidateSamlBearerToken Failed"); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +void CVgAuthUserHandle::initialize( + const SmartPtrCVgAuthContext& vgAuthContext, + const std::string& signedSamlToken, + const std::string& userName) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + + CAF_CM_ENTER { + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + CAF_CM_VALIDATE_STRING(signedSamlToken); + CAF_CM_VALIDATE_STRING(userName); + + const VGAuthError vgAuthError = VGAuth_ValidateSamlBearerToken(vgAuthContext->getPtr(), + signedSamlToken.c_str(), userName.c_str(), 0, NULL, &_vgAuthUserHandle); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_ValidateSamlBearerToken Failed", userName); + + _isInitialized = true; + } + CAF_CM_EXIT; +} + +std::string CVgAuthUserHandle::getUserName( + const SmartPtrCVgAuthContext& vgAuthContext) const { + CAF_CM_FUNCNAME_VALIDATE("getUserName"); + + std::string userNameRc; + + CAF_CM_ENTER { + CAF_CM_VALIDATE_SMARTPTR(vgAuthContext); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + char* userName = NULL; + const VGAuthError vgAuthError = VGAuth_UserHandleUsername(vgAuthContext->getPtr(), + _vgAuthUserHandle, &userName); + CVgAuthError::checkErrorExc(vgAuthError, "VGAuth_UserHandleUsername Failed"); + CAF_CM_VALIDATE_PTR(userName); + + userNameRc = userName; + + VGAuth_FreeBuffer(userName); + } + CAF_CM_EXIT; + + return userNameRc; +} + +VGAuthUserHandle* CVgAuthUserHandle::getPtr() const { + CAF_CM_FUNCNAME_VALIDATE("getPtr"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _vgAuthUserHandle; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/VgAuthIntegration.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/VgAuthIntegration.cpp new file mode 100644 index 000000000..99d7f8890 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/VgAuthIntegration.cpp @@ -0,0 +1,48 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +namespace Caf { + const char* _sObjIdGuestAuthenticatorInstance = "com.vmware.commonagent.maintegration.guestauthenticatorinstance"; + const char* _sObjIdGuestAuthenticator = "com.vmware.commonagent.maintegration.guestauthenticator"; +} + +using namespace Caf; + +CEcmSubSystemModule _Module; + +CAF_BEGIN_OBJECT_MAP(ObjectMap) +#ifndef __APPLE__ + CAF_OBJECT_ENTRY(CGuestAuthenticator) + CAF_OBJECT_ENTRY(CGuestAuthenticatorInstance) +#endif +CAF_END_OBJECT_MAP() + +CAF_DECLARE_SUBSYSTEM_EXPORTS() + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + try { + if (DLL_PROCESS_ATTACH == dwReason) + { + // initialize the sub-system module + _Module.Init(ObjectMap, hModule); + } + else if (DLL_PROCESS_DETACH == dwReason) + { + // Terminate the sub-system module + _Module.Term(); + } + } catch (std::runtime_error) { + ::exit(2); + } catch (...) { + ::exit(2); + } + + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/stdafx.h b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/stdafx.h new file mode 100644 index 000000000..e49afd9d4 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/VgAuth/src/stdafx.h @@ -0,0 +1,29 @@ +/* + * Author: bwilliams + * Created: Oct 22, 2010 + * + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +namespace Caf { + extern const char* _sObjIdGuestAuthenticatorInstance; + extern const char* _sObjIdGuestAuthenticator; +} + +#include +#include +#include + +#ifndef __APPLE__ +#include + +#include "CVgAuthError.h" +#include "CVgAuthInitializer.h" +#include "CGuestAuthenticatorInstance.h" +#include "CGuestAuthenticator.h" +#endif + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/Makefile.am b/open-vm-tools/common-agent/Cpp/ProviderFx/Makefile.am new file mode 100644 index 000000000..23eab441a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/Makefile.am @@ -0,0 +1,44 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +AUTOMAKE_OPTIONS = subdir-objects +caflibdir = @CAF_PME_LIB_DIR@ +caflib_LTLIBRARIES = +caflib_LTLIBRARIES += libProviderFx.la + +libProviderFx_la_SOURCES= +libProviderFx_la_SOURCES += ProviderFx/src/CProviderCdifFormatter.cpp +libProviderFx_la_SOURCES += ProviderFx/src/CProviderDocHelper.cpp +libProviderFx_la_SOURCES += ProviderFx/src/CProviderDriver.cpp +libProviderFx_la_SOURCES += ProviderFx/src/ProviderFx.cpp + +libProviderFx_la_CPPFLAGS = +libProviderFx_la_CPPFLAGS += @GLIB2_CPPFLAGS@ +libProviderFx_la_CPPFLAGS += @LOG4CPP_CPPFLAGS@ +libProviderFx_la_CPPFLAGS += @SSL_CPPFLAGS@ +libProviderFx_la_CPPFLAGS += @LIBRABBITMQ_CPPFLAGS@ + +libProviderFx_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/Framework/Framework/include +libProviderFx_la_CPPFLAGS += -I$(top_srcdir)/common-agent/Cpp/ProviderFx/ProviderFx/include +libProviderFx_la_LIBADD = +libProviderFx_la_LIBADD += @GLIB2_LIBS@ +libProviderFx_la_LIBADD += @LOG4CPP_LIBS@ +libProviderFx_la_LIBADD += -ldl +libProviderFx_la_LIBADD += ../Framework/libFramework.la + +libProviderFx_la_LDFLAGS = -shared + diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDocHelper.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDocHelper.h new file mode 100644 index 000000000..4424bc10a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDocHelper.h @@ -0,0 +1,116 @@ +/* + * Author: brets + * Created: Dec 3, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProviderDocHelper_H_ +#define CProviderDocHelper_H_ + + +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h" +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CCollectMethodDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" + +namespace Caf { + +class PROVIDERFX_LINKAGE CProviderDocHelper { + +public: + static SmartPtrCClassPropertyDoc createClassProperty( + const std::string name, + const PROPERTY_TYPE type, + const bool required = false, + const bool key = false, + const bool list = false); + + static SmartPtrCClassIdentifierDoc createClassIdentifier( + const std::string namespaceVal, + const std::string name, + const std::string version); + + static SmartPtrCClassInstancePropertyDoc createClassInstanceProperty( + const std::string name, + const SmartPtrCClassIdentifierDoc type, + const bool required = false, + const bool transientVal = false, + const bool list = false); + + static SmartPtrCDataClassDoc createDataClass( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque properties, + const std::deque instanceProperties = std::deque()); + + static SmartPtrCMethodParameterDoc createMethodParameter( + const std::string name, + const PARAMETER_TYPE type, + const bool isOptional = false, + const bool isList = false); + + static SmartPtrCInstanceParameterDoc createInstanceParameter( + const std::string name, + const std::string instanceNamespace, + const std::string instanceName, + const std::string instanceVersion, + const bool isOptional = false, + const bool isList = false); + + static SmartPtrCCollectMethodDoc createCollectMethod( + const std::string name, + const std::deque parameters = std::deque(), + const std::deque instanceParameters = std::deque()); + + static SmartPtrCMethodDoc createMethod( + const std::string name, + const std::deque parameters = std::deque(), + const std::deque instanceParameters = std::deque()); + + static SmartPtrCActionClassDoc createActionClass( + const std::string namespaceVal, + const std::string name, + const std::string version, + const SmartPtrCCollectMethodDoc collectMethod, + const std::deque methodCollection); + + static SmartPtrCSchemaDoc createSchema( + const std::deque dataClasses, + const std::deque actionClasses); + + static SmartPtrCDataClassPropertyDoc createDataClassProperty( + const std::string name, + const std::string value); + + static SmartPtrCDataClassSubInstanceDoc createDataClassSubInstance( + const std::string name, + const std::deque properties); + + static SmartPtrCDataClassInstanceDoc createDataClassInstance( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque properties, + const std::deque instanceProperties = std::deque()); + +private: + CProviderDocHelper(); + CAF_CM_DECLARE_NOCOPY(CProviderDocHelper); +}; + +} + +#endif /* CProviderDocHelper_H_ */ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDriver.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDriver.h new file mode 100644 index 000000000..542c5875a --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/CProviderDriver.h @@ -0,0 +1,77 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProviderDriver_h_ +#define CProviderDriver_h_ + + +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Doc/ProviderResultsDoc/CRequestIdentifierDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" + +namespace Caf { + +struct IInvokedProvider; // Forward declaration + +/// Sends responses/errors back to the client. +class PROVIDERFX_LINKAGE CProviderDriver { +private: + CProviderDriver(IInvokedProvider& provider); + virtual ~CProviderDriver(); + +public: + static int processProviderCommandline(IInvokedProvider& provider, int argc, char* argv[]); + +private: + int processProviderCommandline(int argc, char* argv[]); + + void collectSchema(const std::string& outputDir) const; + + void executeRequest(const std::string& requestPath) const; + + void executeCollectInstances( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCProviderCollectInstancesDoc doc) const; + + void executeInvokeOperation( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCProviderInvokeOperationDoc doc) const; + + SmartPtrCRequestIdentifierDoc createRequestId( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCActionClassDoc actionClass, + const UUID jobId) const; + + SmartPtrCActionClassDoc findActionClass( + const std::string srchClassNamespace, + const std::string srchClassName, + const std::string srchClassVersion, + const std::string srchOperationName) const; + + void saveProviderResponse( + const std::string attachmentFilePath) const; + +private: + IInvokedProvider& _provider; + const SmartPtrCSchemaDoc _schema; + const std::string _providerNamespace; + const std::string _providerName; + const std::string _providerVersion; + std::vector _commandLineArgs; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderDriver); +}; + +} + +#endif // #ifndef CProviderDriver_h_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IInvokedProvider.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IInvokedProvider.h new file mode 100644 index 000000000..c895b147e --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IInvokedProvider.h @@ -0,0 +1,36 @@ +/* + * Author: brets + * Created: October 28, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _ProviderContracts_IInvokedProvider_H_ +#define _ProviderContracts_IInvokedProvider_H_ + + +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" + +namespace Caf { + +struct IProviderRequest; // Forward declaration +struct IProviderResponse; // Forward declaration + +struct __declspec(novtable) IInvokedProvider { + + virtual const std::string getProviderNamespace() const = 0; + virtual const std::string getProviderName() const = 0; + virtual const std::string getProviderVersion() const = 0; + + virtual const SmartPtrCSchemaDoc getSchema() const = 0; + + virtual void collect(const IProviderRequest& request, IProviderResponse& response) const = 0; + + virtual void invoke(const IProviderRequest& request, IProviderResponse& response) const = 0; +}; + +//CAF_DECLARE_SMART_INTERFACE_POINTER(IInvokedProvider); + +} + +#endif // #ifndef _ProviderContracts_IInvokedProvider_H_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderRequest.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderRequest.h new file mode 100644 index 000000000..bbf9e75ba --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderRequest.h @@ -0,0 +1,39 @@ +/* + * Author: brets + * Created: October 28, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _ProviderContracts_IProviderRequest_H_ +#define _ProviderContracts_IProviderRequest_H_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" + +namespace Caf { + +struct __declspec(novtable) IProviderRequest { + + virtual const UUID getClientId() const = 0; + + virtual const UUID getRequestId() const = 0; + + virtual const std::string getPmeId() const = 0; + + virtual const std::vector getCommandLine() const = 0; + + virtual const SmartPtrCAttachmentCollectionDoc getAttachments() const = 0; + + virtual const SmartPtrCProviderCollectInstancesDoc getCollectInstances() const = 0; + + virtual const SmartPtrCProviderInvokeOperationDoc getInvokeOperations() const = 0; +}; + +//CAF_DECLARE_SMART_INTERFACE_POINTER(IProviderRequest); + +} + +#endif // #ifndef _ProviderContracts_IProviderRequest_H_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderResponse.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderResponse.h new file mode 100644 index 000000000..83c60a5b2 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/IProviderResponse.h @@ -0,0 +1,28 @@ +/* + * Author: brets + * Created: October 28, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef _ProviderContracts_IProviderResponse_H_ +#define _ProviderContracts_IProviderResponse_H_ + + +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" + +namespace Caf { + +struct __declspec(novtable) IProviderResponse { + + virtual void addInstance(const SmartPtrCDataClassInstanceDoc instance) = 0; + + virtual void addAttachment(const SmartPtrCAttachmentDoc attachment) = 0; +}; + +//CAF_DECLARE_SMART_INTERFACE_POINTER(IProviderResponse); + +} + +#endif // #ifndef _ProviderContracts_IProviderResponse_H_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/ProviderFxLink.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/ProviderFxLink.h new file mode 100644 index 000000000..a3c9e3e2b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/include/ProviderFxLink.h @@ -0,0 +1,26 @@ +/* + * Author: brets + * Created: October 28, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef PROVIDERFXLINK_H_ +#define PROVIDERFXLINK_H_ + +#ifndef PROVIDERFX_LINKAGE + #ifdef WIN32 + #ifdef PROVIDERFX_BUILD + #define PROVIDERFX_LINKAGE __declspec(dllexport) + #else + #define PROVIDERFX_LINKAGE __declspec(dllimport) + #endif + #else + #define PROVIDERFX_LINKAGE + #endif +#endif + +#include "CProviderDriver.h" +#include "CProviderDocHelper.h" + +#endif // #ifndef PROVIDERFXLINK_H_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.cpp b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.cpp new file mode 100644 index 000000000..1697222cc --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.cpp @@ -0,0 +1,223 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h" +#include "Doc/DocXml/ResponseXml/ResponseXmlRoots.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h" +#include "Doc/ProviderResultsDoc/CCdifDoc.h" +#include "Doc/ProviderResultsDoc/CDefinitionObjectCollectionDoc.h" +#include "Doc/ProviderResultsDoc/CRequestIdentifierDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/ResponseDoc/CManifestDoc.h" +#include "Doc/ResponseDoc/CProviderResponseDoc.h" +#include "Doc/ResponseDoc/CResponseHeaderDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CCollectMethodDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "CProviderCdifFormatter.h" +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlLink.h" +#include "Doc/DocXml/ResponseXml/ResponseXmlLink.h" +#include "../../Framework/src/Doc/DocUtils/DocUtilsLink.h" + +using namespace Caf; + +CProviderCdifFormatter::CProviderCdifFormatter() : + _isInitialized(false), + CAF_CM_INIT_LOG("CProviderCdifFormatter") { +} + +CProviderCdifFormatter::~CProviderCdifFormatter() { +} + +void CProviderCdifFormatter::initialize( + const SmartPtrCRequestIdentifierDoc requestIdentifier, + const SmartPtrCSchemaDoc schema, + const std::string outputFilePath) { + CAF_CM_FUNCNAME_VALIDATE("initialize"); + CAF_CM_PRECOND_ISNOTINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(requestIdentifier); + CAF_CM_VALIDATE_SMARTPTR(schema); + CAF_CM_VALIDATE_STRING(outputFilePath); + + _requestIdentifier = requestIdentifier; + _schema = schema; + _outputFilePath = outputFilePath; + + _isInitialized = true; +} + +void CProviderCdifFormatter::finished() { + CAF_CM_FUNCNAME_VALIDATE("finished"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCDefinitionObjectCollectionDoc definitionObjectCollection; + if (!_defnObjCollection.empty()) { + definitionObjectCollection.CreateInstance(); + definitionObjectCollection->initialize(_defnObjCollection); + } + + SmartPtrCCdifDoc cdifDoc; + cdifDoc.CreateInstance(); + cdifDoc->initialize(_requestIdentifier, definitionObjectCollection, _schema); + + const std::string cdifXml = XmlRoots::saveCdifToString(cdifDoc); + + CAF_CM_LOG_DEBUG_VA1("Writing CDIF to file - %s", _outputFilePath.c_str()); + FileSystemUtils::saveTextFile(_outputFilePath, cdifXml); + + saveProviderResponse(); +} + +void CProviderCdifFormatter::addInstance( + const SmartPtrCDataClassInstanceDoc dataClassInstance) { + CAF_CM_FUNCNAME_VALIDATE("format"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(dataClassInstance); + + const std::string defnObjXml = DefnObjectConverter::toString(dataClassInstance); + _defnObjCollection.push_back(defnObjXml); +} + +std::string CProviderCdifFormatter::getOutputFilePath() const { + CAF_CM_FUNCNAME_VALIDATE("getOutputFilePath"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + return _outputFilePath; +} + +void CProviderCdifFormatter::addAttachment(const SmartPtrCAttachmentDoc attachment) { + CAF_CM_FUNCNAME_VALIDATE("addAttachment"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + CAF_CM_VALIDATE_SMARTPTR(attachment); + + _attachmentCollectionInner.push_back(attachment); +} + +void CProviderCdifFormatter::saveProviderResponse() { + CAF_CM_FUNCNAME_VALIDATE("saveProviderResponse"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const SmartPtrCAttachmentDoc attachment = createAttachment(); + _attachmentCollectionInner.push_back(attachment); + + const SmartPtrCAttachmentCollectionDoc attachmentCollection = + createAttachmentCollection(); + + const SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection = + createAttachmentNameCollection(); + + std::string classNamespace; + std::string className; + std::string classVersion; + std::string operationName; + const SmartPtrCActionClassDoc actionClass = _requestIdentifier->getActionClass(); + if (!actionClass.IsNull()) { + classNamespace = actionClass->getNamespaceVal(); + className = actionClass->getName(); + classVersion = actionClass->getVersion(); + + const SmartPtrCCollectMethodDoc collectMethod = actionClass->getCollectMethod(); + const std::deque methodCollection = + actionClass->getMethodCollection(); + if (!collectMethod.IsNull()) { + operationName = collectMethod->getName(); + } else if (!methodCollection.empty()) { + const SmartPtrCMethodDoc method = methodCollection.front(); + operationName = method->getName(); + } + } + + SmartPtrCManifestDoc manifest; + manifest.CreateInstance(); + manifest->initialize(classNamespace, className, classVersion, + _requestIdentifier->getJobId(), operationName, attachmentNameCollection); + + SmartPtrCResponseHeaderDoc responseHeader; + responseHeader.CreateInstance(); + responseHeader->initialize( + "1.0", + CDateTimeUtils::getCurrentDateTime(), + 0, + true, + _requestIdentifier->getSessionId()); + + SmartPtrCProviderResponseDoc providerResponse; + providerResponse.CreateInstance(); + providerResponse->initialize(_requestIdentifier->getClientId(), + _requestIdentifier->getRequestId(), _requestIdentifier->getPmeId(), + responseHeader, manifest, attachmentCollection, + SmartPtrCStatisticsDoc()); + + const std::string attachmentDirPath = FileSystemUtils::getDirname(_outputFilePath); + const std::string providerResponseStr = XmlRoots::saveProviderResponseToString(providerResponse); + const std::string providerResponsePath = FileSystemUtils::buildPath( + attachmentDirPath, _sProviderResponseFilename); + FileSystemUtils::saveTextFile(providerResponsePath, providerResponseStr); + CAF_CM_LOG_DEBUG_VA1("Saved provider response file - %s", providerResponsePath.c_str()); +} + +SmartPtrCAttachmentDoc CProviderCdifFormatter::createAttachment() const { + CAF_CM_FUNCNAME_VALIDATE("createAttachment"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + const std::string attachmentFileName = FileSystemUtils::getBasename(_outputFilePath); + const std::string jobIdStr = BasePlatform::UuidToString(_requestIdentifier->getJobId()); + const std::string attachmentName = jobIdStr + "." + attachmentFileName; + const std::string cdifAttachmentFilePathTmp = + FileSystemUtils::normalizePathWithForward(_outputFilePath); + + const std::string cmsPolicyStr = AppConfigUtils::getRequiredString( + "security", "cms_policy");; + + SmartPtrCAttachmentDoc attachment; + attachment.CreateInstance(); + attachment->initialize(attachmentName, "cdif", + "file:///" + cdifAttachmentFilePathTmp, false, + EnumConvertersXml::convertStringToCmsPolicy(cmsPolicyStr)); + + return attachment; +} + +SmartPtrCAttachmentCollectionDoc CProviderCdifFormatter::createAttachmentCollection() const { + CAF_CM_FUNCNAME_VALIDATE("createAttachmentCollection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + SmartPtrCAttachmentCollectionDoc attachmentCollection; + attachmentCollection.CreateInstance(); + attachmentCollection->initialize(_attachmentCollectionInner, + std::deque()); + + return attachmentCollection; +} + +SmartPtrCAttachmentNameCollectionDoc CProviderCdifFormatter::createAttachmentNameCollection() const { + CAF_CM_FUNCNAME_VALIDATE("createAttachmentNameCollection"); + CAF_CM_PRECOND_ISINITIALIZED(_isInitialized); + + std::deque attachmentNameCollectionInner; + for (TConstIterator > attachmentIter( + _attachmentCollectionInner); attachmentIter; attachmentIter++) { + const SmartPtrCAttachmentDoc attachment = *attachmentIter; + + attachmentNameCollectionInner.push_back(attachment->getName()); + } + + SmartPtrCAttachmentNameCollectionDoc attachmentNameCollection; + attachmentNameCollection.CreateInstance(); + attachmentNameCollection->initialize(attachmentNameCollectionInner); + + return attachmentNameCollection; +} diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.h new file mode 100644 index 000000000..86197f23b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderCdifFormatter.h @@ -0,0 +1,69 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProviderCdifFormatter_h_ +#define CProviderCdifFormatter_h_ + +#include "IProviderResponse.h" +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentNameCollectionDoc.h" +#include "Doc/ProviderResultsDoc/CRequestIdentifierDoc.h" +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" + +namespace Caf { + +/// Sends responses/errors back to the client. +class CProviderCdifFormatter : public IProviderResponse { +public: + CProviderCdifFormatter(); + virtual ~CProviderCdifFormatter(); + +public: + void initialize( + const SmartPtrCRequestIdentifierDoc requestIdentifier, + const SmartPtrCSchemaDoc schema, + const std::string outputFilePath); + + void finished(); + + std::string getOutputFilePath() const; + +public: // IProviderResponse + void addInstance(const SmartPtrCDataClassInstanceDoc instance); + + void addAttachment(const SmartPtrCAttachmentDoc attachment); + +private: + void saveProviderResponse(); + + SmartPtrCAttachmentDoc createAttachment() const; + + SmartPtrCAttachmentCollectionDoc createAttachmentCollection() const; + + SmartPtrCAttachmentNameCollectionDoc createAttachmentNameCollection() const; + +private: + bool _isInitialized; + + SmartPtrCRequestIdentifierDoc _requestIdentifier; + SmartPtrCSchemaDoc _schema; + std::string _outputFilePath; + + std::deque _defnObjCollection; + std::deque _attachmentCollectionInner; + +private: + CAF_CM_CREATE; + CAF_CM_CREATE_LOG; + CAF_CM_DECLARE_NOCOPY(CProviderCdifFormatter); +}; + +} + +#endif // #ifndef CProviderCdifFormatter_h_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDocHelper.cpp b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDocHelper.cpp new file mode 100644 index 000000000..97312d81f --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDocHelper.cpp @@ -0,0 +1,191 @@ +/* + * Author: brets + * Created: Dec 3, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" +#include "Doc/CafCoreTypesDoc/CafCoreTypesDocTypes.h" + +#include "Doc/ProviderResultsDoc/CSchemaDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CClassIdentifierDoc.h" +#include "Doc/SchemaTypesDoc/CClassInstancePropertyDoc.h" +#include "Doc/SchemaTypesDoc/CClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CCmdlMetadataDoc.h" +#include "Doc/SchemaTypesDoc/CCollectMethodDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassPropertyDoc.h" +#include "Doc/SchemaTypesDoc/CDataClassSubInstanceDoc.h" +#include "Doc/SchemaTypesDoc/CInstanceParameterDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodParameterDoc.h" +#include "../include/CProviderDocHelper.h" + +using namespace Caf; + +SmartPtrCClassPropertyDoc CProviderDocHelper::createClassProperty( + const std::string name, + const PROPERTY_TYPE type, + const bool required, + const bool key, + const bool list) { + + SmartPtrCClassPropertyDoc doc; + doc.CreateInstance(); + doc->initialize(name, type, std::deque(), required, key, list); + return doc; +} + +SmartPtrCClassIdentifierDoc CProviderDocHelper::createClassIdentifier( + const std::string namespaceVal, + const std::string name, + const std::string version) { + SmartPtrCClassIdentifierDoc doc; + doc.CreateInstance(); + doc->initialize(namespaceVal, name, version); + return doc; +} + +SmartPtrCClassInstancePropertyDoc CProviderDocHelper::createClassInstanceProperty( + const std::string name, + const SmartPtrCClassIdentifierDoc type, + const bool required, + const bool transientVal, + const bool list) { + + std::deque types; + types.push_back(type); + + SmartPtrCClassInstancePropertyDoc doc; + doc.CreateInstance(); + doc->initialize(name, types, required, transientVal, list); + return doc; +} + +SmartPtrCDataClassDoc CProviderDocHelper::createDataClass( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque properties, + const std::deque instanceProperties) { + + SmartPtrCDataClassDoc doc; + doc.CreateInstance(); + doc->initialize(namespaceVal, name, version, properties, instanceProperties); + return doc; +} + +SmartPtrCMethodParameterDoc CProviderDocHelper::createMethodParameter( + const std::string name, + const PARAMETER_TYPE type, + const bool isOptional, + const bool isList) { + SmartPtrCMethodParameterDoc doc; + doc.CreateInstance(); + doc->initialize(name, type, isOptional, isList); + return doc; +} + +SmartPtrCCollectMethodDoc CProviderDocHelper::createCollectMethod( + const std::string name, + const std::deque parameters, + const std::deque instanceParameters) { + SmartPtrCCollectMethodDoc doc; + doc.CreateInstance(); + doc->initialize(name, parameters, instanceParameters); + return doc; +} + +SmartPtrCInstanceParameterDoc CProviderDocHelper::createInstanceParameter( + const std::string name, + const std::string instanceNamespace, + const std::string instanceName, + const std::string instanceVersion, + const bool isOptional, + const bool isList) { + SmartPtrCInstanceParameterDoc doc; + doc.CreateInstance(); + doc->initialize(name, instanceNamespace, instanceName, instanceVersion, isOptional, isList); + return doc; +} + +SmartPtrCMethodDoc CProviderDocHelper::createMethod( + const std::string name, + const std::deque parameters, + const std::deque instanceParameters) { + SmartPtrCMethodDoc doc; + doc.CreateInstance(); + doc->initialize(name, parameters, instanceParameters); + return doc; +} + +SmartPtrCActionClassDoc CProviderDocHelper::createActionClass( + const std::string namespaceVal, + const std::string name, + const std::string version, + const SmartPtrCCollectMethodDoc collectMethod, + const std::deque methodCollection) { + + SmartPtrCActionClassDoc doc; + doc.CreateInstance(); + doc->initialize(namespaceVal, name, version, collectMethod, methodCollection); + return doc; +} + +SmartPtrCSchemaDoc CProviderDocHelper::createSchema( + const std::deque dataClasses, + const std::deque actionClasses) { + SmartPtrCSchemaDoc doc; + doc.CreateInstance(); + doc->initialize(dataClasses, actionClasses); + return doc; +} + +SmartPtrCDataClassPropertyDoc CProviderDocHelper::createDataClassProperty( + const std::string name, + const std::string value) { + + SmartPtrCDataClassPropertyDoc doc; + doc.CreateInstance(); + doc->initialize(name, std::deque(), value); + return doc; +} + +SmartPtrCDataClassSubInstanceDoc CProviderDocHelper::createDataClassSubInstance( + const std::string name, + const std::deque properties) { + + SmartPtrCDataClassSubInstanceDoc doc; + doc.CreateInstance(); + doc->initialize( + name, + std::deque(), + properties, + std::deque(), + SmartPtrCCmdlUnionDoc()); + return doc; +} + +SmartPtrCDataClassInstanceDoc CProviderDocHelper::createDataClassInstance( + const std::string namespaceVal, + const std::string name, + const std::string version, + const std::deque properties, + const std::deque instanceProperties) { + + SmartPtrCDataClassInstanceDoc doc; + doc.CreateInstance(); + doc->initialize( + namespaceVal, + name, + version, + std::deque(), + properties, + instanceProperties, + SmartPtrCCmdlUnionDoc()); + return doc; +} diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDriver.cpp b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDriver.cpp new file mode 100644 index 000000000..63aefc4b1 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderDriver.cpp @@ -0,0 +1,390 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +#include "Doc/DocXml/ProviderRequestXml/ProviderRequestXmlRoots.h" +#include "Doc/DocXml/ProviderResultsXml/ProviderResultsXmlRoots.h" +#include "Doc/DocXml/ResponseXml/ResponseXmlRoots.h" + +#include "Doc/DocUtils/EnumConvertersXml.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/CafCoreTypesDoc/CAttachmentDoc.h" +#include "Doc/CafCoreTypesDoc/CInlineAttachmentDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" +#include "Doc/ProviderResultsDoc/CRequestIdentifierDoc.h" +#include "Doc/ResponseDoc/CProviderResponseDoc.h" +#include "Doc/SchemaTypesDoc/CActionClassDoc.h" +#include "Doc/SchemaTypesDoc/CCollectMethodDoc.h" +#include "Doc/SchemaTypesDoc/CMethodDoc.h" +#include "Memory/DynamicArray/DynamicArrayInc.h" +#include "Exception/CCafException.h" +#include "Common/IAppConfig.h" +#include "CProviderDriver.h" +#include "CProviderCdifFormatter.h" +#include "CProviderRequest.h" +#include "IInvokedProvider.h" +#include "Integration/Caf/CCafMessagePayload.h" + +using namespace Caf; + +CProviderDriver::CProviderDriver(IInvokedProvider& provider) : + _provider(provider), + _schema(provider.getSchema()), + _providerNamespace(provider.getProviderNamespace()), + _providerName(provider.getProviderName()), + _providerVersion(provider.getProviderVersion()), + CAF_CM_INIT_LOG("CProviderDriver") { +} + +CProviderDriver::~CProviderDriver() { +} + +int CProviderDriver::processProviderCommandline(IInvokedProvider& provider, int argc, char* argv[]) { + SmartPtrIAppConfig appConfig; + try { + if (g_getenv("CAF_APPCONFIG") == NULL) { + Cdeqstr deqstr; + deqstr.push_back("cafenv-appconfig"); + deqstr.push_back("persistence-appconfig"); + deqstr.push_back("providerFx-appconfig"); + deqstr.push_back("custom-appconfig"); + appConfig = getAppConfig(deqstr); + } else { + appConfig = getAppConfig(); + } + } catch(CCafException *ex) { + std::cerr << "CProviderDriver::processProviderCommandline() failed to initialize AppConfig: " << ex->getFullMsg().c_str(); + ex->Release(); + return 1; + } catch (std::exception ex) { + std::cerr << "CProviderDriver::getAppConfig() failed to initialize AppConfig: " << ex.what(); + return 1; + } catch (...) { + std::cerr << "CProviderDriver::getAppConfig() failed to initialize AppConfig: unknown exception"; + return 1; + } + + // NOTE: Want to define parameters as constants + if (argc == 0) { + // Error + std::cerr << "Invalid command line: no options provided"; + return 1; + } + + CProviderDriver driver(provider); + return driver.processProviderCommandline(argc, argv); +} + +int CProviderDriver::processProviderCommandline(int argc, char* argv[]) { + CAF_CM_FUNCNAME("processProviderCommandline"); + + _commandLineArgs.clear(); + _commandLineArgs.reserve(argc); + for (int32 i = 0; i < argc; i++) { + _commandLineArgs.push_back(argv[i]); + } + + for (std::vector::const_iterator itr = _commandLineArgs.begin(); itr != _commandLineArgs.end(); itr++) { + if ((*itr).compare("--schema") == 0) { + itr++; + if (itr == _commandLineArgs.end()) { + std::cerr << "Invalid command line: no schema output directory provided"; + return 1; + } else if ((*itr).compare("-o") != 0) { + std::cerr << "Invalid command line: unexpected option: " << (*itr).c_str(); + return 1; + } + itr++; + if (itr == _commandLineArgs.end()) { + std::cerr << "Invalid command line: no schema output directory provided"; + return 1; + } + + std::string outputDir = *itr; + while (++itr != _commandLineArgs.end()) { + outputDir += " " + *itr; + } + + collectSchema(outputDir); + return 0; + + } else if ((*itr).compare("-r") == 0) { + itr++; + if (itr == _commandLineArgs.end()) { + std::cerr << "Invalid command line: no request location provided"; + return 1; + } + + std::string requestPath = *itr; + while (++itr != _commandLineArgs.end()) { + requestPath += " " + *itr; + } + + try { + executeRequest(requestPath); + return 0; + } + CAF_CM_CATCH_ALL; + CAF_CM_LOG_CRIT_CAFEXCEPTION; + std::cerr << "Error executing request: " << _cm_exception_->getFullMsg().c_str() << std::endl; + CAF_CM_CLEAREXCEPTION + return 1; + } + } + std::cerr << "Invalid command line: unknown options"; + return 1; +} + +void CProviderDriver::collectSchema(const std::string& outputDir) const { + CAF_CM_FUNCNAME_VALIDATE("collectSchema"); + CAF_CM_VALIDATE_STRING(outputDir); + + const std::string schemaStr = XmlRoots::saveSchemaToString(_schema); + const std::string schemaFilename = _providerName + "-collectSchema-Rnd.provider-data.xml"; + const std::string schemaPath = FileSystemUtils::buildPath(outputDir, schemaFilename); + FileSystemUtils::saveTextFile(schemaPath, schemaStr); + CAF_CM_LOG_DEBUG_VA1("Saved schema file - %s", schemaPath.c_str()); + + saveProviderResponse(schemaPath); +} + +void CProviderDriver::executeRequest(const std::string& requestPath) const { + CAF_CM_FUNCNAME("executeRequest"); + CAF_CM_VALIDATE_STRING(requestPath); + + // TODO: Verify file exists + SmartPtrCDynamicByteArray fileContents = CCafMessagePayload::createBufferFromFile(requestPath); + std::string providerRequestXml(reinterpret_cast(fileContents->getPtr())); + + const SmartPtrCProviderRequestDoc request = XmlRoots::parseProviderRequestFromString(providerRequestXml); + + bool isProviderCalled = false; + const SmartPtrCProviderCollectInstancesCollectionDoc collectInstancesCollection = request->getBatch()->getCollectInstancesCollection(); + if (! collectInstancesCollection.IsNull()) { + const std::deque instances = collectInstancesCollection->getCollectInstances(); + for(TConstIterator > iter(instances); iter; iter++) { + isProviderCalled = true; + executeCollectInstances(request, *iter); + } + } + + const SmartPtrCProviderInvokeOperationCollectionDoc invokeOperationCollection = request->getBatch()->getInvokeOperationCollection(); + if (! invokeOperationCollection.IsNull()) { + const std::deque operations = invokeOperationCollection->getInvokeOperation(); + for(TConstIterator > iter(operations); iter; iter++) { + isProviderCalled = true; + executeInvokeOperation(request, *iter); + } + } + + if (! isProviderCalled) { + CAF_CM_EXCEPTIONEX_VA3(NoSuchElementException, ERROR_NOT_FOUND, + "Did not call anything on the provider - %s::%s::%s", + _providerNamespace.c_str(), _providerName.c_str(), _providerVersion.c_str()); + } +} + +void CProviderDriver::executeCollectInstances( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCProviderCollectInstancesDoc doc) const { + CAF_CM_FUNCNAME_VALIDATE("executeCollectInstances"); + CAF_CM_VALIDATE_SMARTPTR(request); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCActionClassDoc actionClass = findActionClass(doc->getClassNamespace(), + doc->getClassName(), doc->getClassVersion(), "collectInstances"); + + const SmartPtrCRequestIdentifierDoc requestId = createRequestId(request, actionClass, doc->getJobId()); + + const std::string outputFilename = _providerName + std::string("-collectInstances.provider-data.xml"); + const std::string outputFilePath = FileSystemUtils::buildPath(doc->getOutputDir(), outputFilename); + + CProviderCdifFormatter formatter; + CAF_CM_LOG_DEBUG_VA1("Initializing formatter with path - %s", outputFilePath.c_str()); + formatter.initialize(requestId, _schema, outputFilePath); + + CAF_CM_LOG_DEBUG_VA1("Calling collect on the provider - %s", _providerName.c_str()); + CProviderRequest providerRequest(request, _commandLineArgs); + providerRequest.setCollectInstances(doc); + _provider.collect(providerRequest, formatter); + formatter.finished(); +} + +void CProviderDriver::executeInvokeOperation( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCProviderInvokeOperationDoc doc) const { + CAF_CM_FUNCNAME_VALIDATE("executeInvokeOperation"); + CAF_CM_VALIDATE_SMARTPTR(request); + CAF_CM_VALIDATE_SMARTPTR(doc); + + const SmartPtrCActionClassDoc actionClass = findActionClass(doc->getClassNamespace(), + doc->getClassName(), doc->getClassVersion(), doc->getOperation()->getName()); + + const SmartPtrCRequestIdentifierDoc requestId = createRequestId(request, actionClass, doc->getJobId()); + + const std::string outputFilename = _providerName + std::string("-invokeOperation.provider-data.xml"); + const std::string outputFilePath = FileSystemUtils::buildPath(doc->getOutputDir(), outputFilename); + + CProviderCdifFormatter formatter; + CAF_CM_LOG_DEBUG_VA1("Initializing formatter with path - %s", outputFilePath.c_str()); + formatter.initialize(requestId, _schema, outputFilePath); + + CAF_CM_LOG_DEBUG_VA1("Calling invoke on the provider - %s", _providerName.c_str()); + CProviderRequest providerRequest(request, _commandLineArgs); + providerRequest.setInvokeOperations(doc); + _provider.invoke(providerRequest, formatter); + formatter.finished(); +} + +SmartPtrCRequestIdentifierDoc CProviderDriver::createRequestId( + const SmartPtrCProviderRequestDoc request, + const SmartPtrCActionClassDoc actionClass, + const UUID jobId) const { + CAF_CM_FUNCNAME_VALIDATE("createRequestId"); + CAF_CM_VALIDATE_SMARTPTR(request); + CAF_CM_VALIDATE_SMARTPTR(actionClass); + CAF_CM_VALIDATE_GUID(jobId); + + SmartPtrCRequestIdentifierDoc requestIdentifier; + requestIdentifier.CreateInstance(); + requestIdentifier->initialize( + request->getClientId(), + request->getRequestId(), + request->getPmeId(), + jobId, + actionClass, + CAFCOMMON_GUID_NULL); + + return requestIdentifier; +} + +SmartPtrCActionClassDoc CProviderDriver::findActionClass( + const std::string srchClassNamespace, + const std::string srchClassName, + const std::string srchClassVersion, + const std::string srchOperationName) const { + CAF_CM_FUNCNAME("findActionClass"); + CAF_CM_VALIDATE_STRING(srchClassNamespace); + CAF_CM_VALIDATE_STRING(srchClassName); + CAF_CM_VALIDATE_STRING(srchClassVersion); + CAF_CM_VALIDATE_STRING(srchOperationName); + + const std::deque actionClassCollection = _schema->getActionClassCollection(); + CAF_CM_VALIDATE_STL(actionClassCollection); + + SmartPtrCActionClassDoc actionClassRc; + for(TConstIterator > actionClassIter(actionClassCollection); + actionClassIter; actionClassIter++) { + const SmartPtrCActionClassDoc actionClass = *actionClassIter; + + const std::string actionClassNamespace = actionClass->getNamespaceVal(); + const std::string actionClassName = actionClass->getName(); + const std::string actionClassVersion = actionClass->getVersion(); + + if ((srchClassNamespace.compare(actionClassNamespace) == 0) && + (srchClassName.compare(actionClassName) == 0) && + (srchClassVersion.compare(actionClassVersion) == 0)) { + + const SmartPtrCCollectMethodDoc actionCollectMethod = actionClass->getCollectMethod(); + if (! actionCollectMethod.IsNull() && (srchOperationName.compare(actionCollectMethod->getName()) == 0)) { + actionClassRc.CreateInstance(); + actionClassRc->initialize( + actionClassNamespace, + actionClassName, + actionClassVersion, + actionCollectMethod, + std::deque(), + actionClass->getDisplayName(), + actionClass->getDescription()); + break; + } else { + const std::deque actionMethodCollection = actionClass->getMethodCollection(); + for(TConstIterator > actionMethodIter(actionMethodCollection); + actionMethodIter; actionMethodIter++) { + const SmartPtrCMethodDoc actionMethod = *actionMethodIter; + + if (srchOperationName.compare(actionMethod->getName()) == 0) { + std::deque actionMethodCollection; + actionMethodCollection.push_back(actionMethod); + + actionClassRc.CreateInstance(); + actionClassRc->initialize( + actionClassNamespace, + actionClassName, + actionClassVersion, + SmartPtrCCollectMethodDoc(), + actionMethodCollection, + actionClass->getDisplayName(), + actionClass->getDescription()); + break; + } + } + } + } + } + + if (actionClassRc.IsNull()) { + CAF_CM_EXCEPTIONEX_VA4(NoSuchElementException, ERROR_NOT_FOUND, + "Action Class not found - %s::%s::%s::%s", + srchClassNamespace.c_str(), srchClassName.c_str(), srchClassVersion.c_str(), srchOperationName.c_str()); + } + + return actionClassRc; +} + +void CProviderDriver::saveProviderResponse(const std::string attachmentFilePath) const { + CAF_CM_FUNCNAME_VALIDATE("saveProviderResponse"); + CAF_CM_VALIDATE_STRING(attachmentFilePath); + + const std::string attachmentName = FileSystemUtils::getBasename(attachmentFilePath); + const std::string attachmentDirPath = FileSystemUtils::getDirname(attachmentFilePath); + const std::string attachmentFilePathTmp = + FileSystemUtils::normalizePathWithForward(attachmentFilePath); + + const std::string cmsPolicyStr = AppConfigUtils::getRequiredString( + "security", "cms_policy");; + + SmartPtrCAttachmentDoc attachment; + attachment.CreateInstance(); + attachment->initialize(attachmentName, "cdif", + "file:///" + attachmentFilePathTmp, false, + EnumConvertersXml::convertStringToCmsPolicy(cmsPolicyStr)); + + std::deque attachmentCollectionInner; + attachmentCollectionInner.push_back(attachment); + + SmartPtrCAttachmentCollectionDoc attachmentCollection; + attachmentCollection.CreateInstance(); + attachmentCollection->initialize(attachmentCollectionInner, + std::deque()); + + const UUID clientId = CAFCOMMON_GUID_NULL; + const UUID requestId = CAFCOMMON_GUID_NULL; + const std::string pmeId = BasePlatform::UuidToString(CAFCOMMON_GUID_NULL); + + SmartPtrCProviderResponseDoc providerResponse; + providerResponse.CreateInstance(); + providerResponse->initialize( + clientId, + requestId, + pmeId, + SmartPtrCResponseHeaderDoc(), + SmartPtrCManifestDoc(), + attachmentCollection, + SmartPtrCStatisticsDoc()); + + const std::string providerResponseStr = XmlRoots::saveProviderResponseToString(providerResponse); + const std::string providerResponsePath = FileSystemUtils::buildPath(attachmentDirPath, _sProviderResponseFilename); + FileSystemUtils::saveTextFile(providerResponsePath, providerResponseStr); + CAF_CM_LOG_DEBUG_VA1("Saved provider response file - %s", providerResponsePath.c_str()); +} diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderRequest.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderRequest.h new file mode 100644 index 000000000..46d5f4ce8 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/CProviderRequest.h @@ -0,0 +1,79 @@ +/* + * Author: brets + * Created: November 5, 2015 + * + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef CProviderRequest_h_ +#define CProviderRequest_h_ + + +#include "IProviderRequest.h" + +#include "Doc/CafCoreTypesDoc/CAttachmentCollectionDoc.h" +#include "Doc/ProviderRequestDoc/CProviderCollectInstancesDoc.h" +#include "Doc/ProviderRequestDoc/CProviderInvokeOperationDoc.h" +#include "Doc/ProviderRequestDoc/CProviderRequestDoc.h" + +namespace Caf { + +// Request information forwarded to the provider +class CProviderRequest : public IProviderRequest { +public: + CProviderRequest(const SmartPtrCProviderRequestDoc request, + const std::vector commandLine) : + _request(request), + _commandLine(commandLine) { + } + virtual ~CProviderRequest() {}; + +public: // IProviderRequest + const UUID getClientId() const { + return _request->getClientId(); + } + + const UUID getRequestId() const { + return _request->getRequestId(); + } + + const std::string getPmeId() const { + return _request->getPmeId(); + } + + const std::vector getCommandLine() const { + return _commandLine; + } + + const SmartPtrCAttachmentCollectionDoc getAttachments() const { + return _request->getAttachmentCollection(); + } + + const SmartPtrCProviderCollectInstancesDoc getCollectInstances() const { + return _collectInstances; + } + const SmartPtrCProviderInvokeOperationDoc getInvokeOperations() const { + return _invokeOperations; + } + +public: + void setCollectInstances(SmartPtrCProviderCollectInstancesDoc doc) { + _collectInstances = doc; + _invokeOperations = NULL; + } + + void setInvokeOperations(SmartPtrCProviderInvokeOperationDoc doc) { + _collectInstances = NULL; + _invokeOperations = doc; + } + +private: + const SmartPtrCProviderRequestDoc _request; + const std::vector _commandLine; + SmartPtrCProviderCollectInstancesDoc _collectInstances; + SmartPtrCProviderInvokeOperationDoc _invokeOperations; +}; + +} + +#endif // #ifndef CProviderRequest_h_ diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/ProviderFx.cpp b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/ProviderFx.cpp new file mode 100644 index 000000000..46d44f20b --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/ProviderFx.cpp @@ -0,0 +1,13 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#include "stdafx.h" + +extern "C" BOOL APIENTRY DllMain(HINSTANCE hModule, uint32 dwReason, LPVOID) +{ + return TRUE; +} diff --git a/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/stdafx.h b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/stdafx.h new file mode 100644 index 000000000..a3e14e878 --- /dev/null +++ b/open-vm-tools/common-agent/Cpp/ProviderFx/ProviderFx/src/stdafx.h @@ -0,0 +1,21 @@ +/* + * Author: bwilliams + * Created: May 3, 2012 + * + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. -- VMware Confidential + */ + +#ifndef stdafx_h_ +#define stdafx_h_ + +//{{CAF_SUBSYSTEM}} + +#include +#include +#include + +#include "../include/ProviderFxLink.h" +#include "CProviderCdifFormatter.h" +#include "CProviderRequest.h" + +#endif // #ifndef stdafx_h_ diff --git a/open-vm-tools/common-agent/etc/Makefile.am b/open-vm-tools/common-agent/etc/Makefile.am new file mode 100644 index 000000000..25b386c42 --- /dev/null +++ b/open-vm-tools/common-agent/etc/Makefile.am @@ -0,0 +1,24 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +SUBDIRS = install config scripts + +uninstall-hook: + rm -rf $(DESTDIR)/etc/vmware-caf + rm -rf $(DESTDIR)/var/lib/vmware-caf + rm -rf $(DESTDIR)/var/vmware-caf + rm -rf $(DESTDIR)/$(libdir)/open-vm-tools/vmware-caf/ diff --git a/open-vm-tools/common-agent/etc/install/Makefile.am b/open-vm-tools/common-agent/etc/install/Makefile.am new file mode 100644 index 000000000..ec2ecfcc6 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/Makefile.am @@ -0,0 +1,36 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir = /etc/vmware-caf/pme/install + +conf_SCRIPTS = \ + caf-c-communication-service \ + caf-c-management-agent \ + caf-dbg.sh \ + caf-vgauth \ + commonenv.sh \ + install.sh \ + postinstallInstall.sh \ + postinstallUpgrade.sh \ + preinstallUpgrade.sh \ + preremoveUninstall.sh \ + preuninstall.sh \ + preupgrade.sh \ + restartServices.sh \ + stopAndRemoveServices.sh \ + upgrade.sh + diff --git a/open-vm-tools/common-agent/etc/install/caf-c-communication-service b/open-vm-tools/common-agent/etc/install/caf-c-communication-service new file mode 100644 index 000000000..61dd89000 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/caf-c-communication-service @@ -0,0 +1,81 @@ +#!/bin/bash +# +# Init file for the VMware CAF Communication Service +# +# chkconfig: 35 95 20 +# description: VMware Common Agent Framework Communication Service daemon +# +# processname: CommAmqpListener + +if [ -f /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +elif [ -f /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions + type success >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + success() { + echo -en "$@" + echo -e "$rc_done" + } + failure() { + echo -en "$@" + echo -e "$rc_failed" + } + fi +fi + +progName="VMware CAF Communication Service (C Version)" +listenerName=CommAmqpListener +prog="@binDir@/$listenerName" +startScript="@scriptDir@/start-listener" +stopScript="@scriptDir@/stop-listener" +lockFile=/var/lock/subsys/caf-communication-service + +start() +{ + [ -x $startScript ] || exit 0 + echo -n $"Starting $progName:" + msg="$progBase daemon startup" + "$startScript" && success "$msg" || failure "$msg" + rc=$? + [ $rc -eq 0 ] && touch $lockFile + echo + return $rc +} + +stop() +{ + echo -n $"Stoppping $progName:" + killproc $prog -TERM + rc=$? + [ -x $stopScript ] && $stopScript && + [ $rc -ne 0 ] && [ -z "`pidof -x $prog`" ] && rc=0 + [ $rc -eq 0 ] && rm -f $lockFile + echo + return $rc +} + +restart() +{ + stop + sleep 2 + start +} + +condrestart() +{ + [ -e $lockFile ] && restart || : +} + +case "$1" in + start) start ;; + stop) stop ;; + status) status $prog ;; + restart) restart ;; + condrestart) condrestart ;; + *) + echo $"Usage: $0 {start|stop|status|condrestart|restart}" + exit 1 +esac + +exit $? diff --git a/open-vm-tools/common-agent/etc/install/caf-c-management-agent b/open-vm-tools/common-agent/etc/install/caf-c-management-agent new file mode 100644 index 000000000..f38f8b3b3 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/caf-c-management-agent @@ -0,0 +1,81 @@ +#!/bin/bash +# +# Init file for the VMware CAF Management Agent +# +# chkconfig: 35 95 20 +# description: VMware Common Agent Framework Management Agent daemon +# +# processname: ManagementAgentHost + +if [ -f /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +elif [ -f /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions + type success >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + success() { + echo -en "$@" + echo -e "$rc_done" + } + failure() { + echo -en "$@" + echo -e "$rc_failed" + } + fi +fi + +progName="VMware CAF Management Agent (C Version)" +progBase=ManagementAgentHost +prog="@binDir@/$progBase" +startScript="@scriptDir@/start-ma" +stopScript="@scriptDir@/stop-ma" +lockFile=/var/lock/subsys/caf-management-agent + +start() +{ + [ -x $startScript ] || exit 0 + echo -n $"Starting $progName:" + msg="$progBase daemon startup" + "$startScript" && success "$msg" || failure "$msg" + rc=$? + [ $rc -eq 0 ] && touch $lockFile + echo + return $rc +} + +stop() +{ + echo -n $"Stoppping $progName:" + killproc $prog -TERM + rc=$? + [ -x $stopScript ] && $stopScript && + [ $rc -ne 0 ] && [ -z "`pidof -x $prog`" ] && rc=0 + [ $rc -eq 0 ] && rm -f $lockFile + echo + return $rc +} + +restart() +{ + stop + sleep 2 + start +} + +condrestart() +{ + [ -e $lockFile ] && restart || : +} + +case "$1" in + start) start ;; + stop) stop ;; + status) status $prog ;; + restart) restart ;; + condrestart) condrestart ;; + *) + echo $"Usage: $0 {start|stop|status|condrestart|restart}" + exit 1 +esac + +exit $? diff --git a/open-vm-tools/common-agent/etc/install/caf-dbg.sh b/open-vm-tools/common-agent/etc/install/caf-dbg.sh new file mode 100644 index 000000000..070973f3b --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/caf-dbg.sh @@ -0,0 +1,542 @@ +#!/bin/bash + +function prtHeader() { + local header=$1 + + echo "*************************" + echo "***" + echo "*** $header" + echo "***" + echo "*************************" +} + +function validateNotEmpty() { + local value=$1 + local name=$2 + + if [ "$value" = "" ]; then + echo "Value cannot be empty - $name" + exit 1 + fi +} + +function configAmqp() { + local username="$1" + local password="$2" + local brokerAddr="$3" + validateNotEmpty "$username" "username" + validateNotEmpty "$password" "password" + validateNotEmpty "$brokerAddr" "brokerAddr" + + local uriAmqpFile="$CAF_INPUT_DIR/persistence/protocol/amqpBroker_default/uri_amqp.txt" + sed -i -e "s/#amqpUsername#/${username}/g" -e "s/#amqpPassword#/${password}/g" -e "s/#brokerAddr#/$brokerAddr/g" "$uriAmqpFile" +} + +function enableCaf() { + local username="$1" + local password="$2" + validateNotEmpty "$username" "username" + validateNotEmpty "$password" "password" + + local uriAmqpFile="$CAF_INPUT_DIR/persistence/protocol/amqpBroker_default/uri_amqp.txt" + sed -i -e "s/#amqpUsername#/${username}/g" -e "s/#amqpPassword#/${password}/g" "$uriAmqpFile" +} + +function setBroker() { + local brokerAddr="$1" + validateNotEmpty "$brokerAddr" "brokerAddr" + + local uriAmqpFile="$CAF_INPUT_DIR/persistence/protocol/amqpBroker_default/uri_amqp.txt" + sed -i "s/#brokerAddr#/$brokerAddr/g" "$uriAmqpFile" +} + +function setListenerConfigured() { + mkdir -p "$CAF_INPUT_DIR/monitor" + echo "Manual" > "$CAF_INPUT_DIR/monitor/listenerConfiguredStage1.txt" +} + +function setListenerStartupType() { + local startupType="$1" + validateNotEmpty "$startupType" "startupType" + + local appconfigFile="$CAF_CONFIG_DIR/ma-appconfig" + sed -i "s/listener_startup_type=.*/listener_startup_type=$startupType/g" "$appconfigFile" +} + +function prtHelp() { + echo "*** $(basename $0) cmd - Runs commands that help with debugging CAF" + echo " * configAmqp brokerUsername brokerPassword brokerAddress Configures AMQP" + echo " * enableCaf brokerUsername brokerPassword Enables CAF" + echo " * setBroker brokerAddress Sets the Broker into the CAF config file" + echo " * setListenerConfigured Indicates that the Listener is configured" + echo " * setListenerStartupType startupType Sets the startup type used by the Listener (Manual, Automatic)" + echo "" + echo " * getAmqpQueueName Gets the AMQP Queue Name" + echo "" + echo " * checkTunnel Checks the AMQP Tunnel " + echo " * checkCerts Checks the certificates" + echo " * prtCerts Prints the certificates" + echo " * checkVmwTools Checks VMware Tools" + echo "" + echo " * validateXml Validates the XML files against the published schema" + echo " * validateInstall Validates that the files are in the right locations and have the right permissions" + echo " * validateOVTInstall Validates that the files are in the right locations for OVT and have the right permissions" + echo "" + echo " * clearCaches Clears the CAF caches" +} + +function validateXml() { + local schemaArea="$1" + local schemaPrefix="$2" + validateNotEmpty "$schemaArea" "schemaArea" + validateNotEmpty "$schemaPrefix" "schemaPrefix" + + local schemaRoot="$CAF_INPUT_DIR/schemas/caf" + + for file in $(find "$CAF_OUTPUT_DIR" -name '*.xml' -print0 2>/dev/null | xargs -0 egrep -IH -lw "${schemaPrefix}.xsd"); do + prtHeader "Validating $schemaArea/$schemaPrefix - $file" + xmllint --schema "${schemaRoot}/${schemaArea}/${schemaPrefix}.xsd" "$file"; rc=$? + if [ "$rc" != "0" ]; then + exit $rc + fi + done +} + +function checkCerts() { + local localDir="$CAF_INPUT_DIR/persistence/local" + local cacertFile="$CAF_INPUT_DIR/persistence/protocol/amqpBroker_default/tlsCertCollection/tlsCert0.pem" + + prtHeader "Checking private key - $localDir/privateKey.pem" + openssl rsa -in "$localDir/privateKey.pem" -check -noout + + prtHeader "Checking cert - $localDir/cert.pem" + openssl verify -check_ss_sig -x509_strict -CAfile "$cacertFile" "$localDir/cert.pem" + + prtHeader "Validating that private key and cert match - $localDir/cert.pem" + local clientCertMd5=$(openssl x509 -noout -modulus -in "$localDir/cert.pem" | openssl md5 | cut -d' ' -f2) + local clientKeyMd5=$(openssl rsa -noout -modulus -in "$localDir/privateKey.pem" | openssl md5 | cut -d' ' -f2) + if [ "$clientCertMd5" == "$clientKeyMd5" ]; then + echo "Public and Private Key md5's match" + else + echo "*** Public and Private Key md5's do not match" + exit 1 + fi +} + +function prtCerts() { + local localDir="$CAF_INPUT_DIR/persistence/local" + local cacertFile="$CAF_INPUT_DIR/persistence/protocol/amqpBroker_default/tlsCertCollection/tlsCert0.pem" + + prtHeader "Printing - $cacertFile" + openssl x509 -in "$cacertFile" -text -noout + + prtHeader "Printing - $localDir/cert.pem" + openssl x509 -in "$localDir/cert.pem" -text -noout +} + +function checkTunnel() { + local localDir="$CAF_INPUT_DIR/persistence/local" + local cacertFile="$CAF_INPUT_DIR/persistence/protocol/amqpBroker_default/tlsCertCollection/tlsCert0.pem" + + prtHeader "Connecting to tunnel" + openssl s_client -connect localhost:6672 -key "$localDir/privateKey.pem" -cert "$localDir/cert.pem" -CAfile "$cacertFile" -verify 10 +} + +function checkVmwTools() { + local isToolboxCmd=$(which vmware-toolbox-cmd 2>/dev/null) + if [ "$isToolboxCmd" != "" ]; then + vmware-toolbox-cmd --version + else + echo "It doesn't appear as though VMware Tools is installed" + fi + + local isSystemctl=$(which systemctl 2>/dev/null) + if [ "$isSystemctl" != "" ]; then + systemctl status vmware-tools.service + fi +} + +function validateInstall() { + checkFsPermsAll + checkFileExistsBin + checkFileExistsLib + checkFileExistsConfig + checkFileExistsScripts + checkFileExistsInstall + checkFileExistsInvokers + checkFileExistsProviderReg +} + +function checkFsPermsAll() { + checkFsPerms "$CAF_INPUT_DIR" "755" + checkFsPerms "$CAF_OUTPUT_DIR" "755" + checkFsPerms "$CAF_LOG_DIR" "755" + checkFsPerms "$CAF_BIN_DIR" "755" + checkFsPerms "$CAF_LIB_DIR" "755" +} + +function checkFileExistsBin() { + checkFileExists "$CAF_BIN_DIR/CommAmqpListener" + checkFileExists "$CAF_BIN_DIR/ConfigProvider" + checkFileExists "$CAF_BIN_DIR/InstallProvider" + checkFileExists "$CAF_BIN_DIR/ManagementAgentHost" + checkFileExists "$CAF_BIN_DIR/RemoteCommandProvider" + checkFileExists "$CAF_BIN_DIR/TestInfraProvider" + checkFileExists "$CAF_BIN_DIR/VGAuthService" + checkFileExists "$CAF_BIN_DIR/vmware-vgauth-cmd" +} + +function checkFileExistsLib() { + checkFileExists "$CAF_LIB_DIR/libCafIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libCommAmqpIntegration.so" + checkFileExists "$CAF_LIB_DIR/libCommAmqpIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libCommIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libFramework.so" + checkFileExists "$CAF_LIB_DIR/libIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libMaIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libProviderFx.so" + checkFileExists "$CAF_LIB_DIR/libVgAuthIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libcom_err.so.3" + checkFileExists "$CAF_LIB_DIR/libcrypto.so.1.0.2" + checkFileExists "$CAF_LIB_DIR/libgcc_s.so.1" + checkFileExists "$CAF_LIB_DIR/libglib-2.0.so.0.4800.1" + checkFileExists "$CAF_LIB_DIR/libgthread-2.0.so.0.4800.1" + checkFileExists "$CAF_LIB_DIR/liblog4cpp.so.5.0.6" + checkFileExists "$CAF_LIB_DIR/librabbitmq.so.4.2.1" + checkFileExists "$CAF_LIB_DIR/libssl.so.1.0.2" + checkFileExists "$CAF_LIB_DIR/libstdc++.so.6.0.13" + checkFileExists "$CAF_LIB_DIR/libvgauth.so" + checkFileExists "$CAF_LIB_DIR/libxerces-c-3.1.so" + checkFileExists "$CAF_LIB_DIR/libxml-security-c.so.16" + checkFileExists "$CAF_LIB_DIR/libpcre.so.1.2.6" + checkFileExists "$CAF_LIB_DIR/libiconv.so.2.5.1" + checkFileExists "$CAF_LIB_DIR/libz.so.1.2.8" + checkFileExists "$CAF_LIB_DIR/libffi.so.6.0.4" +} + +function checkFileExistsConfig() { + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-appconfig" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-context-amqp.xml" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-context-common.xml" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-context-tunnel.xml" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-log4cpp_config" + checkFileExists "$CAF_CONFIG_DIR/IntBeanConfigFile.xml" + checkFileExists "$CAF_CONFIG_DIR/cafenv-appconfig" + checkFileExists "$CAF_CONFIG_DIR/ma-appconfig" + checkFileExists "$CAF_CONFIG_DIR/ma-context.xml" + checkFileExists "$CAF_CONFIG_DIR/ma-log4cpp_config" + checkFileExists "$CAF_CONFIG_DIR/providerFx-appconfig" + checkFileExists "$CAF_CONFIG_DIR/providerFx-log4cpp_config" +} + +function checkFileExistsScripts() { + checkFileExists "$CAF_CONFIG_DIR/../scripts/caf-common" + checkFileExists "$CAF_CONFIG_DIR/../scripts/caf-processes.sh" + checkFileExists "$CAF_CONFIG_DIR/../scripts/setUpVgAuth" + checkFileExists "$CAF_CONFIG_DIR/../scripts/start-VGAuthService" + checkFileExists "$CAF_CONFIG_DIR/../scripts/start-listener" + checkFileExists "$CAF_CONFIG_DIR/../scripts/start-ma" + checkFileExists "$CAF_CONFIG_DIR/../scripts/startTestProc" + checkFileExists "$CAF_CONFIG_DIR/../scripts/stop-VGAuthService" + checkFileExists "$CAF_CONFIG_DIR/../scripts/stop-listener" + checkFileExists "$CAF_CONFIG_DIR/../scripts/stop-ma" + checkFileExists "$CAF_CONFIG_DIR/../scripts/tearDownVgAuth" + checkFileExists "$CAF_CONFIG_DIR/../scripts/vgAuth" +} +function checkFileExistsInstall() { + checkFileExists "$CAF_CONFIG_DIR/../install/caf-c-communication-service" + checkFileExists "$CAF_CONFIG_DIR/../install/caf-c-management-agent" + checkFileExists "$CAF_CONFIG_DIR/../install/caf-dbg.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/caf-vgauth" + checkFileExists "$CAF_CONFIG_DIR/../install/commonenv.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/install.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/postinstallInstall.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/postinstallUpgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/preinstallUpgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/preremoveUninstall.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/preuninstall.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/preupgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/restartServices.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/stopAndRemoveServices.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/upgrade.sh" +} + +function checkFileExistsInvokers() { + checkFileExists "$CAF_INVOKERS_DIR/cafTestInfra_CafTestInfraProvider_1_0_0.sh" + checkFileExists "$CAF_INVOKERS_DIR/caf_ConfigProvider_1_0_0.sh" + checkFileExists "$CAF_INVOKERS_DIR/caf_InstallProvider_1_0_0.sh" + checkFileExists "$CAF_INVOKERS_DIR/caf_RemoteCommandProvider_1_0_0.sh" +} + +function checkFileExistsProviderReg() { + checkFileExists "$CAF_INPUT_DIR/providerReg/cafTestInfra_CafTestInfraProvider_1_0_0.xml" + checkFileExists "$CAF_INPUT_DIR/providerReg/caf_ConfigProvider_1_0_0.xml" + checkFileExists "$CAF_INPUT_DIR/providerReg/caf_InstallProvider_1_0_0.xml" + checkFileExists "$CAF_INPUT_DIR/providerReg/caf_RemoteCommandProvider_1_0_0.xml" +} + +function checkFileExists() { + local path="$1" + validateNotEmpty "$path" "path" + + if [ ! -f "$path" ]; then + echo "*** File existence check failed - expected: $path" + exit 1 + fi +} + +function checkFsPerms() { + local dirOrFile="$1" + local permExp="$2" + local userExp="$3" + local groupExp="$4" + validateNotEmpty "$dirOrFile" "dirOrFile" + validateNotEmpty "$permExp" "permExp" + + if [ "$userExp" = "" ]; then + userExp="root" + fi + if [ "$groupExp" = "" ]; then + groupExp="root" + fi + + local statInfo=( $(stat -c "%a %U %G" $dirOrFile) ) + local permFnd=${statInfo[0]} + local userFnd=${statInfo[1]} + local groupFnd=${statInfo[2]} + + if [ "$permExp" != "$permFnd" ]; then + echo "*** Perm check failed - expected: $permExp, found: $permFnd, dir/file: $dirOrFile" + exit 1 + fi + + if [ "$userExp" != "$userFnd" ]; then + echo "*** User check failed - expected: $userExp, found: $userFnd, dir/file: $dirOrFile" + exit 1 + fi + + if [ "$groupExp" != "$groupFnd" ]; then + echo "*** Group check failed - expected: $groupExp, found: $groupFnd, dir/file: $dirOrFile" + exit 1 + fi +} + +function clearCaches() { + validateNotEmpty "$CAF_OUTPUT_DIR" "CAF_OUTPUT_DIR" + validateNotEmpty "$CAF_LOG_DIR" "CAF_LOG_DIR" + + prtHeader "Clearing the CAF caches" + rm -rf \ + $CAF_OUTPUT_DIR/schemaCache/* \ + $CAF_OUTPUT_DIR/comm-wrk/* \ + $CAF_OUTPUT_DIR/providerHost/* \ + $CAF_OUTPUT_DIR/responses/* \ + $CAF_OUTPUT_DIR/requests/* \ + $CAF_OUTPUT_DIR/split-requests/* \ + $CAF_OUTPUT_DIR/request_state/* \ + $CAF_OUTPUT_DIR/events/* \ + $CAF_OUTPUT_DIR/tmp/* \ + $CAF_OUTPUT_DIR/att/* \ + $CAF_OUTPUT_DIR/cache/* \ + $CAF_LOG_DIR/* \ + $CAF_BIN_DIR/*.log +} + +function validateInstall() { +# checkFsPermsAll + checkFileExistsBin + checkFileExistsLib "$1" + checkFileExistsConfig + checkFileExistsScripts + checkFileExistsInstall + checkFileExistsInvokers + checkFileExistsProviderReg +} + +function checkFsPermsAll() { + checkFsPerms "$CAF_INPUT_DIR" "755" + checkFsPerms "$CAF_OUTPUT_DIR" "755" + checkFsPerms "$CAF_CONFIG_DIR" "755" + checkFsPerms "$CAF_LOG_DIR" "755" + checkFsPerms "$CAF_BIN_DIR" "755" + checkFsPerms "$CAF_LIB_DIR" "755" +} + +function checkFileExistsBin() { + checkFileExists "$CAF_BIN_DIR/InstallProvider" + checkFileExists "$CAF_BIN_DIR/TestInfraProvider" + checkFileExists "$CAF_BIN_DIR/RemoteCommandProvider" + checkFileExists "$CAF_BIN_DIR/ConfigProvider" + checkFileExists "$CAF_BIN_DIR/CommAmqpListener" + checkFileExists "$CAF_BIN_DIR/ManagementAgentHost" +} + +function checkFileExistsLib() { + checkFileExists "$CAF_LIB_DIR/libProviderFx.so" + checkFileExists "$CAF_LIB_DIR/libMaIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libCommAmqpIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libCommAmqpIntegration.so" + checkFileExists "$CAF_LIB_DIR/libFramework.so" + checkFileExists "$CAF_LIB_DIR/libCafIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libVgAuthIntegrationSubsys.so" + checkFileExists "$CAF_LIB_DIR/libCommIntegrationSubsys.so" + + local OVT=$1 + if [ "$OVT" != "true" ]; then + checkFileExists "$CAF_LIB_DIR/libCommAmqpListener.so" + checkFileExists "$CAF_LIB_DIR/libManagementAgentHost.so" + checkFileExists "$CAF_LIB_DIR/liblog4cpp.so.5.0.6" + checkFileExists "$CAF_LIB_DIR/librabbitmq.so.4.2.1" + checkFileExists "$CAF_LIB_DIR/libgthread-2.0.so.0.4800.1" + checkFileExists "$CAF_LIB_DIR/libglib-2.0.so.0.4800.1" + fi +} + +function checkFileExistsConfig() { + checkFileExists "$CAF_CONFIG_DIR/ma-log4cpp_config" + checkFileExists "$CAF_CONFIG_DIR/ma-context.xml" + checkFileExists "$CAF_CONFIG_DIR/IntBeanConfigFile.xml" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-context-amqp.xml" + checkFileExists "$CAF_CONFIG_DIR/ma-appconfig" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-context-tunnel.xml" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-context-common.xml" + checkFileExists "$CAF_CONFIG_DIR/providerFx-appconfig" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-log4cpp_config" + checkFileExists "$CAF_CONFIG_DIR/CommAmqpListener-appconfig" + checkFileExists "$CAF_CONFIG_DIR/providerFx-log4cpp_config" + checkFileExists "$CAF_CONFIG_DIR/cafenv-appconfig" +} + +function checkFileExistsScripts() { + checkFileExists "$CAF_CONFIG_DIR/../scripts/startTestProc" + checkFileExists "$CAF_CONFIG_DIR/../scripts/caf-processes.sh" + checkFileExists "$CAF_CONFIG_DIR/../scripts/stop-ma" + checkFileExists "$CAF_CONFIG_DIR/../scripts/vgAuth" + checkFileExists "$CAF_CONFIG_DIR/../scripts/start-listener" + checkFileExists "$CAF_CONFIG_DIR/../scripts/stop-VGAuthService" + checkFileExists "$CAF_CONFIG_DIR/../scripts/start-ma" + checkFileExists "$CAF_CONFIG_DIR/../scripts/setUpVgAuth" + checkFileExists "$CAF_CONFIG_DIR/../scripts/start-VGAuthService" + checkFileExists "$CAF_CONFIG_DIR/../scripts/tearDownVgAuth" + checkFileExists "$CAF_CONFIG_DIR/../scripts/stop-listener" + checkFileExists "$CAF_CONFIG_DIR/../scripts/caf-common" +} + +function checkFileExistsInstall() { + checkFileExists "$CAF_CONFIG_DIR/../install/caf-dbg.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/stopAndRemoveServices.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/preuninstall.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/postinstallUpgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/install.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/preremoveUninstall.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/preupgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/restartServices.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/caf-vgauth" + checkFileExists "$CAF_CONFIG_DIR/../install/preinstallUpgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/caf-c-management-agent" + checkFileExists "$CAF_CONFIG_DIR/../install/upgrade.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/commonenv.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/postinstallInstall.sh" + checkFileExists "$CAF_CONFIG_DIR/../install/caf-c-communication-service" +} + +function checkFileExistsInvokers() { + checkFileExists "$CAF_INVOKERS_DIR/caf_RemoteCommandProvider_1_0_0.sh" + checkFileExists "$CAF_INVOKERS_DIR/caf_InstallProvider_1_0_0.sh" + checkFileExists "$CAF_INVOKERS_DIR/caf_ConfigProvider_1_0_0.sh" + checkFileExists "$CAF_INVOKERS_DIR/cafTestInfra_CafTestInfraProvider_1_0_0.sh" +} + +function checkFileExistsProviderReg() { + checkFileExists "$CAF_INPUT_DIR/providerReg/caf_RemoteCommandProvider_1_0_0.xml" + checkFileExists "$CAF_INPUT_DIR/providerReg/cafTestInfra_CafTestInfraProvider_1_0_0.xml" + checkFileExists "$CAF_INPUT_DIR/providerReg/caf_ConfigProvider_1_0_0.xml" + checkFileExists "$CAF_INPUT_DIR/providerReg/caf_InstallProvider_1_0_0.xml" +} + +function checkFileExists() { + local path="$1" + validateNotEmpty "$path" "path" + + if [ ! -f "$path" ]; then + echo "*** File existence check failed - expected: $path" + exit 1 + fi +} + +function getAmqpQueueName() { + grep "^reactive_request_amqp_queue_id" "$CAF_CONFIG_DIR/persistence-appconfig" | cut -d'=' -f2 +} + +if [ $# -lt 1 -o "$1" = "--help" ]; then + prtHelp + exit 1 +fi + +cmd=$1 +shift + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts +configDir=$installDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +case "$cmd" in + "validateXml") + validateXml "fx" "CafInstallRequest" + validateXml "fx" "DiagRequest" + validateXml "fx" "Message" + validateXml "fx" "MgmtRequest" + validateXml "fx" "MultiPmeMgmtRequest" + validateXml "fx" "ProviderInfra" + validateXml "fx" "ProviderRequest" + validateXml "fx" "Response" + validateXml "cmdl" "ProviderResults" + ;; + "checkCerts") + checkCerts "$certDir" + ;; + "prtCerts") + prtCerts "$certDir" + ;; + "checkTunnel") + checkTunnel "$certDir" + ;; + "checkVmwTools") + checkVmwTools + ;; + "getAmqpQueueName") + getAmqpQueueName + ;; + "clearCaches") + clearCaches + ;; + "configAmqp") + configAmqp "$1" "$2" "$3" + ;; + "enableCaf") + enableCaf "$1" "$2" + ;; + "setBroker") + setBroker "$1" + ;; + "setListenerConfigured") + setListenerConfigured + ;; + "setListenerStartupType") + setListenerStartupType "$1" + ;; + "validateInstall") + validateInstall + ;; + "validateOVTInstall") + validateInstall "true" + ;; + *) + echo "Bad command - $cmd" + prtHelp + exit 1 +esac diff --git a/open-vm-tools/common-agent/etc/install/caf-vgauth b/open-vm-tools/common-agent/etc/install/caf-vgauth new file mode 100644 index 000000000..988a83730 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/caf-vgauth @@ -0,0 +1,81 @@ +#!/bin/bash +# +# Init file for the VMware CAF VgAuth Service +# +# chkconfig: 35 95 20 +# description: VMware Common Agent Framework VgAuth daemon +# +# processname: VGAuthService + +if [ -f /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +elif [ -f /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions + type success >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + success() { + echo -en "$@" + echo -e "$rc_done" + } + failure() { + echo -en "$@" + echo -e "$rc_failed" + } + fi +fi + +progName="VMware CAF VgAuth" +listenerName=VGAuthService +prog="@binDir@/$listenerName" +startScript="@scriptDir@/start-VGAuthService" +stopScript="@scriptDir@/stop-VGAuthService" +lockFile=/var/lock/subsys/caf-vgauth-service + +start() +{ + [ -x $startScript ] || exit 0 + echo -n $"Starting $progName:" + msg="$progBase daemon startup" + "$startScript" && success "$msg" || failure "$msg" + rc=$? + [ $rc -eq 0 ] && touch $lockFile + echo + return $rc +} + +stop() +{ + echo -n $"Stoppping $progName:" + killproc $prog -TERM + rc=$? + [ -x $stopScript ] && $stopScript && + [ $rc -ne 0 ] && [ -z "`pidof -x $prog`" ] && rc=0 + [ $rc -eq 0 ] && rm -f $lockFile + echo + return $rc +} + +restart() +{ + stop + sleep 2 + start +} + +condrestart() +{ + [ -e $lockFile ] && restart || : +} + +case "$1" in + start) start ;; + stop) stop ;; + status) status $prog ;; + restart) restart ;; + condrestart) condrestart ;; + *) + echo $"Usage: $0 {start|stop|status|condrestart|restart}" + exit 1 +esac + +exit $? diff --git a/open-vm-tools/common-agent/etc/install/commonenv.sh b/open-vm-tools/common-agent/etc/install/commonenv.sh new file mode 100644 index 000000000..5e31b5de9 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/commonenv.sh @@ -0,0 +1 @@ +cafServices="caf-c-communication-service caf-c-management-agent" diff --git a/open-vm-tools/common-agent/etc/install/install.sh b/open-vm-tools/common-agent/etc/install/install.sh new file mode 100644 index 000000000..e24c701ba --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/install.sh @@ -0,0 +1,199 @@ +#!/bin/sh + +#Args +#brokerAddr +# - default: +#baseLibDir +# - default: /usr/lib +# - expand to "$baseLibDir"/vmware-caf/pme +# +#baseInputDir +# - default: /var/lib +# - expand to "$baseInputDir"/vmware-caf/pme/data/input +# +#baseOutputDir +# - default: /var/lib +# - expand to "$baseOutputDir"/vmware-caf/pme/data/output + +#Standard env +SCRIPT=`basename "$0"` + +#Set defaults +baseLibDir='/usr/lib' +baseBinDir='/usr/lib' +baseInputDir='/var/lib' +baseOutputDir='/var/lib' +brokerAddr='#brokerAddr#' +linkSo='yes' +toolsLibDir='/usr/lib/vmware-tools/lib' # lib is symlink to either lib64 or lib32 + +#Help function +HELP() { + echo -e \\n"Help documentation for ${SCRIPT}."\\n + echo -e "Basic usage: $SCRIPT"\\n + echo "Command line switches are optional. The following switches are recognized." + echo "b --Sets the value for the broker address. Default is '$brokerAddr'." + echo "i --Sets the base location for the input data. Default is '$baseInputDir'." + echo "l --Sets the base location for the libraries. Default is '$baseLibDir'." + echo "B --Sets the location for the binaries. Default is '$baseLibDir'/bin or 'bin' in base location of libraries." + echo "o --Sets the base location for the output data. Default is '$baseOutputDir'." + echo "L --Do not create symlinks for libraries." + echo "t --Sets the location for the tools lib dir. Default is '$toolsLibDir'." + echo -e "h --Displays this help message. No further functions are performed."\\n + echo -e "Example: $SCRIPT -b 10.25.91.81 -i \"/usr/lib\" -i \"/var/lib\" -o \"/var/lib\""\\n + exit 1 +} + +#Replace tokens with install values +setupCafConfig() { + local pattern="$1" + local value="$2" + local rconfigDir="$3" + + if [ ! -n "$pattern" ]; then + echo 'The pattern cannot be empty!' + exit 1 + fi + if [ -n "$value" ]; then + if [ ! -f "$rconfigDir/cafenv-appconfig" ]; then + echo "The config file must exist! - $rconfigDir/cafenv-appconfig" + exit 1 + fi + + sed -i "s?$pattern?$value?g" "$rconfigDir/cafenv-appconfig" + fi +} + +##BEGIN Main + +#Get Optional overrides +while getopts ":b:i:l:B:o:t:hL" opt; do + case $opt in + b) + brokerAddr="$OPTARG" + ;; + i) + baseInputDir="$OPTARG" + ;; + l) + baseLibDir="$OPTARG" + ;; + B) + baseBinDir="$OPTARG" + ;; + o) + baseOutputDir="$OPTARG" + ;; + t) + toolsLibDir="$OPTARG" + ;; + L) + linkSo='no' + ;; + h) + HELP + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + HELP + ;; + esac +done + +stdQuals="vmware-caf/pme" + +libDir="${D}/$baseLibDir/$stdQuals/lib" +binDir="${D}/$baseBinDir/$stdQuals/bin" +inputDir="${D}/$baseInputDir/$stdQuals/data/input" +outputDir="${D}/$baseOutputDir/$stdQuals/data/output" + +providersDir="$inputDir/providers" +invokersDir="$inputDir/invokers" +amqpBrokerDir="$inputDir/persistence/protocol/amqpBroker_default" + +logDir="${D}/var/log/$stdQuals" + +baseEtcDir="${D}/etc/$stdQuals" +configDir="$baseEtcDir/config" +installDir="$baseEtcDir/install" +scriptDir="$baseEtcDir/scripts" + +mkdir -p "$amqpBrokerDir" +echo -n "amqp:#amqpUsername#:#amqpPassword#@${brokerAddr}:5672/reactiveRequestAmqpQueueId" > "$amqpBrokerDir/uri_amqp.txt" +echo -n "tunnel:agentId1:bogus@localhost:6672/reactiveRequestAmqpQueueId" > "$amqpBrokerDir/uri_tunnel.txt" + +#Substitute values into config files +setupCafConfig '@installDir@' "$installDir" "$configDir" +setupCafConfig '@libDir@' "$libDir" "$configDir" +setupCafConfig '@binDir@' "$binDir" "$configDir" +setupCafConfig '@configDir@' "$configDir" "$configDir" +setupCafConfig '@inputDir@' "$inputDir" "$configDir" +setupCafConfig '@outputDir@' "$outputDir" "$configDir" +setupCafConfig '@providersDir@' "$providersDir" "$configDir" +setupCafConfig '@invokersDir@' "$invokersDir" "$configDir" +setupCafConfig '@logDir@' "$logDir" "$configDir" +setupCafConfig '@toolsLibDir@' "$toolsLibDir" "$configDir" + +#Set default permissions +if [ -d "$libDir" ]; then + for directory in $(find "$libDir" -type d); do + chmod 755 "$directory" + done + + for file in $(find "$libDir" -type f); do + chmod 555 "$file" + done +fi + +if [ -d "$inputDir" ]; then + for file in $(find "$inputDir" -type f); do + chmod 644 "$file" + done + + if [ -d "$persistenceDir" ]; then + for file in $(find "$persistenceDir" -type f); do + chmod 440 "$file" + done + fi + + if [ -d "$invokersDir" ]; then + for file in $(find "$invokersDir" -type f); do + chmod 555 "$file" + done + fi +fi + +if [ -d "$scriptDir" ]; then + chmod 555 "$scriptDir"/* +fi + +#Set up links +if [ "$linkSo" != "no" ] ; then + cd "$libDir" + ln -sf libglib-2.0.so.0.4800.1 libglib-2.0.so + ln -sf libglib-2.0.so.0.4800.1 libglib-2.0.so.0 + ln -sf libgthread-2.0.so.0.4800.1 libgthread-2.0.so + ln -sf libgthread-2.0.so.0.4800.1 libgthread-2.0.so.0 + ln -sf liblog4cpp.so.5.0.6 liblog4cpp.so + ln -sf liblog4cpp.so.5.0.6 liblog4cpp.so.5 + ln -sf librabbitmq.so.4.2.1 librabbitmq.so + ln -sf librabbitmq.so.4.2.1 librabbitmq.so.4 + ln -sf libpcre.so.1.2.6 libpcre.so + ln -sf libpcre.so.1.2.6 libpcre.so.1 + ln -sf libiconv.so.2.5.1 libiconv.so + ln -sf libiconv.so.2.5.1 libiconv.so.2 + ln -sf libz.so.1.2.8 libz.so + ln -sf libz.so.1.2.8 libz.so.1 + ln -sf libffi.so.6.0.4 libffi.so + ln -sf libffi.so.6.0.4 libffi.so.6 +fi + +#Run provider install logic +installPProviders="$installDir/installPythonProviders.sh" +if [ -e "$installPProviders" ]; then + "$installPProviders" +fi + +#if previous CAF installation + #migrate config + #migrate other state diff --git a/open-vm-tools/common-agent/etc/install/postinstallInstall.sh b/open-vm-tools/common-agent/etc/install/postinstallInstall.sh new file mode 100644 index 000000000..974c5de28 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/postinstallInstall.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts + +$installDir/install.sh -l /usr/lib -i /var/lib -o /var/lib +$scriptsDir/start-ma diff --git a/open-vm-tools/common-agent/etc/install/postinstallUpgrade.sh b/open-vm-tools/common-agent/etc/install/postinstallUpgrade.sh new file mode 100644 index 000000000..42a3aa8a4 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/postinstallUpgrade.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts + +$installDir/upgrade.sh +$scriptsDir/start-ma diff --git a/open-vm-tools/common-agent/etc/install/preinstallUpgrade.sh b/open-vm-tools/common-agent/etc/install/preinstallUpgrade.sh new file mode 100644 index 000000000..87076a6b2 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/preinstallUpgrade.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts + +#Shutdown any configured services +$scriptsDir/stop-ma +$scriptsDir/stop-listener +$installDir/preupgrade.sh diff --git a/open-vm-tools/common-agent/etc/install/preremoveUninstall.sh b/open-vm-tools/common-agent/etc/install/preremoveUninstall.sh new file mode 100644 index 000000000..9eb5eb03b --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/preremoveUninstall.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts + +$scriptsDir/stop-ma +$scriptsDir/stop-listener diff --git a/open-vm-tools/common-agent/etc/install/preuninstall.sh b/open-vm-tools/common-agent/etc/install/preuninstall.sh new file mode 100644 index 000000000..bfe88c3c2 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/preuninstall.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +#Get info on how the installation was configured +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts +configDir=$installDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +#Set a safety check string +VALIDATE_STRING='vmware-caf' + +safe_rm() { + #Only remove directory paths that contain the validate string + if test "${1#*$VALIDATE_STRING}" != "$1"; then + rm -rf "$1" + fi +} + +#The default of this should be /usr/lib/vmware-caf +#base_binary_dir=$(dirname $(dirname $CAF_BIN_DIR)) +#safe_rm "$base_binary_dir" + +#The default of this should be /var/lib/vmware-caf +#base_data_dir=$(dirname $(dirname $(dirname $CAF_INPUT_DIR))) +#safe_rm "$base_data_dir" + +#The default of this should be /var/log/vmware-caf +base_log_dir=$(dirname $CAF_LOG_DIR) +safe_rm "$base_log_dir" + +#07/21/2015 +#Remove some log files that get put into the CAF bin dir. +#This is a hack until we fix the code to prevent this from happening. +base_binary_dir="$CAF_BIN_DIR" +safe_rm "$base_binary_dir/CommAmqpListener-log4cpp.log" +safe_rm "$base_binary_dir/CommAmqpListener-log4cpp_rolling.log" +safe_rm "$base_binary_dir/ma-log4cpp.log" +safe_rm "$base_binary_dir/ma-log4cpp_rolling.log" diff --git a/open-vm-tools/common-agent/etc/install/preupgrade.sh b/open-vm-tools/common-agent/etc/install/preupgrade.sh new file mode 100644 index 000000000..c276af785 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/preupgrade.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +installDir=$(dirname $(readlink -f $0)) +configDir=$installDir/../config + +#Preserve config +mkdir -p "$configDir"/_previous_ +cp -pf "$configDir"/cafenv-appconfig "$configDir"/_previous_/ 2>/dev/null + +#Temporary until we remove amqp_username/password +cp -pf "$configDir"/CommAmqpListener-appconfig "$configDir"/_previous_/ 2>/dev/null diff --git a/open-vm-tools/common-agent/etc/install/restartServices.sh b/open-vm-tools/common-agent/etc/install/restartServices.sh new file mode 100644 index 000000000..f7b78acae --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/restartServices.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) + +. "$dir"/commonenv.sh + +#Stop configured services +for cafService in $cafServices; do + /sbin/chkconfig $cafService + if [ $? -eq 0 ]; then + /sbin/service $cafService restart + fi +done diff --git a/open-vm-tools/common-agent/etc/install/stopAndRemoveServices.sh b/open-vm-tools/common-agent/etc/install/stopAndRemoveServices.sh new file mode 100644 index 000000000..1c3dbfb85 --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/stopAndRemoveServices.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) + +. "$dir"/commonenv.sh + +#Stop configured services +for cafService in $cafServices; do + /sbin/chkconfig $cafService + if [ $? -eq 0 ]; then + /sbin/service $cafService stop + chkconfig --del $cafService + fi +done diff --git a/open-vm-tools/common-agent/etc/install/upgrade.sh b/open-vm-tools/common-agent/etc/install/upgrade.sh new file mode 100644 index 000000000..d22783abe --- /dev/null +++ b/open-vm-tools/common-agent/etc/install/upgrade.sh @@ -0,0 +1,102 @@ +#!/bin/sh + +#Standard env +SCRIPT=`basename "$0"` + +installDir=$(dirname $(readlink -f $0)) +scriptsDir=$installDir/../scripts +configDir=$installDir/../config +toolsLibDir='/usr/lib/vmware-tools/lib' # lib is symlink to either lib64 or lib32 + + +#Help function +HELP() { + echo -e \\n"Help documentation for ${SCRIPT}."\\n + echo -e "Basic usage: $SCRIPT"\\n + echo "Command line switches are optional. The following switches are recognized." + echo "t --Sets the location for the tools lib dir. Default is '$toolsLibDir'." + echo -e "h --Displays this help message. No further functions are performed."\\n + echo -e "Example: $SCRIPT -t \"/usr/lib/vmware-tools/lib\""\\n + exit 1 +} + + +##BEGIN Main + +#Get Optional overrides +while getopts ":t:h" opt; do + case $opt in + t) + toolsLibDir="$OPTARG" + ;; + h) + HELP + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + HELP + ;; + esac +done + + +prevCafenvConfig="$configDir/_previous_/cafenv.config" +if [ -f "$prevCafenvConfig" ]; then + echo "Upgrading from a really old version of CAF - $prevCafenvConfig" + . $prevCafenvConfig + + inputDir=$(echo "$CAF_INPUT_DIR" | sed 's:/vmware-caf/pme/data/input::') + outputDir=$(echo "$CAF_OUTPUT_DIR" | sed 's:/vmware-caf/pme/data/output::') + libDir=$(echo "$CAF_LIB_DIR" | sed 's:/vmware-caf/pme/lib::') + binDir=$(echo "$CAF_BIN_DIR" | sed 's:/vmware-caf/pme/bin::') + if [ -n "$CAF_TOOLS_LIB_DIR" ]; then + toolsLibDir="$CAF_TOOLS_LIB_DIR" + fi + $installDir/install.sh -L -b "$CAF_BROKER_ADDRESS" -i "$inputDir" \ + -o "$outputDir" -l "$libDir" -B "$binDir" -t "$toolsLibDir" + + rm -f "$prevCafenvConfig" +else + prevCafenvAppconfig="$configDir/_previous_/cafenv-appconfig" + if [ ! -f "$prevCafenvAppconfig" ]; then + echo "The backup file must exist! - $prevCafenvAppconfig" + exit 1 + fi + mv -f "$prevCafenvAppconfig" "$configDir" +fi + +#Remove the backup directory +rm -rf "$configDir"/_previous_ + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +# Make newer systemd systems (OpenSuSE 13.2) happy +#if [ -x /usr/bin/systemctl ]; then +# /usr/bin/systemctl daemon-reload +#fi + +#"$dir"/restartServices.sh + +if [ ! -d $CAF_LIB_DIR ]; then + echo "CAF_LIB_DIR not found - $CAF_LIB_DIR" + exit 1 +fi + +cd $CAF_LIB_DIR +ln -sf libglib-2.0.so.0.4800.1 libglib-2.0.so +ln -sf libglib-2.0.so.0.4800.1 libglib-2.0.so.0 +ln -sf libgthread-2.0.so.0.4800.1 libgthread-2.0.so +ln -sf libgthread-2.0.so.0.4800.1 libgthread-2.0.so.0 +ln -sf liblog4cpp.so.5.0.6 liblog4cpp.so +ln -sf liblog4cpp.so.5.0.6 liblog4cpp.so.5 +ln -sf librabbitmq.so.4.2.1 librabbitmq.so +ln -sf librabbitmq.so.4.2.1 librabbitmq.so.4 +ln -sf libpcre.so.1.2.6 libpcre.so +ln -sf libpcre.so.1.2.6 libpcre.so.1 +ln -sf libiconv.so.2.5.1 libiconv.so +ln -sf libiconv.so.2.5.1 libiconv.so.2 +ln -sf libz.so.1.2.8 libz.so +ln -sf libz.so.1.2.8 libz.so.1 +ln -sf libffi.so.6.0.4 libffi.so +ln -sf libffi.so.6.0.4 libffi.so.6 diff --git a/open-vm-tools/common-agent/etc/scripts/Makefile.am b/open-vm-tools/common-agent/etc/scripts/Makefile.am new file mode 100644 index 000000000..3e66df3cc --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/Makefile.am @@ -0,0 +1,35 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir=/etc/vmware-caf/pme/scripts + +conf_SCRIPTS = \ + caf-common \ + caf-processes.sh \ + is-listener-running \ + is-ma-running \ + setUpVgAuth \ + start-listener \ + start-ma \ + startTestProc \ + start-VGAuthService \ + stop-listener \ + stop-ma \ + stop-VGAuthService \ + tearDownVgAuth \ + vgAuth + diff --git a/open-vm-tools/common-agent/etc/scripts/caf-common b/open-vm-tools/common-agent/etc/scripts/caf-common new file mode 100644 index 000000000..2b18196d5 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/caf-common @@ -0,0 +1,194 @@ +#!/bin/sh + +sourceCafenv() { + local configDir=$1 + local cafenvAppconfig="$configDir/cafenv-appconfig" + + if [ ! -f "$cafenvAppconfig" ]; then + echo "*** cafenv-appconfig file not found - $cafenvAppconfig" + exit 1 + fi + + local tmpCafenv="/tmp/_cafenv-appconfig_" + cat "$cafenvAppconfig" | sed 's/^\[/#[/g' | sed 's/^\([a-z].*=\)/export CAF_\U\1/g' > "$tmpCafenv" + sed -i 's/[ ]*=[ ]*/=/g' "$tmpCafenv" + . "$tmpCafenv" + export LD_LIBRARY_PATH="$CAF_TOOLS_LIB_DIR/libvgauth.so/:$CAF_TOOLS_LIB_DIR/libcrypto.so.1.0.2/:$CAF_TOOLS_LIB_DIR/libssl.so.1.0.2/:$CAF_LIB_DIR" + export VMWARE_USE_SYSTEM_LIBS=1 +} + +getCurrentDir() { + return $(dirname $(readlink -f $0)) +} + +startCafProcess() { + local startType="$1" + local startDir="$2" + local processDir="$3" + local processName="$4" + + local processPath="$processDir/$processName" + verifyProcessNotRunning "$processPath" + setUtf8Locale + + mkdir -p "$startDir" + cd "$startDir" + + case "$startType" in + "daemon") + $processPath + ;; + "foreground") + $processPath -n + ;; + "valgrindMemChecks") + G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --track-origins=yes --leak-resolution=med --track-fds=yes --log-file=${processPath}-valgrind-memchecks.log $processPath -n + ;; + "valgrindProfiling") + valgrind --tool=callgrind --log-file=${processPath}-valgrind-profiling.log $processPath -n + ;; + "valgrindThreading") + valgrind --tool=helgrind --track-lockorders=no --log-file=${processPath}-valgrind-threading.log $processPath -n + ;; + *) + echo "Unknown startType - $startType"; exit 1 + ;; + esac +} + +startVgAuthProcess() { + local startType="$1" + local startDir="$2" + local processDir="$3" + local processName="$4" + + local processPath="$processDir/$processName" + verifyProcessNotRunning "$processPath" + setUtf8Locale + + mkdir -p "$startDir" + cd "$startDir" + + # Run the processes using -s rather than -d if you want the logging to go the file instead of the console + case "$startType" in + "daemon") + # This is supposed to start the service as a daemon, but it's failing... perhaps because the service + # hasn't been registered - see above. + #./$processName -b + + # -s tells it to log to a file, -d to the console + nohup $processPath -s > ${processPath}.out 2>&1 & + ;; + "foreground") + $processPath -d + ;; + "valgrindMemChecks") + G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --show-leak-kinds=all --num-callers=40 --log-file=${processPath}-valgrind.log $processPath -d + ;; + "valgrindProfiling") + valgrind --tool=callgrind $processPath -d + ;; + *) + echo "Unknown startType - $startType"; exit 1 + ;; + esac +} + +#The best locale is UTF8, and prefereably matches the +#desired language and region +getBestLocale() { + # Only find one best + if [ -z $best_locale ]; then + echo "Looking for best match for <$1>" + #If no language or region is defined, default to US English + if [ "$1" = "C" -o "$1" = "" -o "$1" = "POSIX" ]; then + echo "Generic starting point, defaulting" + getBestLocale "en_US" + return + fi + + available_utf8_locales=`locale -a | egrep -i '.utf8|.utf-8' | egrep -vi '^c.utf'` + for loc in $available_utf8_locales; do + best_locale=$loc + #echo "Trying $loc" + if test "${loc#*$1}" != "$loc"; then + echo "$loc is best match for $1" + return + fi + done + + if [ -z $best_locale ]; then + echo "No UTF8 locale found" + exit 1 + fi + + #If no match was found, use any valid UTF8 + echo "Found no best, using $best_locale" + fi +} + +#Set the locale to something UTF8 +setUtf8Locale() { + # Only change if the current locale is not UTF8 + locale_list=`locale | egrep -vi '.utf8|.utf-8|=$|LANGUAGE'` + if [ $? -eq 0 ]; then + echo "The locale is not UTF8, looking for a better one" + + #LC_ALL takes precedence + if [ ! -z $LC_ALL ]; then + echo "Initializing locale search with LC_ALL:$LC_ALL" + initial_local=$LC_ALL + else + echo "Initializing locale search with LANG:$LANG" + initial_local=$LANG + fi + + locale_prefix=`echo $initial_local | sed 's/\.[^.]*$//'` + getBestLocale $locale_prefix + + #For now, we'll just set LANG and LC_ALL, we may need to cycle + #through the entire locale_list in the future + export LANG=$best_locale + export LC_ALL=$best_locale + fi +} + +verifyProcessNotRunning() { + local processPath=$1 + + pid=$(ps aux | egrep "${processPath}" | egrep -v "color=auto|grep" | awk '{print $2}') + if [ ! -z "$pid" ]; then + echo "$processPath is already running - $pid"; exit 0 + fi +} + +stopProcess() { + local processDir=$1 + local processName=$2 + + local processPath="$processDir/$processName" + + pid=$(ps aux | egrep "${processPath}" | egrep -v "color=auto|grep" | awk '{print $2}') + if [ -z "$pid" ]; then + echo "$processPath not found" + else + echo "Stopping $processPath - $pid" + counter=0 + while [ ! -z "$pid" ]; do + if [ $counter -lt 20 ]; then + kill $pid + else + echo "Killing $processPath with prejudice- $pid" + kill -9 $pid + fi + counter=`expr $counter + 1`; + #echo "counter=$counter" + sleep 1 + pid=$(ps aux | egrep "${processPath}" | egrep -v "color=auto|grep" | awk '{print $2}') + done + fi +} + +enableCoreFiles() { + ulimit -c unlimited +} diff --git a/open-vm-tools/common-agent/etc/scripts/caf-processes.sh b/open-vm-tools/common-agent/etc/scripts/caf-processes.sh new file mode 100644 index 000000000..e390e6279 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/caf-processes.sh @@ -0,0 +1,191 @@ +#!/bin/bash + +function prtHeader() { + local header=$1 + + echo "*************************" + echo "***" + echo "*** $header" + echo "***" + echo "*************************" +} + +function prtHelp() { + echo "*** $0 cmd " + echo " Runs various CAF commands" + echo " cmd: The CAF command to run:" + echo " * listServices Lists the CAF Services" + echo " * startServices Starts the Services" + echo " * stopServices Stops the Services" + echo " * killServices Kills the Services" + echo "" + echo " * startListener Starts the Listener Service" + echo " * startListenerForeground Starts the Listener in the foreground" + echo " * startListenerValgrindMemChecks Starts the Listener with Valgrind Mem Checks" + echo " * stopListener Stops the Listener Service" + echo " * killListener Kills the Listener Service" + echo "" + echo " * startMa Starts the Management Agent Service" + echo " * startMaForeground Starts the Management Agent in the foreground" + echo " * startMaValgrindMemChecks Starts the Management Agent with Valgrind Mem Checks" + echo " * stopMa Stops the Management Agent Service" + echo " * killMa Kills the Management Agent Service" +} + +function startProcess() { + local process="$1" + local enableConsoleLogging="$2" + local cmd="$3" + + case "$process" in + "listener") + if [ -f "$scriptsDir/start-listener" ]; then + prtHeader "Starting Listener - $cmd" + if [ "$enableConsoleLogging" = "true" ]; then + enableConsoleLogging "CommAmqpListener" + else + disableConsoleLogging "CommAmqpListener" + fi + $scriptsDir/start-listener "$cmd" + fi + ;; + "ma") + if [ -f "$scriptsDir/start-ma" ]; then + prtHeader "Starting Management Agent - $cmd" + if [ "$enableConsoleLogging" = "true" ]; then + enableConsoleLogging "ma" + else + disableConsoleLogging "ma" + fi + $scriptsDir/start-ma "$cmd" + fi + ;; + *) + echo "Unknown process - $process" + prtHelp + exit 1 + esac + +} + +function stopListener() { + if [ -f "$scriptsDir/stop-listener" ]; then + $scriptsDir/stop-listener + fi +} + +function stopMa() { + if [ -f "$scriptsDir/stop-ma" ]; then + $scriptsDir/stop-ma + fi +} + +function killListener() { + pid=$(ps -eo pid,cmd | egrep "CommAmqpListener" | egrep -v "egrep" | awk '{print $1}') + if [ "$pid" != "" ]; then + echo "Killing Listener - $pid" + kill -9 $pid + fi +} + +function killMa() { + pid=$(ps -eo pid,cmd | egrep "ManagementAgentHost" | egrep -v "egrep" | awk '{print $1}') + if [ "$pid" != "" ]; then + echo "Killing Management Agent - $pid" + kill -9 $pid + fi +} + +function enableConsoleLogging() { + component="$1" + + sed -i 's/^#log4j.rootCategory=DEBUG, console/log4j.rootCategory=DEBUG, console/g' "$CAF_CONFIG_DIR/${component}-log4cpp_config" + sed -i 's/^log4j.rootCategory=DEBUG, logfile/#log4j.rootCategory=DEBUG, logfile/g' "$CAF_CONFIG_DIR/${component}-log4cpp_config" +} + +function disableConsoleLogging() { + component="$1" + + sed -i 's/^log4j.rootCategory=DEBUG, console/#log4j.rootCategory=DEBUG, console/g' "$CAF_CONFIG_DIR/${component}-log4cpp_config" + sed -i 's/^#log4j.rootCategory=DEBUG, logfile/log4j.rootCategory=DEBUG, logfile/g' "$CAF_CONFIG_DIR/${component}-log4cpp_config" +} + +if [ $# -lt 1 -o "$1" = "--help" ]; then + prtHelp + exit 1 +fi + +cmd=$1 +shift +cmd_params=$@ + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +case "$cmd" in + "listServices") + prtHeader "Listing services" + ps -ef | egrep "CommAmqpListener|ManagementAgentHost|VGAuthService" | egrep -v "egrep" + ;; + "startListener") + startProcess "listener" "false" "daemon" + ;; + "startMa") + startProcess "ma" "false" "daemon" + ;; + "startServices") + startProcess "listener" "false" "daemon" + startProcess "ma" "false" "daemon" + ;; + "startListenerForeground") + startProcess "listener" "true" "foreground" + ;; + "startMaForeground") + startProcess "ma" "true" "foreground" + ;; + "startListenerValgrindMemChecks") + startProcess "listener" "true" "valgrindMemChecks" + ;; + "startMaValgrindMemChecks") + startProcess "ma" "true" "valgrindMemChecks" + ;; + "startListenerValgrindProfiling") + startProcess "listener" "true" "valgrindProfiling" + ;; + "startMaValgrindProfiling") + startProcess "ma" "true" "valgrindProfiling" + ;; + "startListenerValgrindThreading") + startProcess "listener" "true" "valgrindThreading" + ;; + "startMaValgrindThreading") + startProcess "ma" "true" "valgrindThreading" + ;; + "stopListener") + stopListener + ;; + "stopMa") + stopMa + ;; + "stopServices") + stopListener + stopMa + ;; + "killListener") + killListener + ;; + "killMa") + killMa + ;; + "killServices") + killListener + killMa + ;; + *) + echo "Bad command - $cmd" + prtHelp + exit 1 +esac diff --git a/open-vm-tools/common-agent/etc/scripts/is-listener-running b/open-vm-tools/common-agent/etc/scripts/is-listener-running new file mode 100644 index 000000000..008aa4d71 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/is-listener-running @@ -0,0 +1,9 @@ +#!/bin/sh + +processName="CommAmqpListener" +pid=$(ps aux | egrep "${processName}" | egrep -v "color=auto|grep" | awk '{print $2}') +if [ -z "$pid" ]; then + printf "false" +else + printf "true" +fi diff --git a/open-vm-tools/common-agent/etc/scripts/is-ma-running b/open-vm-tools/common-agent/etc/scripts/is-ma-running new file mode 100644 index 000000000..fa4a9351b --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/is-ma-running @@ -0,0 +1,9 @@ +#!/bin/sh + +processName="ManagementAgentHost" +pid=$(ps aux | egrep "${processName}" | egrep -v "color=auto|grep" | awk '{print $2}') +if [ -z "$pid" ]; then + printf "false" +else + printf "true" +fi diff --git a/open-vm-tools/common-agent/etc/scripts/setUpVgAuth b/open-vm-tools/common-agent/etc/scripts/setUpVgAuth new file mode 100644 index 000000000..6b548ba41 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/setUpVgAuth @@ -0,0 +1,39 @@ +#!/bin/sh + +helpMessage() { + echo "*** $0 {userName} {certPath} {subject}" + echo " Starts the VgAuth service and optionally adds the user and user->subject mapping" + echo " userName: The name of the user to be added [default: $userName]" + echo " certPath: Path to the certificate [default: $certPath]" + echo " subject: Subject that maps to the userName in the SAML [default: $subject]" + exit 1 +} + +scriptsDir=$(dirname $(readlink -f $0)) +certsDir=$scriptsDir/../data/input/certs + +userName="" +certPath=$certsDir/selfSignedCert.pem +subject="samlTestSubject" + +if [ $# -gt 3 -o "$1" = "--help" ]; then + helpMessage +fi +if [ $# -ge 1 ]; then + userName=$1 +fi +if [ $# -ge 2 ]; then + certPath=$2 +fi +if [ $# -ge 3 ]; then + subject=$3 +fi + +$scriptsDir/start-VGAuthService + +if [ $userName != "" ]; then + /usr/sbin/useradd $userName + + sleep 1 + $scriptsDir/vgAuth addUser $userName $certPath $subject +fi diff --git a/open-vm-tools/common-agent/etc/scripts/start-VGAuthService b/open-vm-tools/common-agent/etc/scripts/start-VGAuthService new file mode 100644 index 000000000..6480f81ae --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/start-VGAuthService @@ -0,0 +1,32 @@ +#!/bin/sh + +helpMessage() { + local defStartType=$1 + + echo "*** $0 {startType}" + echo " Starts VgAuth" + echo " startType: How to start the listener (daemon, foreground, valgrindMemChecks, valgrindProfiling) [default: $defStartType]" + exit 1 +} + +startType="daemon" +if [ $# -gt 1 -o "$1" = "--help" ]; then + helpMessage "$startType" +fi +if [ $# -ge 1 ]; then + startType=$1 +fi + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +processName="VGAuthService" + +export LD_LIBRARY_PATH=$CAF_ROOT_DIR/lib + +#enableCoreFiles + +startVgAuthProcess "$startType" "$CAF_LOG_DIR" "$CAF_BIN_DIR" "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/start-listener b/open-vm-tools/common-agent/etc/scripts/start-listener new file mode 100644 index 000000000..361be3d65 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/start-listener @@ -0,0 +1,29 @@ +#!/bin/sh + +helpMessage() { + local defStartType=$1 + + echo "*** $0 {startType}" + echo " Starts the listener" + echo " startType: How to start the listener (daemon, foreground, valgrindMemChecks, valgrindProfiling) [default: $defStartType]" + exit 1 +} + +startType="daemon" +if [ $# -gt 1 -o "$1" = "--help" ]; then + helpMessage "$startType" +fi +if [ $# -ge 1 ]; then + startType=$1 +fi + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +processName="CommAmqpListener" + +#enableCoreFiles + +startCafProcess "$startType" "$CAF_LOG_DIR" "$CAF_BIN_DIR" "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/start-ma b/open-vm-tools/common-agent/etc/scripts/start-ma new file mode 100644 index 000000000..788557127 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/start-ma @@ -0,0 +1,30 @@ +#!/bin/sh + +helpMessage() { + local defStartType=$1 + + echo "*** $0 {startType}" + echo " Starts the Management Agent" + echo " startType: How to start the listener (daemon, foreground, valgrindMemChecks, valgrindProfiling) [default: $defStartType]" + exit 1 +} + +startType="daemon" +if [ $# -gt 1 -o "$1" = "--help" ]; then + helpMessage "$startType" +fi +if [ $# -ge 1 ]; then + startType=$1 +fi + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +processName="ManagementAgentHost" + +#enableCoreFiles + +startCafProcess "$startType" "$CAF_LOG_DIR" "$CAF_BIN_DIR" "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/startTestProc b/open-vm-tools/common-agent/etc/scripts/startTestProc new file mode 100644 index 000000000..ab2256a89 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/startTestProc @@ -0,0 +1,6 @@ +#!/bin/bash + +echo $$ +while true; do + sleep 1000 +done diff --git a/open-vm-tools/common-agent/etc/scripts/stop-VGAuthService b/open-vm-tools/common-agent/etc/scripts/stop-VGAuthService new file mode 100644 index 000000000..7b9b671fb --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/stop-VGAuthService @@ -0,0 +1,7 @@ +#!/bin/sh + +scriptsDir=$(dirname $(readlink -f $0)) +. $scriptsDir/caf-common + +processName="VGAuthService" +stopProcess "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/stop-listener b/open-vm-tools/common-agent/etc/scripts/stop-listener new file mode 100644 index 000000000..aadb2bc95 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/stop-listener @@ -0,0 +1,9 @@ +#!/bin/sh + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +processName="CommAmqpListener" +stopProcess "$CAF_BIN_DIR" "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/stop-ma b/open-vm-tools/common-agent/etc/scripts/stop-ma new file mode 100644 index 000000000..24b50ce82 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/stop-ma @@ -0,0 +1,10 @@ +#!/bin/sh + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +processName="ManagementAgentHost" +stopProcess "$CAF_BIN_DIR" "$processName" diff --git a/open-vm-tools/common-agent/etc/scripts/tearDownVgAuth b/open-vm-tools/common-agent/etc/scripts/tearDownVgAuth new file mode 100644 index 000000000..92f5e63f4 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/tearDownVgAuth @@ -0,0 +1,39 @@ +#!/bin/bash + +helpMessage() { + echo "*** $0 {userName} {certPath} {subject}" + echo " Stops the VgAuth service and optionally removes the user and user->subject mapping" + echo " userName: The name of the user to be removed [default: $userName]" + echo " certPath: Path to the certificate [default: $certPath]" + echo " subject: Subject that maps to the userName in the SAML [default: $subject]" + exit 1 +} + +scriptsDir=$(dirname $(readlink -f $0)) +certsDir=$scriptsDir/../data/input/certs + +userName="" +certPath=$certsDir/selfSignedCert.pem +subject="samlTestSubject" + +if [ $# -gt 3 -o "$1" = "--help" ]; then + helpMessage +fi +if [ $# -ge 1 ]; then + userName=$1 +fi +if [ $# -ge 2 ]; then + certPath=$2 +fi +if [ $# -ge 3 ]; then + subject=$3 +fi + +if [ $userName != "" ]; then + $scriptsDir/vgAuth removeUser $userName $certPath $subject + + sleep 1 + /usr/sbin/userdel -r $userName +fi + +$scriptsDir/stop-VGAuthService diff --git a/open-vm-tools/common-agent/etc/scripts/vgAuth b/open-vm-tools/common-agent/etc/scripts/vgAuth new file mode 100644 index 000000000..b1b6d8248 --- /dev/null +++ b/open-vm-tools/common-agent/etc/scripts/vgAuth @@ -0,0 +1,82 @@ +#!/bin/bash + +helpMessage() { + echo "*** $0 Action {Username} {CertPath} {Subject}" + echo " Manages the VGAuth alias store" + echo " Action: help, addUser, removeUser, listAll, listUser" + echo " Username: The name of the user to add to the alias store [default: $username]" + echo " CertPath: Path to the cert [default: $cert]" + echo " Subject: Subject of the cert [default: $subject]" + exit 1 +} + +scriptsDir=$(dirname $(readlink -f $0)) +configDir=$scriptsDir/../config + +. $scriptsDir/caf-common +sourceCafenv "$configDir" + +vgAuthCliName=vmware-vgauth-cmd +if [ -f /usr/lib/vmware-vgauth/$vgAuthCliName ]; then + vgAuthCliPath=/usr/lib/vmware-vgauth/$vgAuthCliName +else + if [ -f $CAF_BIN_DIR/$vgAuthCliName ]; then + vgAuthCliPath=$CAF_BIN_DIR/$vgAuthCliName + export LD_LIBRARY_PATH=$CAF_LIB_DIR + else + echo "*** $vgAuthCliName not found" + exit 1 + fi +fi + +action=$1 +username="testuser" +cert=$CAF_INPUT_DIR/certs/selfSignedCert.pem +subject="samlTestSubject" + +if [ $# -lt 1 -o $# -gt 4 -o "$1" = "--help" ]; then + helpMessage +fi +if [ $# -ge 2 ]; then + username=$2 +fi +if [ $# -ge 3 ]; then + cert=$3 +fi +if [ $# -ge 4 ]; then + subject=$4 +fi + +case "$action" in + "addUser") + userLineCnt=$($vgAuthCli list --username=$username | wc -l) + if [ $userLineCnt = 0 ]; then + echo "*** Addding $username ***" + $vgAuthCli add --global --username=$username --file $cert --subject=$subject + else + echo "*** User already exists... Doing nothing - $username" + fi + ;; + "removeUser") + userLineCnt=$($vgAuthCli list --username=$username | wc -l) + if [ $userLineCnt = 0 ]; then + echo "*** User already gone... Doing nothing - $username" + else + echo "*** Removing $username ***" + $vgAuthCli remove --username=$username --file $cert --subject=$subject + fi + ;; + "listAll") + $vgAuthCli list + ;; + "listUser") + echo "*** Listing $username ***" + $vgAuthCli list --username=$username + ;; + "help") + helpMessage + ;; + *) + helpMessage + ;; +esac diff --git a/open-vm-tools/common-agent/input/Makefile.am b/open-vm-tools/common-agent/input/Makefile.am new file mode 100644 index 000000000..c56518d32 --- /dev/null +++ b/open-vm-tools/common-agent/input/Makefile.am @@ -0,0 +1,23 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir=/var/vmware-caf/pme/data/input + +conf_SCRIPTS = \ + installProviderHeader.sh + +SUBDIRS = invokers providerReg diff --git a/open-vm-tools/common-agent/input/installProviderHeader.sh b/open-vm-tools/common-agent/input/installProviderHeader.sh new file mode 100644 index 000000000..08b085fc4 --- /dev/null +++ b/open-vm-tools/common-agent/input/installProviderHeader.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +export CAF_TMP_DIR=$CAF_OUTPUT_DIR/tmp +export CAF_INPUT_DIR=$CAF_INPUT_DIR +export CAF_OUTPUT_DIR=$CAF_OUTPUT_DIR +export CAF_PROVIDERREG_DIR=$CAF_OUTPUT_DIR/providerReg +export CAF_INVOKERS_DIR=$CAF_OUTPUT_DIR/invokers +export CAF_PROVIDERS_DIR=$CAF_OUTPUT_DIR/providers +export CAF_COMMONPACKAGES_DIR=$CAF_OUTPUT_DIR/commonPackages diff --git a/open-vm-tools/common-agent/input/invokers/Makefile.am b/open-vm-tools/common-agent/input/invokers/Makefile.am new file mode 100644 index 000000000..6998c3be9 --- /dev/null +++ b/open-vm-tools/common-agent/input/invokers/Makefile.am @@ -0,0 +1,24 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir=/var/vmware-caf/pme/data/input/invokers + +conf_SCRIPTS = \ + caf_ConfigProvider_1_0_0.sh \ + caf_InstallProvider_1_0_0.sh \ + caf_RemoteCommandProvider_1_0_0.sh \ + cafTestInfra_CafTestInfraProvider_1_0_0.sh diff --git a/open-vm-tools/common-agent/input/invokers/cafTestInfra_CafTestInfraProvider_1_0_0.sh b/open-vm-tools/common-agent/input/invokers/cafTestInfra_CafTestInfraProvider_1_0_0.sh new file mode 100644 index 000000000..43b0db966 --- /dev/null +++ b/open-vm-tools/common-agent/input/invokers/cafTestInfra_CafTestInfraProvider_1_0_0.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CAF_LIB_DIR +$CAF_BIN_DIR/TestInfraProvider $* diff --git a/open-vm-tools/common-agent/input/invokers/caf_ConfigProvider_1_0_0.sh b/open-vm-tools/common-agent/input/invokers/caf_ConfigProvider_1_0_0.sh new file mode 100644 index 000000000..fb75d8fb2 --- /dev/null +++ b/open-vm-tools/common-agent/input/invokers/caf_ConfigProvider_1_0_0.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CAF_LIB_DIR +$CAF_BIN_DIR/ConfigProvider $* diff --git a/open-vm-tools/common-agent/input/invokers/caf_InstallProvider_1_0_0.sh b/open-vm-tools/common-agent/input/invokers/caf_InstallProvider_1_0_0.sh new file mode 100644 index 000000000..14ab9ba8a --- /dev/null +++ b/open-vm-tools/common-agent/input/invokers/caf_InstallProvider_1_0_0.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CAF_LIB_DIR +$CAF_BIN_DIR/InstallProvider $* diff --git a/open-vm-tools/common-agent/input/invokers/caf_RemoteCommandProvider_1_0_0.sh b/open-vm-tools/common-agent/input/invokers/caf_RemoteCommandProvider_1_0_0.sh new file mode 100644 index 000000000..050683458 --- /dev/null +++ b/open-vm-tools/common-agent/input/invokers/caf_RemoteCommandProvider_1_0_0.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CAF_LIB_DIR +$CAF_BIN_DIR/RemoteCommandProvider $* diff --git a/open-vm-tools/common-agent/input/providerReg/Makefile.am b/open-vm-tools/common-agent/input/providerReg/Makefile.am new file mode 100644 index 000000000..64607e365 --- /dev/null +++ b/open-vm-tools/common-agent/input/providerReg/Makefile.am @@ -0,0 +1,24 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +confdir=/var/vmware-caf/pme/data/input/providerReg + +conf_DATA = \ + caf_ConfigProvider_1_0_0.xml \ + caf_InstallProvider_1_0_0.xml \ + caf_RemoteCommandProvider_1_0_0.xml \ + cafTestInfra_CafTestInfraProvider_1_0_0.xml diff --git a/open-vm-tools/common-agent/input/providerReg/cafTestInfra_CafTestInfraProvider_1_0_0.xml b/open-vm-tools/common-agent/input/providerReg/cafTestInfra_CafTestInfraProvider_1_0_0.xml new file mode 100644 index 000000000..049a680bb --- /dev/null +++ b/open-vm-tools/common-agent/input/providerReg/cafTestInfra_CafTestInfraProvider_1_0_0.xml @@ -0,0 +1,12 @@ + + + diff --git a/open-vm-tools/common-agent/input/providerReg/caf_ConfigProvider_1_0_0.xml b/open-vm-tools/common-agent/input/providerReg/caf_ConfigProvider_1_0_0.xml new file mode 100644 index 000000000..49f96e6c3 --- /dev/null +++ b/open-vm-tools/common-agent/input/providerReg/caf_ConfigProvider_1_0_0.xml @@ -0,0 +1,12 @@ + + + diff --git a/open-vm-tools/common-agent/input/providerReg/caf_InstallProvider_1_0_0.xml b/open-vm-tools/common-agent/input/providerReg/caf_InstallProvider_1_0_0.xml new file mode 100644 index 000000000..291b9c622 --- /dev/null +++ b/open-vm-tools/common-agent/input/providerReg/caf_InstallProvider_1_0_0.xml @@ -0,0 +1,12 @@ + + + diff --git a/open-vm-tools/common-agent/input/providerReg/caf_RemoteCommandProvider_1_0_0.xml b/open-vm-tools/common-agent/input/providerReg/caf_RemoteCommandProvider_1_0_0.xml new file mode 100644 index 000000000..094bcdbe1 --- /dev/null +++ b/open-vm-tools/common-agent/input/providerReg/caf_RemoteCommandProvider_1_0_0.xml @@ -0,0 +1,12 @@ + + + diff --git a/open-vm-tools/config/compile b/open-vm-tools/config/compile deleted file mode 100755 index 1b1d23216..000000000 --- a/open-vm-tools/config/compile +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2005-05-14.22 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# 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 2, 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/open-vm-tools/config/config.guess b/open-vm-tools/config/config.guess deleted file mode 100755 index 396482d6c..000000000 --- a/open-vm-tools/config/config.guess +++ /dev/null @@ -1,1500 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-07-02' - -# This file 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 2 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/open-vm-tools/config/config.sub b/open-vm-tools/config/config.sub deleted file mode 100755 index fab0aa355..000000000 --- a/open-vm-tools/config/config.sub +++ /dev/null @@ -1,1616 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-09-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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 2 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/open-vm-tools/config/depcomp b/open-vm-tools/config/depcomp deleted file mode 100755 index ca5ea4e1e..000000000 --- a/open-vm-tools/config/depcomp +++ /dev/null @@ -1,584 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2006-10-15.18 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. - -# 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 2, 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -M - fi - stat=$? - - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - - if test -f "$tmpdepfile"; then - outname="$stripped.o" - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/open-vm-tools/config/install-sh b/open-vm-tools/config/install-sh deleted file mode 100755 index 4fbbae7b7..000000000 --- a/open-vm-tools/config/install-sh +++ /dev/null @@ -1,507 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2006-10-14.15 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -posix_glob= -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chmodcmd=$chmodprog -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -no_target_directory= - -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - shift - shift - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac -done - -if test $# -ne 0 && test -z "$dir_arg$dstarg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix=/ ;; - -*) prefix=./ ;; - *) prefix= ;; - esac - - case $posix_glob in - '') - if (set -f) 2>/dev/null; then - posix_glob=true - else - posix_glob=false - fi ;; - esac - - oIFS=$IFS - IFS=/ - $posix_glob && set -f - set fnord $dstdir - shift - $posix_glob && set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dst"; then - $doit $rmcmd -f "$dst" 2>/dev/null \ - || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ - && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ - || { - echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - } || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/open-vm-tools/config/ltmain.sh b/open-vm-tools/config/ltmain.sh deleted file mode 100755 index d6f3ad72b..000000000 --- a/open-vm-tools/config/ltmain.sh +++ /dev/null @@ -1,7750 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2 -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=2.2 -TIMESTAMP="" -package_revision=1.2599 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -progname=`$ECHO "X$progpath" | $Xsed -e "$basename" -e 's,^-,./-,'` - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=`$ECHO "X$progpath" | $Xsed -e "$dirname"` - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - -# Generated shell functions inserted here. - - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -{ - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -r "$1" && exec 5<&1 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 1<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $opt_dry_run || $RM $removelist - trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - $ECHO "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - $opt_dry_run || $RM "$libobj" "${libobj}T" - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - $opt_dry_run || $RM "$lobj" "$output_obj" - - func_show_eval "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - $opt_dry_run || $RM "$obj" "$output_obj" - func_show_eval "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -test "$mode" = compile && func_mode_compile ${1+"$@"} - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - fi - # Transform arg to wrapped name. - file="$progdir/$program" - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_emit_wrapper arg -# -# emit a libtool wrapper script on stdout -# don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variable -# set therein. -# -# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the '.lib' directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -#else -# include -# include -#endif -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); - -static const char *script_text = -EOF - - func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - - cat </dev/null || echo $SHELL` - case $lt_newargv0 in - *.exe | *.EXE) ;; - *) lt_newargv0=$lt_newargv0.exe ;; - esac - ;; - * ) lt_newargv0=$SHELL ;; - esac - fi - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - # The effects of -all-static are defined in a previous loop. - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`otool -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'` - darwin_install_name=`$ECHO $darwin_install_name` - if test -z "$darwin_install_name"; then - darwin_install_name=`otool64 -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'` - darwin_install_name=`$ECHO $darwin_install_name` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/open-vm-tools/config/missing b/open-vm-tools/config/missing deleted file mode 100755 index 1c8ff7049..000000000 --- a/open-vm-tools/config/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# 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 2, 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/open-vm-tools/configure b/open-vm-tools/configure deleted file mode 100755 index 62cf44796..000000000 --- a/open-vm-tools/configure +++ /dev/null @@ -1,34205 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for open-vm-tools 10.0.5. -# -# Report bugs to . -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME='open-vm-tools' -PACKAGE_TARNAME='open-vm-tools' -PACKAGE_VERSION='10.0.5' -PACKAGE_STRING='open-vm-tools 10.0.5' -PACKAGE_BUGREPORT='open-vm-tools-devel@lists.sourceforge.net' - -ac_unique_file="checkvm/checkvm.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -CPP -CXX -CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE -SED -LN_S -LIBTOOL -GREP -EGREP -FGREP -LD -DUMPBIN -ac_ct_DUMPBIN -NM -AR -RANLIB -lt_ECHO -DSYMUTIL -NMEDIT -CXXCPP -HAVE_PKG_CONFIG -XMKMF -X_CFLAGS -X_PRE_LIBS -X_LIBS -X_EXTRA_LIBS -ac_vmw_lib_cfg -MSPACK_CPPFLAGS -MSPACK_LIBS -GLIB2_CPPFLAGS -GLIB2_LIBS -GMODULE_CPPFLAGS -GMODULE_LIBS -GOBJECT_CPPFLAGS -GOBJECT_LIBS -GTHREAD_CPPFLAGS -GTHREAD_LIBS -have_genmarshal -FUSE_CPPFLAGS -FUSE_LIBS -PAM_CPPFLAGS -PAM_LIBS -SSL_CPPFLAGS -SSL_LIBS -XERCES_CPPFLAGS -XERCES_LIBS -XMLSECURITY_CPPFLAGS -XMLSECURITY_LIBS -CUNIT_CPPFLAGS -CUNIT_LIBS -GTK_CPPFLAGS -GTK_LIBS -GTKMM_CPPFLAGS -GTKMM_LIBS -PROCPS_CPPFLAGS -PROCPS_LIBS -DNET_CPPFLAGS -DNET_LIBS -have_cxx -ICU_CPPFLAGS -ICU_LIBS -RPCGEN -have_doxygen -DOT -HAVE_DOT -MSCGEN -MSCGEN_DIR -BUILD_HGFSMOUNTER_TRUE -BUILD_HGFSMOUNTER_FALSE -LINUX_TRUE -LINUX_FALSE -SOLARIS_TRUE -SOLARIS_FALSE -FREEBSD_TRUE -FREEBSD_FALSE -FREEBSD_CUSTOM_SYSDIR_TRUE -FREEBSD_CUSTOM_SYSDIR_FALSE -THIRTY_TWO_BIT_USERSPACE_TRUE -THIRTY_TWO_BIT_USERSPACE_FALSE -HAVE_X11_TRUE -HAVE_X11_FALSE -HAVE_ICU_TRUE -HAVE_ICU_FALSE -WITH_KERNEL_MODULES_TRUE -WITH_KERNEL_MODULES_FALSE -HAVE_XSM_TRUE -HAVE_XSM_FALSE -HAVE_XCOMPOSITE_TRUE -HAVE_XCOMPOSITE_FALSE -ENABLE_TESTS_TRUE -ENABLE_TESTS_FALSE -WITH_ROOT_PRIVILEGES_TRUE -WITH_ROOT_PRIVILEGES_FALSE -HAVE_DNET_TRUE -HAVE_DNET_FALSE -HAVE_DOXYGEN_TRUE -HAVE_DOXYGEN_FALSE -HAVE_FUSE_TRUE -HAVE_FUSE_FALSE -HAVE_GNU_LD_TRUE -HAVE_GNU_LD_FALSE -HAVE_GTKMM_TRUE -HAVE_GTKMM_FALSE -HAVE_PAM_TRUE -HAVE_PAM_FALSE -USE_SLASH_PROC_TRUE -USE_SLASH_PROC_FALSE -USE_PRINTF_WRAPPERS_TRUE -USE_PRINTF_WRAPPERS_FALSE -ENABLE_DEPLOYPKG_TRUE -ENABLE_DEPLOYPKG_FALSE -ENABLE_GRABBITMQPROXY_TRUE -ENABLE_GRABBITMQPROXY_FALSE -ENABLE_VGAUTH_TRUE -ENABLE_VGAUTH_FALSE -HAVE_VSOCK_TRUE -HAVE_VSOCK_FALSE -HGFS_LIBS -TOOLS_VERSION -TARGET_OS -KERNEL_RELEASE -LINUXINCLUDE -MODULES_OS -MODULES_DIR -MODULES -COMMON_XLIBS -XSM_LIBS -XCOMPOSITE_LIBS -PAM_PREFIX -PLUGIN_CPPFLAGS -PLUGIN_LDFLAGS -VMTOOLS_CPPFLAGS -VMTOOLS_LIBS -RPCGENFLAGS -XDR_LIBS -TEST_PLUGIN_INSTALLDIR -COMMON_PLUGIN_INSTALLDIR -VMSVC_PLUGIN_INSTALLDIR -VMUSR_PLUGIN_INSTALLDIR -SYSDIR -INSTVMSG -RPCGEN_WRAPPER -LIB_AUTH_CPPFLAGS -LIB_IMPERSONATE_CPPFLAGS -LIB_USER_CPPFLAGS -LIBVMTOOLS_LIBADD -VIX_LIBADD -VGAUTH_LIBADD -LIBOBJS -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -XMKMF' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures open-vm-tools 10.0.5 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/open-vm-tools] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -X features: - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of open-vm-tools 10.0.5:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-multimon disables multimon, enabled by default - --disable-docs disables generation of API documentation; by - default, docs are built if doxygen is available. - --disable-tests disable compilation of test code. - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --disable-deploypkg do not build deploypkg plugin. - --disable-grabbitmqproxy - do not build grabbitmqproxy plugin. - --disable-vgauth do not build vgauth. - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --without-root-privileges - does not perform any operations that require root - privileges - --without-kernel-modules - does not compile or install the kernel modules - --with-kernel-release specifies the kernel release you want to build - against - --with-linuxdir specifies the Linux directory you want to use - --without-gtk2 compiles without Gtk 2.0 - --without-gtkmm compiles without Gtkmm, sigc++, and related libs - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-x use the X Window System - --without-pam compiles without PAM support. - --without-ssl compiles without openssl support (disables - grabbitmqproxy and vgauth). - --without-xmlsecurity compiles without xml-security-c support (disables - vgauth). - --without-xerces compiles without xerces support (disables vgauth). - --with-pam-prefix specifies where pam files go. Default is - $(sysconfdir) - --without-procps compiles without libproc (disables support for - meminfo) - --without-dnet compiles without libdnet (disables support for - nicinfo) - --without-icu disables support for ICU - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - XMKMF Path to xmkmf, Makefile generator for X Window System - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -open-vm-tools configure 10.0.5 -generated by GNU Autoconf 2.61 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by open-vm-tools $as_me 10.0.5, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" -fi -shift -for ac_site_file -do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# In order to make this configure script auto-detect situations where -# people have a 32-bit userland running with a 64-bit kernel, we try to ask -# the compiler (assumedly gcc) for its default Target:. -# We have to set up $TEST_CC manually, since AC_PROG_CC hasn't yet been run (and can't be until AC_CANONICAL_HOST & AC_CANONICAL_BUILD are run) -# The purpose of all this is to set up $host_alias/$build_alias in a more -# intelligent way than config.guess currently does. -TEST_CC="$CC_FOR_BUILD" -test -z "$TEST_CC" && TEST_CC="$HOST_CC" -test -z "$TEST_CC" && TEST_CC="$CC" -if test -n "$TEST_CC" -a -z "$host_alias"; then - host_alias="`$TEST_CC -dumpmachine`" - if test -z "$build_alias" -a -n "$host_alias"; then - build_alias="$host_alias" - fi -fi -unset TEST_CC - -# checkvm/checkvm.c has no special significance - we just need to pass in a file that -# helps autoconf verify that it really has found the source tree. - - -# Keep the top-level directory tidy by putting auxiliary build tools and local -# macros in separate subdirectories. -ac_aux_dir= -for ac_dir in config "$srcdir"/config; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - - -# Quote the regular expressions -case "$host_cpu" in - i[3456]86) - userSpaceBitness="32" - ;; - x86_64) - userSpaceBitness="64" - ;; - *) - { { echo "$as_me:$LINENO: error: Unknown architecture." >&5 -echo "$as_me: error: Unknown architecture." >&2;} - { (exit 1); exit 1; }; } - ;; -esac - -# Operational arguments. - -# Check whether --with-root-privileges was given. -if test "${with_root_privileges+set}" = set; then - withval=$with_root_privileges; -else - with_root_privileges=yes -fi - - -# Kernel arguments. -# The kernel args have to go here otherwise the KERNEL_RELEASE won't be visible -# to getOsVersion() - -# Check whether --with-kernel-modules was given. -if test "${with_kernel_modules+set}" = set; then - withval=$with_kernel_modules; -else - with_kernel_modules=yes -fi - - - -# Check whether --with-kernel-release was given. -if test "${with_kernel_release+set}" = set; then - withval=$with_kernel_release; KERNEL_RELEASE="$withval" -else - KERNEL_RELEASE=`uname -r` -fi - - - -# Check whether --with-linuxdir was given. -if test "${with_linuxdir+set}" = set; then - withval=$with_linuxdir; LINUXDIR="$withval" -else - LINUXDIR=/lib/modules/$KERNEL_RELEASE -fi - - -# Turn the uname output into something we can run comparisons on. -getOsVersion() { - major_version="`echo $KERNEL_RELEASE | cut -f1 -d. | cut -f1 -d-`" - minor_version="`echo $KERNEL_RELEASE | cut -f2 -d. | cut -f1 -d-`" - micro_version="`echo $KERNEL_RELEASE | cut -f3 -d. | cut -f1 -d-`" - printf '%02d%02d%03d' $major_version $minor_version $micro_version -} - -case "$host_os" in - linux*) - os="linux" - ;; - freebsd*) - os="freebsd" - ;; - kfreebsd*-gnu) - os="kfreebsd-gnu" - ;; - solaris*) - os="solaris" - ;; - *) - { echo "$as_me:$LINENO: WARNING: This is an untested and unsupported Operating System. Proceed at your own peril." >&5 -echo "$as_me: WARNING: This is an untested and unsupported Operating System. Proceed at your own peril." >&2;} - ;; -esac -osVersion="`getOsVersion`" - -if test "$with_kernel_modules" = "yes"; then - case "$os" in - linux) - if test "$osVersion" -lt 206009; then - { { echo "$as_me:$LINENO: error: Kernels prior to 2.6.9 are not supported in this release of open-vm-tools. Configure using --without-kernel-modules to suppress building kernel drivers." >&5 -echo "$as_me: error: Kernels prior to 2.6.9 are not supported in this release of open-vm-tools. Configure using --without-kernel-modules to suppress building kernel drivers." >&2;} - { (exit 1); exit 1; }; } - fi - if test ! -d "$LINUXDIR/kernel/"; then - { { echo "$as_me:$LINENO: error: $LINUXDIR/kernel does not exist" >&5 -echo "$as_me: error: $LINUXDIR/kernel does not exist" >&2;} - { (exit 1); exit 1; }; } - fi - LINUXINCLUDE="$LINUXDIR/build/include" - if test ! -d "$LINUXINCLUDE"; then - { { echo "$as_me:$LINENO: error: Can't find include dir under $LINUXDIR" >&5 -echo "$as_me: error: Can't find include dir under $LINUXDIR" >&2;} - { (exit 1); exit 1; }; } - fi - ;; - - freebsd) - freebsd_sysdir=/usr/src/sys - if test -n "$SYSDIR"; then - freebsd_sysdir="$SYSDIR" - fi - if test ! -f "$freebsd_sysdir/conf/kmod.mk"; then - { { echo "$as_me:$LINENO: error: FreeBSD kernel tree not found. Please install the kernel sources (or provide the location using SYSDIR) or configure using --without-kernel-modules." >&5 -echo "$as_me: error: FreeBSD kernel tree not found. Please install the kernel sources (or provide the location using SYSDIR) or configure using --without-kernel-modules." >&2;} - { (exit 1); exit 1; }; } - fi - ;; - esac -fi - -# Arguments for disabling individual open-vm-tools features or libraries. -# Check whether --enable-multimon was given. -if test "${enable_multimon+set}" = set; then - enableval=$enable_multimon; enable_multimon="$enableval" -else - enable_multimon="yes" -fi - - - -# Check whether --with-gtk2 was given. -if test "${with_gtk2+set}" = set; then - withval=$with_gtk2; with_gtk2="$withval" -else - with_gtk2="yes" -fi - - - -# Check whether --with-gtkmm was given. -if test "${with_gtkmm+set}" = set; then - withval=$with_gtkmm; with_gtkmm="$withval" -else - with_gtkmm="yes" -fi - - -# Check whether --enable-docs was given. -if test "${enable_docs+set}" = set; then - enableval=$enable_docs; enable_docs="$enableval" -else - enable_docs="yes" -fi - - -# Check whether --enable-tests was given. -if test "${enable_tests+set}" = set; then - enableval=$enable_tests; enable_tests="$enableval" -else - enable_tests="auto" -fi - - -am__api_version='1.10' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SET_MAKE= -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='open-vm-tools' - VERSION='10.0.5' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - -### -### Constants -### -# These need to be declared after initialization. - -# Some of our macro call-sites require changes to -# CPPFLAGS/CFLAGS/LDFLAGS. In such places, we save the original value -# of CPPFLAGS/CFLAGS/LDFLAGS before the macro call and restore it when -# the call is done. We must perform this save at each macro site, -# because CPPFLAGS/CFLAGS/LDFLAGS may change over the course of -# configuration. -# -# CPPFLAGS is intended for preprocessor options (-D and -I mainly) -# CFLAGS is intended for compiler options (-O, -f, -W, and so forth) - -CPPFLAGS="$CPPFLAGS -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS" - -### -### Programs -### -# C preprocessor and compiler. -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -# C++ compiler. Note that unlike AC_PROG_CC, this call does not trigger an -# error if no C++ compiler was found; it'll just set the variable CXX to 'g++'. -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - -# This allows features like per-target compiler flags. I.e., you can compile -# one copy of the same sources twice with different flags. (See lib/guestApp -# for an example.) -if test "x$CC" != xcc; then - { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 -echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 -echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } -fi -set dummy $CC; ac_cc=`echo $2 | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define NO_MINUS_C_MINUS_O 1 -_ACEOF - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - - - -# Needed for the various install and uninstall hooks. -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${ac_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" | sed 99q >conftest.sed - $as_unset ac_script || ac_script= - # Extract the first word of "sed gsed" to use in msg output -if test -z "$SED"; then -set dummy sed gsed; ac_prog_name=$2 -if test "${ac_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_SED_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue - # Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_SED_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -SED="$ac_cv_path_SED" -if test -z "$SED"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in \$PATH" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_SED=$SED -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 -echo "${ECHO_T}$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } -fi - -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } - - -# Needed for creating the archives in lib/ and the shared libraries. -case `pwd` in - *\ * | *\ *) - { echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2' -macro_revision='1.2599' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } -if test "${ac_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" | sed 99q >conftest.sed - $as_unset ac_script || ac_script= - # Extract the first word of "sed gsed" to use in msg output -if test -z "$SED"; then -set dummy sed gsed; ac_prog_name=$2 -if test "${ac_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_SED_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue - # Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_SED_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -SED="$ac_cv_path_SED" -if test -z "$SED"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in \$PATH" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_SED=$SED -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 -echo "${ECHO_T}$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ echo "$as_me:$LINENO: checking for fgrep" >&5 -echo $ECHO_N "checking for fgrep... $ECHO_C" >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - # Extract the first word of "fgrep" to use in msg output -if test -z "$FGREP"; then -set dummy fgrep; ac_prog_name=$2 -if test "${ac_cv_path_FGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_FGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue - # Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_FGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -FGREP="$ac_cv_path_FGREP" -if test -z "$FGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_FGREP=$FGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 -echo "${ECHO_T}$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - - -{ echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 -echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6; } -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { echo "$as_me:$LINENO: result: $DUMPBIN" >&5 -echo "${ECHO_T}$DUMPBIN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 -echo "${ECHO_T}$ac_ct_DUMPBIN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 -echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6; } -if test "${lt_cv_nm_interface+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6523: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:6526: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:6529: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 -echo "${ECHO_T}$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } -else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 -echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ echo "$as_me:$LINENO: result: $xsi_shell" >&5 -echo "${ECHO_T}$xsi_shell" >&6; } - - -{ echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 -echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ echo "$as_me:$LINENO: result: $lt_shell_append" >&5 -echo "${ECHO_T}$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - - -{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6; } -else - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 7628 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_cc_needs_belf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -echo "${ECHO_T}$DSYMUTIL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 -echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { echo "$as_me:$LINENO: result: $NMEDIT" >&5 -echo "${ECHO_T}$NMEDIT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 -echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - - - - - - - - - - - - { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 -echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - echo "int foo(void){return 1;}" > conftest.c - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib ${wl}-single_module conftest.c - if test -f libconftest.dylib; then - lt_cv_apple_cc_single_mod=yes - rm -rf libconftest.dylib* - fi - rm conftest.c - fi -fi -{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 -echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } - { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 -echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - lt_cv_ld_exported_symbols_list=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 -echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - - -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - _lt_caught_CXX_error=yes -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } -if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - - - - - - - - - - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9645: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:9649: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - if test "$host_cpu" = m68k; then - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - fi - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9963: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:9967: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10068: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:10072: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10123: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:10127: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - if test "$host_cpu" = m68k; then - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - fi - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - if test "$host_cpu" = m68k; then - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - fi - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - if test "$GCC" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF -int foo(void) {} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - if test "$host_cpu" = m68k; then - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - else - dynamic_linker=no - fi - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then - shlibpath_overrides_runpath=yes -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - { echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - { echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dld_dld_link=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 12862 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 12962 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - ;; - *) - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } - { echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6; } - - { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6; } - - { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } -else - { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -echo "${ECHO_T}$LD" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - if test "$GCC" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - gnu*) - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5]* | *pgcpp\ [1-5]*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no - - GCC_CXX="$GXX" - LD_CXX="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - amigaos*) - if test "$host_cpu" = m68k; then - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - fi - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc* ) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14957: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:14961: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15056: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:15060: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15108: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:15112: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6; } - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - -{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - if test "$host_cpu" = m68k; then - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - else - dynamic_linker=no - fi - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then - shlibpath_overrides_runpath=yes -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -if test "$ac_cv_prog_AR" = false; then - { { echo "$as_me:$LINENO: error: The 'ar' utility was not found. Please put ar on the path." >&5 -echo "$as_me: error: The 'ar' utility was not found. Please put ar on the path." >&2;} - { (exit 1); exit 1; }; } -fi - -# We use pkg-config to set up the cflags and libs for gtk. -# Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_HAVE_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$HAVE_PKG_CONFIG"; then - ac_cv_prog_HAVE_PKG_CONFIG="$HAVE_PKG_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_HAVE_PKG_CONFIG="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_HAVE_PKG_CONFIG" && ac_cv_prog_HAVE_PKG_CONFIG="no" -fi -fi -HAVE_PKG_CONFIG=$ac_cv_prog_HAVE_PKG_CONFIG -if test -n "$HAVE_PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $HAVE_PKG_CONFIG" >&5 -echo "${ECHO_T}$HAVE_PKG_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - -if test "$GCC" != "yes"; then - { { echo "$as_me:$LINENO: error: Only GCC is currently supported. Please put gcc in the path." >&5 -echo "$as_me: error: Only GCC is currently supported. Please put gcc in the path." >&2;} - { (exit 1); exit 1; }; } -fi - -### -### Libraries -### - -{ echo "$as_me:$LINENO: checking for X" >&5 -echo $ECHO_N "checking for X... $ECHO_C" >&6; } - - -# Check whether --with-x was given. -if test "${with_x+set}" = set; then - withval=$with_x; -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - case $x_includes,$x_libraries in #( - *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 -echo "$as_me: error: Cannot use X directory names containing '" >&2;} - { (exit 1); exit 1; }; };; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir -if mkdir conftest.dir; then - cd conftest.dir - cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case $ac_im_incroot in - /usr/include) ac_x_includes= ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac - case $ac_im_usrlibdir in - /usr/lib | /lib) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. - rm -f -r conftest.dir -fi - -# Standard set of common directories for X headers. -# Check X11 before X11Rn because it is often a symlink to the current release. -ac_x_header_dirs=' -/usr/X11/include -/usr/X11R6/include -/usr/X11R5/include -/usr/X11R4/include - -/usr/include/X11 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 - -/usr/local/X11/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include - -/usr/local/include/X11 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 - -/usr/X386/include -/usr/x386/include -/usr/XFree86/include/X11 - -/usr/include -/usr/local/include -/usr/unsupported/include -/usr/athena/include -/usr/local/x11r5/include -/usr/lpp/Xamples/include - -/usr/openwin/include -/usr/openwin/share/include' - -if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # We can compile using X headers with no special include directory. -ac_x_includes= -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then - ac_x_includes=$ac_dir - break - fi -done -fi - -rm -f conftest.err conftest.$ac_ext -fi # $ac_x_includes = no - -if test "$ac_x_libraries" = no; then - # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -XrmInitialize () - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - LIBS=$ac_save_LIBS -# We can link X programs with no special library path. -ac_x_libraries= -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS=$ac_save_LIBS -for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -do - # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl; do - if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi # $ac_x_libraries = no - -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac -fi -;; #( - *) have_x=yes;; - esac - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - { echo "$as_me:$LINENO: result: $have_x" >&5 -echo "${ECHO_T}$have_x" >&6; } - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } -fi - -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - -cat >>confdefs.h <<\_ACEOF -#define X_DISPLAY_MISSING 1 -_ACEOF - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - { echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 -echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6; } - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - ac_xsave_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - X_LIBS="$X_LIBS -R$x_libraries" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - X_LIBS="$X_LIBS -R $x_libraries" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: neither works" >&5 -echo "${ECHO_T}neither works" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_c_werror_flag=$ac_xsave_c_werror_flag - LIBS=$ac_xsave_LIBS - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn Johnson says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And Karl Berry says - # the Alpha needs dnet_stub (dnet does not exist). - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XOpenDisplay (); -int -main () -{ -return XOpenDisplay (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 -echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dnet_dnet_ntoa=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_dnet_ntoa=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test $ac_cv_lib_dnet_dnet_ntoa = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 -echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet_stub $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dnet_stub_dnet_ntoa=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_stub_dnet_ntoa=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -fi - - fi -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$ac_xsave_LIBS" - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to T.E. Dickey. - # The functions gethostbyname, getservbyname, and inet_addr are - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - { echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } -if test "${ac_cv_func_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostbyname innocuous_gethostbyname - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostbyname - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname -choke me -#endif - -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_gethostbyname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gethostbyname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } - - if test $ac_cv_func_gethostbyname = no; then - { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_nsl_gethostbyname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_gethostbyname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } -if test $ac_cv_lib_nsl_gethostbyname = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -fi - - if test $ac_cv_lib_nsl_gethostbyname = no; then - { echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 -echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_bsd_gethostbyname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_bsd_gethostbyname=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6; } -if test $ac_cv_lib_bsd_gethostbyname = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" -fi - - fi - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says Simon Leinen: it contains gethostby* - # variants that don't use the name server (or something). -lsocket - # must be given before -lnsl if both are needed. We assume that - # if connect needs -lnsl, so does gethostbyname. - { echo "$as_me:$LINENO: checking for connect" >&5 -echo $ECHO_N "checking for connect... $ECHO_C" >&6; } -if test "${ac_cv_func_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define connect to an innocuous variant, in case declares connect. - For example, HP-UX 11i declares gettimeofday. */ -#define connect innocuous_connect - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef connect - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect -choke me -#endif - -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_connect=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_connect=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -echo "${ECHO_T}$ac_cv_func_connect" >&6; } - - if test $ac_cv_func_connect = no; then - { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 -echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_socket_connect=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_connect=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } -if test $ac_cv_lib_socket_connect = yes; then - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -fi - - fi - - # Guillermo Gomez says -lposix is necessary on A/UX. - { echo "$as_me:$LINENO: checking for remove" >&5 -echo $ECHO_N "checking for remove... $ECHO_C" >&6; } -if test "${ac_cv_func_remove+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define remove to an innocuous variant, in case declares remove. - For example, HP-UX 11i declares gettimeofday. */ -#define remove innocuous_remove - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char remove (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef remove - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char remove (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_remove || defined __stub___remove -choke me -#endif - -int -main () -{ -return remove (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_remove=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_remove=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 -echo "${ECHO_T}$ac_cv_func_remove" >&6; } - - if test $ac_cv_func_remove = no; then - { echo "$as_me:$LINENO: checking for remove in -lposix" >&5 -echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lposix $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char remove (); -int -main () -{ -return remove (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_posix_remove=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_posix_remove=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 -echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; } -if test $ac_cv_lib_posix_remove = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -fi - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - { echo "$as_me:$LINENO: checking for shmat" >&5 -echo $ECHO_N "checking for shmat... $ECHO_C" >&6; } -if test "${ac_cv_func_shmat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shmat to an innocuous variant, in case declares shmat. - For example, HP-UX 11i declares gettimeofday. */ -#define shmat innocuous_shmat - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shmat (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shmat - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shmat || defined __stub___shmat -choke me -#endif - -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func_shmat=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shmat=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 -echo "${ECHO_T}$ac_cv_func_shmat" >&6; } - - if test $ac_cv_func_shmat = no; then - { echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 -echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lipc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_ipc_shmat=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ipc_shmat=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 -echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; } -if test $ac_cv_lib_ipc_shmat = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -fi - - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS=$LDFLAGS - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # John Interrante, Karl Berry - { echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 -echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char IceConnectionNumber (); -int -main () -{ -return IceConnectionNumber (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_ICE_IceConnectionNumber=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ICE_IceConnectionNumber=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -fi - - LDFLAGS=$ac_save_LDFLAGS - -fi - - -# -# Check for libintl.h. When configuring using "--without-x", /usr/local/include -# may not be added to the include path, so code that use glib's i18n functions -# would fail to compile because it can't find libintl.h. -# -if test "${ac_cv_header_libintl_h+set}" = set; then - { echo "$as_me:$LINENO: checking for libintl.h" >&5 -echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libintl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 -echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking libintl.h usability" >&5 -echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking libintl.h presence" >&5 -echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for libintl.h" >&5 -echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libintl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_libintl_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 -echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } - -fi -if test $ac_cv_header_libintl_h = yes; then - : -else - have_libintl=no -fi - - -if test "$have_libintl" = "no"; then - unset ac_cv_header_libintl_h - CPPFLAGS="$CPPFLAGS -I/usr/local/include" - if test "${ac_cv_header_libintl_h+set}" = set; then - { echo "$as_me:$LINENO: checking for libintl.h" >&5 -echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libintl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 -echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking libintl.h usability" >&5 -echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking libintl.h presence" >&5 -echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for libintl.h" >&5 -echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libintl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_libintl_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 -echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } - -fi -if test $ac_cv_header_libintl_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: libintl.h not found. Make sure you have the gettext headers installed." >&5 -echo "$as_me: error: libintl.h not found. Make sure you have the gettext headers installed." >&2;} - { (exit 1); exit 1; }; } -fi - - -fi - -# Check whether --enable-deploypkg was given. -if test "${enable_deploypkg+set}" = set; then - enableval=$enable_deploypkg; -else - enable_deploypkg=yes -fi - - -if test "$enable_deploypkg" = "yes"; then - - - if test -z "mspack"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "MSPACK"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_MSPACK_CPPFLAGS}" || test -n "${CUSTOM_MSPACK_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_MSPACK_LIBS} -lmspack" - if test -n "mspack.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_MSPACK_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_mspack_h+set}" = set; then - { echo "$as_me:$LINENO: checking for mspack.h" >&5 -echo $ECHO_N "checking for mspack.h... $ECHO_C" >&6; } -if test "${ac_cv_header_mspack_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_mspack_h" >&5 -echo "${ECHO_T}$ac_cv_header_mspack_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking mspack.h usability" >&5 -echo $ECHO_N "checking mspack.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking mspack.h presence" >&5 -echo $ECHO_N "checking mspack.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: mspack.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: mspack.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: mspack.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: mspack.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: mspack.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mspack.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: mspack.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: mspack.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: mspack.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: mspack.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for mspack.h" >&5 -echo $ECHO_N "checking for mspack.h... $ECHO_C" >&6; } -if test "${ac_cv_header_mspack_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_mspack_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_mspack_h" >&5 -echo "${ECHO_T}$ac_cv_header_mspack_h" >&6; } - -fi -if test $ac_cv_header_mspack_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_mspack_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lmspack" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lmspack... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmspack $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - MSPACK_CPPFLAGS="${CUSTOM_MSPACK_CPPFLAGS}" - MSPACK_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "libmspack"; then - if test -n "0.0.20040308alpha"; then - { echo "$as_me:$LINENO: checking for libmspack >= 0.0.20040308alpha (via pkg-config)" >&5 -echo $ECHO_N "checking for libmspack >= 0.0.20040308alpha (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'libmspack >= 0.0.20040308alpha'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for libmspack (via pkg-config)" >&5 -echo $ECHO_N "checking for libmspack (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'libmspack'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags libmspack`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs libmspack`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - MSPACK_CPPFLAGS="$ac_vmw_cppflags" - MSPACK_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - MSPACK_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - MSPACK_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - MSPACK_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - MSPACK_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: mspack >= 0.0.20040308alpha is required." >&5 -echo "$as_me: error: mspack >= 0.0.20040308alpha is required." >&2;} - { (exit 1); exit 1; }; } - fi - -fi - -# Check whether --enable-grabbitmqproxy was given. -if test "${enable_grabbitmqproxy+set}" = set; then - enableval=$enable_grabbitmqproxy; -else - enable_grabbitmqproxy=yes -fi - - -# -# Check for glib 2.6.14 or greater. -# - - - if test -z "glib-2.0"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GLIB2"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GLIB2_CPPFLAGS}" || test -n "${CUSTOM_GLIB2_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GLIB2_LIBS} -lglib-2.0" - if test -n "glib.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GLIB2_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_glib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for glib.h" >&5 -echo $ECHO_N "checking for glib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_glib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 -echo "${ECHO_T}$ac_cv_header_glib_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking glib.h usability" >&5 -echo $ECHO_N "checking glib.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking glib.h presence" >&5 -echo $ECHO_N "checking glib.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: glib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: glib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: glib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: glib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: glib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: glib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: glib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: glib.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for glib.h" >&5 -echo $ECHO_N "checking for glib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_glib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_glib_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 -echo "${ECHO_T}$ac_cv_header_glib_h" >&6; } - -fi -if test $ac_cv_header_glib_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "g_key_file_new"; then - ac_vmw_function=g_key_file_new - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_glib-2.0_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lglib-2.0" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lglib-2.0... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lglib-2.0 $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GLIB2_CPPFLAGS="${CUSTOM_GLIB2_CPPFLAGS}" - GLIB2_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "glib-2.0"; then - if test -n "2.14.0"; then - { echo "$as_me:$LINENO: checking for glib-2.0 >= 2.14.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for glib-2.0 >= 2.14.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'glib-2.0 >= 2.14.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for glib-2.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for glib-2.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'glib-2.0'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags glib-2.0`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs glib-2.0`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GLIB2_CPPFLAGS="$ac_vmw_cppflags" - GLIB2_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GLIB2_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GLIB2_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GLIB2_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GLIB2_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: glib2 >= 2.14.0 is required." >&5 -echo "$as_me: error: glib2 >= 2.14.0 is required." >&2;} - { (exit 1); exit 1; }; } - fi - - - - - if test -z "gmodule-2.0"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GMODULE"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GMODULE_CPPFLAGS}" || test -n "${CUSTOM_GMODULE_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GMODULE_LIBS} -lgmodule-2.0" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GMODULE_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_gmodule-2.0_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lgmodule-2.0" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lgmodule-2.0... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgmodule-2.0 $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GMODULE_CPPFLAGS="${CUSTOM_GMODULE_CPPFLAGS}" - GMODULE_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gmodule-2.0"; then - if test -n "2.14.0"; then - { echo "$as_me:$LINENO: checking for gmodule-2.0 >= 2.14.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gmodule-2.0 >= 2.14.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gmodule-2.0 >= 2.14.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for gmodule-2.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gmodule-2.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gmodule-2.0'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags gmodule-2.0`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs gmodule-2.0`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GMODULE_CPPFLAGS="$ac_vmw_cppflags" - GMODULE_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GMODULE_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GMODULE_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GMODULE_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GMODULE_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: gmodule >= 2.14.0 is required." >&5 -echo "$as_me: error: gmodule >= 2.14.0 is required." >&2;} - { (exit 1); exit 1; }; } - fi - - - - if test -z "gobject-2.0"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GOBJECT"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GOBJECT_CPPFLAGS}" || test -n "${CUSTOM_GOBJECT_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GOBJECT_LIBS} -lgobject-2.0" - if test -n "glib-object.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GOBJECT_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_glib_object_h+set}" = set; then - { echo "$as_me:$LINENO: checking for glib-object.h" >&5 -echo $ECHO_N "checking for glib-object.h... $ECHO_C" >&6; } -if test "${ac_cv_header_glib_object_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_glib_object_h" >&5 -echo "${ECHO_T}$ac_cv_header_glib_object_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking glib-object.h usability" >&5 -echo $ECHO_N "checking glib-object.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking glib-object.h presence" >&5 -echo $ECHO_N "checking glib-object.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: glib-object.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: glib-object.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: glib-object.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: glib-object.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: glib-object.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: glib-object.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: glib-object.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: glib-object.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: glib-object.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: glib-object.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: glib-object.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for glib-object.h" >&5 -echo $ECHO_N "checking for glib-object.h... $ECHO_C" >&6; } -if test "${ac_cv_header_glib_object_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_glib_object_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_glib_object_h" >&5 -echo "${ECHO_T}$ac_cv_header_glib_object_h" >&6; } - -fi -if test $ac_cv_header_glib_object_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_gobject-2.0_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lgobject-2.0" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lgobject-2.0... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgobject-2.0 $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GOBJECT_CPPFLAGS="${CUSTOM_GOBJECT_CPPFLAGS}" - GOBJECT_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gobject-2.0"; then - if test -n "2.14.0"; then - { echo "$as_me:$LINENO: checking for gobject-2.0 >= 2.14.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gobject-2.0 >= 2.14.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gobject-2.0 >= 2.14.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for gobject-2.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gobject-2.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gobject-2.0'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags gobject-2.0`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs gobject-2.0`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GOBJECT_CPPFLAGS="$ac_vmw_cppflags" - GOBJECT_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GOBJECT_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GOBJECT_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GOBJECT_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GOBJECT_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: gobject >= 2.14.0 is required." >&5 -echo "$as_me: error: gobject >= 2.14.0 is required." >&2;} - { (exit 1); exit 1; }; } - fi - - - - if test -z "gthread-2.0"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GTHREAD"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GTHREAD_CPPFLAGS}" || test -n "${CUSTOM_GTHREAD_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GTHREAD_LIBS} -lgthread-2.0" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GTHREAD_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_gthread-2.0_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lgthread-2.0" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lgthread-2.0... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgthread-2.0 $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GTHREAD_CPPFLAGS="${CUSTOM_GTHREAD_CPPFLAGS}" - GTHREAD_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gthread-2.0"; then - if test -n "2.14.0"; then - { echo "$as_me:$LINENO: checking for gthread-2.0 >= 2.14.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gthread-2.0 >= 2.14.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gthread-2.0 >= 2.14.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for gthread-2.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gthread-2.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gthread-2.0'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags gthread-2.0`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs gthread-2.0`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GTHREAD_CPPFLAGS="$ac_vmw_cppflags" - GTHREAD_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GTHREAD_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GTHREAD_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GTHREAD_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GTHREAD_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: glib >= 2.14.0 is required." >&5 -echo "$as_me: error: glib >= 2.14.0 is required." >&2;} - { (exit 1); exit 1; }; } - fi - -# Extract the first word of "glib-genmarshal", so it can be a program name with args. -set dummy glib-genmarshal; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_have_genmarshal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$have_genmarshal"; then - ac_cv_prog_have_genmarshal="$have_genmarshal" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_have_genmarshal="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_have_genmarshal" && ac_cv_prog_have_genmarshal="no" -fi -fi -have_genmarshal=$ac_cv_prog_have_genmarshal -if test -n "$have_genmarshal"; then - { echo "$as_me:$LINENO: result: $have_genmarshal" >&5 -echo "${ECHO_T}$have_genmarshal" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - -if test "$have_genmarshal" != "yes"; then - { { echo "$as_me:$LINENO: error: glib-genmarshal is required; make sure it's available in your path." >&5 -echo "$as_me: error: glib-genmarshal is required; make sure it's available in your path." >&2;} - { (exit 1); exit 1; }; } -fi - -# -# Check for fuse. -# - - - if test -z "fuse"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "FUSE"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_FUSE_CPPFLAGS}" || test -n "${CUSTOM_FUSE_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_FUSE_LIBS} -lfuse" - if test -n "fuse.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_FUSE_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_fuse_h+set}" = set; then - { echo "$as_me:$LINENO: checking for fuse.h" >&5 -echo $ECHO_N "checking for fuse.h... $ECHO_C" >&6; } -if test "${ac_cv_header_fuse_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_fuse_h" >&5 -echo "${ECHO_T}$ac_cv_header_fuse_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking fuse.h usability" >&5 -echo $ECHO_N "checking fuse.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking fuse.h presence" >&5 -echo $ECHO_N "checking fuse.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: fuse.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: fuse.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: fuse.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: fuse.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: fuse.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: fuse.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: fuse.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: fuse.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: fuse.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: fuse.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: fuse.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for fuse.h" >&5 -echo $ECHO_N "checking for fuse.h... $ECHO_C" >&6; } -if test "${ac_cv_header_fuse_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_fuse_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_fuse_h" >&5 -echo "${ECHO_T}$ac_cv_header_fuse_h" >&6; } - -fi -if test $ac_cv_header_fuse_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "fuse_main"; then - ac_vmw_function=fuse_main - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_fuse_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lfuse" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lfuse... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lfuse $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - FUSE_CPPFLAGS="${CUSTOM_FUSE_CPPFLAGS}" - FUSE_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "fuse"; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for fuse >= (via pkg-config)" >&5 -echo $ECHO_N "checking for fuse >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'fuse >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for fuse (via pkg-config)" >&5 -echo $ECHO_N "checking for fuse (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'fuse'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags fuse`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs fuse`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - FUSE_CPPFLAGS="$ac_vmw_cppflags" - FUSE_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - FUSE_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - FUSE_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - FUSE_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - FUSE_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - have_fuse=yes - else - true - have_fuse=no; - { echo "$as_me:$LINENO: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&5 -echo "$as_me: WARNING: Fuse is missing, vmblock-fuse/vmhgfs-fuse will be disabled." >&2;} - fi - - -# -# Check for PAM. -# - -# Check whether --with-pam was given. -if test "${with_pam+set}" = set; then - withval=$with_pam; -else - with_pam=yes -fi - - -if test "$with_pam" = "yes"; then - - if test -z "$CUSTOM_PAM_CPPFLAGS"; then - if test "$os" = freebsd; then - CUSTOM_PAM_CPPFLAGS="-I/usr/local/include" - else - CUSTOM_PAM_CPPFLAGS="-I/usr/include" - fi - if test -n ""; then - CUSTOM_PAM_CPPFLAGS="${CUSTOM_PAM_CPPFLAGS}/" - fi - fi - - - - if test -z "pam"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "PAM"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_PAM_CPPFLAGS}" || test -n "${CUSTOM_PAM_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_PAM_LIBS} -lpam" - if test -n "security/pam_appl.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_PAM_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - { echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5 -echo $ECHO_N "checking security/pam_appl.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5 -echo $ECHO_N "checking security/pam_appl.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_security_pam_appl_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6; } - -fi -if test $ac_cv_header_security_pam_appl_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "pam_start"; then - ac_vmw_function=pam_start - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_pam_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lpam" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lpam... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpam $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - PAM_CPPFLAGS="${CUSTOM_PAM_CPPFLAGS}" - PAM_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PAM_CPPFLAGS="$ac_vmw_cppflags" - PAM_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - PAM_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - PAM_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - PAM_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - PAM_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - PAM_CPPFLAGS="$PAM_CPPFLAGS -DUSE_PAM" - else - true - - feature="" - if test -z "$feature"; then - feature="PAM" - fi - { { echo "$as_me:$LINENO: error: Cannot find PAM library. Please configure without $feature (using --without-pam), or install the PAM libraries and devel package(s)." >&5 -echo "$as_me: error: Cannot find PAM library. Please configure without $feature (using --without-pam), or install the PAM libraries and devel package(s)." >&2;} - { (exit 1); exit 1; }; } - - fi - -fi - -# Check whether --enable-vgauth was given. -if test "${enable_vgauth+set}" = set; then - enableval=$enable_vgauth; -else - enable_vgauth=yes -fi - - -# -# Check for openssl, xerces-c and xml-security-c -# - -# Check whether --with-ssl was given. -if test "${with_ssl+set}" = set; then - withval=$with_ssl; - enable_grabbitmqproxy=no - enable_vgauth=no - -else - with_ssl=yes -fi - - - -# Check whether --with-xmlsecurity was given. -if test "${with_xmlsecurity+set}" = set; then - withval=$with_xmlsecurity; enable_vgauth=no -else - with_xmlsecurity=yes -fi - - - -# Check whether --with-xerces was given. -if test "${with_xerces+set}" = set; then - withval=$with_xerces; enable_vgauth=no -else - with_xerces=yes -fi - - -if test "$enable_vgauth" = "yes" -o "$enable_grabbitmqproxy" = "yes"; then - - if test -z "$CUSTOM_SSL_CPPFLAGS"; then - if test "$os" = freebsd; then - CUSTOM_SSL_CPPFLAGS="-I/usr/local/include" - else - CUSTOM_SSL_CPPFLAGS="-I/usr/include" - fi - if test -n ""; then - CUSTOM_SSL_CPPFLAGS="${CUSTOM_SSL_CPPFLAGS}/" - fi - fi - - - - if test -z "ssl"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "SSL"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_SSL_CPPFLAGS}" || test -n "${CUSTOM_SSL_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_SSL_LIBS} -lssl" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_SSL_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_ssl_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lssl" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lssl... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - SSL_CPPFLAGS="${CUSTOM_SSL_CPPFLAGS}" - SSL_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SSL_CPPFLAGS="$ac_vmw_cppflags" - SSL_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - SSL_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - SSL_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - SSL_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - SSL_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - - feature="" - if test -z "$feature"; then - feature="SSL" - fi - { { echo "$as_me:$LINENO: error: Cannot find SSL library. Please configure without $feature (using --without-ssl), or install the SSL libraries and devel package(s)." >&5 -echo "$as_me: error: Cannot find SSL library. Please configure without $feature (using --without-ssl), or install the SSL libraries and devel package(s)." >&2;} - { (exit 1); exit 1; }; } - - fi - -fi - -if test "$enable_vgauth" = "yes"; then - CPPFLAGS="$CPPFLAGS -DUSE_VGAUTH" - - if test -z "$CUSTOM_XERCES_CPPFLAGS"; then - if test "$os" = freebsd; then - CUSTOM_XERCES_CPPFLAGS="-I/usr/local/include" - else - CUSTOM_XERCES_CPPFLAGS="-I/usr/include" - fi - if test -n ""; then - CUSTOM_XERCES_CPPFLAGS="${CUSTOM_XERCES_CPPFLAGS}/" - fi - fi - - - - if test -z "xerces-c"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "XERCES"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_XERCES_CPPFLAGS}" || test -n "${CUSTOM_XERCES_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_XERCES_LIBS} -lxerces-c" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_XERCES_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_xerces-c_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lxerces-c" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lxerces-c... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lxerces-c $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - XERCES_CPPFLAGS="${CUSTOM_XERCES_CPPFLAGS}" - XERCES_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - XERCES_CPPFLAGS="$ac_vmw_cppflags" - XERCES_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - XERCES_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - XERCES_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - XERCES_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - XERCES_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - - feature="" - if test -z "$feature"; then - feature="XERCES" - fi - { { echo "$as_me:$LINENO: error: Cannot find XERCES library. Please configure without $feature (using --without-xerces-c), or install the XERCES libraries and devel package(s)." >&5 -echo "$as_me: error: Cannot find XERCES library. Please configure without $feature (using --without-xerces-c), or install the XERCES libraries and devel package(s)." >&2;} - { (exit 1); exit 1; }; } - - fi - - - - if test -z "$CUSTOM_XMLSECURITY_CPPFLAGS"; then - if test "$os" = freebsd; then - CUSTOM_XMLSECURITY_CPPFLAGS="-I/usr/local/include" - else - CUSTOM_XMLSECURITY_CPPFLAGS="-I/usr/include" - fi - if test -n ""; then - CUSTOM_XMLSECURITY_CPPFLAGS="${CUSTOM_XMLSECURITY_CPPFLAGS}/" - fi - fi - - - - if test -z "xml-security-c"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "XMLSECURITY"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_XMLSECURITY_CPPFLAGS}" || test -n "${CUSTOM_XMLSECURITY_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_XMLSECURITY_LIBS} -lxml-security-c" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_XMLSECURITY_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_xml-security-c_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lxml-security-c" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lxml-security-c... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lxml-security-c $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - XMLSECURITY_CPPFLAGS="${CUSTOM_XMLSECURITY_CPPFLAGS}" - XMLSECURITY_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - XMLSECURITY_CPPFLAGS="$ac_vmw_cppflags" - XMLSECURITY_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - XMLSECURITY_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - XMLSECURITY_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - XMLSECURITY_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - XMLSECURITY_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - - feature="" - if test -z "$feature"; then - feature="XMLSECURITY" - fi - { { echo "$as_me:$LINENO: error: Cannot find XMLSECURITY library. Please configure without $feature (using --without-xml-security-c), or install the XMLSECURITY libraries and devel package(s)." >&5 -echo "$as_me: error: Cannot find XMLSECURITY library. Please configure without $feature (using --without-xml-security-c), or install the XMLSECURITY libraries and devel package(s)." >&2;} - { (exit 1); exit 1; }; } - - fi - -fi - -# -# Check for CUnit and disable test code if not available. -# -if test "$enable_tests" = "auto" -o "$enable_tests" = "yes"; then - - if test -z "$CUSTOM_CUNIT_CPPFLAGS"; then - if test "$os" = freebsd; then - CUSTOM_CUNIT_CPPFLAGS="-I/usr/local/include" - else - CUSTOM_CUNIT_CPPFLAGS="-I/usr/include" - fi - if test -n ""; then - CUSTOM_CUNIT_CPPFLAGS="${CUSTOM_CUNIT_CPPFLAGS}/" - fi - fi - - - - if test -z "cunit"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "CUNIT"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_CUNIT_CPPFLAGS}" || test -n "${CUSTOM_CUNIT_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_CUNIT_LIBS} -lcunit" - if test -n "CUnit/CUnit.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_CUNIT_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_CUnit_CUnit_h+set}" = set; then - { echo "$as_me:$LINENO: checking for CUnit/CUnit.h" >&5 -echo $ECHO_N "checking for CUnit/CUnit.h... $ECHO_C" >&6; } -if test "${ac_cv_header_CUnit_CUnit_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_CUnit_CUnit_h" >&5 -echo "${ECHO_T}$ac_cv_header_CUnit_CUnit_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking CUnit/CUnit.h usability" >&5 -echo $ECHO_N "checking CUnit/CUnit.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking CUnit/CUnit.h presence" >&5 -echo $ECHO_N "checking CUnit/CUnit.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: CUnit/CUnit.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: CUnit/CUnit.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for CUnit/CUnit.h" >&5 -echo $ECHO_N "checking for CUnit/CUnit.h... $ECHO_C" >&6; } -if test "${ac_cv_header_CUnit_CUnit_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_CUnit_CUnit_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_CUnit_CUnit_h" >&5 -echo "${ECHO_T}$ac_cv_header_CUnit_CUnit_h" >&6; } - -fi -if test $ac_cv_header_CUnit_CUnit_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "CU_initialize_registry"; then - ac_vmw_function=CU_initialize_registry - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_cunit_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lcunit" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lcunit... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcunit $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - CUNIT_CPPFLAGS="${CUSTOM_CUNIT_CPPFLAGS}" - CUNIT_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - CUNIT_CPPFLAGS="$ac_vmw_cppflags" - CUNIT_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - CUNIT_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - CUNIT_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - CUNIT_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - CUNIT_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - have_cunit=yes - else - true - have_cunit=no - fi - - if test "$have_cunit" = "no"; then - if test "$enable_tests" = "yes"; then - - feature="" - if test -z "$feature"; then - feature="CUNIT" - fi - { { echo "$as_me:$LINENO: error: Cannot find CUNIT library. Please configure without $feature (using --without-cunit), or install the CUNIT libraries and devel package(s)." >&5 -echo "$as_me: error: Cannot find CUNIT library. Please configure without $feature (using --without-cunit), or install the CUNIT libraries and devel package(s)." >&2;} - { (exit 1); exit 1; }; } - - else - { echo "$as_me:$LINENO: WARNING: CUnit not found, tests won't be compiled." >&5 -echo "$as_me: WARNING: CUnit not found, tests won't be compiled." >&2;} - fi - fi -fi - -# If the user explicitly disables X11, then don't try to detect the X-related libraries -if test "$have_x" = "disabled"; then - enable_multimon="no" -elif test "$have_x" != "yes"; then - { { echo "$as_me:$LINENO: error: The X11 libraries were not found. Please configure without X11 (using --without-x), or install the libX11 devel package(s)." >&5 -echo "$as_me: error: The X11 libraries were not found. Please configure without X11 (using --without-x), or install the libX11 devel package(s)." >&2;} - { (exit 1); exit 1; }; } -else - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - COMMON_XLIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" - - { echo "$as_me:$LINENO: checking for XeviQueryVersion in -lXext" >&5 -echo $ECHO_N "checking for XeviQueryVersion in -lXext... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xext_XeviQueryVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXext $COMMON_XLIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XeviQueryVersion (); -int -main () -{ -return XeviQueryVersion (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xext_XeviQueryVersion=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xext_XeviQueryVersion=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XeviQueryVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_Xext_XeviQueryVersion" >&6; } -if test $ac_cv_lib_Xext_XeviQueryVersion = yes; then - COMMON_XLIBS="-lXext $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXext not found. Please configure without X11 (using --without-x), or install the libXext devel package(s)." >&5 -echo "$as_me: error: libXext not found. Please configure without X11 (using --without-x), or install the libXext devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - { echo "$as_me:$LINENO: checking for X11/extensions/extutil.h" >&5 -echo $ECHO_N "checking for X11/extensions/extutil.h... $ECHO_C" >&6; } -if test "${ac_cv_header_X11_extensions_extutil_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include - -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_X11_extensions_extutil_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_X11_extensions_extutil_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_extutil_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_extensions_extutil_h" >&6; } -if test $ac_cv_header_X11_extensions_extutil_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: X11/extensions/extutil.h header not found - you're probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x)." >&5 -echo "$as_me: error: X11/extensions/extutil.h header not found - you're probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x)." >&2;} - { (exit 1); exit 1; }; } -fi - - - - if test "$enable_multimon" != "no"; then - { echo "$as_me:$LINENO: checking for XineramaQueryVersion in -lXinerama" >&5 -echo $ECHO_N "checking for XineramaQueryVersion in -lXinerama... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xinerama_XineramaQueryVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXinerama $COMMON_XLIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XineramaQueryVersion (); -int -main () -{ -return XineramaQueryVersion (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xinerama_XineramaQueryVersion=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xinerama_XineramaQueryVersion=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryVersion" >&6; } -if test $ac_cv_lib_Xinerama_XineramaQueryVersion = yes; then - COMMON_XLIBS="-lXinerama $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXinerama not found. Please configure without multimon (using --disable-multimon), configure without X11 (using --without-x), or install the libXinerama devel package(s)." >&5 -echo "$as_me: error: libXinerama not found. Please configure without multimon (using --disable-multimon), configure without X11 (using --without-x), or install the libXinerama devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - fi - - { echo "$as_me:$LINENO: checking for XOpenDevice in -lXi" >&5 -echo $ECHO_N "checking for XOpenDevice in -lXi... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xi_XOpenDevice+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXi $COMMON_XLIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XOpenDevice (); -int -main () -{ -return XOpenDevice (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xi_XOpenDevice=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xi_XOpenDevice=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xi_XOpenDevice" >&5 -echo "${ECHO_T}$ac_cv_lib_Xi_XOpenDevice" >&6; } -if test $ac_cv_lib_Xi_XOpenDevice = yes; then - COMMON_XLIBS="-lXi $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXi not found. Please configure without X11 (using --without-x), or install the libXi devel package(s)." >&5 -echo "$as_me: error: libXi not found. Please configure without X11 (using --without-x), or install the libXi devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - { echo "$as_me:$LINENO: checking for XRenderQueryVersion in -lXrender" >&5 -echo $ECHO_N "checking for XRenderQueryVersion in -lXrender... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xrender_XRenderQueryVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXrender $COMMON_XLIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XRenderQueryVersion (); -int -main () -{ -return XRenderQueryVersion (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xrender_XRenderQueryVersion=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xrender_XRenderQueryVersion=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderQueryVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderQueryVersion" >&6; } -if test $ac_cv_lib_Xrender_XRenderQueryVersion = yes; then - COMMON_XLIBS="-lXrender $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXrender not found. Please configure without X11 (using --without-x), or install the libXrender devel package(s)." >&5 -echo "$as_me: error: libXrender not found. Please configure without X11 (using --without-x), or install the libXrender devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - { echo "$as_me:$LINENO: checking for XRRQueryVersion in -lXrandr" >&5 -echo $ECHO_N "checking for XRRQueryVersion in -lXrandr... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xrandr_XRRQueryVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXrandr $COMMON_XLIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XRRQueryVersion (); -int -main () -{ -return XRRQueryVersion (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xrandr_XRRQueryVersion=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xrandr_XRRQueryVersion=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRQueryVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRQueryVersion" >&6; } -if test $ac_cv_lib_Xrandr_XRRQueryVersion = yes; then - COMMON_XLIBS="-lXrandr $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXrandr not found. Please configure without X11 (using --without-x) or install the libXrandr devel package(s)." >&5 -echo "$as_me: error: libXrandr not found. Please configure without X11 (using --without-x) or install the libXrandr devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - { echo "$as_me:$LINENO: checking for XTestQueryExtension in -lXtst" >&5 -echo $ECHO_N "checking for XTestQueryExtension in -lXtst... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xtst_XTestQueryExtension+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXtst $COMMON_XLIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XTestQueryExtension (); -int -main () -{ -return XTestQueryExtension (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xtst_XTestQueryExtension=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xtst_XTestQueryExtension=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xtst_XTestQueryExtension" >&5 -echo "${ECHO_T}$ac_cv_lib_Xtst_XTestQueryExtension" >&6; } -if test $ac_cv_lib_Xtst_XTestQueryExtension = yes; then - COMMON_XLIBS="-lXtst $COMMON_XLIBS" -else - { { echo "$as_me:$LINENO: error: libXtst not found. Please configure without X11 (using --without-x) or install the libXtst devel package(s)." >&5 -echo "$as_me: error: libXtst not found. Please configure without X11 (using --without-x) or install the libXtst devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5 -echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; } -if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lSM $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char SmcOpenConnection (); -int -main () -{ -return SmcOpenConnection (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_SM_SmcOpenConnection=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_SM_SmcOpenConnection=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 -echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; } -if test $ac_cv_lib_SM_SmcOpenConnection = yes; then - XSM_LIBS="-lSM -lICE" && have_xsm_lib="yes" -else - - -lICE -fi - - - - -for ac_header in X11/SM/SMlib.h X11/ICE/ICElib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - have_xsm_header="yes" -fi - -done - - if test "$have_xsm_lib" = "yes" -a "$have_xsm_header" = "yes"; then - have_xsm="yes" - fi - - { echo "$as_me:$LINENO: checking for XCompositeQueryExtension in -lXcomposite" >&5 -echo $ECHO_N "checking for XCompositeQueryExtension in -lXcomposite... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xcomposite_XCompositeQueryExtension+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXcomposite $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XCompositeQueryExtension (); -int -main () -{ -return XCompositeQueryExtension (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xcomposite_XCompositeQueryExtension=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xcomposite_XCompositeQueryExtension=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xcomposite_XCompositeQueryExtension" >&5 -echo "${ECHO_T}$ac_cv_lib_Xcomposite_XCompositeQueryExtension" >&6; } -if test $ac_cv_lib_Xcomposite_XCompositeQueryExtension = yes; then - XCOMPOSITE_LIBS="-lXcomposite" -else - have_xcomposite="no" - -fi - - -for ac_header in X11/extensions/Xcomposite.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - have_xcomposite="no" -fi - -done - - if test "$have_xcomposite" != "no"; then - have_xcomposite="yes" - fi - - # Check whether we have gtk+ 2.0. - if test "$with_gtk2" != "no"; then - # gdk_display_get_default_group (added in gtk+ 2.4.0) is function currently - # needed by vmware-user. - - - if test -z "gtk-x11-2.0"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GTK"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GTK_CPPFLAGS}" || test -n "${CUSTOM_GTK_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GTK_LIBS} -lgtk-x11-2.0" - if test -n "gtk/gtk.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GTK_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_gtk_gtk_h+set}" = set; then - { echo "$as_me:$LINENO: checking for gtk/gtk.h" >&5 -echo $ECHO_N "checking for gtk/gtk.h... $ECHO_C" >&6; } -if test "${ac_cv_header_gtk_gtk_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_gtk_gtk_h" >&5 -echo "${ECHO_T}$ac_cv_header_gtk_gtk_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking gtk/gtk.h usability" >&5 -echo $ECHO_N "checking gtk/gtk.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking gtk/gtk.h presence" >&5 -echo $ECHO_N "checking gtk/gtk.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: gtk/gtk.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: gtk/gtk.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: gtk/gtk.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: gtk/gtk.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: gtk/gtk.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: gtk/gtk.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: gtk/gtk.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: gtk/gtk.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for gtk/gtk.h" >&5 -echo $ECHO_N "checking for gtk/gtk.h... $ECHO_C" >&6; } -if test "${ac_cv_header_gtk_gtk_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_gtk_gtk_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_gtk_gtk_h" >&5 -echo "${ECHO_T}$ac_cv_header_gtk_gtk_h" >&6; } - -fi -if test $ac_cv_header_gtk_gtk_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "gdk_display_get_default_group"; then - ac_vmw_function=gdk_display_get_default_group - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_gtk-x11-2.0_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lgtk-x11-2.0" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lgtk-x11-2.0... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgtk-x11-2.0 $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GTK_CPPFLAGS="${CUSTOM_GTK_CPPFLAGS}" - GTK_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gtk+-2.0"; then - if test -n "2.4.0"; then - { echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gtk+-2.0 >= 2.4.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gtk+-2.0 >= 2.4.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for gtk+-2.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gtk+-2.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gtk+-2.0'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags gtk+-2.0`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs gtk+-2.0`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GTK_CPPFLAGS="$ac_vmw_cppflags" - GTK_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GTK_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GTK_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GTK_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GTK_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - GTK_CPPFLAGS="$GTK_CPPFLAGS -DGTK2" - else - true - { { echo "$as_me:$LINENO: error: Gtk+ 2.0 library not found or too old. Please configure without Gtk+ support (using --without-gtk2) or install the Gtk+ 2.0 devel package." >&5 -echo "$as_me: error: Gtk+ 2.0 library not found or too old. Please configure without Gtk+ support (using --without-gtk2) or install the Gtk+ 2.0 devel package." >&2;} - { (exit 1); exit 1; }; } - fi - - fi - - # - # Check for gtkmm 2.4.0 or greater. - # - - if test "$with_gtkmm" != "no"; then - CUSTOM_GTKMM_CPPFLAGS="$CUSTOM_GTKMM_CPPFLAGS $GTK_CPPFLAGS" - - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - if test -z "gtkmm-2.4"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "GTKMM"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_GTKMM_CPPFLAGS}" || test -n "${CUSTOM_GTKMM_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_GTKMM_LIBS} -lgtkmm-2.4" - if test -n "gtkmm.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_GTKMM_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_gtkmm_h+set}" = set; then - { echo "$as_me:$LINENO: checking for gtkmm.h" >&5 -echo $ECHO_N "checking for gtkmm.h... $ECHO_C" >&6; } -if test "${ac_cv_header_gtkmm_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_gtkmm_h" >&5 -echo "${ECHO_T}$ac_cv_header_gtkmm_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking gtkmm.h usability" >&5 -echo $ECHO_N "checking gtkmm.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking gtkmm.h presence" >&5 -echo $ECHO_N "checking gtkmm.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: gtkmm.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: gtkmm.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: gtkmm.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: gtkmm.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: gtkmm.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: gtkmm.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: gtkmm.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: gtkmm.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: gtkmm.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: gtkmm.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: gtkmm.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for gtkmm.h" >&5 -echo $ECHO_N "checking for gtkmm.h... $ECHO_C" >&6; } -if test "${ac_cv_header_gtkmm_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_gtkmm_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_gtkmm_h" >&5 -echo "${ECHO_T}$ac_cv_header_gtkmm_h" >&6; } - -fi -if test $ac_cv_header_gtkmm_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_gtkmm-2.4_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lgtkmm-2.4" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lgtkmm-2.4... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgtkmm-2.4 $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - GTKMM_CPPFLAGS="${CUSTOM_GTKMM_CPPFLAGS}" - GTKMM_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gtkmm-2.4"; then - if test -n "2.4.0"; then - { echo "$as_me:$LINENO: checking for gtkmm-2.4 >= 2.4.0 (via pkg-config)" >&5 -echo $ECHO_N "checking for gtkmm-2.4 >= 2.4.0 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gtkmm-2.4 >= 2.4.0'; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for gtkmm-2.4 (via pkg-config)" >&5 -echo $ECHO_N "checking for gtkmm-2.4 (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'gtkmm-2.4'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags gtkmm-2.4`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs gtkmm-2.4`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - GTKMM_CPPFLAGS="$ac_vmw_cppflags" - GTKMM_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - GTKMM_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - GTKMM_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - GTKMM_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - GTKMM_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - GTKMM_CPPFLAGS="$GTKMM_CPPFLAGS -DHAVE_GTKMM" - else - true - { { echo "$as_me:$LINENO: error: gtkmm library not found. Please install the libgtkmm devel package(s), or re-configure using --without-gtkmm." >&5 -echo "$as_me: error: gtkmm library not found. Please install the libgtkmm devel package(s), or re-configure using --without-gtkmm." >&2;} - { (exit 1); exit 1; }; } - fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - fi -fi # End of checks for X libraries - -{ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 -echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; } -if test "${ac_cv_lib_crypt_crypt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char crypt (); -int -main () -{ -return crypt (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_crypt_crypt=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_crypt_crypt=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 -echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; } -if test $ac_cv_lib_crypt_crypt = yes; then - HAVE_CRYPT="yes" -else - { { echo "$as_me:$LINENO: error: libcrypt not found. Please install the libc/libcrypt devel package(s)." >&5 -echo "$as_me: error: libcrypt not found. Please install the libc/libcrypt devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - - -for ac_func in dlopen -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then - VIX_LIBADD="$VIX_LIBADD -ldl" - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -ldl" - VGAUTH_LIBADD="$VGAUTH_LIBADD -ldl" - -else - { { echo "$as_me:$LINENO: error: dlopen was not found, but is required for open-vm-tools to function properly. Please contact your OS vendor." >&5 -echo "$as_me: error: dlopen was not found, but is required for open-vm-tools to function properly. Please contact your OS vendor." >&2;} - { (exit 1); exit 1; }; } -fi - -fi -done - - - -for ac_func in ecvt -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -for ac_func in fcvt -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -if test "$os" = "freebsd" -a "$osVersion" -ge 600000; then - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lthr" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lthr... $ECHO_C" >&6; } -if test "${ac_cv_lib_thr_pthread_mutex_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lthr $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_mutex_init (); -int -main () -{ -return pthread_mutex_init (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_thr_pthread_mutex_init=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_thr_pthread_mutex_init=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_thr_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_thr_pthread_mutex_init" >&6; } -if test $ac_cv_lib_thr_pthread_mutex_init = yes; then - THREAD_LIB=-lthr -else - { { echo "$as_me:$LINENO: error: Unable to locate required threading library libthr." >&5 -echo "$as_me: error: Unable to locate required threading library libthr." >&2;} - { (exit 1); exit 1; }; } -fi - -else - { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } -if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_mutex_init (); -int -main () -{ -return pthread_mutex_init (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_pthread_pthread_mutex_init=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_mutex_init=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } -if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then - THREAD_LIB=-lpthread -else - { { echo "$as_me:$LINENO: error: libpthread not found. Please install the libc/libpthread devel package(s)." >&5 -echo "$as_me: error: libpthread not found. Please install the libc/libpthread devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - -fi - -# PAM prefix - -# Check whether --with-pam-prefix was given. -if test "${with_pam_prefix+set}" = set; then - withval=$with_pam_prefix; PAM_PREFIX="$withval" -else - PAM_PREFIX='$(sysconfdir)' -fi - - -if test "$os" = "linux"; then - -# Check whether --with-procps was given. -if test "${with_procps+set}" = set; then - withval=$with_procps; -else - with_procps=yes -fi - -else - with_procps="no" -fi - -if test "$with_procps" = "yes"; then - - have_procps=no - - if test -z "$CUSTOM_PROCPS_NAME" && test -z "$CUSTOM_PROCPS_LIBS"; then - # See if we have procps-ng (that finally supports pkg-config). - - - if test -z "procps-ng"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "PROCPS"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_PROCPS_CPPFLAGS}" || test -n "${CUSTOM_PROCPS_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_PROCPS_LIBS} -lprocps-ng" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_procps-ng_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lprocps-ng" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lprocps-ng... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lprocps-ng $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - PROCPS_CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS}" - PROCPS_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "libprocps"; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for libprocps >= (via pkg-config)" >&5 -echo $ECHO_N "checking for libprocps >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'libprocps >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for libprocps (via pkg-config)" >&5 -echo $ECHO_N "checking for libprocps (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists 'libprocps'; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags libprocps`" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs libprocps`" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PROCPS_CPPFLAGS="$ac_vmw_cppflags" - PROCPS_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - have_procps=yes; - - else - true - - fi - - fi - - if test "$have_procps" = "no"; then - # Let's see if there is an older procps version, one that does not - # support pkg-config. - if test -z "$CUSTOM_PROCPS_NAME"; then - CUSTOM_PROCPS_NAME=proc - fi - - # XXX: no pkg-config and no procps-config means we need to - # hard-code a sensible default. - if test -z "$CUSTOM_PROCPS_LIBS"; then - CUSTOM_PROCPS_LIBS="-L/lib" - fi - - # Some distros provide libproc-${version}.so only, others provide the - # libproc.so symlink. Try both to see what sticks (but only try the 3.2.7 - # and 3.2.8 versions - adding every possible version here would be a mess). - # - # Users can help by providing CUSTOM_PROCPS_NAME / CUSTOM_PROCPS_LIBS if - # necessary. - - - if test -z "$CUSTOM_PROCPS_NAME"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "PROCPS"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_PROCPS_CPPFLAGS}" || test -n "${CUSTOM_PROCPS_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_PROCPS_LIBS} -l$CUSTOM_PROCPS_NAME" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "getstat"; then - ac_vmw_function=getstat - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_$CUSTOM_PROCPS_NAME''_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -l$CUSTOM_PROCPS_NAME" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -l$CUSTOM_PROCPS_NAME... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-l$CUSTOM_PROCPS_NAME $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - PROCPS_CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS}" - PROCPS_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PROCPS_CPPFLAGS="$ac_vmw_cppflags" - PROCPS_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - have_procps=yes; - - else - true - - fi - - fi - - if test "$have_procps" = "no"; then - - - if test -z "proc-3.2.8"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "PROCPS"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_PROCPS_CPPFLAGS}" || test -n "${CUSTOM_PROCPS_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_PROCPS_LIBS} -lproc-3.2.8" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "getstat"; then - ac_vmw_function=getstat - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_proc-3.2.8_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lproc-3.2.8" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lproc-3.2.8... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lproc-3.2.8 $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - PROCPS_CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS}" - PROCPS_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PROCPS_CPPFLAGS="$ac_vmw_cppflags" - PROCPS_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - have_procps=yes; - - else - true - - fi - - fi - - if test "$have_procps" = "no"; then - - - if test -z "proc-3.2.7"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "PROCPS"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_PROCPS_CPPFLAGS}" || test -n "${CUSTOM_PROCPS_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_PROCPS_LIBS} -lproc-3.2.7" - if test -n ""; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } - -fi -if test $ac_cv_header_ = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "getstat"; then - ac_vmw_function=getstat - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_proc-3.2.7_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -lproc-3.2.7" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -lproc-3.2.7... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lproc-3.2.7 $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - PROCPS_CPPFLAGS="${CUSTOM_PROCPS_CPPFLAGS}" - PROCPS_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - PROCPS_CPPFLAGS="$ac_vmw_cppflags" - PROCPS_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n ""; then - # Extract the first word of "", so it can be a program name with args. -set dummy ; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - PROCPS_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - PROCPS_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - - else - true - { { echo "$as_me:$LINENO: error: libproc not found. Please configure without procps (using --without-procps) or install procps - http://procps.sourceforge.net" >&5 -echo "$as_me: error: libproc not found. Please configure without procps (using --without-procps) or install procps - http://procps.sourceforge.net" >&2;} - { (exit 1); exit 1; }; } - fi - - fi -fi - -if test "$with_procps" != "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define NO_PROCPS 1 -_ACEOF - -fi - - -# Check whether --with-dnet was given. -if test "${with_dnet+set}" = set; then - withval=$with_dnet; -else - with_dnet=yes -fi - - -have_dnet="no" -if test "$with_dnet" = "yes"; then - # On Debian, dnet is installed via the libdumbnet package. We need to - # detect this so that our source files include dumbnet.h instead of - # dnet.h, which is part of a different package altogether. - - - if test -z "dumbnet"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "DNET"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_DNET_CPPFLAGS}" || test -n "${CUSTOM_DNET_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_DNET_LIBS} -ldumbnet" - if test -n "dumbnet.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_DNET_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_dumbnet_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dumbnet.h" >&5 -echo $ECHO_N "checking for dumbnet.h... $ECHO_C" >&6; } -if test "${ac_cv_header_dumbnet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dumbnet_h" >&5 -echo "${ECHO_T}$ac_cv_header_dumbnet_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking dumbnet.h usability" >&5 -echo $ECHO_N "checking dumbnet.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking dumbnet.h presence" >&5 -echo $ECHO_N "checking dumbnet.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: dumbnet.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: dumbnet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: dumbnet.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: dumbnet.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: dumbnet.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: dumbnet.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: dumbnet.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: dumbnet.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: dumbnet.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: dumbnet.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: dumbnet.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for dumbnet.h" >&5 -echo $ECHO_N "checking for dumbnet.h... $ECHO_C" >&6; } -if test "${ac_cv_header_dumbnet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_dumbnet_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dumbnet_h" >&5 -echo "${ECHO_T}$ac_cv_header_dumbnet_h" >&6; } - -fi -if test $ac_cv_header_dumbnet_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "intf_open"; then - ac_vmw_function=intf_open - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_dumbnet_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -ldumbnet" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -ldumbnet... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldumbnet $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - DNET_CPPFLAGS="${CUSTOM_DNET_CPPFLAGS}" - DNET_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - DNET_CPPFLAGS="$ac_vmw_cppflags" - DNET_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n "dumbnet-config"; then - # Extract the first word of "dumbnet-config", so it can be a program name with args. -set dummy dumbnet-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - DNET_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - DNET_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - DNET_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - DNET_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - have_dnet="yes"; - -cat >>confdefs.h <<\_ACEOF -#define DNET_IS_DUMBNET 1 -_ACEOF - - else - true - - fi - - - if test $have_dnet = "no"; then - - - if test -z "dnet"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "DNET"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_DNET_CPPFLAGS}" || test -n "${CUSTOM_DNET_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_DNET_LIBS} -ldnet" - if test -n "dnet.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_DNET_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_dnet_h+set}" = set; then - { echo "$as_me:$LINENO: checking for dnet.h" >&5 -echo $ECHO_N "checking for dnet.h... $ECHO_C" >&6; } -if test "${ac_cv_header_dnet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dnet_h" >&5 -echo "${ECHO_T}$ac_cv_header_dnet_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking dnet.h usability" >&5 -echo $ECHO_N "checking dnet.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking dnet.h presence" >&5 -echo $ECHO_N "checking dnet.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: dnet.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: dnet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: dnet.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: dnet.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: dnet.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: dnet.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: dnet.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: dnet.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: dnet.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: dnet.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: dnet.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for dnet.h" >&5 -echo $ECHO_N "checking for dnet.h... $ECHO_C" >&6; } -if test "${ac_cv_header_dnet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_dnet_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_dnet_h" >&5 -echo "${ECHO_T}$ac_cv_header_dnet_h" >&6; } - -fi -if test $ac_cv_header_dnet_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n "intf_open"; then - ac_vmw_function=intf_open - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_dnet_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -ldnet" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -ldnet... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - DNET_CPPFLAGS="${CUSTOM_DNET_CPPFLAGS}" - DNET_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - DNET_CPPFLAGS="$ac_vmw_cppflags" - DNET_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n "dnet-config"; then - # Extract the first word of "dnet-config", so it can be a program name with args. -set dummy dnet-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - DNET_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - DNET_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - DNET_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - DNET_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - have_dnet="yes" - else - true - - fi - - fi - - if test $have_dnet = "no"; then - { { echo "$as_me:$LINENO: error: dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net" >&5 -echo "$as_me: error: dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -if test "$with_dnet" != "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define NO_DNET 1 -_ACEOF - -fi - - -# Check whether --with-icu was given. -if test "${with_icu+set}" = set; then - withval=$with_icu; -else - with_icu=yes -fi - - -if test "$have_x" = "yes" -o "$with_icu" = "yes"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}$CXX", so it can be a program name with args. -set dummy ${ac_tool_prefix}$CXX; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_have_cxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$have_cxx"; then - ac_cv_prog_have_cxx="$have_cxx" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_have_cxx="${ac_tool_prefix}$CXX" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -have_cxx=$ac_cv_prog_have_cxx -if test -n "$have_cxx"; then - { echo "$as_me:$LINENO: result: $have_cxx" >&5 -echo "${ECHO_T}$have_cxx" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_have_cxx"; then - ac_ct_have_cxx=$have_cxx - # Extract the first word of "$CXX", so it can be a program name with args. -set dummy $CXX; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_have_cxx+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_have_cxx"; then - ac_cv_prog_ac_ct_have_cxx="$ac_ct_have_cxx" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_have_cxx="$CXX" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_have_cxx=$ac_cv_prog_ac_ct_have_cxx -if test -n "$ac_ct_have_cxx"; then - { echo "$as_me:$LINENO: result: $ac_ct_have_cxx" >&5 -echo "${ECHO_T}$ac_ct_have_cxx" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_have_cxx" = x; then - have_cxx="no" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - have_cxx=$ac_ct_have_cxx - fi -else - have_cxx="$ac_cv_prog_have_cxx" -fi - - if test "$have_cxx" = "no"; then - { { echo "$as_me:$LINENO: error: C++ compiler not found. Make sure you have a C++ compiler installed or configure without X11 (using --without-x) and without ICU (using --without-icu)." >&5 -echo "$as_me: error: C++ compiler not found. Make sure you have a C++ compiler installed or configure without X11 (using --without-x) and without ICU (using --without-icu)." >&2;} - { (exit 1); exit 1; }; } - fi -fi - -if test "$with_icu" = "yes"; then - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - if test -z "icuuc"; then - { { echo "$as_me:$LINENO: error: 'library' parameter is required.'" >&5 -echo "$as_me: error: 'library' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - if test -z "ICU"; then - { { echo "$as_me:$LINENO: error: 'lvar' parameter is required.'" >&5 -echo "$as_me: error: 'lvar' parameter is required.'" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_vmw_have_lib=0 - ac_vmw_have_lib_func=0 - ac_vmw_have_lib_header=0 - ac_vmw_custom_libs= - - # - # First, try any user-defined CUSTOM_* flags. - # - if test -n "${CUSTOM_ICU_CPPFLAGS}" || test -n "${CUSTOM_ICU_LIBS}"; then - ac_vmw_custom_libs="${CUSTOM_ICU_LIBS} -licuuc" - if test -n "unicode/utf.h"; then - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CUSTOM_ICU_CPPFLAGS} $CPPFLAGS" - - if test "${ac_cv_header_unicode_utf_h+set}" = set; then - { echo "$as_me:$LINENO: checking for unicode/utf.h" >&5 -echo $ECHO_N "checking for unicode/utf.h... $ECHO_C" >&6; } -if test "${ac_cv_header_unicode_utf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_unicode_utf_h" >&5 -echo "${ECHO_T}$ac_cv_header_unicode_utf_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking unicode/utf.h usability" >&5 -echo $ECHO_N "checking unicode/utf.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking unicode/utf.h presence" >&5 -echo $ECHO_N "checking unicode/utf.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: unicode/utf.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: unicode/utf.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: unicode/utf.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: unicode/utf.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: unicode/utf.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: unicode/utf.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: unicode/utf.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: unicode/utf.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: unicode/utf.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for unicode/utf.h" >&5 -echo $ECHO_N "checking for unicode/utf.h... $ECHO_C" >&6; } -if test "${ac_cv_header_unicode_utf_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_unicode_utf_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_unicode_utf_h" >&5 -echo "${ECHO_T}$ac_cv_header_unicode_utf_h" >&6; } - -fi -if test $ac_cv_header_unicode_utf_h = yes; then - ac_vmw_have_lib_header=1 -fi - - - - CPPFLAGS="$ORIGINAL_CPPFLAGS" - else - ac_vmw_have_lib_header=1 - fi - - # Check a specific function in the library if requested. - # If it hasn't, just pick a random function from libc, just to make - # sure the linker can find the library being tested. - if test $ac_vmw_have_lib_header -eq 1; then - if test -n ""; then - ac_vmw_function= - else - ac_vmw_function=strlen - fi - as_ac_Lib=`echo "ac_cv_lib_icuuc_$ac_vmw_function" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_vmw_function in -licuuc" >&5 -echo $ECHO_N "checking for $ac_vmw_function in -licuuc... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-licuuc $ac_vmw_custom_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_vmw_function (); -int -main () -{ -return $ac_vmw_function (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_Lib=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - ac_vmw_have_lib_func=1 -fi - - fi - - if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then - ICU_CPPFLAGS="${CUSTOM_ICU_CPPFLAGS}" - ICU_LIBS="$ac_vmw_custom_libs" - ac_vmw_have_lib=1 - fi - fi - - # If that didn't work, try with pkg-config. - if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then - if test -n ""; then - { echo "$as_me:$LINENO: checking for >= (via pkg-config)" >&5 -echo $ECHO_N "checking for >= (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ' >= '; then - ac_vmw_have_lib=1 - fi - else - { echo "$as_me:$LINENO: checking for (via pkg-config)" >&5 -echo $ECHO_N "checking for (via pkg-config)... $ECHO_C" >&6; } - if pkg-config --exists ''; then - ac_vmw_have_lib=1 - fi - fi - - if test $ac_vmw_have_lib -eq 1; then - # Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags" - # fails on OpenSolaris B71. So be pessimistic. - ac_vmw_cppflags="`pkg-config --cflags `" - ac_vmw_ret1=$? - ac_vmw_libs="`pkg-config --libs `" - ac_vmw_ret2=$? - if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - ICU_CPPFLAGS="$ac_vmw_cppflags" - ICU_LIBS="$ac_vmw_libs" - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - # If we still haven't found the lib, try with the library's custom "config" script. - # Before checking, flush the AC_PATH_PROG cached variable. - unset ac_cv_path_ac_vmw_lib_cfg - unset ac_vmw_lib_cfg - if test $ac_vmw_have_lib -eq 0 && test -n "icu-config"; then - # Extract the first word of "icu-config", so it can be a program name with args. -set dummy icu-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_vmw_lib_cfg in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no" - ;; -esac -fi -ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg -if test -n "$ac_vmw_lib_cfg"; then - { echo "$as_me:$LINENO: result: $ac_vmw_lib_cfg" >&5 -echo "${ECHO_T}$ac_vmw_lib_cfg" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$ac_vmw_lib_cfg" != "no"; then - # XXX: icu-config does not follow the "--cflags" and "--libs" convention, - # so single it out here to avoid having to replicate all the rest of the - # logic elsewhere. - if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then - ICU_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`" - ICU_LIBS="`$ac_vmw_lib_cfg --ldflags`" - else - ICU_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`" - ICU_LIBS="`$ac_vmw_lib_cfg --libs`" - fi - ac_vmw_have_lib=1 - fi - fi - - # Finish by executing the user provided action. The call to "true" is needed - # because the actions are optional, and we need something inside the block. - if test $ac_vmw_have_lib -eq 1; then - - - true - ICU_CPPFLAGS="$ICU_CPPFLAGS -DUSE_ICU" - else - true - { { echo "$as_me:$LINENO: error: ICU library not found. Please configure without ICU (using --without-icu) or install ICU - http://www.icu-project.org" >&5 -echo "$as_me: error: ICU library not found. Please configure without ICU (using --without-icu) or install ICU - http://www.icu-project.org" >&2;} - { (exit 1); exit 1; }; } - fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - # Check whether we have ICU >= 3.8. - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { echo "$as_me:$LINENO: checking for ucasemap_utf8ToTitle in ICU" >&5 -echo $ECHO_N "checking for ucasemap_utf8ToTitle in ICU... $ECHO_C" >&6; } - ORIGINAL_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $ICU_CPPFLAGS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ - - (void) &ucasemap_utf8ToTitle; - return 0; - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - - ICU_CPPFLAGS="$ICU_CPPFLAGS -DHAVE_ICU_38" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$ORIGINAL_CPPFLAGS" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - # Easier to give all modules the ICU defines/includes... - CPPFLAGS="$CPPFLAGS $ICU_CPPFLAGS" -else - CPPFLAGS="$CPPFLAGS -DNO_ICU" -fi - -# Extract the first word of "rpcgen", so it can be a program name with args. -set dummy rpcgen; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_RPCGEN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $RPCGEN in - [\\/]* | ?:[\\/]*) - ac_cv_path_RPCGEN="$RPCGEN" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_RPCGEN="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_RPCGEN" && ac_cv_path_RPCGEN=" { { echo "$as_me:$LINENO: error: rpcgen not found. Please install the libc devel package." >&5 -echo "$as_me: error: rpcgen not found. Please install the libc devel package." >&2;} - { (exit 1); exit 1; }; } " - ;; -esac -fi -RPCGEN=$ac_cv_path_RPCGEN -if test -n "$RPCGEN"; then - { echo "$as_me:$LINENO: result: $RPCGEN" >&5 -echo "${ECHO_T}$RPCGEN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - -### -### Headers -### - - -for ac_header in crypt.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in inttypes.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in stdint.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in stdlib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in wchar.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/inttypes.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/io.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/param.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - # Required to make the sys/user.h check work correctly on FreeBSD - -for ac_header in sys/sysinfo.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/types.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/user.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef HAVE_SYS_PARAM_H -# include -#endif - - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/vfs.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in syslimits.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in unwind.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -if test "${ac_cv_header_wchar_h+set}" = set; then - { echo "$as_me:$LINENO: checking for wchar.h" >&5 -echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; } -if test "${ac_cv_header_wchar_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking wchar.h usability" >&5 -echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking wchar.h presence" >&5 -echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for wchar.h" >&5 -echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; } -if test "${ac_cv_header_wchar_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_wchar_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; } - -fi -if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H="yes" -else - HAVE_WCHAR_H="no" -fi - - - -if test "$os" = "linux"; then - # Make sure kernel-headers package is installed. - if test "${ac_cv_header_linux_unistd_h+set}" = set; then - { echo "$as_me:$LINENO: checking for linux/unistd.h" >&5 -echo $ECHO_N "checking for linux/unistd.h... $ECHO_C" >&6; } -if test "${ac_cv_header_linux_unistd_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_unistd_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_unistd_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking linux/unistd.h usability" >&5 -echo $ECHO_N "checking linux/unistd.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking linux/unistd.h presence" >&5 -echo $ECHO_N "checking linux/unistd.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: linux/unistd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: linux/unistd.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: linux/unistd.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: linux/unistd.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: linux/unistd.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: linux/unistd.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: linux/unistd.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/unistd.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: linux/unistd.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for linux/unistd.h" >&5 -echo $ECHO_N "checking for linux/unistd.h... $ECHO_C" >&6; } -if test "${ac_cv_header_linux_unistd_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_linux_unistd_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_unistd_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_unistd_h" >&6; } - -fi -if test $ac_cv_header_linux_unistd_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: linux/unistd.h is not found. Please install kernel-headers/linux-userspace-headers/linux-libc-dev package." >&5 -echo "$as_me: error: linux/unistd.h is not found. Please install kernel-headers/linux-userspace-headers/linux-libc-dev package." >&2;} - { (exit 1); exit 1; }; } -fi - - -fi - -if test "$enable_multimon" != "no"; then - { echo "$as_me:$LINENO: checking for X11/extensions/panoramiXproto.h" >&5 -echo $ECHO_N "checking for X11/extensions/panoramiXproto.h... $ECHO_C" >&6; } -if test "${ac_cv_header_X11_extensions_panoramiXproto_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include - -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_X11_extensions_panoramiXproto_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_X11_extensions_panoramiXproto_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_panoramiXproto_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_extensions_panoramiXproto_h" >&6; } -if test $ac_cv_header_X11_extensions_panoramiXproto_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: panoramiXproto.h not found. Please configure without multimon (using --disable-multimon) or install the libXinerama devel package(s)." >&5 -echo "$as_me: error: panoramiXproto.h not found. Please configure without multimon (using --disable-multimon) or install the libXinerama devel package(s)." >&2;} - { (exit 1); exit 1; }; } -fi - - -fi - -bsdPrintfWrappers=no -if test "$os" = "linux"; then - { echo "$as_me:$LINENO: checking for ecvt in -lc" >&5 -echo $ECHO_N "checking for ecvt in -lc... $ECHO_C" >&6; } -if test "${ac_cv_lib_c_ecvt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ecvt (); -int -main () -{ -return ecvt (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_c_ecvt=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_c_ecvt=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_ecvt" >&5 -echo "${ECHO_T}$ac_cv_lib_c_ecvt" >&6; } -if test $ac_cv_lib_c_ecvt = yes; then - bsdPrintfWrappers=yes -fi - -fi - -### -### Typdefs, structs, and compiler quarks. -### -{ echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 -echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; } -if test "${ac_cv_header_stdbool_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifndef bool - "error: bool is not defined" -#endif -#ifndef false - "error: false is not defined" -#endif -#if false - "error: false is not 0" -#endif -#ifndef true - "error: true is not defined" -#endif -#if true != 1 - "error: true is not 1" -#endif -#ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" -#endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - bool e = &s; - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; -# if defined __xlc__ || defined __GNUC__ - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - This test is not quite right, since xlc is allowed to - reject this program, as the initializer for xlcbug is - not one of the forms that C requires support for. - However, doing the test right would require a runtime - test, and that would make cross-compilation harder. - Let us hope that IBM fixes the xlc bug, and also adds - support for this kind of constant expression. In the - meantime, this test will reject xlc, which is OK, since - our stdbool.h substitute should suffice. We also test - this with GCC, where it should work, to detect more - quickly whether someone messes up the test in the - future. */ - char digs[] = "0123456789"; - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); -# endif - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - -int -main () -{ - - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdbool_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdbool_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; } -{ echo "$as_me:$LINENO: checking for _Bool" >&5 -echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } -if test "${ac_cv_type__Bool+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef _Bool ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type__Bool=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type__Bool=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -echo "${ECHO_T}$ac_cv_type__Bool" >&6; } -if test $ac_cv_type__Bool = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 -_ACEOF - - -fi - -if test $ac_cv_header_stdbool_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STDBOOL_H 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_const=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then - -cat >>confdefs.h <<\_ACEOF -#define uid_t int -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define gid_t int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } - - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } -if test "${ac_cv_type_mode_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef mode_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_mode_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_mode_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } -if test $ac_cv_type_mode_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } -if test "${ac_cv_type_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef off_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_off_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_off_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6; } -if test $ac_cv_type_off_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef pid_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_pid_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } -if test $ac_cv_type_pid_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef size_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_size_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } -if test $ac_cv_type_size_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; } -if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (ac_aggr.st_rdev) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_rdev=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (sizeof ac_aggr.st_rdev) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_rdev=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_stat_st_rdev=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; } -if test $ac_cv_member_struct_stat_st_rdev = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_RDEV 1 -_ACEOF - - -fi - -{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } -if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_time=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } -if test "${ac_cv_struct_tm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_struct_tm=time.h -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_struct_tm=sys/time.h -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -cat >>confdefs.h <<\_ACEOF -#define TM_IN_SYS_TIME 1 -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for working volatile" >&5 -echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; } -if test "${ac_cv_c_volatile+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - -volatile int x; -int * volatile y = (int *) 0; -return !x && !y; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_volatile=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_volatile=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 -echo "${ECHO_T}$ac_cv_c_volatile" >&6; } -if test $ac_cv_c_volatile = no; then - -cat >>confdefs.h <<\_ACEOF -#define volatile -_ACEOF - -fi - - -### -### Specific features and OS/arch flags / actions -### - -### General flags / actions -CFLAGS="$CFLAGS -Wall" -CFLAGS="$CFLAGS -Werror" - -# -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident' -# in Xlib.h on OpenSolaris. -# Glib2 keep changing mutex APIs so we also need to disable 'deprecated' -# warnings for now (-Wno-deprecated-declarations). -for TEST_CFLAG in -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing \ - -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations; do - { echo "$as_me:$LINENO: checking for GCC flag $TEST_CFLAG" >&5 -echo $ECHO_N "checking for GCC flag $TEST_CFLAG... $ECHO_C" >&6; } - ORIGINAL_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $TEST_CFLAG" - NEW_CFLAG="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - return 0; - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - NEW_CFLAG=" $TEST_CFLAG" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$ORIGINAL_CFLAGS$NEW_CFLAG" -done -CPPFLAGS="$CPPFLAGS -DVMX86_TOOLS" -CPPFLAGS="$CPPFLAGS" - -# -fvisibility is used by "core service" plugins, but not required. -ORIGINAL_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -fvisibility=hidden" -{ echo "$as_me:$LINENO: checking for GCC flag -fvisibility" >&5 -echo $ECHO_N "checking for GCC flag -fvisibility... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - PLUGIN_CPPFLAGS="-fvisibility=hidden -DGCC_EXPLICIT_EXPORT"; - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -CFLAGS="$ORIGINAL_CFLAGS" - -# Detect "unused-but-set-variable" gcc warning and disable it. -ORIGINAL_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wno-unused-but-set-variable" -{ echo "$as_me:$LINENO: checking for GCC flag -Wno-unused-but-set-variable" >&5 -echo $ECHO_N "checking for GCC flag -Wno-unused-but-set-variable... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ORIGINAL_CFLAGS="$ORIGINAL_CFLAGS -Wno-unused-but-set-variable"; - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -CFLAGS="$ORIGINAL_CFLAGS" - - -BUILDDIR="`pwd`" - -INCLUDE_DIR="`cd $srcdir; pwd`/lib/include" -BLD_INCLUDE_DIR="$BUILDDIR/lib/include" -CPPFLAGS="-I$INCLUDE_DIR -I$BLD_INCLUDE_DIR $CPPFLAGS" - -### -### Documentation. -### - -if test "$enable_docs" = "yes"; then - # Extract the first word of "doxygen", so it can be a program name with args. -set dummy doxygen; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_have_doxygen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$have_doxygen"; then - ac_cv_prog_have_doxygen="$have_doxygen" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_have_doxygen="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_have_doxygen" && ac_cv_prog_have_doxygen="no" -fi -fi -have_doxygen=$ac_cv_prog_have_doxygen -if test -n "$have_doxygen"; then - { echo "$as_me:$LINENO: result: $have_doxygen" >&5 -echo "${ECHO_T}$have_doxygen" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$have_doxygen" = "no"; then - { echo "$as_me:$LINENO: WARNING: doxygen not found; API documentation will not be generated." >&5 -echo "$as_me: WARNING: doxygen not found; API documentation will not be generated." >&2;} - else - # Extract the first word of "dot", so it can be a program name with args. -set dummy dot; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_DOT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $DOT in - [\\/]* | ?:[\\/]*) - ac_cv_path_DOT="$DOT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -DOT=$ac_cv_path_DOT -if test -n "$DOT"; then - { echo "$as_me:$LINENO: result: $DOT" >&5 -echo "${ECHO_T}$DOT" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$DOT" = ""; then - HAVE_DOT=NO - else - DOT=`dirname $DOT` - HAVE_DOT=YES - fi - - - - # Extract the first word of "mscgen", so it can be a program name with args. -set dummy mscgen; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_MSCGEN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MSCGEN in - [\\/]* | ?:[\\/]*) - ac_cv_path_MSCGEN="$MSCGEN" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_MSCGEN="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_MSCGEN" && ac_cv_path_MSCGEN="no" - ;; -esac -fi -MSCGEN=$ac_cv_path_MSCGEN -if test -n "$MSCGEN"; then - { echo "$as_me:$LINENO: result: $MSCGEN" >&5 -echo "${ECHO_T}$MSCGEN" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - if test "$MSCGEN" != "no"; then - MSCGEN_DIR="`dirname $MSCGEN`" - else - MSCGEN_DIR= - fi - - fi -fi - -### -### OS/arch-specific flags / actions -### - -MODULES="" -MODULES_OS="$os" -TARGET_OS="$os" -MODULES_DIR="" -buildHgfsmounter=no - -if test "$os" = "linux"; then - MODULES_DIR="$LINUXDIR/kernel/" - - CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64" - CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500" - CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE" - CPPFLAGS="$CPPFLAGS -D_SVID_SOURCE" - CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE" - - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrt" - - # vmxnet is not supported for kernels 3.3.0 and newer - if test "$osVersion" -lt 303000; then - MODULES="$MODULES vmxnet" - fi - # See if we need vmhgfs module. Starting with 4.0.0 we use FUSE - if test "$osVersion" -lt 400000; then - MODULES="$MODULES vmhgfs" - fi - # See if we need vmci and vsock modules. Starting with 3.9 they made - # their way into mainline kernel. - if test "$osVersion" -lt 309000; then - MODULES="$MODULES vmci vsock" - fi - if test "$osVersion" -lt 300000; then - MODULES="$MODULES vmblock vmsync" - fi - buildHgfsmounter=yes -fi - -if test "$os" = "freebsd" || test "$os" = "kfreebsd-gnu"; then - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lkvm" - MODULES_DIR="/boot/modules" - - if test "$osVersion" -ge 302000; then - MODULES="$MODULES vmmemctl" - fi - if test "$osVersion" -ge 409000; then - MODULES="$MODULES vmxnet" - fi - if test "$osVersion" -ge 600000; then - MODULES="$MODULES vmblock" - fi - - if test "$with_kernel_modules" = "yes"; then - echo "****************************************************************" - echo " You are building FreeBSD kernel modules. Make sure you use " - echo " 'make' to build open-vm-tools, and not GNU make ('gmake'). " - echo "****************************************************************" - fi -fi - -if test "$os" = "solaris"; then - LIB_IMPERSONATE_CPPFLAGS="$LIB_IMPERSONATE_CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" - LIB_USER_CPPFLAGS="$LIB_USER_CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" - - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lsocket" - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lnsl" - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lresolv" - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lrpcsvc" - - # Setup defines to identify the OS version. - if test "$osVersion" -eq 509000; then - CPPFLAGS="$CPPFLAGS -DSOL9" - fi - if test "$osVersion" -eq 510000; then - CPPFLAGS="$CPPFLAGS -DSOL10" - fi - if test "$osVersion" -eq 511000; then - CPPFLAGS="$CPPFLAGS -DSOL11" - fi - - MODULES="$MODULES vmxnet vmmemctl" - - # HGFS and vmblock need Solaris 10 at least. - if test "$osVersion" -ge 510000; then - MODULES="$MODULES vmhgfs vmblock" - fi - - # vmxnet3 is built on Solaris 10 / 11 only if GLDv3 is installed. - if test "$osVersion" -gt 510000; then - if test "${ac_cv_header_sys_mac_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/mac.h" >&5 -echo $ECHO_N "checking for sys/mac.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_mac_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mac_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mac_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/mac.h usability" >&5 -echo $ECHO_N "checking sys/mac.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/mac.h presence" >&5 -echo $ECHO_N "checking sys/mac.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/mac.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/mac.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/mac.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/mac.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/mac.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/mac.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/mac.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/mac.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/mac.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mac.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/mac.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to open-vm-tools-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/mac.h" >&5 -echo $ECHO_N "checking for sys/mac.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_mac_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_mac_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mac_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mac_h" >&6; } - -fi -if test $ac_cv_header_sys_mac_h = yes; then - MODULES="$MODULES vmxnet3" -else - { echo "$as_me:$LINENO: WARNING: GLDv3 (sys/mac.h) is not installed, vmxnet3 will not be compiled." >&5 -echo "$as_me: WARNING: GLDv3 (sys/mac.h) is not installed, vmxnet3 will not be compiled." >&2;} -fi - - - fi - - if test "$with_kernel_modules" = "yes"; then - echo "****************************************************************" - echo " You are building Solaris kernel modules. Make sure you use " - echo " GNU make to build open-vm-tools. " - echo "****************************************************************" - fi -fi - - if test "$buildHgfsmounter" = "yes"; then - BUILD_HGFSMOUNTER_TRUE= - BUILD_HGFSMOUNTER_FALSE='#' -else - BUILD_HGFSMOUNTER_TRUE='#' - BUILD_HGFSMOUNTER_FALSE= -fi - - if test "$os" = "linux"; then - LINUX_TRUE= - LINUX_FALSE='#' -else - LINUX_TRUE='#' - LINUX_FALSE= -fi - - if test "$os" = "solaris"; then - SOLARIS_TRUE= - SOLARIS_FALSE='#' -else - SOLARIS_TRUE='#' - SOLARIS_FALSE= -fi - - if test "$os" = "freebsd" -o "$os" = "kfreebsd-gnu"; then - FREEBSD_TRUE= - FREEBSD_FALSE='#' -else - FREEBSD_TRUE='#' - FREEBSD_FALSE= -fi - - if test \( "$os" = "freebsd" -o "$os" = "kfreebsd-gnu" \) -a -n "$SYSDIR"; then - FREEBSD_CUSTOM_SYSDIR_TRUE= - FREEBSD_CUSTOM_SYSDIR_FALSE='#' -else - FREEBSD_CUSTOM_SYSDIR_TRUE='#' - FREEBSD_CUSTOM_SYSDIR_FALSE= -fi - - if test "$userSpaceBitness" = "32"; then - THIRTY_TWO_BIT_USERSPACE_TRUE= - THIRTY_TWO_BIT_USERSPACE_FALSE='#' -else - THIRTY_TWO_BIT_USERSPACE_TRUE='#' - THIRTY_TWO_BIT_USERSPACE_FALSE= -fi - - if test "$have_x" = "yes"; then - HAVE_X11_TRUE= - HAVE_X11_FALSE='#' -else - HAVE_X11_TRUE='#' - HAVE_X11_FALSE= -fi - - if test "$with_icu" = "yes"; then - HAVE_ICU_TRUE= - HAVE_ICU_FALSE='#' -else - HAVE_ICU_TRUE='#' - HAVE_ICU_FALSE= -fi - - if test "$with_kernel_modules" = "yes"; then - WITH_KERNEL_MODULES_TRUE= - WITH_KERNEL_MODULES_FALSE='#' -else - WITH_KERNEL_MODULES_TRUE='#' - WITH_KERNEL_MODULES_FALSE= -fi - - if test "$have_xsm" = "yes"; then - HAVE_XSM_TRUE= - HAVE_XSM_FALSE='#' -else - HAVE_XSM_TRUE='#' - HAVE_XSM_FALSE= -fi - - if test "$have_xcomposite" = "yes"; then - HAVE_XCOMPOSITE_TRUE= - HAVE_XCOMPOSITE_FALSE='#' -else - HAVE_XCOMPOSITE_TRUE='#' - HAVE_XCOMPOSITE_FALSE= -fi - - if test "$have_cunit" = "yes"; then - ENABLE_TESTS_TRUE= - ENABLE_TESTS_FALSE='#' -else - ENABLE_TESTS_TRUE='#' - ENABLE_TESTS_FALSE= -fi - - if test "$with_root_privileges" = "yes"; then - WITH_ROOT_PRIVILEGES_TRUE= - WITH_ROOT_PRIVILEGES_FALSE='#' -else - WITH_ROOT_PRIVILEGES_TRUE='#' - WITH_ROOT_PRIVILEGES_FALSE= -fi - - if test "$have_dnet" = "yes"; then - HAVE_DNET_TRUE= - HAVE_DNET_FALSE='#' -else - HAVE_DNET_TRUE='#' - HAVE_DNET_FALSE= -fi - - if test "$have_doxygen" = "yes"; then - HAVE_DOXYGEN_TRUE= - HAVE_DOXYGEN_FALSE='#' -else - HAVE_DOXYGEN_TRUE='#' - HAVE_DOXYGEN_FALSE= -fi - - if test "$have_fuse" = "yes"; then - HAVE_FUSE_TRUE= - HAVE_FUSE_FALSE='#' -else - HAVE_FUSE_TRUE='#' - HAVE_FUSE_FALSE= -fi - - if test "$with_gnu_ld" = "yes"; then - HAVE_GNU_LD_TRUE= - HAVE_GNU_LD_FALSE='#' -else - HAVE_GNU_LD_TRUE='#' - HAVE_GNU_LD_FALSE= -fi - - if test "$have_x" = "yes" -a "$with_gtkmm" = "yes"; then - HAVE_GTKMM_TRUE= - HAVE_GTKMM_FALSE='#' -else - HAVE_GTKMM_TRUE='#' - HAVE_GTKMM_FALSE= -fi - - if test "$with_pam" = "yes"; then - HAVE_PAM_TRUE= - HAVE_PAM_FALSE='#' -else - HAVE_PAM_TRUE='#' - HAVE_PAM_FALSE= -fi - - if test "$os" = "linux"; then - USE_SLASH_PROC_TRUE= - USE_SLASH_PROC_FALSE='#' -else - USE_SLASH_PROC_TRUE='#' - USE_SLASH_PROC_FALSE= -fi - - if test "$bsdPrintfWrappers" = "yes"; then - USE_PRINTF_WRAPPERS_TRUE= - USE_PRINTF_WRAPPERS_FALSE='#' -else - USE_PRINTF_WRAPPERS_TRUE='#' - USE_PRINTF_WRAPPERS_FALSE= -fi - - if test "$enable_deploypkg" = "yes"; then - ENABLE_DEPLOYPKG_TRUE= - ENABLE_DEPLOYPKG_FALSE='#' -else - ENABLE_DEPLOYPKG_TRUE='#' - ENABLE_DEPLOYPKG_FALSE= -fi - - if test "$enable_grabbitmqproxy" = "yes"; then - ENABLE_GRABBITMQPROXY_TRUE= - ENABLE_GRABBITMQPROXY_FALSE='#' -else - ENABLE_GRABBITMQPROXY_TRUE='#' - ENABLE_GRABBITMQPROXY_FALSE= -fi - - if test "$enable_vgauth" = "yes"; then - ENABLE_VGAUTH_TRUE= - ENABLE_VGAUTH_FALSE='#' -else - ENABLE_VGAUTH_TRUE='#' - ENABLE_VGAUTH_FALSE= -fi - - if test "$os" = "linux"; then - HAVE_VSOCK_TRUE= - HAVE_VSOCK_FALSE='#' -else - HAVE_VSOCK_TRUE='#' - HAVE_VSOCK_FALSE= -fi - - -if test "$have_xsm" != "yes"; then -cat >>confdefs.h <<\_ACEOF -#define NO_XSM 1 -_ACEOF - -fi - -if test "$have_xcomposite" != "yes"; then - cat >>confdefs.h <<\_ACEOF -#define NO_XCOMPOSITE 1 -_ACEOF - -fi - -### Feature-specific flags / actions -# Combine where possible - -# If control reaches this point and multimon is still enabled, then we know -# all of the tests for required components have passed and it's safe to allow -# multimon. Otherwise, it should be disabled. -if test "$enable_multimon" = "no"; then - # XXX: For consistency, change this to ENABLE_MULTIMON. This will require - # some additional code cleanup. - -cat >>confdefs.h <<\_ACEOF -#define NO_MULTIMON 1 -_ACEOF - -fi - -LIB_AUTH_CPPFLAGS="$LIB_AUTH_CPPFLAGS $PAM_CPPFLAGS" -if test "$HAVE_CRYPT" = "yes"; then - LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lcrypt" - VIX_LIBADD="$VIX_LIBADD -lcrypt" -fi - - -LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD $THREAD_LIB" -VIX_LIBADD="$VIX_LIBADD $THREAD_LIB" - -### Core Services definitions. - -HGFS_LIBS="$BUILDDIR/libhgfs/libhgfs.la" - -VMTOOLS_LIBS="$BUILDDIR/libvmtools/libvmtools.la $GLIB2_LIBS" -VMTOOLS_CPPFLAGS="-DVMTOOLS_USE_GLIB $GLIB2_CPPFLAGS" - -PLUGIN_CPPFLAGS="$VMTOOLS_CPPFLAGS $PLUGIN_CPPFLAGS" -PLUGIN_LDFLAGS="-Wl,-z,defs -Wl,-lc -shared -module -avoid-version" - -# In Solaris, the XDR-related functions are not in libc like in Linux and -# FreeBSD, so binaries need to be linked to some extra libraries. -XDR_LIBS= -if test "$os" = "solaris"; then - XDR_LIBS="-lnsl -lrpcsvc" -fi - -# Installation directories for core services plugins. -TEST_PLUGIN_INSTALLDIR=$datadir/open-vm-tools/tests -COMMON_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/common -VMSVC_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmsvc -VMUSR_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmusr - -# General definitions -INSTVMSG='$(SHELL) $(top_srcdir)/scripts/build/instvmsg.sh' -RPCGEN_WRAPPER='$(SHELL) $(top_builddir)/scripts/build/rpcgen_wrapper.sh' - -### General substs - - - - - - - - - - - - - - - - - - - - - - - -if test "$os" = "freebsd" -a -n "$SYSDIR"; then - # If SYSDIR is not defined, AC_SUBST expands to nothing, so we need something - # inside this block. - true - -fi - - - -### Lib substs - - - - - - -### Program substs - - - - -### -### Create the Makefiles -### -ac_config_files="$ac_config_files Makefile lib/Makefile lib/appUtil/Makefile lib/auth/Makefile lib/backdoor/Makefile lib/asyncsocket/Makefile lib/sslDirect/Makefile lib/pollGtk/Makefile lib/poll/Makefile lib/dataMap/Makefile lib/hashMap/Makefile lib/dict/Makefile lib/dynxdr/Makefile lib/err/Makefile lib/file/Makefile lib/foundryMsg/Makefile lib/glibUtils/Makefile lib/guestApp/Makefile lib/guestRpc/Makefile lib/hgfs/Makefile lib/hgfsBd/Makefile lib/hgfsHelper/Makefile lib/hgfsServer/Makefile lib/hgfsServerManagerGuest/Makefile lib/hgfsServerPolicyGuest/Makefile lib/hgfsUri/Makefile lib/impersonate/Makefile lib/lock/Makefile lib/message/Makefile lib/misc/Makefile lib/netUtil/Makefile lib/nicInfo/Makefile lib/panic/Makefile lib/panicDefault/Makefile lib/procMgr/Makefile lib/rpcChannel/Makefile lib/rpcIn/Makefile lib/rpcOut/Makefile lib/rpcVmx/Makefile lib/slashProc/Makefile lib/string/Makefile lib/stubs/Makefile lib/syncDriver/Makefile lib/system/Makefile lib/unicode/Makefile lib/user/Makefile lib/vmCheck/Makefile lib/vmSignal/Makefile lib/wiper/Makefile lib/xdg/Makefile services/Makefile services/vmtoolsd/Makefile services/plugins/Makefile services/plugins/desktopEvents/Makefile services/plugins/dndcp/Makefile services/plugins/grabbitmqProxy/Makefile services/plugins/guestInfo/Makefile services/plugins/hgfsServer/Makefile services/plugins/powerOps/Makefile services/plugins/resolutionSet/Makefile services/plugins/timeSync/Makefile services/plugins/vix/Makefile services/plugins/vmbackup/Makefile services/plugins/deployPkg/Makefile vmware-user-suid-wrapper/Makefile toolbox/Makefile hgfsclient/Makefile hgfsmounter/Makefile checkvm/Makefile rpctool/Makefile guestproxycerttool/Makefile vgauth/Makefile vgauth/lib/Makefile vgauth/cli/Makefile vgauth/service/Makefile libguestlib/Makefile libguestlib/vmguestlib.pc libDeployPkg/Makefile libDeployPkg/libDeployPkg.pc libhgfs/Makefile libvmtools/Makefile xferlogs/Makefile modules/Makefile vmblock-fuse/Makefile vmhgfs-fuse/Makefile vmblockmounter/Makefile tests/Makefile tests/vmrpcdbg/Makefile tests/testDebug/Makefile tests/testPlugin/Makefile tests/testVmblock/Makefile docs/Makefile docs/api/Makefile scripts/Makefile scripts/build/rpcgen_wrapper.sh" - - -### -### Output -### -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${BUILD_HGFSMOUNTER_TRUE}" && test -z "${BUILD_HGFSMOUNTER_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_HGFSMOUNTER\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_HGFSMOUNTER\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${LINUX_TRUE}" && test -z "${LINUX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"LINUX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"LINUX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${SOLARIS_TRUE}" && test -z "${SOLARIS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"SOLARIS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"SOLARIS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${FREEBSD_TRUE}" && test -z "${FREEBSD_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"FREEBSD\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"FREEBSD\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${FREEBSD_CUSTOM_SYSDIR_TRUE}" && test -z "${FREEBSD_CUSTOM_SYSDIR_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"FREEBSD_CUSTOM_SYSDIR\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"FREEBSD_CUSTOM_SYSDIR\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${THIRTY_TWO_BIT_USERSPACE_TRUE}" && test -z "${THIRTY_TWO_BIT_USERSPACE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"THIRTY_TWO_BIT_USERSPACE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"THIRTY_TWO_BIT_USERSPACE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_X11_TRUE}" && test -z "${HAVE_X11_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_X11\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_X11\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_ICU_TRUE}" && test -z "${HAVE_ICU_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_ICU\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_ICU\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WITH_KERNEL_MODULES_TRUE}" && test -z "${WITH_KERNEL_MODULES_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"WITH_KERNEL_MODULES\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"WITH_KERNEL_MODULES\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_XSM_TRUE}" && test -z "${HAVE_XSM_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_XSM\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_XSM\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_XCOMPOSITE_TRUE}" && test -z "${HAVE_XCOMPOSITE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_XCOMPOSITE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_XCOMPOSITE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_TESTS_TRUE}" && test -z "${ENABLE_TESTS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"ENABLE_TESTS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"ENABLE_TESTS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${WITH_ROOT_PRIVILEGES_TRUE}" && test -z "${WITH_ROOT_PRIVILEGES_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"WITH_ROOT_PRIVILEGES\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"WITH_ROOT_PRIVILEGES\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_DNET_TRUE}" && test -z "${HAVE_DNET_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_DNET\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_DNET\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_DOXYGEN\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_DOXYGEN\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_FUSE_TRUE}" && test -z "${HAVE_FUSE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_FUSE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_FUSE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_GNU_LD_TRUE}" && test -z "${HAVE_GNU_LD_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_GNU_LD\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_GNU_LD\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_GTKMM_TRUE}" && test -z "${HAVE_GTKMM_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_GTKMM\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_GTKMM\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_PAM_TRUE}" && test -z "${HAVE_PAM_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_PAM\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_PAM\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${USE_SLASH_PROC_TRUE}" && test -z "${USE_SLASH_PROC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"USE_SLASH_PROC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"USE_SLASH_PROC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${USE_PRINTF_WRAPPERS_TRUE}" && test -z "${USE_PRINTF_WRAPPERS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"USE_PRINTF_WRAPPERS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"USE_PRINTF_WRAPPERS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_DEPLOYPKG_TRUE}" && test -z "${ENABLE_DEPLOYPKG_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"ENABLE_DEPLOYPKG\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"ENABLE_DEPLOYPKG\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_GRABBITMQPROXY_TRUE}" && test -z "${ENABLE_GRABBITMQPROXY_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"ENABLE_GRABBITMQPROXY\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"ENABLE_GRABBITMQPROXY\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${ENABLE_VGAUTH_TRUE}" && test -z "${ENABLE_VGAUTH_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"ENABLE_VGAUTH\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"ENABLE_VGAUTH\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_VSOCK_TRUE}" && test -z "${HAVE_VSOCK_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_VSOCK\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_VSOCK\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by open-vm-tools $as_me 10.0.5, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -open-vm-tools config.status 10.0.5 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_ld_CXX \ -hardcode_libdir_separator_CXX \ -fix_srcfile_path_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "lib/appUtil/Makefile") CONFIG_FILES="$CONFIG_FILES lib/appUtil/Makefile" ;; - "lib/auth/Makefile") CONFIG_FILES="$CONFIG_FILES lib/auth/Makefile" ;; - "lib/backdoor/Makefile") CONFIG_FILES="$CONFIG_FILES lib/backdoor/Makefile" ;; - "lib/asyncsocket/Makefile") CONFIG_FILES="$CONFIG_FILES lib/asyncsocket/Makefile" ;; - "lib/sslDirect/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sslDirect/Makefile" ;; - "lib/pollGtk/Makefile") CONFIG_FILES="$CONFIG_FILES lib/pollGtk/Makefile" ;; - "lib/poll/Makefile") CONFIG_FILES="$CONFIG_FILES lib/poll/Makefile" ;; - "lib/dataMap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dataMap/Makefile" ;; - "lib/hashMap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hashMap/Makefile" ;; - "lib/dict/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dict/Makefile" ;; - "lib/dynxdr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/dynxdr/Makefile" ;; - "lib/err/Makefile") CONFIG_FILES="$CONFIG_FILES lib/err/Makefile" ;; - "lib/file/Makefile") CONFIG_FILES="$CONFIG_FILES lib/file/Makefile" ;; - "lib/foundryMsg/Makefile") CONFIG_FILES="$CONFIG_FILES lib/foundryMsg/Makefile" ;; - "lib/glibUtils/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glibUtils/Makefile" ;; - "lib/guestApp/Makefile") CONFIG_FILES="$CONFIG_FILES lib/guestApp/Makefile" ;; - "lib/guestRpc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/guestRpc/Makefile" ;; - "lib/hgfs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfs/Makefile" ;; - "lib/hgfsBd/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsBd/Makefile" ;; - "lib/hgfsHelper/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsHelper/Makefile" ;; - "lib/hgfsServer/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServer/Makefile" ;; - "lib/hgfsServerManagerGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerManagerGuest/Makefile" ;; - "lib/hgfsServerPolicyGuest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsServerPolicyGuest/Makefile" ;; - "lib/hgfsUri/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hgfsUri/Makefile" ;; - "lib/impersonate/Makefile") CONFIG_FILES="$CONFIG_FILES lib/impersonate/Makefile" ;; - "lib/lock/Makefile") CONFIG_FILES="$CONFIG_FILES lib/lock/Makefile" ;; - "lib/message/Makefile") CONFIG_FILES="$CONFIG_FILES lib/message/Makefile" ;; - "lib/misc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/misc/Makefile" ;; - "lib/netUtil/Makefile") CONFIG_FILES="$CONFIG_FILES lib/netUtil/Makefile" ;; - "lib/nicInfo/Makefile") CONFIG_FILES="$CONFIG_FILES lib/nicInfo/Makefile" ;; - "lib/panic/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panic/Makefile" ;; - "lib/panicDefault/Makefile") CONFIG_FILES="$CONFIG_FILES lib/panicDefault/Makefile" ;; - "lib/procMgr/Makefile") CONFIG_FILES="$CONFIG_FILES lib/procMgr/Makefile" ;; - "lib/rpcChannel/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcChannel/Makefile" ;; - "lib/rpcIn/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcIn/Makefile" ;; - "lib/rpcOut/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcOut/Makefile" ;; - "lib/rpcVmx/Makefile") CONFIG_FILES="$CONFIG_FILES lib/rpcVmx/Makefile" ;; - "lib/slashProc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/slashProc/Makefile" ;; - "lib/string/Makefile") CONFIG_FILES="$CONFIG_FILES lib/string/Makefile" ;; - "lib/stubs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/stubs/Makefile" ;; - "lib/syncDriver/Makefile") CONFIG_FILES="$CONFIG_FILES lib/syncDriver/Makefile" ;; - "lib/system/Makefile") CONFIG_FILES="$CONFIG_FILES lib/system/Makefile" ;; - "lib/unicode/Makefile") CONFIG_FILES="$CONFIG_FILES lib/unicode/Makefile" ;; - "lib/user/Makefile") CONFIG_FILES="$CONFIG_FILES lib/user/Makefile" ;; - "lib/vmCheck/Makefile") CONFIG_FILES="$CONFIG_FILES lib/vmCheck/Makefile" ;; - "lib/vmSignal/Makefile") CONFIG_FILES="$CONFIG_FILES lib/vmSignal/Makefile" ;; - "lib/wiper/Makefile") CONFIG_FILES="$CONFIG_FILES lib/wiper/Makefile" ;; - "lib/xdg/Makefile") CONFIG_FILES="$CONFIG_FILES lib/xdg/Makefile" ;; - "services/Makefile") CONFIG_FILES="$CONFIG_FILES services/Makefile" ;; - "services/vmtoolsd/Makefile") CONFIG_FILES="$CONFIG_FILES services/vmtoolsd/Makefile" ;; - "services/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/Makefile" ;; - "services/plugins/desktopEvents/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/desktopEvents/Makefile" ;; - "services/plugins/dndcp/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/dndcp/Makefile" ;; - "services/plugins/grabbitmqProxy/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/grabbitmqProxy/Makefile" ;; - "services/plugins/guestInfo/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/guestInfo/Makefile" ;; - "services/plugins/hgfsServer/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/hgfsServer/Makefile" ;; - "services/plugins/powerOps/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/powerOps/Makefile" ;; - "services/plugins/resolutionSet/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/resolutionSet/Makefile" ;; - "services/plugins/timeSync/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/timeSync/Makefile" ;; - "services/plugins/vix/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/vix/Makefile" ;; - "services/plugins/vmbackup/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/vmbackup/Makefile" ;; - "services/plugins/deployPkg/Makefile") CONFIG_FILES="$CONFIG_FILES services/plugins/deployPkg/Makefile" ;; - "vmware-user-suid-wrapper/Makefile") CONFIG_FILES="$CONFIG_FILES vmware-user-suid-wrapper/Makefile" ;; - "toolbox/Makefile") CONFIG_FILES="$CONFIG_FILES toolbox/Makefile" ;; - "hgfsclient/Makefile") CONFIG_FILES="$CONFIG_FILES hgfsclient/Makefile" ;; - "hgfsmounter/Makefile") CONFIG_FILES="$CONFIG_FILES hgfsmounter/Makefile" ;; - "checkvm/Makefile") CONFIG_FILES="$CONFIG_FILES checkvm/Makefile" ;; - "rpctool/Makefile") CONFIG_FILES="$CONFIG_FILES rpctool/Makefile" ;; - "guestproxycerttool/Makefile") CONFIG_FILES="$CONFIG_FILES guestproxycerttool/Makefile" ;; - "vgauth/Makefile") CONFIG_FILES="$CONFIG_FILES vgauth/Makefile" ;; - "vgauth/lib/Makefile") CONFIG_FILES="$CONFIG_FILES vgauth/lib/Makefile" ;; - "vgauth/cli/Makefile") CONFIG_FILES="$CONFIG_FILES vgauth/cli/Makefile" ;; - "vgauth/service/Makefile") CONFIG_FILES="$CONFIG_FILES vgauth/service/Makefile" ;; - "libguestlib/Makefile") CONFIG_FILES="$CONFIG_FILES libguestlib/Makefile" ;; - "libguestlib/vmguestlib.pc") CONFIG_FILES="$CONFIG_FILES libguestlib/vmguestlib.pc" ;; - "libDeployPkg/Makefile") CONFIG_FILES="$CONFIG_FILES libDeployPkg/Makefile" ;; - "libDeployPkg/libDeployPkg.pc") CONFIG_FILES="$CONFIG_FILES libDeployPkg/libDeployPkg.pc" ;; - "libhgfs/Makefile") CONFIG_FILES="$CONFIG_FILES libhgfs/Makefile" ;; - "libvmtools/Makefile") CONFIG_FILES="$CONFIG_FILES libvmtools/Makefile" ;; - "xferlogs/Makefile") CONFIG_FILES="$CONFIG_FILES xferlogs/Makefile" ;; - "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; - "vmblock-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmblock-fuse/Makefile" ;; - "vmhgfs-fuse/Makefile") CONFIG_FILES="$CONFIG_FILES vmhgfs-fuse/Makefile" ;; - "vmblockmounter/Makefile") CONFIG_FILES="$CONFIG_FILES vmblockmounter/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "tests/vmrpcdbg/Makefile") CONFIG_FILES="$CONFIG_FILES tests/vmrpcdbg/Makefile" ;; - "tests/testDebug/Makefile") CONFIG_FILES="$CONFIG_FILES tests/testDebug/Makefile" ;; - "tests/testPlugin/Makefile") CONFIG_FILES="$CONFIG_FILES tests/testPlugin/Makefile" ;; - "tests/testVmblock/Makefile") CONFIG_FILES="$CONFIG_FILES tests/testVmblock/Makefile" ;; - "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; - "docs/api/Makefile") CONFIG_FILES="$CONFIG_FILES docs/api/Makefile" ;; - "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; - "scripts/build/rpcgen_wrapper.sh") CONFIG_FILES="$CONFIG_FILES scripts/build/rpcgen_wrapper.sh" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -CPP!$CPP$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -SED!$SED$ac_delim -LN_S!$LN_S$ac_delim -LIBTOOL!$LIBTOOL$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -FGREP!$FGREP$ac_delim -LD!$LD$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -DUMPBIN!$DUMPBIN$ac_delim -ac_ct_DUMPBIN!$ac_ct_DUMPBIN$ac_delim -NM!$NM$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -lt_ECHO!$lt_ECHO$ac_delim -DSYMUTIL!$DSYMUTIL$ac_delim -NMEDIT!$NMEDIT$ac_delim -CXXCPP!$CXXCPP$ac_delim -HAVE_PKG_CONFIG!$HAVE_PKG_CONFIG$ac_delim -XMKMF!$XMKMF$ac_delim -X_CFLAGS!$X_CFLAGS$ac_delim -X_PRE_LIBS!$X_PRE_LIBS$ac_delim -X_LIBS!$X_LIBS$ac_delim -X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim -ac_vmw_lib_cfg!$ac_vmw_lib_cfg$ac_delim -MSPACK_CPPFLAGS!$MSPACK_CPPFLAGS$ac_delim -MSPACK_LIBS!$MSPACK_LIBS$ac_delim -GLIB2_CPPFLAGS!$GLIB2_CPPFLAGS$ac_delim -GLIB2_LIBS!$GLIB2_LIBS$ac_delim -GMODULE_CPPFLAGS!$GMODULE_CPPFLAGS$ac_delim -GMODULE_LIBS!$GMODULE_LIBS$ac_delim -GOBJECT_CPPFLAGS!$GOBJECT_CPPFLAGS$ac_delim -GOBJECT_LIBS!$GOBJECT_LIBS$ac_delim -GTHREAD_CPPFLAGS!$GTHREAD_CPPFLAGS$ac_delim -GTHREAD_LIBS!$GTHREAD_LIBS$ac_delim -have_genmarshal!$have_genmarshal$ac_delim -FUSE_CPPFLAGS!$FUSE_CPPFLAGS$ac_delim -FUSE_LIBS!$FUSE_LIBS$ac_delim -PAM_CPPFLAGS!$PAM_CPPFLAGS$ac_delim -PAM_LIBS!$PAM_LIBS$ac_delim -SSL_CPPFLAGS!$SSL_CPPFLAGS$ac_delim -SSL_LIBS!$SSL_LIBS$ac_delim -XERCES_CPPFLAGS!$XERCES_CPPFLAGS$ac_delim -XERCES_LIBS!$XERCES_LIBS$ac_delim -XMLSECURITY_CPPFLAGS!$XMLSECURITY_CPPFLAGS$ac_delim -XMLSECURITY_LIBS!$XMLSECURITY_LIBS$ac_delim -CUNIT_CPPFLAGS!$CUNIT_CPPFLAGS$ac_delim -CUNIT_LIBS!$CUNIT_LIBS$ac_delim -GTK_CPPFLAGS!$GTK_CPPFLAGS$ac_delim -GTK_LIBS!$GTK_LIBS$ac_delim -GTKMM_CPPFLAGS!$GTKMM_CPPFLAGS$ac_delim -GTKMM_LIBS!$GTKMM_LIBS$ac_delim -PROCPS_CPPFLAGS!$PROCPS_CPPFLAGS$ac_delim -PROCPS_LIBS!$PROCPS_LIBS$ac_delim -DNET_CPPFLAGS!$DNET_CPPFLAGS$ac_delim -DNET_LIBS!$DNET_LIBS$ac_delim -have_cxx!$have_cxx$ac_delim -ICU_CPPFLAGS!$ICU_CPPFLAGS$ac_delim -ICU_LIBS!$ICU_LIBS$ac_delim -RPCGEN!$RPCGEN$ac_delim -have_doxygen!$have_doxygen$ac_delim -DOT!$DOT$ac_delim -HAVE_DOT!$HAVE_DOT$ac_delim -MSCGEN!$MSCGEN$ac_delim -MSCGEN_DIR!$MSCGEN_DIR$ac_delim -BUILD_HGFSMOUNTER_TRUE!$BUILD_HGFSMOUNTER_TRUE$ac_delim -BUILD_HGFSMOUNTER_FALSE!$BUILD_HGFSMOUNTER_FALSE$ac_delim -LINUX_TRUE!$LINUX_TRUE$ac_delim -LINUX_FALSE!$LINUX_FALSE$ac_delim -SOLARIS_TRUE!$SOLARIS_TRUE$ac_delim -SOLARIS_FALSE!$SOLARIS_FALSE$ac_delim -FREEBSD_TRUE!$FREEBSD_TRUE$ac_delim -FREEBSD_FALSE!$FREEBSD_FALSE$ac_delim -FREEBSD_CUSTOM_SYSDIR_TRUE!$FREEBSD_CUSTOM_SYSDIR_TRUE$ac_delim -FREEBSD_CUSTOM_SYSDIR_FALSE!$FREEBSD_CUSTOM_SYSDIR_FALSE$ac_delim -THIRTY_TWO_BIT_USERSPACE_TRUE!$THIRTY_TWO_BIT_USERSPACE_TRUE$ac_delim -THIRTY_TWO_BIT_USERSPACE_FALSE!$THIRTY_TWO_BIT_USERSPACE_FALSE$ac_delim -HAVE_X11_TRUE!$HAVE_X11_TRUE$ac_delim -HAVE_X11_FALSE!$HAVE_X11_FALSE$ac_delim -HAVE_ICU_TRUE!$HAVE_ICU_TRUE$ac_delim -HAVE_ICU_FALSE!$HAVE_ICU_FALSE$ac_delim -WITH_KERNEL_MODULES_TRUE!$WITH_KERNEL_MODULES_TRUE$ac_delim -WITH_KERNEL_MODULES_FALSE!$WITH_KERNEL_MODULES_FALSE$ac_delim -HAVE_XSM_TRUE!$HAVE_XSM_TRUE$ac_delim -HAVE_XSM_FALSE!$HAVE_XSM_FALSE$ac_delim -HAVE_XCOMPOSITE_TRUE!$HAVE_XCOMPOSITE_TRUE$ac_delim -HAVE_XCOMPOSITE_FALSE!$HAVE_XCOMPOSITE_FALSE$ac_delim -ENABLE_TESTS_TRUE!$ENABLE_TESTS_TRUE$ac_delim -ENABLE_TESTS_FALSE!$ENABLE_TESTS_FALSE$ac_delim -WITH_ROOT_PRIVILEGES_TRUE!$WITH_ROOT_PRIVILEGES_TRUE$ac_delim -WITH_ROOT_PRIVILEGES_FALSE!$WITH_ROOT_PRIVILEGES_FALSE$ac_delim -HAVE_DNET_TRUE!$HAVE_DNET_TRUE$ac_delim -HAVE_DNET_FALSE!$HAVE_DNET_FALSE$ac_delim -HAVE_DOXYGEN_TRUE!$HAVE_DOXYGEN_TRUE$ac_delim -HAVE_DOXYGEN_FALSE!$HAVE_DOXYGEN_FALSE$ac_delim -HAVE_FUSE_TRUE!$HAVE_FUSE_TRUE$ac_delim -HAVE_FUSE_FALSE!$HAVE_FUSE_FALSE$ac_delim -HAVE_GNU_LD_TRUE!$HAVE_GNU_LD_TRUE$ac_delim -HAVE_GNU_LD_FALSE!$HAVE_GNU_LD_FALSE$ac_delim -HAVE_GTKMM_TRUE!$HAVE_GTKMM_TRUE$ac_delim -HAVE_GTKMM_FALSE!$HAVE_GTKMM_FALSE$ac_delim -HAVE_PAM_TRUE!$HAVE_PAM_TRUE$ac_delim -HAVE_PAM_FALSE!$HAVE_PAM_FALSE$ac_delim -USE_SLASH_PROC_TRUE!$USE_SLASH_PROC_TRUE$ac_delim -USE_SLASH_PROC_FALSE!$USE_SLASH_PROC_FALSE$ac_delim -USE_PRINTF_WRAPPERS_TRUE!$USE_PRINTF_WRAPPERS_TRUE$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -USE_PRINTF_WRAPPERS_FALSE!$USE_PRINTF_WRAPPERS_FALSE$ac_delim -ENABLE_DEPLOYPKG_TRUE!$ENABLE_DEPLOYPKG_TRUE$ac_delim -ENABLE_DEPLOYPKG_FALSE!$ENABLE_DEPLOYPKG_FALSE$ac_delim -ENABLE_GRABBITMQPROXY_TRUE!$ENABLE_GRABBITMQPROXY_TRUE$ac_delim -ENABLE_GRABBITMQPROXY_FALSE!$ENABLE_GRABBITMQPROXY_FALSE$ac_delim -ENABLE_VGAUTH_TRUE!$ENABLE_VGAUTH_TRUE$ac_delim -ENABLE_VGAUTH_FALSE!$ENABLE_VGAUTH_FALSE$ac_delim -HAVE_VSOCK_TRUE!$HAVE_VSOCK_TRUE$ac_delim -HAVE_VSOCK_FALSE!$HAVE_VSOCK_FALSE$ac_delim -HGFS_LIBS!$HGFS_LIBS$ac_delim -TOOLS_VERSION!$TOOLS_VERSION$ac_delim -TARGET_OS!$TARGET_OS$ac_delim -KERNEL_RELEASE!$KERNEL_RELEASE$ac_delim -LINUXINCLUDE!$LINUXINCLUDE$ac_delim -MODULES_OS!$MODULES_OS$ac_delim -MODULES_DIR!$MODULES_DIR$ac_delim -MODULES!$MODULES$ac_delim -COMMON_XLIBS!$COMMON_XLIBS$ac_delim -XSM_LIBS!$XSM_LIBS$ac_delim -XCOMPOSITE_LIBS!$XCOMPOSITE_LIBS$ac_delim -PAM_PREFIX!$PAM_PREFIX$ac_delim -PLUGIN_CPPFLAGS!$PLUGIN_CPPFLAGS$ac_delim -PLUGIN_LDFLAGS!$PLUGIN_LDFLAGS$ac_delim -VMTOOLS_CPPFLAGS!$VMTOOLS_CPPFLAGS$ac_delim -VMTOOLS_LIBS!$VMTOOLS_LIBS$ac_delim -RPCGENFLAGS!$RPCGENFLAGS$ac_delim -XDR_LIBS!$XDR_LIBS$ac_delim -TEST_PLUGIN_INSTALLDIR!$TEST_PLUGIN_INSTALLDIR$ac_delim -COMMON_PLUGIN_INSTALLDIR!$COMMON_PLUGIN_INSTALLDIR$ac_delim -VMSVC_PLUGIN_INSTALLDIR!$VMSVC_PLUGIN_INSTALLDIR$ac_delim -VMUSR_PLUGIN_INSTALLDIR!$VMUSR_PLUGIN_INSTALLDIR$ac_delim -SYSDIR!$SYSDIR$ac_delim -INSTVMSG!$INSTVMSG$ac_delim -RPCGEN_WRAPPER!$RPCGEN_WRAPPER$ac_delim -LIB_AUTH_CPPFLAGS!$LIB_AUTH_CPPFLAGS$ac_delim -LIB_IMPERSONATE_CPPFLAGS!$LIB_IMPERSONATE_CPPFLAGS$ac_delim -LIB_USER_CPPFLAGS!$LIB_USER_CPPFLAGS$ac_delim -LIBVMTOOLS_LIBADD!$LIBVMTOOLS_LIBADD$ac_delim -VIX_LIBADD!$VIX_LIBADD$ac_delim -VGAUTH_LIBADD!$VGAUTH_LIBADD$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 42; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - - - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="CXX " - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index 04e3bac2e..8d4604e85 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### Configure script for building the VMware OSS Tools. ### @@ -39,10 +39,10 @@ ### Initialization ### -TOOLS_VERSION="10.0.5" +TOOLS_VERSION="10.1.0" AC_INIT( [open-vm-tools], - [10.0.5], + [10.1.0], [open-vm-tools-devel@lists.sourceforge.net]) # In order to make this configure script auto-detect situations where @@ -79,7 +79,7 @@ case "$host_cpu" in [i[3456]86]) userSpaceBitness="32" ;; - [x86_64]) + [amd64|x86_64]) userSpaceBitness="64" ;; [*]) @@ -97,12 +97,6 @@ AC_ARG_WITH([root-privileges], # Kernel arguments. # The kernel args have to go here otherwise the KERNEL_RELEASE won't be visible # to getOsVersion() -AC_ARG_WITH([kernel-modules], - [AS_HELP_STRING([--without-kernel-modules], - [does not compile or install the kernel modules])], - [], - [with_kernel_modules=yes]) - AC_ARG_WITH([kernel-release], [AS_HELP_STRING([--with-kernel-release], [specifies the kernel release you want to build against])], @@ -142,6 +136,17 @@ case "$host_os" in esac osVersion="`getOsVersion`" +AC_ARG_WITH([kernel-modules], + [AS_HELP_STRING([--with-kernel-modules], + [compile and install the kernel modules])], + [], + [if test "x$os" = "xlinux" -a "$osVersion" -ge 400000; then + with_kernel_modules=no + else + with_kernel_modules=yes + fi + ]) + if test "$with_kernel_modules" = "yes"; then case "$os" in linux) @@ -153,7 +158,7 @@ if test "$with_kernel_modules" = "yes"; then fi LINUXINCLUDE="$LINUXDIR/build/include" if test ! -d "$LINUXINCLUDE"; then - AC_MSG_ERROR([Can't find include dir under $LINUXDIR]) + AC_MSG_ERROR([Cannot find include dir under $LINUXDIR]) fi ;; @@ -178,21 +183,41 @@ AC_ARG_ENABLE( [enable_multimon="$enableval"], [enable_multimon="yes"]) +AC_ARG_WITH( + gtk3, + AS_HELP_STRING( + [--without-gtk3], + [compiles without Gtk 3.0]), + [with_gtk3="$withval"], + [with_gtk3="no"]) + AC_ARG_WITH( gtk2, AS_HELP_STRING( [--without-gtk2], [compiles without Gtk 2.0]), [with_gtk2="$withval"], - [with_gtk2="yes"]) - -AC_ARG_WITH( - gtkmm, - AS_HELP_STRING( - [--without-gtkmm], - [compiles without Gtkmm, sigc++, and related libs]), - [with_gtkmm="$withval"], - [with_gtkmm="yes"]) + [if test "$with_gtk3" = "yes"; then with_gtk2="no" ; else with_gtk2="yes"; fi]) + +if test "$with_gtk3" = "yes"; then + AC_ARG_WITH( + gtkmm3, + AS_HELP_STRING( + [--without-gtkmm3], + [compiles without Gtkmm 3, sigc++, and related libs]), + [with_gtkmm3="$withval"], + [with_gtkmm3="yes"]) + with_gtkmm="no" +else + AC_ARG_WITH( + gtkmm, + AS_HELP_STRING( + [--without-gtkmm], + [compiles without Gtkmm, sigc++, and related libs]), + [with_gtkmm="$withval"], + [with_gtkmm="yes"]) + with_gtkmm3="no" +fi AC_ARG_ENABLE( docs, @@ -362,7 +387,7 @@ AC_CHECK_PROG([have_genmarshal], [no]) if test "$have_genmarshal" != "yes"; then - AC_MSG_ERROR([glib-genmarshal is required; make sure it's available in your path.]) + AC_MSG_ERROR([glib-genmarshal is required; make sure it is available in your path.]) fi # @@ -404,18 +429,53 @@ fi AC_ARG_ENABLE([vgauth], [AS_HELP_STRING([--disable-vgauth], [do not build vgauth.])], - [], - [enable_vgauth=yes]) + [ + enable_vgauth="$enableval" + use_xmlsec1=no + ], + [ + enable_vgauth=yes + use_xmlsec1=no + ]) + +AC_ARG_ENABLE([xmlsec1], + [AS_HELP_STRING([--enable-xmlsec1], + [build vgauth with xmlsec1 instead of xml-security-c (off by default).])], + [use_xmlsec1="$enableval"], + [use_xmlsec1=no]) + +AC_ARG_ENABLE([xml-security-c], + [AS_HELP_STRING([--disable-xml-security-c], + [build vgauth with xml-security-c instead of xmlsec1 (on by default).])], + [ + if test "$enableval" = "yes"; then + use_xmlsec1="no"; + else + use_xmlsec1="yes" + fi + ], + []) + +if test "$enable_vgauth" = "yes" ; then + AC_ARG_ENABLE([caf], + [AS_HELP_STRING([--disable-caf], + [do not build CAF (Common Agent Framework).])], + [], + [enable_caf=no]) +else + enable_caf=no +fi # # Check for openssl, xerces-c and xml-security-c # AC_ARG_WITH([ssl], [AS_HELP_STRING([--without-ssl], - [compiles without openssl support (disables grabbitmqproxy and vgauth).])], + [compiles without openssl support (disables grabbitmqproxy, vgauth and CAF).])], [ enable_grabbitmqproxy=no enable_vgauth=no + enable_caf=no ], [with_ssl=yes]) @@ -431,21 +491,64 @@ AC_ARG_WITH([xerces], [enable_vgauth=no], [with_xerces=yes]) +AC_ARG_WITH([xmlsec1], + [AS_HELP_STRING([--without-xmlsec1], + [compiles without xmlsec1 support (disables vgauth).])], + [enable_vgauth=no], + [with_xmlsec1=yes]) + +AC_ARG_WITH([xml2], + [AS_HELP_STRING([--without-xml2], + [compiles without xml2 support (disables vgauth).])], + [enable_vgauth=no], + [with_xml2=yes]) + + +# Make sure we are building with openssl 1.0.1 and above so that +# we use only TLSv1_2. + if test "$enable_vgauth" = "yes" -o "$enable_grabbitmqproxy" = "yes"; then AC_VMW_DEFAULT_FLAGS([SSL]) AC_VMW_CHECK_LIB([ssl], [SSL], + [openssl], [], + [1.0.1], [], - [], - [], - [], + [BIO_new_file], [], [AC_VMW_LIB_ERROR([SSL], [ssl])]) fi if test "$enable_vgauth" = "yes"; then CPPFLAGS="$CPPFLAGS -DUSE_VGAUTH" +if test "$use_xmlsec1" = "yes"; then + AC_VMW_DEFAULT_FLAGS([XML2]) + AC_VMW_CHECK_LIB([xml2], + [XML2], + [], + [], + [], + [], + [], + [], + [AC_VMW_LIB_ERROR([XML2], [xml2])]) + +# Multiple distros built xmlsec1 with -DXMLSEC_NO_SIZE_T but +# their xmlssec1-config --cflags doesn't properly report it, +# so force it on. + AC_VMW_DEFAULT_FLAGS([XMLSEC1]) + AC_VMW_CHECK_LIB([xmlsec1], + [XMLSEC1], + [], + [xmlsec1-config], + [], + [xmlsec/xmlsec.h], + [xmlSecCheckVersion], + [XMLSEC1_CPPFLAGS="$XMLSEC1_CPPFLAGS -DXMLSEC_NO_SIZE_T"], + [AC_VMW_LIB_ERROR([XMLSEC1], [xmlsec1])]) + +else AC_VMW_DEFAULT_FLAGS([XERCES]) AC_VMW_CHECK_LIB([xerces-c], [XERCES], @@ -468,6 +571,9 @@ if test "$enable_vgauth" = "yes"; then [], [AC_VMW_LIB_ERROR([XMLSECURITY], [xml-security-c])]) fi +else + enable_caf=no +fi # # Check for CUnit and disable test code if not available. @@ -514,7 +620,7 @@ else [X11/extensions/extutil.h], [], [AC_MSG_ERROR( - [X11/extensions/extutil.h header not found - you're probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x).])], + [X11/extensions/extutil.h header not found - you are probably on Solaris 10 or older. Please copy that header file onto your system manually, or configure without X11 (using --without-x).])], [#include #include ]) @@ -589,10 +695,22 @@ else have_xcomposite="yes" fi - # Check whether we have gtk+ 2.0. - if test "$with_gtk2" != "no"; then + # Check whether we have gtk+ 3.0. + if test "$with_gtk3" != "no"; then # gdk_display_get_default_group (added in gtk+ 2.4.0) is function currently # needed by vmware-user. + AC_VMW_CHECK_LIB([gtk-3], + [GTK], + [gtk+-3.0], + [], + [3.0.0], + [gtk/gtk.h], + [gdk_display_get_default_group], + [GTK_CPPFLAGS="$GTK_CPPFLAGS -DGTK3"], + [AC_MSG_ERROR([Gtk+ 3.0 library not found or too old. Please configure without Gtk+ support (using --without-gtk3) or install the Gtk+ 3.0 devel package.])]) + + # Check whether we have gtk+ 2.0. + elif test "$with_gtk2" != "no"; then AC_VMW_CHECK_LIB([gtk-x11-2.0], [GTK], [gtk+-2.0], @@ -608,17 +726,53 @@ else # Check for gtkmm 2.4.0 or greater. # - if test "$with_gtkmm" != "no"; then - CUSTOM_GTKMM_CPPFLAGS="$CUSTOM_GTKMM_CPPFLAGS $GTK_CPPFLAGS" - AC_VMW_CHECK_LIBXX([gtkmm-2.4], - [GTKMM], - [gtkmm-2.4], + + if test "$with_gtkmm" != "no" -o "$with_gtkmm3" != "no"; then + if test "$with_gtkmm3" != "no"; then + AC_VMW_CHECK_LIBXX([gtkmm-3.0], + [GTKMM], + [gtkmm-3.0], + [], + [3.0.0], + [], + [], + [GTKMM_CPPFLAGS="$GTKMM_CPPFLAGS -DHAVE_GTKMM"], + [AC_MSG_ERROR([gtkmm3 library not found. Please install the libgtkmm devel package(s), or re-configure using --without-gtkmm3.])]) + + elif test "$with_gtkmm" != "no"; then + CUSTOM_GTKMM_CPPFLAGS="$CUSTOM_GTKMM_CPPFLAGS $GTK_CPPFLAGS" + AC_VMW_CHECK_LIBXX([gtkmm-2.4], + [GTKMM], + [gtkmm-2.4], + [], + [2.4.0], + [gtkmm.h], + [], + [GTKMM_CPPFLAGS="$GTKMM_CPPFLAGS -DHAVE_GTKMM"], + [AC_MSG_ERROR([gtkmm library not found. Please install the libgtkmm devel package(s), or re-configure using --without-gtkmm.])]) + fi + + # + # libsigc++-2.0 >= 2.5.1 requires C++11 support + # + # Calling AC_VMW_CHECK_LIBXX would duplicate the sigc++ + # flags we would have already got as part of gtkmm call + # above. This is OK because we are not seeing any issues + # because of this and calling AC_VMW_CHECK_LIBXX function + # provides other benefits like picking custom flags. + # + # AC_VMW_CHECK_LIBXX sets CPPFLAGS and LIBS variables only, + # so we have to use SIGCXX_CPPFLAGS instead of SIGCXX_CXXFLAGS. + # + AC_VMW_CHECK_LIBXX([sigc++-2.0], + [SIGCXX], + [sigc++-2.0], [], - [2.4.0], - [gtkmm.h], + [2.5.1], + [sigc++.h], [], - [GTKMM_CPPFLAGS="$GTKMM_CPPFLAGS -DHAVE_GTKMM"], - [AC_MSG_ERROR([gtkmm library not found. Please install the libgtkmm devel package(s), or re-configure using --without-gtkmm.])]) + [SIGCXX_CPPFLAGS="$SIGCXX_CPPFLAGS -std=c++11"], + [SIGCXX_CPPFLAGS="$SIGCXX_CPPFLAGS"]) fi fi # End of checks for X libraries @@ -645,6 +799,8 @@ AC_CHECK_FUNCS( AC_CHECK_FUNCS([ecvt]) AC_CHECK_FUNCS([fcvt]) +AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes]) + if test "$os" = "freebsd" -a "$osVersion" -ge 600000; then AC_CHECK_LIB( [thr], @@ -666,7 +822,7 @@ AC_ARG_WITH([pam-prefix], [AS_HELP_STRING([--with-pam-prefix], [specifies where pam files go. Default is $(sysconfdir)])], [PAM_PREFIX="$withval"], - [PAM_PREFIX='$(sysconfdir)']) + [if test "$os" = "freebsd" ; then PAM_PREFIX='$(sysconfdir)'; else PAM_PREFIX='/etc'; fi]) if test "$os" = "linux"; then AC_ARG_WITH([procps], @@ -779,7 +935,7 @@ if test "$with_dnet" = "yes"; then [dumbnet.h], [intf_open], [have_dnet="yes"; - AC_DEFINE([DNET_IS_DUMBNET], 1, [Define to 1 if substituting Debian's libdumbnet for libdnet.])], + AC_DEFINE([DNET_IS_DUMBNET], 1, [Define to 1 if substituting libdumbnet for libdnet in Debian.])], []) if test $have_dnet = "no"; then @@ -851,6 +1007,52 @@ else CPPFLAGS="$CPPFLAGS -DNO_ICU" fi +if test "$enable_caf" = "yes"; then + AC_VMW_CHECK_LIBXX([log4cpp], + [LOG4CPP], + [], + [log4cpp-config], + [], + [Appender.hh], + [], + [have_log4cpp="yes"], + [AC_VMW_LIB_ERROR([LOG4CPP], [log4cpp])]) + + AC_VMW_CHECK_LIB([rabbitmq], + [LIBRABBITMQ], + [librabbitmq], + [], + [0.8.0], + [amqp_tcp_socket.h], + [], + [have_librabbitmq="yes"], + [AC_VMW_LIB_ERROR([LIBRABBITMQ], [librabbitmq])]) + + # + # CAF requires glib 2.34 or greater. + # + AC_VMW_CHECK_LIB([glib-2.0], + [GLIB2], + [glib-2.0], + [], + [2.34.0], + [glib.h], + [g_key_file_new], + [], + [AC_MSG_ERROR([glib2 >= 2.34.0 is required.])]) + + AC_VMW_CHECK_LIB([gthread-2.0], + [GTHREAD], + [gthread-2.0], + [], + [2.34.0], + [], + [], + [], + [AC_MSG_ERROR([glib >= 2.34.0 is required.])]) + +fi + AC_PATH_PROG( [RPCGEN], [rpcgen], @@ -942,7 +1144,8 @@ CFLAGS="$CFLAGS -Werror" # Glib2 keep changing mutex APIs so we also need to disable 'deprecated' # warnings for now (-Wno-deprecated-declarations). for TEST_CFLAG in -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing \ - -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations; do + -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations \ + -Wno-unused-const-variable; do AC_MSG_CHECKING([for GCC flag $TEST_CFLAG]) ORIGINAL_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $TEST_CFLAG" @@ -1129,6 +1332,26 @@ if test "$os" = "solaris"; then fi fi +if test "$os" = "linux"; then + have_udev="yes" + AC_ARG_WITH([udev-rules-dir], + [AS_HELP_STRING([--with-udev-rules-dir=DIR], + [where to install udev rules])], + [UDEVRULESDIR="$withval"], + [ + UDEVRULESDIR="/lib/udev/rules.d" + if test $HAVE_PKG_CONFIG = "yes"; then + udevdir=$(pkg-config udev --variable=udevdir) + if test "x$udevdir" != "x"; then + UDEVRULESDIR="$udevdir/rules.d" + fi + fi + ]) +else + have_udev="no" + UDEVRULESDIR="" +fi + AM_CONDITIONAL(BUILD_HGFSMOUNTER, test "$buildHgfsmounter" = "yes") AM_CONDITIONAL(LINUX, test "$os" = "linux") AM_CONDITIONAL(SOLARIS, test "$os" = "solaris") @@ -1147,14 +1370,18 @@ AM_CONDITIONAL(HAVE_DNET, test "$have_dnet" = "yes") AM_CONDITIONAL(HAVE_DOXYGEN, test "$have_doxygen" = "yes") AM_CONDITIONAL(HAVE_FUSE, test "$have_fuse" = "yes") AM_CONDITIONAL(HAVE_GNU_LD, test "$with_gnu_ld" = "yes") -AM_CONDITIONAL(HAVE_GTKMM, test "$have_x" = "yes" -a "$with_gtkmm" = "yes") +AM_CONDITIONAL(HAVE_GTKMM, test "$have_x" = "yes" -a \( "$with_gtkmm" = "yes" -o "$with_gtkmm3" = "yes" \) ) AM_CONDITIONAL(HAVE_PAM, test "$with_pam" = "yes") AM_CONDITIONAL(USE_SLASH_PROC, test "$os" = "linux") AM_CONDITIONAL(USE_PRINTF_WRAPPERS, test "$bsdPrintfWrappers" = "yes") AM_CONDITIONAL(ENABLE_DEPLOYPKG, test "$enable_deploypkg" = "yes") AM_CONDITIONAL(ENABLE_GRABBITMQPROXY, test "$enable_grabbitmqproxy" = "yes") AM_CONDITIONAL(ENABLE_VGAUTH, test "$enable_vgauth" = "yes") +AM_CONDITIONAL(USE_XMLSEC1, test "$use_xmlsec1" = "yes") +AM_CONDITIONAL(ENABLE_CAF, test "$enable_caf" = "yes") AM_CONDITIONAL(HAVE_VSOCK, test "$os" = "linux") +AM_CONDITIONAL(HAVE_MKDTEMP, test "$have_mkdtemp" = "yes") +AM_CONDITIONAL(HAVE_UDEV, test "$have_udev" = "yes") if test "$have_xsm" != "yes"; then AC_DEFINE([NO_XSM], 1, []) @@ -1209,6 +1436,15 @@ COMMON_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/common VMSVC_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmsvc VMUSR_PLUGIN_INSTALLDIR=$libdir/open-vm-tools/plugins/vmusr +# Installation directories for caf binary/so files +#CAF_PME_BIN_DIR=${sbindir}/vmware-caf/pme/bin +CAF_PME_BIN_DIR=${libdir}/open-vm-tools/vmware-caf/pme/bin +CAF_PME_LIB_DIR=${libdir}/open-vm-tools/vmware-caf/pme/lib + +# Installation directories for caf subsys so files +CAF_SUBSYS_DIR=${libdir}/open-vm-tools/vmware-caf/pme/lib +CAF_SUBSYS_LDFLAGS="-Wl,-z,defs -Wl,-lc -shared -module -avoid-version" + # General definitions INSTVMSG='$(SHELL) $(top_srcdir)/scripts/build/instvmsg.sh' RPCGEN_WRAPPER='$(SHELL) $(top_builddir)/scripts/build/rpcgen_wrapper.sh' @@ -1237,6 +1473,10 @@ AC_SUBST([TEST_PLUGIN_INSTALLDIR]) AC_SUBST([COMMON_PLUGIN_INSTALLDIR]) AC_SUBST([VMSVC_PLUGIN_INSTALLDIR]) AC_SUBST([VMUSR_PLUGIN_INSTALLDIR]) +AC_SUBST([CAF_SUBSYS_DIR]) +AC_SUBST([CAF_SUBSYS_LDFLAGS]) +AC_SUBST([CAF_PME_BIN_DIR]) +AC_SUBST([CAF_PME_LIB_DIR]) if test "$os" = "freebsd" -a -n "$SYSDIR"; then # If SYSDIR is not defined, AC_SUBST expands to nothing, so we need something # inside this block. @@ -1258,6 +1498,8 @@ AC_SUBST([LIBVMTOOLS_LIBADD]) AC_SUBST([VIX_LIBADD]) AC_SUBST([VGAUTH_LIBADD]) +AC_SUBST([UDEVRULESDIR]) + ### ### Create the Makefiles ### @@ -1335,6 +1577,7 @@ AC_CONFIG_FILES([ \ guestproxycerttool/Makefile \ vgauth/Makefile \ vgauth/lib/Makefile \ + namespacetool/Makefile \ vgauth/cli/Makefile \ vgauth/service/Makefile \ libguestlib/Makefile \ @@ -1343,6 +1586,18 @@ AC_CONFIG_FILES([ \ libDeployPkg/libDeployPkg.pc \ libhgfs/Makefile \ libvmtools/Makefile \ + common-agent/Cpp/Framework/Makefile \ + common-agent/Cpp/Communication/Makefile \ + common-agent/Cpp/InternalProviders/Makefile \ + common-agent/Cpp/ManagementAgent/Makefile \ + common-agent/Cpp/ProviderFx/Makefile \ + common-agent/input/Makefile \ + common-agent/input/invokers/Makefile \ + common-agent/input/providerReg/Makefile \ + common-agent/etc/Makefile \ + common-agent/etc/config/Makefile \ + common-agent/etc/scripts/Makefile \ + common-agent/etc/install/Makefile \ xferlogs/Makefile \ modules/Makefile \ vmblock-fuse/Makefile \ @@ -1355,8 +1610,9 @@ AC_CONFIG_FILES([ \ tests/testVmblock/Makefile \ docs/Makefile \ docs/api/Makefile \ - scripts/Makefile \ + scripts/Makefile \ scripts/build/rpcgen_wrapper.sh \ + udev/Makefile \ ]) ### diff --git a/open-vm-tools/docs/Makefile.am b/open-vm-tools/docs/Makefile.am index 2e9a4ad44..63fa59d83 100644 --- a/open-vm-tools/docs/Makefile.am +++ b/open-vm-tools/docs/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/docs/Makefile.in b/open-vm-tools/docs/Makefile.in deleted file mode 100644 index 42ef2c1bd..000000000 --- a/open-vm-tools/docs/Makefile.in +++ /dev/null @@ -1,582 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_DOXYGEN_TRUE@am__append_1 = api -subdir = docs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = api -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = $(am__append_1) -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/docs/api/Makefile.am b/open-vm-tools/docs/api/Makefile.am index 3a1d9e771..3867d4e73 100644 --- a/open-vm-tools/docs/api/Makefile.am +++ b/open-vm-tools/docs/api/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/docs/api/Makefile.in b/open-vm-tools/docs/api/Makefile.in deleted file mode 100644 index 44df66a41..000000000 --- a/open-vm-tools/docs/api/Makefile.in +++ /dev/null @@ -1,458 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = docs/api -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -DOXYGEN_INPUT = $(top_srcdir)/docs/api $(top_srcdir)/docs/api/services \ - $(top_srcdir)/lib/include/vmware/tools \ - $(top_srcdir)/libvmtools $(top_srcdir)/tests/vmrpcdbg -DOXYGEN_CPP_PREDEFINED = G_LOCK_DEFINE_STATIC(x) G_LOG_DOMAIN= -DOXYGEN_CPP_EXPAND = -DOXYGEN_EXTRA_PATTERNS = *.c *.doxy *.h *.txt -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/api/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/api/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-data-local - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-data-local \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am - - -# This rule has no dependencies, so it's executed every time. Not optimal, -# but generation of the docs is pretty quick, and having the right dependencies -# here is very non-trivial. -build/index.html: - mkdir -p build - sed \ - -e 's,##{BUILD_DIR}##,$(top_builddir),' \ - -e 's,##{BUILD_OUTPUT}##,build,' \ - -e 's,##{CLIENT_ROOT}##,$(top_srcdir),' \ - -e 's,##{CPP_EXPAND}##,$(DOXYGEN_CPP_EXPAND),' \ - -e 's,##{CPP_PREDEFINED}##,$(DOXYGEN_CPP_PREDEFINED),' \ - -e 's,##{DOT}##,@DOT@,' \ - -e 's,##{FILE_PATTERNS}##,$(DOXYGEN_EXTRA_PATTERNS),' \ - -e 's,##{HAVE_DOT}##,@HAVE_DOT@,' \ - -e 's,##{INCLUDE_PATHS}##,$(top_srcdir)/lib/include,' \ - -e 's,##{INPUT_PATHS}##,$(DOXYGEN_INPUT),' \ - -e 's,##{MSCGEN_DIR}##,@MSCGEN_DIR@,' \ - -e 's,##{PERL}##,,' \ - -e 's,##{PROJECT_NAME}##,@PACKAGE_STRING@,' \ - -e 's,##{PROJECT_VERSION}##,@TOOLS_VERSION@,' \ - -e 's,##{WARNING_LOG}##,warnings.log,' \ - $(top_srcdir)/docs/api/doxygen.conf > doxygen.parsed.conf - doxygen doxygen.parsed.conf > /dev/null - -all-local: build/index.html - -install-data-local: - mkdir -p $(DESTDIR)$(docdir)/api - cp -r build/* $(DESTDIR)$(docdir)/api -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/docs/api/services/debug.txt b/open-vm-tools/docs/api/services/debug.txt index 3837d3a8b..a751c4376 100644 --- a/open-vm-tools/docs/api/services/debug.txt +++ b/open-vm-tools/docs/api/services/debug.txt @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/open-vm-tools/docs/api/services/guestrpc.txt b/open-vm-tools/docs/api/services/guestrpc.txt index 226cfd87b..73c429158 100644 --- a/open-vm-tools/docs/api/services/guestrpc.txt +++ b/open-vm-tools/docs/api/services/guestrpc.txt @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/open-vm-tools/docs/api/services/main.doxy b/open-vm-tools/docs/api/services/main.doxy index 6e9cbe7e1..28089ffcf 100644 --- a/open-vm-tools/docs/api/services/main.doxy +++ b/open-vm-tools/docs/api/services/main.doxy @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/open-vm-tools/docs/api/services/plugins.txt b/open-vm-tools/docs/api/services/plugins.txt index b20ac3112..29d596879 100644 --- a/open-vm-tools/docs/api/services/plugins.txt +++ b/open-vm-tools/docs/api/services/plugins.txt @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/open-vm-tools/guestproxycerttool/Makefile.am b/open-vm-tools/guestproxycerttool/Makefile.am index 4c622b3c6..f33e83f35 100644 --- a/open-vm-tools/guestproxycerttool/Makefile.am +++ b/open-vm-tools/guestproxycerttool/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2014-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/guestproxycerttool/Makefile.in b/open-vm-tools/guestproxycerttool/Makefile.in deleted file mode 100644 index c25228199..000000000 --- a/open-vm-tools/guestproxycerttool/Makefile.in +++ /dev/null @@ -1,616 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-guestproxycerttool$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = guestproxycerttool -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_guestproxycerttool_OBJECTS = \ - vmware_guestproxycerttool-cert_key.$(OBJEXT) \ - vmware_guestproxycerttool-cert_util.$(OBJEXT) \ - vmware_guestproxycerttool-cert_tool.$(OBJEXT) -vmware_guestproxycerttool_OBJECTS = \ - $(am_vmware_guestproxycerttool_OBJECTS) -am__DEPENDENCIES_1 = -vmware_guestproxycerttool_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_guestproxycerttool_SOURCES) -DIST_SOURCES = $(vmware_guestproxycerttool_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_guestproxycerttool_LDADD = @SSL_LIBS@ -lcrypto @GLIB2_LIBS@ \ - $(am__append_1) -vmware_guestproxycerttool_CPPFLAGS = @SSL_CPPFLAGS@ @GLIB2_CPPFLAGS@ -vmware_guestproxycerttool_SOURCES = cert_key.c cert_util.c cert_tool.c -@HAVE_ICU_FALSE@vmware_guestproxycerttool_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_guestproxycerttool_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu guestproxycerttool/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu guestproxycerttool/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-guestproxycerttool$(EXEEXT): $(vmware_guestproxycerttool_OBJECTS) $(vmware_guestproxycerttool_DEPENDENCIES) - @rm -f vmware-guestproxycerttool$(EXEEXT) - $(vmware_guestproxycerttool_LINK) $(vmware_guestproxycerttool_OBJECTS) $(vmware_guestproxycerttool_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_guestproxycerttool-cert_key.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_guestproxycerttool-cert_tool.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_guestproxycerttool-cert_util.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmware_guestproxycerttool-cert_key.o: cert_key.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_key.o -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_key.Tpo -c -o vmware_guestproxycerttool-cert_key.o `test -f 'cert_key.c' || echo '$(srcdir)/'`cert_key.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_key.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_key.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_key.c' object='vmware_guestproxycerttool-cert_key.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_key.o `test -f 'cert_key.c' || echo '$(srcdir)/'`cert_key.c - -vmware_guestproxycerttool-cert_key.obj: cert_key.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_key.obj -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_key.Tpo -c -o vmware_guestproxycerttool-cert_key.obj `if test -f 'cert_key.c'; then $(CYGPATH_W) 'cert_key.c'; else $(CYGPATH_W) '$(srcdir)/cert_key.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_key.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_key.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_key.c' object='vmware_guestproxycerttool-cert_key.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_key.obj `if test -f 'cert_key.c'; then $(CYGPATH_W) 'cert_key.c'; else $(CYGPATH_W) '$(srcdir)/cert_key.c'; fi` - -vmware_guestproxycerttool-cert_util.o: cert_util.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_util.o -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_util.Tpo -c -o vmware_guestproxycerttool-cert_util.o `test -f 'cert_util.c' || echo '$(srcdir)/'`cert_util.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_util.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_util.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_util.c' object='vmware_guestproxycerttool-cert_util.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_util.o `test -f 'cert_util.c' || echo '$(srcdir)/'`cert_util.c - -vmware_guestproxycerttool-cert_util.obj: cert_util.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_util.obj -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_util.Tpo -c -o vmware_guestproxycerttool-cert_util.obj `if test -f 'cert_util.c'; then $(CYGPATH_W) 'cert_util.c'; else $(CYGPATH_W) '$(srcdir)/cert_util.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_util.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_util.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_util.c' object='vmware_guestproxycerttool-cert_util.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_util.obj `if test -f 'cert_util.c'; then $(CYGPATH_W) 'cert_util.c'; else $(CYGPATH_W) '$(srcdir)/cert_util.c'; fi` - -vmware_guestproxycerttool-cert_tool.o: cert_tool.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_tool.o -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Tpo -c -o vmware_guestproxycerttool-cert_tool.o `test -f 'cert_tool.c' || echo '$(srcdir)/'`cert_tool.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_tool.c' object='vmware_guestproxycerttool-cert_tool.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_tool.o `test -f 'cert_tool.c' || echo '$(srcdir)/'`cert_tool.c - -vmware_guestproxycerttool-cert_tool.obj: cert_tool.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_guestproxycerttool-cert_tool.obj -MD -MP -MF $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Tpo -c -o vmware_guestproxycerttool-cert_tool.obj `if test -f 'cert_tool.c'; then $(CYGPATH_W) 'cert_tool.c'; else $(CYGPATH_W) '$(srcdir)/cert_tool.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Tpo $(DEPDIR)/vmware_guestproxycerttool-cert_tool.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cert_tool.c' object='vmware_guestproxycerttool-cert_tool.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_guestproxycerttool_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_guestproxycerttool-cert_tool.obj `if test -f 'cert_tool.c'; then $(CYGPATH_W) 'cert_tool.c'; else $(CYGPATH_W) '$(srcdir)/cert_tool.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/guestproxycerttool/cert_key.c b/open-vm-tools/guestproxycerttool/cert_key.c index 4b0ed8bb7..53baebaee 100644 --- a/open-vm-tools/guestproxycerttool/cert_key.c +++ b/open-vm-tools/guestproxycerttool/cert_key.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -124,7 +124,7 @@ CertKey_ComputeCertPemFileHash(const gchar *certPemFile) // IN X509 *cert = NULL; gchar *err = NULL; - file = fopen(certPemFile, "r"); + file = g_fopen(certPemFile, "r"); if (!file) { Error("Failed to open %s: %s.\n", certPemFile, strerror(errno)); goto exit; @@ -612,7 +612,7 @@ WritePemFile(EVP_PKEY *pkey, // IN mode_t mode; mode = umask(066); - file = fopen(keyFile, "w"); + file = g_fopen(keyFile, "w"); if (!file) { Error("Failed to open %s: %s.\n", keyFile, strerror(errno)); goto exit; @@ -627,7 +627,7 @@ WritePemFile(EVP_PKEY *pkey, // IN fclose(file); umask(022); - file = fopen(certFile, "w"); + file = g_fopen(certFile, "w"); if (!file) { Error("Failed to open %s: %s.\n", certFile, strerror(errno)); goto exit; diff --git a/open-vm-tools/guestproxycerttool/cert_key.h b/open-vm-tools/guestproxycerttool/cert_key.h index d05803fbc..8b70bdea8 100644 --- a/open-vm-tools/guestproxycerttool/cert_key.h +++ b/open-vm-tools/guestproxycerttool/cert_key.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/guestproxycerttool/cert_tool.c b/open-vm-tools/guestproxycerttool/cert_tool.c index cbc9f0212..a50783922 100644 --- a/open-vm-tools/guestproxycerttool/cert_tool.c +++ b/open-vm-tools/guestproxycerttool/cert_tool.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/guestproxycerttool/cert_tool_version.h b/open-vm-tools/guestproxycerttool/cert_tool_version.h index 2e6c46722..fdb6626c4 100644 --- a/open-vm-tools/guestproxycerttool/cert_tool_version.h +++ b/open-vm-tools/guestproxycerttool/cert_tool_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/guestproxycerttool/cert_util.c b/open-vm-tools/guestproxycerttool/cert_util.c index e268f6c4a..2829bc93b 100644 --- a/open-vm-tools/guestproxycerttool/cert_util.c +++ b/open-vm-tools/guestproxycerttool/cert_util.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -401,7 +401,7 @@ CertUtil_CopyFile(const gchar *src, // IN goto exit; } - file = fopen(dst, "w"); + file = g_fopen(dst, "w"); if (!file) { Error("Failed to open %s: %s.\n", dst, strerror(errno)); goto exit; diff --git a/open-vm-tools/guestproxycerttool/cert_util.h b/open-vm-tools/guestproxycerttool/cert_util.h index b9c523682..8c7df32b7 100644 --- a/open-vm-tools/guestproxycerttool/cert_util.h +++ b/open-vm-tools/guestproxycerttool/cert_util.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/hgfsclient/Makefile.am b/open-vm-tools/hgfsclient/Makefile.am index ff0fbd868..cb773eb6f 100644 --- a/open-vm-tools/hgfsclient/Makefile.am +++ b/open-vm-tools/hgfsclient/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/hgfsclient/Makefile.in b/open-vm-tools/hgfsclient/Makefile.in deleted file mode 100644 index c22e9ef8d..000000000 --- a/open-vm-tools/hgfsclient/Makefile.in +++ /dev/null @@ -1,583 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-hgfsclient$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = hgfsclient -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_hgfsclient_OBJECTS = vmware_hgfsclient-hgfsclient.$(OBJEXT) -vmware_hgfsclient_OBJECTS = $(am_vmware_hgfsclient_OBJECTS) -am__DEPENDENCIES_1 = -vmware_hgfsclient_DEPENDENCIES = ../lib/hgfsBd/libHgfsBd.la \ - $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_hgfsclient_SOURCES) -DIST_SOURCES = $(vmware_hgfsclient_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_hgfsclient_LDADD = ../lib/hgfsBd/libHgfsBd.la @VMTOOLS_LIBS@ \ - @HGFS_LIBS@ $(am__append_1) -vmware_hgfsclient_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -vmware_hgfsclient_SOURCES = hgfsclient.c -@HAVE_ICU_FALSE@vmware_hgfsclient_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_hgfsclient_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hgfsclient/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu hgfsclient/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-hgfsclient$(EXEEXT): $(vmware_hgfsclient_OBJECTS) $(vmware_hgfsclient_DEPENDENCIES) - @rm -f vmware-hgfsclient$(EXEEXT) - $(vmware_hgfsclient_LINK) $(vmware_hgfsclient_OBJECTS) $(vmware_hgfsclient_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_hgfsclient-hgfsclient.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmware_hgfsclient-hgfsclient.o: hgfsclient.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_hgfsclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_hgfsclient-hgfsclient.o -MD -MP -MF $(DEPDIR)/vmware_hgfsclient-hgfsclient.Tpo -c -o vmware_hgfsclient-hgfsclient.o `test -f 'hgfsclient.c' || echo '$(srcdir)/'`hgfsclient.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_hgfsclient-hgfsclient.Tpo $(DEPDIR)/vmware_hgfsclient-hgfsclient.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hgfsclient.c' object='vmware_hgfsclient-hgfsclient.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_hgfsclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_hgfsclient-hgfsclient.o `test -f 'hgfsclient.c' || echo '$(srcdir)/'`hgfsclient.c - -vmware_hgfsclient-hgfsclient.obj: hgfsclient.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_hgfsclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_hgfsclient-hgfsclient.obj -MD -MP -MF $(DEPDIR)/vmware_hgfsclient-hgfsclient.Tpo -c -o vmware_hgfsclient-hgfsclient.obj `if test -f 'hgfsclient.c'; then $(CYGPATH_W) 'hgfsclient.c'; else $(CYGPATH_W) '$(srcdir)/hgfsclient.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_hgfsclient-hgfsclient.Tpo $(DEPDIR)/vmware_hgfsclient-hgfsclient.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hgfsclient.c' object='vmware_hgfsclient-hgfsclient.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_hgfsclient_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_hgfsclient-hgfsclient.obj `if test -f 'hgfsclient.c'; then $(CYGPATH_W) 'hgfsclient.c'; else $(CYGPATH_W) '$(srcdir)/hgfsclient.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/hgfsclient/hgfsclient.c b/open-vm-tools/hgfsclient/hgfsclient.c index 9d26dadc2..a2ee4f978 100644 --- a/open-vm-tools/hgfsclient/hgfsclient.c +++ b/open-vm-tools/hgfsclient/hgfsclient.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/hgfsclient/hgfsclient_version.h b/open-vm-tools/hgfsclient/hgfsclient_version.h index febf48d47..b50913595 100644 --- a/open-vm-tools/hgfsclient/hgfsclient_version.h +++ b/open-vm-tools/hgfsclient/hgfsclient_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/hgfsmounter/Makefile.am b/open-vm-tools/hgfsmounter/Makefile.am index e48417e6c..7c1ba1aff 100644 --- a/open-vm-tools/hgfsmounter/Makefile.am +++ b/open-vm-tools/hgfsmounter/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/hgfsmounter/Makefile.in b/open-vm-tools/hgfsmounter/Makefile.in deleted file mode 100644 index 09cad4ee9..000000000 --- a/open-vm-tools/hgfsmounter/Makefile.in +++ /dev/null @@ -1,585 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -sbin_PROGRAMS = mount.vmhgfs$(EXEEXT) -subdir = hgfsmounter -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(sbin_PROGRAMS) -am_mount_vmhgfs_OBJECTS = hgfsmounter.$(OBJEXT) -mount_vmhgfs_OBJECTS = $(am_mount_vmhgfs_OBJECTS) -mount_vmhgfs_DEPENDENCIES = ../lib/string/libString.la \ - ../lib/panicDefault/libPanicDefault.la \ - ../lib/panic/libPanic.la ../lib/lock/libLock.la \ - ../lib/misc/libMisc.la ../lib/stubs/libStubs.la -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(mount_vmhgfs_SOURCES) -DIST_SOURCES = $(mount_vmhgfs_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -mount_vmhgfs_LDADD = ../lib/string/libString.la \ - ../lib/panicDefault/libPanicDefault.la \ - ../lib/panic/libPanic.la ../lib/lock/libLock.la \ - ../lib/misc/libMisc.la ../lib/stubs/libStubs.la -mount_vmhgfs_SOURCES = hgfsmounter.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hgfsmounter/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu hgfsmounter/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-sbinPROGRAMS: $(sbin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-sbinPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done - -clean-sbinPROGRAMS: - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -mount.vmhgfs$(EXEEXT): $(mount_vmhgfs_OBJECTS) $(mount_vmhgfs_DEPENDENCIES) - @rm -f mount.vmhgfs$(EXEEXT) - $(LINK) $(mount_vmhgfs_OBJECTS) $(mount_vmhgfs_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsmounter.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - -.MAKE: install-am install-exec-am install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-sbinPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-sbinPROGRAMS - - -@FREEBSD_TRUE@install-exec-hook: -@FREEBSD_TRUE@ mv $(DESTDIR)$(sbindir)/mount.vmhgfs \ -@FREEBSD_TRUE@ $(DESTDIR)$(sbindir)/mount_vmhgfs -@FREEBSD_TRUE@ -$(MKDIR_P) $(DESTDIR)/sbin -@FREEBSD_TRUE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount_vmhgfs \ -@FREEBSD_TRUE@ $(DESTDIR)/sbin/mount_vmhgfs &> /dev/null -@FREEBSD_TRUE@uninstall-hook: -@FREEBSD_TRUE@ rm -f $(DESTDIR)$(sbindir)/mount_vmhgfs -@FREEBSD_FALSE@install-exec-hook: -@FREEBSD_FALSE@ -$(MKDIR_P) $(DESTDIR)/sbin -@FREEBSD_FALSE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount.vmhgfs \ -@FREEBSD_FALSE@ $(DESTDIR)/sbin/mount.vmhgfs &> /dev/null -@FREEBSD_FALSE@uninstall-hook: -@FREEBSD_FALSE@ rm -f $(DESTDIR)/sbin/mount.vmhgfs -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/hgfsmounter/hgfsmounter.c b/open-vm-tools/hgfsmounter/hgfsmounter.c index 14a5c993e..4b729fe83 100644 --- a/open-vm-tools/hgfsmounter/hgfsmounter.c +++ b/open-vm-tools/hgfsmounter/hgfsmounter.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/hgfsmounter/hgfsmounter_version.h b/open-vm-tools/hgfsmounter/hgfsmounter_version.h index 05c16f83d..229d87767 100644 --- a/open-vm-tools/hgfsmounter/hgfsmounter_version.h +++ b/open-vm-tools/hgfsmounter/hgfsmounter_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/Makefile.am b/open-vm-tools/lib/Makefile.am index c980ba941..f9d84805a 100644 --- a/open-vm-tools/lib/Makefile.am +++ b/open-vm-tools/lib/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/Makefile.in b/open-vm-tools/lib/Makefile.in deleted file mode 100644 index e01e06193..000000000 --- a/open-vm-tools/lib/Makefile.in +++ /dev/null @@ -1,599 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_X11_TRUE@am__append_1 = appUtil -@HAVE_VSOCK_TRUE@am__append_2 = asyncsocket -@HAVE_GTKMM_TRUE@am__append_3 = hgfsUri -@USE_SLASH_PROC_TRUE@am__append_4 = slashProc -subdir = lib -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = guestRpc appUtil auth backdoor asyncsocket sslDirect \ - pollGtk poll dataMap hashMap dict dynxdr err file foundryMsg \ - glibUtils guestApp hgfs hgfsBd hgfsHelper hgfsServer \ - hgfsServerManagerGuest hgfsServerPolicyGuest hgfsUri \ - impersonate lock message misc netUtil nicInfo panic \ - panicDefault procMgr rpcChannel rpcIn rpcOut rpcVmx slashProc \ - string stubs syncDriver system unicode user vmCheck vmSignal \ - wiper xdg -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = guestRpc $(am__append_1) auth backdoor $(am__append_2) \ - sslDirect pollGtk poll dataMap hashMap dict dynxdr err file \ - foundryMsg glibUtils guestApp hgfs hgfsBd hgfsHelper \ - hgfsServer hgfsServerManagerGuest hgfsServerPolicyGuest \ - $(am__append_3) impersonate lock message misc netUtil nicInfo \ - panic panicDefault procMgr rpcChannel rpcIn rpcOut rpcVmx \ - $(am__append_4) string stubs syncDriver system unicode user \ - vmCheck vmSignal wiper xdg -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/appUtil/Makefile.am b/open-vm-tools/lib/appUtil/Makefile.am index cff5ffb49..a0d8e391c 100644 --- a/open-vm-tools/lib/appUtil/Makefile.am +++ b/open-vm-tools/lib/appUtil/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2008-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/appUtil/Makefile.in b/open-vm-tools/lib/appUtil/Makefile.in deleted file mode 100644 index 20f2c6c61..000000000 --- a/open-vm-tools/lib/appUtil/Makefile.in +++ /dev/null @@ -1,534 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/appUtil -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libAppUtil_la_LIBADD = -am_libAppUtil_la_OBJECTS = appUtil.lo appUtilX11.lo -libAppUtil_la_OBJECTS = $(am_libAppUtil_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libAppUtil_la_SOURCES) -DIST_SOURCES = $(libAppUtil_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libAppUtil.la -libAppUtil_la_SOURCES = appUtil.c appUtilX11.c -AM_CFLAGS = @GTK_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/appUtil/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/appUtil/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libAppUtil.la: $(libAppUtil_la_OBJECTS) $(libAppUtil_la_DEPENDENCIES) - $(LINK) $(libAppUtil_la_OBJECTS) $(libAppUtil_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appUtil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appUtilX11.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/appUtil/appUtil.c b/open-vm-tools/lib/appUtil/appUtil.c index ae5acdca3..9270d7d1d 100644 --- a/open-vm-tools/lib/appUtil/appUtil.c +++ b/open-vm-tools/lib/appUtil/appUtil.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/appUtil/appUtilX11.c b/open-vm-tools/lib/appUtil/appUtilX11.c index 8d1dfb5bf..5f8621f49 100644 --- a/open-vm-tools/lib/appUtil/appUtilX11.c +++ b/open-vm-tools/lib/appUtil/appUtilX11.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -33,7 +33,9 @@ #include "debug.h" #ifndef GTK2 -#error "Gtk 2.0 is required" +#ifndef GTK3 +#error "Gtk 2.0 or 3.0 is required" +#endif #endif #include diff --git a/open-vm-tools/lib/asyncsocket/Makefile.am b/open-vm-tools/lib/asyncsocket/Makefile.am index 394a3f224..48a484496 100644 --- a/open-vm-tools/lib/asyncsocket/Makefile.am +++ b/open-vm-tools/lib/asyncsocket/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2013-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -19,6 +19,7 @@ noinst_LTLIBRARIES = libAsyncSocket.la libAsyncSocket_la_SOURCES = libAsyncSocket_la_SOURCES += asyncsocket.c +libAsyncSocket_la_SOURCES += asyncSocketInterface.c AM_CFLAGS = AM_CFLAGS += -DUSE_SSL_DIRECT diff --git a/open-vm-tools/lib/asyncsocket/Makefile.in b/open-vm-tools/lib/asyncsocket/Makefile.in deleted file mode 100644 index 3307ae6f5..000000000 --- a/open-vm-tools/lib/asyncsocket/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/asyncsocket -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libAsyncSocket_la_LIBADD = -am_libAsyncSocket_la_OBJECTS = asyncsocket.lo -libAsyncSocket_la_OBJECTS = $(am_libAsyncSocket_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libAsyncSocket_la_SOURCES) -DIST_SOURCES = $(libAsyncSocket_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libAsyncSocket.la -libAsyncSocket_la_SOURCES = asyncsocket.c -AM_CFLAGS = -DUSE_SSL_DIRECT -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/asyncsocket/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/asyncsocket/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libAsyncSocket.la: $(libAsyncSocket_la_OBJECTS) $(libAsyncSocket_la_DEPENDENCIES) - $(LINK) $(libAsyncSocket_la_OBJECTS) $(libAsyncSocket_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asyncsocket.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/asyncsocket/asyncSocketInt.h b/open-vm-tools/lib/asyncsocket/asyncSocketInt.h index 322f02388..05526b7a5 100644 --- a/open-vm-tools/lib/asyncsocket/asyncSocketInt.h +++ b/open-vm-tools/lib/asyncsocket/asyncSocketInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011,2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011,2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -108,6 +108,14 @@ #define ASOCK_EWOULDBLOCK EWOULDBLOCK #endif +#define WEBSOCKET_HTTP_BUFFER_SIZE 8192 + +typedef struct WebSocketHttpRequest { + char buf[WEBSOCKET_HTTP_BUFFER_SIZE + 1]; /* used for request & response */ + int32 bufLen; + Bool overflow; +} WebSocketHttpRequest; + typedef enum { WEB_SOCKET_FRAME_OPCODE_BINARY = 0x02, WEB_SOCKET_FRAME_OPCODE_CLOSE = 0x08, @@ -145,6 +153,7 @@ typedef enum { typedef enum { ASYNCSOCKET_TYPE_SOCKET = 0, ASYNCSOCKET_TYPE_NAMEDPIPE = 1, + ASYNCSOCKET_TYPE_PROXYSOCKET = 2, } AsyncSocketType; /* @@ -165,6 +174,25 @@ typedef struct SendBufList { char *encodedBuf; } SendBufList; +/* + * Callback to allow user handling of custom upgrade request headers + */ +typedef int (*AsyncWebSocketUpgradeRequestFn) (AsyncSocket *asock, + WebSocketHttpRequest *httpRequest); + +/* + * Callback to allow user handling of custom upgrade request headers + */ +typedef int (*AsyncWebSocketUpgradeResponseFn) (AsyncSocket *asock, + WebSocketHttpRequest *httpRequest); + +typedef enum { + CONNECTING_PRIMARY_SOCKET = 0, + CONNECTED_PRIMARY_SOCKET, + CONNECTING_SECONDARY_SOCKET, + CONNECTED_SECONDARY_SOCKET, +} AsyncProxySocketState; + struct AsyncSocket { uint32 id; AsyncSocketState state; @@ -177,7 +205,7 @@ struct AsyncSocket { int genericErrno; AsyncSocketErrorFn errorFn; void *errorClientData; - VmTimeType drainTimeoutUS; + Bool errorSeen; struct sockaddr_storage localAddr; socklen_t localAddrLen; @@ -187,8 +215,18 @@ struct AsyncSocket { AsyncSocketConnectFn connectFn; AsyncSocketRecvFn recvFn; AsyncSocketSslAcceptFn sslAcceptFn; - void *clientData; /* shared by recvFn, connectFn and sslAcceptFn */ + AsyncSocketSslConnectFn sslConnectFn; + int sslPollFlags; /* shared by sslAcceptFn, sslConnectFn */ + + /* shared by recvFn, connectFn, sslAcceptFn and sslConnectFn */ + void *clientData; + AsyncSocketPollParams pollParams; + PollerFunction internalConnectFn; + + /* governs optional AsyncSocket_Close() behavior */ + int flushEnabledMaxWaitMsec; + AsyncSocketCloseCb closeCb; void *recvBuf; int recvPos; @@ -253,12 +291,32 @@ struct AsyncSocket { char *upgradeNonceBase64; rqContext *randomContext; uint16 closeStatus; + AsyncWebSocketUpgradeRequestFn upgradeRequestPrepareFn; + AsyncWebSocketUpgradeResponseFn upgradeResponseProcessFn; } webSocket; + struct { + AsyncProxySocketState proxySocketState; + char *secondaryUrl; + char *e2ePort; + char *secondaryIP; + char *secondaryPort; + SSLVerifyParam *secondarySslVerifyParam; + const char *akey; + const char *label; + void *privData; + struct TCP2SCTPListenerArg *tcp2sctp; + AsyncSocket *primarySocket; + AsyncSocket *secondarySocket; + } proxySocket; + #ifdef _WIN32 struct { char *pipeName; uint32 connectCount; + uint32 numInstances; + DWORD openMode; + DWORD pipeMode; HANDLE pipe; OVERLAPPED rd; OVERLAPPED wr; @@ -276,20 +334,71 @@ struct AsyncSocket { }; typedef struct AsyncSocketVTable { + AsyncSocketState (*getState)(AsyncSocket *sock); + int (*getGenericErrno)(AsyncSocket *s); + int (*getFd)(AsyncSocket *asock); + int (*getRemoteIPStr)(AsyncSocket *asock, const char **ipStr); + int (*getINETIPStr)(AsyncSocket *asock, int socketFamily, char **ipRetStr); + unsigned int (*getPort)(AsyncSocket *asock); + + int (*useNodelay)(AsyncSocket *asock, Bool nodelay); + int (*setTCPTimeouts)(AsyncSocket *asock, int keepIdle, int keepIntvl, + int keepCnt); + Bool (*setBufferSizes)(AsyncSocket *asock, int sendSz, int recvSz); + void (*setSendLowLatencyMode)(AsyncSocket *asock, Bool enable); + + Bool (*connectSSL)(AsyncSocket *asock, struct _SSLVerifyParam *verifyParam, + void *sslContext); + void (*startSslConnect)(AsyncSocket *asock, + struct _SSLVerifyParam *verifyParam, void *sslCtx, + AsyncSocketSslConnectFn sslConnectFn, + void *clientData); + Bool (*acceptSSL)(AsyncSocket *asock); + void (*startSslAccept)(AsyncSocket *asock, void *sslCtx, + AsyncSocketSslAcceptFn sslAcceptFn, + void *clientData); + int (*flush)(AsyncSocket *asock, int timeoutMS); + + int (*recv)(AsyncSocket *asock, void *buf, int len, Bool partial, void *cb, + void *cbData); + int (*recvPassedFd)(AsyncSocket *asock, void *buf, int len, void *cb, + void *cbData); + int (*getReceivedFd)(AsyncSocket *asock); + + int (*send)(AsyncSocket *asock, void *buf, int len, + AsyncSocketSendFn sendFn, void *clientData); + int (*isSendBufferFull)(AsyncSocket *asock); + + int (*close)(AsyncSocket *asock); + int (*cancelRecv)(AsyncSocket *asock, int *partialRecvd, void **recvBuf, + void **recvFn, Bool cancelOnSend); + void (*cancelCbForClose)(AsyncSocket *asock); + + int (*getLocalVMCIAddress)(AsyncSocket *asock, uint32 *cid, uint32 *port); + int (*getRemoteVMCIAddress)(AsyncSocket *asock, uint32 *cid, uint32 *port); + + // WebSocket Specific + char *(*getWebSocketURI)(AsyncSocket *asock); + char *(*getWebSocketCookie)(AsyncSocket *asock); + uint16 (*getWebSocketCloseStatus)(const AsyncSocket *asock); + const char *(*getWebSocketProtocol)(AsyncSocket *asock); + + // Internal void (*dispatchConnect)(AsyncSocket *asock, AsyncSocket *newsock); int (*prepareSend)(AsyncSocket *asock, void *buf, int len, AsyncSocketSendFn sendFn, void *clientData, Bool *bufferListWasEmpty); - int (*send)(AsyncSocket *asock, Bool bufferListWasEmpty, void *buf, int len); - int (*recv)(AsyncSocket *asock, void *buf, int len); + int (*sendInternal)(AsyncSocket *asock, Bool bufferListWasEmpty, void *buf, + int len); + int (*recvInternal)(AsyncSocket *asock, void *buf, int len); PollerFunction sendCallback; PollerFunction recvCallback; Bool (*hasDataPending)(AsyncSocket *asock); - void (*cancelListenCb)(AsyncSocket *asock); - void (*cancelRecvCb)(AsyncSocket *asock); - void (*cancelCbForClose)(AsyncSocket *asock); - Bool (*cancelCbForConnectingClose)(AsyncSocket *asock); - void (*close)(AsyncSocket *asock); + void (*cancelListenCbInternal)(AsyncSocket *asock); + void (*cancelRecvCbInternal)(AsyncSocket *asock); + void (*cancelCbForCloseInternal)(AsyncSocket *asock); + Bool (*cancelCbForConnectingCloseInternal)(AsyncSocket *asock); + void (*closeInternal)(AsyncSocket *asock); void (*release)(AsyncSocket *asock); } AsyncSocketVTable; @@ -364,4 +473,82 @@ AsyncSocket *AsyncSocketListenerCreate(const char *addrStr, const char *protocols[], int *outError); +AsyncSocketState AsyncSocketGetState(AsyncSocket *sock); +int AsyncSocketGetGenericErrno(AsyncSocket *s); +int AsyncSocketGetFd(AsyncSocket *asock); +int AsyncSocketGetRemoteIPStr(AsyncSocket *asock, const char **ipStr); +int AsyncSocketGetINETIPStr(AsyncSocket *asock, int socketFamily, + char **ipRetStr); +unsigned int AsyncSocketGetPort(AsyncSocket *asock); +int AsyncSocketUseNodelay(AsyncSocket *asock, Bool nodelay); +int AsyncSocketSetTCPTimeouts(AsyncSocket *asock, int keepIdle, + int keepIntvl, int keepCnt); +Bool AsyncSocketSetBufferSizes(AsyncSocket *asock, int sendSz, int recvSz); +void AsyncSocketSetSendLowLatencyMode(AsyncSocket *asock, Bool enable); +Bool AsyncSocketConnectSSL(AsyncSocket *asock, + struct _SSLVerifyParam *verifyParam, + void *sslContext); +void AsyncSocketStartSslConnect(AsyncSocket *asock, SSLVerifyParam *verifyParam, + void *sslCtx, + AsyncSocketSslConnectFn sslConnectFn, + void *clientData); +Bool AsyncSocketAcceptSSL(AsyncSocket *asock); +void AsyncSocketStartSslAccept(AsyncSocket *asock, void *sslCtx, + AsyncSocketSslAcceptFn sslAcceptFn, + void *clientData); +int AsyncSocketFlush(AsyncSocket *asock, int timeoutMS); + +int AsyncSocketRecv(AsyncSocket *asock, + void *buf, int len, Bool partial, void *cb, void *cbData); +int AsyncSocketRecvPassedFd(AsyncSocket *asock, void *buf, int len, + void *cb, void *cbData); +int AsyncSocketGetReceivedFd(AsyncSocket *asock); +int AsyncSocketSend(AsyncSocket *asock, void *buf, int len, + AsyncSocketSendFn sendFn, void *clientData); +int AsyncSocketIsSendBufferFull(AsyncSocket *asock); +int AsyncSocketClose(AsyncSocket *asock); +int AsyncSocketCancelRecv(AsyncSocket *asock, int *partialRecvd, + void **recvBuf, void **recvFn, Bool cancelOnSend); +void AsyncSocketCancelCbForClose(AsyncSocket *asock); +int AsyncSocketGetLocalVMCIAddress(AsyncSocket *asock, + uint32 *cid, uint32 *port); +int AsyncSocketGetRemoteVMCIAddress(AsyncSocket *asock, + uint32 *cid, uint32 *port); +char *AsyncSocketGetWebSocketURI(AsyncSocket *asock); +char *AsyncSocketGetWebSocketCookie(AsyncSocket *asock); +uint16 AsyncSocketGetWebSocketCloseStatus(const AsyncSocket *asock); +const char *AsyncSocketGetWebSocketProtocol(AsyncSocket *asock); + +/* + * Websocket Connect extension function. + */ +AsyncSocket * +AsyncSocket_ConnectWebSocketEx(const char *url, + struct _SSLVerifyParam *sslVerifyParam, + const char *cookies, + const char *protocols[], + AsyncSocketConnectFn connectFn, + void *clientData, + AsyncSocketConnectFlags flags, + AsyncSocketPollParams *pollParams, + AsyncWebSocketUpgradeRequestFn prepareRequestFn, + AsyncWebSocketUpgradeResponseFn processResponseFn, + void *privData, + int *error); + +/* + * Utilities for building and parsing http request/response strings. + */ +void WebSocketHttpRequestPrintf(WebSocketHttpRequest *request, + const char *format, ...); + +void WebSocketHttpRequestReset(WebSocketHttpRequest *request); +char *WebSocketHttpRequestGetHeader(const WebSocketHttpRequest *request, + const char *webKey); +Bool WebSocketHttpRequestHasHeader(const WebSocketHttpRequest *request, + const char *key); +char *WebSocketHttpRequestGetURI(const WebSocketHttpRequest *request); +char *WebSocketHttpRequestGetVerb(const WebSocketHttpRequest *request); +char *WebSocketHttpRequestGetPath(const WebSocketHttpRequest *request); + #endif // __ASYNC_SOCKET_INT_H__ diff --git a/open-vm-tools/lib/asyncsocket/asyncSocketInterface.c b/open-vm-tools/lib/asyncsocket/asyncSocketInterface.c new file mode 100644 index 000000000..452d4da64 --- /dev/null +++ b/open-vm-tools/lib/asyncsocket/asyncSocketInterface.c @@ -0,0 +1,969 @@ +/********************************************************* + * Copyright (C) 2016 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/********************************************************* + * The contents of this file are subject to the terms of the Common + * Development and Distribution License (the "License") version 1.0 + * and no later version. You may not use this file except in + * compliance with the License. + * + * You can obtain a copy of the License at + * http://www.opensource.org/licenses/cddl1.php + * + * See the License for the specific language governing permissions + * and limitations under the License. + * + *********************************************************/ + +/* + * asyncSocketInterface.c -- + * + * This exposes the public functions of the AsyncSocket library. + * This file itself just contains stubs which call the function + * pointers in the socket's virtual table. + * + * Which entrypoints are virtual and which are base functionality? + * Guidelines: + * - functions affecting the underlying transport (e.g. TCP timeouts) + * are backend-specific and generally ARE virtualized. + * - functions with an immediate effect (e.g. queue bytes for send) + * generally ARE virtualized. + * - functions affecting the socket abstraction (e.g. how it reports errors + * to the caller) are basic functionality and generally are NOT virtualized. + * - functions affecting state which is queried later (e.g. close behavior) + * generally are NOT virtualized. + */ + +#include "asyncsocket.h" +#include "asyncSocketInt.h" + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetState -- + * + * Returns the state of the provided asock or ASOCKERR_INVAL. Note that + * unless this is called from a callback function, the state should be + * treated as transient (except the state AsyncSocketClosed). + * + * Results: + * AsyncSocketState enum. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +AsyncSocketState +AsyncSocket_GetState(AsyncSocket *asock) +{ + if (!asock) { + return ASOCKERR_INVAL; + } + ASSERT(asock->vt->getState); + return asock->vt->getState(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetGenericErrno -- + * + * Used when an ASOCKERR_GENERIC is returned due to a system error. + * The errno that was returned by the system is stored in the asock + * struct and returned to the user in this function. + * + * XXX: This function is not thread-safe. The errno should be returned + * in a parameter to any function that can return ASOCKERR_GENERIC. + * + * Results: + * int error code + * + * Side effects: + * None + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetGenericErrno(AsyncSocket *asock) // IN: +{ + ASSERT(asock); + ASSERT(asock->vt->getGenericErrno); + return asock->vt->getGenericErrno(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetFd -- + * + * Returns the fd for this socket. + * + * Results: + * File descriptor. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetFd(AsyncSocket *asock) +{ + ASSERT(asock->vt->getFd); + return asock->vt->getFd(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetRemoteIPStr -- + * + * Given an AsyncSocket object, returns the remote IP address associated + * with it, or an error if the request is meaningless for the underlying + * connection. + * + * Results: + * ASOCKERR_SUCCESS or ASOCKERR_GENERIC. + * + * Side effects: + * + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetRemoteIPStr(AsyncSocket *asock, // IN + const char **ipRetStr) // OUT +{ + ASSERT(asock); + ASSERT(asock->vt->getRemoteIPStr); + return asock->vt->getRemoteIPStr(asock, ipRetStr); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetINETIPStr -- + * + * Given an AsyncSocket object, returns the IP addresses associated with + * the requested address family's file descriptor if available. + * + * Passing AF_UNSPEC to socketFamily will provide you with the first + * usable IP address found (if multiple are available), with a preference + * given to IPv6. + * + * It is the caller's responsibility to free ipRetStr. + * + * Results: + * ASOCKERR_SUCCESS. ASOCKERR_INVAL if there is no socket associated with + * address family requested. ASOCKERR_GENERIC for all other errors. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetINETIPStr(AsyncSocket *asock, // IN + int socketFamily, // IN + char **ipRetStr) // OUT +{ + ASSERT(asock->vt->getINETIPStr); + return asock->vt->getINETIPStr(asock, socketFamily, ipRetStr); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetPort -- + * + * Given an AsyncSocket object, returns the port number associated with + * the requested address family's file descriptor if available. + * + * Results: + * Port number in host byte order. MAX_UINT32 on error. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +unsigned int +AsyncSocket_GetPort(AsyncSocket *asock) // IN +{ + ASSERT(asock->vt->getPort); + return asock->vt->getPort(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_UseNodelay -- + * + * Sets or unset TCP_NODELAY on the socket, which disables or + * enables Nagle's algorithm, respectively. + * + * Results: + * ASOCKERR_SUCCESS on success, ASOCKERR_GENERIC otherwise. + * + * Side Effects: + * Increased bandwidth usage for short messages on this socket + * due to TCP overhead, in exchange for lower latency. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_UseNodelay(AsyncSocket *asock, // IN/OUT: + Bool nodelay) // IN: +{ + ASSERT(asock->vt->useNodelay); + return asock->vt->useNodelay(asock, nodelay); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_SetTCPTimeouts -- + * + * Allow caller to set a number of TCP-specific timeout + * parameters on the socket for the active connection. + * + * Parameters: + * keepIdle -- The number of seconds a TCP connection must be idle before + * keep-alive probes are sent. + * keepIntvl -- The number of seconds between TCP keep-alive probes once + * they are being sent. + * keepCnt -- The number of keep-alive probes to send before killing + * the connection if no response is received from the peer. + * + * Results: + * ASOCKERR_SUCCESS on success, ASOCKERR_GENERIC otherwise. + * + * Side Effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +#ifdef VMX86_SERVER +int +AsyncSocket_SetTCPTimeouts(AsyncSocket *asock, // IN/OUT: + int keepIdle, // IN + int keepIntvl, // IN + int keepCnt) // IN +{ + ASSERT(asock->vt->setTCPTimeouts); + return asock->vt->setTCPTimeouts(asock, keepIdle, keepIntvl, keepCnt); +} +#endif + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_SetBufferSizes -- + * + * Set socket level recv/send buffer sizes if they are less than given sizes + * + * Result + * TRUE: on success + * FALSE: on failure + * + * Side-effects + * None + * + *----------------------------------------------------------------------------- + */ + +Bool +AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN + int sendSz, // IN + int recvSz) // IN +{ + if (!asock) { + return FALSE; + } + ASSERT(asock->vt->setBufferSizes); + return asock->vt->setBufferSizes(asock, sendSz, recvSz); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_SetSendLowLatencyMode -- + * + * Put the socket into a mode where we attempt to issue sends + * directly from within AsyncSocket_Send(). Ordinarily, we would + * set up a Poll callback from within AsyncSocket_Send(), which + * introduces some non-zero latency to the send path. In + * low-latency-send mode, that delay is potentially avoided. This + * does introduce a behavioural change; the send completion + * callback may be triggered before the call to Send() returns. As + * not all clients may be expecting this, we don't enable this mode + * unless requested by the client. + * + * Result + * None + * + * Side-effects + * See description above. + * + *----------------------------------------------------------------------------- + */ + +void +AsyncSocket_SetSendLowLatencyMode(AsyncSocket *asock, // IN + Bool enable) // IN +{ + ASSERT(asock->vt->setSendLowLatencyMode); + asock->vt->setSendLowLatencyMode(asock, enable); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_StartSslConnect -- + * + * Start an asynchronous SSL connect operation. + * + * The supplied callback function is called when the operation is complete + * or an error occurs. The caller should only free the verifyParam argument + * after the sslConnectFn callback is called. + * + * Results: + * None. + * Error is always reported using the callback supplied. Detailed SSL + * verification error can be retrieved from verifyParam structure. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +AsyncSocket_StartSslConnect(AsyncSocket *asock, // IN + SSLVerifyParam *verifyParam, // IN/OPT + void *sslCtx, // IN + AsyncSocketSslConnectFn sslConnectFn, // IN + void *clientData) // IN +{ + ASSERT(asock); + ASSERT(asock->vt->startSslConnect); + asock->vt->startSslConnect(asock, verifyParam, sslCtx, sslConnectFn, + clientData); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_ConnectSSL -- + * + * Initialize the socket's SSL object, by calling SSL_ConnectAndVerify. + * NOTE: This call is blocking. + * + * Results: + * TRUE if SSL_ConnectAndVerify succeeded, FALSE otherwise. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +Bool +AsyncSocket_ConnectSSL(AsyncSocket *asock, // IN + SSLVerifyParam *verifyParam, // IN/OPT + void *sslContext) // IN/OPT +{ + ASSERT(asock); + ASSERT(asock->vt->connectSSL); + return asock->vt->connectSSL(asock, verifyParam, sslContext); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_AcceptSSL -- + * + * Initialize the socket's SSL object, by calling SSL_Accept. + * + * Results: + * TRUE if SSL_Accept succeeded, FALSE otherwise. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +Bool +AsyncSocket_AcceptSSL(AsyncSocket *asock) // IN +{ + ASSERT(asock); + ASSERT(asock->vt->acceptSSL); + return asock->vt->acceptSSL(asock); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_StartSslAccept -- + * + * Start an asynchronous SSL accept operation. + * + * The supplied callback function is called when the operation is complete + * or an error occurs. + * + * Results: + * None. + * Error is always reported using the callback supplied. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +AsyncSocket_StartSslAccept(AsyncSocket *asock, // IN + void *sslCtx, // IN + AsyncSocketSslAcceptFn sslAcceptFn, // IN + void *clientData) // IN +{ + ASSERT(asock); + ASSERT(asock->vt->startSslAccept); + asock->vt->startSslAccept(asock, sslCtx, sslAcceptFn, clientData); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_Flush -- + * + * Try to send any pending out buffers until we run out of buffers, or + * the timeout expires. + * + * Results: + * ASOCKERR_SUCCESS if it worked, ASOCKERR_GENERIC on system call + * failures, and ASOCKERR_TIMEOUT if we couldn't send enough data + * before the timeout expired. + * + * Side effects: + * None. + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_Flush(AsyncSocket *asock, // IN + int timeoutMS) // IN +{ + if (asock == NULL) { + Warning(ASOCKPREFIX "Flush called with invalid arguments!\n"); + return ASOCKERR_INVAL; + } + ASSERT(asock->vt->flush); + return asock->vt->flush(asock, timeoutMS); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_Recv -- + * AsyncSocket_RecvPartial -- + * + * Registers a callback that will fire once the specified amount of data + * has been received on the socket. + * + * In the case of AsyncSocket_RecvPartial, the callback is fired + * once all or part of the data has been received on the socket. + * + * TCP usage: + * AsyncSocket_Recv(AsyncSocket *asock, + * void *buf, + * int len, + * AsyncSocketRecvFn recvFn, + * void *clientData) + * + * Results: + * ASOCKERR_*. + * + * Side effects: + * Could register poll callback. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_Recv(AsyncSocket *asock, + void *buf, + int len, + void *cb, + void *cbData) +{ + ASSERT(asock->vt->recv); + if (!asock) { + Warning(ASOCKPREFIX "Recv called with invalid arguments!\n"); + return ASOCKERR_INVAL; + } + + return asock->vt->recv(asock, buf, len, FALSE, cb, cbData); +} + +int +AsyncSocket_RecvPartial(AsyncSocket *asock, + void *buf, + int len, + void *cb, + void *cbData) +{ + ASSERT(asock->vt->recv); + return asock->vt->recv(asock, buf, len, TRUE, cb, cbData); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_RecvPassedFd -- + * + * See AsyncSocket_Recv. Besides that it allows for receiving one + * file descriptor... + * + * Results: + * ASOCKERR_*. + * + * Side effects: + * Could register poll callback. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_RecvPassedFd(AsyncSocket *asock, // IN/OUT: socket + void *buf, // OUT: buffer with data + int len, // IN: length + void *cb, // IN: completion calback + void *cbData) // IN: callback's data +{ + if (!asock) { + Warning(ASOCKPREFIX "Recv called with invalid arguments!\n"); + return ASOCKERR_INVAL; + } + + ASSERT(asock->vt->recvPassedFd); + return asock->vt->recvPassedFd(asock, buf, len, cb, cbData); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_GetReceivedFd -- + * + * Retrieve received file descriptor from socket. + * + * Results: + * File descriptor. Or -1 if none was received. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetReceivedFd(AsyncSocket *asock) // IN +{ + if (!asock) { + Warning(ASOCKPREFIX "Invalid socket while receiving fd!\n"); + return -1; + } + + ASSERT(asock->vt->getReceivedFd); + return asock->vt->getReceivedFd(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_Send -- + * + * Queues the provided data for sending on the socket. If a send callback + * is provided, the callback is fired after the data has been written to + * the socket. Note that this only guarantees that the data has been + * copied to the transmit buffer, we make no promises about whether it + * has actually been transmitted, or received by the client, when the + * callback is fired. + * + * Send callbacks should also be able to deal with being called if none + * or only some of the queued buffer has been transmitted, since the send + * callbacks for any remaining buffers are fired by AsyncSocket_Close(). + * This condition can be detected by checking the len parameter passed to + * the send callback. + * + * Results: + * ASOCKERR_*. + * + * Side effects: + * May register poll callback or perform I/O. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_Send(AsyncSocket *asock, + void *buf, + int len, + AsyncSocketSendFn sendFn, + void *clientData) +{ + if (!asock || !buf || len <= 0) { + Warning(ASOCKPREFIX "Send called with invalid arguments! asynchSock: %p " + "buffer: %p length: %d\n", asock, buf, len); + return ASOCKERR_INVAL; + } + ASSERT(asock->vt->send); + return asock->vt->send(asock, buf, len, sendFn, clientData); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_IsSendBufferFull -- + * + * Indicate if socket send buffer is full. Note that unless this is + * called from a callback function, the return value should be treated + * as transient. + * + * Results: + * 0: send space probably available, + * 1: send has reached maximum, + * ASOCKERR_GENERIC: null socket. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_IsSendBufferFull(AsyncSocket *asock) +{ + if (!asock) { + return ASOCKERR_GENERIC; + } + ASSERT(asock->vt->isSendBufferFull); + return asock->vt->isSendBufferFull(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_Close -- + * + * AsyncSocket destructor. The destructor should be safe to call at any + * time. It's invoked automatically for I/O errors on slots that have no + * error handler set, and should be called manually by the error handler + * as necessary. It could also be called as part of the normal program + * flow. + * + * Results: + * ASOCKERR_*. + * + * Side effects: + * Closes the socket fd, unregisters all Poll callbacks, and fires the + * send triggers for any remaining output buffers. + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_Close(AsyncSocket *asock) +{ + if (!asock) { + return ASOCKERR_INVAL; + } + ASSERT(asock->vt->close); + return asock->vt->close(asock); +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_CancelRecv -- + * AsyncSocket_CancelRecvEx -- + * + * Call this function if you know what you are doing. This should be + * called if you want to synchronously receive the outstanding data on + * the socket. It removes the recv poll callback. It also returns number of + * partially read bytes (if any). A partially read response may exist as + * AsyncSocketRecvCallback calls the recv callback only when all the data + * has been received. + * + * Results: + * ASOCKERR_SUCCESS or ASOCKERR_INVAL. + * + * Side effects: + * Subsequent client call to AsyncSocket_Recv can reinstate async behaviour. + * + *----------------------------------------------------------------------------- + */ + +int +AsyncSocket_CancelRecv(AsyncSocket *asock, // IN + int *partialRecvd, // OUT + void **recvBuf, // OUT + void **recvFn) // OUT +{ + return AsyncSocket_CancelRecvEx(asock, partialRecvd, recvBuf, recvFn, FALSE); +} + +int +AsyncSocket_CancelRecvEx(AsyncSocket *asock, // IN + int *partialRecvd, // OUT + void **recvBuf, // OUT + void **recvFn, // OUT + Bool cancelOnSend) // IN +{ + if (!asock) { + Warning(ASOCKPREFIX "Invalid socket while cancelling recv request!\n"); + return ASOCKERR_INVAL; + } + ASSERT(asock->vt->cancelRecv); + return asock->vt->cancelRecv(asock, partialRecvd, recvBuf, recvFn, + cancelOnSend); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_CancelCbForClose -- + * + * This is the external version of AsyncSocketCancelCbForCloseInt(). It + * takes care of acquiring any necessary lock before calling the internal + * function. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +void +AsyncSocket_CancelCbForClose(AsyncSocket *asock) // IN: +{ + ASSERT(asock->vt->cancelCbForClose); + asock->vt->cancelCbForClose(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetLocalVMCIAddress -- + * + * Given an AsyncSocket object, returns the local VMCI context ID and + * port number associated with it, or an error if the request is + * meaningless for the underlying connection. + * + * Results: + * ASOCKERR_SUCCESS or ASOCKERR_GENERIC. + * + * Side effects: + * + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetLocalVMCIAddress(AsyncSocket *asock, // IN + uint32 *cid, // OUT: optional + uint32 *port) // OUT: optional +{ + ASSERT(asock); + ASSERT(asock->vt->getLocalVMCIAddress); + return asock->vt->getLocalVMCIAddress(asock, cid, port); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetRemoteVMCIAddress -- + * + * Given an AsyncSocket object, returns the remote VMCI context ID and + * port number associated with it, or an error if the request is + * meaningless for the underlying connection. + * + * Results: + * ASOCKERR_SUCCESS or ASOCKERR_GENERIC. + * + * Side effects: + * + * + *---------------------------------------------------------------------------- + */ + +int +AsyncSocket_GetRemoteVMCIAddress(AsyncSocket *asock, // IN + uint32 *cid, // OUT: optional + uint32 *port) // OUT: optional +{ + ASSERT(asock); + ASSERT(asock->vt->getRemoteVMCIAddress); + return asock->vt->getRemoteVMCIAddress(asock, cid, port); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetWebSocketURI -- + * + * Return the URI supplied during a WebSocket connection request. + * + * Results: + * URI or Null if no URI was specified. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +char * +AsyncSocket_GetWebSocketURI(AsyncSocket *asock) // IN +{ + ASSERT(asock); + ASSERT(asock->vt->getWebSocketURI); + return asock->vt->getWebSocketURI(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetWebSocketCookie -- + * + * Return the Cookie field value supplied during a WebSocket + * connection request. + * + * Results: + * Cookie, if asock is WebSocket. + * NULL, if asock is not WebSocket. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +char * +AsyncSocket_GetWebSocketCookie(AsyncSocket *asock) // IN +{ + ASSERT(asock); + if (asock->vt->getWebSocketCookie) { + return asock->vt->getWebSocketCookie(asock); + } + return NULL; +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetWebSocketCloseStatus -- + * + * Retrieve the close status, if received, for a websocket connection. + * + * Results: + * Websocket close status code (>= 1000), or 0 if never received. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +uint16 +AsyncSocket_GetWebSocketCloseStatus(const AsyncSocket *asock) // IN +{ + ASSERT(asock); + ASSERT(asock->vt->getWebSocketCloseStatus); + return asock->vt->getWebSocketCloseStatus(asock); +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocket_GetWebSocketProtocol -- + * + * Return the negotiated websocket protocol. Only valid until asock is + * destroyed. + * + * Results: + * NULL, if asock is not WebSocket. + * AsyncWebSocketProtocol *, if asock is WebSocket. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +const char * +AsyncSocket_GetWebSocketProtocol(AsyncSocket *asock) // IN +{ + ASSERT(asock); + if (asock->vt->getWebSocketProtocol) { + return asock->vt->getWebSocketProtocol(asock); + } + return NULL; +} diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c index 05f217a29..7806e62f2 100644 --- a/open-vm-tools/lib/asyncsocket/asyncsocket.c +++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -128,18 +128,15 @@ static VMwareStatus AsyncSocketPollAdd(AsyncSocket *asock, Bool socket, ...); static Bool AsyncSocketPollRemove(AsyncSocket *asock, Bool socket, int flags, PollerFunction callback); -static unsigned int AsyncSocketGetPort(struct sockaddr_storage *addr); +static unsigned int AsyncSocketGetPortFromAddr(struct sockaddr_storage *addr); static AsyncSocket *AsyncSocketConnect(struct sockaddr_storage *addr, socklen_t addrLen, AsyncSocketConnectFn connectFn, void *clientData, - PollerFunction internalConnectFn, AsyncSocketConnectFlags flags, AsyncSocketPollParams *pollParams, int *outError); static int AsyncSocketConnectInternal(AsyncSocket *s); -static int AsyncSocketRecv(AsyncSocket *asock, void *buf, int len, - Bool fireOnPartial, void *cb, void *cbData); static Bool AsyncSocketHasDataPendingSocket(AsyncSocket *asock); static VMwareStatus AsyncSocketIPollAdd(AsyncSocket *asock, Bool socket, @@ -150,9 +147,39 @@ static Bool AsyncSocketIPollRemove(AsyncSocket *asock, Bool socket, int flags, static void AsyncSocketIPollSendCallback(void *clientData); static void AsyncSocketIPollRecvCallback(void *clientData); static Bool AsyncSocketAddListenCbSocket(AsyncSocket *asock); - +static void AsyncSocketSslConnectCallback(void *clientData); +static void AsyncSocketSslAcceptCallback(void *clientData); static const AsyncSocketVTable asyncStreamSocketVTable = { + AsyncSocketGetState, + AsyncSocketGetGenericErrno, + AsyncSocketGetFd, + AsyncSocketGetRemoteIPStr, + AsyncSocketGetINETIPStr, + AsyncSocketGetPort, + AsyncSocketUseNodelay, + AsyncSocketSetTCPTimeouts, + AsyncSocketSetBufferSizes, + AsyncSocketSetSendLowLatencyMode, + AsyncSocketConnectSSL, + AsyncSocketStartSslConnect, + AsyncSocketAcceptSSL, + AsyncSocketStartSslAccept, + AsyncSocketFlush, + AsyncSocketRecv, + AsyncSocketRecvPassedFd, + AsyncSocketGetReceivedFd, + AsyncSocketSend, + AsyncSocketIsSendBufferFull, + AsyncSocketClose, + AsyncSocketCancelRecv, + AsyncSocketCancelCbForClose, + AsyncSocketGetLocalVMCIAddress, + AsyncSocketGetRemoteVMCIAddress, + NULL, + NULL, + NULL, + NULL, AsyncSocketDispatchConnect, AsyncSocketSendInternal, AsyncSocketSendSocket, @@ -168,8 +195,36 @@ static const AsyncSocketVTable asyncStreamSocketVTable = { NULL, }; - static const AsyncSocketVTable asyncStreamSocketIPollVTable = { + AsyncSocketGetState, + AsyncSocketGetGenericErrno, + AsyncSocketGetFd, + AsyncSocketGetRemoteIPStr, + AsyncSocketGetINETIPStr, + AsyncSocketGetPort, + AsyncSocketUseNodelay, + AsyncSocketSetTCPTimeouts, + AsyncSocketSetBufferSizes, + AsyncSocketSetSendLowLatencyMode, + AsyncSocketConnectSSL, + AsyncSocketStartSslConnect, + AsyncSocketAcceptSSL, + AsyncSocketStartSslAccept, + AsyncSocketFlush, + AsyncSocketRecv, + AsyncSocketRecvPassedFd, + AsyncSocketGetReceivedFd, + AsyncSocketSend, + AsyncSocketIsSendBufferFull, + AsyncSocketClose, + AsyncSocketCancelRecv, + AsyncSocketCancelCbForClose, + AsyncSocketGetLocalVMCIAddress, + AsyncSocketGetRemoteVMCIAddress, + NULL, + NULL, + NULL, + NULL, AsyncSocketDispatchConnect, AsyncSocketSendInternal, AsyncSocketSendSocket, @@ -340,7 +395,7 @@ AsyncSocket_MsgError(int asyncSockError) // IN result = MSGID(asyncsocket.notconnected) "Local socket not connected"; break; case ASOCKERR_REMOTE_DISCONNECT: - result = MSGID(asyncsocket.remotedisconnect) "Remote connection failure"; + result = MSGID(asyncsocket.remotedisconnect) "Remote disconnected"; break; case ASOCKERR_CLOSED: result = MSGID(asyncsocket.closed) "Closed socket"; @@ -375,7 +430,7 @@ AsyncSocket_MsgError(int asyncSockError) // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetFd -- + * AsyncSocketGetFd -- * * Returns the fd for this socket. * @@ -389,7 +444,7 @@ AsyncSocket_MsgError(int asyncSockError) // IN */ int -AsyncSocket_GetFd(AsyncSocket *s) +AsyncSocketGetFd(AsyncSocket *s) { return s->fd; } @@ -466,7 +521,7 @@ AsyncSocketGetAddr(AsyncSocket *asock, // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetRemoteIPStr -- + * AsyncSocketGetRemoteIPStr -- * * Given an AsyncSocket object, returns the remote IP address associated * with it, or an error if the request is meaningless for the underlying @@ -482,8 +537,8 @@ AsyncSocketGetAddr(AsyncSocket *asock, // IN */ int -AsyncSocket_GetRemoteIPStr(AsyncSocket *asock, // IN - const char **ipRetStr) // OUT +AsyncSocketGetRemoteIPStr(AsyncSocket *asock, // IN + const char **ipRetStr) // OUT { int ret = ASOCKERR_SUCCESS; @@ -515,7 +570,7 @@ AsyncSocket_GetRemoteIPStr(AsyncSocket *asock, // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetINETIPStr -- + * AsyncSocketGetINETIPStr -- * * Given an AsyncSocket object, returns the IP addresses associated with * the requested address family's file descriptor if available. @@ -537,9 +592,9 @@ AsyncSocket_GetRemoteIPStr(AsyncSocket *asock, // IN */ int -AsyncSocket_GetINETIPStr(AsyncSocket *asock, // IN - int socketFamily, // IN - char **ipRetStr) // OUT +AsyncSocketGetINETIPStr(AsyncSocket *asock, // IN + int socketFamily, // IN + char **ipRetStr) // OUT { struct sockaddr_storage addr; socklen_t addrLen = sizeof addr; @@ -552,6 +607,8 @@ AsyncSocket_GetINETIPStr(AsyncSocket *asock, // IN char addrBuf[NI_MAXHOST]; if (ipRetStr == NULL) { + ASOCKWARN(asock, ("%s: Output string is not usable.\n", + __FUNCTION__)); ret = ASOCKERR_INVAL; } else if (Posix_GetNameInfo((struct sockaddr *)&addr, addrLen, addrBuf, sizeof addrBuf, NULL, 0, @@ -572,7 +629,7 @@ AsyncSocket_GetINETIPStr(AsyncSocket *asock, // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetLocalVMCIAddress -- + * AsyncSocketGetLocalVMCIAddress -- * * Given an AsyncSocket object, returns the local VMCI context ID and * port number associated with it, or an error if the request is @@ -588,9 +645,9 @@ AsyncSocket_GetINETIPStr(AsyncSocket *asock, // IN */ int -AsyncSocket_GetLocalVMCIAddress(AsyncSocket *asock, // IN - uint32 *cid, // OUT: optional - uint32 *port) // OUT: optional +AsyncSocketGetLocalVMCIAddress(AsyncSocket *asock, // IN + uint32 *cid, // OUT: optional + uint32 *port) // OUT: optional { ASSERT(asock); @@ -613,7 +670,7 @@ AsyncSocket_GetLocalVMCIAddress(AsyncSocket *asock, // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetRemoteVMCIAddress -- + * AsyncSocketGetRemoteVMCIAddress -- * * Given an AsyncSocket object, returns the remote VMCI context ID and * port number associated with it, or an error if the request is @@ -629,9 +686,9 @@ AsyncSocket_GetLocalVMCIAddress(AsyncSocket *asock, // IN */ int -AsyncSocket_GetRemoteVMCIAddress(AsyncSocket *asock, // IN - uint32 *cid, // OUT: optional - uint32 *port) // OUT: optional +AsyncSocketGetRemoteVMCIAddress(AsyncSocket *asock, // IN + uint32 *cid, // OUT: optional + uint32 *port) // OUT: optional { ASSERT(asock); @@ -885,6 +942,12 @@ AsyncSocketListenerCreate(const char *addrStr, // IN: optional asock->listenAsock6 = asock6; asock->listenAsock4 = asock4; + if (asock->pollParams.iPoll == NULL) { + asock->vt = &asyncStreamSocketVTable; + } else { + asock->vt = &asyncStreamSocketIPollVTable; + } + return asock; } else if (asock6) { return asock6; @@ -964,6 +1027,12 @@ AsyncSocketListenerCreateLoopback(unsigned int port, // IN asock->listenAsock6 = asock6; asock->listenAsock4 = asock4; + if (asock->pollParams.iPoll == NULL) { + asock->vt = &asyncStreamSocketVTable; + } else { + asock->vt = &asyncStreamSocketIPollVTable; + } + return asock; } else if (asock6) { return asock6; @@ -1172,7 +1241,7 @@ AsyncSocketInit(int socketFamily, // IN /* *---------------------------------------------------------------------------- * - * AsyncSocketGetPort -- + * AsyncSocketGetPortFromAddr -- * * This is an internal routine that gets a port given an address. The * address must be in either AF_INET, AF_INET6 or AF_VMCI format. @@ -1187,7 +1256,7 @@ AsyncSocketInit(int socketFamily, // IN */ static unsigned int -AsyncSocketGetPort(struct sockaddr_storage *addr) +AsyncSocketGetPortFromAddr(struct sockaddr_storage *addr) { ASSERT(NULL != addr); @@ -1215,7 +1284,7 @@ AsyncSocketGetPort(struct sockaddr_storage *addr) /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetPort -- + * AsyncSocketGetPort -- * * Given an AsyncSocket object, returns the port number associated with * the requested address family's file descriptor if available. @@ -1230,7 +1299,7 @@ AsyncSocketGetPort(struct sockaddr_storage *addr) */ unsigned int -AsyncSocket_GetPort(AsyncSocket *asock) // IN +AsyncSocketGetPort(AsyncSocket *asock) // IN { AsyncSocket *tempAsock; struct sockaddr_storage addr; @@ -1251,7 +1320,7 @@ AsyncSocket_GetPort(AsyncSocket *asock) // IN if (AsyncSocketGetAddr(tempAsock, AF_UNSPEC, &addr, &addrLen) == ASOCKERR_SUCCESS) { - ret = AsyncSocketGetPort(&addr); + ret = AsyncSocketGetPortFromAddr(&addr); } AsyncSocketUnlock(tempAsock); @@ -1329,7 +1398,7 @@ AsyncSocketBind(AsyncSocket *asock, // IN ASSERT(NULL != asock->sslSock); ASSERT(NULL != addr); - port = AsyncSocketGetPort(addr); + port = AsyncSocketGetPortFromAddr(addr); ASOCKLG0(asock, ("creating new listening socket on port %d\n", port)); #ifndef _WIN32 @@ -1561,8 +1630,7 @@ AsyncSocketConnectImpl(int socketFamily, free(ipString); asock = AsyncSocketConnect(&addr, addrLen, connectFn, clientData, - AsyncSocketConnectCallback, flags, pollParams, - &error); + flags, pollParams, &error); if (!asock) { Warning(ASOCKPREFIX "%s connection attempt failed\n", socketFamily == AF_INET ? "IPv4" : "IPv6"); @@ -1675,8 +1743,7 @@ AsyncSocket_ConnectVMCI(unsigned int cid, // IN asock = AsyncSocketConnect((struct sockaddr_storage *)&addr, sizeof addr, connectFn, clientData, - AsyncSocketConnectCallback, flags, pollParams, - outError); + flags, pollParams, outError); VMCISock_ReleaseAFValueFd(vsockDev); return asock; @@ -1726,14 +1793,74 @@ AsyncSocket_ConnectUnixDomain(const char *path, // IN asock = AsyncSocketConnect((struct sockaddr_storage *)&addr, sizeof addr, connectFn, clientData, - AsyncSocketConnectCallback, flags, pollParams, - outError); + flags, pollParams, outError); return asock; } #endif +/* + *---------------------------------------------------------------------------- + * + * AsyncSocketConnectErrorCheck -- + * + * Check for error on a connecting socket and fire the connect callback + * is any error is found. This is only used on Windows. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +static void +AsyncSocketConnectErrorCheck(void *data) // IN: AsyncSocket * +{ + AsyncSocket *asock = data; + Bool removed; + PollerFunction func = NULL; + + ASSERT(AsyncSocketIsLocked(asock)); + + if (asock->state == AsyncSocketConnecting) { + int sockErr = 0; + int sockErrLen = sizeof sockErr; + + if (getsockopt(asock->fd, SOL_SOCKET, SO_ERROR, (void *)&sockErr, + (void *)&sockErrLen) == 0) { + if (sockErr == 0) { + /* There is no error; keep waiting. */ + return; + } + asock->genericErrno = sockErr; + } else { + asock->genericErrno = ASOCK_LASTERROR(); + } + ASOCKLG0(asock, ("Connection failed: %s\n", + Err_Errno2String(asock->genericErrno))); + /* Remove connect callback. */ + removed = AsyncSocketPollRemove(asock, TRUE, POLL_FLAG_WRITE, + asock->internalConnectFn); + ASSERT(removed); + func = asock->internalConnectFn; + } + + /* Remove this callback. */ + removed = AsyncSocketPollRemove(asock, FALSE, POLL_FLAG_PERIODIC, + AsyncSocketConnectErrorCheck); + ASSERT(removed); + asock->internalConnectFn = NULL; + + if (func) { + func(asock); + } +} + + /* *---------------------------------------------------------------------------- * @@ -1756,7 +1883,6 @@ AsyncSocketConnect(struct sockaddr_storage *addr, socklen_t addrLen, AsyncSocketConnectFn connectFn, void *clientData, - PollerFunction internalConnectFn, AsyncSocketConnectFlags flags, AsyncSocketPollParams *pollParams, int *outError) @@ -1774,12 +1900,6 @@ AsyncSocketConnect(struct sockaddr_storage *addr, goto error; } - if (!internalConnectFn) { - error = ASOCKERR_INVAL; - Warning(ASOCKPREFIX "invalid arguments to connect!\n"); - goto error; - } - /* * Create a new IP socket */ @@ -1801,7 +1921,7 @@ AsyncSocketConnect(struct sockaddr_storage *addr, } return AsyncSocketConnectWithAsock(asock, addr, addrLen, connectFn, - clientData, internalConnectFn, + clientData, AsyncSocketConnectCallback, pollParams, outError); error: @@ -1826,6 +1946,8 @@ AsyncSocketConnectWithAsock(AsyncSocket *asock, int sysErr; int error = ASOCKERR_GENERIC; + ASSERT(internalConnectFn != NULL); + /* * Call connect(), which can either succeed immediately or return an error * indicating that the connection is in progress. In the latter case, we @@ -1843,6 +1965,23 @@ AsyncSocketConnectWithAsock(AsyncSocket *asock, ASOCKLOG(1, asock, ("registering write callback for socket connect\n")); pollStatus = AsyncSocketPollAdd(asock, TRUE, POLL_FLAG_WRITE, internalConnectFn); + if (vmx86_win32 && pollStatus == VMWARE_STATUS_SUCCESS && + asock->pollParams.iPoll == NULL) { + /* + * Work around WSAPoll's bug of not reporting failed connection + * by periodically (500 ms) checking for error. + */ + pollStatus = AsyncSocketPollAdd(asock, FALSE, POLL_FLAG_PERIODIC, + AsyncSocketConnectErrorCheck, + 500 * 1000); + if (pollStatus == VMWARE_STATUS_SUCCESS) { + asock->internalConnectFn = internalConnectFn; + } else { + ASOCKLG0(asock, ("failed to register periodic error check\n")); + AsyncSocketPollRemove(asock, TRUE, POLL_FLAG_WRITE, + internalConnectFn); + } + } } else { sysErr = ASOCK_LASTERROR(); Log(ASOCKPREFIX "connect failed, error %d: %s\n", @@ -2046,7 +2185,7 @@ AsyncSocket_AttachToFd(int fd, /* *---------------------------------------------------------------------------- * - * AsyncSocket_UseNodelay -- + * AsyncSocketUseNodelay -- * * Sets or unset TCP_NODELAY on the socket, which disables or * enables Nagle's algorithm, respectively. @@ -2062,8 +2201,8 @@ AsyncSocket_AttachToFd(int fd, */ int -AsyncSocket_UseNodelay(AsyncSocket *asock, // IN/OUT: - Bool nodelay) // IN: +AsyncSocketUseNodelay(AsyncSocket *asock, // IN/OUT: + Bool nodelay) // IN: { int flag = nodelay ? 1 : 0; @@ -2085,7 +2224,7 @@ AsyncSocket_UseNodelay(AsyncSocket *asock, // IN/OUT: /* *---------------------------------------------------------------------------- * - * AsyncSocket_SetTCPTimeouts -- + * AsyncSocketSetTCPTimeouts -- * * Allow caller to set a number of TCP-specific timeout * parameters on the socket for the active connection. @@ -2107,13 +2246,13 @@ AsyncSocket_UseNodelay(AsyncSocket *asock, // IN/OUT: *---------------------------------------------------------------------------- */ -#ifdef VMX86_SERVER int -AsyncSocket_SetTCPTimeouts(AsyncSocket *asock, // IN/OUT: - int keepIdle, // IN - int keepIntvl, // IN - int keepCnt) // IN +AsyncSocketSetTCPTimeouts(AsyncSocket *asock, // IN/OUT: + int keepIdle, // IN + int keepIntvl, // IN + int keepCnt) // IN { +#ifdef VMX86_SERVER int val; int opt; @@ -2150,9 +2289,9 @@ AsyncSocket_SetTCPTimeouts(AsyncSocket *asock, // IN/OUT: LOG(0, (ASOCKPREFIX "could not set TCP Timeout %d, error %d: %s\n", opt, Err_Errno(), Err_ErrString())); AsyncSocketUnlock(asock); +#endif return ASOCKERR_GENERIC; } -#endif /* @@ -2218,7 +2357,6 @@ AsyncSocketRecvSocket(AsyncSocket *asock, // IN: *---------------------------------------------------------------------------- * * AsyncSocket_Recv -- - * AsyncSocket_RecvPartial -- * * Registers a callback that will fire once the specified amount of data * has been received on the socket. @@ -2260,49 +2398,6 @@ AsyncSocketRecvSocket(AsyncSocket *asock, // IN: *---------------------------------------------------------------------------- */ -int -AsyncSocket_Recv(AsyncSocket *asock, - void *buf, - int len, - void *cb, - void *cbData) -{ - return AsyncSocketRecv(asock, buf, len, FALSE, cb, cbData); -} - -int -AsyncSocket_RecvPartial(AsyncSocket *asock, - void *buf, - int len, - void *cb, - void *cbData) -{ - /* - * Not yet implemented/tested on windows named pipe (though support - * there should be easy). - */ - ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); - return AsyncSocketRecv(asock, buf, len, TRUE, cb, cbData); -} - - -/* - *---------------------------------------------------------------------------- - * - * AsyncSocketRecv -- - * - * Internal function to implement AsyncSocket_Recv and - * AsyncSocket_RecvPartial. - * - * Results: - * ASOCKERR_*. - * - * Side effects: - * Could register poll callback. - * - *---------------------------------------------------------------------------- - */ - int AsyncSocketRecv(AsyncSocket *asock, // IN: void *buf, // IN: unused @@ -2315,12 +2410,6 @@ AsyncSocketRecv(AsyncSocket *asock, // IN: void *clientData = NULL; int retVal; - if (!asock) { - Warning(ASOCKPREFIX "Recv called with invalid arguments!\n"); - - return ASOCKERR_INVAL; - } - if (!asock->errorFn) { ASOCKWARN(asock, ("%s: no registered error handler!\n", __FUNCTION__)); @@ -2362,8 +2451,8 @@ AsyncSocketRecv(AsyncSocket *asock, // IN: } ASSERT(asock->vt); - ASSERT(asock->vt->recv); - retVal = asock->vt->recv(asock, buf, len); + ASSERT(asock->vt->recvInternal); + retVal = asock->vt->recvInternal(asock, buf, len); if (retVal != ASOCKERR_SUCCESS) { goto outHaveLock; } @@ -2385,7 +2474,7 @@ AsyncSocketRecv(AsyncSocket *asock, // IN: /* *---------------------------------------------------------------------------- * - * AsyncSocket_RecvPassedFd -- + * AsyncSocketRecvPassedFd -- * * See AsyncSocket_Recv. Besides that it allows for receiving one * file descriptor... @@ -2400,22 +2489,16 @@ AsyncSocketRecv(AsyncSocket *asock, // IN: */ int -AsyncSocket_RecvPassedFd(AsyncSocket *asock, // IN/OUT: socket - void *buf, // OUT: buffer with data - int len, // IN: length - void *cb, // IN: completion calback - void *cbData) // IN: callback's data +AsyncSocketRecvPassedFd(AsyncSocket *asock, // IN/OUT: socket + void *buf, // OUT: buffer with data + int len, // IN: length + void *cb, // IN: completion calback + void *cbData) // IN: callback's data { int err; ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); - if (!asock) { - Warning(ASOCKPREFIX "Recv called with invalid arguments!\n"); - - return ASOCKERR_INVAL; - } - if (!asock->errorFn) { ASOCKWARN(asock, ("%s: no registered error handler!\n", __FUNCTION__)); @@ -2677,7 +2760,8 @@ AsyncSocket_RecvBlocking(AsyncSocket *s, int *received, int timeoutMS) { - return AsyncSocketBlockingWork(s, TRUE, buf, len, received, timeoutMS, FALSE); + return AsyncSocketBlockingWork(s, TRUE, buf, len, received, timeoutMS, + FALSE); } int @@ -2687,7 +2771,8 @@ AsyncSocket_RecvPartialBlocking(AsyncSocket *s, int *received, int timeoutMS) { - return AsyncSocketBlockingWork(s, TRUE, buf, len, received, timeoutMS, TRUE); + return AsyncSocketBlockingWork(s, TRUE, buf, len, received, timeoutMS, + TRUE); } int @@ -2730,6 +2815,7 @@ AsyncSocketBlockingWork(AsyncSocket *s, // IN: int sysErr; ASSERT(s->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); + ASSERT(s->asockType != ASYNCSOCKET_TYPE_PROXYSOCKET); if (s == NULL || buf == NULL || len <= 0) { Warning(ASOCKPREFIX "Recv called with invalid arguments!\n"); @@ -2866,7 +2952,7 @@ AsyncSocketSendSocket(AsyncSocket *asock, // IN: /* *---------------------------------------------------------------------------- * - * AsyncSocket_Send -- + * AsyncSocketSend -- * * Queues the provided data for sending on the socket. If a send callback * is provided, the callback is fired after the data has been written to @@ -2891,15 +2977,15 @@ AsyncSocketSendSocket(AsyncSocket *asock, // IN: */ int -AsyncSocket_Send(AsyncSocket *asock, - void *buf, - int len, - AsyncSocketSendFn sendFn, - void *clientData) +AsyncSocketSend(AsyncSocket *asock, + void *buf, + int len, + AsyncSocketSendFn sendFn, + void *clientData) { int retVal; - SendBufList *listBeforeAppend = asock->sendBufList; Bool bufferListWasEmpty = FALSE; + SendBufList **pcur; /* * Note: I think it should be fine to send with a length of zero and a @@ -2927,15 +3013,18 @@ AsyncSocket_Send(AsyncSocket *asock, ASSERT(asock->vt); ASSERT(asock->vt->prepareSend); - retVal = asock->vt->prepareSend(asock, buf, len, - sendFn, clientData, &bufferListWasEmpty); + retVal = asock->vt->prepareSend(asock, buf, len, sendFn, clientData, + &bufferListWasEmpty); if (retVal != ASOCKERR_SUCCESS) { + ASOCKLOG(1, asock, ("Failed to prepare buffer:%p for send. Error:%d\n", + buf, retVal)); goto outUndoAppend; } - ASSERT(asock->vt->send); - retVal = asock->vt->send(asock, bufferListWasEmpty, buf, len); + ASSERT(asock->vt->sendInternal); + retVal = asock->vt->sendInternal(asock, bufferListWasEmpty, buf, len); if (retVal != ASOCKERR_SUCCESS) { + ASOCKLOG(1, asock, ("Failed to send buffer:%p. Error:%d\n", buf, retVal)); goto outUndoAppend; } @@ -2943,13 +3032,23 @@ AsyncSocket_Send(AsyncSocket *asock, goto outHaveLock; outUndoAppend: - if (asock->sendBufList != listBeforeAppend) { - SendBufList *appendedBuffer = asock->sendBufList; - asock->sendBufList = listBeforeAppend; - if (asock->sendBufList == NULL) { - asock->sendBufTail = &(asock->sendBufList); + /* + * Remove the appended buffer from the sendBufList. We always append the + * buffer to the tail of the list. + */ + pcur = &asock->sendBufList; + if (*pcur != NULL) { + if (!bufferListWasEmpty) { + do { + pcur = &((*pcur)->next); + } while ((*pcur)->next != NULL); + } + + if ((*pcur)->buf == buf) { + free(*pcur); + *pcur = NULL; + asock->sendBufTail = pcur; } - free(appendedBuffer); } outHaveLock: @@ -3595,7 +3694,7 @@ AsyncSocketConnectInternal(AsyncSocket *s) /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetGenericErrno -- + * AsyncSocketGetGenericErrno -- * * Used when an ASOCKERR_GENERIC is returned due to a system error. * The errno that was returned by the system is stored in the asock @@ -3614,7 +3713,7 @@ AsyncSocketConnectInternal(AsyncSocket *s) */ int -AsyncSocket_GetGenericErrno(AsyncSocket *s) // IN: +AsyncSocketGetGenericErrno(AsyncSocket *s) // IN: { ASSERT(s); @@ -3649,6 +3748,7 @@ AsyncSocket_WaitForConnection(AsyncSocket *s, // IN: Bool removed = FALSE; ASSERT(s->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); + ASSERT(s->asockType != ASYNCSOCKET_TYPE_PROXYSOCKET); AsyncSocketLock(s); @@ -3697,6 +3797,12 @@ AsyncSocket_WaitForConnection(AsyncSocket *s, // IN: AsyncSocketConnectCallback) || AsyncSocketPollRemove(s, FALSE, 0, AsyncSocketConnectCallback); ASSERT(removed); + if (s->internalConnectFn) { + removed = AsyncSocketPollRemove(s, FALSE, POLL_FLAG_PERIODIC, + AsyncSocketConnectErrorCheck); + ASSERT(removed); + s->internalConnectFn = NULL; + } } AsyncSocketUnlock(s); @@ -3791,12 +3897,15 @@ AsyncSocket_WaitForConnection(AsyncSocket *s, // IN: */ int -AsyncSocket_DoOneMsg(AsyncSocket *s, Bool read, int timeoutMS) +AsyncSocket_DoOneMsg(AsyncSocket *s, // IN + Bool read, // IN + int timeoutMS) // IN { int retVal; AsyncSocket *asock = NULL; ASSERT(s->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); + ASSERT(s->asockType != ASYNCSOCKET_TYPE_PROXYSOCKET); if (!s) { Warning(ASOCKPREFIX "DoOneMsg called with invalid paramters.\n"); @@ -3817,7 +3926,7 @@ AsyncSocket_DoOneMsg(AsyncSocket *s, Bool read, int timeoutMS) ASSERT(s->state == AsyncSocketConnected); ASSERT(s->recvCb); /* We are supposed to call someone... */ AsyncSocketAddRef(s); - s->vt->cancelRecvCb(s); + s->vt->cancelRecvCbInternal(s); s->recvCb = TRUE; /* We need to know if the callback cancel recv. */ s->inBlockingRecv++; @@ -3850,8 +3959,8 @@ AsyncSocket_DoOneMsg(AsyncSocket *s, Bool read, int timeoutMS) */ s->recvCb = FALSE; /* For re-registering the poll callback. */ if (retVal == ASOCKERR_SUCCESS || retVal == ASOCKERR_TIMEOUT) { - retVal = s->vt->recv(s, (uint8 *)s->recvBuf + s->recvPos, - s->recvLen - s->recvPos); + retVal = s->vt->recvInternal(s, (uint8 *)s->recvBuf + s->recvPos, + s->recvLen - s->recvPos); } if (retVal != ASOCKERR_SUCCESS) { s->recvBuf = NULL; @@ -3881,7 +3990,7 @@ AsyncSocket_DoOneMsg(AsyncSocket *s, Bool read, int timeoutMS) /* *---------------------------------------------------------------------------- * - * AsyncSocket_Flush -- + * AsyncSocketFlush -- * * Try to send any pending out buffers until we run out of buffers, or * the timeout expires. @@ -3897,7 +4006,8 @@ AsyncSocket_DoOneMsg(AsyncSocket *s, Bool read, int timeoutMS) */ int -AsyncSocket_Flush(AsyncSocket *s, int timeoutMS) +AsyncSocketFlush(AsyncSocket *s, // IN + int timeoutMS) // IN { VmTimeType now, done; int retVal; @@ -4227,8 +4337,8 @@ AsyncSocketCancelCbForCloseInt(AsyncSocket *asock) // IN: } ASSERT(asock->vt); - ASSERT(asock->vt->cancelCbForClose); - asock->vt->cancelCbForClose(asock); + ASSERT(asock->vt->cancelCbForCloseInternal); + asock->vt->cancelCbForCloseInternal(asock); AsyncSocketAddRef(asock); while (asock->sendBufList) { @@ -4258,7 +4368,7 @@ AsyncSocketCancelCbForCloseInt(AsyncSocket *asock) // IN: /* *---------------------------------------------------------------------------- * - * AsyncSocket_CancelCbForClose -- + * AsyncSocketCancelCbForClose -- * * This is the external version of AsyncSocketCancelCbForCloseInt(). It * takes care of acquiring any necessary lock before calling the internal @@ -4274,7 +4384,7 @@ AsyncSocketCancelCbForCloseInt(AsyncSocket *asock) // IN: */ void -AsyncSocket_CancelCbForClose(AsyncSocket *asock) // IN: +AsyncSocketCancelCbForClose(AsyncSocket *asock) // IN: { AsyncSocketLock(asock); AsyncSocketCancelCbForCloseInt(asock); @@ -4338,7 +4448,45 @@ AsyncSocketCancelCbForConnectingCloseSocket(AsyncSocket *asock) // IN /* *---------------------------------------------------------------------------- * - * AsyncSocket_Close -- + * AsyncSocket_SetCloseOptions -- + * + * Enables optional behavior for AsyncSocket_Close(): + * + * - If flushEnabledMaxWaitMsec is non-zero, the output stream + * will be flushed synchronously before the socket is closed. + * (default is zero: close socket right away without flushing) + * + * - If closeCb is set, the callback will be called asynchronously + * when the socket is actually destroyed. + * (default is NULL: no callback) + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +void +AsyncSocket_SetCloseOptions(AsyncSocket *asock, // IN + int flushEnabledMaxWaitMsec, // IN + AsyncSocketCloseCb closeCb) // IN +{ + if (!asock) { + Warning("%s() called with NULL asock!\n", __FUNCTION__); + return; + } + asock->flushEnabledMaxWaitMsec = flushEnabledMaxWaitMsec; + asock->closeCb = closeCb; +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocketClose -- * * AsyncSocket destructor. The destructor should be safe to call at any * time. It's invoked automatically for I/O errors on slots that have no @@ -4357,14 +4505,10 @@ AsyncSocketCancelCbForConnectingCloseSocket(AsyncSocket *asock) // IN */ int -AsyncSocket_Close(AsyncSocket *asock) +AsyncSocketClose(AsyncSocket *asock) // IN { Bool isListener = TRUE; - if (!asock) { - return ASOCKERR_INVAL; - } - AsyncSocketLock(asock); if (asock->state == AsyncSocketClosed) { @@ -4389,6 +4533,17 @@ AsyncSocket_Close(AsyncSocket *asock) isListener = FALSE; + /* Flush output if requested via AsyncSocket_SetCloseOptions(). */ + if (asock->flushEnabledMaxWaitMsec && + asock->state == AsyncSocketConnected && + !asock->errorSeen) { + int ret = AsyncSocket_Flush(asock, asock->flushEnabledMaxWaitMsec); + if (ret != ASOCKERR_SUCCESS) { + ASOCKWARN(asock, ("AsyncSocket_Flush failed: %s. Closing now.\n", + AsyncSocket_Err2String(ret))); + } + } + /* * Set the new state to closed, and then check the old state and do the * right thing accordingly @@ -4404,15 +4559,15 @@ AsyncSocket_Close(AsyncSocket *asock) case AsyncSocketListening: ASOCKLOG(1, asock, ("old state was listening, removing accept " "callback\n")); - ASSERT(asock->vt->cancelListenCb); - asock->vt->cancelListenCb(asock); + ASSERT(asock->vt->cancelListenCbInternal); + asock->vt->cancelListenCbInternal(asock); break; case AsyncSocketConnecting: ASOCKLOG(1, asock, ("old state was connecting, removing connect " "callback\n")); - ASSERT(asock->vt->cancelCbForConnectingClose); - removed = asock->vt->cancelCbForConnectingClose(asock); + ASSERT(asock->vt->cancelCbForConnectingCloseInternal); + removed = asock->vt->cancelCbForConnectingCloseInternal(asock); if (!removed) { ASOCKLOG(1, asock, ("connect callback is not present in the poll " "list.\n")); @@ -4432,8 +4587,28 @@ AsyncSocket_Close(AsyncSocket *asock) NOT_REACHED(); } - ASSERT(asock->vt->close); - asock->vt->close(asock); + if (asock->internalConnectFn) { + removed = AsyncSocketPollRemove(asock, FALSE, POLL_FLAG_PERIODIC, + AsyncSocketConnectErrorCheck); + ASSERT(removed); + asock->internalConnectFn = NULL; + } + + if (asock->sslConnectFn && asock->sslPollFlags > 0) { + removed = AsyncSocketPollRemove(asock, TRUE, asock->sslPollFlags, + AsyncSocketSslConnectCallback); + ASSERT(removed); + } + + if (asock->sslAcceptFn && asock->sslPollFlags > 0) { + removed = AsyncSocketPollRemove(asock, TRUE, asock->sslPollFlags, + AsyncSocketSslAcceptCallback); + ASSERT(removed); + } + asock->sslPollFlags = 0; + + ASSERT(asock->vt->closeInternal); + asock->vt->closeInternal(asock); } AsyncSocketRelease(asock, TRUE); @@ -4445,7 +4620,7 @@ AsyncSocket_Close(AsyncSocket *asock) /* *---------------------------------------------------------------------------- * - * AsyncSocket_GetState -- + * AsyncSocketGetState -- * * Returns the state of the provided asock or ASOCKERR_INVAL. Note that * unless this is called from a callback function, the state should be @@ -4461,7 +4636,7 @@ AsyncSocket_Close(AsyncSocket *asock) */ AsyncSocketState -AsyncSocket_GetState(AsyncSocket *asock) +AsyncSocketGetState(AsyncSocket *asock) { return (asock ? asock->state : ASOCKERR_INVAL); } @@ -4470,7 +4645,7 @@ AsyncSocket_GetState(AsyncSocket *asock) /* *---------------------------------------------------------------------------- * - * AsyncSocket_IsSendBufferFull -- + * AsyncSocketIsSendBufferFull -- * * Indicate if socket send buffer is full. Note that unless this is * called from a callback function, the return value should be treated @@ -4488,7 +4663,7 @@ AsyncSocket_GetState(AsyncSocket *asock) */ int -AsyncSocket_IsSendBufferFull(AsyncSocket *asock) +AsyncSocketIsSendBufferFull(AsyncSocket *asock) { return (asock ? asock->sendBufFull : ASOCKERR_GENERIC); } @@ -4715,11 +4890,14 @@ void AsyncSocketHandleError(AsyncSocket *asock, int asockErr) { ASSERT(asock); + asock->errorSeen = TRUE; if (asock->errorFn) { - ASOCKLOG(3, asock, ("firing error callback\n")); + ASOCKLOG(3, asock, ("firing error callback (%s)\n", + AsyncSocket_Err2String(asockErr))); asock->errorFn(asockErr, asock, asock->errorClientData); } else { - ASOCKLOG(3, asock, ("no error callback, closing socket\n")); + ASOCKLOG(3, asock, ("no error callback, closing socket (%s)\n", + AsyncSocket_Err2String(asockErr))); AsyncSocket_Close(asock); } } @@ -5100,6 +5278,11 @@ AsyncSocketRelease(AsyncSocket *s, // IN: } if (0 == count) { ASOCKLOG(1, s, ("Final release; freeing asock struct\n")); + + if (s->closeCb) { + s->closeCb(s); + } + if (s->vt && s->vt->release) { s->vt->release(s); } @@ -5351,8 +5534,7 @@ AsyncSocketIPollRemove(AsyncSocket *asock, /* *----------------------------------------------------------------------------- * - * AsyncSocket_CancelRecv -- - * AsyncSocket_CancelRecvEx -- + * AsyncSocketCancelRecv -- * * Call this function if you know what you are doing. This should be * called if you want to synchronously receive the outstanding data on @@ -5371,31 +5553,14 @@ AsyncSocketIPollRemove(AsyncSocket *asock, */ int -AsyncSocket_CancelRecv(AsyncSocket *asock, // IN - int *partialRecvd, // OUT - void **recvBuf, // OUT - void **recvFn) // OUT -{ - return AsyncSocket_CancelRecvEx(asock, partialRecvd, recvBuf, recvFn, FALSE); -} - -int -AsyncSocket_CancelRecvEx(AsyncSocket *asock, // IN - int *partialRecvd, // OUT - void **recvBuf, // OUT - void **recvFn, // OUT - Bool cancelOnSend) // IN +AsyncSocketCancelRecv(AsyncSocket *asock, // IN + int *partialRecvd, // OUT + void **recvBuf, // OUT + void **recvFn, // OUT + Bool cancelOnSend) // IN { int retVal; - ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); - - if (!asock) { - Warning(ASOCKPREFIX "Invalid socket while cancelling recv request!\n"); - - return ASOCKERR_INVAL; - } - AsyncSocketLock(asock); if (asock->state != AsyncSocketConnected) { @@ -5419,8 +5584,8 @@ AsyncSocket_CancelRecvEx(AsyncSocket *asock, // IN } ASSERT(asock->vt); - ASSERT(asock->vt->cancelRecvCb); - asock->vt->cancelRecvCb(asock); + ASSERT(asock->vt->cancelRecvCbInternal); + asock->vt->cancelRecvCbInternal(asock); if (partialRecvd && asock->recvLen > 0) { ASOCKLOG(1, asock, ("Partially read %d bytes out of %d bytes while " @@ -5455,7 +5620,7 @@ AsyncSocket_CancelRecvEx(AsyncSocket *asock, // IN /* *----------------------------------------------------------------------------- * - * AsyncSocket_GetReceivedFd -- + * AsyncSocketGetReceivedFd -- * * Retrieve received file descriptor from socket. * @@ -5469,18 +5634,12 @@ AsyncSocket_CancelRecvEx(AsyncSocket *asock, // IN */ int -AsyncSocket_GetReceivedFd(AsyncSocket *asock) // IN +AsyncSocketGetReceivedFd(AsyncSocket *asock) // IN { int fd; ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); - if (!asock) { - Warning(ASOCKPREFIX "Invalid socket while receiving fd!\n"); - - return -1; - } - AsyncSocketLock(asock); if (asock->state != AsyncSocketConnected) { @@ -5498,12 +5657,11 @@ AsyncSocket_GetReceivedFd(AsyncSocket *asock) // IN return fd; } -#ifndef USE_SSL_DIRECT /* *----------------------------------------------------------------------------- * - * AsyncSocket_ConnectSSL -- + * AsyncSocketConnectSSL -- * * Initialize the socket's SSL object, by calling SSL_ConnectAndVerify. * NOTE: This call is blocking. @@ -5518,10 +5676,11 @@ AsyncSocket_GetReceivedFd(AsyncSocket *asock) // IN */ Bool -AsyncSocket_ConnectSSL(AsyncSocket *asock, // IN - SSLVerifyParam *verifyParam, // IN/OPT - void *sslContext) // IN/OPT +AsyncSocketConnectSSL(AsyncSocket *asock, // IN + SSLVerifyParam *verifyParam, // IN/OPT + void *sslContext) // IN/OPT { +#ifndef USE_SSL_DIRECT ASSERT(asock); ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); @@ -5531,13 +5690,16 @@ AsyncSocket_ConnectSSL(AsyncSocket *asock, // IN return SSL_ConnectAndVerifyWithContext(asock->sslSock, verifyParam, sslContext); +#else + return FALSE; +#endif } /* *----------------------------------------------------------------------------- * - * AsyncSocket_AcceptSSL -- + * AsyncSocketAcceptSSL -- * * Initialize the socket's SSL object, by calling SSL_Accept. * @@ -5551,15 +5713,146 @@ AsyncSocket_ConnectSSL(AsyncSocket *asock, // IN */ Bool -AsyncSocket_AcceptSSL(AsyncSocket *asock) // IN +AsyncSocketAcceptSSL(AsyncSocket *asock) // IN { +#ifndef USE_SSL_DIRECT ASSERT(asock); ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); return SSL_Accept(asock->sslSock); +#else + return FALSE; +#endif +} + + +/* + *---------------------------------------------------------------------------- + * + * AsyncSocketSslConnectCallback -- + * + * Poll callback to redrive an outstanding ssl connect operation. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ + +static void +AsyncSocketSslConnectCallback(void *clientData) // IN +{ +#ifndef USE_SSL_DIRECT + int sslOpCode; + VMwareStatus pollStatus; + AsyncSocket *asock = clientData; + + ASSERT(asock); + ASSERT(asock->pollParams.iPoll == NULL); + ASSERT(AsyncSocketIsLocked(asock)); + + AsyncSocketAddRef(asock); + + /* Only set if poll callback is registered */ + asock->sslPollFlags = 0; + + sslOpCode = SSL_TryCompleteConnect(asock->sslSock); + if (sslOpCode > 0) { + (*asock->sslConnectFn)(TRUE, asock, asock->clientData); + } else if (sslOpCode < 0) { + (*asock->sslConnectFn)(FALSE, asock, asock->clientData); + } else { + asock->sslPollFlags = SSL_WantRead(asock->sslSock) ? + POLL_FLAG_READ : POLL_FLAG_WRITE; + + /* register the poll callback to redrive the SSL connect */ + pollStatus = AsyncSocketPollAdd(asock, TRUE, asock->sslPollFlags, + AsyncSocketSslConnectCallback); + + if (pollStatus != VMWARE_STATUS_SUCCESS) { + ASOCKWARN(asock, ("failed to reinstall ssl connect callback!\n")); + asock->sslPollFlags = 0; + (*asock->sslConnectFn)(FALSE, asock, asock->clientData); + } + } + + AsyncSocketRelease(asock, FALSE); +#else + NOT_IMPLEMENTED(); +#endif +} + + +/* + *----------------------------------------------------------------------------- + * + * AsyncSocketStartSslConnect -- + * + * Start an asynchronous SSL connect operation. + * + * The supplied callback function is called when the operation is complete + * or an error occurs. + * + * Note: The client callback could be invoked from this function or + * from a poll callback. If there is any requirement to always + * invoke the client callback from outside this function, consider + * changing this code to use a poll timer callback with timeout + * set to zero. + * + * Results: + * None. + * Error is always reported using the callback supplied. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +AsyncSocketStartSslConnect(AsyncSocket *asock, // IN + SSLVerifyParam *verifyParam, // IN/OPT + void *sslCtx, // IN + AsyncSocketSslConnectFn sslConnectFn, // IN + void *clientData) // IN +{ +#ifndef USE_SSL_DIRECT + Bool ok; + + ASSERT(asock); + ASSERT(asock->asockType != ASYNCSOCKET_TYPE_NAMEDPIPE); + ASSERT(sslConnectFn); + + AsyncSocketLock(asock); + + if (asock->sslConnectFn || asock->sslAcceptFn) { + ASOCKWARN(asock, ("An SSL operation was already initiated.\n")); + goto done; + } + + ok = SSL_SetupConnectAndVerifyWithContext(asock->sslSock, verifyParam, + sslCtx); + if (!ok) { + /* Something went wrong already */ + (*sslConnectFn)(FALSE, asock, clientData); + goto done; + } + + asock->sslConnectFn = sslConnectFn; + asock->clientData = clientData; + + AsyncSocketSslConnectCallback(asock); + +done: + AsyncSocketUnlock(asock); +#else + NOT_IMPLEMENTED(); +#endif } -#endif /* ! USE_SSL_DIRECT */ /* *---------------------------------------------------------------------------- @@ -5590,21 +5883,26 @@ AsyncSocketSslAcceptCallback(void *clientData) AsyncSocketAddRef(asock); + /* Only set if poll callback is registered */ + asock->sslPollFlags = 0; + sslOpCode = SSL_TryCompleteAccept(asock->sslSock); if (sslOpCode > 0) { - (*asock->sslAcceptFn)(TRUE, asock, clientData); + (*asock->sslAcceptFn)(TRUE, asock, asock->clientData); } else if (sslOpCode < 0) { - (*asock->sslAcceptFn)(FALSE, asock, clientData); + (*asock->sslAcceptFn)(FALSE, asock, asock->clientData); } else { + asock->sslPollFlags = SSL_WantRead(asock->sslSock) ? + POLL_FLAG_READ : POLL_FLAG_WRITE; + /* register the poll callback to redrive the SSL accept */ - pollStatus = AsyncSocketPollAdd(asock, TRUE, - SSL_WantRead(asock->sslSock) ? - POLL_FLAG_READ : POLL_FLAG_WRITE, + pollStatus = AsyncSocketPollAdd(asock, TRUE, asock->sslPollFlags, AsyncSocketSslAcceptCallback); if (pollStatus != VMWARE_STATUS_SUCCESS) { ASOCKWARN(asock, ("failed to reinstall ssl accept callback!\n")); - (*asock->sslAcceptFn)(FALSE, asock, clientData); + asock->sslPollFlags = 0; + (*asock->sslAcceptFn)(FALSE, asock, asock->clientData); } } @@ -5615,7 +5913,7 @@ AsyncSocketSslAcceptCallback(void *clientData) /* *----------------------------------------------------------------------------- * - * AsyncSocket_StartSslAccept -- + * AsyncSocketStartSslAccept -- * * Start an asynchronous SSL accept operation. * @@ -5642,10 +5940,10 @@ AsyncSocketSslAcceptCallback(void *clientData) */ void -AsyncSocket_StartSslAccept(AsyncSocket *asock, // IN - void *sslCtx, // IN - AsyncSocketSslAcceptFn sslAcceptFn, // IN - void *clientData) // IN +AsyncSocketStartSslAccept(AsyncSocket *asock, // IN + void *sslCtx, // IN + AsyncSocketSslAcceptFn sslAcceptFn, // IN + void *clientData) // IN { Bool ok; @@ -5655,8 +5953,8 @@ AsyncSocket_StartSslAccept(AsyncSocket *asock, // IN AsyncSocketLock(asock); - if (asock->sslAcceptFn) { - ASOCKWARN(asock, ("A SSL accept operation has already been initiated.\n")); + if (asock->sslAcceptFn || asock->sslConnectFn) { + ASOCKWARN(asock, ("An SSL operation was already initiated.\n")); goto done; } @@ -5680,7 +5978,7 @@ AsyncSocket_StartSslAccept(AsyncSocket *asock, // IN /* *----------------------------------------------------------------------------- * - * AsyncSocket_SetBufferSizes -- + * AsyncSocketSetBufferSizes -- * * Set socket level recv/send buffer sizes if they are less than given sizes. * @@ -5695,9 +5993,9 @@ AsyncSocket_StartSslAccept(AsyncSocket *asock, // IN */ Bool -AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN - int sendSz, // IN - int recvSz) // IN +AsyncSocketSetBufferSizes(AsyncSocket *asock, // IN + int sendSz, // IN + int recvSz) // IN { int err; int buffSz; @@ -5705,10 +6003,6 @@ AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN int sysErr; int fd; - if (!asock) { - return FALSE; - } - fd = asock->fd; err = getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *)&buffSz, &len); @@ -5758,7 +6052,7 @@ AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN /* *----------------------------------------------------------------------------- * - * AsyncSocket_SetSendLowLatencyMode -- + * AsyncSocketSetSendLowLatencyMode -- * * Put the socket into a mode where we attempt to issue sends * directly from within AsyncSocket_Send(). Ordinarily, we would @@ -5780,8 +6074,50 @@ AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN */ void -AsyncSocket_SetSendLowLatencyMode(AsyncSocket *asock, // IN - Bool enable) // IN +AsyncSocketSetSendLowLatencyMode(AsyncSocket *asock, // IN + Bool enable) // IN { asock->sendLowLatency = enable; } + + +#ifndef _WIN32 +/* + *----------------------------------------------------------------------------- + * + * AsyncSocket_ListenSocketUDS -- + * + * Listens on the specified unix domain socket, and accepts new socket + * connections. Fires the connect callback with new AsyncSocket object for + * each connection. + * + * Results: + * New AsyncSocket in listening state or NULL on error + * + * Side effects: + * Creates new Unix domain socket, binds and listens. + * + *----------------------------------------------------------------------------- + */ + +AsyncSocket * +AsyncSocket_ListenSocketUDS(const char *pipeName, // IN + AsyncSocketConnectFn connectFn, // IN + void *clientData, // IN + AsyncSocketPollParams *pollParams, // IN + int *outError) // OUT +{ + struct sockaddr_un addr; + + memset(&addr, 0, sizeof addr); + addr.sun_family = AF_UNIX; + Str_Strcpy(addr.sun_path, pipeName, sizeof addr.sun_path); + + Log(ASOCKPREFIX "creating new socket listening on %s\n", pipeName); + + return AsyncSocketListenImpl((struct sockaddr_storage *)&addr, + sizeof addr, + connectFn, clientData, pollParams, FALSE, + FALSE, NULL, outError); +} +#endif diff --git a/open-vm-tools/lib/auth/Makefile.am b/open-vm-tools/lib/auth/Makefile.am index 6d0a40a70..f1951bc92 100644 --- a/open-vm-tools/lib/auth/Makefile.am +++ b/open-vm-tools/lib/auth/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/auth/Makefile.in b/open-vm-tools/lib/auth/Makefile.in deleted file mode 100644 index 137963be3..000000000 --- a/open-vm-tools/lib/auth/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/auth -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libAuth_la_LIBADD = -am_libAuth_la_OBJECTS = authPosix.lo -libAuth_la_OBJECTS = $(am_libAuth_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libAuth_la_SOURCES) -DIST_SOURCES = $(libAuth_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libAuth.la -libAuth_la_SOURCES = authPosix.c -AM_CFLAGS = @LIB_AUTH_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/auth/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/auth/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libAuth.la: $(libAuth_la_OBJECTS) $(libAuth_la_DEPENDENCIES) - $(LINK) $(libAuth_la_OBJECTS) $(libAuth_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/auth/authPosix.c b/open-vm-tools/lib/auth/authPosix.c index e75da98d1..399f78a00 100644 --- a/open-vm-tools/lib/auth/authPosix.c +++ b/open-vm-tools/lib/auth/authPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/backdoor/Makefile.am b/open-vm-tools/lib/backdoor/Makefile.am index 6ddd452d1..49dab9f6c 100644 --- a/open-vm-tools/lib/backdoor/Makefile.am +++ b/open-vm-tools/lib/backdoor/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/backdoor/Makefile.in b/open-vm-tools/lib/backdoor/Makefile.in deleted file mode 100644 index 2daca1738..000000000 --- a/open-vm-tools/lib/backdoor/Makefile.in +++ /dev/null @@ -1,541 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@THIRTY_TWO_BIT_USERSPACE_TRUE@am__append_1 = backdoorGcc32.c -@THIRTY_TWO_BIT_USERSPACE_FALSE@am__append_2 = backdoorGcc64.c -subdir = lib/backdoor -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libBackdoor_la_LIBADD = -am__libBackdoor_la_SOURCES_DIST = backdoor.c backdoorGcc32.c \ - backdoorGcc64.c -@THIRTY_TWO_BIT_USERSPACE_TRUE@am__objects_1 = backdoorGcc32.lo -@THIRTY_TWO_BIT_USERSPACE_FALSE@am__objects_2 = backdoorGcc64.lo -am_libBackdoor_la_OBJECTS = backdoor.lo $(am__objects_1) \ - $(am__objects_2) -libBackdoor_la_OBJECTS = $(am_libBackdoor_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libBackdoor_la_SOURCES) -DIST_SOURCES = $(am__libBackdoor_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libBackdoor.la -libBackdoor_la_SOURCES = backdoor.c $(am__append_1) $(am__append_2) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/backdoor/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/backdoor/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libBackdoor.la: $(libBackdoor_la_OBJECTS) $(libBackdoor_la_DEPENDENCIES) - $(LINK) $(libBackdoor_la_OBJECTS) $(libBackdoor_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backdoor.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backdoorGcc32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backdoorGcc64.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/backdoor/backdoor.c b/open-vm-tools/lib/backdoor/backdoor.c index 13065dfbd..41012c9b7 100644 --- a/open-vm-tools/lib/backdoor/backdoor.c +++ b/open-vm-tools/lib/backdoor/backdoor.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1999-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1999-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/backdoor/backdoorGcc32.c b/open-vm-tools/lib/backdoor/backdoorGcc32.c index d402cb002..49610f196 100644 --- a/open-vm-tools/lib/backdoor/backdoorGcc32.c +++ b/open-vm-tools/lib/backdoor/backdoorGcc32.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/backdoor/backdoorGcc64.c b/open-vm-tools/lib/backdoor/backdoorGcc64.c index 551b7cd0d..7bda8ce2d 100644 --- a/open-vm-tools/lib/backdoor/backdoorGcc64.c +++ b/open-vm-tools/lib/backdoor/backdoorGcc64.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/backdoor/backdoorInt.h b/open-vm-tools/lib/backdoor/backdoorInt.h index 18e6f0b9d..c49c8941d 100644 --- a/open-vm-tools/lib/backdoor/backdoorInt.h +++ b/open-vm-tools/lib/backdoor/backdoorInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/dataMap/Makefile.am b/open-vm-tools/lib/dataMap/Makefile.am index f5824d35e..c7ebc6435 100644 --- a/open-vm-tools/lib/dataMap/Makefile.am +++ b/open-vm-tools/lib/dataMap/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2013-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/dataMap/Makefile.in b/open-vm-tools/lib/dataMap/Makefile.in deleted file mode 100644 index 9c10d4d3c..000000000 --- a/open-vm-tools/lib/dataMap/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/dataMap -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libDataMap_la_LIBADD = -am_libDataMap_la_OBJECTS = dataMap.lo -libDataMap_la_OBJECTS = $(am_libDataMap_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libDataMap_la_SOURCES) -DIST_SOURCES = $(libDataMap_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libDataMap.la -libDataMap_la_SOURCES = dataMap.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/dataMap/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/dataMap/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libDataMap.la: $(libDataMap_la_OBJECTS) $(libDataMap_la_DEPENDENCIES) - $(LINK) $(libDataMap_la_OBJECTS) $(libDataMap_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dataMap.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/dataMap/dataMap.c b/open-vm-tools/lib/dataMap/dataMap.c index 2f0ca8558..dbc7139ee 100644 --- a/open-vm-tools/lib/dataMap/dataMap.c +++ b/open-vm-tools/lib/dataMap/dataMap.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/dict/Makefile.am b/open-vm-tools/lib/dict/Makefile.am index 1727b7f40..672f20419 100644 --- a/open-vm-tools/lib/dict/Makefile.am +++ b/open-vm-tools/lib/dict/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/dict/Makefile.in b/open-vm-tools/lib/dict/Makefile.in deleted file mode 100644 index 55a8a9060..000000000 --- a/open-vm-tools/lib/dict/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/dict -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libDict_la_LIBADD = -am_libDict_la_OBJECTS = dictll.lo -libDict_la_OBJECTS = $(am_libDict_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libDict_la_SOURCES) -DIST_SOURCES = $(libDict_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libDict.la -libDict_la_SOURCES = dictll.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/dict/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/dict/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libDict.la: $(libDict_la_OBJECTS) $(libDict_la_DEPENDENCIES) - $(LINK) $(libDict_la_OBJECTS) $(libDict_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dictll.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/dict/dictll.c b/open-vm-tools/lib/dict/dictll.c index ebe063959..b454ed0eb 100644 --- a/open-vm-tools/lib/dict/dictll.c +++ b/open-vm-tools/lib/dict/dictll.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/dynxdr/Makefile.am b/open-vm-tools/lib/dynxdr/Makefile.am index deb75e47e..841c17dbc 100644 --- a/open-vm-tools/lib/dynxdr/Makefile.am +++ b/open-vm-tools/lib/dynxdr/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2008-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/dynxdr/Makefile.in b/open-vm-tools/lib/dynxdr/Makefile.in deleted file mode 100644 index fbcbdede6..000000000 --- a/open-vm-tools/lib/dynxdr/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/dynxdr -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libDynxdr_la_LIBADD = -am_libDynxdr_la_OBJECTS = dynxdr.lo xdrutil.lo -libDynxdr_la_OBJECTS = $(am_libDynxdr_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libDynxdr_la_SOURCES) -DIST_SOURCES = $(libDynxdr_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libDynxdr.la -libDynxdr_la_SOURCES = dynxdr.c xdrutil.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/dynxdr/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/dynxdr/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libDynxdr.la: $(libDynxdr_la_OBJECTS) $(libDynxdr_la_DEPENDENCIES) - $(LINK) $(libDynxdr_la_OBJECTS) $(libDynxdr_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynxdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdrutil.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/dynxdr/dynxdr.c b/open-vm-tools/lib/dynxdr/dynxdr.c index 92a71eca6..e39cf9b95 100644 --- a/open-vm-tools/lib/dynxdr/dynxdr.c +++ b/open-vm-tools/lib/dynxdr/dynxdr.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/dynxdr/xdrutil.c b/open-vm-tools/lib/dynxdr/xdrutil.c index aee24905b..a2d1a250e 100644 --- a/open-vm-tools/lib/dynxdr/xdrutil.c +++ b/open-vm-tools/lib/dynxdr/xdrutil.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/err/Makefile.am b/open-vm-tools/lib/err/Makefile.am index a57c1a8ca..c8c5540cd 100644 --- a/open-vm-tools/lib/err/Makefile.am +++ b/open-vm-tools/lib/err/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/err/Makefile.in b/open-vm-tools/lib/err/Makefile.in deleted file mode 100644 index 91810ef07..000000000 --- a/open-vm-tools/lib/err/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/err -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libErr_la_LIBADD = -am_libErr_la_OBJECTS = err.lo errPosix.lo -libErr_la_OBJECTS = $(am_libErr_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libErr_la_SOURCES) -DIST_SOURCES = $(libErr_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libErr.la -libErr_la_SOURCES = err.c errPosix.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/err/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/err/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libErr.la: $(libErr_la_OBJECTS) $(libErr_la_DEPENDENCIES) - $(LINK) $(libErr_la_OBJECTS) $(libErr_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/err.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/err/err.c b/open-vm-tools/lib/err/err.c index f76ab975b..2523f230b 100644 --- a/open-vm-tools/lib/err/err.c +++ b/open-vm-tools/lib/err/err.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/err/errInt.h b/open-vm-tools/lib/err/errInt.h index f3a272b27..94e280761 100644 --- a/open-vm-tools/lib/err/errInt.h +++ b/open-vm-tools/lib/err/errInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/err/errPosix.c b/open-vm-tools/lib/err/errPosix.c index 5091f6435..37b45237b 100644 --- a/open-vm-tools/lib/err/errPosix.c +++ b/open-vm-tools/lib/err/errPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/file/Makefile.am b/open-vm-tools/lib/file/Makefile.am index 45f36331a..a29a771ad 100644 --- a/open-vm-tools/lib/file/Makefile.am +++ b/open-vm-tools/lib/file/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/file/Makefile.in b/open-vm-tools/lib/file/Makefile.in deleted file mode 100644 index be6e6acf3..000000000 --- a/open-vm-tools/lib/file/Makefile.in +++ /dev/null @@ -1,544 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/file -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libFile_la_LIBADD = -am_libFile_la_OBJECTS = file.lo fileStandAlone.lo filePosix.lo \ - fileIO.lo fileIOPosix.lo fileLockPrimitive.lo fileLockPosix.lo \ - fileTempPosix.lo fileTemp.lo -libFile_la_OBJECTS = $(am_libFile_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libFile_la_SOURCES) -DIST_SOURCES = $(libFile_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libFile.la -libFile_la_SOURCES = file.c fileStandAlone.c filePosix.c fileIO.c \ - fileIOPosix.c fileLockPrimitive.c fileLockPosix.c \ - fileTempPosix.c fileTemp.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/file/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/file/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libFile.la: $(libFile_la_OBJECTS) $(libFile_la_DEPENDENCIES) - $(LINK) $(libFile_la_OBJECTS) $(libFile_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileIO.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileIOPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileLockPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileLockPrimitive.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filePosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileStandAlone.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileTemp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileTempPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/file/file.c b/open-vm-tools/lib/file/file.c index ba86bad48..48ac8ff9e 100644 --- a/open-vm-tools/lib/file/file.c +++ b/open-vm-tools/lib/file/file.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -2071,8 +2071,6 @@ FileSimpleRandom(void) "fileSimpleRandomLock", RANK_LEAF); - VERIFY(lck != NULL); - MXUser_AcquireExclLock(lck); if (UNLIKELY(context == NULL)) { diff --git a/open-vm-tools/lib/file/fileIO.c b/open-vm-tools/lib/file/fileIO.c index 973ee968d..92ba83993 100644 --- a/open-vm-tools/lib/file/fileIO.c +++ b/open-vm-tools/lib/file/fileIO.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/file/fileIOPosix.c b/open-vm-tools/lib/file/fileIOPosix.c index 18aa6412e..b266a21b2 100644 --- a/open-vm-tools/lib/file/fileIOPosix.c +++ b/open-vm-tools/lib/file/fileIOPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -2954,7 +2954,6 @@ FileIOAligned_PoolInit(void) alignedPool.lock = MXUser_CreateSingletonExclLock(&alignedPoolLockStorage, "alignedPoolLock", RANK_LEAF); - VERIFY(alignedPool.lock); } diff --git a/open-vm-tools/lib/file/fileInt.h b/open-vm-tools/lib/file/fileInt.h index 0718e95ab..65740e69c 100644 --- a/open-vm-tools/lib/file/fileInt.h +++ b/open-vm-tools/lib/file/fileInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/file/fileLockPosix.c b/open-vm-tools/lib/file/fileLockPosix.c index 71689fa05..2e62133f5 100644 --- a/open-vm-tools/lib/file/fileLockPosix.c +++ b/open-vm-tools/lib/file/fileLockPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/file/fileLockPrimitive.c b/open-vm-tools/lib/file/fileLockPrimitive.c index 8e64d79ba..a7f73ae8d 100644 --- a/open-vm-tools/lib/file/fileLockPrimitive.c +++ b/open-vm-tools/lib/file/fileLockPrimitive.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/file/filePosix.c b/open-vm-tools/lib/file/filePosix.c index c88e67465..24ca5200f 100644 --- a/open-vm-tools/lib/file/filePosix.c +++ b/open-vm-tools/lib/file/filePosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -68,6 +68,10 @@ #include "vmfs.h" #include "hashTable.h" +#ifdef VMX86_SERVER +#include "fs_public.h" +#endif + #define LOGLEVEL_MODULE main #include "loglevel_user.h" @@ -499,7 +503,7 @@ File_Cwd(const char *drive) // IN: /* *---------------------------------------------------------------------- * - * FileStripFwdSlashes -- + * File_StripFwdSlashes -- * * Returns a new string with the extraneous forward slashes ("/") removed. * @@ -512,8 +516,8 @@ File_Cwd(const char *drive) // IN: *---------------------------------------------------------------------- */ -static char * -FileStripFwdSlashes(const char *pathName) // IN: +char * +File_StripFwdSlashes(const char *pathName) // IN: { char *ptr; char *path; @@ -594,7 +598,7 @@ File_FullPath(const char *pathName) // IN: } else if (File_IsFullPath(pathName)) { ret = Posix_RealPath(pathName); if (ret == NULL) { - ret = FileStripFwdSlashes(pathName); + ret = File_StripFwdSlashes(pathName); } } else { char *path = Unicode_Join(cwd, DIRSEPS, pathName, NULL); @@ -602,7 +606,7 @@ File_FullPath(const char *pathName) // IN: ret = Posix_RealPath(path); if (ret == NULL) { - ret = FileStripFwdSlashes(path); + ret = File_StripFwdSlashes(path); } free(path); } @@ -633,8 +637,7 @@ Bool File_IsFullPath(const char *pathName) // IN: { /* start with a slash? */ - return (pathName == NULL) ? FALSE : - Unicode_StartsWith(pathName, DIRSEPS); + return pathName != NULL && pathName[0] == DIRSEPC; } @@ -1496,6 +1499,55 @@ File_SupportsMultiWriter(const char *pathName) // IN: } +/* + *---------------------------------------------------------------------- + * + * File_SupportsOptimisticLock -- + * + * Return TRUE if the given file is on an FS that supports the + * FILEIO_OPEN_OPTIMISTIC_LOCK flag (only VMFS). + * + * Results: + * See above. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Bool +File_SupportsOptimisticLock(const char *pathName) // IN: +{ +#ifdef VMX86_SERVER + uint16 fsTypeNum; + char *dir; + char *tempPath = NULL; + const char *fullPath; + int res; + + /* + * File_GetVMFSFSType works much faster on directories, so get the + * directory. + */ + if (!File_IsFullPath(pathName)) { + tempPath = File_FullPath(pathName); + fullPath = tempPath; + } else { + fullPath = pathName; + } + File_GetPathName(fullPath, &dir, NULL); + res = File_GetVMFSFSType(dir, -1, &fsTypeNum); + free(tempPath); + free(dir); + + return (res == 0) ? IS_VMFS_FSTYPENUM(fsTypeNum) : FALSE; +#else + return FALSE; +#endif +} + + /* *---------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/file/fileStandAlone.c b/open-vm-tools/lib/file/fileStandAlone.c index eb32050dc..8c4362315 100644 --- a/open-vm-tools/lib/file/fileStandAlone.c +++ b/open-vm-tools/lib/file/fileStandAlone.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/file/fileTemp.c b/open-vm-tools/lib/file/fileTemp.c index 0412788e1..1366752fb 100644 --- a/open-vm-tools/lib/file/fileTemp.c +++ b/open-vm-tools/lib/file/fileTemp.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/file/fileTempPosix.c b/open-vm-tools/lib/file/fileTempPosix.c index cbae9f358..18ae6a1ca 100644 --- a/open-vm-tools/lib/file/fileTempPosix.c +++ b/open-vm-tools/lib/file/fileTempPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -480,7 +480,6 @@ File_GetSafeTmpDir(Bool useConf) // IN: /* Get and take lock for our safe dir. */ lck = MXUser_CreateSingletonExclLock(&lckStorage, "getSafeTmpDirLock", RANK_getSafeTmpDirLock); - VERIFY(lck != NULL); MXUser_AcquireExclLock(lck); diff --git a/open-vm-tools/lib/foundryMsg/Makefile.am b/open-vm-tools/lib/foundryMsg/Makefile.am index 82e035567..4702cfd83 100644 --- a/open-vm-tools/lib/foundryMsg/Makefile.am +++ b/open-vm-tools/lib/foundryMsg/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/foundryMsg/Makefile.in b/open-vm-tools/lib/foundryMsg/Makefile.in deleted file mode 100644 index 77c6a56f3..000000000 --- a/open-vm-tools/lib/foundryMsg/Makefile.in +++ /dev/null @@ -1,536 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/foundryMsg -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libFoundryMsg_la_LIBADD = -am_libFoundryMsg_la_OBJECTS = foundryMsg.lo \ - foundryPropertyListCommon.lo vixTranslateErrOpenSource.lo -libFoundryMsg_la_OBJECTS = $(am_libFoundryMsg_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libFoundryMsg_la_SOURCES) -DIST_SOURCES = $(libFoundryMsg_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libFoundryMsg.la -libFoundryMsg_la_SOURCES = foundryMsg.c foundryPropertyListCommon.c \ - vixTranslateErrOpenSource.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/foundryMsg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/foundryMsg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libFoundryMsg.la: $(libFoundryMsg_la_OBJECTS) $(libFoundryMsg_la_DEPENDENCIES) - $(LINK) $(libFoundryMsg_la_OBJECTS) $(libFoundryMsg_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foundryMsg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/foundryPropertyListCommon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vixTranslateErrOpenSource.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/foundryMsg/foundryMsg.c b/open-vm-tools/lib/foundryMsg/foundryMsg.c index 1af5b5c1e..7704e4481 100644 --- a/open-vm-tools/lib/foundryMsg/foundryMsg.c +++ b/open-vm-tools/lib/foundryMsg/foundryMsg.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/foundryMsg/foundryPropertyListCommon.c b/open-vm-tools/lib/foundryMsg/foundryPropertyListCommon.c index eeda8857e..c0a572d1d 100644 --- a/open-vm-tools/lib/foundryMsg/foundryPropertyListCommon.c +++ b/open-vm-tools/lib/foundryMsg/foundryPropertyListCommon.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/foundryMsg/vixTranslateErrOpenSource.c b/open-vm-tools/lib/foundryMsg/vixTranslateErrOpenSource.c index 3314cfd1e..1b2cc2b38 100644 --- a/open-vm-tools/lib/foundryMsg/vixTranslateErrOpenSource.c +++ b/open-vm-tools/lib/foundryMsg/vixTranslateErrOpenSource.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/glibUtils/Makefile.am b/open-vm-tools/lib/glibUtils/Makefile.am index 060a09316..5299e76f8 100644 --- a/open-vm-tools/lib/glibUtils/Makefile.am +++ b/open-vm-tools/lib/glibUtils/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2011-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/glibUtils/Makefile.in b/open-vm-tools/lib/glibUtils/Makefile.in deleted file mode 100644 index c55a10631..000000000 --- a/open-vm-tools/lib/glibUtils/Makefile.in +++ /dev/null @@ -1,557 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2011-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/glibUtils -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libGlibUtils_la_LIBADD = -am_libGlibUtils_la_OBJECTS = libGlibUtils_la-fileLogger.lo \ - libGlibUtils_la-stdLogger.lo libGlibUtils_la-sysLogger.lo -libGlibUtils_la_OBJECTS = $(am_libGlibUtils_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libGlibUtils_la_SOURCES) -DIST_SOURCES = $(libGlibUtils_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libGlibUtils.la -libGlibUtils_la_CPPFLAGS = @GLIB2_CPPFLAGS@ -libGlibUtils_la_SOURCES = fileLogger.c stdLogger.c sysLogger.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/glibUtils/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/glibUtils/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libGlibUtils.la: $(libGlibUtils_la_OBJECTS) $(libGlibUtils_la_DEPENDENCIES) - $(LINK) $(libGlibUtils_la_OBJECTS) $(libGlibUtils_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGlibUtils_la-fileLogger.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGlibUtils_la-stdLogger.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGlibUtils_la-sysLogger.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libGlibUtils_la-fileLogger.lo: fileLogger.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libGlibUtils_la-fileLogger.lo -MD -MP -MF $(DEPDIR)/libGlibUtils_la-fileLogger.Tpo -c -o libGlibUtils_la-fileLogger.lo `test -f 'fileLogger.c' || echo '$(srcdir)/'`fileLogger.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libGlibUtils_la-fileLogger.Tpo $(DEPDIR)/libGlibUtils_la-fileLogger.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fileLogger.c' object='libGlibUtils_la-fileLogger.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libGlibUtils_la-fileLogger.lo `test -f 'fileLogger.c' || echo '$(srcdir)/'`fileLogger.c - -libGlibUtils_la-stdLogger.lo: stdLogger.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libGlibUtils_la-stdLogger.lo -MD -MP -MF $(DEPDIR)/libGlibUtils_la-stdLogger.Tpo -c -o libGlibUtils_la-stdLogger.lo `test -f 'stdLogger.c' || echo '$(srcdir)/'`stdLogger.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libGlibUtils_la-stdLogger.Tpo $(DEPDIR)/libGlibUtils_la-stdLogger.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stdLogger.c' object='libGlibUtils_la-stdLogger.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libGlibUtils_la-stdLogger.lo `test -f 'stdLogger.c' || echo '$(srcdir)/'`stdLogger.c - -libGlibUtils_la-sysLogger.lo: sysLogger.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libGlibUtils_la-sysLogger.lo -MD -MP -MF $(DEPDIR)/libGlibUtils_la-sysLogger.Tpo -c -o libGlibUtils_la-sysLogger.lo `test -f 'sysLogger.c' || echo '$(srcdir)/'`sysLogger.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libGlibUtils_la-sysLogger.Tpo $(DEPDIR)/libGlibUtils_la-sysLogger.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sysLogger.c' object='libGlibUtils_la-sysLogger.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGlibUtils_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libGlibUtils_la-sysLogger.lo `test -f 'sysLogger.c' || echo '$(srcdir)/'`sysLogger.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/glibUtils/fileLogger.c b/open-vm-tools/lib/glibUtils/fileLogger.c index 80ff74a40..af1cb8a9b 100644 --- a/open-vm-tools/lib/glibUtils/fileLogger.c +++ b/open-vm-tools/lib/glibUtils/fileLogger.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -239,7 +239,13 @@ FileLoggerOpen(FileLogger *data) path = FileLoggerGetPath(data, 0); if (g_file_test(path, G_FILE_TEST_EXISTS)) { + /* GStatBuf was added in 2.26. */ +#if GLIB_CHECK_VERSION(2, 26, 0) + GStatBuf fstats; +#else struct stat fstats; +#endif + if (g_stat(path, &fstats) > -1) { data->logSize = (gint) fstats.st_size; } diff --git a/open-vm-tools/lib/glibUtils/stdLogger.c b/open-vm-tools/lib/glibUtils/stdLogger.c index ec4309d5b..b57268fc2 100644 --- a/open-vm-tools/lib/glibUtils/stdLogger.c +++ b/open-vm-tools/lib/glibUtils/stdLogger.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/glibUtils/sysLogger.c b/open-vm-tools/lib/glibUtils/sysLogger.c index 7edc2e9f0..5646d4828 100644 --- a/open-vm-tools/lib/glibUtils/sysLogger.c +++ b/open-vm-tools/lib/glibUtils/sysLogger.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/guestApp/Makefile.am b/open-vm-tools/lib/guestApp/Makefile.am index 6af52636f..0339b1094 100644 --- a/open-vm-tools/lib/guestApp/Makefile.am +++ b/open-vm-tools/lib/guestApp/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/guestApp/Makefile.in b/open-vm-tools/lib/guestApp/Makefile.in deleted file mode 100644 index ed73b2a58..000000000 --- a/open-vm-tools/lib/guestApp/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/guestApp -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libGuestApp_la_LIBADD = -am_libGuestApp_la_OBJECTS = guestApp.lo -libGuestApp_la_OBJECTS = $(am_libGuestApp_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libGuestApp_la_SOURCES) -DIST_SOURCES = $(libGuestApp_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libGuestApp.la -libGuestApp_la_SOURCES = guestApp.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/guestApp/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/guestApp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libGuestApp.la: $(libGuestApp_la_OBJECTS) $(libGuestApp_la_DEPENDENCIES) - $(LINK) $(libGuestApp_la_OBJECTS) $(libGuestApp_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guestApp.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/guestApp/guestApp.c b/open-vm-tools/lib/guestApp/guestApp.c index cacd56f76..557274ce7 100644 --- a/open-vm-tools/lib/guestApp/guestApp.c +++ b/open-vm-tools/lib/guestApp/guestApp.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/guestRpc/Makefile.am b/open-vm-tools/lib/guestRpc/Makefile.am index d68bc0716..1605a27c2 100644 --- a/open-vm-tools/lib/guestRpc/Makefile.am +++ b/open-vm-tools/lib/guestRpc/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2008-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/guestRpc/Makefile.in b/open-vm-tools/lib/guestRpc/Makefile.in deleted file mode 100644 index 091f46042..000000000 --- a/open-vm-tools/lib/guestRpc/Makefile.in +++ /dev/null @@ -1,549 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/guestRpc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libGuestRpc_la_LIBADD = -am_libGuestRpc_la_OBJECTS = nicinfo_xdr.lo -libGuestRpc_la_OBJECTS = $(am_libGuestRpc_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libGuestRpc_la_SOURCES) -DIST_SOURCES = $(libGuestRpc_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ - -# XXX: Autoreconf complains about this and recommends using AM_CFLAGS instead. -# Problem is, $(CFLAGS) is appended to the compiler command line after AM_CFLAGS -# and after libGuestRpc_la_CFLAGS, so "-Wall -Werror" will override this flag. -CFLAGS = @CFLAGS@ -Wno-unused -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libGuestRpc.la -libGuestRpc_la_SOURCES = nicinfo_xdr.c -CLEANFILES = nicinfo.h nicinfo_xdr.c -EXTRA_DIST = nicinfo.x -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/guestRpc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/guestRpc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libGuestRpc.la: $(libGuestRpc_la_OBJECTS) $(libGuestRpc_la_DEPENDENCIES) - $(LINK) $(libGuestRpc_la_OBJECTS) $(libGuestRpc_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nicinfo_xdr.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -# Rules to invoke rpcgen. rpcgen will generate funny paths in the generated -# files if not invoked in the same directory as the source file, so we need -# to copy the sources to the build dir before compiling them. - -nicinfo.h: nicinfo.x - @RPCGEN_WRAPPER@ lib/guestRpc/nicinfo.x $@ - -nicinfo_xdr.c: nicinfo.x nicinfo.h - @RPCGEN_WRAPPER@ lib/guestRpc/nicinfo.x $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/guestRpc/nicinfo.x b/open-vm-tools/lib/guestRpc/nicinfo.x index 491fe4916..9b38a8f09 100644 --- a/open-vm-tools/lib/guestRpc/nicinfo.x +++ b/open-vm-tools/lib/guestRpc/nicinfo.x @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hashMap/Makefile.am b/open-vm-tools/lib/hashMap/Makefile.am index 84f0e84c4..7c0c38b89 100644 --- a/open-vm-tools/lib/hashMap/Makefile.am +++ b/open-vm-tools/lib/hashMap/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2013-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/hashMap/Makefile.in b/open-vm-tools/lib/hashMap/Makefile.in deleted file mode 100644 index e3be4af63..000000000 --- a/open-vm-tools/lib/hashMap/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hashMap -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHashMap_la_LIBADD = -am_libHashMap_la_OBJECTS = hashMap.lo -libHashMap_la_OBJECTS = $(am_libHashMap_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHashMap_la_SOURCES) -DIST_SOURCES = $(libHashMap_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHashMap.la -libHashMap_la_SOURCES = hashMap.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hashMap/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hashMap/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHashMap.la: $(libHashMap_la_OBJECTS) $(libHashMap_la_DEPENDENCIES) - $(LINK) $(libHashMap_la_OBJECTS) $(libHashMap_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashMap.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hashMap/hashMap.c b/open-vm-tools/lib/hashMap/hashMap.c index 16a359c6d..0c13d9556 100644 --- a/open-vm-tools/lib/hashMap/hashMap.c +++ b/open-vm-tools/lib/hashMap/hashMap.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -161,10 +161,10 @@ INLINE void EnsureSanity(HashMap *map); * ---------------------------------------------------------------------------- */ +#ifdef VMX86_DEBUG static INLINE Bool CheckSanity(HashMap *map) { -#ifdef VMX86_DEBUG uint32 i, cnt = 0; ASSERT(map); @@ -192,9 +192,9 @@ CheckSanity(HashMap *map) if (!map->numEntries) { return FALSE; } -#endif return TRUE; } +#endif /* * ---------------------------------------------------------------------------- @@ -539,221 +539,6 @@ HashMap_Count(struct HashMap *map) // IN } -#ifdef VMX86_SERVER -/* - * ---------------------------------------------------------------------------- - * - * HashMap_Store -- - * - * Write the contents of the HashMap to the given AIOhandle - * - * Results: - * The number of bytes written on success -1 on error - * - * Side Effects: - * None. - * - * ---------------------------------------------------------------------------- - */ - -uint64 -HashMap_Store(struct HashMap *map, // IN - void *h, // IN - uint64 startByteOffset) // IN -{ - AIOHandle *handle = (AIOHandle *)h; - AIOMgrError aioErr; - struct iovec vec; - uint64 numBytes; - struct HashMapOnDisk hashMapOnDisk; - - hashMapOnDisk.numEntries = map->numEntries; - hashMapOnDisk.count = map->count; - hashMapOnDisk.alpha = map->alpha; - hashMapOnDisk.keySize = map->keySize; - hashMapOnDisk.dataSize = map->dataSize; - hashMapOnDisk.entrySize = map->entrySize; - hashMapOnDisk.keyOffset = map->keyOffset; - hashMapOnDisk.dataOffset = map->dataOffset; - - /* - * write map - */ - vec.iov_base = (void *)&hashMapOnDisk; - vec.iov_len = sizeof hashMapOnDisk; - numBytes = vec.iov_len; - - aioErr = AIOMgr_Queue(*handle, &vec, 1, OP_WRITE, startByteOffset, numBytes, - AIOMGR_INVALID_IO_REQUEST_ID, NULL, NULL); - ASSERT(!AIOMgr_IsAsync(aioErr)); - if (!AIOMgr_IsSuccess(aioErr)) { - return -1; - } - - /* - * write map entries - */ - vec.iov_base = (void *)map->entries; - vec.iov_len = map->numEntries * map->entrySize; - - aioErr = AIOMgr_Queue(*handle, &vec, 1, OP_WRITE, - startByteOffset + numBytes, vec.iov_len, - AIOMGR_INVALID_IO_REQUEST_ID, NULL, NULL); - ASSERT(!AIOMgr_IsAsync(aioErr)); - if (!AIOMgr_IsSuccess(aioErr)) { - return -1; - } - - return numBytes + (map->numEntries * map->entrySize); -} - - -/* - * ---------------------------------------------------------------------------- - * - * HashMap_Retrieve -- - * - * Read the contents of the HashMap from the given AIOhandle - * - * Results: - * The allocated map - * - * Side Effects: - * None. - * - * ---------------------------------------------------------------------------- - */ -struct HashMap * -HashMap_Retrieve(void *h, // IN - uint32 numEntries, // IN - uint64 startByteOffset, // IN - uint64 *retNumBytes) // OUT -{ - AIOMgrError aioErr = AIOMgr_MakeError(AIOERR_RDONLY, 0); - struct iovec vec; - uint64 numBytes; - struct HashMap *map; - struct HashMapOnDisk hashMapOnDisk; - AIOHandle *handle = (AIOHandle *)h; - - map = calloc(1, sizeof *map); - - /* - * read map - */ - vec.iov_base = (void *)&hashMapOnDisk; - vec.iov_len = sizeof hashMapOnDisk; - numBytes = vec.iov_len; - if (handle) { - aioErr = AIOMgr_Queue(*handle, &vec, 1, OP_READ, startByteOffset, - numBytes, AIOMGR_INVALID_IO_REQUEST_ID, NULL, - NULL); - ASSERT(!AIOMgr_IsAsync(aioErr)); - } - - if (!AIOMgr_IsSuccess(aioErr)) { - free(map); - map = HashMap_AllocMapAlpha(numEntries, 1, sizeof(int32), sizeof(int32)); - *retNumBytes = sizeof(hashMapOnDisk) + (map->numEntries * map->entrySize); - return map; - } - - if (!hashMapOnDisk.numEntries) { - free(map); - map = HashMap_AllocMapAlpha(numEntries, 1, sizeof(int32), sizeof(int32)); - *retNumBytes = sizeof(hashMapOnDisk) + (map->numEntries * map->entrySize); - return map; - } - - map->numEntries = hashMapOnDisk.numEntries; - map->count = hashMapOnDisk.count; - map->alpha = hashMapOnDisk.alpha; - map->keySize = hashMapOnDisk.keySize; - map->dataSize = hashMapOnDisk.dataSize; - map->entrySize = hashMapOnDisk.entrySize; - map->keyOffset = hashMapOnDisk.keyOffset; - map->dataOffset = hashMapOnDisk.dataOffset; - - /* - * read map entries - */ - map->entries = calloc(map->numEntries, map->entrySize); - vec.iov_base = (void *)map->entries; - vec.iov_len = map->numEntries * map->entrySize; - ASSERT(handle); - aioErr = AIOMgr_Queue(*handle, &vec, 1, OP_READ, - startByteOffset + numBytes, vec.iov_len, - AIOMGR_INVALID_IO_REQUEST_ID, NULL, NULL); - ASSERT(!AIOMgr_IsAsync(aioErr)); - if (!AIOMgr_IsSuccess(aioErr)) { - free(map->entries); - free(map); - return NULL; - } - - *retNumBytes = numBytes + (map->numEntries * map->entrySize); - if (!CheckSanity(map)) { - free(map->entries); - free(map); - return NULL; - } - return map; -} - -#else - -/* - * ---------------------------------------------------------------------------- - * - * HashMap_Store -- - * - * Stub for non server targets - * - * Results: - * None - * - * Side Effects: - * None. - * - * ---------------------------------------------------------------------------- - */ -uint64 -HashMap_Store(struct HashMap *map, // IN - void *h, // IN - uint64 startByteOffset) // IN -{ - ASSERT(0); - return -1; -} - - -/* - * ---------------------------------------------------------------------------- - * - * HashMap_Retrieve -- - * - * Stub for non-server targets - * - * Results: - * None - * - * Side Effects: - * None. - * - * ---------------------------------------------------------------------------- - */ -struct HashMap * -HashMap_Retrieve(void *h, // IN - uint32 numEntries, // IN - uint64 startByteOffset, // IN - uint64 *retNumBytes) // OUT -{ - ASSERT(0); - return NULL; -} -#endif - - /* * ---------------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/hgfs/Makefile.am b/open-vm-tools/lib/hgfs/Makefile.am index dec129ed0..e3f7aeb96 100644 --- a/open-vm-tools/lib/hgfs/Makefile.am +++ b/open-vm-tools/lib/hgfs/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/hgfs/Makefile.in b/open-vm-tools/lib/hgfs/Makefile.in deleted file mode 100644 index cb84547dc..000000000 --- a/open-vm-tools/lib/hgfs/Makefile.in +++ /dev/null @@ -1,540 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfs_la_LIBADD = -am_libHgfs_la_OBJECTS = cpName.lo cpNameLite.lo cpNameLinux.lo \ - cpNameUtil.lo cpNameUtilLinux.lo hgfsUtil.lo hgfsEscape.lo -libHgfs_la_OBJECTS = $(am_libHgfs_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfs_la_SOURCES) -DIST_SOURCES = $(libHgfs_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfs.la -libHgfs_la_SOURCES = cpName.c cpNameLite.c cpNameLinux.c cpNameUtil.c \ - cpNameUtilLinux.c hgfsUtil.c hgfsEscape.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfs.la: $(libHgfs_la_OBJECTS) $(libHgfs_la_DEPENDENCIES) - $(LINK) $(libHgfs_la_OBJECTS) $(libHgfs_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpName.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpNameLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpNameLite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpNameUtil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpNameUtilLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsEscape.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsUtil.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfs/cpName.c b/open-vm-tools/lib/hgfs/cpName.c index 4cd0d3746..00d90ce2c 100644 --- a/open-vm-tools/lib/hgfs/cpName.c +++ b/open-vm-tools/lib/hgfs/cpName.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfs/cpNameInt.h b/open-vm-tools/lib/hgfs/cpNameInt.h index 1719e08d0..25c22f9f2 100644 --- a/open-vm-tools/lib/hgfs/cpNameInt.h +++ b/open-vm-tools/lib/hgfs/cpNameInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfs/cpNameLinux.c b/open-vm-tools/lib/hgfs/cpNameLinux.c index 441eb3be5..538c742fc 100644 --- a/open-vm-tools/lib/hgfs/cpNameLinux.c +++ b/open-vm-tools/lib/hgfs/cpNameLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfs/cpNameLite.c b/open-vm-tools/lib/hgfs/cpNameLite.c index cad31bee7..bfa2acf22 100644 --- a/open-vm-tools/lib/hgfs/cpNameLite.c +++ b/open-vm-tools/lib/hgfs/cpNameLite.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfs/cpNameUtil.c b/open-vm-tools/lib/hgfs/cpNameUtil.c index 8a33f463d..3a18e940c 100644 --- a/open-vm-tools/lib/hgfs/cpNameUtil.c +++ b/open-vm-tools/lib/hgfs/cpNameUtil.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfs/cpNameUtilInt.h b/open-vm-tools/lib/hgfs/cpNameUtilInt.h index 55715f155..a2762facb 100644 --- a/open-vm-tools/lib/hgfs/cpNameUtilInt.h +++ b/open-vm-tools/lib/hgfs/cpNameUtilInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfs/cpNameUtilLinux.c b/open-vm-tools/lib/hgfs/cpNameUtilLinux.c index c2dcfb09a..da3be6a76 100644 --- a/open-vm-tools/lib/hgfs/cpNameUtilLinux.c +++ b/open-vm-tools/lib/hgfs/cpNameUtilLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfs/hgfsEscape.c b/open-vm-tools/lib/hgfs/hgfsEscape.c index 3193f1885..559b146ec 100644 --- a/open-vm-tools/lib/hgfs/hgfsEscape.c +++ b/open-vm-tools/lib/hgfs/hgfsEscape.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -758,6 +758,7 @@ HgfsEscape_Do(char const *bufIn, // IN: Buffer with unescaped input * On success, the size (excluding the NUL terminator) of the * escaped, NUL terminated buffer. * Returns 0 if the name is a valid Windows file name. + * Returns -1 if the name is not a valid file name. * * Side effects: * None @@ -774,15 +775,15 @@ HgfsEscape_GetSize(char const *bufIn, // IN: Buffer with unescaped input const char *end = bufIn + sizeIn; const char *next; - if (sizeIn == 0) { // No need toescape empty name. + if (sizeIn == 0) { // No need to escape an empty name. return 0; } if (bufIn[sizeIn - 1] == '\0') { /* - * In some cases a NUL terminated string is passed to HgfsEscape_GeSize - * so it make sense to support such input even if CPName_GetComponent + * In some cases, a NUL-terminated string is passed to HgfsEscape_GetSize, + * so it makes sense to support such input even if CPName_GetComponent * does not. Detect this case and make the input compliant with - * CPName_GetComponent by removing terminating NUL. + * CPName_GetComponent by removing the terminating NUL. */ end--; sizeIn--; @@ -794,7 +795,7 @@ HgfsEscape_GetSize(char const *bufIn, // IN: Buffer with unescaped input while (currentComponent - bufIn < sizeIn) { int componentSize = CPName_GetComponent(currentComponent, end, &next); if (componentSize < 0) { - Log("%s: failed to calculate escapde name size - name is invalid\n", __FUNCTION__); + Log("%s: failed to calculate escaped name size - name is invalid\n", __FUNCTION__); return -1; } result += HgfsEscapeGetComponentSize(currentComponent, componentSize); diff --git a/open-vm-tools/lib/hgfs/hgfsUtil.c b/open-vm-tools/lib/hgfs/hgfsUtil.c index 78737aae4..cc580ab86 100644 --- a/open-vm-tools/lib/hgfs/hgfsUtil.c +++ b/open-vm-tools/lib/hgfs/hgfsUtil.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -109,7 +109,7 @@ int HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format uint64 ntTime) // IN: Time in Windows NT format { -#if !defined(VM_X86_64) && !defined(__arm__) +#ifdef __i386__ uint32 sec; uint32 nsec; @@ -134,7 +134,7 @@ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format return -1; } -#if !defined(VM_X86_64) && !defined(__arm__) +#ifdef __i386__ Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec); unixTime->tv_sec = sec; unixTime->tv_nsec = nsec * 100; diff --git a/open-vm-tools/lib/hgfsBd/Makefile.am b/open-vm-tools/lib/hgfsBd/Makefile.am index 172900f81..dd1bebb3b 100644 --- a/open-vm-tools/lib/hgfsBd/Makefile.am +++ b/open-vm-tools/lib/hgfsBd/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/hgfsBd/Makefile.in b/open-vm-tools/lib/hgfsBd/Makefile.in deleted file mode 100644 index f22ad6110..000000000 --- a/open-vm-tools/lib/hgfsBd/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfsBd -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfsBd_la_LIBADD = -am_libHgfsBd_la_OBJECTS = hgfsBd.lo -libHgfsBd_la_OBJECTS = $(am_libHgfsBd_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfsBd_la_SOURCES) -DIST_SOURCES = $(libHgfsBd_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfsBd.la -libHgfsBd_la_SOURCES = hgfsBd.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfsBd/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfsBd/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfsBd.la: $(libHgfsBd_la_OBJECTS) $(libHgfsBd_la_DEPENDENCIES) - $(LINK) $(libHgfsBd_la_OBJECTS) $(libHgfsBd_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsBd.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfsBd/hgfsBd.c b/open-vm-tools/lib/hgfsBd/hgfsBd.c index c84acf50c..c7e039bed 100644 --- a/open-vm-tools/lib/hgfsBd/hgfsBd.c +++ b/open-vm-tools/lib/hgfsBd/hgfsBd.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -260,6 +260,7 @@ HgfsBd_Dispatch(RpcOut *out, // IN: Channel to send on char const **packetOut) // OUT: Buf containing reply packet { Bool success; + Bool rpcStatus; char const *reply; size_t replyLen; char *bdPacket = packetIn - HGFS_SYNC_REQREP_CLIENT_CMD_LEN; @@ -272,8 +273,8 @@ HgfsBd_Dispatch(RpcOut *out, // IN: Channel to send on memcpy(bdPacket, HGFS_SYNC_REQREP_CLIENT_CMD, HGFS_SYNC_REQREP_CLIENT_CMD_LEN); success = RpcOut_send(out, bdPacket, *packetSize + HGFS_CLIENT_CMD_LEN, - &reply, &replyLen); - if (success == FALSE) { + &rpcStatus, &reply, &replyLen); + if (!success || !rpcStatus) { Debug("HgfsBd_Dispatch: RpcOut_send returned failure\n"); return -1; } @@ -310,6 +311,7 @@ HgfsBd_Enabled(RpcOut *out, // IN: RPCI Channel char const *replyPacket; // Buffer returned by HgfsBd_Dispatch size_t replyLen; Bool success; + Bool rpcStatus; /* * Send a bogus (empty) request to the VMX. If hgfs is disabled on @@ -320,12 +322,12 @@ HgfsBd_Enabled(RpcOut *out, // IN: RPCI Channel */ success = RpcOut_send(out, requestPacket - HGFS_CLIENT_CMD_LEN, HGFS_CLIENT_CMD_LEN, - &replyPacket, &replyLen); - if (success == TRUE) { + &rpcStatus, &replyPacket, &replyLen); + if (success && rpcStatus) { ASSERT(replyLen <= HGFS_LARGE_PACKET_MAX); } - return success; + return success && rpcStatus; } diff --git a/open-vm-tools/lib/hgfsHelper/Makefile.am b/open-vm-tools/lib/hgfsHelper/Makefile.am index e07de259e..fb87688e2 100644 --- a/open-vm-tools/lib/hgfsHelper/Makefile.am +++ b/open-vm-tools/lib/hgfsHelper/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/hgfsHelper/Makefile.in b/open-vm-tools/lib/hgfsHelper/Makefile.in deleted file mode 100644 index 9fd405149..000000000 --- a/open-vm-tools/lib/hgfsHelper/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfsHelper -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfsHelper_la_LIBADD = -am_libHgfsHelper_la_OBJECTS = hgfsHelperPosix.lo -libHgfsHelper_la_OBJECTS = $(am_libHgfsHelper_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfsHelper_la_SOURCES) -DIST_SOURCES = $(libHgfsHelper_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfsHelper.la -libHgfsHelper_la_SOURCES = hgfsHelperPosix.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfsHelper/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfsHelper/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfsHelper.la: $(libHgfsHelper_la_OBJECTS) $(libHgfsHelper_la_DEPENDENCIES) - $(LINK) $(libHgfsHelper_la_OBJECTS) $(libHgfsHelper_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsHelperPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfsHelper/hgfsHelperPosix.c b/open-vm-tools/lib/hgfsHelper/hgfsHelperPosix.c index eae06d6b8..d35dbe7c1 100644 --- a/open-vm-tools/lib/hgfsHelper/hgfsHelperPosix.c +++ b/open-vm-tools/lib/hgfsHelper/hgfsHelperPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServer/Makefile.am b/open-vm-tools/lib/hgfsServer/Makefile.am index 81b23fd0c..07150816a 100644 --- a/open-vm-tools/lib/hgfsServer/Makefile.am +++ b/open-vm-tools/lib/hgfsServer/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/hgfsServer/Makefile.in b/open-vm-tools/lib/hgfsServer/Makefile.in deleted file mode 100644 index be7782a0e..000000000 --- a/open-vm-tools/lib/hgfsServer/Makefile.in +++ /dev/null @@ -1,545 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfsServer -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfsServer_la_LIBADD = -am_libHgfsServer_la_OBJECTS = hgfsServer.lo hgfsServerLinux.lo \ - hgfsServerPacketUtil.lo hgfsDirNotifyStub.lo \ - hgfsServerParameters.lo hgfsServerOplock.lo \ - hgfsServerOplockLinux.lo -libHgfsServer_la_OBJECTS = $(am_libHgfsServer_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfsServer_la_SOURCES) -DIST_SOURCES = $(libHgfsServer_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfsServer.la -libHgfsServer_la_SOURCES = hgfsServer.c hgfsServerLinux.c \ - hgfsServerPacketUtil.c hgfsDirNotifyStub.c \ - hgfsServerParameters.c hgfsServerOplock.c \ - hgfsServerOplockLinux.c -AM_CFLAGS = -DVMTOOLS_USE_GLIB @GLIB2_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfsServer/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfsServer/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfsServer.la: $(libHgfsServer_la_OBJECTS) $(libHgfsServer_la_DEPENDENCIES) - $(LINK) $(libHgfsServer_la_OBJECTS) $(libHgfsServer_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsDirNotifyStub.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerOplock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerOplockLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerPacketUtil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerParameters.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfsServer/hgfsDirNotify.h b/open-vm-tools/lib/hgfsServer/hgfsDirNotify.h index b130bf5b8..b95e3138a 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsDirNotify.h +++ b/open-vm-tools/lib/hgfsServer/hgfsDirNotify.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServer/hgfsDirNotifyStub.c b/open-vm-tools/lib/hgfsServer/hgfsDirNotifyStub.c index b106cf80f..3a19f1280 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsDirNotifyStub.c +++ b/open-vm-tools/lib/hgfsServer/hgfsDirNotifyStub.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c index 0939655bc..7996c2840 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServer.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998,2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -3090,12 +3090,12 @@ HgfsServerGetRequest(HgfsPacket *packet, // IN: packet /* *----------------------------------------------------------------------------- * - * HgfsServerGetRequestHeaderSize -- + * HgfsServerGetHeaderSize -- * - * Takes the Hgfs request input and finds the size of the header component. + * Takes the Hgfs input and finds the size of the header component. * * Results: - * Size of the HGFS protocol header used by this request and reply. + * Size of the HGFS protocol header used by this request or reply. * * Side effects: * None @@ -3104,22 +3104,26 @@ HgfsServerGetRequest(HgfsPacket *packet, // IN: packet */ static HgfsInternalStatus -HgfsServerGetRequestHeaderSize(HgfsInputParam *input) // IN: parameters +HgfsServerGetHeaderSize(Bool sessionEnabled, // IN: session based request + HgfsOp op, // IN: operation + Bool request) // IN: TRUE for request, FALSE for reply { size_t headerSize; /* * If the HGFS request is session enabled we must have the new header. + * Any V4 operation always must have the new header too. * Otherwise, starting from HGFS V3 the header is not included in the - * request itself, so we must return the size of the separate HgfsReply - * structure. Prior to V3 (so V1 and V2) there was no separate header - * from the request result structure so a zero size is returned for these - * operations. + * request itself, so we must return the size of the separate header + * structure, for requests this will be HgfsRequest and replies will be HgfsReply. + * Prior to V3 (so V1 and V2) there was no separate header from the request + * or reply structure for any given operation, so a zero size is returned for these. */ - if (input->sessionEnabled) { + if (sessionEnabled) { headerSize = sizeof (HgfsHeader); - } else if (input->op >= HGFS_OP_OPEN_V3) { - headerSize = sizeof (HgfsReply); + } else if (op < HGFS_OP_CREATE_SESSION_V4 && + op >= HGFS_OP_OPEN_V3) { + headerSize = (request ? sizeof (HgfsRequest) : sizeof (HgfsReply)); } else { headerSize = 0; } @@ -3127,6 +3131,54 @@ HgfsServerGetRequestHeaderSize(HgfsInputParam *input) // IN: parameters } +/* + *----------------------------------------------------------------------------- + * + * HgfsServerGetRequestHeaderSize -- + * + * Takes the Hgfs request input and finds the size of the header component. + * + * Results: + * Size of the HGFS protocol header used by this request and reply. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static HgfsInternalStatus +HgfsServerGetRequestHeaderSize(Bool sessionEnabled, // IN: session based request + HgfsOp op) // IN: operation +{ + return HgfsServerGetHeaderSize(sessionEnabled, op, TRUE); +} + + +/* + *----------------------------------------------------------------------------- + * + * HgfsServerGetReplyHeaderSize -- + * + * Takes the Hgfs reply input and finds the size of the header component. + * + * Results: + * Size of the HGFS protocol header used by this reply. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static HgfsInternalStatus +HgfsServerGetReplyHeaderSize(Bool sessionEnabled, // IN: session based request + HgfsOp op) // IN: operation +{ + return HgfsServerGetHeaderSize(sessionEnabled, op, FALSE); +} + + /* *----------------------------------------------------------------------------- * @@ -3165,7 +3217,8 @@ HgfsServerCompleteRequest(HgfsInternalStatus status, // IN: Status of the requ replySessionId = (NULL != input->session) ? input->session->sessionId : HGFS_INVALID_SESSION_ID; - replyHeaderSize = HgfsServerGetRequestHeaderSize(input); + replyHeaderSize = HgfsServerGetReplyHeaderSize(input->sessionEnabled, + input->op); if (replyHeaderSize != 0) { replySize = replyHeaderSize + replyPayloadSize; @@ -3799,27 +3852,13 @@ HgfsServer_InitState(HgfsServerCallbacks **callbackTable, // IN/OUT: our DblLnkLst_Init(&gHgfsSharedFoldersList); gHgfsSharedFoldersLock = MXUser_CreateExclLock("sharedFoldersLock", RANK_hgfsSharedFolders); - if (NULL != gHgfsSharedFoldersLock) { - gHgfsAsyncLock = MXUser_CreateExclLock("asyncLock", - RANK_hgfsSharedFolders); - if (NULL != gHgfsAsyncLock) { - gHgfsAsyncVar = MXUser_CreateCondVarExclLock(gHgfsAsyncLock); - if (NULL != gHgfsAsyncVar) { - if (!HgfsPlatformInit()) { - LOG(4, ("Could not initialize server platform specific \n")); - result = FALSE; - } - } else { - LOG(4, ("%s: Could not create async counter cond var.\n", - __FUNCTION__)); - result = FALSE; - } - } else { - LOG(4, ("%s: Could not create async counter mutex.\n", __FUNCTION__)); - result = FALSE; - } - } else { - LOG(4, ("%s: Could not create shared folders mutex.\n", __FUNCTION__)); + gHgfsAsyncLock = MXUser_CreateExclLock("asyncLock", + RANK_hgfsSharedFolders); + + gHgfsAsyncVar = MXUser_CreateCondVarExclLock(gHgfsAsyncLock); + + if (!HgfsPlatformInit()) { + LOG(4, ("Could not initialize server platform specific \n")); result = FALSE; } @@ -3902,6 +3941,71 @@ HgfsServer_ExitState(void) } +/* + *----------------------------------------------------------------------------- + * + * HgfsServer_ShareAccessCheck -- + * + * Checks if the requested mode may be granted depending on read/write + * permissions. + * + * Results: + * An HgfsNameStatus value indicating the result is returned. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +Bool +HgfsServer_ShareAccessCheck(HgfsOpenMode accessMode, // IN: open mode to check + Bool shareWriteable, // IN: share is writable + Bool shareReadable) // IN: share is readable +{ + /* + * See if access is allowed in the requested mode. + * + * XXX We should be using bits instead of an enum for HgfsOpenMode. + * Add it to the todo list. [bac] + */ + + switch (HGFS_OPEN_MODE_ACCMODE(accessMode)) { + case HGFS_OPEN_MODE_READ_ONLY: + if (!shareReadable) { + LOG(4, ("%s: Read access denied\n", __FUNCTION__)); + + return FALSE; + } + break; + + case HGFS_OPEN_MODE_WRITE_ONLY: + if (!shareWriteable) { + LOG(4, ("%s: Write access denied\n", __FUNCTION__)); + + return FALSE; + } + break; + + case HGFS_OPEN_MODE_READ_WRITE: + if (!shareReadable || !shareWriteable) { + LOG(4, ("%s: Read/write access denied\n", __FUNCTION__)); + + return FALSE; + } + break; + + default: + LOG(0, ("%s: Invalid mode %d\n", __FUNCTION__, accessMode)); + ASSERT(FALSE); + + return FALSE; + } + + return TRUE; +} + + /* *----------------------------------------------------------------------------- * @@ -4158,11 +4262,6 @@ HgfsServerSessionConnect(void *transportData, // IN: tra transportSession->sessionArrayLock = MXUser_CreateExclLock("HgfsSessionArrayLock", RANK_hgfsSessionArrayLock); - if (transportSession->sessionArrayLock == NULL) { - LOG(4, ("%s: Could not create session sync mutex.\n", __FUNCTION__)); - free(transportSession); - return FALSE; - } DblLnkLst_Init(&transportSession->sessionArray); @@ -4216,31 +4315,12 @@ HgfsServerAllocateSession(HgfsTransportSessionInfo *transportSession, // IN: session->fileIOLock = MXUser_CreateExclLock("HgfsFileIOLock", RANK_hgfsFileIOLock); - if (session->fileIOLock == NULL) { - LOG(4, ("%s: Could not create node array sync mutex.\n", __FUNCTION__)); - free(session); - return FALSE; - } session->nodeArrayLock = MXUser_CreateExclLock("HgfsNodeArrayLock", RANK_hgfsNodeArrayLock); - if (session->nodeArrayLock == NULL) { - MXUser_DestroyExclLock(session->fileIOLock); - LOG(4, ("%s: Could not create node array sync mutex.\n", __FUNCTION__)); - free(session); - return FALSE; - } session->searchArrayLock = MXUser_CreateExclLock("HgfsSearchArrayLock", RANK_hgfsSearchArrayLock); - if (session->searchArrayLock == NULL) { - MXUser_DestroyExclLock(session->fileIOLock); - MXUser_DestroyExclLock(session->nodeArrayLock); - LOG(4, ("%s: Could not create search array sync mutex.\n", - __FUNCTION__)); - free(session); - return FALSE; - } session->sessionId = HgfsGenerateSessionId(); session->state = HGFS_SESSION_STATE_OPEN; @@ -5936,7 +6016,7 @@ HgfsAllocInitReply(HgfsPacket *packet, // IN/OUT: Hgfs Packet void *replyData; /* - * XXX - this should be modified to use the common HgfsServerGetRequestHeaderSize + * XXX - this should be modified to use the common HgfsServerGetReplyHeaderSize * so that all requests and replies are handled consistently. */ if (HGFS_OP_NEW_HEADER == request->op) { @@ -6002,7 +6082,8 @@ HgfsServerValidateRead(HgfsInputParam *input, // IN: Input params Bool useMappedBuffer; useMappedBuffer = (input->transportSession->channelCbTable->getWriteVa != NULL); - replyReadHeaderSize = HgfsServerGetRequestHeaderSize(input); + replyReadHeaderSize = HgfsServerGetReplyHeaderSize(input->sessionEnabled, + input->op); switch (input->op) { case HGFS_OP_READ_FAST_V4: /* Data is packed into a separate buffer from the read results. */ @@ -6181,6 +6262,165 @@ HgfsServerRead(HgfsInputParam *input) // IN: Input params } +/* + *----------------------------------------------------------------------------- + * + * HgfsServerValidateWrite -- + * + * Validate a write request's arguments. + * + * The HGFS Packet stored in the following possible formats as follows: + * + * Protocol V4 versions: + * In the HgfsPacket metaPacket buffer + * [HgfsHeader][HgfsRequestWriteV3] + * In the HgfsPacket dataPacket buffer + * [Variable length data to write] + * + * Protocol V3 versions: + * In the HgfsPacket metaPacket buffer + * [HgfsHeader][HgfsRequestWriteV3][Variable length data to write] + * [HgfsRequest][HgfsRequestWriteV3][Variable length data to write] + * + * Protocol V2 versions: + * Does not exist + * + * Protocol V1 versions: + * In the HgfsPacket metaPacket buffer + * [HgfsRequestWrite][Variable length data to write] + * (Note, the HgfsRequestWrite contains an HgfsRequest within it.) + * + * Note, the writeOffset is ignored here but is checked in the platform specific + * write handler. + * + * Results: + * HGFS_ERROR_SUCCESS on success. + * HGFS error code on failure. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static HgfsInternalStatus +HgfsServerValidateWrite(HgfsInputParam *input, // IN: Input params + HgfsHandle writeHandle, // IN: write Handle + uint64 writeOffset, // IN: write offset of file + uint32 writeSize, // IN: size to write + HgfsWriteFlags flags, // IN: write flags + fileDesc *writefd, // OUT: write file descriptor + Bool *writeSequential, // OUT: write is sequential + Bool *writeAppend) // OUT: write is append +{ + HgfsInternalStatus status = HGFS_ERROR_SUCCESS; + size_t requestWriteHeaderSize; + size_t requestWritePacketSize = 0; + size_t requestWritePacketDataSize = 0; + size_t requestWriteDataSize = 0; + fileDesc writeFileDesc = 0; + Bool sequentialHandle = FALSE; + Bool appendHandle = FALSE; + + requestWriteHeaderSize = HgfsServerGetRequestHeaderSize(input->sessionEnabled, + input->op); + switch (input->op) { + case HGFS_OP_WRITE_FAST_V4: + /* + * For this the operation data is in the shared memory, + * which depends on the mapping functions from the transport. + */ + ASSERT(input->transportSession->channelCbTable->getReadVa != NULL); + /* + * The write data is packed in a separate buffer to the write request. + * Note, for size we **include** the 1 byte placeholder payload that was not + * counted in earlier versions of the write request. Sigh. See below. + */ + requestWritePacketSize = sizeof (HgfsRequestWriteV3); + requestWritePacketDataSize = 0; + requestWriteDataSize = writeSize; + break; + case HGFS_OP_WRITE_V3: + /* + * Data is packed as a part of the write request. + * Note, for size we remove the 1 byte placeholder payload + * so it isn't counted twice. + */ + requestWritePacketSize = sizeof (HgfsRequestWriteV3) - 1; + requestWritePacketDataSize = writeSize; + requestWriteDataSize = 0; + break; + case HGFS_OP_WRITE: + /* + * Data is packed as a part of the write request. + * Note, for size we remove the 1 byte placeholder payload + * so it isn't counted twice. + */ + requestWritePacketSize = sizeof (HgfsRequestWrite) - 1; + requestWritePacketDataSize = writeSize; + requestWriteDataSize = 0; + break; + default: + status = HGFS_ERROR_PROTOCOL; + LOG(4, ("%s: Unsupported protocol version passed %d -> PROTOCOL_ERROR.\n", + __FUNCTION__, input->op)); + NOT_IMPLEMENTED(); + goto exit; + } + + /* + * Validate the packet size with the header, write request and write data. + */ + if (!HSPU_ValidateDataPacketSize(input->packet, requestWriteDataSize) || + !HSPU_ValidateRequestPacketSize(input->packet, + requestWriteHeaderSize, + requestWritePacketSize, + requestWritePacketDataSize)) { + status = HGFS_ERROR_INVALID_PARAMETER; + LOG(4, ("%s: Error: write data size pkt %"FMTSZ"u data %"FMTSZ"u\n", + __FUNCTION__, requestWritePacketDataSize, requestWriteDataSize)); + goto exit; + } + + /* + * Now map the file handle, and extract the details of the write e.g. writing + * sequentially or appending + * + * Validate the file handle by retrieving it possibly from the cache. + */ + status = HgfsPlatformGetFd(writeHandle, input->session, + ((flags & HGFS_WRITE_APPEND) ? TRUE : FALSE), + &writeFileDesc); + if (status != HGFS_ERROR_SUCCESS) { + LOG(4, ("%s: Error: arg validation handle -> %d.\n", + __FUNCTION__, status)); + goto exit; + } + + if (!HgfsHandleIsSequentialOpen(writeHandle, input->session, &sequentialHandle)) { + status = HGFS_ERROR_INVALID_HANDLE; + LOG(4, ("%s: Could not get sequential open status\n", __FUNCTION__)); + goto exit; + } + +#if defined(__APPLE__) + if (!HgfsHandle2AppendFlag(writeHandle, input->session, &appendHandle)) { + status = HGFS_ERROR_INVALID_HANDLE; + LOG(4, ("%s: Could not get append mode\n", __FUNCTION__)); + goto exit; + } +#endif + +exit: + *writefd = writeFileDesc; + *writeSequential = sequentialHandle; + *writeAppend = appendHandle; + LOG(4, ("%s: arg validation check return (file %u data size %u) %u.\n", + __FUNCTION__, writeHandle, writeSize, status)); + return status; +} + + /* *----------------------------------------------------------------------------- * @@ -6200,50 +6440,79 @@ HgfsServerRead(HgfsInputParam *input) // IN: Input params static void HgfsServerWrite(HgfsInputParam *input) // IN: Input params { - uint32 numberBytesToWrite; - HgfsInternalStatus status; - HgfsWriteFlags flags; - uint64 offset; - const void *dataToWrite; - uint32 replyActualSize; - size_t replyPayloadSize = 0; - HgfsHandle file; + uint64 writeOffset; + uint32 writeSize; + uint32 writtenSize = 0; + HgfsInternalStatus status = HGFS_ERROR_SUCCESS; + HgfsWriteFlags writeFlags; + const void *writeData; + size_t writeReplySize = 0; + HgfsHandle writeFile; + fileDesc writeFd; + Bool writeSequential; + Bool writeAppend; HGFS_ASSERT_INPUT(input); if (!HgfsUnpackWriteRequest(input->payload, input->payloadSize, input->op, - &file, &offset, &numberBytesToWrite, &flags, - &dataToWrite)) { + &writeFile, &writeOffset, &writeSize, &writeFlags, + &writeData)) { LOG(4, ("%s: Error: Op %d unpack write request arguments\n", __FUNCTION__, input->op)); status = HGFS_ERROR_PROTOCOL; goto exit; } - if (NULL == dataToWrite) { - /* No inline data to write, get it from the transport shared memory. */ - HSPU_SetDataPacketSize(input->packet, numberBytesToWrite); - dataToWrite = HSPU_GetDataPacketBuf(input->packet, BUF_READABLE, - input->transportSession->channelCbTable); - if (NULL == dataToWrite) { - LOG(4, ("%s: Error: Op %d mapping write data buffer\n", __FUNCTION__, input->op)); - status = HGFS_ERROR_PROTOCOL; - goto exit; - } + /* + * Validate the write arguments with the data and request buffers to ensure + * there isn't a malformed request or we try to write more data than is in the buffer. + */ + status = HgfsServerValidateWrite(input, + writeFile, + writeOffset, + writeSize, + writeFlags, + &writeFd, + &writeSequential, + &writeAppend); + if (status != HGFS_ERROR_SUCCESS) { + LOG(4, ("%s: Error: validate args %u.\n", __FUNCTION__, status)); + goto exit; } - status = HgfsPlatformWriteFile(file, input->session, offset, numberBytesToWrite, - flags, dataToWrite, &replyActualSize); - if (HGFS_ERROR_SUCCESS != status) { - goto exit; + if (writeSize > 0) { + if (NULL == writeData) { + /* No inline data to write, get it from the transport shared memory. */ + HSPU_SetDataPacketSize(input->packet, writeSize); + writeData = HSPU_GetDataPacketBuf(input->packet, BUF_READABLE, + input->transportSession->channelCbTable); + if (NULL == writeData) { + LOG(4, ("%s: Error: Op %d mapping write data buffer\n", __FUNCTION__, input->op)); + status = HGFS_ERROR_PROTOCOL; + goto exit; + } + } + + status = HgfsPlatformWriteFile(writeFd, + input->session, + writeOffset, + writeSize, + writeFlags, + writeSequential, + writeAppend, + writeData, + &writtenSize); + if (HGFS_ERROR_SUCCESS != status) { + goto exit; + } } if (!HgfsPackWriteReply(input->packet, input->request, input->op, - replyActualSize, &replyPayloadSize, input->session)) { + writtenSize, &writeReplySize, input->session)) { status = HGFS_ERROR_INTERNAL; } exit: - HgfsServerCompleteRequest(status, replyPayloadSize, input); + HgfsServerCompleteRequest(status, writeReplySize, input); } @@ -7599,9 +7868,9 @@ HgfsServerGetattr(HgfsInputParam *input) // IN: Input params } if (HGFS_ERROR_SUCCESS == status && - !HgfsServerPolicy_CheckMode(HGFS_OPEN_MODE_READ_ONLY, - shareInfo.writePermissions, - shareInfo.readPermissions)) { + !HgfsServer_ShareAccessCheck(HGFS_OPEN_MODE_READ_ONLY, + shareInfo.writePermissions, + shareInfo.readPermissions)) { status = HGFS_ERROR_ACCESS_DENIED; } else if (status != HGFS_ERROR_SUCCESS) { /* @@ -7716,9 +7985,9 @@ HgfsServerSetattr(HgfsInputParam *input) // IN: Input params * handle for the oplocked node (or break the oplock) prior to making * a setattr request. Fail this request. */ - if (!HgfsServerPolicy_CheckMode(HGFS_OPEN_MODE_WRITE_ONLY, - shareInfo.writePermissions, - shareInfo.readPermissions)) { + if (!HgfsServer_ShareAccessCheck(HGFS_OPEN_MODE_WRITE_ONLY, + shareInfo.writePermissions, + shareInfo.readPermissions)) { status = HGFS_ERROR_ACCESS_DENIED; } else if (HGFS_NAME_STATUS_COMPLETE != HgfsServerPolicy_GetShareOptions(cpName, cpNameSize, diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerInt.h b/open-vm-tools/lib/hgfsServer/hgfsServerInt.h index ef4926bb8..dcac80536 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerInt.h +++ b/open-vm-tools/lib/hgfsServer/hgfsServerInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -748,13 +748,15 @@ HgfsPlatformReadFile(fileDesc readFile, // IN: file descriptor void* payload, // OUT: buffer for the read data uint32 *actualSize); // OUT: actual length read HgfsInternalStatus -HgfsPlatformWriteFile(HgfsHandle file, // IN: Hgfs file handle +HgfsPlatformWriteFile(fileDesc writeFile, // IN: file descriptor HgfsSessionInfo *session, // IN: session info - uint64 offset, // IN: file offset to write to - uint32 requiredSize, // IN: length of data to write - HgfsWriteFlags flags, // IN: write flags - const void *payload, // IN: data to be written - uint32 *actualSize); // OUT: actual length written + uint64 writeOffset, // IN: file offset to write to + uint32 writeDataSize, // IN: length of data to write + HgfsWriteFlags writeFlags, // IN: write flags + Bool writeSequential, // IN: write is sequential + Bool writeAppend, // IN: write is appended + const void *writeData, // IN: data to be written + uint32 *writtenSize); // OUT: byte length written HgfsInternalStatus HgfsPlatformWriteWin32Stream(HgfsHandle file, // IN: packet header char *dataToWrite, // IN: data to write @@ -857,6 +859,12 @@ void HSPU_PutMetaPacket(HgfsPacket *packet, // IN/OUT: Hgfs Packet HgfsServerChannelCallbacks *chanCb); // IN: Channel callbacks +Bool +HSPU_ValidateRequestPacketSize(HgfsPacket *packet, // IN: Hgfs Packet + size_t requestHeaderSize, // IN: request header size + size_t requestOpSize, // IN: request packet size + size_t requestOpDataSize); // IN: request packet data size + Bool HSPU_ValidateReplyPacketSize(HgfsPacket *packet, // IN: Hgfs Packet size_t replyHeaderSize, // IN: reply header size diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c index b874ce9b2..3ab20adfa 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -4240,40 +4240,25 @@ HgfsPlatformReadFile(fileDesc file, // IN: file descriptor */ HgfsInternalStatus -HgfsPlatformWriteFile(HgfsHandle file, // IN: Hgfs file handle +HgfsPlatformWriteFile(fileDesc writeFd, // IN: file descriptor HgfsSessionInfo *session, // IN: session info - uint64 offset, // IN: file offset to write to - uint32 requiredSize, // IN: length of data to write - HgfsWriteFlags flags, // IN: write flags - const void *payload, // IN: data to be written - uint32 *actualSize) // OUT: actual length written + uint64 writeOffset, // IN: file offset to write to + uint32 writeDataSize, // IN: length of data to write + HgfsWriteFlags writeFlags, // IN: write flags + Bool writeSequential, // IN: write is sequential + Bool writeAppend, // IN: write is appended + const void *writeData, // IN: data to be written + uint32 *writtenSize) // OUT: actual length written { - HgfsInternalStatus status; - int fd; + HgfsInternalStatus status = 0; int error = 0; - Bool sequentialOpen; - - LOG(4, ("%s: write fh %u, offset %"FMT64"u, count %u\n", - __FUNCTION__, file, offset, requiredSize)); - /* Get the file desriptor from the cache */ - status = HgfsPlatformGetFd(file, session, - ((flags & HGFS_WRITE_APPEND) ? TRUE : FALSE), - &fd); - - if (status != 0) { - LOG(4, ("%s: Could not get file descriptor\n", __FUNCTION__)); - return status; - } - - if (!HgfsHandleIsSequentialOpen(file, session, &sequentialOpen)) { - LOG(4, ("%s: Could not get sequential open status\n", __FUNCTION__)); - return EBADF; - } + LOG(4, ("%s: write fh %u offset %"FMT64"u, count %u\n", + __FUNCTION__, writeFd, writeOffset, writeDataSize)); #if !defined(sun) - if (!sequentialOpen) { - status = HgfsWriteCheckIORange(offset, requiredSize); + if (!writeSequential) { + status = HgfsWriteCheckIORange(writeOffset, writeDataSize); if (status != 0) { return status; } @@ -4282,25 +4267,18 @@ HgfsPlatformWriteFile(HgfsHandle file, // IN: Hgfs file handle #if defined(__linux__) /* Write to the file. */ - if (sequentialOpen) { - error = write(fd, payload, requiredSize); + if (writeSequential) { + error = write(writeFd, writeData, writeDataSize); } else { - error = pwrite(fd, payload, requiredSize, offset); + error = pwrite(writeFd, writeData, writeDataSize, writeOffset); } #elif defined(__APPLE__) { - Bool appendMode; - - if (!HgfsHandle2AppendFlag(file, session, &appendMode)) { - LOG(4, ("%s: Could not get append mode\n", __FUNCTION__)); - return EBADF; - } - /* Write to the file. */ - if (sequentialOpen || appendMode) { - error = write(fd, payload, requiredSize); + if (writeSequential || writeAppend) { + error = write(writeFd, writeData, writeDataSize); } else { - error = pwrite(fd, payload, requiredSize, offset); + error = pwrite(writeFd, writeData, writeDataSize, writeOffset); } } #else @@ -4310,27 +4288,27 @@ HgfsPlatformWriteFile(HgfsHandle file, // IN: Hgfs file handle */ MXUser_AcquireExclLock(session->fileIOLock); - if (!sequentialOpen) { + if (!writeSequential) { # ifdef linux { uint64 res; # if !defined(VM_X86_64) - error = _llseek(fd, offset >> 32, offset & 0xFFFFFFFF, &res, 0); + error = _llseek(writeFd, writeOffset >> 32, writeOffset & 0xFFFFFFFF, &res, 0); # else - error = llseek(fd, offset >> 32, offset & 0xFFFFFFFF, &res, 0); + error = llseek(writeFd, writeOffset >> 32, writeOffset & 0xFFFFFFFF, &res, 0); # endif } # else - error = lseek(fd, offset, 0); + error = lseek(writeFd, writeOffset, 0); # endif } if (error < 0) { LOG(4, ("%s: could not seek to %"FMT64"u: %s\n", __FUNCTION__, - offset, strerror(errno))); + writeOffset, strerror(errno))); } else { - error = write(fd, payload, requiredSize); + error = write(writeFd, writeData, writeDataSize); } { int savedErr = errno; @@ -4344,8 +4322,8 @@ HgfsPlatformWriteFile(HgfsHandle file, // IN: Hgfs file handle LOG(4, ("%s: error writing to file: %s\n", __FUNCTION__, strerror(status))); } else { - LOG(4, ("%s: wrote %d bytes\n", __FUNCTION__, error)); - *actualSize = error; + *writtenSize = error; + LOG(4, ("%s: wrote %d bytes\n", __FUNCTION__, *writtenSize)); } return status; } diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerOplock.c b/open-vm-tools/lib/hgfsServer/hgfsServerOplock.c index 4f457bd0e..378a3c2fc 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerOplock.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServerOplock.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerOplock.h b/open-vm-tools/lib/hgfsServer/hgfsServerOplock.h index cb7961915..d087241b7 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerOplock.h +++ b/open-vm-tools/lib/hgfsServer/hgfsServerOplock.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerOplockInt.h b/open-vm-tools/lib/hgfsServer/hgfsServerOplockInt.h index af85e76af..d0b50b31e 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerOplockInt.h +++ b/open-vm-tools/lib/hgfsServer/hgfsServerOplockInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerOplockLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerOplockLinux.c index a77062719..43817166d 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerOplockLinux.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServerOplockLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerPacketUtil.c b/open-vm-tools/lib/hgfsServer/hgfsServerPacketUtil.c index 2294382eb..9fa48fdec 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerPacketUtil.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServerPacketUtil.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -76,6 +76,57 @@ static void HSPUUnmapBuf(HgfsChannelUnmapVirtAddrFunc unmapVa, +/* + *----------------------------------------------------------------------------- + * + * HSPU_ValidateRequestPacketSize -- + * + * Validate an HGFS packet size with the HGFS header in use, the HGFS opcode request + * (its arguments) and optionally any opcode request data that is contained in the + * size for the packet. + * + * Results: + * TRUE if the packet size is large enough for the required request data. + * FALSE if not. + * + * Side effects: + * None. + *----------------------------------------------------------------------------- + */ + +Bool +HSPU_ValidateRequestPacketSize(HgfsPacket *packet, // IN: Hgfs Packet + size_t requestHeaderSize, // IN: request header size + size_t requestOpSize, // IN: request op size + size_t requestOpDataSize) // IN: request op data size +{ + size_t bytesRemaining = packet->metaPacketDataSize; + Bool requestSizeIsOkay = FALSE; + + /* + * Validate the request buffer size ensuring that the the contained components + * (request header, the operation arguments and lastly any data) fall within it. + */ + + if (bytesRemaining >= requestHeaderSize) { + bytesRemaining -= requestHeaderSize; + } else { + goto exit; + } + if (bytesRemaining >= requestOpSize) { + bytesRemaining -= requestOpSize; + } else { + goto exit; + } + if (bytesRemaining >= requestOpDataSize) { + requestSizeIsOkay = TRUE; + } + +exit: + return requestSizeIsOkay; +} + + /* *----------------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c b/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c index e17bb8863..3efd457f7 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -5560,6 +5560,7 @@ HgfsUnpackSetWatchRequest(const void *packet, // IN: HGFS packet NOT_REACHED(); result = FALSE; } else { + LOG(4, ("%s: HGFS_OP_SET_WATCH_V4\n", __FUNCTION__)); result = HgfsUnpackSetWatchPayloadV4(requestV4, packetSize, useHandle, flags, events, cpName, cpNameSize, dir, caseFlags); } @@ -6094,11 +6095,13 @@ HgfsPackChangeNotifyRequestV4(HgfsSubscriberHandle watchId, // IN: watch size_t bufferSize, // IN: available space HgfsRequestNotifyV4 *reply) // OUT: notification buffer { - size_t size; + size_t size = 0; size_t notificationOffset; if (bufferSize < sizeof *reply) { - return 0; + LOG(4, ("%s: Error HGFS_OP_NOTIFY_V4 buf size %"FMTSZ"u reply size %"FMTSZ"u\n", + __FUNCTION__, bufferSize, sizeof *reply)); + goto exit; } reply->watchId = watchId; reply->flags = flags; @@ -6129,6 +6132,8 @@ HgfsPackChangeNotifyRequestV4(HgfsSubscriberHandle watchId, // IN: watch reply->flags = HGFS_NOTIFY_FLAG_OVERFLOW; } } + +exit: return size; } @@ -6163,7 +6168,7 @@ HgfsPackChangeNotificationRequest(void *packet, // IN/OUT: Hg size_t notifyRequestSize; HgfsRequestNotifyV4 *notifyRequest; HgfsHeader *header = packet; - Bool result; + Bool result = FALSE; ASSERT(packet); ASSERT(shareName); @@ -6172,8 +6177,12 @@ HgfsPackChangeNotificationRequest(void *packet, // IN/OUT: Hg ASSERT(session); ASSERT(bufferSize); + LOG(4, ("%s: HGFS_OP_NOTIFY_V4\n", __FUNCTION__)); + if (*bufferSize < sizeof *header) { - return FALSE; + LOG(4, ("%s: Error HGFS_OP_NOTIFY_V4 buf size %"FMTSZ"u min %"FMTSZ"u\n", + __FUNCTION__, *bufferSize, sizeof *header)); + goto exit; } /* @@ -6199,9 +6208,8 @@ HgfsPackChangeNotificationRequest(void *packet, // IN/OUT: Hg HGFS_PACKET_FLAG_REQUEST, *bufferSize, header); - } else { - result = FALSE; } +exit: return result; } diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerParameters.h b/open-vm-tools/lib/hgfsServer/hgfsServerParameters.h index 9d0ff7563..760b1a4d4 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerParameters.h +++ b/open-vm-tools/lib/hgfsServer/hgfsServerParameters.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServerManagerGuest/Makefile.am b/open-vm-tools/lib/hgfsServerManagerGuest/Makefile.am index 71898561e..78f6138e7 100644 --- a/open-vm-tools/lib/hgfsServerManagerGuest/Makefile.am +++ b/open-vm-tools/lib/hgfsServerManagerGuest/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/hgfsServerManagerGuest/Makefile.in b/open-vm-tools/lib/hgfsServerManagerGuest/Makefile.in deleted file mode 100644 index 3541ae253..000000000 --- a/open-vm-tools/lib/hgfsServerManagerGuest/Makefile.in +++ /dev/null @@ -1,537 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfsServerManagerGuest -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfsServerManagerGuest_la_LIBADD = -am_libHgfsServerManagerGuest_la_OBJECTS = hgfsServerManagerGuest.lo \ - hgfsChannelGuest.lo hgfsChannelGuestBd.lo -libHgfsServerManagerGuest_la_OBJECTS = \ - $(am_libHgfsServerManagerGuest_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfsServerManagerGuest_la_SOURCES) -DIST_SOURCES = $(libHgfsServerManagerGuest_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfsServerManagerGuest.la -libHgfsServerManagerGuest_la_SOURCES = hgfsServerManagerGuest.c \ - hgfsChannelGuest.c hgfsChannelGuestBd.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfsServerManagerGuest/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfsServerManagerGuest/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfsServerManagerGuest.la: $(libHgfsServerManagerGuest_la_OBJECTS) $(libHgfsServerManagerGuest_la_DEPENDENCIES) - $(LINK) $(libHgfsServerManagerGuest_la_OBJECTS) $(libHgfsServerManagerGuest_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsChannelGuest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsChannelGuestBd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerManagerGuest.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuest.c b/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuest.c index 9ba9d9790..0b709d7f6 100644 --- a/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuest.c +++ b/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuest.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuestBd.c b/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuestBd.c index 85081beff..93579602d 100644 --- a/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuestBd.c +++ b/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuestBd.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuestInt.h b/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuestInt.h index 3d9f633b9..b47235cb9 100644 --- a/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuestInt.h +++ b/open-vm-tools/lib/hgfsServerManagerGuest/hgfsChannelGuestInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c b/open-vm-tools/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c index 0e9f32756..029222877 100644 --- a/open-vm-tools/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c +++ b/open-vm-tools/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006,2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006,2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.am b/open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.am index 5f06dd185..13fa3bbf3 100644 --- a/open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.am +++ b/open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.in b/open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.in deleted file mode 100644 index 0e9202062..000000000 --- a/open-vm-tools/lib/hgfsServerPolicyGuest/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/hgfsServerPolicyGuest -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libHgfsServerPolicyGuest_la_LIBADD = -am_libHgfsServerPolicyGuest_la_OBJECTS = hgfsServerPolicyGuest.lo -libHgfsServerPolicyGuest_la_OBJECTS = \ - $(am_libHgfsServerPolicyGuest_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libHgfsServerPolicyGuest_la_SOURCES) -DIST_SOURCES = $(libHgfsServerPolicyGuest_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libHgfsServerPolicyGuest.la -libHgfsServerPolicyGuest_la_SOURCES = hgfsServerPolicyGuest.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/hgfsServerPolicyGuest/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/hgfsServerPolicyGuest/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libHgfsServerPolicyGuest.la: $(libHgfsServerPolicyGuest_la_OBJECTS) $(libHgfsServerPolicyGuest_la_DEPENDENCIES) - $(LINK) $(libHgfsServerPolicyGuest_la_OBJECTS) $(libHgfsServerPolicyGuest_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hgfsServerPolicyGuest.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c b/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c index 470c5a546..dc0b1ee5c 100644 --- a/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c +++ b/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -676,62 +676,3 @@ HgfsServerPolicy_GetShareMode(char const *nameIn, // IN: Share name to re return HGFS_NAME_STATUS_COMPLETE; } - - -/* - *----------------------------------------------------------------------------- - * - * HgfsServerPolicy_CheckMode -- - * - * Checks if the requested mode may be granted depending on read/write permissions. - * - * Results: - * TRUE if the requested mode can be granted, FALSE otherwise. - * - * Side effects: - * None - * - *----------------------------------------------------------------------------- - */ - -Bool -HgfsServerPolicy_CheckMode(HgfsOpenMode mode, // IN: mode to check - Bool writePermissions, // IN: callers write permissions - Bool readPermissions) // IN: callers read permissions -{ - /* - * See if access is allowed in the requested mode. - * - * XXX Yeah, this is retarded. We should be using bits instead of - * an enum for HgfsOpenMode. Add it to the todo list. [bac] - */ - switch (HGFS_OPEN_MODE_ACCMODE(mode)) { - case HGFS_OPEN_MODE_READ_ONLY: - if (!readPermissions) { - LOG(4, ("HgfsServerPolicyCheckMode: Read access denied\n")); - return FALSE; - } - break; - - case HGFS_OPEN_MODE_WRITE_ONLY: - if (!writePermissions) { - LOG(4, ("HgfsServerPolicyCheckMode: Write access denied\n")); - return FALSE; - } - break; - - case HGFS_OPEN_MODE_READ_WRITE: - if (!readPermissions || !writePermissions) { - LOG(4, ("HgfsServerPolicyCheckMode: Read/write access denied\n")); - return FALSE; - } - break; - - default: - LOG(0, ("HgfsServerPolicyCheckMode: Invalid mode\n")); - ASSERT(FALSE); - return FALSE; - } - - return TRUE; -} diff --git a/open-vm-tools/lib/hgfsUri/Makefile.am b/open-vm-tools/lib/hgfsUri/Makefile.am index 870609242..292dda59a 100644 --- a/open-vm-tools/lib/hgfsUri/Makefile.am +++ b/open-vm-tools/lib/hgfsUri/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright 2015 VMware, Inc. All rights reserved. +### Copyright (C) 2015-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/hgfsUri/hgfsUriPosix.c b/open-vm-tools/lib/hgfsUri/hgfsUriPosix.c index 0a3753623..2d296da5f 100644 --- a/open-vm-tools/lib/hgfsUri/hgfsUriPosix.c +++ b/open-vm-tools/lib/hgfsUri/hgfsUriPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2015 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/impersonate/Makefile.am b/open-vm-tools/lib/impersonate/Makefile.am index b0c4bc17b..83ec77691 100644 --- a/open-vm-tools/lib/impersonate/Makefile.am +++ b/open-vm-tools/lib/impersonate/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/impersonate/Makefile.in b/open-vm-tools/lib/impersonate/Makefile.in deleted file mode 100644 index d6e2c7799..000000000 --- a/open-vm-tools/lib/impersonate/Makefile.in +++ /dev/null @@ -1,534 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/impersonate -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libImpersonate_la_LIBADD = -am_libImpersonate_la_OBJECTS = impersonate.lo impersonatePosix.lo -libImpersonate_la_OBJECTS = $(am_libImpersonate_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libImpersonate_la_SOURCES) -DIST_SOURCES = $(libImpersonate_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libImpersonate.la -libImpersonate_la_SOURCES = impersonate.c impersonatePosix.c -AM_CFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/impersonate/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/impersonate/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libImpersonate.la: $(libImpersonate_la_OBJECTS) $(libImpersonate_la_DEPENDENCIES) - $(LINK) $(libImpersonate_la_OBJECTS) $(libImpersonate_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impersonate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impersonatePosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/impersonate/impersonate.c b/open-vm-tools/lib/impersonate/impersonate.c index 6f2b2a93e..b636e6d17 100644 --- a/open-vm-tools/lib/impersonate/impersonate.c +++ b/open-vm-tools/lib/impersonate/impersonate.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -59,7 +59,6 @@ ImpersonateGetLock(void) MXUserRecLock *lock = MXUser_CreateSingletonRecLock(&impersonateLockStorage, "impersonateLock", RANK_impersonateLock); - VERIFY(lock); return lock; } diff --git a/open-vm-tools/lib/impersonate/impersonateInt.h b/open-vm-tools/lib/impersonate/impersonateInt.h index cd992dfca..70cfecd88 100644 --- a/open-vm-tools/lib/impersonate/impersonateInt.h +++ b/open-vm-tools/lib/impersonate/impersonateInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/impersonate/impersonatePosix.c b/open-vm-tools/lib/impersonate/impersonatePosix.c index 55e772a66..50c681dce 100644 --- a/open-vm-tools/lib/impersonate/impersonatePosix.c +++ b/open-vm-tools/lib/impersonate/impersonatePosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/appUtil.h b/open-vm-tools/lib/include/appUtil.h index eb7a97ab3..df818f39f 100644 --- a/open-vm-tools/lib/include/appUtil.h +++ b/open-vm-tools/lib/include/appUtil.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -40,6 +40,18 @@ extern "C" { }; #endif // __cplusplus +/* + * Platform-agnostic bitmask of types of handlers to include. + * Used by the AppUtil file type functions. + */ +typedef enum { + FILE_TYPE_INCLUDE_NONE = 0, + FILE_TYPE_INCLUDE_URI = 1, // Include URI handlers + FILE_TYPE_INCLUDE_PERCEIVED_HANDLERS = 1 << 1, // Include perceived type handlers + // (see bug 1440812). + FILE_TYPE_INCLUDE_ALL = FILE_TYPE_INCLUDE_URI | + FILE_TYPE_INCLUDE_PERCEIVED_HANDLERS +} FileTypeInclusions; #ifdef _WIN32 @@ -87,7 +99,7 @@ Bool AppUtil_GetDIBitsAlloc(HDC hdc, HICON AppUtil_GetWindowIcon(HWND hwnd, uint32 iconSize); -void AppUtil_BuildGlobalApplicationList(void); +void AppUtil_BuildGlobalApplicationList(FileTypeInclusions inclusions); wchar_t* AppUtil_SanitizeCommandLine(const wchar_t *commandLineUtf16); char *AppUtil_ActionURIForCommandLine(const WCHAR *commandLineUtf16); diff --git a/open-vm-tools/lib/include/asyncsocket.h b/open-vm-tools/lib/include/asyncsocket.h index 9d41a72b8..63a145313 100644 --- a/open-vm-tools/lib/include/asyncsocket.h +++ b/open-vm-tools/lib/include/asyncsocket.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -49,6 +49,10 @@ #define INCLUDE_ALLOW_USERLEVEL #include "includeCheck.h" +#ifdef __APPLE__ +#include +#endif + /* * Error codes */ @@ -205,6 +209,9 @@ typedef void (*AsyncSocketConnectFn) (AsyncSocket *asock, void *clientData); typedef void (*AsyncSocketSslAcceptFn) (Bool status, AsyncSocket *asock, void *clientData); +typedef void (*AsyncSocketSslConnectFn) (Bool status, AsyncSocket *asock, + void *clientData); +typedef void (*AsyncSocketCloseCb) (AsyncSocket *asock); /* * Listen on port and fire callback with new asock @@ -243,6 +250,13 @@ AsyncSocket *AsyncSocket_ListenWebSocketUDS(const char *pipeName, void *clientData, AsyncSocketPollParams *pollParams, int *outError); + +AsyncSocket *AsyncSocket_ListenSocketUDS(const char *pipeName, + AsyncSocketConnectFn connectFn, + void *clientData, + AsyncSocketPollParams *pollParams, + int *outError); + #endif #endif @@ -271,15 +285,25 @@ AsyncSocket *AsyncSocket_ConnectUnixDomain(const char *path, int *error); #else AsyncSocket * -AsyncSocket_ConnectNamedPipe(char *pipeName, +AsyncSocket_ConnectNamedPipe(const char *pipeName, AsyncSocketConnectFn connectFn, void *clientData, AsyncSocketConnectFlags flags, AsyncSocketPollParams *pollParams, int *outError); + +AsyncSocket* +AsyncSocket_CreateNamedPipe(const char *pipeName, + AsyncSocketConnectFn connectFn, + void *clientData, + DWORD openMode, + DWORD pipeMode, + uint32 numInstances, + AsyncSocketPollParams *pollParams, + int *error); #endif -#ifndef VMX86_TOOLS +#if !defined VMX86_TOOLS || TARGET_OS_IPHONE AsyncSocket * AsyncSocket_ConnectWebSocket(const char *url, struct _SSLVerifyParam *sslVerifyParam, @@ -290,18 +314,32 @@ AsyncSocket_ConnectWebSocket(const char *url, AsyncSocketConnectFlags flags, AsyncSocketPollParams *pollParams, int *error); + +AsyncSocket * +AsyncSocket_ConnectProxySocket(const char *url, + struct _SSLVerifyParam *sslVerifyParam, + const char *cookies, + const char *protocols[], + AsyncSocketConnectFn connectFn, + void *clientData, + AsyncSocketConnectFlags flags, + AsyncSocketPollParams *pollParams, + int *error); #endif -#ifndef USE_SSL_DIRECT /* * Initiate SSL connection on existing asock, with optional cert verification */ Bool AsyncSocket_ConnectSSL(AsyncSocket *asock, struct _SSLVerifyParam *verifyParam, void *sslContext); -Bool AsyncSocket_AcceptSSL(AsyncSocket *asock); -#endif +void AsyncSocket_StartSslConnect(AsyncSocket *asock, + struct _SSLVerifyParam *verifyParam, + void *sslCtx, + AsyncSocketSslConnectFn sslConnectFn, + void *clientData); +Bool AsyncSocket_AcceptSSL(AsyncSocket *asock); void AsyncSocket_StartSslAccept(AsyncSocket *asock, void *sslCtx, AsyncSocketSslAcceptFn sslAcceptFn, @@ -413,12 +451,25 @@ Bool AsyncSocket_SetBufferSizes(AsyncSocket *asock, // IN int sendSz, // IN int recvSz); // IN +/* + * Set optional AsyncSocket_Close() behaviors. + */ +void AsyncSocket_SetCloseOptions(AsyncSocket *asock, + int flushEnabledMaxWaitMsec, + AsyncSocketCloseCb closeCb); + +/* + * Send websocket close frame. + */ +int +AsyncSocket_SendWebSocketCloseFrame(AsyncSocket *asock, + uint16 closeStatus); + /* * Close the connection and destroy the asock. */ int AsyncSocket_Close(AsyncSocket *asock); -#ifndef VMX86_TOOLS /* * Retrieve the URI Supplied for a websocket connection */ @@ -428,7 +479,6 @@ char *AsyncSocket_GetWebSocketURI(AsyncSocket *asock); * Retrieve the Cookie Supplied for a websocket connection */ char *AsyncSocket_GetWebSocketCookie(AsyncSocket *asock); -#endif /* * Retrieve the close status, if received, for a websocket connection diff --git a/open-vm-tools/lib/include/auth.h b/open-vm-tools/lib/include/auth.h index c6b228e1d..21ac75f82 100644 --- a/open-vm-tools/lib/include/auth.h +++ b/open-vm-tools/lib/include/auth.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/backdoor.h b/open-vm-tools/lib/include/backdoor.h index ab95db41b..751115544 100644 --- a/open-vm-tools/lib/include/backdoor.h +++ b/open-vm-tools/lib/include/backdoor.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1999-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1999-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/backdoor_def.h b/open-vm-tools/lib/include/backdoor_def.h index bdb29b54f..c7e0719b5 100644 --- a/open-vm-tools/lib/include/backdoor_def.h +++ b/open-vm-tools/lib/include/backdoor_def.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -145,6 +145,8 @@ # define BDOOR_CMD_FAS_GET_TABLE_SKIP 5 # define BDOOR_CMD_FAS_GET_SLEEP_ENABLES 6 # define BDOOR_CMD_FAS_GET_HARD_RESET_ENABLE 7 +# define BDOOR_CMD_FAS_GET_MOUSE_HID 8 +# define BDOOR_CMD_FAS_GET_SMBIOS_VERSION 9 #define BDOOR_CMD_SENDPSHAREHINTS 66 /* Not in use. Deprecated. */ #define BDOOR_CMD_ENABLE_USB_MOUSE 67 #define BDOOR_CMD_GET_VCPU_INFO 68 @@ -165,6 +167,7 @@ # define BDOOR_CMD_EBC_GET_ORDER 1 # define BDOOR_CMD_EBC_SHELL_ACTIVE 2 # define BDOOR_CMD_EBC_GET_NETWORK_BOOT_PROTOCOL 3 +# define BDOOR_CMD_EBC_QUICKBOOT_ENABLED 4 #define BDOOR_CMD_GET_HW_MODEL 74 /* CPL 0 only. */ #define BDOOR_CMD_GET_SVGA_CAPABILITIES 75 /* CPL 0 only. */ #define BDOOR_CMD_GET_FORCE_X2APIC 76 /* CPL 0 only */ @@ -181,13 +184,35 @@ # define BDOOR_CMD_MKSGS_ADD_PPN 1 # define BDOOR_CMD_MKSGS_REMOVE_PPN 2 #define BDOOR_CMD_ABSPOINTER_RESTRICT 86 -#define BDOOR_CMD_GUESTINTEGRITY 87 -# define BDOOR_CMD_GI_SETUP 0 -# define BDOOR_CMD_GI_REMOVE 1 +#define BDOOR_CMD_GUEST_INTEGRITY 87 +# define BDOOR_CMD_GI_GET_CAPABILITIES 0 +# define BDOOR_CMD_GI_SETUP_ENTRY_POINT 1 +# define BDOOR_CMD_GI_SETUP_ALERTS 2 +# define BDOOR_CMD_GI_SETUP_STORE 3 +# define BDOOR_CMD_GI_SETUP_EVENT_RING 4 +# define BDOOR_CMD_GI_SETUP_NON_FAULT_READ 5 +# define BDOOR_CMD_GI_ENTER_INTEGRITY_MODE 6 +# define BDOOR_CMD_GI_EXIT_INTEGRITY_MODE 7 +# define BDOOR_CMD_GI_RESET_INTEGRITY_MODE 8 +# define BDOOR_CMD_GI_GET_EVENT_RING_STATE 9 +# define BDOOR_CMD_GI_CONSUME_RING_EVENTS 10 +# define BDOOR_CMD_GI_WATCH_MAPPINGS_START 11 +# define BDOOR_CMD_GI_WATCH_MAPPINGS_STOP 12 +# define BDOOR_CMD_GI_CHECK_MAPPINGS_NOW 13 +# define BDOOR_CMD_GI_WATCH_PPNS_START 14 +# define BDOOR_CMD_GI_WATCH_PPNS_STOP 15 +# define BDOOR_CMD_GI_SEND_MSG 16 +# define BDOOR_CMD_GI_TEST_READ_MOB 128 +# define BDOOR_CMD_GI_TEST_ADD_EVENT 129 +# define BDOOR_CMD_GI_TEST_MAPPING 130 +# define BDOOR_CMD_GI_TEST_PPN 131 +# define BDOOR_CMD_GI_MAX 131 #define BDOOR_CMD_MKSSTATS_SNAPSHOT 88 /* Devel only. */ # define BDOOR_CMD_MKSSTATS_START 0 # define BDOOR_CMD_MKSSTATS_STOP 1 -#define BDOOR_CMD_MAX 89 +#define BDOOR_CMD_SECUREBOOT 89 +#define BDOOR_CMD_COPY_PHYSMEM 90 /* Devel only. */ +#define BDOOR_CMD_MAX 91 /* @@ -213,10 +238,13 @@ #define BDOOR_NETWORK_BOOT_PROTOCOL_IPV4 0x1 #define BDOOR_NETWORK_BOOT_PROTOCOL_IPV6 0x2 +#define BDOOR_SECUREBOOT_STATUS_DISABLED 0xFFFFFFFFUL +#define BDOOR_SECUREBOOT_STATUS_APPROVED 1 +#define BDOOR_SECUREBOOT_STATUS_DENIED 2 + /* High-bandwidth backdoor port. --hpreg */ #define BDOORHB_PORT 0x5659 - #define BDOORHB_CMD_MESSAGE 0 #define BDOORHB_CMD_VASSERT 1 #define BDOORHB_CMD_MAX 2 @@ -263,4 +291,31 @@ Backdoor_CmdRequiresFullyValidVCPU(unsigned cmd) } #endif +#ifdef VM_ARM_64 + +#define BDOOR_ARM64_LB_PORT (BDOOR_PORT) +#define BDOOR_ARM64_HB_PORT_IN (BDOORHB_PORT) +#define BDOOR_ARM64_HB_PORT_OUT (BDOORHB_PORT +1) + +#define BDOOR_ARG0 REG_X0 +#define BDOOR_ARG1 REG_X1 +#define BDOOR_ARG2 REG_X2 +#define BDOOR_ARG3 REG_X3 +#define BDOOR_ARG4 REG_X4 +#define BDOOR_ARG5 REG_X5 +#define BDOOR_ARG6 REG_X6 + +#else + +#define BDOOR_ARG0 REG_RAX +#define BDOOR_ARG1 REG_RBX +#define BDOOR_ARG2 REG_RCX +#define BDOOR_ARG3 REG_RDX +#define BDOOR_ARG4 REG_RSI +#define BDOOR_ARG5 REG_RDI +#define BDOOR_ARG6 REG_RBP + +#endif + + #endif diff --git a/open-vm-tools/lib/include/backdoor_types.h b/open-vm-tools/lib/include/backdoor_types.h index 3f772dee6..2a9783af2 100644 --- a/open-vm-tools/lib/include/backdoor_types.h +++ b/open-vm-tools/lib/include/backdoor_types.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1999-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1999-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -64,10 +64,10 @@ } words; \ uint64 quad -#ifndef VM_X86_64 -#define DECLARE_REG_STRUCT DECLARE_REG32_STRUCT -#else +#if defined (VM_X86_64) || defined (VM_ARM_64) #define DECLARE_REG_STRUCT DECLARE_REG64_STRUCT +#else +#define DECLARE_REG_STRUCT DECLARE_REG32_STRUCT #endif #define DECLARE_REG_NAMED_STRUCT(_r) \ diff --git a/open-vm-tools/lib/include/base64.h b/open-vm-tools/lib/include/base64.h index 811ee607a..9d4cfcb8d 100644 --- a/open-vm-tools/lib/include/base64.h +++ b/open-vm-tools/lib/include/base64.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/bsd_output.h b/open-vm-tools/lib/include/bsd_output.h index 196c30bef..c23f5352c 100644 --- a/open-vm-tools/lib/include/bsd_output.h +++ b/open-vm-tools/lib/include/bsd_output.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/buildNumber.h b/open-vm-tools/lib/include/buildNumber.h index 8febfc28d..6c1816fd6 100644 --- a/open-vm-tools/lib/include/buildNumber.h +++ b/open-vm-tools/lib/include/buildNumber.h @@ -1,12 +1,12 @@ #define BUILD_NUMBER \ - "build-3227872" + "build-4449150" #define BUILD_NUMBER_NUMERIC \ - 3227872 + 4449150 #define BUILD_NUMBER_NUMERIC_STRING \ - "3227872" + "4449150" #define PRODUCT_BUILD_NUMBER \ - "product-build-52125" + "product-build-57774" #define PRODUCT_BUILD_NUMBER_NUMERIC \ - 52125 + 57774 #define PRODUCT_BUILD_NUMBER_NUMERIC_STRING \ - "52125" + "57774" diff --git a/open-vm-tools/lib/include/capsProvider.h b/open-vm-tools/lib/include/capsProvider.h index 02201bec9..824395e23 100644 --- a/open-vm-tools/lib/include/capsProvider.h +++ b/open-vm-tools/lib/include/capsProvider.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/circList.h b/open-vm-tools/lib/include/circList.h index d146dc2e5..e01d20520 100644 --- a/open-vm-tools/lib/include/circList.h +++ b/open-vm-tools/lib/include/circList.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -39,68 +39,114 @@ typedef struct ListItem { struct ListItem *next; } ListItem; -/* A list with no elements is a null pointer. */ -#define LIST_ITEM_DEF(name) \ - ListItem * name = NULL -#define LIST_EMPTY(l) ((l) == NULL) - -/* initialize list item */ -#define INIT_LIST_ITEM(p) \ - do { \ - (p)->prev = (p)->next = (p); \ - } while (0) - -/* check if initialized */ -#define IS_LIST_ITEM_INITIALIZED(li) \ - (((li) == (li)->prev) && ((li) == (li)->next)) +/* + *---------------------------------------------------------------------- + * + * CircList_IsEmpty -- + * + * A NULL list is an empty list. + * + * Result: + * TRUE if list is empty, FALSE otherwise. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ -/* return first element in the list */ -#define LIST_FIRST(l) (l) -#define LIST_FIRST_CHK(l) (l) +static INLINE Bool +CircList_IsEmpty(const ListItem *item) // IN +{ + return item == NULL; +} -/* return last element in the list */ -#define LIST_LAST(l) ((l)->prev) -#define LIST_LAST_CHK(l) (LIST_EMPTY(l) ? NULL : LIST_LAST(l)) /* - * LIST_CONTAINER - get the struct for this entry (like list_entry) - * @ptr: the &struct ListItem pointer. - * @type: the type of the struct this is embedded in. - * @member: the name of the list struct within the struct. + *---------------------------------------------------------------------- + * + * CircList_InitItem -- + * + * Initialize item as a single-element circular list. + * + * Result: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- */ -#define LIST_CONTAINER(ptr, type, member) \ - VMW_CONTAINER_OF(ptr, type, member) -/* - * delete item from the list - */ -#define LIST_DEL DelListItem +static INLINE void +CircList_InitItem(ListItem *item) // OUT +{ + item->prev = item->next = item; +} -/* - * link two lists together - */ -#define LIST_SPLICE SpliceLists /* - * Split a list into two lists + *---------------------------------------------------------------------- + * + * CircList_First -- + * + * Return first item in the list. + * + * Result: + * First item. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- */ -#define LIST_SPLIT SplitLists -/* - * Add item to front of stack. List pointer points to new head. - */ -#define LIST_PUSH PushListItem +static INLINE ListItem * +CircList_First(ListItem *item) // IN +{ + return item; +} + /* - * Add item at back of queue. List pointer only changes if list was empty. + *---------------------------------------------------------------------- + * + * CircList_Last -- + * + * Return last item in the list. + * + * Result: + * Last item. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- */ -#define LIST_QUEUE QueueListItem + +static INLINE ListItem * +CircList_Last(ListItem *item) +{ + return item->prev; +} + /* - * Get the list size. + * CIRC_LIST_CONTAINER - get the struct for this entry (like list_entry) + * @ptr: the &struct ListItem pointer. + * @type: the type of the struct this is embedded in. + * @member: the name of the list struct within the struct. */ -#define LIST_SIZE GetListSize +#define CIRC_LIST_CONTAINER(ptr, type, member) \ + VMW_CONTAINER_OF(ptr, type, member) +/* + * Historical name, left here to reduce churn. + * TODO: remove, all LIST_CONTAINER uses should be + * VMW_CONTAINER_OF and stop depending on circList.h + * to provide the definition. + */ +#define LIST_CONTAINER(ptr, type, member) VMW_CONTAINER_OF(ptr, type, member) /* * LIST_SCAN_FROM scans the list from "from" up until "until". @@ -109,38 +155,32 @@ typedef struct ListItem { * "until" is the element where search should stop. * member is the field to use for the search - either "next" or "prev". */ -#define LIST_SCAN_FROM(p, from, until, member) \ +#define CIRC_LIST_SCAN_FROM(p, from, until, member) \ for (p = (from); (p) != NULL; \ (p) = (((p)->member == (until)) ? NULL : (p)->member)) /* scan the entire list (non-destructively) */ -#define LIST_SCAN(p, l) \ - LIST_SCAN_FROM(p, LIST_FIRST(l), LIST_FIRST(l), next) +#define CIRC_LIST_SCAN(p, l) \ + CIRC_LIST_SCAN_FROM(p, CircList_First(l), CircList_First(l), next) -/* scan a list backward from last element to first (non-destructively) */ -#define LIST_SCAN_BACK(p, l) \ - LIST_SCAN_FROM(p, LIST_LAST_CHK(l), LIST_LAST(l), prev) - /* scan the entire list where loop element may be destroyed */ -#define LIST_SCAN_SAFE(p, pn, l) \ - if (!LIST_EMPTY(l)) \ - for (p = (l), (pn) = NextListItem(p, l); (p) != NULL; \ - (p) = (pn), (pn) = NextListItem(p, l)) +#define CIRC_LIST_SCAN_SAFE(p, pn, l) \ + if (!CircList_IsEmpty(l)) \ + for (p = (l), (pn) = CircList_Next(p, l); (p) != NULL; \ + (p) = (pn), (pn) = CircList_Next(p, l)) /* scan the entire list backwards where loop element may be destroyed */ -#define LIST_SCAN_BACK_SAFE(p, pn, l) \ - if (!LIST_EMPTY(l)) \ - for (p = LIST_LAST(l), (pn) = PrevListItem(p, l); (p) != NULL; \ - (p) = (pn), (pn) = PrevListItem(p, l)) - +#define CIRC_LIST_SCAN_BACK_SAFE(p, pn, l) \ + if (!CircList_IsEmpty(l)) \ + for (p = CircList_Last(l), (pn) = CircList_Prev(p, l); (p) != NULL; \ + (p) = (pn), (pn) = CircList_Prev(p, l)) -/* function definitions */ /* *---------------------------------------------------------------------- * - * NextListItem -- + * CircList_Next -- * * Returns the next member of a doubly linked list, or NULL if last. * Assumes: p is member of the list headed by head. @@ -156,8 +196,8 @@ typedef struct ListItem { */ static INLINE ListItem * -NextListItem(ListItem *p, // IN - ListItem *head) // IN +CircList_Next(ListItem *p, // IN + ListItem *head) // IN { if (head == NULL || p == NULL) { return NULL; @@ -171,7 +211,7 @@ NextListItem(ListItem *p, // IN /* *---------------------------------------------------------------------- * - * PrevListItem -- + * CircList_Prev -- * * Returns the prev member of a doubly linked list, or NULL if first. * Assumes: p is member of the list headed by head. @@ -187,8 +227,8 @@ NextListItem(ListItem *p, // IN */ static INLINE ListItem * -PrevListItem(ListItem *p, // IN - ListItem *head) // IN +CircList_Prev(ListItem *p, // IN + ListItem *head) // IN { if (head == NULL || p == NULL) { return NULL; @@ -201,7 +241,7 @@ PrevListItem(ListItem *p, // IN /* *---------------------------------------------------------------------- * - * DelListItem -- + * CircList_DeleteItem -- * * Deletes a member of a doubly linked list, possibly modifies the * list header itself. @@ -217,8 +257,8 @@ PrevListItem(ListItem *p, // IN */ static INLINE void -DelListItem(ListItem *p, // IN - ListItem **headp) // IN/OUT +CircList_DeleteItem(ListItem *p, // IN + ListItem **headp) // IN/OUT { ListItem *next; @@ -241,7 +281,7 @@ DelListItem(ListItem *p, // IN /* *---------------------------------------------------------------------- * - * QueueListItem -- + * CircList_Queue -- * * Adds a new member to the back of a doubly linked list (queue) * Assumes neither p nor headp is null and p is not a member of *headp. @@ -256,14 +296,14 @@ DelListItem(ListItem *p, // IN */ static INLINE void -QueueListItem(ListItem *p, // IN - ListItem **headp) // IN/OUT +CircList_Queue(ListItem *p, // IN + ListItem **headp) // IN/OUT { ListItem *head; head = *headp; - if (LIST_EMPTY(head)) { - INIT_LIST_ITEM(p); + if (CircList_IsEmpty(head)) { + CircList_InitItem(p); *headp = p; } else { p->prev = head->prev; @@ -277,7 +317,7 @@ QueueListItem(ListItem *p, // IN /* *---------------------------------------------------------------------- * - * PushListItem -- + * CircList_Push -- * * Adds a new member to the front of a doubly linked list (stack) * Assumes neither p nor headp is null and p is not a member of *headp. @@ -292,10 +332,10 @@ QueueListItem(ListItem *p, // IN */ static INLINE void -PushListItem(ListItem *p, // IN - ListItem **headp) // IN/OUT +CircList_Push(ListItem *p, // IN + ListItem **headp) // IN/OUT { - QueueListItem(p, headp); + CircList_Queue(p, headp); *headp = p; } @@ -303,7 +343,7 @@ PushListItem(ListItem *p, // IN /* *---------------------------------------------------------------------- * - * SpliceLists -- + * CircList_Splice -- * * Make a single list {l1 l2} from {l1} and {l2} and return it. * It is okay for one or both lists to be NULL. @@ -320,16 +360,16 @@ PushListItem(ListItem *p, // IN */ static INLINE ListItem * -SpliceLists(ListItem *l1, // IN - ListItem *l2) // IN +CircList_Splice(ListItem *l1, // IN + ListItem *l2) // IN { ListItem *l1Last, *l2Last; - if (LIST_EMPTY(l1)) { + if (CircList_IsEmpty(l1)) { return l2; } - if (LIST_EMPTY(l2)) { + if (CircList_IsEmpty(l2)) { return l1; } @@ -349,10 +389,11 @@ SpliceLists(ListItem *l1, // IN } +#if 0 /* Presently unused, enable if a use is found */ /* *---------------------------------------------------------------------- * - * SplitLists -- + * CircList_Split -- * * Make a list l = {l1 l2} into two separate lists {l1} and {l2}, where: * l = { ... x -> p -> ... } split into: @@ -372,14 +413,14 @@ SpliceLists(ListItem *l1, // IN */ static INLINE void -SplitLists(ListItem *p, // IN - ListItem *l, // IN - ListItem **l1p, // OUT - ListItem **l2p) // OUT +CircList_Split(ListItem *p, // IN + ListItem *l, // IN + ListItem **l1p, // OUT + ListItem **l2p) // OUT { ListItem *last; - if (p == LIST_FIRST(l)) { /* first element */ + if (p == CircList_First(l)) { /* first element */ *l1p = NULL; *l2p = l; return; @@ -395,12 +436,13 @@ SplitLists(ListItem *p, // IN p->prev = last; last->next = p; } +#endif /* *---------------------------------------------------------------------- * - * GetListSize -- + * CircList_Size -- * * Return the number of items in the list. * @@ -414,12 +456,12 @@ SplitLists(ListItem *p, // IN */ static INLINE int -GetListSize(ListItem *head) // IN +CircList_Size(ListItem *head) // IN { ListItem *li; int ret = 0; - LIST_SCAN(li, head) { + CIRC_LIST_SCAN(li, head) { ret++; } return ret; diff --git a/open-vm-tools/lib/include/clamped.h b/open-vm-tools/lib/include/clamped.h index 8d7e99fc6..4261f28c4 100644 --- a/open-vm-tools/lib/include/clamped.h +++ b/open-vm-tools/lib/include/clamped.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -111,6 +111,39 @@ Clamped_S64To32(int32 *out, // OUT } +/* + *----------------------------------------------------------------------------- + * + * Clamped_S32To16 -- + * + * Convert signed 32-bit to 16-bit, clamping instead of truncating. + * + * Results: + * On success, returns TRUE. If the result would have overflowed + * and we clamped it to MAX_INT16 or MIN_INT16, returns FALSE. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static INLINE Bool +Clamped_S32To16(int16 *out, // OUT + int32 a) // IN +{ + int16 clamped = (int16)a; + + if (UNLIKELY(a != clamped)) { + *out = a < 0 ? MIN_INT16 : MAX_INT16; + return FALSE; + } + + *out = clamped; + return TRUE; +} + + /* *---------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/include/codeset.h b/open-vm-tools/lib/include/codeset.h index a039d83c1..6886d3d20 100644 --- a/open-vm-tools/lib/include/codeset.h +++ b/open-vm-tools/lib/include/codeset.h @@ -1,5 +1,5 @@ /* ********************************************************** - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * **********************************************************/ /* @@ -383,6 +383,10 @@ int CodeSet_GetUtf8(const char *string, // IN: const char *end, // IN: uint32 *uchar); // OUT/OPT: +Bool CodeSet_IsValidUTF8(const char *bufIn, // IN: + size_t sizeIn); // IN: + +Bool CodeSet_IsStringValidUTF8(const char *string); // IN: /* *----------------------------------------------------------------------------- diff --git a/open-vm-tools/lib/include/community_source.h b/open-vm-tools/lib/include/community_source.h index 25d8a45e1..2bd33a861 100644 --- a/open-vm-tools/lib/include/community_source.h +++ b/open-vm-tools/lib/include/community_source.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/compat/compat_stdarg.h b/open-vm-tools/lib/include/compat/compat_stdarg.h index d4c037220..900a2f81e 100644 --- a/open-vm-tools/lib/include/compat/compat_stdarg.h +++ b/open-vm-tools/lib/include/compat/compat_stdarg.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/conf.h b/open-vm-tools/lib/include/conf.h index 60187c79d..5813c956b 100644 --- a/open-vm-tools/lib/include/conf.h +++ b/open-vm-tools/lib/include/conf.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2002-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -52,6 +52,7 @@ #define CONFNAME_LOGFILE "log.file" #define CONFNAME_LOGLEVEL "log.level" #define CONFNAME_DISABLETOOLSVERSION "disable-tools-version" +#define CONFNAME_HIDETOOLSVERSION "hide-tools-version" #define CONFNAME_DISABLEPMTIMERWARNING "disable-pmtimerwarning" diff --git a/open-vm-tools/lib/include/config.h b/open-vm-tools/lib/include/config.h index b78767f1b..41ca4a111 100644 --- a/open-vm-tools/lib/include/config.h +++ b/open-vm-tools/lib/include/config.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -42,14 +42,19 @@ void Config_SetString(const char *value, const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetStringPlain(const char *value, const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetStringSecure(const char *value, + const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetBool(Bool value, const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetBoolPlain(Bool value, const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetBoolSecure(Bool value, const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetLong(int32 value, const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetInt64(int64 value, const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetLongPlain(int32 value, const char *fmt, ...) PRINTF_DECL(2, 3); +void Config_SetLongSecure(int32 value, + const char *fmt, ...) PRINTF_DECL(2, 3); void Config_SetDouble(double value, const char *fmt, ...) PRINTF_DECL(2, 3); @@ -57,6 +62,8 @@ char *Config_GetString(const char *defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); char *Config_GetStringPlain(const char *defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); +char *Config_GetStringSecure(const char *defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); char *Config_GetAsString(const char *fmt, ...) PRINTF_DECL(1, 2); char *Config_GetStringEnum(const char *defaultValue, const char **choices, @@ -70,12 +77,16 @@ Bool Config_GetBool(Bool defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); Bool Config_GetBoolPlain(Bool defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); +Bool Config_GetBoolSecure(Bool defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); int32 Config_GetLong(int32 defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); int64 Config_GetInt64(int64 defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); int32 Config_GetLongPlain(int32 defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); +int32 Config_GetLongSecure(int32 defaultValue, + const char *fmt, ...) PRINTF_DECL(2, 3); int32 Config_GetTriState(int32 defaultValue, const char *fmt, ...) PRINTF_DECL(2, 3); double Config_GetDouble(double defaultValue, diff --git a/open-vm-tools/lib/include/cpName.h b/open-vm-tools/lib/include/cpName.h index 435686a02..13420ddb5 100644 --- a/open-vm-tools/lib/include/cpName.h +++ b/open-vm-tools/lib/include/cpName.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/cpNameLite.h b/open-vm-tools/lib/include/cpNameLite.h index fc770815f..2fc1a7e8f 100644 --- a/open-vm-tools/lib/include/cpNameLite.h +++ b/open-vm-tools/lib/include/cpNameLite.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/cpNameUtil.h b/open-vm-tools/lib/include/cpNameUtil.h index 29a5e7889..679e96de4 100644 --- a/open-vm-tools/lib/include/cpNameUtil.h +++ b/open-vm-tools/lib/include/cpNameUtil.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/cpuid_info.h b/open-vm-tools/lib/include/cpuid_info.h index e3ef7afd1..845b7ac8d 100644 --- a/open-vm-tools/lib/include/cpuid_info.h +++ b/open-vm-tools/lib/include/cpuid_info.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/cryptoError.h b/open-vm-tools/lib/include/cryptoError.h index ca643eaa3..269e42920 100644 --- a/open-vm-tools/lib/include/cryptoError.h +++ b/open-vm-tools/lib/include/cryptoError.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -26,6 +26,7 @@ #define VMWARE_CRYPTOERROR_H 1 #define INCLUDE_ALLOW_USERLEVEL +#define INCLUDE_ALLOW_VMCORE #include "includeCheck.h" #include "vmware.h" diff --git a/open-vm-tools/lib/include/dataMap.h b/open-vm-tools/lib/include/dataMap.h index fe781c8b6..a2a1dfe19 100644 --- a/open-vm-tools/lib/include/dataMap.h +++ b/open-vm-tools/lib/include/dataMap.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/dbllnklst.h b/open-vm-tools/lib/include/dbllnklst.h index 2037dcdb2..2bec9eb43 100644 --- a/open-vm-tools/lib/include/dbllnklst.h +++ b/open-vm-tools/lib/include/dbllnklst.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/debug.h b/open-vm-tools/lib/include/debug.h index 8bdb7279f..9f282eb55 100644 --- a/open-vm-tools/lib/include/debug.h +++ b/open-vm-tools/lib/include/debug.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/deployPkg/linuxDeployment.h b/open-vm-tools/lib/include/deployPkg/linuxDeployment.h index 06c229401..cfa9a87ae 100644 --- a/open-vm-tools/lib/include/deployPkg/linuxDeployment.h +++ b/open-vm-tools/lib/include/deployPkg/linuxDeployment.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -17,7 +17,9 @@ *********************************************************/ /* - * linuxDeployment.h : C interface to package deployment + * linuxDeployment.h -- + * + * C interface to package deployment. */ #ifndef LINUX_DEPLOYMENT_H @@ -28,33 +30,57 @@ #include "imgcust-common/log.h" #include "imgcust-common/imgcust-api.h" -/** - * Give the deploy package an application specific logger. + +/* + *------------------------------------------------------------------------------ + * + * DeployPkg_SetLogger -- + * + * Give the deploy package an application specific logger. * * @param logger [in] logger to be used for deploy operation + * + *------------------------------------------------------------------------------ */ + IMGCUST_API void DeployPkg_SetLogger(LogFunction log); -/** - * C-style wrapper to decode a package from a file, extract its payload, - * expand the payload into a temporary directory, and then execute - * the command specified in the package. + +/* + *------------------------------------------------------------------------------ + * + * DeployPkg_DeployPackageFromFile -- + * + * C-style wrapper to decode a package from a file, extract its payload, + * expand the payload into a temporary directory, and then execute + * the command specified in the package. * * @param file IN: the package file * @return 0 on success + * + *------------------------------------------------------------------------------ */ + IMGCUST_API int DeployPkg_DeployPackageFromFile(const char* file); -/** - * C-style wrapper to extract a package from a file using libmspack. + +/* + *------------------------------------------------------------------------------ + * + * ExtractCabPackage -- + * + * C-style wrapper to extract a package from a file using libmspack. * * @param[in] cabFileName the Cabinet file's path * @param[in] destDir a destination directory where to uncab * * @return TRUE on success, otherwise - FALSE. + * + *------------------------------------------------------------------------------ */ + IMGCUST_API Bool ExtractCabPackage(const char* cabFileName, const char* destDir); diff --git a/open-vm-tools/lib/include/dictll.h b/open-vm-tools/lib/include/dictll.h index db0767acb..3f0201822 100644 --- a/open-vm-tools/lib/include/dictll.h +++ b/open-vm-tools/lib/include/dictll.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/dynarray.h b/open-vm-tools/lib/include/dynarray.h index d6c6b0355..c715c1ec0 100644 --- a/open-vm-tools/lib/include/dynarray.h +++ b/open-vm-tools/lib/include/dynarray.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/dynbuf.h b/open-vm-tools/lib/include/dynbuf.h index 9b626d2af..cb0b45a10 100644 --- a/open-vm-tools/lib/include/dynbuf.h +++ b/open-vm-tools/lib/include/dynbuf.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -227,7 +227,7 @@ DynBuf_AppendString(DynBuf *buf, // IN/OUT const char *string) // IN { /* - * Make sure to copy the NULL. + * Make sure to copy the NUL. */ return DynBuf_Append(buf, string, strlen(string) + 1); } diff --git a/open-vm-tools/lib/include/dynxdr.h b/open-vm-tools/lib/include/dynxdr.h index bbbfe17ab..5410375cf 100644 --- a/open-vm-tools/lib/include/dynxdr.h +++ b/open-vm-tools/lib/include/dynxdr.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/embed_version.h b/open-vm-tools/lib/include/embed_version.h index ece8597d8..c27655e11 100644 --- a/open-vm-tools/lib/include/embed_version.h +++ b/open-vm-tools/lib/include/embed_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/err.h b/open-vm-tools/lib/include/err.h index ad1febfa1..49bc5a0bc 100644 --- a/open-vm-tools/lib/include/err.h +++ b/open-vm-tools/lib/include/err.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/escBitvector.h b/open-vm-tools/lib/include/escBitvector.h index 757c4a518..7f41e2088 100644 --- a/open-vm-tools/lib/include/escBitvector.h +++ b/open-vm-tools/lib/include/escBitvector.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/escape.h b/open-vm-tools/lib/include/escape.h index d94628c93..ee81d95cb 100644 --- a/open-vm-tools/lib/include/escape.h +++ b/open-vm-tools/lib/include/escape.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/file.h b/open-vm-tools/lib/include/file.h index b7bdf1be4..05f91f248 100644 --- a/open-vm-tools/lib/include/file.h +++ b/open-vm-tools/lib/include/file.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -137,6 +137,8 @@ Bool File_SupportsZeroedThick(const char *pathName); Bool File_SupportsMultiWriter(const char *pathName); +Bool File_SupportsOptimisticLock(const char *pathName); + Bool File_SupportsMandatoryLock(const char *pathName); Bool File_Exists(const char *pathName); @@ -188,6 +190,10 @@ int File_ListDirectory(const char *pathName, Bool File_IsOsfsVolumeEmpty(const char *pathName); +#ifndef _WIN32 +char * File_StripFwdSlashes(const char *pathName); +#endif + /* * Simple file-system walk. */ diff --git a/open-vm-tools/lib/include/fileIO.h b/open-vm-tools/lib/include/fileIO.h index 93b9328d7..04bff6ea8 100644 --- a/open-vm-tools/lib/include/fileIO.h +++ b/open-vm-tools/lib/include/fileIO.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/fileLock.h b/open-vm-tools/lib/include/fileLock.h index a40836ca0..5317ae6c1 100644 --- a/open-vm-tools/lib/include/fileLock.h +++ b/open-vm-tools/lib/include/fileLock.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/file_extensions.h b/open-vm-tools/lib/include/file_extensions.h index 4d5e6e999..a76064f4f 100644 --- a/open-vm-tools/lib/include/file_extensions.h +++ b/open-vm-tools/lib/include/file_extensions.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/glibUtils.h b/open-vm-tools/lib/include/glibUtils.h index 86b993bc4..f6268f771 100644 --- a/open-vm-tools/lib/include/glibUtils.h +++ b/open-vm-tools/lib/include/glibUtils.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/guestApp.h b/open-vm-tools/lib/include/guestApp.h index 7b9857f28..106641abc 100644 --- a/open-vm-tools/lib/include/guestApp.h +++ b/open-vm-tools/lib/include/guestApp.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/guestInfo.h b/open-vm-tools/lib/include/guestInfo.h index 2be878f20..f500a89ca 100644 --- a/open-vm-tools/lib/include/guestInfo.h +++ b/open-vm-tools/lib/include/guestInfo.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/guestStats.h b/open-vm-tools/lib/include/guestStats.h index 2e6a34334..67fa16392 100644 --- a/open-vm-tools/lib/include/guestStats.h +++ b/open-vm-tools/lib/include/guestStats.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/guest_msg_def.h b/open-vm-tools/lib/include/guest_msg_def.h index 8b5c8e37a..826ee567e 100644 --- a/open-vm-tools/lib/include/guest_msg_def.h +++ b/open-vm-tools/lib/include/guest_msg_def.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/guest_os.h b/open-vm-tools/lib/include/guest_os.h index d5d190a8b..ef202e3c5 100644 --- a/open-vm-tools/lib/include/guest_os.h +++ b/open-vm-tools/lib/include/guest_os.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -24,6 +24,7 @@ #define INCLUDE_ALLOW_VMCORE #include "includeCheck.h" +#include "vm_basic_types.h" #include "guest_os_tables.h" /* @@ -154,15 +155,23 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); BS(SOLARIS9), BS(SOLARIS10), \ BS(SOLARIS10_64) #define ALLSOLARIS10 BS(SOLARIS10), BS(SOLARIS10_64) + #define ALLNETWARE BS(NETWARE4), BS(NETWARE5), BS(NETWARE6) -#define ALL26XLINUX32 BS(OTHER26XLINUX), BS(DEBIAN45), \ - BS(RHEL), BS(UBUNTU) -#define ALL26XLINUX64 BS(OTHER26XLINUX_64), BS(DEBIAN45_64), \ - BS(RHEL_64) -#define ALL3XLINUX32 BS(OTHER3XLINUX) -#define ALL3XLINUX64 BS(OTHER3XLINUX_64), BS(PHOTON_64) -#define ALLVMKERNEL BS(VMKERNEL), BS(VMKERNEL5), BS(VMKERNEL6) +#define ALL26XLINUX32 BS(OTHER26XLINUX), BS(DEBIAN), BS(RHEL), \ + BS(UBUNTU), BS(CENTOS), BS(ORACLE) + +#define ALL26XLINUX64 BS(OTHER26XLINUX_64), BS(DEBIAN_64), \ + BS(RHEL_64), BS(CENTOS_64), BS(ORACLE_64) + +#define ALL3XLINUX32 BS(OTHER3XLINUX), BS(CENTOS6), BS(ORACLE6) + +#define ALL3XLINUX64 BS(OTHER3XLINUX_64), BS(PHOTON_64), \ + BS(CENTOS6_64), BS(CENTOS7_64), \ + BS(ORACLE6_64), BS(ORACLE7_64) + +#define ALLVMKERNEL BS(VMKERNEL), BS(VMKERNEL5), BS(VMKERNEL6), \ + BS(VMKERNEL65) #define ALLLINUX32 BS(OTHER24XLINUX), ALL26XLINUX32, ALL3XLINUX32, \ BS(OTHERLINUX), BS(VMKERNEL) @@ -172,7 +181,8 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define ALLDARWIN32 BS(DARWIN9), BS(DARWIN10), BS(DARWIN11) #define ALLDARWIN64 BS(DARWIN9_64), BS(DARWIN10_64), \ BS(DARWIN11_64), BS(DARWIN12_64), \ - BS(DARWIN13_64), BS(DARWIN14_64) + BS(DARWIN13_64), BS(DARWIN14_64), \ + BS(DARWIN15_64), BS(DARWIN16_64) #define ALLDARWIN ALLDARWIN32, ALLDARWIN64 #define ALL64 ALLWIN64, ALLLINUX64, BS(SOLARIS10_64), \ BS(FREEBSD_64), ALLDARWIN64, \ @@ -187,9 +197,10 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); */ /* vmkernel (ESX) */ -#define STR_OS_ESX_4 "VMware ESX 4" -#define STR_OS_ESX_5 "VMware ESX 5" -#define STR_OS_ESX_6 "VMware ESX 6" +#define STR_OS_ESX_4 "VMware ESX/ESXi 4.x" +#define STR_OS_ESX_5 "VMware ESXi 5.x" +#define STR_OS_ESX_6 "VMware ESXi 6.0" +#define STR_OS_ESX_65 "VMware ESXi 6.5" /* Linux */ #define STR_OS_ANNVIX "Annvix" @@ -198,10 +209,13 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define STR_OS_ASIANUX_3 "asianux3" #define STR_OS_ASIANUX_4 "asianux4" #define STR_OS_ASIANUX_5 "asianux5" +#define STR_OS_ASIANUX_7 "asianux7" #define STR_OS_AUROX "Aurox" #define STR_OS_ASIANUX "asianux" #define STR_OS_BLACKCAT "BlackCat" #define STR_OS_CENTOS "centos" +#define STR_OS_CENTOS6 "centos6" +#define STR_OS_CENTOS7 "centos7" #define STR_OS_COBALT "Cobalt" #define STR_OS_CONECTIVA "Conectiva" #define STR_OS_DEBIAN "Debian" @@ -211,6 +225,8 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define STR_OS_DEBIAN_7 "debian7" #define STR_OS_DEBIAN_7_1 "debian7" #define STR_OS_DEBIAN_8 "debian8" +#define STR_OS_DEBIAN_9 "debian9" +#define STR_OS_DEBIAN_10 "debian10" #define STR_OS_FEDORA "Fedora" #define STR_OS_GENTOO "Gentoo" #define STR_OS_IMMUNIX "Immunix" @@ -224,17 +240,19 @@ Bool Gos_InSetArray(uint32 gos, const uint32 *set); #define STR_OS_MKLINUX "MkLinux" #define STR_OS_NOVELL "nld9" #define STR_OS_NOVELL_FULL "Novell Linux Desktop 9" +#define STR_OS_ORACLE6 "oraclelinux6" +#define STR_OS_ORACLE7 "oraclelinux7" #define STR_OS_ORACLE "oraclelinux" #define STR_OS_OTHER "otherlinux" +#define STR_OS_OTHER_FULL "Other Linux" #define STR_OS_OTHER_24 "other24xlinux" #define STR_OS_OTHER_24_FULL "Other Linux 2.4.x kernel" #define STR_OS_OTHER_26 "other26xlinux" #define STR_OS_OTHER_26_FULL "Other Linux 2.6.x kernel" #define STR_OS_OTHER_3X "other3xlinux" #define STR_OS_OTHER_3X_FULL "Other Linux 3.x kernel" -#define STR_OS_OTHER_FULL "Other Linux" #define STR_OS_PHOTON "vmware-photon" -#define STR_OS_PHOTON_FULL "VMware Photon" +#define STR_OS_PHOTON_FULL "VMware Photon OS" #define STR_OS_PLD "PLD" #define STR_OS_RED_HAT "redhat" #define STR_OS_RED_HAT_EN "rhel" diff --git a/open-vm-tools/lib/include/guest_os_tables.h b/open-vm-tools/lib/include/guest_os_tables.h index 9449035de..c4773732a 100644 --- a/open-vm-tools/lib/include/guest_os_tables.h +++ b/open-vm-tools/lib/include/guest_os_tables.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -58,15 +58,15 @@ GOT(GUEST_OS_OTHER24XLINUX_64) \ GOT(GUEST_OS_OTHER26XLINUX) \ GOT(GUEST_OS_OTHER26XLINUX_64) \ - GOT(GUEST_OS_OTHER3XLINUX) \ - GOT(GUEST_OS_OTHER3XLINUX_64) \ + GOT(GUEST_OS_OTHER3XLINUX) /* Linux 3.x and later */ \ + GOT(GUEST_OS_OTHER3XLINUX_64) /* Linux 3.x and later X64 */ \ GOT(GUEST_OS_OTHERLINUX) \ GOT(GUEST_OS_OTHERLINUX_64) \ GOT(GUEST_OS_OTHER) \ GOT(GUEST_OS_OTHER_64) \ GOT(GUEST_OS_UBUNTU) \ - GOT(GUEST_OS_DEBIAN45) \ - GOT(GUEST_OS_DEBIAN45_64) \ + GOT(GUEST_OS_DEBIAN) \ + GOT(GUEST_OS_DEBIAN_64) \ GOT(GUEST_OS_RHEL) \ GOT(GUEST_OS_RHEL_64) \ GOT(GUEST_OS_FREEBSD) \ @@ -86,6 +86,8 @@ GOT(GUEST_OS_DARWIN12_64) /* Mac OS 10.8 */ \ GOT(GUEST_OS_DARWIN13_64) /* Mac OS 10.9 */ \ GOT(GUEST_OS_DARWIN14_64) /* Mac OS 10.10 */ \ + GOT(GUEST_OS_DARWIN15_64) /* Mac OS 10.11 */ \ + GOT(GUEST_OS_DARWIN16_64) /* Mac OS 10.12 */ \ GOT(GUEST_OS_OPENSERVER_5_AND_6) \ GOT(GUEST_OS_UNIXWARE7) \ GOT(GUEST_OS_NETWARE4) \ @@ -93,172 +95,197 @@ GOT(GUEST_OS_NETWARE6) \ GOT(GUEST_OS_VMKERNEL) /* ESX 4.x */ \ GOT(GUEST_OS_VMKERNEL5) /* ESX 5.x */ \ - GOT(GUEST_OS_VMKERNEL6) /* ESX 6.x and later */ \ + GOT(GUEST_OS_VMKERNEL6) /* ESX 6 */ \ + GOT(GUEST_OS_VMKERNEL65) /* ESX 6.5 and later */ \ GOT(GUEST_OS_PHOTON_64) /* VMware Photon IA 64-bit */ \ + GOT(GUEST_OS_ORACLE) \ + GOT(GUEST_OS_ORACLE_64) \ + GOT(GUEST_OS_ORACLE6) \ + GOT(GUEST_OS_ORACLE6_64) \ + GOT(GUEST_OS_ORACLE7_64) \ + GOT(GUEST_OS_CENTOS) \ + GOT(GUEST_OS_CENTOS_64) \ + GOT(GUEST_OS_CENTOS6) \ + GOT(GUEST_OS_CENTOS6_64) \ + GOT(GUEST_OS_CENTOS7_64) \ /* This list must be sorted alphabetically (non-case-sensitive) by gos name. */ -#define GUEST_OS_LIST_GEN \ - GOSL(STR_OS_ASIANUX_3, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_ASIANUX_3 "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_ASIANUX_4, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_ASIANUX_4 "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_ASIANUX_5 "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_CENTOS, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_CENTOS "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL("coreos-64", GUEST_OS_OTHER3XLINUX_64) \ - GOSL(STR_OS_MACOS, GUEST_OS_DARWIN9) \ - GOSL(STR_OS_MACOS "-64", GUEST_OS_DARWIN9_64) \ - GOSL(STR_OS_MACOS "10", GUEST_OS_DARWIN10) \ - GOSL(STR_OS_MACOS "10-64", GUEST_OS_DARWIN10_64) \ - GOSL(STR_OS_MACOS "11", GUEST_OS_DARWIN11) \ - GOSL(STR_OS_MACOS "11-64", GUEST_OS_DARWIN11_64) \ - GOSL(STR_OS_MACOS "12-64", GUEST_OS_DARWIN12_64) \ - GOSL(STR_OS_MACOS "13-64", GUEST_OS_DARWIN13_64) \ - GOSL(STR_OS_MACOS "14-64", GUEST_OS_DARWIN14_64) \ - GOSL(STR_OS_DEBIAN_4, GUEST_OS_DEBIAN45) \ - GOSL(STR_OS_DEBIAN_4 "-64", GUEST_OS_DEBIAN45_64) \ - GOSL(STR_OS_DEBIAN_5, GUEST_OS_DEBIAN45) \ - GOSL(STR_OS_DEBIAN_5 "-64", GUEST_OS_DEBIAN45_64) \ - GOSL(STR_OS_DEBIAN_6, GUEST_OS_DEBIAN45) \ - GOSL(STR_OS_DEBIAN_6 "-64", GUEST_OS_DEBIAN45_64) \ - GOSL(STR_OS_DEBIAN_7, GUEST_OS_DEBIAN45) \ - GOSL(STR_OS_DEBIAN_7 "-64", GUEST_OS_DEBIAN45_64) \ - GOSL(STR_OS_DEBIAN_8, GUEST_OS_DEBIAN45) \ - GOSL(STR_OS_DEBIAN_8 "-64", GUEST_OS_DEBIAN45_64) \ - GOSL("dos", GUEST_OS_DOS) \ - GOSL(STR_OS_ECOMSTATION, GUEST_OS_ECOMSTATION) \ - GOSL(STR_OS_ECOMSTATION "2", GUEST_OS_ECOMSTATION2) \ - GOSL("fedora", GUEST_OS_OTHER26XLINUX) \ - GOSL("fedora-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL("freeBSD", GUEST_OS_FREEBSD) \ - GOSL("freeBSD-64", GUEST_OS_FREEBSD_64) \ - GOSL("linux", GUEST_OS_OTHERLINUX) /* old */ \ - GOSL(STR_OS_WIN_LONG, GUEST_OS_LONGHORN) \ - GOSL("longhorn-64", GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_MANDRAKE, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_MANDRAKE "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_MANDRIVA, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_MANDRIVA "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL("netware4", GUEST_OS_NETWARE4) \ - GOSL("netware5", GUEST_OS_NETWARE5) \ - GOSL("netware6", GUEST_OS_NETWARE6) \ - GOSL(STR_OS_NOVELL, GUEST_OS_OTHER26XLINUX) \ - GOSL("nt4", GUEST_OS_WINNT) /* old */ \ - GOSL("oes", GUEST_OS_OTHER26XLINUX) \ - GOSL("openserver5", GUEST_OS_OPENSERVER_5_AND_6) \ - GOSL("openserver6", GUEST_OS_OPENSERVER_5_AND_6) \ - GOSL(STR_OS_OPENSUSE, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_OPENSUSE "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_ORACLE, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_ORACLE "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL("os2", GUEST_OS_OS2) \ - GOSL("os2experimental", GUEST_OS_OS2) \ - GOSL("other", GUEST_OS_OTHER) \ - GOSL("other-64", GUEST_OS_OTHER_64) \ - GOSL(STR_OS_OTHER_24, GUEST_OS_OTHER24XLINUX) \ - GOSL(STR_OS_OTHER_24 "-64", GUEST_OS_OTHER24XLINUX_64) \ - GOSL(STR_OS_OTHER_26, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_OTHER_26 "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_OTHER_3X, GUEST_OS_OTHER3XLINUX) \ - GOSL(STR_OS_OTHER_3X "-64", GUEST_OS_OTHER3XLINUX_64) \ - GOSL(STR_OS_OTHER, GUEST_OS_OTHERLINUX) \ - GOSL(STR_OS_OTHER "-64", GUEST_OS_OTHERLINUX_64) \ - GOSL(STR_OS_RED_HAT, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_RED_HAT_EN "2", GUEST_OS_OTHER24XLINUX) \ - GOSL(STR_OS_RED_HAT_EN "3", GUEST_OS_OTHER24XLINUX) \ - GOSL(STR_OS_RED_HAT_EN "3-64", GUEST_OS_OTHER24XLINUX_64) \ - GOSL(STR_OS_RED_HAT_EN "4", GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_RED_HAT_EN "4-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_RED_HAT_EN "5", GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_RED_HAT_EN "5-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_RED_HAT_EN "6", GUEST_OS_RHEL) \ - GOSL(STR_OS_RED_HAT_EN "6-64", GUEST_OS_RHEL_64) \ - GOSL(STR_OS_RED_HAT_EN "7", GUEST_OS_RHEL) \ - GOSL(STR_OS_RED_HAT_EN "7-64", GUEST_OS_RHEL_64) \ - GOSL(STR_OS_SUN_DESK, GUEST_OS_OTHER24XLINUX) \ - GOSL(STR_OS_SLES, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_SLES "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_SLES "10", GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_SLES "10-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_SLES "11", GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_SLES "11-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_SLES "12", GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_SLES "12-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_SOLARIS "10", GUEST_OS_SOLARIS10) \ - GOSL(STR_OS_SOLARIS "10-64", GUEST_OS_SOLARIS10_64) \ - GOSL(STR_OS_SOLARIS "11", GUEST_OS_SOLARIS10) \ - GOSL(STR_OS_SOLARIS "11-64", GUEST_OS_SOLARIS10_64) \ - GOSL(STR_OS_SOLARIS "6", GUEST_OS_SOLARIS_6_AND_7) \ - GOSL(STR_OS_SOLARIS "7", GUEST_OS_SOLARIS_6_AND_7) \ - GOSL(STR_OS_SOLARIS "8", GUEST_OS_SOLARIS8) \ - GOSL(STR_OS_SOLARIS "9", GUEST_OS_SOLARIS9) \ - GOSL(STR_OS_SUSE, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_SUSE "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_TURBO, GUEST_OS_OTHER26XLINUX) \ - GOSL(STR_OS_TURBO "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL(STR_OS_UBUNTU, GUEST_OS_UBUNTU) \ - GOSL(STR_OS_UBUNTU "-64", GUEST_OS_OTHER26XLINUX_64) \ - GOSL("unixware7", GUEST_OS_UNIXWARE7) \ - GOSL("vmkernel", GUEST_OS_VMKERNEL) \ - GOSL("vmkernel5", GUEST_OS_VMKERNEL5) \ - GOSL("vmkernel6", GUEST_OS_VMKERNEL6) \ - GOSL(STR_OS_PHOTON "-64", GUEST_OS_PHOTON_64) \ - GOSL("whistler", GUEST_OS_WINXP) /* old */ \ - GOSL("win2000", GUEST_OS_WIN2000) /* old */ \ - GOSL(STR_OS_WIN_2000_ADV_SERV, GUEST_OS_WIN2000) \ - GOSL(STR_OS_WIN_2000_PRO, GUEST_OS_WIN2000) \ - GOSL(STR_OS_WIN_2000_SERV, GUEST_OS_WIN2000) \ - GOSL(STR_OS_WIN_31, GUEST_OS_WIN31) \ - GOSL(STR_OS_WIN_95, GUEST_OS_WIN95) \ - GOSL(STR_OS_WIN_98, GUEST_OS_WIN98) \ - GOSL(STR_OS_WIN_SEVEN, GUEST_OS_WINSEVEN) \ - GOSL(STR_OS_WIN_SEVEN_X64, GUEST_OS_WINSEVEN_64) \ - GOSL("windows7Server64Guest", GUEST_OS_WIN2008R2_64) \ - GOSL(STR_OS_WIN_2008R2_X64, GUEST_OS_WIN2008R2_64) \ - GOSL(STR_OS_WIN_EIGHT, GUEST_OS_WINEIGHT) \ - GOSL(STR_OS_WIN_EIGHT_X64, GUEST_OS_WINEIGHT_64) \ - GOSL(STR_OS_WIN_EIGHTSERVER_X64, GUEST_OS_WINEIGHTSERVER_64) \ - GOSL(STR_OS_WIN_TEN, GUEST_OS_WINTEN) \ - GOSL(STR_OS_WIN_TEN_X64, GUEST_OS_WINTEN_64) \ - GOSL(STR_OS_WIN_TENSERVER_X64, GUEST_OS_WINTENSERVER_64) \ - GOSL(STR_OS_HYPER_V, GUEST_OS_HYPER_V) \ - GOSL("winLonghorn64Guest", GUEST_OS_LONGHORN_64) \ - GOSL("winLonghornGuest", GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_ME, GUEST_OS_WINME ) \ - GOSL(STR_OS_WIN_NET_BUS, GUEST_OS_WINNET) \ - GOSL("winNetDatacenter", GUEST_OS_WINNET) \ - GOSL("winNetDatacenter-64", GUEST_OS_WINNET_64) \ - GOSL(STR_OS_WIN_NET_EN, GUEST_OS_WINNET) \ - GOSL("winNetEnterprise-64", GUEST_OS_WINNET_64) \ - GOSL(STR_OS_WIN_NET_ST, GUEST_OS_WINNET) \ - GOSL("winNetStandard-64", GUEST_OS_WINNET_64) \ - GOSL(STR_OS_WIN_NET_WEB, GUEST_OS_WINNET) \ - GOSL(STR_OS_WIN_NT, GUEST_OS_WINNT) \ - GOSL(STR_OS_WIN_2008_CLUSTER, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_CLUSTER_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_DATACENTER, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_DATACENTER_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_DATACENTER_CORE, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_DATACENTER_CORE_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_ENTERPRISE, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_ENTERPRISE_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_ENTERPRISE_CORE, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_ENTERPRISE_CORE_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_SMALL_BUSINESS, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_PREMIUM, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_PREMIUM_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_STANDARD, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_STANDARD_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_STANDARD_CORE, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_STANDARD_CORE_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_2008_WEB_SERVER, GUEST_OS_LONGHORN) \ - GOSL(STR_OS_WIN_2008_WEB_SERVER_X64, GUEST_OS_LONGHORN_64) \ - GOSL(STR_OS_WIN_VISTA, GUEST_OS_WINVISTA) \ - GOSL(STR_OS_WIN_VISTA_X64, GUEST_OS_WINVISTA_64) \ - GOSL(STR_OS_WIN_XP_HOME, GUEST_OS_WINXP) \ - GOSL(STR_OS_WIN_XP_PRO, GUEST_OS_WINXP) \ - GOSL(STR_OS_WIN_XP_PRO_X64, GUEST_OS_WINXPPRO_64) \ +#define GUEST_OS_LIST_GEN \ + GOSL(STR_OS_ASIANUX_3, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ASIANUX_3 "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ASIANUX_4, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ASIANUX_4 "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ASIANUX_5 "-64", GUEST_OS_OTHER3XLINUX_64, "linux.iso") \ + GOSL(STR_OS_ASIANUX_7 "-64", GUEST_OS_OTHER3XLINUX_64, "linux.iso") \ + GOSL(STR_OS_CENTOS, GUEST_OS_CENTOS, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_CENTOS "-64", GUEST_OS_CENTOS_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_CENTOS "6", GUEST_OS_CENTOS6, "linux.iso") \ + GOSL(STR_OS_CENTOS "6-64", GUEST_OS_CENTOS6_64, "linux.iso") \ + GOSL(STR_OS_CENTOS "7-64", GUEST_OS_CENTOS7_64, "linux.iso") \ + GOSL("coreos-64", GUEST_OS_OTHER3XLINUX_64, NULL) \ + GOSL(STR_OS_MACOS, GUEST_OS_DARWIN9, "darwinPre15.iso") \ + GOSL(STR_OS_MACOS "-64", GUEST_OS_DARWIN9_64, "darwinPre15.iso") \ + GOSL(STR_OS_MACOS "10", GUEST_OS_DARWIN10, "darwinPre15.iso") \ + GOSL(STR_OS_MACOS "10-64", GUEST_OS_DARWIN10_64, "darwinPre15.iso") \ + GOSL(STR_OS_MACOS "11", GUEST_OS_DARWIN11, "darwinPre15.iso") \ + GOSL(STR_OS_MACOS "11-64", GUEST_OS_DARWIN11_64, "darwinPre15.iso") \ + GOSL(STR_OS_MACOS "12-64", GUEST_OS_DARWIN12_64, "darwinPre15.iso") \ + GOSL(STR_OS_MACOS "13-64", GUEST_OS_DARWIN13_64, "darwinPre15.iso") \ + GOSL(STR_OS_MACOS "14-64", GUEST_OS_DARWIN14_64, "darwinPre15.iso") \ + GOSL(STR_OS_MACOS "15-64", GUEST_OS_DARWIN15_64, "darwin.iso") \ + GOSL(STR_OS_MACOS "16-64", GUEST_OS_DARWIN16_64, "darwin.iso") \ + GOSL(STR_OS_DEBIAN_10, GUEST_OS_DEBIAN, "linux.iso") \ + GOSL(STR_OS_DEBIAN_10 "-64", GUEST_OS_DEBIAN_64, "linux.iso") \ + GOSL(STR_OS_DEBIAN_4, GUEST_OS_DEBIAN, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_DEBIAN_4 "-64", GUEST_OS_DEBIAN_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_DEBIAN_5, GUEST_OS_DEBIAN, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_DEBIAN_5 "-64", GUEST_OS_DEBIAN_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_DEBIAN_6, GUEST_OS_DEBIAN, "linux.iso") \ + GOSL(STR_OS_DEBIAN_6 "-64", GUEST_OS_DEBIAN_64, "linux.iso") \ + GOSL(STR_OS_DEBIAN_7, GUEST_OS_DEBIAN, "linux.iso") \ + GOSL(STR_OS_DEBIAN_7 "-64", GUEST_OS_DEBIAN_64, "linux.iso") \ + GOSL(STR_OS_DEBIAN_8, GUEST_OS_DEBIAN, "linux.iso") \ + GOSL(STR_OS_DEBIAN_8 "-64", GUEST_OS_DEBIAN_64, "linux.iso") \ + GOSL(STR_OS_DEBIAN_9, GUEST_OS_DEBIAN, "linux.iso") \ + GOSL(STR_OS_DEBIAN_9 "-64", GUEST_OS_DEBIAN_64, "linux.iso") \ + GOSL("dos", GUEST_OS_DOS, NULL) \ + GOSL(STR_OS_ECOMSTATION, GUEST_OS_ECOMSTATION, NULL) \ + GOSL(STR_OS_ECOMSTATION "2", GUEST_OS_ECOMSTATION2, NULL) \ + GOSL("fedora", GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL("fedora-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL("freeBSD", GUEST_OS_FREEBSD, "freebsd.iso") \ + GOSL("freeBSD-64", GUEST_OS_FREEBSD_64, "freebsd.iso") \ + GOSL("linux", GUEST_OS_OTHERLINUX, "linuxPreGlibc25.iso") /* old */ \ + GOSL(STR_OS_WIN_LONG, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL("longhorn-64", GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_MANDRAKE, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_MANDRAKE "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_MANDRIVA, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_MANDRIVA "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL("netware4", GUEST_OS_NETWARE4, "netware.iso") \ + GOSL("netware5", GUEST_OS_NETWARE5, "netware.iso") \ + GOSL("netware6", GUEST_OS_NETWARE6, "netware.iso") \ + GOSL(STR_OS_NOVELL, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL("nt4", GUEST_OS_WINNT, "winPre2k.iso") /* old */ \ + GOSL("oes", GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL("openserver5", GUEST_OS_OPENSERVER_5_AND_6, NULL) \ + GOSL("openserver6", GUEST_OS_OPENSERVER_5_AND_6, NULL) \ + GOSL(STR_OS_OPENSUSE, GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_OPENSUSE "-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_ORACLE, GUEST_OS_ORACLE, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ORACLE "-64", GUEST_OS_ORACLE_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_ORACLE "6", GUEST_OS_ORACLE6, "linux.iso") \ + GOSL(STR_OS_ORACLE "6-64", GUEST_OS_ORACLE6_64, "linux.iso") \ + GOSL(STR_OS_ORACLE "7-64", GUEST_OS_ORACLE7_64, "linux.iso") \ + GOSL("os2", GUEST_OS_OS2, NULL) \ + GOSL("os2experimental", GUEST_OS_OS2, NULL) \ + GOSL("other", GUEST_OS_OTHER, NULL) \ + GOSL("other-64", GUEST_OS_OTHER_64, NULL) \ + GOSL(STR_OS_OTHER_24, GUEST_OS_OTHER24XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_OTHER_24 "-64", GUEST_OS_OTHER24XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_OTHER_26, GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_OTHER_26 "-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_OTHER_3X, GUEST_OS_OTHER3XLINUX, "linux.iso") \ + GOSL(STR_OS_OTHER_3X "-64", GUEST_OS_OTHER3XLINUX_64, "linux.iso") \ + GOSL(STR_OS_OTHER, GUEST_OS_OTHERLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_OTHER "-64", GUEST_OS_OTHERLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "2", GUEST_OS_OTHER24XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "3", GUEST_OS_OTHER24XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "3-64", GUEST_OS_OTHER24XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "4", GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "4-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_RED_HAT_EN "5", GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "5-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "6", GUEST_OS_RHEL, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "6-64", GUEST_OS_RHEL_64, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "7", GUEST_OS_RHEL, "linux.iso") \ + GOSL(STR_OS_RED_HAT_EN "7-64", GUEST_OS_RHEL_64, "linux.iso") \ + GOSL(STR_OS_SUN_DESK, GUEST_OS_OTHER24XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_SLES, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_SLES "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_SLES "10", GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_SLES "10-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_SLES "11", GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_SLES "11-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_SLES "12", GUEST_OS_OTHER26XLINUX, "linux.iso") \ + GOSL(STR_OS_SLES "12-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL(STR_OS_SOLARIS "10", GUEST_OS_SOLARIS10, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "10-64", GUEST_OS_SOLARIS10_64, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "11", GUEST_OS_SOLARIS10, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "11-64", GUEST_OS_SOLARIS10_64, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "6", GUEST_OS_SOLARIS_6_AND_7, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "7", GUEST_OS_SOLARIS_6_AND_7, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "8", GUEST_OS_SOLARIS8, "solaris.iso") \ + GOSL(STR_OS_SOLARIS "9", GUEST_OS_SOLARIS9, "solaris.iso") \ + GOSL(STR_OS_SUSE, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_SUSE "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_TURBO, GUEST_OS_OTHER26XLINUX, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_TURBO "-64", GUEST_OS_OTHER26XLINUX_64, "linuxPreGlibc25.iso") \ + GOSL(STR_OS_UBUNTU, GUEST_OS_UBUNTU, "linux.iso") \ + GOSL(STR_OS_UBUNTU "-64", GUEST_OS_OTHER26XLINUX_64, "linux.iso") \ + GOSL("unixware7", GUEST_OS_UNIXWARE7, NULL) \ + GOSL("vmkernel", GUEST_OS_VMKERNEL, NULL) \ + GOSL("vmkernel5", GUEST_OS_VMKERNEL5, NULL) \ + GOSL("vmkernel6", GUEST_OS_VMKERNEL6, NULL) \ + GOSL("vmkernel65", GUEST_OS_VMKERNEL65, NULL) \ + GOSL(STR_OS_PHOTON "-64", GUEST_OS_PHOTON_64, NULL) \ + GOSL("whistler", GUEST_OS_WINXP, "winPreVista.iso") /* old */ \ + GOSL("win2000", GUEST_OS_WIN2000, "winPreVista.iso") /* old */ \ + GOSL(STR_OS_WIN_2000_ADV_SERV, GUEST_OS_WIN2000, "winPreVista.iso") \ + GOSL(STR_OS_WIN_2000_PRO, GUEST_OS_WIN2000, "winPreVista.iso") \ + GOSL(STR_OS_WIN_2000_SERV, GUEST_OS_WIN2000, "winPreVista.iso") \ + GOSL(STR_OS_WIN_31, GUEST_OS_WIN31, "winPre2k.iso") \ + GOSL(STR_OS_WIN_95, GUEST_OS_WIN95, "winPre2k.iso") \ + GOSL(STR_OS_WIN_98, GUEST_OS_WIN98, "winPre2k.iso") \ + GOSL(STR_OS_WIN_SEVEN, GUEST_OS_WINSEVEN, "windows.iso") \ + GOSL(STR_OS_WIN_SEVEN_X64, GUEST_OS_WINSEVEN_64, "windows.iso") \ + GOSL("windows7Server64Guest", GUEST_OS_WIN2008R2_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008R2_X64, GUEST_OS_WIN2008R2_64, "windows.iso") \ + GOSL(STR_OS_WIN_EIGHT, GUEST_OS_WINEIGHT, "windows.iso") \ + GOSL(STR_OS_WIN_EIGHT_X64, GUEST_OS_WINEIGHT_64, "windows.iso") \ + GOSL(STR_OS_WIN_EIGHTSERVER_X64, GUEST_OS_WINEIGHTSERVER_64, "windows.iso") \ + GOSL(STR_OS_WIN_TEN, GUEST_OS_WINTEN, "windows.iso") \ + GOSL(STR_OS_WIN_TEN_X64, GUEST_OS_WINTEN_64, "windows.iso") \ + GOSL(STR_OS_WIN_TENSERVER_X64, GUEST_OS_WINTENSERVER_64, "windows.iso") \ + GOSL(STR_OS_HYPER_V, GUEST_OS_HYPER_V, NULL) \ + GOSL("winLonghorn64Guest", GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL("winLonghornGuest", GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_ME, GUEST_OS_WINME, "winPre2k.iso") \ + GOSL(STR_OS_WIN_NET_BUS, GUEST_OS_WINNET, "winPreVista.iso") \ + GOSL("winNetDatacenter", GUEST_OS_WINNET, "winPreVista.iso") \ + GOSL("winNetDatacenter-64", GUEST_OS_WINNET_64, "winPreVista.iso") \ + GOSL(STR_OS_WIN_NET_EN, GUEST_OS_WINNET, "winPreVista.iso") \ + GOSL("winNetEnterprise-64", GUEST_OS_WINNET_64, "winPreVista.iso") \ + GOSL(STR_OS_WIN_NET_ST, GUEST_OS_WINNET, "winPreVista.iso") \ + GOSL("winNetStandard-64", GUEST_OS_WINNET_64, "winPreVista.iso") \ + GOSL(STR_OS_WIN_NET_WEB, GUEST_OS_WINNET, "winPreVista.iso") \ + GOSL(STR_OS_WIN_NT, GUEST_OS_WINNT, "winPre2k.iso") \ + GOSL(STR_OS_WIN_2008_CLUSTER, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_CLUSTER_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_DATACENTER, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_DATACENTER_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_DATACENTER_CORE, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_DATACENTER_CORE_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_ENTERPRISE, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_ENTERPRISE_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_ENTERPRISE_CORE, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_ENTERPRISE_CORE_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_SMALL_BUSINESS, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_PREMIUM, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_SMALL_BUSINESS_PREMIUM_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_STANDARD, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_STANDARD_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_STANDARD_CORE, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_STANDARD_CORE_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_2008_WEB_SERVER, GUEST_OS_LONGHORN, "windows.iso") \ + GOSL(STR_OS_WIN_2008_WEB_SERVER_X64, GUEST_OS_LONGHORN_64, "windows.iso") \ + GOSL(STR_OS_WIN_VISTA, GUEST_OS_WINVISTA, "windows.iso") \ + GOSL(STR_OS_WIN_VISTA_X64, GUEST_OS_WINVISTA_64, "windows.iso") \ + GOSL(STR_OS_WIN_XP_HOME, GUEST_OS_WINXP, "winPreVista.iso") \ + GOSL(STR_OS_WIN_XP_PRO, GUEST_OS_WINXP, "winPreVista.iso") \ + GOSL(STR_OS_WIN_XP_PRO_X64, GUEST_OS_WINXPPRO_64, "winPreVista.iso") \ #endif diff --git a/open-vm-tools/lib/include/hashMap.h b/open-vm-tools/lib/include/hashMap.h index 6ba250cba..bb75d32db 100644 --- a/open-vm-tools/lib/include/hashMap.h +++ b/open-vm-tools/lib/include/hashMap.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -78,8 +78,6 @@ uint32 HashMap_Count(HashMap *map); void HashMap_Iterate(HashMap* map, HashMapIteratorFn mapFn, Bool clear, void *userData); Bool HashMap_DoTests(void); -uint64 HashMap_Store(struct HashMap *, void *, uint64); -struct HashMap *HashMap_Retrieve(void *, uint32, uint64, uint64 *); #ifdef __cplusplus } diff --git a/open-vm-tools/lib/include/hashTable.h b/open-vm-tools/lib/include/hashTable.h index c422931bd..95a025f83 100644 --- a/open-vm-tools/lib/include/hashTable.h +++ b/open-vm-tools/lib/include/hashTable.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -80,9 +80,9 @@ HashTable_Insert(HashTable *hashTable, // IN/OUT: void *clientData); // IN/OPT: Bool -HashTable_Lookup(HashTable *hashTable, // IN: - const void *keyStr, // IN: - void **clientData); // OUT/OPT: +HashTable_Lookup(const HashTable *hashTable, // IN: + const void *keyStr, // IN: + void **clientData); // OUT/OPT: void * HashTable_LookupOrInsert(HashTable *hashTable, // IN/OUT: diff --git a/open-vm-tools/lib/include/hgfs.h b/open-vm-tools/lib/include/hgfs.h index 6be15afc3..b32ce1057 100644 --- a/open-vm-tools/lib/include/hgfs.h +++ b/open-vm-tools/lib/include/hgfs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -79,6 +79,27 @@ /* Maximum number of bytes to read or write to a V3 server in a single hgfs packet. */ #define HGFS_LARGE_IO_MAX (HGFS_LARGE_IO_MAX_PAGES * 4096) +/* + * File type + * + * File types, used in HgfsAttr. We support regular files, + * directories, and symlinks. + * + * Changing the order of this enum will break the protocol; new types + * should be added at the end. + * + * + * This definition is used in some places that don't include + * hgfsProto.h, which is why it is here instead of there. + */ +typedef enum { + HGFS_FILE_TYPE_REGULAR, + HGFS_FILE_TYPE_DIRECTORY, + HGFS_FILE_TYPE_SYMLINK, +} HgfsFileType; + + + /* * Open mode * diff --git a/open-vm-tools/lib/include/hgfsBd.h b/open-vm-tools/lib/include/hgfsBd.h index e39352af5..ed861ef10 100644 --- a/open-vm-tools/lib/include/hgfsBd.h +++ b/open-vm-tools/lib/include/hgfsBd.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/hgfsDevLinux.h b/open-vm-tools/lib/include/hgfsDevLinux.h index 619d11177..7fa0df55d 100644 --- a/open-vm-tools/lib/include/hgfsDevLinux.h +++ b/open-vm-tools/lib/include/hgfsDevLinux.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/hgfsEscape.h b/open-vm-tools/lib/include/hgfsEscape.h index b24570d9f..673064bab 100644 --- a/open-vm-tools/lib/include/hgfsEscape.h +++ b/open-vm-tools/lib/include/hgfsEscape.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/hgfsHelper.h b/open-vm-tools/lib/include/hgfsHelper.h index fa1cd8505..d6cc1cf27 100644 --- a/open-vm-tools/lib/include/hgfsHelper.h +++ b/open-vm-tools/lib/include/hgfsHelper.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/hgfsProto.h b/open-vm-tools/lib/include/hgfsProto.h index 58d318ca5..3dace8aef 100644 --- a/open-vm-tools/lib/include/hgfsProto.h +++ b/open-vm-tools/lib/include/hgfsProto.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -175,22 +175,7 @@ MY_ASSERTS(hgfsOpValuesAsserts, #define HGFS_REQ_GET_PAYLOAD_V3(hgfsReq) ((char *)(hgfsReq) + sizeof(HgfsRequest)) #define HGFS_REP_GET_PAYLOAD_V3(hgfsRep) ((char *)(hgfsRep) + sizeof(HgfsReply)) -/* - * File types, used in HgfsAttr. We support regular files, - * directories, and symlinks. - * - * Changing the order of this enum will break the protocol; new types - * should be added at the end. - */ - -typedef enum { - HGFS_FILE_TYPE_REGULAR, - HGFS_FILE_TYPE_DIRECTORY, - HGFS_FILE_TYPE_SYMLINK, -} HgfsFileType; - - -/* + /* * Open flags. * * Changing the order of this enum will break stuff. Do not add any flags to diff --git a/open-vm-tools/lib/include/hgfsServer.h b/open-vm-tools/lib/include/hgfsServer.h index dfc71bdc8..fbaf1314f 100644 --- a/open-vm-tools/lib/include/hgfsServer.h +++ b/open-vm-tools/lib/include/hgfsServer.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -199,6 +199,10 @@ Bool HgfsServer_InitState(HgfsServerCallbacks **, HgfsServerMgrCallbacks *); void HgfsServer_ExitState(void); +Bool HgfsServer_ShareAccessCheck(HgfsOpenMode accessMode, + Bool shareWriteable, + Bool shareReadable); + uint32 HgfsServer_GetHandleCounter(void); void HgfsServer_SetHandleCounter(uint32 newHandleCounter); diff --git a/open-vm-tools/lib/include/hgfsServerManager.h b/open-vm-tools/lib/include/hgfsServerManager.h index 582829f9e..6a78921f2 100644 --- a/open-vm-tools/lib/include/hgfsServerManager.h +++ b/open-vm-tools/lib/include/hgfsServerManager.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/hgfsServerPolicy.h b/open-vm-tools/lib/include/hgfsServerPolicy.h index bdb399eb7..4a5e6fbb5 100644 --- a/open-vm-tools/lib/include/hgfsServerPolicy.h +++ b/open-vm-tools/lib/include/hgfsServerPolicy.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -112,9 +112,4 @@ HgfsServerPolicy_FreeShareList(HgfsServerPolicy_ShareList *shareList); // IN: li HgfsServerPolicy_ShareList * HgfsServerPolicy_GetSharesWithTag(const char *tag); // IN: tag to search for -Bool -HgfsServerPolicy_CheckMode(HgfsOpenMode mode, // IN: mode to check - Bool writePermissions, // IN: callers write permissions - Bool readPermissions); // IN: callers read permissions - #endif // _HGFS_SERVER_POLICY_H_ diff --git a/open-vm-tools/lib/include/hgfsTransport.h b/open-vm-tools/lib/include/hgfsTransport.h index e423ba8e7..7023ef94c 100644 --- a/open-vm-tools/lib/include/hgfsTransport.h +++ b/open-vm-tools/lib/include/hgfsTransport.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/hgfsUri.h b/open-vm-tools/lib/include/hgfsUri.h index 0f7187447..9550a28b6 100644 --- a/open-vm-tools/lib/include/hgfsUri.h +++ b/open-vm-tools/lib/include/hgfsUri.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/hgfsUtil.h b/open-vm-tools/lib/include/hgfsUtil.h index 8dddb4df6..609f4c000 100644 --- a/open-vm-tools/lib/include/hgfsUtil.h +++ b/open-vm-tools/lib/include/hgfsUtil.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/hgfsVirtualDir.h b/open-vm-tools/lib/include/hgfsVirtualDir.h index c47f01103..ca2a4bbc5 100644 --- a/open-vm-tools/lib/include/hgfsVirtualDir.h +++ b/open-vm-tools/lib/include/hgfsVirtualDir.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/hostType.h b/open-vm-tools/lib/include/hostType.h index 428cc850d..69b6bae53 100644 --- a/open-vm-tools/lib/include/hostType.h +++ b/open-vm-tools/lib/include/hostType.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/hostinfo.h b/open-vm-tools/lib/include/hostinfo.h index 802de1409..feb6d7512 100644 --- a/open-vm-tools/lib/include/hostinfo.h +++ b/open-vm-tools/lib/include/hostinfo.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/imgcust-common/imgcust-api.h b/open-vm-tools/lib/include/imgcust-common/imgcust-api.h index f0901b8d4..5653617ba 100644 --- a/open-vm-tools/lib/include/imgcust-common/imgcust-api.h +++ b/open-vm-tools/lib/include/imgcust-common/imgcust-api.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,28 +16,33 @@ * *********************************************************/ +/* + * imgcust-api.h -- + * + * C interface to package deployment. + */ #ifndef IMGCUST_API_H #define IMGCUST_API_H #ifdef WIN32 - /* - * we get warnings c4251 and c4275 when exporting c++ classes that - * inherit from STL classes or use them as members. We can't - * export these classes or the client will get duplicate symbols, - * so we disable the warning: - */ - #pragma warning( disable : 4251 ) - #pragma warning( disable : 4275 ) +/* + * We get warnings c4251 and c4275 when exporting c++ classes that + * inherit from STL classes or use them as members. We can't + * export these classes or the client will get duplicate symbols, + * so we disable the warning. + */ +#pragma warning( disable : 4251 ) +#pragma warning( disable : 4275 ) - // if _IMGCUST_DLL is defined, we export functions/classes with this prefix - #ifdef _IMGCUST_DLL - #define IMGCUST_API __declspec(dllexport) - #else - #define IMGCUST_API __declspec(dllimport) - #endif +// if _IMGCUST_DLL is defined, we export functions/classes with this prefix +#ifdef _IMGCUST_DLL + #define IMGCUST_API __declspec(dllexport) +#else + #define IMGCUST_API __declspec(dllimport) +#endif #else // linux - #define IMGCUST_API __attribute__ ((visibility ("default"))) +#define IMGCUST_API __attribute__ ((visibility ("default"))) #endif // WIN32 #endif // IMGCUST_API_H diff --git a/open-vm-tools/lib/include/imgcust-common/log.h b/open-vm-tools/lib/include/imgcust-common/log.h index f2fe736e5..7cc86845c 100644 --- a/open-vm-tools/lib/include/imgcust-common/log.h +++ b/open-vm-tools/lib/include/imgcust-common/log.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -15,9 +15,12 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * *********************************************************/ -/** - * Logging method that need to be provided by the client of the - * library to enable logging. + +/* + * log.h -- + * + * Logging method that need to be provided by the client of the + * library to enable logging. */ #ifndef IMGCUST_COMMON_LOG_H diff --git a/open-vm-tools/lib/include/imgcust-common/process.h b/open-vm-tools/lib/include/imgcust-common/process.h index 0837b8f45..3c585713f 100644 --- a/open-vm-tools/lib/include/imgcust-common/process.h +++ b/open-vm-tools/lib/include/imgcust-common/process.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -17,43 +17,117 @@ *********************************************************/ /* - * Functions to launch an external process + * process.h -- + * + * Functions to launch an external process. */ +#ifndef IMGCUST_COMMON_PROCESS_H +#define IMGCUST_COMMON_PROCESS_H + #ifdef __cplusplus extern "C" { #endif -typedef struct ProcessOpaque* ProcessHandle; +typedef struct ProcessOpaque *ProcessHandle; typedef enum _ProcessError { PROCESS_SUCCESS, PROCESS_FAILED } ProcessError; -/** - * Process_Create + +/* + *------------------------------------------------------------------------------ + * + * Process_Create -- + * + * Creates a process and returns result of the operation. * - * since this file can be included in a c++ file that already has the - * namespaced c++ definition of LogFunction defined, we can't use the c - * version of LogFunction as an input. Only choice is to make it a raw - * pointer and cast it in the processXXX.c file which can use the C - * definition of LogFunction. + * Since this file can be included in a c++ file that already has the + * namespaced c++ definition of LogFunction defined, we can't use the c + * version of LogFunction as an input. Only choice is to make it a raw + * pointer and cast it in the processXXX.c file which can use the C + * definition of LogFunction. + * + *------------------------------------------------------------------------------ */ -ProcessError Process_Create(ProcessHandle *h, - char* args[], - void* log); -ProcessError Process_RunToComplete(ProcessHandle h, unsigned long timeout); +ProcessError +Process_Create(ProcessHandle *h, char *args[], void *log); -const char* Process_GetStdout(ProcessHandle h); -const char* Process_GetStderr(ProcessHandle h); +/* + *------------------------------------------------------------------------------ + * + * Process_RunToComplete -- + * + * Runs the process to completion and returns its result. + * + *------------------------------------------------------------------------------ + */ -int Process_GetExitCode(ProcessHandle h); +ProcessError +Process_RunToComplete(ProcessHandle h, unsigned long timeout); + + +/* + *------------------------------------------------------------------------------ + * + * Process_GetStdout -- + * + * Returns process's standard output. + * + *------------------------------------------------------------------------------ + */ + +const char * +Process_GetStdout(ProcessHandle h); + + +/* + *------------------------------------------------------------------------------ + * + * Process_GetStderr -- + * + * Returns process's standard error output. + * + *------------------------------------------------------------------------------ + */ + +const char * +Process_GetStderr(ProcessHandle h); + + +/* + *------------------------------------------------------------------------------ + * + * Process_GetExitCode -- + * + * Returns process's exit code. + * + *------------------------------------------------------------------------------ + */ + +int +Process_GetExitCode(ProcessHandle h); + + +/* + *------------------------------------------------------------------------------ + * + * Process_Destroy -- + * + * Destroys the process and returns result of the operation. + * + *------------------------------------------------------------------------------ + */ + +ProcessError +Process_Destroy(ProcessHandle h); -ProcessError Process_Destroy(ProcessHandle h); - #ifdef __cplusplus } // extern "C" #endif + +#endif // IMGCUST_COMMON_PROCESS_H diff --git a/open-vm-tools/lib/include/imgcust-guest/guestcust-events.h b/open-vm-tools/lib/include/imgcust-guest/guestcust-events.h index c5907278f..4cbd36bf0 100644 --- a/open-vm-tools/lib/include/imgcust-guest/guestcust-events.h +++ b/open-vm-tools/lib/include/imgcust-guest/guestcust-events.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,15 +16,20 @@ * *********************************************************/ -/*! - * @file guestcust-events.h -- +/* + * guestcust-events.h -- + * + * Definitions related to the GOSC events. */ +#ifndef IMGCUST_COMMON_GOSC_EVENTS_H +#define IMGCUST_COMMON_GOSC_EVENTS_H + /* * Customization-specific events generated in the guest and handled by * hostd. They are sent via the vmx/guestTools/deployPkgState/ vmdb path. * We start these at 100 to avoid conflict with the deployPkg error - * codes listed in vmx/public/toolsDeployPkg.h + * codes listed in vmx/public/toolsDeployPkg.h. */ typedef enum { GUESTCUST_EVENT_CUSTOMIZE_FAILED = 100, @@ -33,3 +38,5 @@ typedef enum { GUESTCUST_EVENT_ENABLE_NICS, GUESTCUST_EVENT_QUERY_NICS } GuestCustEvent; + +#endif // IMGCUST_COMMON_GOSC_EVENTS_H diff --git a/open-vm-tools/lib/include/impersonate.h b/open-vm-tools/lib/include/impersonate.h index 9161a5f91..59a0661a6 100644 --- a/open-vm-tools/lib/include/impersonate.h +++ b/open-vm-tools/lib/include/impersonate.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/includeCheck.h b/open-vm-tools/lib/include/includeCheck.h index 01f3c24d3..8cf7b4b77 100644 --- a/open-vm-tools/lib/include/includeCheck.h +++ b/open-vm-tools/lib/include/includeCheck.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/iovector.h b/open-vm-tools/lib/include/iovector.h index 7f5292ee0..8a9a7a8bb 100644 --- a/open-vm-tools/lib/include/iovector.h +++ b/open-vm-tools/lib/include/iovector.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/libExport.hh b/open-vm-tools/lib/include/libExport.hh index 0d1c5dad9..2dc4bd28e 100644 --- a/open-vm-tools/lib/include/libExport.hh +++ b/open-vm-tools/lib/include/libExport.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/localconfig.h b/open-vm-tools/lib/include/localconfig.h index 2cfeb9d65..94d5944c5 100644 --- a/open-vm-tools/lib/include/localconfig.h +++ b/open-vm-tools/lib/include/localconfig.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/log.h b/open-vm-tools/lib/include/log.h index f76e351ef..74562bdc9 100644 --- a/open-vm-tools/lib/include/log.h +++ b/open-vm-tools/lib/include/log.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/logFixed.h b/open-vm-tools/lib/include/logFixed.h index fcfcbbaa2..6cfd0242d 100644 --- a/open-vm-tools/lib/include/logFixed.h +++ b/open-vm-tools/lib/include/logFixed.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/loglevel_defs.h b/open-vm-tools/lib/include/loglevel_defs.h index 43c61ec33..f95d58ec0 100644 --- a/open-vm-tools/lib/include/loglevel_defs.h +++ b/open-vm-tools/lib/include/loglevel_defs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/loglevel_user.h b/open-vm-tools/lib/include/loglevel_user.h index 2ab1e5e85..8484ed81f 100644 --- a/open-vm-tools/lib/include/loglevel_user.h +++ b/open-vm-tools/lib/include/loglevel_user.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -74,12 +74,14 @@ LOGLEVEL_VAR(pci_xhci), \ LOGLEVEL_VAR(usb_xhci), \ LOGLEVEL_VAR(usb), \ - LOGLEVEL_VAR(vusbmouse), \ - LOGLEVEL_VAR(vusbkeyboard), \ + LOGLEVEL_VAR(vusbaudio), \ + LOGLEVEL_VAR(vusbccid), \ LOGLEVEL_VAR(vusbhid), \ + LOGLEVEL_VAR(vusbkeyboard), \ + LOGLEVEL_VAR(vusbmouse), \ LOGLEVEL_VAR(vusbtablet), \ - LOGLEVEL_VAR(vusbaudio), \ LOGLEVEL_VAR(vusbvideo),\ + LOGLEVEL_VAR(vusbrng),\ LOGLEVEL_VAR(hidQueue), \ LOGLEVEL_VAR(pci_vlance), \ LOGLEVEL_VAR(pci_svga), \ @@ -134,6 +136,7 @@ LOGLEVEL_VAR(mksCursorPosition), \ LOGLEVEL_VAR(mksBasicOps), \ LOGLEVEL_VAR(mksRenderOps), \ + LOGLEVEL_VAR(mksFrame), \ LOGLEVEL_VAR(mksGLBasic), \ LOGLEVEL_VAR(mksGLManager), \ LOGLEVEL_VAR(mksGLFBO), \ @@ -186,6 +189,7 @@ LOGLEVEL_VAR(lsilogic), \ LOGLEVEL_VAR(pvscsi), \ LOGLEVEL_VAR(ahci), \ + LOGLEVEL_VAR(nvme), \ LOGLEVEL_VAR(diskVmnix), \ LOGLEVEL_VAR(hbaCommon), \ LOGLEVEL_VAR(backdoor), \ @@ -220,6 +224,7 @@ LOGLEVEL_VAR(guest_rpc), \ LOGLEVEL_VAR(guestVars), \ LOGLEVEL_VAR(vmkEvent), \ + LOGLEVEL_VAR(authenticode), \ LOGLEVEL_VAR(battery), \ LOGLEVEL_VAR(fakeDma), \ LOGLEVEL_VAR(shader), \ @@ -251,7 +256,6 @@ LOGLEVEL_VAR(blit), /* lib/blit */ \ LOGLEVEL_VAR(vmnetBridge), \ LOGLEVEL_VAR(wifi), /* macWireless and wpa_supplicant */ \ - LOGLEVEL_VAR(pvfslib), \ LOGLEVEL_VAR(brtalk), \ LOGLEVEL_VAR(button), \ LOGLEVEL_VAR(util), \ @@ -262,12 +266,12 @@ LOGLEVEL_VAR(syncWaitQ), \ LOGLEVEL_VAR(sg), /* lib/sg */ \ LOGLEVEL_VAR(ftcpt), \ - LOGLEVEL_VAR(wrapLib), \ LOGLEVEL_VAR(digestlib), \ LOGLEVEL_VAR(inputdevtap), \ LOGLEVEL_VAR(objlib), \ LOGLEVEL_VAR(vsanobj), \ LOGLEVEL_VAR(vvolbe), \ + LOGLEVEL_VAR(upitbe), \ LOGLEVEL_VAR(svgadevtap), \ LOGLEVEL_VAR(masReceipt), /* lib/masReceipt */ \ LOGLEVEL_VAR(serviceImpl), /* lib/serviceImpl */ \ @@ -293,6 +297,11 @@ LOGLEVEL_VAR(ddecomd), \ LOGLEVEL_VAR(hostctl), \ LOGLEVEL_VAR(pmemobj), \ + LOGLEVEL_VAR(secureBoot), \ + LOGLEVEL_VAR(upitd), \ + LOGLEVEL_VAR(promotedisk), \ + LOGLEVEL_VAR(toolsIso) + /* end of list */ LOGLEVEL_EXTENSION_DECLARE(LOGLEVEL_USER); diff --git a/open-vm-tools/lib/include/memaligned.h b/open-vm-tools/lib/include/memaligned.h index 72af0412e..a72248eb7 100644 --- a/open-vm-tools/lib/include/memaligned.h +++ b/open-vm-tools/lib/include/memaligned.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/message.h b/open-vm-tools/lib/include/message.h index 243394735..9cda09ba4 100644 --- a/open-vm-tools/lib/include/message.h +++ b/open-vm-tools/lib/include/message.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1999-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1999-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/miscSolaris.h b/open-vm-tools/lib/include/miscSolaris.h index e58d91539..24ed3ac53 100644 --- a/open-vm-tools/lib/include/miscSolaris.h +++ b/open-vm-tools/lib/include/miscSolaris.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/mntinfo.h b/open-vm-tools/lib/include/mntinfo.h index 5c0c00e1a..d1c978c85 100644 --- a/open-vm-tools/lib/include/mntinfo.h +++ b/open-vm-tools/lib/include/mntinfo.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/msg.h b/open-vm-tools/lib/include/msg.h index 0f585129c..a57982e60 100644 --- a/open-vm-tools/lib/include/msg.h +++ b/open-vm-tools/lib/include/msg.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/msgList.h b/open-vm-tools/lib/include/msgList.h index 31187ac6c..4e4450288 100644 --- a/open-vm-tools/lib/include/msgList.h +++ b/open-vm-tools/lib/include/msgList.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -64,7 +64,7 @@ void MsgList_AppendStr(MsgList **tail, const char *id); void MsgList_AppendMsgList(MsgList **tail, MsgList *messages); void MsgList_Log(const MsgList *messages); -char *MsgList_ToString(const MsgList *messages); +char *MsgList_ToEnglishString(const MsgList *messages); MsgList *MsgList_Copy(const MsgList *src); void MsgList_Free(MsgList *messages); diff --git a/open-vm-tools/lib/include/msgfmt.h b/open-vm-tools/lib/include/msgfmt.h index 5739577a5..b31ddbf06 100644 --- a/open-vm-tools/lib/include/msgfmt.h +++ b/open-vm-tools/lib/include/msgfmt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/msgid.h b/open-vm-tools/lib/include/msgid.h index 9d5e493e5..3ef2bf150 100644 --- a/open-vm-tools/lib/include/msgid.h +++ b/open-vm-tools/lib/include/msgid.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/msgid_defs.h b/open-vm-tools/lib/include/msgid_defs.h index 11dd6fc05..f729e6f1a 100644 --- a/open-vm-tools/lib/include/msgid_defs.h +++ b/open-vm-tools/lib/include/msgid_defs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/mutexRank.h b/open-vm-tools/lib/include/mutexRank.h index 5dbd0a7ab..1d7eb03a7 100644 --- a/open-vm-tools/lib/include/mutexRank.h +++ b/open-vm-tools/lib/include/mutexRank.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/mutexRankLib.h b/open-vm-tools/lib/include/mutexRankLib.h index 0c392968f..e38676f2c 100644 --- a/open-vm-tools/lib/include/mutexRankLib.h +++ b/open-vm-tools/lib/include/mutexRankLib.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -78,6 +78,11 @@ */ #define RANK_filtLibAllocBitmapLock (RANK_filtLibPollLock + 1) +/* + * remoteUSB (must be < workerCmpl) + */ +#define RANK_remoteUSBGlobalLock (RANK_filtLibAllocBitmapLock + 1) + /* * workerLib default completion lock * @@ -95,8 +100,11 @@ * for queued work. * * Must be > RANK_filtLibAllocBitmapLock due to PR1437159. + * + * Must be > RANK_remoteUSBGlobalLock so that virtual CCID can wait for + * queued work. */ -#define RANK_workerLibCmplLock (RANK_filtLibAllocBitmapLock + 1) +#define RANK_workerLibCmplLock (RANK_remoteUSBGlobalLock + 1) /* * NFC lib lock @@ -112,6 +120,7 @@ * disklib and I/O related locks */ #define RANK_diskLibLock (RANK_libLockBase + 0x5001) +#define RANK_digestLibLock (RANK_libLockBase + 0x5004) #define RANK_nasPluginLock (RANK_libLockBase + 0x5007) #define RANK_nasPluginMappingLock (RANK_libLockBase + 0x5008) #define RANK_diskLibPluginLock (RANK_libLockBase + 0x5010) @@ -121,6 +130,7 @@ #define RANK_scsiStateLock (RANK_libLockBase + 0x5060) #define RANK_parInitLock (RANK_libLockBase + 0x5070) #define RANK_namespaceLock (RANK_libLockBase + 0x5080) +#define RANK_objLibInitLock (RANK_libLockBase + 0x5085) #define RANK_vvolLibLock (RANK_libLockBase + 0x5090) /* diff --git a/open-vm-tools/lib/include/netutil.h b/open-vm-tools/lib/include/netutil.h index 729405387..320cfeccd 100644 --- a/open-vm-tools/lib/include/netutil.h +++ b/open-vm-tools/lib/include/netutil.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/nicInfo.h b/open-vm-tools/lib/include/nicInfo.h index 4c90f2238..6d116e519 100644 --- a/open-vm-tools/lib/include/nicInfo.h +++ b/open-vm-tools/lib/include/nicInfo.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/panic.h b/open-vm-tools/lib/include/panic.h index 6fb81148c..460decdb8 100644 --- a/open-vm-tools/lib/include/panic.h +++ b/open-vm-tools/lib/include/panic.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/poll.h b/open-vm-tools/lib/include/poll.h index 834535ce5..54f86f43a 100644 --- a/open-vm-tools/lib/include/poll.h +++ b/open-vm-tools/lib/include/poll.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/pollImpl.h b/open-vm-tools/lib/include/pollImpl.h index 569c73dfa..bcef0460f 100644 --- a/open-vm-tools/lib/include/pollImpl.h +++ b/open-vm-tools/lib/include/pollImpl.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/posix.h b/open-vm-tools/lib/include/posix.h index af49db5c3..99b967a01 100644 --- a/open-vm-tools/lib/include/posix.h +++ b/open-vm-tools/lib/include/posix.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/preference.h b/open-vm-tools/lib/include/preference.h index bdd11eab6..5290ad1f1 100644 --- a/open-vm-tools/lib/include/preference.h +++ b/open-vm-tools/lib/include/preference.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/procMgr.h b/open-vm-tools/lib/include/procMgr.h index a33644aca..4b9ff8e2e 100644 --- a/open-vm-tools/lib/include/procMgr.h +++ b/open-vm-tools/lib/include/procMgr.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2002-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/productState.h b/open-vm-tools/lib/include/productState.h index ab7ea7de7..dbb241ae9 100644 --- a/open-vm-tools/lib/include/productState.h +++ b/open-vm-tools/lib/include/productState.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -96,6 +96,8 @@ unsigned int ProductState_GetBuildNumber(void); ProductCaps ProductState_GetCapabilities(void); const char *ProductState_GetLicenseName(void); const char *ProductState_GetLicenseVersion(void); +void ProductState_SetConfigName(const char *configName); +const char *ProductState_GetConfigName(void); /* etc */ const char *ProductState_GetCompilationOption(void); @@ -107,6 +109,9 @@ const char *ProductState_GetBundleIdentifier(void); void ProductState_GetVersionNumber(unsigned int *major, unsigned int *minor, unsigned int *patchLevel); +void ProductState_SetHelp(Product helpProduct, const char *helpVersion); +void ProductState_GetHelp(Product *helpProduct, const char **helpVersion); + char *ProductState_Serialize(ProductStateSerializationFlags flags); ProductStateSerializationFlags ProductState_Deserialize(const char *state); diff --git a/open-vm-tools/lib/include/random.h b/open-vm-tools/lib/include/random.h index 446381aa7..236e6e195 100644 --- a/open-vm-tools/lib/include/random.h +++ b/open-vm-tools/lib/include/random.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -29,13 +29,24 @@ #include "vm_basic_types.h" +/* + * OS-native random number generator based on one-way hashes. + * + * Good enough for any non-cryptographic use, but slower than + * alternative algorithms. Recommended for generating seeds. + * + * Period: infinite + * Speed: slow + */ + Bool Random_Crypto(size_t size, void *buffer); /* * High quality - research grade - random number generator. * - * Despite its apparent complexity this RNG is extremely fast. + * Period: 2^800 + * Speed: ~23 cycles */ typedef struct rqContext rqContext; @@ -44,8 +55,56 @@ rqContext *Random_QuickSeed(uint32 seed); uint32 Random_Quick(rqContext *context); +/* + * Good quality non-deterministic random number generator. + * + * This generator uses &(*state) as the seed to go beyond 64-bits without + * additional storage space; the low-grade entropy makes seeding + * non-deterministic. Multiple generators in the same address space + * with the same seed will produce unique streams, but using the same + * seed will NOT produce the same sequence (due to ASLR). See + * Raondom_FastStream for a deterministic generator. + * + * Initialize by setting *state to any seed (including zero) and calling + * Random_Fast TWICE. (Unless the seed is very good, the first two values + * are not very random). + * + * Period: 2^64 + * Speed: ~10 cycles + */ + +uint32 Random_Fast(uint64 *state); + +static INLINE void +Random_FastSeed(uint64 *state, // OUT: + uint64 seed) // IN: +{ + *state = seed; + (void) Random_Fast(state); + (void) Random_Fast(state); +} + +/* + * Good quality deterministic random number generator. + * + * Period: 2^64 + * Speed: ~10 cycles + */ + +typedef struct { + uint64 state; + uint64 sequence; +} RandomFastContext; + +uint32 Random_FastStream(RandomFastContext *rfc); +void Random_FastStreamSeed(RandomFastContext *rfc, uint64 seed, uint64 seq); + /* * Simple multiplicative congruential RNG. + * + * Deprecated; prefer Random_Fast for better quality. + * Period: 2^31-1 + * Speed: ~9 cycles */ int Random_Simple(int seed); diff --git a/open-vm-tools/lib/include/removable_device.h b/open-vm-tools/lib/include/removable_device.h index 26302722e..37961148f 100644 --- a/open-vm-tools/lib/include/removable_device.h +++ b/open-vm-tools/lib/include/removable_device.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/rpcin.h b/open-vm-tools/lib/include/rpcin.h index c3c573f94..64b815514 100644 --- a/open-vm-tools/lib/include/rpcin.h +++ b/open-vm-tools/lib/include/rpcin.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/rpcout.h b/open-vm-tools/lib/include/rpcout.h index 654de9434..8730bfcec 100644 --- a/open-vm-tools/lib/include/rpcout.h +++ b/open-vm-tools/lib/include/rpcout.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -51,7 +51,7 @@ RpcOut *RpcOut_Construct(void); void RpcOut_Destruct(RpcOut *out); Bool RpcOut_start(RpcOut *out); Bool RpcOut_send(RpcOut *out, char const *request, size_t reqLen, - char const **reply, size_t *repLen); + Bool *rpcStatus, char const **reply, size_t *repLen); Bool RpcOut_stop(RpcOut *out); diff --git a/open-vm-tools/lib/include/rpcvmx.h b/open-vm-tools/lib/include/rpcvmx.h index d30c074aa..8fa6d1dbb 100644 --- a/open-vm-tools/lib/include/rpcvmx.h +++ b/open-vm-tools/lib/include/rpcvmx.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/safetime.h b/open-vm-tools/lib/include/safetime.h index 85e2e2f39..fca72bc73 100644 --- a/open-vm-tools/lib/include/safetime.h +++ b/open-vm-tools/lib/include/safetime.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/sha1.h b/open-vm-tools/lib/include/sha1.h index 90df36190..c6cbf1af6 100644 --- a/open-vm-tools/lib/include/sha1.h +++ b/open-vm-tools/lib/include/sha1.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -119,6 +119,17 @@ void SHA1Final(unsigned char digest[SHA1_HASH_LEN], SHA1_CTX* context); void SHA1RawBufferHash(const void *data, uint32 size, uint32 result[5]); +void SHA1RawTransformBlocks(uint32 state[5], + const unsigned char *buffer, + uint32 numBlocks); +void SHA1RawInit(uint32 state[5]); + +#define SHA1_MULTI_MAX_BUFFERS 8 + +void SHA1MultiBuffer(uint32 numBuffers, + uint32 len, + const void *data[], + unsigned char *digests[]); #endif // defined __APPLE__ && defined USERLEVEL diff --git a/open-vm-tools/lib/include/sigPosixRegs.h b/open-vm-tools/lib/include/sigPosixRegs.h index 08ee2c6ee..81df2aaba 100644 --- a/open-vm-tools/lib/include/sigPosixRegs.h +++ b/open-vm-tools/lib/include/sigPosixRegs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -142,6 +142,11 @@ #define SC_SP(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__sp) #define SC_LR(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__lr) #define SC_PC(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__pc) +#elif defined(__aarch64__) +#define SC_X(uc,n) ((unsigned long) (uc)->uc_mcontext->__ss.__x[n]) +#define SC_SP(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__sp) +#define SC_PC(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__pc) +#define SC_PSR(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__cpsr) #else #define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__eax) #define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext->__ss.__ebx) @@ -274,6 +279,7 @@ #define SC_X(uc,n) ((unsigned long) (uc)->uc_mcontext.regs[n]) #define SC_SP(uc) ((unsigned long) (uc)->uc_mcontext.sp) #define SC_PC(uc) ((unsigned long) (uc)->uc_mcontext.pc) +#define SC_PSR(uc) ((unsigned long) (uc)->uc_mcontext.pstate) #else #define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EAX]) #define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EBX]) diff --git a/open-vm-tools/lib/include/slashProc.h b/open-vm-tools/lib/include/slashProc.h index 79da6e71f..e6c8dcdb5 100644 --- a/open-vm-tools/lib/include/slashProc.h +++ b/open-vm-tools/lib/include/slashProc.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/sslDirect.h b/open-vm-tools/lib/include/sslDirect.h index a635983ca..88abacb65 100644 --- a/open-vm-tools/lib/include/sslDirect.h +++ b/open-vm-tools/lib/include/sslDirect.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -59,5 +59,7 @@ int SSL_WantRead(const SSLSock ssl); #define SSLGeneric_close(sock) close(sock) #endif +void *SSL_NewContext(void); + #endif // ifndef _SSLDIRECT_H_ diff --git a/open-vm-tools/lib/include/str.h b/open-vm-tools/lib/include/str.h index e6c50a656..fa015041e 100644 --- a/open-vm-tools/lib/include/str.h +++ b/open-vm-tools/lib/include/str.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/strutil.h b/open-vm-tools/lib/include/strutil.h index 0ce50b0f3..7ebcaeb5f 100644 --- a/open-vm-tools/lib/include/strutil.h +++ b/open-vm-tools/lib/include/strutil.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -69,4 +69,6 @@ void StrUtil_SafeStrcatF(char **prefix, const char *fmt, ...) PRINTF_DECL(2, 3); char *StrUtil_TrimWhitespace(const char *str); +char *StrUtil_ReplaceAll(const char *orig, const char *what, const char *with); + #endif /* STRUTIL_H */ diff --git a/open-vm-tools/lib/include/su.h b/open-vm-tools/lib/include/su.h index 500c16a5c..f7b9161c3 100644 --- a/open-vm-tools/lib/include/su.h +++ b/open-vm-tools/lib/include/su.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/syncDriver.h b/open-vm-tools/lib/include/syncDriver.h index 55871c1d7..92452a236 100644 --- a/open-vm-tools/lib/include/syncDriver.h +++ b/open-vm-tools/lib/include/syncDriver.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/syncDriverIoc.h b/open-vm-tools/lib/include/syncDriverIoc.h index 790fd8e12..55dc07e10 100644 --- a/open-vm-tools/lib/include/syncDriverIoc.h +++ b/open-vm-tools/lib/include/syncDriverIoc.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/syncEvent.h b/open-vm-tools/lib/include/syncEvent.h index 15bcc5935..7d21f542d 100644 --- a/open-vm-tools/lib/include/syncEvent.h +++ b/open-vm-tools/lib/include/syncEvent.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/system.h b/open-vm-tools/lib/include/system.h index d91f26fe0..785140172 100644 --- a/open-vm-tools/lib/include/system.h +++ b/open-vm-tools/lib/include/system.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/timeutil.h b/open-vm-tools/lib/include/timeutil.h index 536db8ba9..15c5124ce 100644 --- a/open-vm-tools/lib/include/timeutil.h +++ b/open-vm-tools/lib/include/timeutil.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/tracer.hh b/open-vm-tools/lib/include/tracer.hh index f8d0d44f0..b481a2a6d 100644 --- a/open-vm-tools/lib/include/tracer.hh +++ b/open-vm-tools/lib/include/tracer.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/unicode.h b/open-vm-tools/lib/include/unicode.h index d1fdf4d69..bd24b17f4 100644 --- a/open-vm-tools/lib/include/unicode.h +++ b/open-vm-tools/lib/include/unicode.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/unicodeBase.h b/open-vm-tools/lib/include/unicodeBase.h index 0cffbe336..101507e01 100644 --- a/open-vm-tools/lib/include/unicodeBase.h +++ b/open-vm-tools/lib/include/unicodeBase.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -80,8 +80,8 @@ extern "C" { */ char *Unicode_AllocWithLength(const void *buffer, - ssize_t lengthInBytes, - StringEncoding encoding); + ssize_t lengthInBytes, + StringEncoding encoding); /* @@ -174,9 +174,10 @@ Unicode_AllocWithUTF16(const utf16_t *utf16String) // IN char *Unicode_Duplicate(const char *str); char **Unicode_AllocList(char **srcList, ssize_t length, - StringEncoding encoding); + StringEncoding encoding); -char **Unicode_GetAllocList(char *const srcList[], ssize_t length, +char **Unicode_GetAllocList(char *const srcList[], + ssize_t length, StringEncoding encoding); /* @@ -209,7 +210,8 @@ Unicode_AllocListWithUTF16(utf16_t **utf16list, // IN: /* * Compute the number of bytes in a string. */ -ssize_t Unicode_LengthInBytes(const void *buffer, StringEncoding encoding); +ssize_t Unicode_LengthInBytes(const void *buffer, + StringEncoding encoding); /* * Gets the number of UTF-16 code units in the NUL-terminated UTF-16 array. @@ -228,6 +230,8 @@ Bool Unicode_IsBufferValid(const void *buffer, ssize_t lengthInBytes, StringEncoding encoding); +Bool Unicode_IsStringValidUTF8(const char *str); + /* * Tests if the buffer's unicode contents can be converted to the * specified encoding. diff --git a/open-vm-tools/lib/include/unicodeICU.h b/open-vm-tools/lib/include/unicodeICU.h index 1bf9bd075..464af2a54 100644 --- a/open-vm-tools/lib/include/unicodeICU.h +++ b/open-vm-tools/lib/include/unicodeICU.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/unicodeOperations.h b/open-vm-tools/lib/include/unicodeOperations.h index a69661024..e60e78883 100644 --- a/open-vm-tools/lib/include/unicodeOperations.h +++ b/open-vm-tools/lib/include/unicodeOperations.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/unicodeTransforms.h b/open-vm-tools/lib/include/unicodeTransforms.h index b7d2a4096..6db21b102 100644 --- a/open-vm-tools/lib/include/unicodeTransforms.h +++ b/open-vm-tools/lib/include/unicodeTransforms.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/unicodeTypes.h b/open-vm-tools/lib/include/unicodeTypes.h index ca2b69061..10b5aa95f 100644 --- a/open-vm-tools/lib/include/unicodeTypes.h +++ b/open-vm-tools/lib/include/unicodeTypes.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/userlock.h b/open-vm-tools/lib/include/userlock.h index 70e93978e..3b3abb009 100644 --- a/open-vm-tools/lib/include/userlock.h +++ b/open-vm-tools/lib/include/userlock.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/util.h b/open-vm-tools/lib/include/util.h index 2e1d4deed..01638b782 100644 --- a/open-vm-tools/lib/include/util.h +++ b/open-vm-tools/lib/include/util.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -95,7 +95,6 @@ char *Util_CompatGetLowerCaseCanonicalPath(const char* path); int Util_BumpNoFds(uint32 *cur, uint32 *wanted); Bool Util_CanonicalPathsIdentical(const char *path1, const char *path2); Bool Util_IsAbsolutePath(const char *path); -unsigned Util_GetPrime(unsigned n0); Util_ThreadID Util_GetCurrentThreadId(void); char *Util_DeriveFileName(const char *source, @@ -168,13 +167,9 @@ Bool Util_QueryCStResidency(uint32 *numCpus, uint32 *numCStates, uint64 **transTime, uint64 **residTime); #endif -/* - * In util_shared.h - */ #define UTIL_FASTRAND_SEED_MAX (0x7fffffff) Bool Util_Throttle(uint32 count); uint32 Util_FastRand(uint32 seed); -uint64 Util_CheckSum64(uint32 *data, unsigned numWords); // Not thread safe! void Util_OverrideHomeDir(const char *path); diff --git a/open-vm-tools/lib/include/util_shared.h b/open-vm-tools/lib/include/util_shared.h deleted file mode 100644 index a061f1199..000000000 --- a/open-vm-tools/lib/include/util_shared.h +++ /dev/null @@ -1,198 +0,0 @@ -/********************************************************* - * Copyright (C) 2002-2015 VMware, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - *********************************************************/ - -#define INCLUDE_ALLOW_USERLEVEL - -#define INCLUDE_ALLOW_VMCORE -#define INCLUDE_ALLOW_VMKERNEL -#include "includeCheck.h" - -#include "vm_assert.h" -#include "vm_basic_types.h" - -/* - * Defines util functions shared between the userlevel code and the monitor. - */ - -/* - *---------------------------------------------------------------------- - * - * Util_Throttle -- - * - * Use for throttling of warnings. - * - * Results: - * Will return TRUE for an increasingly sparse set of counter values: - * 1, 2, ..., 100, 200, 300, ..., 10000, 20000, 30000, ..., . - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -Bool -Util_Throttle(uint32 count) // IN: -{ - return count < 100 || - (count < 10000 && count % 100 == 0) || - (count < 1000000 && count % 10000 == 0) || - count % 1000000 == 0; -} - - -/* - *---------------------------------------------------------------------- - * - * Util_FastRand -- - * - * Generates the next random number in the pseudo-random sequence - * defined by the multiplicative linear congruential generator - * S' = 16807 * S mod (2^31 - 1). - * This is the ACM "minimal standard random number generator". - * Based on method described by D.G. Carta in CACM, January 1990. - * Usage: provide previous random number as the seed for next one. - * - * Precondition: - * 0 < seed && seed < UTIL_FASTRAND_SEED_MAX - * - * Results: - * A random number. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -uint32 -Util_FastRand(uint32 seed) -{ - uint64 product = 33614 * (uint64)seed; - uint32 product_lo = (uint32)(product & 0xffffffff) >> 1; - uint32 product_hi = product >> 32; - int32 test = product_lo + product_hi; - - ASSERT(0 < seed && seed < UTIL_FASTRAND_SEED_MAX); - - return (test > 0) ? test : (test & UTIL_FASTRAND_SEED_MAX) + 1; -} - - -/* - *---------------------------------------------------------------------- - * Util_Checksum64 -- - * 64-bit implementation of Fletcher's checksum. Fast and simple. - * Guarantees a non-zero checksum (so 0 can mean "uninitialized"). - * One known weakness is that the 32-bit value of 0 is - * indistinguishable from ~0. The magic number 92680 was computed - * to be the most iterations before sum2 could overflow 64 bits. - *---------------------------------------------------------------------- - */ -uint64 -Util_CheckSum64(uint32 *data, unsigned numWords) -{ - uint64 sum1 = 0xffffffff, sum2 = 0xffffffff; - - while (numWords > 0) { - unsigned tlen = numWords > 92680 ? 92680 : numWords; - numWords -= tlen; - do { - sum1 += *data++; - sum2 += sum1; - } while (--tlen > 0); - sum1 = (sum1 & 0xffffffff) + (sum1 >> 32); - sum2 = (sum2 & 0xffffffff) + (sum2 >> 32); - } - /* Second reduction step to reduce sums to 32 bits */ - sum1 = (sum1 & 0xffffffff) + (sum1 >> 32); - sum2 = (sum2 & 0xffffffff) + (sum2 >> 32); - return (sum2 << 32) | sum1; -} - - -#if defined(USERLEVEL) || defined(VMX86_DEBUG) -static uint32 crcTable[256]; - -static void -UtilCRCMakeTable(void) -{ - uint32 c; - int n, k; - - for (n = 0; n < 256; n++) { - c = (uint32) n; - for (k = 0; k < 8; k++) { - if (c & 1) { - c = 0xedb88320L ^ (c >> 1); - } else { - c = c >> 1; - } - } - crcTable[n] = c; - } -} - -static INLINE_SINGLE_CALLER uint32 -UtilCRCUpdate(uint32 crc, - const uint8 *buf, - int len) -{ - uint32 c = crc; - int n; - static int crcTableComputed = 0; - - if (!crcTableComputed) { - UtilCRCMakeTable(); - - crcTableComputed = 1; - } - - for (n = 0; n < len; n++) { - c = crcTable[(c ^ buf[n]) & 0xff] ^ (c >> 8); - } - - return c; -} - - -/* - *---------------------------------------------------------------------- - * - * CRC_Compute -- - * - * computes the CRC of a block of data - * - * Results: - * - * CRC code - * - * Side effects: - * Sets up the crc table if it hasn't already been computed. - * - *---------------------------------------------------------------------- - */ - -uint32 -CRC_Compute(const uint8 *buf, - int len) -{ - return UtilCRCUpdate(0xffffffffL, buf, len) ^ 0xffffffffL; -} - -#endif /* defined (USERLEVEL) || defined(VMX86_DEBUG) */ diff --git a/open-vm-tools/lib/include/uuid.h b/open-vm-tools/lib/include/uuid.h index cad5de3e1..53b4968aa 100644 --- a/open-vm-tools/lib/include/uuid.h +++ b/open-vm-tools/lib/include/uuid.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -35,7 +35,17 @@ extern "C"{ #define UUID_SIZE 16 #define UUID_STRSIZE (2*UUID_SIZE + 1) -#define UUID_MAXLEN 48 +#define UUID_MAXLEN 48 + +/* + * ISO 11578 (now X.667 section 6.4) defines the canonical text format of a + * UUID, which looks like this example: + * + * "f81d4fae-7dec-11d0-a765-00a0c91e6bf6" + * + * It is always precisely 36 characters long (excluding terminating NUL). + */ +#define UUID_ISO_11578_LEN 36 typedef enum { UUID_WITH_PATH = 0, @@ -135,7 +145,7 @@ EFIGUID; Bool UUID_ConvertToBin(uint8 dest_id[UUID_SIZE], const char *text); char *UUID_ConvertToText(const uint8 id[UUID_SIZE]); - +void UUID_ConvertToTextBuf(const uint8 id[UUID_SIZE], char *buffer, size_t len); char *UUID_Create(const char *configFileFullPath, int schemeControl); char *UUID_CreateRandom(void); void UUID_CreateRandomRFC4122V4(UUIDRFC4122 *id); diff --git a/open-vm-tools/lib/include/vix.h b/open-vm-tools/lib/include/vix.h index ffcf5d421..bfb3f9e71 100644 --- a/open-vm-tools/lib/include/vix.h +++ b/open-vm-tools/lib/include/vix.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vixCommands.h b/open-vm-tools/lib/include/vixCommands.h index 5be7a121a..b25ce416c 100644 --- a/open-vm-tools/lib/include/vixCommands.h +++ b/open-vm-tools/lib/include/vixCommands.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vixOpenSource.h b/open-vm-tools/lib/include/vixOpenSource.h index 2a4b75068..f03cdfb7c 100644 --- a/open-vm-tools/lib/include/vixOpenSource.h +++ b/open-vm-tools/lib/include/vixOpenSource.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmGuestLib.h b/open-vm-tools/lib/include/vmGuestLib.h index 825cd1752..b83f43cda 100644 --- a/open-vm-tools/lib/include/vmGuestLib.h +++ b/open-vm-tools/lib/include/vmGuestLib.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2008 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -469,7 +469,17 @@ VMGuestLib_StatGet(const char *encoding, // IN const char *stat, // IN char **reply, // OUT size_t *replySize); // OUT +/* + * To avoid a use after free error in SWIG-generated code, it is + * necessary to present SWIG with a modified function prototype + * for VMGuestLib_StatFree in which reply is of type "void *" + * rather than "char *." + */ +#ifndef SWIG void VMGuestLib_StatFree(char *reply, size_t replySize); +#else +void VMGuestLib_StatFree(void *reply, size_t replySize); +#endif #ifdef __cplusplus } diff --git a/open-vm-tools/lib/include/vmSessionId.h b/open-vm-tools/lib/include/vmSessionId.h index 61df38892..ec5146e71 100644 --- a/open-vm-tools/lib/include/vmSessionId.h +++ b/open-vm-tools/lib/include/vmSessionId.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_api.h b/open-vm-tools/lib/include/vm_api.h index a2695771c..9a59fef91 100644 --- a/open-vm-tools/lib/include/vm_api.h +++ b/open-vm-tools/lib/include/vm_api.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_assert.h b/open-vm-tools/lib/include/vm_assert.h index 6223b2874..5a5c05976 100644 --- a/open-vm-tools/lib/include/vm_assert.h +++ b/open-vm-tools/lib/include/vm_assert.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_atomic.h b/open-vm-tools/lib/include/vm_atomic.h index 187a0d148..66be7b800 100644 --- a/open-vm-tools/lib/include/vm_atomic.h +++ b/open-vm-tools/lib/include/vm_atomic.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -526,7 +526,63 @@ typedef struct Atomic_Bool { } Atomic_Bool; /* The ARM team can come along and add the code real soon now */ +#if defined(VM_ARM_32) || defined(VM_ARM_64) extern Bool AtomicUndefinedOnARM(void); +MY_ASSERTS(ARM64_BOOL_SIZE, + ASSERT_ON_COMPILE(sizeof(Atomic_Bool) == sizeof(uint8)); + ) +#endif + +#if defined VMKERNEL || defined VMM || defined VM_ARM_64 +/* + *----------------------------------------------------------------------------- + * + * CMPXCHG1B -- + * + * Compare and exchange a single byte. + * + * Results: + * The value read from ptr. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ +static INLINE uint8 +CMPXCHG1B(volatile uint8 *ptr, // IN/OUT + uint8 oldVal, // IN + uint8 newVal) // IN +{ + uint8 val; + +#if defined(VM_ARM_64) + register uint32 failed; + + __asm__ __volatile__ ( + " dmb sy \n\t" + "1: ldxrb %w0, [%2] \n\t" + " cmp %w0, %w3, UXTB \n\t" + " b.ne 2f \n\t" + " stxrb %w1, %w4, [%2] \n\t" + " cbnz %w1, 1b \n\t" + "2: clrex \n\t" + " dmb sy \n\t" + : "=&r" (val), "=&r" (failed) + : "r" (ptr), "r" (oldVal), "r" (newVal) + : "cc", "memory"); +#else + __asm__ __volatile__("lock; cmpxchgb %b2, %1" + : "=a" (val), + "+m" (*ptr) + : "r" (newVal), + "0" (oldVal) + : "cc"); + +#endif /* defined(VM_ARM_64) */ + return val; +} +#endif /* *----------------------------------------------------------------------------- @@ -549,8 +605,15 @@ Atomic_ReadBool(Atomic_Bool const *var) // IN: { Bool val; -#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) +#if defined(__GNUC__) && defined(VM_ARM_32) val = AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && defined(VM_ARM_64) + __asm__ __volatile__ ( + "ldrb %w0, [%1]" + : "=r" (val) + : "r" (&var->value) + ); + #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ __volatile__( "movb %1, %0" @@ -587,8 +650,25 @@ static INLINE Bool Atomic_ReadWriteBool(Atomic_Bool *var, // IN/OUT: Bool val) // IN: { -#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) +#if defined(__GNUC__) && defined(VM_ARM_32) return AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && defined(VM_ARM_64) + register Bool retVal; + register uint32 failed; + + __asm__ __volatile__( + " dmb sy \n\t" + "1: ldxrb %w0, [%2] \n\t" + " stxrb %w1, %w3, [%2] \n\t" + " cbnz %w1, 1b \n\t" + " dmb sy \n\t" + : "=&r" (retVal), "=&r" (failed) + : "r" (&var->value), "r" (val) + : "memory" + ); + + return retVal; + #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ __volatile__( "xchgb %0, %1" @@ -637,8 +717,10 @@ static INLINE void Atomic_WriteBool(Atomic_Bool *var, // IN/OUT: Bool val) // IN: { -#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) +#if defined(__GNUC__) && defined(VM_ARM_32) AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && defined(VM_ARM_64) + Atomic_ReadWriteBool(var, val); #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ __volatile__( "movb %1, %0" @@ -674,8 +756,10 @@ Atomic_ReadIfEqualWriteBool(Atomic_Bool *var, // IN/OUT: Bool oldVal, // IN: Bool newVal) // IN: { -#if defined(__GNUC__) && (defined(VM_ARM_32) || defined(VM_ARM_64)) +#if defined(__GNUC__) && defined(VM_ARM_32) return AtomicUndefinedOnARM(); +#elif defined(__GNUC__) && defined(VM_ARM_64) + return (Bool)CMPXCHG1B((volatile uint8 *)&var->value, oldVal, newVal); #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) Bool val; @@ -1871,41 +1955,6 @@ Atomic_ReadDec32(Atomic_uint32 *var) // IN/OUT } -#if defined VMKERNEL || defined VMM -#if !defined(VM_ARM_64) -/* - *----------------------------------------------------------------------------- - * - * CMPXCHG1B -- - * - * Compare and exchange a single byte. - * - * Results: - * The value read from ptr. - * - * Side effects: - * None - * - *----------------------------------------------------------------------------- - */ -static INLINE uint8 -CMPXCHG1B(volatile uint8 *ptr, // IN/OUT - uint8 oldVal, // IN - uint8 newVal) // IN -{ - uint8 val; - __asm__ __volatile__("lock; cmpxchgb %b2, %1" - : "=a" (val), - "+m" (*ptr) - : "r" (newVal), - "0" (oldVal) - : "cc"); - return val; -} -#endif /* !defined(VM_ARM_64) */ -#endif - - /* * Usage of this helper struct is strictly reserved to the following * function. --hpreg diff --git a/open-vm-tools/lib/include/vm_basic_asm.h b/open-vm-tools/lib/include/vm_basic_asm.h index e00109b09..88b3f08ab 100644 --- a/open-vm-tools/lib/include/vm_basic_asm.h +++ b/open-vm-tools/lib/include/vm_basic_asm.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -687,7 +687,7 @@ static INLINE uint16 Bswap16(uint16 v) { #if defined(VM_ARM_64) - __asm__("rev16 %0, %0" : "+r"(v)); + __asm__("rev16 %w0, %w0" : "+r"(v)); return v; #else return ((v >> 8) & 0x00ff) | ((v << 8) & 0xff00); @@ -720,7 +720,7 @@ Bswap32(uint32 v) // IN __asm__("rev %0, %0" : "+r"(v)); return v; #elif defined(VM_ARM_64) - __asm__("rev32 %0, %0" : "+r"(v)); + __asm__("rev32 %x0, %x0" : "+r"(v)); return v; #else return (v >> 24) diff --git a/open-vm-tools/lib/include/vm_basic_asm_x86.h b/open-vm-tools/lib/include/vm_basic_asm_x86.h index 745c483b5..ff42ccbe8 100644 --- a/open-vm-tools/lib/include/vm_basic_asm_x86.h +++ b/open-vm-tools/lib/include/vm_basic_asm_x86.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_basic_asm_x86_64.h b/open-vm-tools/lib/include/vm_basic_asm_x86_64.h index cc882adaa..c8619d7de 100644 --- a/open-vm-tools/lib/include/vm_basic_asm_x86_64.h +++ b/open-vm-tools/lib/include/vm_basic_asm_x86_64.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_basic_defs.h b/open-vm-tools/lib/include/vm_basic_defs.h index 81c5e218d..4d9c70fd0 100644 --- a/open-vm-tools/lib/include/vm_basic_defs.h +++ b/open-vm-tools/lib/include/vm_basic_defs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -338,6 +338,22 @@ Max(int a, int b) #define VM_PAE_LARGE_2_SMALL_PAGES (BYTES_2_PAGES(VM_PAE_LARGE_PAGE_SIZE)) #endif +#ifndef VM_1GB_PAGE_SHIFT +#define VM_1GB_PAGE_SHIFT 30 +#endif + +#ifndef VM_1GB_PAGE_SIZE +#define VM_1GB_PAGE_SIZE (1 << VM_1GB_PAGE_SHIFT) +#endif + +#ifndef VM_1GB_2_PAGES +#define VM_1GB_2_PAGES (BYTES_2_PAGES(VM_1GB_PAGE_SIZE)) +#endif + +#ifndef VM_1GB_2_PDIRS +#define VM_1GB_2_PDIRS (VM_1GB_PAGE_SIZE / VM_PAE_LARGE_PAGE_SIZE) +#endif + /* * Word operations */ @@ -820,6 +836,7 @@ typedef int pid_t; #define SIZE_80BIT 10 #define SIZE_128BIT 16 #define SIZE_256BIT 32 +#define SIZE_512BIT 64 #endif // ifndef _VM_BASIC_DEFS_H_ diff --git a/open-vm-tools/lib/include/vm_basic_math.h b/open-vm-tools/lib/include/vm_basic_math.h index 862f21f42..23cc4ab10 100644 --- a/open-vm-tools/lib/include/vm_basic_math.h +++ b/open-vm-tools/lib/include/vm_basic_math.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_basic_types.h b/open-vm-tools/lib/include/vm_basic_types.h index f5e639f65..9930fa88d 100644 --- a/open-vm-tools/lib/include/vm_basic_types.h +++ b/open-vm-tools/lib/include/vm_basic_types.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -351,6 +351,19 @@ typedef uint32 uintptr_t; #endif +#if defined(__GNUC__) && defined(__SIZEOF_INT128__) + +typedef unsigned __int128 uint128; +typedef __int128 int128; + +#define MIN_INT128 ((int128)1 << 127) +#define MAX_INT128 (~MIN_INT128) +#define MIN_UINT128 ((uint128)0) +#define MAX_UINT128 (~MIN_UINT128) + +#endif + + /* * Time * XXX These should be cleaned up. -- edward @@ -392,14 +405,7 @@ typedef int64 VmTimeVirtualClock; /* Virtual Clock kept in CPU cycles */ #define FMTH "" #elif __GNUC__ #define FMTH "" - #if defined(N_PLAT_NLM) || defined(sun) || \ - (defined(__FreeBSD__) && (__FreeBSD__ + 0) && ((__FreeBSD__ + 0) < 5)) - /* - * Why (__FreeBSD__ + 0)? See bug 141008. - * Yes, we really need to test both (__FreeBSD__ + 0) and - * ((__FreeBSD__ + 0) < 5). No, we can't remove "+ 0" from - * ((__FreeBSD__ + 0) < 5). - */ + #if defined(N_PLAT_NLM) || defined(sun) #if defined(VM_X86_64) || defined(VM_ARM_64) #define FMTSZ "l" #define FMTPD "l" @@ -407,7 +413,8 @@ typedef int64 VmTimeVirtualClock; /* Virtual Clock kept in CPU cycles */ #define FMTSZ "" #define FMTPD "" #endif - #elif defined(__linux__) \ + #elif defined(__linux__) || \ + (defined(__FreeBSD__) && (__FreeBSD__ + 0))\ || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) \ || (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) \ || (defined(_POSIX2_VERSION) && _POSIX2_VERSION >= 200112L) diff --git a/open-vm-tools/lib/include/vm_compilation_options.h b/open-vm-tools/lib/include/vm_compilation_options.h index 927c5ce86..d2c818db4 100644 --- a/open-vm-tools/lib/include/vm_compilation_options.h +++ b/open-vm-tools/lib/include/vm_compilation_options.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_ctype.h b/open-vm-tools/lib/include/vm_ctype.h index bc4b02dcb..473fd31f8 100644 --- a/open-vm-tools/lib/include/vm_ctype.h +++ b/open-vm-tools/lib/include/vm_ctype.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_device_version.h b/open-vm-tools/lib/include/vm_device_version.h index d9d0dacdc..b8510b0f2 100644 --- a/open-vm-tools/lib/include/vm_device_version.h +++ b/open-vm-tools/lib/include/vm_device_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998,2005-2012,2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998,2005-2012,2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -74,6 +74,7 @@ #define PCI_DEVICE_ID_VMWARE_PVSCSI 0x07C0 #define PCI_DEVICE_ID_VMWARE_82574 0x07D0 #define PCI_DEVICE_ID_VMWARE_AHCI 0x07E0 +#define PCI_DEVICE_ID_VMWARE_NVME 0x07F0 #define PCI_DEVICE_ID_VMWARE_HDAUDIO_CODEC 0x1975 #define PCI_DEVICE_ID_VMWARE_HDAUDIO_CONTROLLER 0x1977 @@ -118,7 +119,7 @@ * Intel 82545EM (e1000, server adapter, single port) * Intel 82546EB (e1000, server adapter, dual port) * Intel HECI (as embedded in ich9m) - * Intel XHCI (as embedded in PANTHERPOINT) + * Intel XHCI (Panther Point / Intel 7 Series) */ #define PCI_VENDOR_ID_INTEL 0x8086 #define PCI_DEVICE_ID_INTEL_82439TX 0x7100 @@ -136,6 +137,11 @@ #define PCI_DEVICE_ID_INTEL_HECI 0x2a74 #define PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI 0x1e31 +/* From drivers/usb/host/xhci-pci.c: + * Intel XHCI (Lynx Point / Intel 8 Series) + */ +#define PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI 0x8c31 + #define E1000E_PCI_DEVICE_ID_CONFIG_STR "e1000e.pci.deviceID" #define E1000E_PCI_SUB_VENDOR_ID_CONFIG_STR "e1000e.pci.subVendorID" #define E1000E_PCI_SUB_DEVICE_ID_CONFIG_STR "e1000e.pci.subDeviceID" @@ -193,6 +199,13 @@ #define SCSI_CDROM_VENDOR_NAME COMPANY_NAME #define SCSI_CDROM_REV_LEVEL "1.0" +/************* NVME implementation limits ********************************/ +#define NVME_MAX_CONTROLLERS 4 +#define NVME_MIN_NAMESPACES 1 +#define NVME_MAX_NAMESPACES 15 /* We support only 15 namespaces same + * as SCSI devices. + */ + /************* SCSI implementation limits ********************************/ #define SCSI_MAX_CONTROLLERS 4 // Need more than 1 for MSCS clustering #define SCSI_MAX_DEVICES 16 // BT-958 emulates only 16 @@ -213,6 +226,7 @@ #define MAX_NUM_DISKS \ ((SATA_MAX_CONTROLLERS * SATA_MAX_DEVICES) + \ (SCSI_MAX_CONTROLLERS * SCSI_MAX_DEVICES) + \ + (NVME_MAX_CONTROLLERS * NVME_MAX_NAMESPACES) + \ (IDE_NUM_INTERFACES * IDE_DRIVES_PER_IF)) /* @@ -223,7 +237,17 @@ #define SCSI_IDE_CHANNEL SCSI_MAX_CONTROLLERS #define SCSI_IDE_HOSTED_CHANNEL (SCSI_MAX_CONTROLLERS + 1) #define SCSI_SATA_CHANNEL_FIRST (SCSI_IDE_HOSTED_CHANNEL + 1) -#define SCSI_MAX_CHANNELS (SCSI_SATA_CHANNEL_FIRST + SATA_MAX_CONTROLLERS) +#define SCSI_NVME_CHANNEL_FIRST (SCSI_SATA_CHANNEL_FIRST + \ + SATA_MAX_CONTROLLERS) +#define SCSI_MAX_CHANNELS (SCSI_NVME_CHANNEL_FIRST + \ + NVME_MAX_CONTROLLERS) + +/************* SCSI-NVME channel IDs *******************************/ +#define NVME_ID_TO_SCSI_ID(nvmeId) \ + (SCSI_NVME_CHANNEL_FIRST + (nvmeId)) + +#define SCSI_ID_TO_NVME_ID(scsiId) \ + ((scsiId) - SCSI_NVME_CHANNEL_FIRST) /************* SCSI-SATA channel IDs********************************/ #define SATA_ID_TO_SCSI_ID(sataId) \ @@ -259,6 +283,7 @@ #define MAX_USB_DEVICES_PER_HOST_CONTROLLER 127 /************* NVDIMM implementation limits ********************************/ +#define NVDIMM_MAX_CONTROLLERS 1 #define MAX_NVDIMM 64 /************* vRDMA implementation limits ******************************/ diff --git a/open-vm-tools/lib/include/vm_legal.h b/open-vm-tools/lib/include/vm_legal.h index 56affb5fb..97debde8c 100644 --- a/open-vm-tools/lib/include/vm_legal.h +++ b/open-vm-tools/lib/include/vm_legal.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -36,7 +36,7 @@ * The following strings may be incorporated into MSGID strings. Updating * them therefore may require updating translations and vmsg auditing files. */ -#define COPYRIGHT_YEARS "1998-2015" +#define COPYRIGHT_YEARS "1998-2016" #define COPYRIGHT_STRING "Copyright (C) " COPYRIGHT_YEARS " " COMPANY_NAME #define RIGHT_RESERVED "All rights reserved." diff --git a/open-vm-tools/lib/include/vm_procps.h b/open-vm-tools/lib/include/vm_procps.h index 9cae37319..73c771942 100644 --- a/open-vm-tools/lib/include/vm_procps.h +++ b/open-vm-tools/lib/include/vm_procps.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_product.h b/open-vm-tools/lib/include/vm_product.h index a18227588..7819ab8e6 100644 --- a/open-vm-tools/lib/include/vm_product.h +++ b/open-vm-tools/lib/include/vm_product.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -69,7 +69,7 @@ #define PRODUCT_MAC_DESKTOP_BRIEF_NAME "Fusion" #define PRODUCT_ACE_MANAGEMENT_SERVER_BRIEF_NAME "ACE Management Server" #define PRODUCT_VMRC_BRIEF_NAME "Remote Console" -#define PRODUCT_GANTRY_BRIEF_NAME "Gantry" +#define PRODUCT_GANTRY_BRIEF_NAME "AppCatalyst" /* @@ -151,8 +151,6 @@ #define PRODUCT_XVP_NAME MAKE_NAME("vCenter XVP Manager") #define PRODUCT_RMKSCONTAINER_NAME MAKE_NAME("Remote MKS Container") -#define PRODUCT_BOOMERANG_NAME MAKE_NAME("Boomerang") - #define PRODUCT_HBR_SERVER_NAME MAKE_NAME("vSphere Replication Server") #define PRODUCT_VIEW_SHORT_NAME "Horizon View" @@ -221,7 +219,6 @@ || defined(VMX86_DDK) \ || defined(VMX86_VDDK) \ || defined(VMX86_NETDUMP) \ - || defined(VMX86_BOOMERANG) \ || defined(VMX86_HBR_SERVER) \ || defined(VMX86_VMCF) \ || defined(VMX86_GANTRY) \ @@ -300,8 +297,6 @@ # define PRODUCT_SHORT_NAME PRODUCT_VDDK_NAME #elif defined(VMX86_NETDUMP) # define PRODUCT_SHORT_NAME PRODUCT_NETDUMP_NAME -#elif defined(VMX86_BOOMERANG) -# define PRODUCT_SHORT_NAME PRODUCT_BOOMERANG_NAME #elif defined(VMX86_HBR_SERVER) # define PRODUCT_SHORT_NAME PRODUCT_HBR_SERVER_NAME #elif defined(VMX86_HORIZON_VIEW) @@ -402,7 +397,10 @@ * product. */ # if defined(__APPLE__) -# if defined VMX86_DESKTOP +# if defined VMX86_GANTRY +# define VMWARE_HOST_DIRECTORY_PREFIX \ + "/Library/Preferences/" PRODUCT_SHORT_NAME +# elif defined VMX86_DESKTOP # define VMWARE_HOST_DIRECTORY_PREFIX \ "/Library/Preferences/" PRODUCT_SHORT_NAME # else @@ -466,6 +464,9 @@ # if defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */ # define PRODUCT_NAME_FOR_LICENSE PRODUCT_VMRC_NAME # define PRODUCT_SMP_NAME_FOR_LICENSE "" // None +# elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */ +# define PRODUCT_NAME_FOR_LICENSE PRODUCT_FLEX_NAME +# define PRODUCT_SMP_NAME_FOR_LICENSE "" // None # elif defined(VMX86_DESKTOP) # if defined(__APPLE__) # define PRODUCT_NAME_FOR_LICENSE PRODUCT_MAC_DESKTOP_NAME_FOR_LICENSE diff --git a/open-vm-tools/lib/include/vm_product_versions.h b/open-vm-tools/lib/include/vm_product_versions.h index 9793bbe8c..eac024bdb 100644 --- a/open-vm-tools/lib/include/vm_product_versions.h +++ b/open-vm-tools/lib/include/vm_product_versions.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -39,7 +39,9 @@ #if defined(VMX86_VIEWCLIENT) #define PRODUCT_VERSION 3,0,0,PRODUCT_BUILD_NUMBER_NUMERIC #elif defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */ - #define PRODUCT_VERSION 7,0,1,PRODUCT_BUILD_NUMBER_NUMERIC /* VMRC_VERSION_NUMBER below has to match this */ + #define PRODUCT_VERSION 8,0,0,PRODUCT_BUILD_NUMBER_NUMERIC /* VMRC_VERSION_NUMBER below has to match this */ +#elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */ + #define PRODUCT_VERSION 8,0,0,PRODUCT_BUILD_NUMBER_NUMERIC /* FLEX_VERSION_NUMBER below has to match this */ #elif defined(VMX86_DESKTOP) #define PRODUCT_VERSION 12,0,0,PRODUCT_BUILD_NUMBER_NUMERIC /* WORKSTATION_VERSION_NUMBER below has to match this */ #elif defined(VMX86_TOOLS) @@ -50,13 +52,12 @@ #define PRODUCT_VERSION 1,1,5,PRODUCT_BUILD_NUMBER_NUMERIC #elif defined(VMX86_VPX) /* this should be kept in sync with the corresponding vpx branch. */ - #define PRODUCT_VERSION 6,0,0,PRODUCT_BUILD_NUMBER_NUMERIC -#elif defined(VMX86_BOOMERANG) - #define PRODUCT_VERSION 1,0,0,PRODUCT_BUILD_NUMBER_NUMERIC + #define PRODUCT_VERSION 6,1,0,PRODUCT_BUILD_NUMBER_NUMERIC #elif defined(VMX86_HORIZON_VIEW) #define PRODUCT_VERSION 0,0,0,PRODUCT_BUILD_NUMBER_NUMERIC #else - #define PRODUCT_VERSION 8,0,0,PRODUCT_BUILD_NUMBER_NUMERIC /* PLAYER_VERSION_NUMBER below has to match this */ + /* Generic catch-all. */ + #define PRODUCT_VERSION 0,0,0,PRODUCT_BUILD_NUMBER_NUMERIC #endif /* @@ -83,7 +84,7 @@ * VMI 2.0 : 3.1.0 * P2VA 3.0 : 3.?.? */ -#define VIE_FILEVERSION 6,0,0,PRODUCT_BUILD_NUMBER_NUMERIC +#define VIE_FILEVERSION 6,1,0,PRODUCT_BUILD_NUMBER_NUMERIC /* * This string can be a little more "free form". The license @@ -106,12 +107,6 @@ */ /* - * When updating the ESX_VERSION* and ESX_RELEASE* macros, you will also - * need to update: - * - * > bora/support/gobuild/targets/server.py - * > console-os26/SOURCES/kernel-2.6.spec - * * Rules for updating the ESX_RELEASE_* macros: * * Set UPDATE to 0 for all experimental/prerelease/and initial major and minor @@ -133,7 +128,7 @@ * 4.0.0-1.8: patch 3 */ #define ESX_VERSION_MAJOR "6" -#define ESX_VERSION_MINOR "0" +#define ESX_VERSION_MINOR "1" #define ESX_VERSION_MAINT "0" #define ESX_VERSION ESX_VERSION_MAJOR "." ESX_VERSION_MINOR "." \ ESX_VERSION_MAINT @@ -161,13 +156,16 @@ * necessary VIX changes also need to be done. See bug 939456. * * ALSO, leave FOO_VERSION at e.x.p on all EXCEPT release branches. + * lmclient.h has a FLEX_VERSION struct so the versionPrefix can't be FLEX */ #define WORKSTATION_VERSION_NUMBER "12.0.0" /* this version number should always match real WS version number */ #define WORKSTATION_VERSION "e.x.p" -#define PLAYER_VERSION_NUMBER "8.0.0" /* this version number should always match real Player version number */ +#define PLAYER_VERSION_NUMBER "12.0.0" /* this version number should always match real Player version number */ #define PLAYER_VERSION "e.x.p" -#define VMRC_VERSION_NUMBER "7.0.1" /* this version number should always match real VMRC version number */ -#define VMRC_VERSION "7.0.1" +#define VMRC_VERSION_NUMBER "8.0.0" /* this version number should always match real VMRC version number */ +#define VMRC_VERSION "8.0.0" +#define FLEX_CLIENT_VERSION_NUMBER "8.0.0" +#define FLEX_CLIENT_VERSION "e.x.p" #define GANTRY_VERSION "e.x.p" @@ -180,27 +178,33 @@ */ #define FUSION_VERSION "e.x.p" -#define BOOMERANG_VERSION "e.x.p" - // These must match VIE_FILEVERSION above -#define SYSIMAGE_VERSION "6.0.0" +#define SYSIMAGE_VERSION "6.1.0" #define SYSIMAGE_FILE_VERSION VIE_FILEVERSION #define VCB_VERSION "4.0.0" #define VCB_FILE_VERSION 4,0,0,0 -#define VIM_VERSION "6.0.0" +#define VIM_VERSION "6.1.0" // Put VPX_VERSION first, because vpx/make/defs.mk doesn't check for suffix. -#define VPX_VERSION "6.0.0" +#define VPX_VERSION "6.1.0" #define VPX_VERSION_MAJOR "6" -#define VPX_VERSION_MINOR "0" +#define VPX_VERSION_MINOR "1" #define VPX_VERSION_MAINT "0" #define VPX_VERSION_THIRD_PARTY VPX_VERSION_MAJOR VPX_VERSION_MINOR \ VPX_VERSION_MAINT + +#define MAX_SUPPORTED_VI_VERSION "6.1" //from ovfTool/src/supportedVersions.h +#define VCDB_CURRENT_SCHEMA_VERSION 610 // from PitCADatabase.h + #define VPX_RELEASE_UPDATE "0" /* 0 = Pre-release/GA, 1 = Update 1 */ #define VPX_RELEASE_PATCH "0" /* 0 = experimental */ #define VPX_RELEASE VPX_RELEASE_UPDATE "." VPX_RELEASE_PATCH +/* expected database version for current release */ +#define VPXD_VDB_DB_VERSION_ID 610 +#define VPXD_VDB_DB_VERSION_VALUE "VirtualCenter Database 6.1" + #define SVA_VERSION "1.0.0" #define SSO_VERSION "1.0.0" #define WBC_VERSION "5.1.0" @@ -226,15 +230,15 @@ #define VIEWY_VERSION "e.x.p" #define VMCFSDK_VERSION "e.x.p" #define PCOIP_VERSION "e.x.p" -#define VIEW_VERSION "6.1.1" +#define VIEW_VERSION "6.2.0" #define HOSTD_VERSION "e.x.p" #define RECOVERYLIBS_VERSION "2.0.0" #define PRECHECK_VERSION "e.x.p" #define VIEW_FEATUREPACK_VERSION "5.2.0" -#define VIEW_CLIENT_VERSION_NUMBER "2.3.0" -#define VIEW_CLIENT_VERSION "e.x.p" +#define VIEW_CLIENT_VERSION_NUMBER "3.5.0" +#define VIEW_CLIENT_VERSION "3.5.0" #define VHSESDK_VERSION "1.0.0" -#define RDE_RFT_ALL_VERSION "2.3.0" +#define RDE_RFT_ALL_VERSION "3.5.0" #define RDESDK_VERSION "2.0.0" #define RDESDKREL_VERSION "2.0.0" #define MKSVCHANDEV_VERSION "1.0.0" @@ -267,6 +271,8 @@ # define PRODUCT_VERSION_NUMBER VDM_CLIENT_VERSION #elif defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */ # define PRODUCT_VERSION_NUMBER VMRC_VERSION +#elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */ +# define PRODUCT_VERSION_NUMBER FLEX_VERSION #elif defined(VMX86_GANTRY) # define PRODUCT_VERSION_NUMBER GANTRY_VERSION #elif defined(VMX86_SERVER) @@ -311,8 +317,6 @@ # define PRODUCT_VERSION_NUMBER TOOLS_VERSION #elif defined(VMX86_VDDK) # define PRODUCT_VERSION_NUMBER VDDK_VERSION -#elif defined(VMX86_BOOMERANG) -# define PRODUCT_VERSION_NUMBER BOOMERANG_VERSION #elif defined(VMX86_HBR_SERVER) # define PRODUCT_VERSION_NUMBER ESX_VERSION #elif defined(VMX86_HORIZON_VIEW) @@ -341,9 +345,10 @@ * a parameter that no longer match the content of the dormant license * file. */ -#define PRODUCT_MAC_DESKTOP_VERSION_STRING_FOR_LICENSE "7.0" -#define PRODUCT_PLAYER_VERSION_STRING_FOR_LICENSE "7.0" -#define PRODUCT_VMRC_VERSION_STRING_FOR_LICENSE "7.0" +#define PRODUCT_MAC_DESKTOP_VERSION_STRING_FOR_LICENSE "8.0" +#define PRODUCT_PLAYER_VERSION_STRING_FOR_LICENSE "12.0" +#define PRODUCT_VMRC_VERSION_STRING_FOR_LICENSE "8.0" +#define PRODUCT_FLEX_VERSION_STRING_FOR_LICENSE "8.0" #if defined(VMX86_TOOLS) /* This product doesn't use a license */ @@ -354,6 +359,8 @@ # define PRODUCT_LICENSE_VERSION "6.0" # elif defined(VMX86_VMRC) /* check VMX86_VMRC before VMX86_DESKTOP */ # define PRODUCT_LICENSE_VERSION PRODUCT_VMRC_VERSION_STRING_FOR_LICENSE +# elif defined(VMX86_FLEX) /* check VMX86_FLEX before VMX86_DESKTOP */ +# define PRODUCT_LICENSE_VERSION PRODUCT_FLEX_VERSION_STRING_FOR_LICENSE # elif defined(VMX86_GANTRY) # define PRODUCT_LICENSE_VERSION "1.0" # elif defined(VMX86_WGS_MIGRATION) @@ -366,11 +373,11 @@ # if defined(__APPLE__) # define PRODUCT_LICENSE_VERSION PRODUCT_MAC_DESKTOP_VERSION_STRING_FOR_LICENSE # else -# define PRODUCT_LICENSE_VERSION "11.0" +# define PRODUCT_LICENSE_VERSION "12.0" # endif # elif defined(VMX86_VPX) # define PRODUCT_LICENSE_VERSION "6.0" -# define PRODUCT_LICENSE_FILE_VERSION "6.0.0.3" +# define PRODUCT_LICENSE_FILE_VERSION "6.1.0.1" # elif defined(VMX86_WBC) # define PRODUCT_LICENSE_VERSION "1.0" # elif defined(VMX86_SDK) @@ -382,6 +389,10 @@ # endif # define PRODUCT_VERSION_STRING_FOR_LICENSE PRODUCT_LICENSE_VERSION #endif +#define PRODUCT_ESX_LICENSE_VERSION "6.0" +#define PRODUCT_ESX_LICENSE_FILE_VERSION "6.1.0.4" +#define PRODUCT_VSAN_LICENSE_VERSION "5.0" +#define PRODUCT_VSAN_LICENSE_FILE_VERSION "5.9.2.0" /* * This is for ACE Management Server @@ -446,6 +457,8 @@ #define PRODUCT_VERSION_SCALABLE_SERVER_40 PRODUCT_ESXI_BRIEF_NAME " 4.x" #define PRODUCT_VERSION_SCALABLE_SERVER_50 PRODUCT_ESXI_BRIEF_NAME " 5.0" #define PRODUCT_VERSION_SCALABLE_SERVER_51 PRODUCT_ESXI_BRIEF_NAME " 5.1" +#define PRODUCT_VERSION_SCALABLE_SERVER_55 PRODUCT_ESXI_BRIEF_NAME " 5.5" +#define PRODUCT_VERSION_SCALABLE_SERVER_60 PRODUCT_ESXI_BRIEF_NAME " 6.0" #define PRODUCT_VERSION_WGS_1 "Server 1.x" #define PRODUCT_VERSION_WGS_2 "Server 2.x" #define PRODUCT_VERSION_GSX_3 "GSX Server 3.x" @@ -454,10 +467,10 @@ #define PRODUCT_VERSION_WORKSTATION_6 PRODUCT_WORKSTATION_BRIEF_NAME " 6.0" #define PRODUCT_VERSION_WORKSTATION_65 PRODUCT_WORKSTATION_BRIEF_NAME " 6.5" #define PRODUCT_VERSION_WORKSTATION_7 PRODUCT_WORKSTATION_BRIEF_NAME " 7.x" -#define PRODUCT_VERSION_WORKSTATION_80 PRODUCT_WORKSTATION_BRIEF_NAME " 8.0" -#define PRODUCT_VERSION_WORKSTATION_90 PRODUCT_WORKSTATION_BRIEF_NAME " 9.0" -#define PRODUCT_VERSION_WORKSTATION_100 PRODUCT_WORKSTATION_BRIEF_NAME " 10.0" -#define PRODUCT_VERSION_WORKSTATION_110 PRODUCT_WORKSTATION_BRIEF_NAME " 11.0" +#define PRODUCT_VERSION_WORKSTATION_80 PRODUCT_WORKSTATION_BRIEF_NAME " 8.x" +#define PRODUCT_VERSION_WORKSTATION_90 PRODUCT_WORKSTATION_BRIEF_NAME " 9.x" +#define PRODUCT_VERSION_WORKSTATION_100 PRODUCT_WORKSTATION_BRIEF_NAME " 10.x" +#define PRODUCT_VERSION_WORKSTATION_110 PRODUCT_WORKSTATION_BRIEF_NAME " 11.x" #define PRODUCT_VERSION_WORKSTATION_120 PRODUCT_WORKSTATION_BRIEF_NAME " 12.0" #define PRODUCT_VERSION_WORKSTATION_ENTERPRISE_1 "ACE 1.x" #define PRODUCT_VERSION_WORKSTATION_ENTERPRISE_2 "ACE 2.0" @@ -466,10 +479,9 @@ #define PRODUCT_VERSION_MAC_DESKTOP_1 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 1.1" #define PRODUCT_VERSION_MAC_DESKTOP_2 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 2.x" #define PRODUCT_VERSION_MAC_DESKTOP_3 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 3.x" -#define PRODUCT_VERSION_MAC_DESKTOP_40 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 4.0" -#define PRODUCT_VERSION_MAC_DESKTOP_50 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 5.0" -#define PRODUCT_VERSION_MAC_DESKTOP_60 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 6.0" -#define PRODUCT_VERSION_MAC_DESKTOP_70 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 7.0" -#define PRODUCT_VERSION_MAC_DESKTOP_80 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 8.0" -#define PRODUCT_VERSION_VMRC_70 PRODUCT_VMRC_BRIEF_NAME " 7.0" +#define PRODUCT_VERSION_MAC_DESKTOP_40 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 4.x" +#define PRODUCT_VERSION_MAC_DESKTOP_50 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 5.x" +#define PRODUCT_VERSION_MAC_DESKTOP_60 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 6.x" +#define PRODUCT_VERSION_MAC_DESKTOP_70 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 7.x" +#define PRODUCT_VERSION_MAC_DESKTOP_80 PRODUCT_MAC_DESKTOP_BRIEF_NAME " 8.x" #endif diff --git a/open-vm-tools/lib/include/vm_tools_version.h b/open-vm-tools/lib/include/vm_tools_version.h index d1781df2b..81aa34549 100644 --- a/open-vm-tools/lib/include/vm_tools_version.h +++ b/open-vm-tools/lib/include/vm_tools_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -1340,15 +1340,64 @@ TOOLS_VERSION_UINT_TO_COMPONENTS(const ToolsVersion toolsVersion, // IN #define TOOLS_VERSION_TORQUE_WRENCH_RELEASE_V_BASE 0 #ifndef RC_INVOKED -#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE1 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_TORQUE_WRENCH_UPDATE1_V) +#define TOOLS_VERSION_TORQUE_WRENCH_PATCH1 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_TORQUE_WRENCH_PATCH1_V) +#endif /* RC_INVOKED */ +#define TOOLS_VERSION_TORQUE_WRENCH_PATCH1_V_MJR 10 +#define TOOLS_VERSION_TORQUE_WRENCH_PATCH1_V_MNR 0 +#define TOOLS_VERSION_TORQUE_WRENCH_PATCH1_V_BASE 1 + +#ifndef RC_INVOKED +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE1 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_TORQUE_WRENCH_UPDATE1_V) #endif /* RC_INVOKED */ #define TOOLS_VERSION_TORQUE_WRENCH_UPDATE1_V_MJR 10 #define TOOLS_VERSION_TORQUE_WRENCH_UPDATE1_V_MNR 0 #define TOOLS_VERSION_TORQUE_WRENCH_UPDATE1_V_BASE 5 -#define TOOLS_VERSION_CURRENT TOOLS_VERSION_TORQUE_WRENCH_UPDATE1 -#define TOOLS_VERSION_CURRENT_STR TOOLS_VERSION_TO_STR(TOOLS_VERSION_TORQUE_WRENCH_UPDATE1) -#define TOOLS_VERSION_CURRENT_CSV TOOLS_VERSION_TO_CSV(TOOLS_VERSION_TORQUE_WRENCH_UPDATE1) +#ifndef RC_INVOKED +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE2 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_TORQUE_WRENCH_UPDATE2_V) +#endif /* RC_INVOKED */ +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE2_V_MJR 10 +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE2_V_MNR 0 +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE2_V_BASE 6 + +#ifndef RC_INVOKED +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE3OVT TOOLS_VERSION_TO_UINT(TOOLS_VERSION_TORQUE_WRENCH_UPDATE3OVT_V) +#endif /* RC_INVOKED */ +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE3OVT_V_MJR 10 +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE3OVT_V_MNR 0 +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE3OVT_V_BASE 7 + +#ifndef RC_INVOKED +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE3 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_TORQUE_WRENCH_UPDATE3_V) +#endif /* RC_INVOKED */ +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE3_V_MJR 10 +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE3_V_MNR 0 +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE3_V_BASE 8 + +#ifndef RC_INVOKED +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE4 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_TORQUE_WRENCH_UPDATE4_V) +#endif /* RC_INVOKED */ +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE4_V_MJR 10 +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE4_V_MNR 0 +#define TOOLS_VERSION_TORQUE_WRENCH_UPDATE4_V_BASE 9 + +#ifndef RC_INVOKED +#define TOOLS_VERSION_TORQUE_WRENCH_FROZEN1 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_TORQUE_WRENCH_FROZEN1_V) +#endif /* RC_INVOKED */ +#define TOOLS_VERSION_TORQUE_WRENCH_FROZEN1_V_MJR 10 +#define TOOLS_VERSION_TORQUE_WRENCH_FROZEN1_V_MNR 0 +#define TOOLS_VERSION_TORQUE_WRENCH_FROZEN1_V_BASE 12 + +#ifndef RC_INVOKED +#define TOOLS_VERSION_NEXT TOOLS_VERSION_TO_UINT(TOOLS_VERSION_NEXT_V) +#endif /* RC_INVOKED */ +#define TOOLS_VERSION_NEXT_V_MJR 10 +#define TOOLS_VERSION_NEXT_V_MNR 1 +#define TOOLS_VERSION_NEXT_V_BASE 0 + +#define TOOLS_VERSION_CURRENT TOOLS_VERSION_NEXT +#define TOOLS_VERSION_CURRENT_STR TOOLS_VERSION_TO_STR(TOOLS_VERSION_NEXT) +#define TOOLS_VERSION_CURRENT_CSV TOOLS_VERSION_TO_CSV(TOOLS_VERSION_NEXT) /* * The extended Tools version is the current Tools version with the diff --git a/open-vm-tools/lib/include/vm_version.h b/open-vm-tools/lib/include/vm_version.h index 33258e197..a98428063 100644 --- a/open-vm-tools/lib/include/vm_version.h +++ b/open-vm-tools/lib/include/vm_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vm_vmx_type.h b/open-vm-tools/lib/include/vm_vmx_type.h index 615451bf0..204270db3 100644 --- a/open-vm-tools/lib/include/vm_vmx_type.h +++ b/open-vm-tools/lib/include/vm_vmx_type.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmblock.h b/open-vm-tools/lib/include/vmblock.h index 8dbb0ce62..2c9be1613 100644 --- a/open-vm-tools/lib/include/vmblock.h +++ b/open-vm-tools/lib/include/vmblock.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -145,7 +145,7 @@ # define VMBLOCK_DEVICE_MODE VMBLOCK_FUSE_DEVICE_MODE # define VMBLOCK_MOUNT_POINT VMBLOCK_FUSE_MOUNT_POINT -#elif defined(linux) +#elif defined __linux__ # define VMBLOCK_ADD_FILEBLOCK 98 # define VMBLOCK_DEL_FILEBLOCK 99 # ifdef VMX86_DEVEL diff --git a/open-vm-tools/lib/include/vmblock_user.h b/open-vm-tools/lib/include/vmblock_user.h index ea9511651..dab81658c 100644 --- a/open-vm-tools/lib/include/vmblock_user.h +++ b/open-vm-tools/lib/include/vmblock_user.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmcheck.h b/open-vm-tools/lib/include/vmcheck.h index e34c1e1a4..9738ef2d6 100644 --- a/open-vm-tools/lib/include/vmcheck.h +++ b/open-vm-tools/lib/include/vmcheck.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmci_defs.h b/open-vm-tools/lib/include/vmci_defs.h index d8ba8b49f..0df1de421 100644 --- a/open-vm-tools/lib/include/vmci_defs.h +++ b/open-vm-tools/lib/include/vmci_defs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -96,17 +96,6 @@ typedef enum VMCIIntrType { */ #define VMCI_MAX_GUEST_QP_MEMORY (128 * 1024 * 1024) -/* - * Queues with pre-mapped data pages must be small, so that we don't pin - * too much kernel memory (especially on vmkernel). We limit a queuepair to - * 32 KB, or 16 KB per queue for symmetrical pairs. - * - * XXX, we are raising this limit to 4MB to support high-throughput workloads - * with vioi-filter. Once we switch to rings instead of queuepairs for the - * page channel, we will drop this limit again. See PR 852983. - */ -#define VMCI_MAX_PINNED_QP_MEMORY (4 * 1024 * 1024) - /* * We have a fixed set of resource IDs available in the VMX. * This allows us to have a very simple implementation since we statically @@ -275,6 +264,7 @@ static const VMCIHandle VMCI_INVALID_HANDLE = {VMCI_INVALID_ID, * Context ID used by host endpoints. */ #define VMCI_HOST_CONTEXT_ID 2 +#define VMCI_HOST_CONTEXT_INVALID_EVENT ((uintptr_t)~0) #define VMCI_CONTEXT_IS_VM(_cid) (VMCI_INVALID_ID != _cid && \ _cid > VMCI_HOST_CONTEXT_ID) diff --git a/open-vm-tools/lib/include/vmci_sockets.h b/open-vm-tools/lib/include/vmci_sockets.h index 72fe8c01d..71aafd456 100644 --- a/open-vm-tools/lib/include/vmci_sockets.h +++ b/open-vm-tools/lib/include/vmci_sockets.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -595,7 +595,8 @@ struct uuid_2_cid { * \param[out] outFd File descriptor to the VMCI device. The * address family value is valid until this * descriptor is closed. This parameter is - * only valid if the return value is not -1. + * not necessarily valid, but it is set if + * the return value is not -1. * Call VMCISock_ReleaseAFValueFd() to close * this descriptor. * @@ -640,6 +641,9 @@ struct uuid_2_cid { int s = socket(AF_VSOCK_LOCAL, SOCK_DGRAM, 0); if (s != -1) { close(s); + if (outFd) { + *outFd = -1; + } return AF_VSOCK_LOCAL; } } diff --git a/open-vm-tools/lib/include/vmfs.h b/open-vm-tools/lib/include/vmfs.h index f5f086eef..64bf31013 100644 --- a/open-vm-tools/lib/include/vmfs.h +++ b/open-vm-tools/lib/include/vmfs.h @@ -1,6 +1,6 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmk_exports.h b/open-vm-tools/lib/include/vmk_exports.h index 1a6f6ada8..1dbaef997 100644 --- a/open-vm-tools/lib/include/vmk_exports.h +++ b/open-vm-tools/lib/include/vmk_exports.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmsignal.h b/open-vm-tools/lib/include/vmsignal.h index c7489a836..4d2e94203 100644 --- a/open-vm-tools/lib/include/vmsignal.h +++ b/open-vm-tools/lib/include/vmsignal.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmstdio.h b/open-vm-tools/lib/include/vmstdio.h index c6cb62438..646b7fa75 100644 --- a/open-vm-tools/lib/include/vmstdio.h +++ b/open-vm-tools/lib/include/vmstdio.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmsupport.h b/open-vm-tools/lib/include/vmsupport.h index 5582bc37e..5393b36f9 100644 --- a/open-vm-tools/lib/include/vmsupport.h +++ b/open-vm-tools/lib/include/vmsupport.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmtoolsd_version.h b/open-vm-tools/lib/include/vmtoolsd_version.h index b47d827c4..b3e29b152 100644 --- a/open-vm-tools/lib/include/vmtoolsd_version.h +++ b/open-vm-tools/lib/include/vmtoolsd_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware.h b/open-vm-tools/lib/include/vmware.h index 5a5b6febe..c9fc7eb1a 100644 --- a/open-vm-tools/lib/include/vmware.h +++ b/open-vm-tools/lib/include/vmware.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/guestrpc/capabilities.h b/open-vm-tools/lib/include/vmware/guestrpc/capabilities.h index b91a15ff5..9d12973c0 100644 --- a/open-vm-tools/lib/include/vmware/guestrpc/capabilities.h +++ b/open-vm-tools/lib/include/vmware/guestrpc/capabilities.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/guestrpc/deploypkg.h b/open-vm-tools/lib/include/vmware/guestrpc/deploypkg.h index 4d4ccc9e0..df758b1fc 100644 --- a/open-vm-tools/lib/include/vmware/guestrpc/deploypkg.h +++ b/open-vm-tools/lib/include/vmware/guestrpc/deploypkg.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/guestrpc/powerops.h b/open-vm-tools/lib/include/vmware/guestrpc/powerops.h index c88422167..079e75819 100644 --- a/open-vm-tools/lib/include/vmware/guestrpc/powerops.h +++ b/open-vm-tools/lib/include/vmware/guestrpc/powerops.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/guestrpc/tclodefs.h b/open-vm-tools/lib/include/vmware/guestrpc/tclodefs.h index 61961c442..f24dc9c62 100644 --- a/open-vm-tools/lib/include/vmware/guestrpc/tclodefs.h +++ b/open-vm-tools/lib/include/vmware/guestrpc/tclodefs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/guestrpc/timesync.h b/open-vm-tools/lib/include/vmware/guestrpc/timesync.h index 0b6e0530e..d6efab7bd 100644 --- a/open-vm-tools/lib/include/vmware/guestrpc/timesync.h +++ b/open-vm-tools/lib/include/vmware/guestrpc/timesync.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/guestrpc/vmbackup.h b/open-vm-tools/lib/include/vmware/guestrpc/vmbackup.h index bab06ea11..6bb53ee31 100644 --- a/open-vm-tools/lib/include/vmware/guestrpc/vmbackup.h +++ b/open-vm-tools/lib/include/vmware/guestrpc/vmbackup.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -54,6 +54,8 @@ #define VMBACKUP_PROTOCOL_ABORT VMBACKUP_PROTOCOL_PREFIX"abort" #define VMBACKUP_PROTOCOL_SNAPSHOT_DONE VMBACKUP_PROTOCOL_PREFIX"snapshotDone" #define VMBACKUP_PROTOCOL_EVENT_SET VMBACKUP_PROTOCOL_PREFIX"eventSet" +#define VMBACKUP_PROTOCOL_SNAPSHOT_COMPLETED \ + VMBACKUP_PROTOCOL_PREFIX"snapshotCompleted" /* These are responses to messages sent to the guest. */ #define VMBACKUP_PROTOCOL_ERROR "protocol.error" diff --git a/open-vm-tools/lib/include/vmware/tools/desktopevents.h b/open-vm-tools/lib/include/vmware/tools/desktopevents.h index 97886bf40..eb41c6509 100644 --- a/open-vm-tools/lib/include/vmware/tools/desktopevents.h +++ b/open-vm-tools/lib/include/vmware/tools/desktopevents.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/tools/guestrpc.h b/open-vm-tools/lib/include/vmware/tools/guestrpc.h index 584952694..73a750c4d 100644 --- a/open-vm-tools/lib/include/vmware/tools/guestrpc.h +++ b/open-vm-tools/lib/include/vmware/tools/guestrpc.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008,2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008,2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/tools/i18n.h b/open-vm-tools/lib/include/vmware/tools/i18n.h index dc330eacd..6aa1e7697 100644 --- a/open-vm-tools/lib/include/vmware/tools/i18n.h +++ b/open-vm-tools/lib/include/vmware/tools/i18n.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/tools/log.h b/open-vm-tools/lib/include/vmware/tools/log.h index d10ee8eb7..9d284284d 100644 --- a/open-vm-tools/lib/include/vmware/tools/log.h +++ b/open-vm-tools/lib/include/vmware/tools/log.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -169,6 +169,36 @@ #endif +/* + * As of version 2.46, glib thinks the Windows compiler where + * _MSC_VER >= 1400 can handle G_HAVE_ISO_VARARGS. This makes our + * magic macros wrapping their macros fail in the simplest case, + * where only the fmt arg is present (eg vm_debug("test"). + * vm_debug("test %d", 123) works fine. + * + * Work around this by making g_debug() et all be inline functions, + * which is how it works if G_HAVE_ISO_VARARGS isn't set. + * + * Though experimentation we found that this also works: + * + * #define LOGHELPER(...) ,##_VA_ARGS__ + * #define LOG(fmt, ...) g_debug_macro(__FUNCTION__, ": " fmt, LOGHELPER(__VA_ARGS__)) + * + * but since its disgusting and even more magical, the inline variant was chosen + * instead. + */ + +#if defined(_WIN32) && GLIB_CHECK_VERSION(2, 46, 0) +static inline void +g_critical_inline(const gchar *fmt, + ...) +{ + va_list args; + va_start(args, fmt); + g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, fmt, args); + va_end(args); +} + /* ******************************************************************************* * vm_{critical,debug,error,info,message,warning} -- */ /** @@ -182,7 +212,89 @@ * ******************************************************************************* */ +#define vm_critical(fmt, ...) g_critical_inline("%s: " fmt, FUNC, ## __VA_ARGS__) + +static inline void +g_debug_inline(const gchar *fmt, + ...) +{ + va_list args; + va_start(args, fmt); + g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, fmt, args); + va_end(args); +} + +/** @copydoc vm_critical */ +#define vm_debug(fmt, ...) g_debug_inline("%s: " fmt, FUNC, ## __VA_ARGS__) + +static inline void +g_error_inline(const gchar *fmt, + ...) +{ + va_list args; + va_start(args, fmt); + g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, fmt, args); + va_end(args); +} + +/** @copydoc vm_critical */ +#define vm_error(fmt, ...) g_error_inline("%s: " fmt, FUNC, ## __VA_ARGS__) + + +static inline void +g_info_inline(const gchar *fmt, + ...) +{ + va_list args; + va_start(args, fmt); + g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, fmt, args); + va_end(args); +} + +/** @copydoc vm_critical */ +#define vm_info(fmt, ...) g_info_inline("%s: " fmt, FUNC, ## __VA_ARGS__) + +static inline void +g_message_inline(const gchar *fmt, + ...) +{ + va_list args; + va_start(args, fmt); + g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, fmt, args); + va_end(args); +} + +/** @copydoc vm_critical */ +#define vm_message(fmt, ...) g_message_inline("%s: " fmt, FUNC, ## __VA_ARGS__) +static inline void +g_warning_inline(const gchar *fmt, + ...) +{ + va_list args; + va_start(args, fmt); + g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, fmt, args); + va_end(args); +} + +/** @copydoc vm_critical */ +#define vm_warning(fmt, ...) g_warning_inline("%s: " fmt, FUNC, ## __VA_ARGS__) + +#else // ! (windows & glib >= 2.46) + +/* + ******************************************************************************* + * vm_{critical,debug,error,info,message,warning} -- */ /** + * + * Wrapper around the corresponding glib function that automatically includes + * the calling function name in the log message. The "fmt" parameter must be + * a string constant. + * + * @param[in] fmt Log message format. + * @param[in] ... Message arguments. + * + ******************************************************************************* + */ #define vm_critical(fmt, ...) g_critical("%s: " fmt, FUNC, ## __VA_ARGS__) /** @copydoc vm_critical */ @@ -199,9 +311,14 @@ /** @copydoc vm_critical */ #define vm_warning(fmt, ...) g_warning("%s: " fmt, FUNC, ## __VA_ARGS__) +#endif // ! (windows & glib >= 2.46) + G_BEGIN_DECLS +void +VMTools_ConfigLogToStdio(const gchar *domain); + void VMTools_ConfigLogging(const gchar *defaultDomain, GKeyFile *cfg, diff --git a/open-vm-tools/lib/include/vmware/tools/plugin.h b/open-vm-tools/lib/include/vmware/tools/plugin.h index 915e2de79..17f7cfd79 100644 --- a/open-vm-tools/lib/include/vmware/tools/plugin.h +++ b/open-vm-tools/lib/include/vmware/tools/plugin.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/tools/rpcdebug.h b/open-vm-tools/lib/include/vmware/tools/rpcdebug.h index e6c020052..345ed2ab2 100644 --- a/open-vm-tools/lib/include/vmware/tools/rpcdebug.h +++ b/open-vm-tools/lib/include/vmware/tools/rpcdebug.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/tools/threadPool.h b/open-vm-tools/lib/include/vmware/tools/threadPool.h index f784296ef..e2e4f0a62 100644 --- a/open-vm-tools/lib/include/vmware/tools/threadPool.h +++ b/open-vm-tools/lib/include/vmware/tools/threadPool.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware/tools/utils.h b/open-vm-tools/lib/include/vmware/tools/utils.h index 8c13f7371..efe2e5ce7 100644 --- a/open-vm-tools/lib/include/vmware/tools/utils.h +++ b/open-vm-tools/lib/include/vmware/tools/utils.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -121,6 +121,24 @@ VMTools_ChangeLogFilePath(const gchar *delimiter, const gchar *domain, GKeyFile *conf); +gboolean +VMTools_ConfigGetBoolean(GKeyFile *config, + const gchar *section, + const gchar *key, + gboolean defValue); + +gint +VMTools_ConfigGetInteger(GKeyFile *config, + const gchar *section, + const gchar *key, + gint defValue); + +gchar * +VMTools_ConfigGetString(GKeyFile *config, + const gchar *section, + const gchar *key, + gchar *defValue); + #if defined(G_PLATFORM_WIN32) gboolean diff --git a/open-vm-tools/lib/include/vmware/tools/vmbackup.h b/open-vm-tools/lib/include/vmware/tools/vmbackup.h index 925617d4d..4763b1619 100644 --- a/open-vm-tools/lib/include/vmware/tools/vmbackup.h +++ b/open-vm-tools/lib/include/vmware/tools/vmbackup.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware_pack_begin.h b/open-vm-tools/lib/include/vmware_pack_begin.h index 4d2d8b18e..d08d1dce2 100644 --- a/open-vm-tools/lib/include/vmware_pack_begin.h +++ b/open-vm-tools/lib/include/vmware_pack_begin.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2002-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware_pack_end.h b/open-vm-tools/lib/include/vmware_pack_end.h index f915818a4..8da74d01b 100644 --- a/open-vm-tools/lib/include/vmware_pack_end.h +++ b/open-vm-tools/lib/include/vmware_pack_end.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2002-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmware_pack_init.h b/open-vm-tools/lib/include/vmware_pack_init.h index a146e7533..2fdfe9e61 100644 --- a/open-vm-tools/lib/include/vmware_pack_init.h +++ b/open-vm-tools/lib/include/vmware_pack_init.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2002-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vmxrpc.h b/open-vm-tools/lib/include/vmxrpc.h index ce5337c62..0940ebfd1 100644 --- a/open-vm-tools/lib/include/vmxrpc.h +++ b/open-vm-tools/lib/include/vmxrpc.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/vthreadBase.h b/open-vm-tools/lib/include/vthreadBase.h index c83535c3c..7161bd562 100644 --- a/open-vm-tools/lib/include/vthreadBase.h +++ b/open-vm-tools/lib/include/vthreadBase.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/win32util.h b/open-vm-tools/lib/include/win32util.h index 21e76ff91..dc2b9b916 100644 --- a/open-vm-tools/lib/include/win32util.h +++ b/open-vm-tools/lib/include/win32util.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/wiper.h b/open-vm-tools/lib/include/wiper.h index 81d908f61..7ef56e911 100644 --- a/open-vm-tools/lib/include/wiper.h +++ b/open-vm-tools/lib/include/wiper.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/x86_basic_defs.h b/open-vm-tools/lib/include/x86_basic_defs.h index b39cbe37b..bf1329475 100644 --- a/open-vm-tools/lib/include/x86_basic_defs.h +++ b/open-vm-tools/lib/include/x86_basic_defs.h @@ -83,8 +83,8 @@ #define CR4_OSXSAVE 0x00040000 #define CR4_SMEP 0x00100000 #define CR4_SMAP 0x00200000 -/* Removing a bit from CR4_RESERVED causes Task_Switch to leave the bit set. */ -#define CR4_RESERVED CONST64U(0xffffffffffc89800) +#define CR4_PKE 0x00400000 +#define CR4_RESERVED CONST64U(0xffffffffff889800) #define CR8_RESERVED CONST64U(0xfffffffffffffff0) /* @@ -238,5 +238,12 @@ typedef enum x86_FLAGS { EFLAGS__4 = 0x7fffffff /* ensure 4 byte encoding */ } x86_FLAGS; +/* + * MPX bound configuration registers + */ +#define BNDCFG_EN 0x00000001 +#define BNDCFG_BNDPRSV 0x00000002 +#define BNDCFG_RSVD 0x00000ffc +#define BNDCFG_BDBASE CONST64U(0xfffffffffffff000) #endif // ifndef _VM_BASIC_DEFS_H_ diff --git a/open-vm-tools/lib/include/x86cpuid.h b/open-vm-tools/lib/include/x86cpuid.h index 161a8acdc..a0b839d90 100644 --- a/open-vm-tools/lib/include/x86cpuid.h +++ b/open-vm-tools/lib/include/x86cpuid.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -123,7 +123,7 @@ CPUIDQuery; CPUIDLEVEL(TRUE, 7, 7, 1) \ CPUIDLEVEL(FALSE, A, 0xA, 0) \ CPUIDLEVEL(FALSE, B, 0xB, 2) \ - CPUIDLEVEL(TRUE, D, 0xD, 4) \ + CPUIDLEVEL(TRUE, D, 0xD, 10) \ CPUIDLEVEL(FALSE, 12, 0x12, 4) \ CPUIDLEVEL(FALSE, 400, 0x40000000, 0) \ CPUIDLEVEL(FALSE, 401, 0x40000001, 0) \ @@ -449,12 +449,27 @@ FLAG( 7, 0, EBX, 10, 1, INVPCID, YES, FALSE) \ FLAG( 7, 0, EBX, 11, 1, RTM, YES, TRUE) \ FLAG( 7, 0, EBX, 12, 1, PQM, NO, FALSE) \ FLAG( 7, 0, EBX, 13, 1, FP_SEGMENT_ZERO, ANY, TRUE) \ +FLAG( 7, 0, EBX, 14, 1, MPX, YES, TRUE) \ FLAG( 7, 0, EBX, 15, 1, PQE, NO, FALSE) \ +FLAG( 7, 0, EBX, 16, 1, AVX512F, YES, TRUE) \ +FLAG( 7, 0, EBX, 17, 1, AVX512DQ, YES, TRUE) \ FLAG( 7, 0, EBX, 18, 1, RDSEED, YES, TRUE) \ FLAG( 7, 0, EBX, 19, 1, ADX, YES, TRUE) \ FLAG( 7, 0, EBX, 20, 1, SMAP, YES, FALSE) \ +FLAG( 7, 0, EBX, 21, 1, AVX512IFMA, YES, TRUE) \ +FLAG( 7, 0, EBX, 22, 1, PCOMMIT, YES, TRUE) \ +FLAG( 7, 0, EBX, 23, 1, CLFLUSHOPT, YES, TRUE) \ +FLAG( 7, 0, EBX, 24, 1, CLWB, YES, TRUE) \ FLAG( 7, 0, EBX, 25, 1, PT, NO, FALSE) \ -FLAG( 7, 0, ECX, 0, 1, PREFETCHWT1, NO, TRUE) +FLAG( 7, 0, EBX, 26, 1, AVX512PF, YES, TRUE) \ +FLAG( 7, 0, EBX, 27, 1, AVX512ER, YES, TRUE) \ +FLAG( 7, 0, EBX, 28, 1, AVX512CD, YES, TRUE) \ +FLAG( 7, 0, EBX, 30, 1, AVX512BW, YES, TRUE) \ +FLAG( 7, 0, EBX, 31, 1, AVX512VL, YES, TRUE) \ +FLAG( 7, 0, ECX, 0, 1, PREFETCHWT1, YES, TRUE) \ +FLAG( 7, 0, ECX, 1, 1, AVX512VBMI, YES, TRUE) \ +FLAG( 7, 0, ECX, 3, 1, PKU, YES, TRUE) \ +FLAG( 7, 0, ECX, 4, 1, OSPKE, ANY, TRUE) \ /* LEVEL, SUB-LEVEL, REG, POS, SIZE, NAME, MON SUPP, CPL3 */ @@ -486,23 +501,77 @@ FIELD( B, 0, EDX, 0, 32, TOPOLOGY_X2APIC_ID, NA, FALSE) FLAG( D, 0, EAX, 0, 1, XCR0_MASTER_LEGACY_FP, YES, FALSE) \ FLAG( D, 0, EAX, 1, 1, XCR0_MASTER_SSE, YES, FALSE) \ FLAG( D, 0, EAX, 2, 1, XCR0_MASTER_YMM_H, YES, FALSE) \ -FIELD( D, 0, EAX, 3, 29, XCR0_MASTER_LOWER, NO, FALSE) \ +FLAG( D, 0, EAX, 3, 1, XCR0_MASTER_BNDREGS, YES, FALSE) \ +FLAG( D, 0, EAX, 4, 1, XCR0_MASTER_BNDCSR, YES, FALSE) \ +FLAG( D, 0, EAX, 5, 1, XCR0_MASTER_OPMASK, YES, FALSE) \ +FLAG( D, 0, EAX, 6, 1, XCR0_MASTER_ZMM_H, YES, FALSE) \ +FLAG( D, 0, EAX, 7, 1, XCR0_MASTER_HI16_ZMM, YES, FALSE) \ +FLAG( D, 0, EAX, 8, 1, XCR0_MASTER_XSS, NO, FALSE) \ +FLAG( D, 0, EAX, 9, 1, XCR0_MASTER_PKRU, YES, FALSE) \ +FIELD( D, 0, EAX, 10,22, XCR0_MASTER_LOWER, NO, FALSE) \ FIELD( D, 0, EBX, 0, 32, XSAVE_ENABLED_SIZE, ANY, FALSE) \ FIELD( D, 0, ECX, 0, 32, XSAVE_MAX_SIZE, YES, FALSE) \ FIELD( D, 0, EDX, 0, 29, XCR0_MASTER_UPPER, NO, FALSE) \ FLAG( D, 0, EDX, 30, 1, XCR0_MASTER_LWP, NO, FALSE) \ FLAG( D, 0, EDX, 31, 1, XCR0_MASTER_EXTENDED_XSAVE, NO, FALSE) \ FLAG( D, 1, EAX, 0, 1, XSAVEOPT, YES, FALSE) \ -FLAG( D, 1, EAX, 1, 1, XSAVEC, NO, FALSE) \ +FLAG( D, 1, EAX, 1, 1, XSAVEC, YES, FALSE) \ FLAG( D, 1, EAX, 2, 1, XGETBV_ECX1, NO, FALSE) \ -FLAG( D, 1, EAX, 3, 1, XSAVES, NO, FALSE) \ -FIELD( D, 1, EBX, 0, 32, XSAVE_XSS_SIZE, NO, FALSE) \ -FIELD( D, 1, ECX, 0, 32, XSS_LOWER, NO, FALSE) \ -FIELD( D, 1, EDX, 0, 32, XSS_UPPER, NO, FALSE) \ +FLAG( D, 1, EAX, 3, 1, XSAVES, YES, FALSE) \ +FIELD( D, 1, EBX, 0, 32, XSAVES_ENABLED_SIZE, ANY, FALSE) \ +FIELD( D, 1, ECX, 0, 7, XSS_XCR0_USED0, NO, FALSE) \ +FLAG( D, 1, ECX, 8, 1, XSS_PT, NO, FALSE) \ +FIELD( D, 1, ECX, 9, 1, XSS_XCR0_USED1, NO, FALSE) \ +FIELD( D, 1, ECX, 10,22, XSS_RSVD0, NO, FALSE) \ +FIELD( D, 1, EDX, 0, 32, XSS_RSVD1, NO, FALSE) \ FIELD( D, 2, EAX, 0, 32, XSAVE_YMM_SIZE, YES, FALSE) \ FIELD( D, 2, EBX, 0, 32, XSAVE_YMM_OFFSET, YES, FALSE) \ -FIELD( D, 2, ECX, 0, 32, XSAVE_YMM_RSVD1, YES, FALSE) \ -FIELD( D, 2, EDX, 0, 32, XSAVE_YMM_RSVD2, YES, FALSE) \ +FLAG( D, 2, ECX, 0, 1, XSAVE_YMM_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 2, ECX, 1, 1, XSAVE_YMM_ALIGN, YES, FALSE) \ +FIELD( D, 2, ECX, 2, 30, XSAVE_YMM_RSVD1, NO, FALSE) \ +FIELD( D, 2, EDX, 0, 32, XSAVE_YMM_RSVD2, NO, FALSE) \ +FIELD( D, 3, EAX, 0, 32, XSAVE_BNDREGS_SIZE, YES, FALSE) \ +FIELD( D, 3, EBX, 0, 32, XSAVE_BNDREGS_OFFSET, YES, FALSE) \ +FLAG( D, 3, ECX, 0, 1, XSAVE_BNDREGS_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 3, ECX, 1, 1, XSAVE_BNDREGS_ALIGN, YES, FALSE) \ +FIELD( D, 3, ECX, 2, 30, XSAVE_BNDREGS_RSVD1, NO, FALSE) \ +FIELD( D, 3, EDX, 0, 32, XSAVE_BNDREGS_RSVD2, NO, FALSE) \ +FIELD( D, 4, EAX, 0, 32, XSAVE_BNDCSR_SIZE, YES, FALSE) \ +FIELD( D, 4, EBX, 0, 32, XSAVE_BNDCSR_OFFSET, YES, FALSE) \ +FLAG( D, 4, ECX, 0, 1, XSAVE_BNDCSR_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 4, ECX, 1, 1, XSAVE_BNDCSR_ALIGN, YES, FALSE) \ +FIELD( D, 4, ECX, 2, 30, XSAVE_BNDCSR_RSVD1, NO, FALSE) \ +FIELD( D, 4, EDX, 0, 32, XSAVE_BNDCSR_RSVD2, NO, FALSE) \ +FIELD( D, 5, EAX, 0, 32, XSAVE_OPMASK_SIZE, YES, FALSE) \ +FIELD( D, 5, EBX, 0, 32, XSAVE_OPMASK_OFFSET, YES, FALSE) \ +FLAG( D, 5, ECX, 0, 1, XSAVE_OPMASK_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 5, ECX, 1, 1, XSAVE_OPMASK_ALIGN, YES, FALSE) \ +FIELD( D, 5, ECX, 2, 30, XSAVE_OPMASK_RSVD1, NO, FALSE) \ +FIELD( D, 5, EDX, 0, 32, XSAVE_OPMASK_RSVD2, NO, FALSE) \ +FIELD( D, 6, EAX, 0, 32, XSAVE_ZMM_H_SIZE, YES, FALSE) \ +FIELD( D, 6, EBX, 0, 32, XSAVE_ZMM_H_OFFSET, YES, FALSE) \ +FLAG( D, 6, ECX, 0, 1, XSAVE_ZMM_H_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 6, ECX, 1, 1, XSAVE_ZMM_H_ALIGN, YES, FALSE) \ +FIELD( D, 6, ECX, 2, 30, XSAVE_ZMM_H_RSVD1, NO, FALSE) \ +FIELD( D, 6, EDX, 0, 32, XSAVE_ZMM_H_RSVD2, NO, FALSE) \ +FIELD( D, 7, EAX, 0, 32, XSAVE_HI16_ZMM_SIZE, YES, FALSE) \ +FIELD( D, 7, EBX, 0, 32, XSAVE_HI16_ZMM_OFFSET, YES, FALSE) \ +FLAG( D, 7, ECX, 0, 1, XSAVE_HI16_ZMM_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 7, ECX, 1, 1, XSAVE_HI16_ZMM_ALIGN, YES, FALSE) \ +FIELD( D, 7, ECX, 2, 30, XSAVE_HI16_ZMM_RSVD1, NO, FALSE) \ +FIELD( D, 7, EDX, 0, 32, XSAVE_HI16_ZMM_RSVD2, NO, FALSE) \ +FIELD( D, 8, EAX, 0, 32, XSAVE_PT_STATE_SIZE, NO, FALSE) \ +FIELD( D, 8, EBX, 0, 32, XSAVE_PT_STATE_OFFSET, NO, FALSE) \ +FLAG( D, 8, ECX, 0, 1, XSAVE_PT_STATE_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 8, ECX, 1, 1, XSAVE_PT_STATE_ALIGN, NO, FALSE) \ +FIELD( D, 8, ECX, 2, 30, XSAVE_PT_STATE_RSVD1, NO, FALSE) \ +FIELD( D, 8, EDX, 0, 32, XSAVE_PT_STATE_RSVD2, NO, FALSE) \ +FIELD( D, 9, EAX, 0, 32, XSAVE_PKRU_SIZE, YES, FALSE) \ +FIELD( D, 9, EBX, 0, 32, XSAVE_PKRU_OFFSET, YES, FALSE) \ +FLAG( D, 9, ECX, 0, 1, XSAVE_PKRU_SUP_BY_XSS, NO, FALSE) \ +FLAG( D, 9, ECX, 1, 1, XSAVE_PKRU_ALIGN, YES, FALSE) \ +FIELD( D, 9, ECX, 2, 30, XSAVE_PKRU_RSVD1, NO, FALSE) \ +FIELD( D, 9, EDX, 0, 32, XSAVE_PKRU_RSVD2, NO, FALSE) \ FIELD( D, 62, EAX, 0, 32, XSAVE_LWP_SIZE, NO, FALSE) \ FIELD( D, 62, EBX, 0, 32, XSAVE_LWP_OFFSET, NO, FALSE) \ FIELD( D, 62, ECX, 0, 32, XSAVE_LWP_RSVD1, NO, FALSE) \ @@ -905,11 +974,9 @@ FIELD(81E, 0, ECX, 8, 3, NODES_PER_PKG, NA, FALSE) * * e.g. - CPUID_VIRT_BITS_MASK = 0xff00 * - CPUID_VIRT_BITS_SHIFT = 8 - * - * Note: The MASK definitions must use some gymnastics to get - * around a warning when shifting left by 32. */ -#define VMW_BIT_MASK(shift) (((1 << (shift - 1)) << 1) - 1) +#define VMW_BIT_MASK(shift) (0xffffffffu >> (32 - shift)) + #define FIELD(lvl, ecxIn, reg, bitpos, size, name, s, c3) \ CPUID_##name##_SHIFT = bitpos, \ @@ -1128,7 +1195,7 @@ CPUIDCheck(int32 eaxIn, int32 eaxInCheck, #define CPUID_FAMILY_K8MOBILE 0x11 #define CPUID_FAMILY_LLANO 0x12 #define CPUID_FAMILY_BOBCAT 0x14 -#define CPUID_FAMILY_BULLDOZER 0x15 // Bulldozer Piledriver Steamroller +#define CPUID_FAMILY_BULLDOZER 0x15 // BD PD SR EX #define CPUID_FAMILY_KYOTO 0x16 // Note: Jaguar microarch /* Effective VIA CPU Families */ @@ -1195,6 +1262,10 @@ CPUIDCheck(int32 eaxIn, int32 eaxInCheck, #define CPUID_MODEL_PILEDRIVER_02 0x02 // family == CPUID_FAMILY_BULLDOZER #define CPUID_MODEL_OPTERON_REVF_41 0x41 // family == CPUID_FAMILY_K8 #define CPUID_MODEL_KYOTO_00 0x00 // family == CPUID_FAMILY_KYOTO +#define CPUID_MODEL_STEAMROLLER_3F 0x3F // Max Steamroller model defined in BKDG +#define CPUID_MODEL_STEAMROLLER_30 0x30 // family == CPUID_FAMILY_BULLDOZER +#define CPUID_MODEL_EXCAVATOR_60 0x60 // family == CPUID_FAMILY_BULLDOZER +#define CPUID_MODEL_EXCAVATOR_6F 0x6f // Max Excavator model defined in BKDG /* VIA model information */ #define CPUID_MODEL_NANO 15 // Isaiah @@ -1460,6 +1531,8 @@ CPUID_MODEL_IS_IVYBRIDGE(uint32 v) // IN: %eax from CPUID with %eax=1. } + + static INLINE Bool CPUID_FAMILY_IS_K7(uint32 eax) { @@ -1597,6 +1670,24 @@ CPUID_MODEL_IS_PILEDRIVER(uint32 eax) } +static INLINE Bool +CPUID_MODEL_IS_STEAMROLLER(uint32 eax) +{ + /* Steamroller is model 0x30 of family 0x15 (so far). */ + return CPUID_EFFECTIVE_FAMILY(eax) == CPUID_FAMILY_BULLDOZER && + (CPUID_EFFECTIVE_MODEL(eax) >= CPUID_MODEL_STEAMROLLER_30 && + CPUID_EFFECTIVE_MODEL(eax) <= CPUID_MODEL_STEAMROLLER_3F); +} + + +static INLINE Bool +CPUID_MODEL_IS_EXCAVATOR(uint32 eax) +{ + /* Excavator is model 0x60 of family 0x15 (so far). */ + return CPUID_EFFECTIVE_FAMILY(eax) == CPUID_FAMILY_BULLDOZER && + (CPUID_EFFECTIVE_MODEL(eax) >= CPUID_MODEL_EXCAVATOR_60 && + CPUID_EFFECTIVE_MODEL(eax) <= CPUID_MODEL_EXCAVATOR_6F); +} static INLINE Bool diff --git a/open-vm-tools/lib/include/x86cpuid_asm.h b/open-vm-tools/lib/include/x86cpuid_asm.h index 02a351cbe..b80b3dcb4 100644 --- a/open-vm-tools/lib/include/x86cpuid_asm.h +++ b/open-vm-tools/lib/include/x86cpuid_asm.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -455,5 +455,13 @@ __GET_EAX_FROM_CPUID4(int inputEcx) _dx = regs.edx; \ } +#define GET_CPUID2(_ax, _bx, _cx, _dx) {\ + CPUIDRegs regs; \ + __GET_CPUID2(_ax, _cx, ®s); \ + _ax = regs.eax; \ + _bx = regs.ebx; \ + _cx = regs.ecx; \ + _dx = regs.edx; \ +} #endif diff --git a/open-vm-tools/lib/include/x86vendor.h b/open-vm-tools/lib/include/x86vendor.h index 88ee60b9b..123f43f53 100644 --- a/open-vm-tools/lib/include/x86vendor.h +++ b/open-vm-tools/lib/include/x86vendor.h @@ -1,6 +1,6 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/xdg.h b/open-vm-tools/lib/include/xdg.h index 57c04decf..12459936d 100644 --- a/open-vm-tools/lib/include/xdg.h +++ b/open-vm-tools/lib/include/xdg.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/include/xdrutil.h b/open-vm-tools/lib/include/xdrutil.h index 30f5efbba..55fb4ea26 100644 --- a/open-vm-tools/lib/include/xdrutil.h +++ b/open-vm-tools/lib/include/xdrutil.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/lock/Makefile.am b/open-vm-tools/lib/lock/Makefile.am index e626a5f1c..205853f4a 100644 --- a/open-vm-tools/lib/lock/Makefile.am +++ b/open-vm-tools/lib/lock/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2010-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/lock/Makefile.in b/open-vm-tools/lib/lock/Makefile.in deleted file mode 100644 index bc2f3f02a..000000000 --- a/open-vm-tools/lib/lock/Makefile.in +++ /dev/null @@ -1,542 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/lock -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libLock_la_LIBADD = -am_libLock_la_OBJECTS = ul.lo ulCondVar.lo ulExcl.lo ulRec.lo ulRW.lo \ - ulSema.lo ulBarrier.lo ulStats.lo -libLock_la_OBJECTS = $(am_libLock_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libLock_la_SOURCES) -DIST_SOURCES = $(libLock_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libLock.la -libLock_la_SOURCES = ul.c ulCondVar.c ulExcl.c ulRec.c ulRW.c ulSema.c \ - ulBarrier.c ulStats.c -AM_CFLAGS = @LIB_USER_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/lock/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/lock/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libLock.la: $(libLock_la_OBJECTS) $(libLock_la_DEPENDENCIES) - $(LINK) $(libLock_la_OBJECTS) $(libLock_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ul.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulBarrier.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulCondVar.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulExcl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulRW.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulRec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulSema.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulStats.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/lock/ul.c b/open-vm-tools/lib/lock/ul.c index 61f4bc010..66a809d3c 100644 --- a/open-vm-tools/lib/lock/ul.c +++ b/open-vm-tools/lib/lock/ul.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/lock/ulBarrier.c b/open-vm-tools/lib/lock/ulBarrier.c index 2c4405960..f88758b69 100644 --- a/open-vm-tools/lib/lock/ulBarrier.c +++ b/open-vm-tools/lib/lock/ulBarrier.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -127,30 +127,9 @@ MXUser_CreateBarrier(const char *userName, // IN: shall be known as } barrier->lock = MXUser_CreateExclLock(properName, rank); - - if (barrier->lock == NULL) { - free(properName); - free(barrier); - - return NULL; - } - - barrier->contexts[0].condVar = MXUser_CreateCondVarExclLock(barrier->lock); barrier->contexts[1].condVar = MXUser_CreateCondVarExclLock(barrier->lock); - if ((barrier->contexts[0].condVar == NULL) || - (barrier->contexts[1].condVar == NULL)) { - MXUser_DestroyCondVar(barrier->contexts[0].condVar); - MXUser_DestroyCondVar(barrier->contexts[1].condVar); - MXUser_DestroyExclLock(barrier->lock); - - free(properName); - free(barrier); - - return NULL; - } - barrier->configCount = count; barrier->curContext = 0; diff --git a/open-vm-tools/lib/lock/ulCondVar.c b/open-vm-tools/lib/lock/ulCondVar.c index b29544866..cc9e79719 100644 --- a/open-vm-tools/lib/lock/ulCondVar.c +++ b/open-vm-tools/lib/lock/ulCondVar.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -588,15 +588,14 @@ MXUserCreateCondVar(MXUserHeader *header, // IN: { MXUserCondVar *condVar = Util_SafeCalloc(1, sizeof *condVar); - if (MXUserCreateInternal(condVar)) { - condVar->signature = MXUserGetSignature(MXUSER_TYPE_CONDVAR); - condVar->header = header; - condVar->ownerLock = lock; - } else { - free(condVar); - condVar = NULL; + if (UNLIKELY(!MXUserCreateInternal(condVar))) { + Panic("%s: native lock initialization routine failed\n", __FUNCTION__); } + condVar->signature = MXUserGetSignature(MXUSER_TYPE_CONDVAR); + condVar->header = header; + condVar->ownerLock = lock; + return condVar; } diff --git a/open-vm-tools/lib/lock/ulExcl.c b/open-vm-tools/lib/lock/ulExcl.c index f6031febb..8a7a3b109 100644 --- a/open-vm-tools/lib/lock/ulExcl.c +++ b/open-vm-tools/lib/lock/ulExcl.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -321,8 +321,7 @@ MXUserDumpExclLock(MXUserHeader *header) // IN: * Create an exclusive lock. * * Results: - * NULL Creation failed - * !NULL Creation succeeded + * A pointer to an exclusive lock. * * Side effects: * None @@ -344,11 +343,8 @@ MXUser_CreateExclLock(const char *userName, // IN: properName = Util_SafeStrdup(userName); } - if (!MXRecLockInit(&lock->recursiveLock)) { - free(properName); - free(lock); - - return NULL; + if (UNLIKELY(!MXRecLockInit(&lock->recursiveLock))) { + Panic("%s: native lock initialization routine failed\n", __FUNCTION__); } lock->header.signature = MXUserGetSignature(MXUSER_TYPE_EXCL); diff --git a/open-vm-tools/lib/lock/ulInt.h b/open-vm-tools/lib/lock/ulInt.h index ed4f8ef04..45f72eb6c 100644 --- a/open-vm-tools/lib/lock/ulInt.h +++ b/open-vm-tools/lib/lock/ulInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/lock/ulIntShared.h b/open-vm-tools/lib/lock/ulIntShared.h index 3a09cf013..8ed59b5f8 100644 --- a/open-vm-tools/lib/lock/ulIntShared.h +++ b/open-vm-tools/lib/lock/ulIntShared.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/lock/ulRW.c b/open-vm-tools/lib/lock/ulRW.c index 1f9d60d8d..d16782fde 100644 --- a/open-vm-tools/lib/lock/ulRW.c +++ b/open-vm-tools/lib/lock/ulRW.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -457,13 +457,7 @@ MXUser_CreateRWLock(const char *userName, // IN: MXUserAddToList(&lock->header); } else { - if (lock->useNative) { - MXUserNativeRWDestroy(&lock->nativeLock); - } - - free(properName); - free(lock); - lock = NULL; + Panic("%s: native lock initialization routine failed\n", __FUNCTION__); } return lock; diff --git a/open-vm-tools/lib/lock/ulRec.c b/open-vm-tools/lib/lock/ulRec.c index 7067a0579..b05739469 100644 --- a/open-vm-tools/lib/lock/ulRec.c +++ b/open-vm-tools/lib/lock/ulRec.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -343,8 +343,7 @@ MXUserDumpRecLock(MXUserHeader *header) // IN: * Only the owner (thread) of a recursive lock may recurse on it. * * Results: - * NULL Creation failed - * !NULL Creation succeeded + * A pointer to an recursive lock. * * Side effects: * None @@ -366,11 +365,8 @@ MXUser_CreateRecLock(const char *userName, // IN: properName = Util_SafeStrdup(userName); } - if (!MXRecLockInit(&lock->recursiveLock)) { - free(properName); - free(lock); - - return NULL; + if (UNLIKELY(!MXRecLockInit(&lock->recursiveLock))) { + Panic("%s: native lock initialization routine failed\n", __FUNCTION__); } lock->vmmLock = NULL; diff --git a/open-vm-tools/lib/lock/ulSema.c b/open-vm-tools/lib/lock/ulSema.c index af6a51327..a68df6317 100644 --- a/open-vm-tools/lib/lock/ulSema.c +++ b/open-vm-tools/lib/lock/ulSema.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -487,9 +487,7 @@ MXUser_CreateSemaphore(const char *userName, // IN: MXUserAddToList(&sema->header); } else { - free(properName); - free(sema); - sema = NULL; + Panic("%s: native lock initialization routine failed\n", __FUNCTION__); } return sema; diff --git a/open-vm-tools/lib/lock/ulStats.c b/open-vm-tools/lib/lock/ulStats.c index 474aedc77..c8b6692c1 100644 --- a/open-vm-tools/lib/lock/ulStats.c +++ b/open-vm-tools/lib/lock/ulStats.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -91,7 +91,7 @@ MXUserAddToList(MXUserHeader *header) // IN/OUT: if (listLock) { MXRecLockAcquire(listLock, NULL); // non-stats - LIST_QUEUE(&header->item, &mxUserLockList); + CircList_Queue(&header->item, &mxUserLockList); MXRecLockRelease(listLock); } } @@ -122,7 +122,7 @@ MXUserRemoveFromList(MXUserHeader *header) // IN/OUT: if (listLock) { MXRecLockAcquire(listLock, NULL); // non-stats - LIST_DEL(&header->item, &mxUserLockList); + CircList_DeleteItem(&header->item, &mxUserLockList); MXRecLockRelease(listLock); } } @@ -1083,8 +1083,8 @@ MXUser_PerLockData(void) highestSerialNumber = lastReportedSerialNumber; - LIST_SCAN(entry, mxUserLockList) { - MXUserHeader *header = LIST_CONTAINER(entry, MXUserHeader, item); + CIRC_LIST_SCAN(entry, mxUserLockList) { + MXUserHeader *header = CIRC_LIST_CONTAINER(entry, MXUserHeader, item); /* Log the ID information for a lock that did exist previously */ if (header->bits.serialNumber > lastReportedSerialNumber) { diff --git a/open-vm-tools/lib/message/Makefile.am b/open-vm-tools/lib/message/Makefile.am index 4c34c9884..3024ed19f 100644 --- a/open-vm-tools/lib/message/Makefile.am +++ b/open-vm-tools/lib/message/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/message/Makefile.in b/open-vm-tools/lib/message/Makefile.in deleted file mode 100644 index 907feaedd..000000000 --- a/open-vm-tools/lib/message/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/message -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libMessage_la_LIBADD = -am_libMessage_la_OBJECTS = message.lo -libMessage_la_OBJECTS = $(am_libMessage_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libMessage_la_SOURCES) -DIST_SOURCES = $(libMessage_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libMessage.la -libMessage_la_SOURCES = message.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/message/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/message/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libMessage.la: $(libMessage_la_OBJECTS) $(libMessage_la_DEPENDENCIES) - $(LINK) $(libMessage_la_OBJECTS) $(libMessage_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/message.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/message/message.c b/open-vm-tools/lib/message/message.c index 53b132230..3fb614713 100644 --- a/open-vm-tools/lib/message/message.c +++ b/open-vm-tools/lib/message/message.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1999-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1999-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/Makefile.am b/open-vm-tools/lib/misc/Makefile.am index 8373864fc..292b3e290 100644 --- a/open-vm-tools/lib/misc/Makefile.am +++ b/open-vm-tools/lib/misc/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -23,6 +23,7 @@ libMisc_la_SOURCES += base64.c libMisc_la_SOURCES += codeset.c libMisc_la_SOURCES += codesetBase.c libMisc_la_SOURCES += codesetOld.c +libMisc_la_SOURCES += codesetUTF8.c libMisc_la_SOURCES += dynarray.c libMisc_la_SOURCES += dynbuf.c libMisc_la_SOURCES += escape.c @@ -42,6 +43,7 @@ libMisc_la_SOURCES += msgList.c libMisc_la_SOURCES += posixDlopen.c libMisc_la_SOURCES += posixPosix.c libMisc_la_SOURCES += posixPwd.c +libMisc_la_SOURCES += prng.c libMisc_la_SOURCES += random.c libMisc_la_SOURCES += sleep.c libMisc_la_SOURCES += timeutil.c diff --git a/open-vm-tools/lib/misc/Makefile.in b/open-vm-tools/lib/misc/Makefile.in deleted file mode 100644 index 41f117a40..000000000 --- a/open-vm-tools/lib/misc/Makefile.in +++ /dev/null @@ -1,575 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/misc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libMisc_la_LIBADD = -am_libMisc_la_OBJECTS = atomic.lo base64.lo codeset.lo codesetBase.lo \ - codesetOld.lo dynarray.lo dynbuf.lo escape.lo hashTable.lo \ - hostinfo.lo hostinfoHV.lo hostinfoPosix.lo hostname.lo \ - hostType.lo idLinux.lo iovector.lo logFixed.lo machineID.lo \ - miscSolaris.lo msgfmt.lo msgList.lo posixDlopen.lo \ - posixPosix.lo posixPwd.lo random.lo sleep.lo timeutil.lo \ - util_misc.lo utilMem.lo vmstdio.lo strutil.lo vthreadBase.lo -libMisc_la_OBJECTS = $(am_libMisc_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libMisc_la_SOURCES) -DIST_SOURCES = $(libMisc_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libMisc.la -libMisc_la_SOURCES = atomic.c base64.c codeset.c codesetBase.c \ - codesetOld.c dynarray.c dynbuf.c escape.c hashTable.c \ - hostinfo.c hostinfoHV.c hostinfoPosix.c hostname.c hostType.c \ - idLinux.c iovector.c logFixed.c machineID.c miscSolaris.c \ - msgfmt.c msgList.c posixDlopen.c posixPosix.c posixPwd.c \ - random.c sleep.c timeutil.c util_misc.c utilMem.c vmstdio.c \ - strutil.c vthreadBase.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/misc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/misc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libMisc.la: $(libMisc_la_OBJECTS) $(libMisc_la_DEPENDENCIES) - $(LINK) $(libMisc_la_OBJECTS) $(libMisc_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codeset.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codesetBase.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codesetOld.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynarray.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynbuf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escape.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashTable.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostType.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostinfoHV.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostinfoPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iovector.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logFixed.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machineID.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miscSolaris.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgList.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgfmt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posixDlopen.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posixPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posixPwd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strutil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeutil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilMem.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util_misc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmstdio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vthreadBase.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/misc/atomic.c b/open-vm-tools/lib/misc/atomic.c index 88e327c2c..4325cfff3 100644 --- a/open-vm-tools/lib/misc/atomic.c +++ b/open-vm-tools/lib/misc/atomic.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/base64.c b/open-vm-tools/lib/misc/base64.c index 08795f8e2..b66cee96a 100644 --- a/open-vm-tools/lib/misc/base64.c +++ b/open-vm-tools/lib/misc/base64.c @@ -60,10 +60,12 @@ enum { }; /* - * Reverse byte map used for decoding. Except for specials (negative values), contains the index - * into Base64[] where given value is found, ie: base64Reverse[Base64[n]] = n, for 0 <= n < 64 + * Reverse byte map used for decoding. Except for specials (negative values), + * contains the index into Base64[] where given value is found, ie: + * base64Reverse[Base64[n]] = n, for 0 <= n < 64 * - * This static initialization replaces, and should have identical result to, this runtime init: + * This static initialization replaces, and should have identical result to, + * this runtime init: * * for (i = 0; i < 256; ++i) { * base64Reverse[i] = isspace(i) ? WS : ILLEGAL; diff --git a/open-vm-tools/lib/misc/codeset.c b/open-vm-tools/lib/misc/codeset.c index b420abc73..8b9077f12 100644 --- a/open-vm-tools/lib/misc/codeset.c +++ b/open-vm-tools/lib/misc/codeset.c @@ -1,5 +1,5 @@ /* ********************************************************** - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * **********************************************************/ /* @@ -200,7 +200,7 @@ CodeSetGetModulePath(HANDLE hModule) // IN } -#elif vmx86_devel && !defined(TEST_CUSTOM_ICU_DATA_FILE) // _WIN32 +#elif vmx86_devel && !vmx86_server && !defined(TEST_CUSTOM_ICU_DATA_FILE) // _WIN32 /* *----------------------------------------------------------------------------- @@ -550,7 +550,7 @@ CodeSet_Init(const char *icuDataDir) // IN: ICU data file location in Current co #else // } _WIN32 { -#if vmx86_devel && !defined(TEST_CUSTOM_ICU_DATA_FILE) +#if vmx86_devel && !vmx86_server && !defined(TEST_CUSTOM_ICU_DATA_FILE) { char *modPath; char *lastSlash; @@ -641,7 +641,7 @@ CodeSet_Init(const char *icuDataDir) // IN: ICU data file location in Current co #endif // } _WIN32 -#if vmx86_devel && !defined(TEST_CUSTOM_ICU_DATA_FILE) +#if vmx86_devel && !vmx86_server && !defined(TEST_CUSTOM_ICU_DATA_FILE) found: #endif @@ -654,12 +654,12 @@ CodeSet_Init(const char *icuDataDir) // IN: ICU data file location in Current co ASSERT(memMappedData); udata_setCommonData(memMappedData, &uerr); - if (uerr != U_ZERO_ERROR) { + if (U_FAILURE(uerr)) { UnmapViewOfFile(memMappedData); goto exit; } udata_setAppData(ICU_DATA_ITEM, memMappedData, &uerr); - if (uerr != U_ZERO_ERROR) { + if (U_FAILURE(uerr)) { UnmapViewOfFile(memMappedData); goto exit; } @@ -972,13 +972,13 @@ CodeSet_GenericToGenericDb(const char *codeIn, // IN uerr = U_ZERO_ERROR; ucnv_setToUCallBack(cvin, toUCb, NULL, NULL, NULL, &uerr); - if (U_ZERO_ERROR != uerr) { + if (U_FAILURE(uerr)) { goto exit; } uerr = U_ZERO_ERROR; ucnv_setFromUCallBack(cvout, fromUCb, NULL, NULL, NULL, &uerr); - if (U_ZERO_ERROR != uerr) { + if (U_FAILURE(uerr)) { goto exit; } @@ -1016,7 +1016,7 @@ CodeSet_GenericToGenericDb(const char *codeIn, // IN bufPiv, &bufPivSource, &bufPivTarget, bufPivEnd, FALSE, TRUE, &uerr); - if (!U_FAILURE(uerr)) { + if (U_SUCCESS(uerr)) { /* * "This was a triumph. I'm making a note here: HUGE SUCCESS. It's * hard to overstate my satisfaction." @@ -1668,7 +1668,7 @@ CodeSet_IsEncodingSupported(const char *name) // IN Bool CodeSet_Validate(const char *buf, // IN: the string - size_t size, // IN: length of string + size_t size, // IN: length of string const char *code) // IN: encoding { #if defined(NO_ICU) @@ -1701,9 +1701,9 @@ CodeSet_Validate(const char *buf, // IN: the string uerr = U_ZERO_ERROR; cv = ucnv_open(code, &uerr); - VERIFY(uerr == U_ZERO_ERROR); + VERIFY(U_SUCCESS(uerr)); ucnv_setToUCallBack(cv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &uerr); - VERIFY(uerr == U_ZERO_ERROR); + VERIFY(U_SUCCESS(uerr)); ucnv_toUChars(cv, NULL, 0, buf, size, &uerr); ucnv_close(cv); diff --git a/open-vm-tools/lib/misc/codesetBase.c b/open-vm-tools/lib/misc/codesetBase.c index 18c21c4e3..28497bfdc 100644 --- a/open-vm-tools/lib/misc/codesetBase.c +++ b/open-vm-tools/lib/misc/codesetBase.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/codesetOld.c b/open-vm-tools/lib/misc/codesetOld.c index 74ed359db..dc980b890 100644 --- a/open-vm-tools/lib/misc/codesetOld.c +++ b/open-vm-tools/lib/misc/codesetOld.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/codesetOld.h b/open-vm-tools/lib/misc/codesetOld.h index 5c60c4e48..57db255d2 100644 --- a/open-vm-tools/lib/misc/codesetOld.h +++ b/open-vm-tools/lib/misc/codesetOld.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/codesetUTF8.c b/open-vm-tools/lib/misc/codesetUTF8.c new file mode 100644 index 000000000..128c5ecce --- /dev/null +++ b/open-vm-tools/lib/misc/codesetUTF8.c @@ -0,0 +1,89 @@ +/* ********************************************************** + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. + * **********************************************************/ + +/* + * Copyright (c) 2008-2009 Bjoern Hoehrmann + * See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + + +#include "vmware.h" +#include "codeset.h" + +#define UTF8_ACCEPT 0 +#define UTF8_REJECT 1 + +static const unsigned char utf8d[] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00..1f + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 20..3f + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 40..5f + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 60..7f + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, // 80..9f + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, // a0..bf + 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, // c0..df + 0xa,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x4,0x3,0x3, // e0..ef + 0xb,0x6,0x6,0x6,0x5,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, // f0..ff + 0x0,0x1,0x2,0x3,0x5,0x8,0x7,0x1,0x1,0x1,0x4,0x6,0x1,0x1,0x1,0x1, // s0..s0 + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,1, // s1..s2 + 1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1, // s3..s4 + 1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,3,1,1,1,1,1,1, // s5..s6 + 1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // s7..s8 +}; + +static INLINE uint32 +CodeSetDecode(uint32 *state, // IN: + uint32 byte) // IN: +{ + uint32 type = utf8d[byte]; + + *state = utf8d[256 + *state*16 + type]; + + return *state; +} + + +Bool +CodeSet_IsStringValidUTF8(const char *bufIn) // IN: +{ + uint32 state = UTF8_ACCEPT; + + while (*bufIn) { + CodeSetDecode(&state, (unsigned char) *bufIn++); + } + + return state == UTF8_ACCEPT; +} + + +Bool +CodeSet_IsValidUTF8(const char *bufIn, // IN: + size_t sizeIn) // IN: +{ + size_t i; + uint32 state = UTF8_ACCEPT; + + for (i = 0; i < sizeIn; i++) { + CodeSetDecode(&state, (unsigned char) *bufIn++); + } + + return state == UTF8_ACCEPT; +} diff --git a/open-vm-tools/lib/misc/dynarray.c b/open-vm-tools/lib/misc/dynarray.c index 424da4511..cc9b46951 100644 --- a/open-vm-tools/lib/misc/dynarray.c +++ b/open-vm-tools/lib/misc/dynarray.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/dynbuf.c b/open-vm-tools/lib/misc/dynbuf.c index 31bd923ab..87df9b892 100644 --- a/open-vm-tools/lib/misc/dynbuf.c +++ b/open-vm-tools/lib/misc/dynbuf.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/escape.c b/open-vm-tools/lib/misc/escape.c index eb28c26f7..94f2317ee 100644 --- a/open-vm-tools/lib/misc/escape.c +++ b/open-vm-tools/lib/misc/escape.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/hashTable.c b/open-vm-tools/lib/misc/hashTable.c index 7a18bb990..1052c777c 100644 --- a/open-vm-tools/lib/misc/hashTable.c +++ b/open-vm-tools/lib/misc/hashTable.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -115,9 +115,9 @@ HashTableEntry *HashTableLookupOrInsert(HashTable *ht, *----------------------------------------------------------------------------- */ -static INLINE uint32 -HashTableComputeHash(HashTable *ht, // IN: hash table - const void *s) // IN: string to hash +static uint32 +HashTableComputeHash(const HashTable *ht, // IN: hash table + const void *s) // IN: string to hash { uint32 h = 0; @@ -186,10 +186,10 @@ HashTableComputeHash(HashTable *ht, // IN: hash table *----------------------------------------------------------------------------- */ -static INLINE Bool -HashTableEqualKeys(HashTable *ht, // IN: hash table - const void *key1, // IN: key - const void *key2) // IN: key +static Bool +HashTableEqualKeys(const HashTable *ht, // IN: hash table + const void *key1, // IN: key + const void *key2) // IN: key { switch (ht->keyType) { case HASH_STRING_KEY: @@ -432,9 +432,9 @@ HashTable_FreeUnsafe(HashTable *ht) // IN/OUT: */ static HashTableEntry * -HashTableLookup(HashTable *ht, // IN: - const void *keyStr, // IN: - uint32 hash) // IN: +HashTableLookup(const HashTable *ht, // IN: + const void *keyStr, // IN: + uint32 hash) // IN: { HashTableEntry *entry; @@ -468,9 +468,9 @@ HashTableLookup(HashTable *ht, // IN: */ Bool -HashTable_Lookup(HashTable *ht, // IN: - const void *keyStr, // IN: - void **clientData) // OUT/OPT: +HashTable_Lookup(const HashTable *ht, // IN: + const void *keyStr, // IN: + void **clientData) // OUT/OPT: { uint32 hash = HashTableComputeHash(ht, keyStr); HashTableEntry *entry = HashTableLookup(ht, keyStr, hash); diff --git a/open-vm-tools/lib/misc/hostType.c b/open-vm-tools/lib/misc/hostType.c index dd9bf817e..7890e551a 100644 --- a/open-vm-tools/lib/misc/hostType.c +++ b/open-vm-tools/lib/misc/hostType.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/hostinfo.c b/open-vm-tools/lib/misc/hostinfo.c index f7661974e..edbc28143 100644 --- a/open-vm-tools/lib/misc/hostinfo.c +++ b/open-vm-tools/lib/misc/hostinfo.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/hostinfoHV.c b/open-vm-tools/lib/misc/hostinfoHV.c index 779ea9d53..afb5f78ba 100644 --- a/open-vm-tools/lib/misc/hostinfoHV.c +++ b/open-vm-tools/lib/misc/hostinfoHV.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/hostinfoInt.h b/open-vm-tools/lib/misc/hostinfoInt.h index edf356422..40dab2c95 100644 --- a/open-vm-tools/lib/misc/hostinfoInt.h +++ b/open-vm-tools/lib/misc/hostinfoInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c index a9e7d6cb3..0f5507061 100644 --- a/open-vm-tools/lib/misc/hostinfoPosix.c +++ b/open-vm-tools/lib/misc/hostinfoPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -75,7 +75,7 @@ #include #endif #if !defined(sun) && !defined __ANDROID__ && (!defined(USING_AUTOCONF) || (defined(HAVE_SYS_IO_H) && defined(HAVE_SYS_SYSINFO_H))) -#if defined(__i386__) || defined(__x86_64__) +#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) #include #else #define NO_IOPL @@ -572,7 +572,10 @@ HostinfoGetOSShortName(char *distro, // IN: full distro name Str_Strcpy(distroShort, STR_OS_ASIANUX_4, distroShortSize); } else if (strstr(distroLower, "asianux server 5") || strstr(distroLower, "asianux client 5")) { - Str_Strcpy(distroShort, STR_OS_ASIANUX_5, distroShortSize); + Str_Strcpy(distroShort, STR_OS_ASIANUX_7, distroShortSize); + } else if (strstr(distroLower, "asianux server 7") || + strstr(distroLower, "asianux client 7")) { + Str_Strcpy(distroShort, STR_OS_ASIANUX_7, distroShortSize); } else if (strstr(distroLower, "aurox")) { Str_Strcpy(distroShort, STR_OS_AUROX, distroShortSize); } else if (strstr(distroLower, "black cat")) { @@ -580,7 +583,13 @@ HostinfoGetOSShortName(char *distro, // IN: full distro name } else if (strstr(distroLower, "cobalt")) { Str_Strcpy(distroShort, STR_OS_COBALT, distroShortSize); } else if (StrUtil_StartsWith(distroLower, "centos")) { - Str_Strcpy(distroShort, STR_OS_CENTOS, distroShortSize); + if (strstr(distroLower, "6.")) { + Str_Strcpy(distroShort, STR_OS_CENTOS6, distroShortSize); + } else if (strstr(distroLower, "7.")) { + Str_Strcpy(distroShort, STR_OS_CENTOS7, distroShortSize); + } else { + Str_Strcpy(distroShort, STR_OS_CENTOS, distroShortSize); + } } else if (strstr(distroLower, "conectiva")) { Str_Strcpy(distroShort, STR_OS_CONECTIVA, distroShortSize); } else if (strstr(distroLower, "debian")) { @@ -594,6 +603,10 @@ HostinfoGetOSShortName(char *distro, // IN: full distro name Str_Strcpy(distroShort, STR_OS_DEBIAN_7, distroShortSize); } else if (strstr(distroLower, "8.")) { Str_Strcpy(distroShort, STR_OS_DEBIAN_8, distroShortSize); + } else if (strstr(distroLower, "9.")) { + Str_Strcpy(distroShort, STR_OS_DEBIAN_9, distroShortSize); + } else if (strstr(distroLower, "10.")) { + Str_Strcpy(distroShort, STR_OS_DEBIAN_10, distroShortSize); } } else if (StrUtil_StartsWith(distroLower, "enterprise linux") || StrUtil_StartsWith(distroLower, "oracle")) { @@ -604,7 +617,13 @@ HostinfoGetOSShortName(char *distro, // IN: full distro name * Not sure why they didn't brand their releases as "Oracle Enterprise * Linux". Oh well. It's fixed in 6.0, though. */ - Str_Strcpy(distroShort, STR_OS_ORACLE, distroShortSize); + if (strstr(distroLower, "6.")) { + Str_Strcpy(distroShort, STR_OS_ORACLE6, distroShortSize); + } else if (strstr(distroLower, "7.")) { + Str_Strcpy(distroShort, STR_OS_ORACLE7, distroShortSize); + } else { + Str_Strcpy(distroShort, STR_OS_ORACLE, distroShortSize); + } } else if (strstr(distroLower, "fedora")) { Str_Strcpy(distroShort, STR_OS_FEDORA, distroShortSize); } else if (strstr(distroLower, "gentoo")) { @@ -723,11 +742,11 @@ HostinfoReadDistroFile(char *filename, // IN: distro version file name if (tmpDistroPos) { sscanf(tmpDistroPos, lsbFields[i].scanstring, distroPart); if (distroPart[0] == '"') { - char *tmpMakeNull = NULL; + char *tmpMakeNull; tmpDistroPos += strlen(lsbFields[i].name) + 1; tmpMakeNull = strchr(tmpDistroPos + 1 , '"'); - if (tmpMakeNull) { + if (tmpMakeNull != NULL) { *tmpMakeNull = '\0'; Str_Strcat(distro, tmpDistroPos, distroSize); *tmpMakeNull = '"' ; @@ -879,7 +898,6 @@ HostinfoOSData(void) return FALSE; } - if (strlen(buf.sysname) + strlen(buf.release) + 3 > sizeof osNameFull) { Warning("%s: Error: buffer too small\n", __FUNCTION__); @@ -891,13 +909,21 @@ HostinfoOSData(void) buf.release); #if defined USERWORLD - if (buf.release[0] <= '4') { + /* The most recent osName always goes here. */ + Str_Strcpy(osName, "vmkernel65", sizeof osName); + + /* Handle any special cases */ + if ((buf.release[0] <= '4') && (buf.release[1] == '.')) { Str_Strcpy(osName, "vmkernel", sizeof osName); - } else { + } else if ((buf.release[0] == '5') && (buf.release[1] == '.')) { Str_Strcpy(osName, "vmkernel5", sizeof osName); + } else if ((buf.release[0] >= '6') && (buf.release[1] == '.')) { + if (buf.release[2] < '5') { + Str_Strcpy(osName, "vmkernel6", sizeof osName); + } } - Str_Snprintf(osNameFull, sizeof osNameFull, "VMware ESXi %c.x", - buf.release[0]); + + Str_Snprintf(osNameFull, sizeof osNameFull, "VMware ESXi %s", buf.release); #elif defined __APPLE__ { /* @@ -962,18 +988,33 @@ HostinfoOSData(void) */ majorVersion = Hostinfo_OSVersion(0); - if (majorVersion < 2 || (majorVersion == 2 && Hostinfo_OSVersion(1) < 4)) { + if (majorVersion < 2) { Str_Strcpy(distro, STR_OS_OTHER_FULL, distroSize); Str_Strcpy(distroShort, STR_OS_OTHER, distroSize); - } else if (majorVersion == 2 && Hostinfo_OSVersion(1) < 6) { - Str_Strcpy(distro, STR_OS_OTHER_24_FULL, distroSize); - Str_Strcpy(distroShort, STR_OS_OTHER_24, distroSize); } else if (majorVersion == 2) { - Str_Strcpy(distro, STR_OS_OTHER_26_FULL, distroSize); - Str_Strcpy(distroShort, STR_OS_OTHER_26, distroSize); - } else { + if (Hostinfo_OSVersion(1) < 4) { + Str_Strcpy(distro, STR_OS_OTHER_FULL, distroSize); + Str_Strcpy(distroShort, STR_OS_OTHER, distroSize); + } else if (Hostinfo_OSVersion(1) < 6) { + Str_Strcpy(distro, STR_OS_OTHER_24_FULL, distroSize); + Str_Strcpy(distroShort, STR_OS_OTHER_24, distroSize); + } else { + Str_Strcpy(distro, STR_OS_OTHER_26_FULL, distroSize); + Str_Strcpy(distroShort, STR_OS_OTHER_26, distroSize); + } + } else if (majorVersion == 3) { Str_Strcpy(distro, STR_OS_OTHER_3X_FULL, distroSize); Str_Strcpy(distroShort, STR_OS_OTHER_3X, distroSize); + } else { + /* + * Anything newer than this code explicitly handles returns the + * "highest" known short description and a dynamically created, + * appropriate long description. + */ + + Str_Sprintf(distro, sizeof distro, "Other Linux %d.%d kernel", + majorVersion, Hostinfo_OSVersion(1)); + Str_Strcpy(distroShort, STR_OS_OTHER_3X, distroSize); } /* @@ -981,7 +1022,7 @@ HostinfoOSData(void) */ lsbOutput = HostinfoGetCmdOutput("/usr/bin/lsb_release -sd 2>/dev/null"); - if (!lsbOutput) { + if (lsbOutput == NULL) { int i; /* @@ -1777,7 +1818,7 @@ HostinfoSystemTimerPosix(VmTimeType *result) // OUT } return FALSE; #else -#if vmx86_server && defined(GLIBC_VERSION_23) +#if vmx86_server # error Posix clock_gettime support required on ESX #endif # define vmx86_posix 0 diff --git a/open-vm-tools/lib/misc/hostname.c b/open-vm-tools/lib/misc/hostname.c index 06b20769d..5a4d6ea03 100644 --- a/open-vm-tools/lib/misc/hostname.c +++ b/open-vm-tools/lib/misc/hostname.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/idLinux.c b/open-vm-tools/lib/misc/idLinux.c index 58bcb532f..fae31bf4f 100644 --- a/open-vm-tools/lib/misc/idLinux.c +++ b/open-vm-tools/lib/misc/idLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/iovector.c b/open-vm-tools/lib/misc/iovector.c index 54f083a76..a731bb84a 100644 --- a/open-vm-tools/lib/misc/iovector.c +++ b/open-vm-tools/lib/misc/iovector.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/logFixed.c b/open-vm-tools/lib/misc/logFixed.c index 22afacd9f..47bc34a54 100644 --- a/open-vm-tools/lib/misc/logFixed.c +++ b/open-vm-tools/lib/misc/logFixed.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/machineID.c b/open-vm-tools/lib/misc/machineID.c index 1f60a804f..c90989c89 100644 --- a/open-vm-tools/lib/misc/machineID.c +++ b/open-vm-tools/lib/misc/machineID.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/miscSolaris.c b/open-vm-tools/lib/misc/miscSolaris.c index a6708b5c5..0d19d7066 100644 --- a/open-vm-tools/lib/misc/miscSolaris.c +++ b/open-vm-tools/lib/misc/miscSolaris.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/msgList.c b/open-vm-tools/lib/misc/msgList.c index 0b6d01eab..6e3ffa38c 100644 --- a/open-vm-tools/lib/misc/msgList.c +++ b/open-vm-tools/lib/misc/msgList.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -491,10 +491,10 @@ MsgList_GetMsgID(const MsgList *messages) // IN: /* *---------------------------------------------------------------------- * - * MsgList_ToString -- + * MsgList_ToEnglishString -- * * Returns the English representation of a MsgList chain. Does NOT - * localize. + * localize. (Use Msg_LocalizeList to localize instead.) * * Results: * Allocated memory containing message. Successive messages @@ -507,7 +507,7 @@ MsgList_GetMsgID(const MsgList *messages) // IN: */ char * -MsgList_ToString(const MsgList *messages) // IN: +MsgList_ToEnglishString(const MsgList *messages) // IN: { char *result = NULL; @@ -520,7 +520,7 @@ MsgList_ToString(const MsgList *messages) // IN: char *tail; if (messages->next != NULL) { - tail = MsgList_ToString(messages->next); + tail = MsgList_ToEnglishString(messages->next); } else { tail = Util_SafeStrdup(""); } diff --git a/open-vm-tools/lib/misc/msgfmt.c b/open-vm-tools/lib/misc/msgfmt.c index 5e67ab850..9c7d59cab 100644 --- a/open-vm-tools/lib/misc/msgfmt.c +++ b/open-vm-tools/lib/misc/msgfmt.c @@ -1,5 +1,5 @@ /* ********************************************************** - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * **********************************************************/ /* diff --git a/open-vm-tools/lib/misc/posixDlopen.c b/open-vm-tools/lib/misc/posixDlopen.c index 3d40938c1..a8f002f6b 100644 --- a/open-vm-tools/lib/misc/posixDlopen.c +++ b/open-vm-tools/lib/misc/posixDlopen.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/posixInt.h b/open-vm-tools/lib/misc/posixInt.h index 598a02ffc..f166ff052 100644 --- a/open-vm-tools/lib/misc/posixInt.h +++ b/open-vm-tools/lib/misc/posixInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/posixPosix.c b/open-vm-tools/lib/misc/posixPosix.c index c0546e631..1918431d2 100644 --- a/open-vm-tools/lib/misc/posixPosix.c +++ b/open-vm-tools/lib/misc/posixPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -494,7 +494,7 @@ int Posix_EuidAccess(const char *pathName, // IN: int mode) // IN: { -#if defined(GLIBC_VERSION_24) +#ifdef __linux__ char *path; int ret; diff --git a/open-vm-tools/lib/misc/posixPwd.c b/open-vm-tools/lib/misc/posixPwd.c index cd5ae2954..aadb31290 100644 --- a/open-vm-tools/lib/misc/posixPwd.c +++ b/open-vm-tools/lib/misc/posixPwd.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/prng.c b/open-vm-tools/lib/misc/prng.c new file mode 100644 index 000000000..64b7bfdab --- /dev/null +++ b/open-vm-tools/lib/misc/prng.c @@ -0,0 +1,217 @@ +/********************************************************* + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * prng.c -- + * + * Pseudo-random bits generation. --hpreg + * (freestanding / no library dependencies) + */ + +#ifdef VMKERNEL +#include "vmk_exports.h" +#endif +#include "vmware.h" +#include "random.h" + + +/* + *----------------------------------------------------------------------------- + * + * RandomFastImpl -- + * + * Return uniformly distributed pseudo-random numbers in the range of 0 + * and 2^32-1 using the algorithm PCG-XSH-RR by M. O'Neill. + * See http://www.pcg-random.org/ + * + * *** NOTE: THIS ALGORITHM IS SUBMITTED BUT NOT (YET) PUBLISHED + * *** IN A PEER-REVIEWED JOURNAL. It looks quite good (certainly better + * *** than Random_Simple), but is subject to change until standardized. + * *** If accepted, will likely replace Random_Quick and Random_Simple. + * + * PCG-XSH-RR is an LCG: + * S' = (N * S + C) mod M + * with N = 6364136223846793005, M = 2^64, and C any odd number + * (thus making M and C relatively prime, as required for LCGs). + * PCG applies an output permutation "xorshift high, random rotate" + * output = rotate32((state ^ (state >> 18)) >> 27, state >> 59) + * The xorshift improves the quality of lower-order bits, and the + * random rotate uses highest-quality bits to further randomize + * lower-order bits; these permutations produce much higher quality + * random numbers than the underlying LCG. + * + * The period of this RNG is 2^64, and takes 3.5-7 cycles depending + * on optimization. + * + * Generated x86_64 assembly (for Random_Fast): + * mov (%rdi),%rcx + * movabs $0x5851f42d4c957f2d,%rax + * mov %rdi,%rdx + * or $0x1,%rdx + * imul %rcx,%rax \ + * add %rdx,%rax } LCG + * mov %rax,(%rdi) / + * mov %rcx,%rax + * shr $0x12,%rax \ + * xor %rcx,%rax \ + * shr $0x3b,%rcx } rotate32 + * shr $0x1b,%rax / + * ror %cl,%eax / + * retq + * + * Results: + * A random number in the specified range is returned. + * + * Side Effects: + * The RNG context is modified for later use by Random_Fast. + * + *----------------------------------------------------------------------------- + */ + +static INLINE uint32 +RandomRor(uint32 val, // IN: + unsigned rot) // IN: rotation +{ +#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + // Processor has barrel roll right instruction + __asm__("rorl %%cl, %0": "=rm"(val): "0"(val), "c"(rot)); + return val; +#else + // Emulate barrel roll right with two shifts + return (val >> rot) | (val << ((-rot) & 31)); +#endif +} + +static INLINE uint32 +RandomFastImpl(uint64 *rs, // IN/OUT: + uint64 inc) // IN: +{ + uint64 state = *rs; + uint32 xorshift, rot; + + *rs = state * CONST64U(6364136223846793005) + inc; + xorshift = ((state >> 18) ^ state) >> 27; + rot = state >> 59; + return RandomRor(xorshift, rot); +} + +/* + *----------------------------------------------------------------------------- + * + * Random_Fast -- + * Random_FastStream -- + * Random_FastStreamSeed -- + * + * Wrappers around RandomFastImpl to generate specific behaviors. + * Random_Fast: non-deterministic self-seeding based on address + * Random_FastStream: deterministic seeding + * + * The self-seeding generator has two quirks worth mentioning. + * (1) PCG generates the random value and manipulates the state for + * the next use in parallel. (See the disassembly for details). + * The downside of doing so is that the first generated value is + * a mere permutation of the seed, so proper seeding requires running + * the generator once to distribute the seed across all bits. + * (2) PCG discards the 27 least significant state bits as low-quality. + * A naive seed which does not populate the upper bits (including the + * very common choices of 0, getpid(), or time()) effectively starts + * the 2^64 period at 0x00000000. This is statisically valid (we + * would expect 2^32 sequences to generate zero as their first value), + * but unexpected. To work around weak seeds, always run the generator + * once to bypass a potential 0x00000000. This DOES have the + * statistical flaw that 0x00000000 will be slightly less likely. + * Thus, when using Random_Fast, be sure to discard the first TWO values + * to ensure good seeding. If the statistical imbalance in doing so is + * of concern, use Random_FastStream with good (e.g. Random_Crypto) + * seeding, or use Random_Quick which has a stronger seed algorithm. + * + * Results: + * A random number in the specified range is returned. + * + * Side Effects: + * The RNG context is modified for later use by Random_Fast[Stream]. + * + *----------------------------------------------------------------------------- + */ + +uint32 +Random_Fast(uint64 *rs) // IN/OUT: +{ + uint64 inc = (uintptr_t)(void *)rs | 0x1; // stream selector, must be odd + return RandomFastImpl(rs, inc); +} + +uint32 +Random_FastStream(RandomFastContext *rfc) // IN/OUT: +{ + return RandomFastImpl(&rfc->state, rfc->sequence); +} + +void +Random_FastStreamSeed(RandomFastContext *rfc, // OUT: + uint64 seed, // IN: + uint64 seq) // IN: +{ + rfc->state = 0; + rfc->sequence = (seq << 1) | 0x1; // stream selector, must be odd + Random_FastStream(rfc); + rfc->state += seed; + Random_FastStream(rfc); +} + + +/* + *---------------------------------------------------------------------- + * + * Random_Simple -- + * + * Generates the next random number in the pseudo-random sequence + * defined by the multiplicative linear congruential generator + * S' = 16807 * S mod (2^31 - 1). This is the ACM "minimal standard + * random number generator". Based on method described by D.G. Carta + * in CACM, January 1990, optimization to avoid modulo from + * Carl Waldspurger (OSDI 1994). + * + * Usage: provide previous random number as the seed for next one. + * + * Results: + * A random integer number is returned. + * + * Side Effects: + * None. + * + *---------------------------------------------------------------------- + */ + +int +Random_Simple(int seed) // IN: +{ + uint64 product = 33614 * (uint64) seed; + uint32 product_lo = (uint32) (product & 0xFFFFFFFF) >> 1; + uint32 product_hi = product >> 32; + int32 test = product_lo + product_hi; + + return test > 0 ? test : (test & 0x7FFFFFFF) + 1; +} + +#ifdef VMKERNEL +VMK_KERNEL_EXPORT(Random_Fast); +VMK_KERNEL_EXPORT(Random_FastStream); +VMK_KERNEL_EXPORT(Random_FastStreamSeed); +VMK_KERNEL_EXPORT(Random_Simple); +#endif diff --git a/open-vm-tools/lib/misc/random.c b/open-vm-tools/lib/misc/random.c index da06f2132..01f9a8888 100644 --- a/open-vm-tools/lib/misc/random.c +++ b/open-vm-tools/lib/misc/random.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -20,6 +20,7 @@ * random.c -- * * Random bits generation. --hpreg + * (Also see prng.c for freestanding generators) */ #include @@ -38,6 +39,7 @@ #endif #include "vmware.h" +#include "vm_basic_asm.h" // RDTSC() #include "log.h" #include "random.h" #include "util.h" @@ -320,21 +322,17 @@ Random_Quick(rqContext *rs) // IN/OUT: } +#if 0 /* *---------------------------------------------------------------------- * - * Random_Simple -- + * Random_SpeedTest -- * - * Generates the next random number in the pseudo-random sequence - * defined by the multiplicative linear congruential generator - * S' = 33614 * S mod (2^31 - 1). This is the ACM "minimal standard - * random number generator". Based on method described by D.G. Carta - * in CACM, January 1990. - * - * Usage: provide previous random number as the seed for next one. + * Benchmarks the speed of various random number generators. + * (Intended for debugging). * * Results: - * A random integer number is returned. + * Populates *out with cycle counts. * * Side Effects: * None. @@ -342,13 +340,58 @@ Random_Quick(rqContext *rs) // IN/OUT: *---------------------------------------------------------------------- */ -int -Random_Simple(int seed) // IN: +typedef struct { + uint64 nop; + uint64 simple; + uint64 fast; + uint64 quick; +} RandomSpeedTestResults; +void Random_SpeedTest(uint64 iters, RandomSpeedTestResults *out); + +static int ABSOLUTELY_NOINLINE +RandomNop(int *seed) { - uint64 product = 33614 * (uint64) seed; - uint32 product_lo = (uint32) (product & 0xFFFFFFFF) >> 1; - uint32 product_hi = product >> 32; - int32 test = product_lo + product_hi; + return *(volatile int *)seed; +} - return test > 0 ? test : (test & 0x7FFFFFFF) + 1; +void +Random_SpeedTest(uint64 iters, // IN: + RandomSpeedTestResults *out) // OUT: +{ + int i; + uint64 start; + int nop, simple; + uint64 fast; + rqContext *rq; + + simple = nop = getpid(); + Random_FastSeed(&fast, simple); + rq = Random_QuickSeed(nop); + + start = RDTSC(); + for (i = 0; i < iters; i++) { + RandomNop(&nop); + } + out->nop = RDTSC() - start; + + start = RDTSC(); + for (i = 0; i < iters; i++) { + simple = Random_Simple(simple); + } + out->simple = RDTSC() - start; + + start = RDTSC(); + for (i = 0; i < iters; i++) { + Random_Fast(&fast); + } + out->fast = RDTSC() - start; + + start = RDTSC(); + for (i = 0; i < iters; i++) { + Random_Quick(rq); + } + out->quick = RDTSC() - start; + + free(rq); } +#endif diff --git a/open-vm-tools/lib/misc/sha1.c b/open-vm-tools/lib/misc/sha1.c index 42e16a072..03b974ca5 100644 --- a/open-vm-tools/lib/misc/sha1.c +++ b/open-vm-tools/lib/misc/sha1.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -49,9 +49,11 @@ * * 10/14: rberinde: Added SSE3 code and test, cleaned up a bit. * + * 10/15: rberinde: Added multibuffer AVX2 code. + * * If any changes are made to this file, please run: * test-esx -n misc/sha1.sh -*/ + */ #if defined(USERLEVEL) || defined(_WIN32) # include @@ -89,6 +91,12 @@ #include "vm_basic_asm.h" #include "vmk_exports.h" +/* Initialization vectors. */ +static const uint32 sha1InitVec[5] = { 0x67452301, + 0xEFCDAB89, + 0x98BADCFE, + 0x10325476, + 0xC3D2E1F0 }; /* * The SSSE3 implementation is only 64-bit and it is excluded from monitor, @@ -112,10 +120,23 @@ void SHA1_Transform_SSSE3_ASM(uint32 *hash, const uint8 *input, uint64 numBlocks); + /* - * Returns TRUE if we were able to use SSSE3 to apply the transform. See - * SHA1Transform for the function semantics. + *----------------------------------------------------------------------------- + * + * SHA1TransformSSSE3 -- + * + * Speed up transformation with SSSE3 if possible. + * + * Results: + * TRUE if we were able to use SSSE3 to apply the transform. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- */ + static INLINE Bool SHA1TransformSSSE3(uint32 state[5], // IN/OUT const unsigned char *buffer, // IN @@ -152,7 +173,7 @@ SHA1TransformSSSE3(uint32 state[5], // IN/OUT while (numBlocks > 0) { uint32 blocksInIter = MIN(numBlocks, SHA1_SSE_BLOCKS_PER_ITERATION); - X86SSE_Prologue(&save); + X86SSE_Prologue(&save, FALSE /* no AVX2 */); SHA1_Transform_SSSE3_ASM(state, buffer, blocksInIter); X86SSE_Epilogue(&save); @@ -165,6 +186,7 @@ SHA1TransformSSSE3(uint32 state[5], // IN/OUT #else +/* SSSE3 stub for unsupported targets. */ static INLINE Bool SHA1TransformSSSE3(uint32 state[5], const unsigned char *buffer, @@ -176,6 +198,154 @@ SHA1TransformSSSE3(uint32 state[5], #endif +/* + * The AVX2 multi-buffer implementation is 64-bit only and requires GCC 4.7 or + * newer. For now it is only included in the vmkernel. + */ +#if defined(VMKERNEL) + +void SHA1_Transform_AVX2_X8_ASM(uint32 transposedDigests[5][8], + const uint8 *input[8], + uint64 numBlocks); + +/* + *----------------------------------------------------------------------------- + * + * SHA1MultiBufferAVX2 -- + * + * Uses AVX2 code to compute the SHA1 of at most SHA1_MULTI_MAX_BUFFERS + * buffers (if possible). + * + * Note: size must be a multiple of 64! + * + * Results: + * TRUE if we were able to use AVX2 to compute the hashes. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static INLINE Bool +SHA1MultiBufferAVX2(uint32 numBuffers, // IN + uint32 len, // IN + const void *data[], // IN + unsigned char **digests) // OUT +{ + static int useAVX2 = -1; + + uint32 i, j; + uint32 numBlocks = len / 64; + + uint32 state[5][SHA1_MULTI_MAX_BUFFERS]; + const uint8 *ptrs[SHA1_MULTI_MAX_BUFFERS]; + + /* Last block. */ + uint8 lastBlock[64] = {0x80}; + + X86SSE_SaveState save; + + ASSERT(numBuffers <= SHA1_MULTI_MAX_BUFFERS); + ASSERT(len % 64 == 0); + + /* + * In debug mode, don't use AVX2 some of the time to make + * sure the non-SSE version is tested as well. + */ + if (vmx86_debug && RDTSC() % 101 < 20) { + return FALSE; + } + + ASSERT(useAVX2 == -1 || useAVX2 == 0 || useAVX2 == 1); + + /* This is safe even if multiple threads race here. */ + if (useAVX2 == -1) { + useAVX2 = X86SSE_IsAVX2Supported(); + } + + if (useAVX2 == 0) { + return FALSE; + } + + if (numBuffers < 3) { + /* + * This routine is about 2x slower than the regular routine; it is + * not worth using with less than 3 buffers. + */ + return FALSE; + } + + /* Encode the length (in bits, big endian). */ + for (i = 0; i < 4; i++) { + lastBlock[63 - i] = ((len * 8) >> (i * 8)) & 0xFF; + } + + for (i = 0; i < 5; i++) { + for (j = 0; j < SHA1_MULTI_MAX_BUFFERS; j++) { + state[i][j] = sha1InitVec[i]; + } + } + + for (i = 0; i < 8; i++) { + if (i < numBuffers) { + ptrs[i] = data[i]; + } else { + /* + * We don't care about these buffers but the pointers + * need to be valid. + */ + ptrs[i] = data[0]; + } + } + + while (numBlocks > 0) { + uint32 blocksInIter = MIN(numBlocks, SHA1_SSE_BLOCKS_PER_ITERATION); + + X86SSE_Prologue(&save, TRUE /* AVX2 */); + SHA1_Transform_AVX2_X8_ASM(state, ptrs, blocksInIter); + + numBlocks -= blocksInIter; + for (i = 0; i < 8; i++) { + ptrs[i] += 64 * blocksInIter; + } + + if (numBlocks == 0) { + /* Do the last block. */ + for (i = 0; i < 8; i++) { + ptrs[i] = lastBlock; + } + SHA1_Transform_AVX2_X8_ASM(state, ptrs, 1); + } + X86SSE_Epilogue(&save); + } + + for (i = 0; i < numBuffers; i++) { + for (j = 0; j < SHA1_HASH_LEN; j++) { + digests[i][j] = (state[j / 4][i] >> ((3 - j % 4) * 8)) & 0xFF; + } + } + + return TRUE; +} + +#else + +/* AVX2 stub for unsupported targets. */ +static INLINE Bool +SHA1MultiBufferAVX2(uint32 numBuffers, + uint32 len, + const void *data[], + unsigned char **digests) +{ + ASSERT(numBuffers <= SHA1_MULTI_MAX_BUFFERS); + ASSERT(len % 64 == 0); + return FALSE; +} + +#endif + + /* If the endianess is not defined (it is done in string.h of glibc 2.1.1), we default to LE --hpreg */ #ifndef LITTLE_ENDIAN @@ -189,20 +359,32 @@ SHA1TransformSSSE3(uint32 state[5], #define F2(w,x,y) (((w|x)&y)|(w&x)) #define F3(w,x,y) (w^x^y) -/* Initialization vectors. */ -static const uint32 sha1InitVec[5] = { 0x67452301, - 0xEFCDAB89, - 0x98BADCFE, - 0x10325476, - 0xC3D2E1F0 }; - typedef union { unsigned char c[64]; uint32 l[16]; } CHAR64LONG16; + +/* + *----------------------------------------------------------------------------- + * + * R -- + * + * SHA-1 core function. + * + * Results: + * Product in 'f'. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + static void -R(CHAR64LONG16 *block, uint32 *f, int i) +R(CHAR64LONG16 *block, // IN/OUT + uint32 *f, // IN/OUT + int i) // IN { uint32 a, b, c, d, e, round, blk; a = f[0]; @@ -237,10 +419,26 @@ R(CHAR64LONG16 *block, uint32 *f, int i) f[0] = e + round + blk + rol(a, 5); } -/* Hash a single 512-bit block. This is the core of the algorithm. */ + +/* + *----------------------------------------------------------------------------- + * + * SHA1TransformNoSSE -- + * + * Apply SHA-1 transformation on a single 512-bit block. + * + * Results: + * 'state' is updated. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ static void -SHA1TransformNoSSE(uint32 state[5], unsigned char buffer[64]) +SHA1TransformNoSSE(uint32 state[5], // IN/OUT + unsigned char buffer[64]) // IN { int i; uint32 f[5]; @@ -267,10 +465,10 @@ SHA1TransformNoSSE(uint32 state[5], unsigned char buffer[64]) * * SHA1Transform -- * - * Applies the SHA-1 transform on one or more 64-byte block buffers. + * Apply SHA-1 transformation on one or more 512-bit block buffers. * * Results: - * state is updated. + * 'state' is updated. * * Side effects: * None. @@ -303,9 +501,25 @@ SHA1Transform(uint32 state[5], // IN/OUT } } -/* SHA1Init - Initialize new context */ -void SHA1Init(SHA1_CTX* context) +/* + *----------------------------------------------------------------------------- + * + * SHA1Init -- + * + * Fill context with initial SHA1 state. + * + * Results: + * Initialized context. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +SHA1Init(SHA1_CTX* context) // OUT { uint32 i; for (i = 0; i < 5; i++) { @@ -316,11 +530,26 @@ void SHA1Init(SHA1_CTX* context) VMK_KERNEL_EXPORT(SHA1Init); -/* Run your data through this. */ +/* + *----------------------------------------------------------------------------- + * + * SHA1Update -- + * + * Hash data into context. + * + * Results: + * Updated context. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ -void SHA1Update(SHA1_CTX* context, - const unsigned char *data, - size_t len) +void +SHA1Update(SHA1_CTX* context, // IN/OUT + const unsigned char *data, // IN + size_t len) // IN { size_t curOfs, numRemaining; @@ -357,9 +586,25 @@ void SHA1Update(SHA1_CTX* context, VMK_KERNEL_EXPORT(SHA1Update); -/* Add padding and return the message digest. */ +/* + *----------------------------------------------------------------------------- + * + * SHA1Final -- + * + * Add padding and return the message digest. + * + * Results: + * 160 bit SHA1 value in digest. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ -void SHA1Final(unsigned char digest[SHA1_HASH_LEN], SHA1_CTX* context) +void +SHA1Final(unsigned char digest[SHA1_HASH_LEN], // OUT + SHA1_CTX* context) // IN { size_t i, j; unsigned char finalcount[8]; @@ -405,7 +650,7 @@ VMK_KERNEL_EXPORT(SHA1Final); * will NOT compute the "usual" digest of the given buffer. * * Results: - * result contains the 120-bit SHA-1 value. + * 'result' contains the 160-bit SHA-1 value. * * Side effects: * None. @@ -413,9 +658,10 @@ VMK_KERNEL_EXPORT(SHA1Final); *----------------------------------------------------------------------------- */ -void SHA1RawBufferHash(const void *data, // IN - uint32 size, // IN - uint32 result[5]) // OUT +void +SHA1RawBufferHash(const void *data, // IN + uint32 size, // IN + uint32 result[5]) // OUT { uint32 i; @@ -427,3 +673,124 @@ void SHA1RawBufferHash(const void *data, // IN SHA1Transform(result, (const uint8 *) data, size / 64); } VMK_KERNEL_EXPORT(SHA1RawBufferHash); + + +/* + *----------------------------------------------------------------------------- + * + * SHA1RawTransformBlocks -- + * + * !! WARNING !! Do not use unless you know what you are doing! This + * will NOT compute the "usual" digest of the given buffer. + * Meaning the function does _not_ do padding or handle variable buffer + * length. The buffer size must be a multiple of 64 and the caller should to + * take care of the initial state. + * + * Finds the SHA-1 of a "raw" buffer, without doing any preprocessing (does + * NOT add the 0x80 byte, 0x00 padding, and length encoding required for + * the result to be a proper message digest). + * + * This function is the alternative to SHA1RawBufferHash to control the + * initial state. Used by the native random driver. + * + * Results: + * 'state' contains the 160-bit SHA-1 value. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +SHA1RawTransformBlocks(uint32 state[5], // IN/OUT + const unsigned char *buffer, // IN + uint32 numBlocks) // IN +{ + ASSERT(buffer != NULL); + SHA1Transform(state, buffer, numBlocks); +} +VMK_KERNEL_EXPORT(SHA1RawTransformBlocks); + + +/* + *----------------------------------------------------------------------------- + * + * SHA1RawInit -- + * + * Set the initial state for a RAW SHA1 transformations. + * + * You probably want to use SHA1Init. + * + * Results: + * Fill 'state' with initial SHA1 values. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +SHA1RawInit(uint32 state[5]) // OUT +{ + state[0] = sha1InitVec[0]; + state[1] = sha1InitVec[1]; + state[2] = sha1InitVec[2]; + state[3] = sha1InitVec[3]; + state[4] = sha1InitVec[4]; +} +VMK_KERNEL_EXPORT(SHA1RawInit); + + +/* + *----------------------------------------------------------------------------- + * + * SHA1MultiBuffer -- + * + * Computes the digests for multiple buffers of the same length. Supports + * at most SHA1_MULTI_MAX_BUFFERS buffers. + * + * On recent processors (with AVX2) this function yields significantly more + * aggregate throughput compared to hashing each buffer separately. Maximum + * throughput is obtained for SHA1_MULTI_MAX_BUFFERS. + * + * Note: currently, the better throughput is only obtained if the length is + * a multiple of 64. + * + * Results: + * The computed digests in digest[i][j], with 0 <= i < numBuffers and + * 0 <= j < SHA1_HASH_LEN. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +SHA1MultiBuffer(uint32 numBuffers, // IN + uint32 len, // IN + const void *data[], // IN + unsigned char *digests[]) // OUT +{ + uint32 i; + + ASSERT(numBuffers > 0); + ASSERT(numBuffers <= SHA1_MULTI_MAX_BUFFERS); + + if (len % 64 == 0 && + SHA1MultiBufferAVX2(numBuffers, len, data, digests)) { + return; + } + + /* Use the regular routine. */ + for (i = 0; i < numBuffers; i++) { + SHA1_CTX ctx; + + SHA1Init(&ctx); + SHA1Update(&ctx, data[i], len); + SHA1Final(digests[i], &ctx); + } +} +VMK_KERNEL_EXPORT(SHA1MultiBuffer); diff --git a/open-vm-tools/lib/misc/strutil.c b/open-vm-tools/lib/misc/strutil.c index 1ba231273..18684b086 100644 --- a/open-vm-tools/lib/misc/strutil.c +++ b/open-vm-tools/lib/misc/strutil.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -37,6 +37,31 @@ #include "util.h" +/* + *----------------------------------------------------------------------------- + * + * StrUtil_IsEmpty -- + * + * Test if a non-NULL string is empty. + * + * Results: + * TRUE if the string has length 0, FALSE otherwise. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +#ifdef VMX86_DEBUG +static INLINE Bool +StrUtil_IsEmpty(const char *str) // IN: +{ + ASSERT(str != NULL); + return str[0] == '\0'; +} +#endif + /* *----------------------------------------------------------------------------- * @@ -302,11 +327,11 @@ StrUtil_StrToInt(int32 *out, // OUT *out = (int32)val; /* - * Input must be complete, no overflow, and value read must fit into - * 32 bits - both signed and unsigned values are accepted. + * Input must be non-empty, complete, no overflow, and value read must fit + * into 32 bits - both signed and unsigned values are accepted. */ - return *ptr == '\0' && errno != ERANGE && + return ptr != str && *ptr == '\0' && errno != ERANGE && (val == (int32)val || val == (uint32)val); } @@ -344,11 +369,11 @@ StrUtil_StrToUint(uint32 *out, // OUT *out = (uint32)val; /* - * Input must be complete, no overflow, and value read must fit into 32 - * bits - both signed and unsigned values are accepted. + * Input must be non-empty, complete, no overflow, and value read must fit + * into 32 bits - both signed and unsigned values are accepted. */ - return *ptr == '\0' && errno != ERANGE && + return ptr != str && *ptr == '\0' && errno != ERANGE && (val == (uint32)val || val == (int32)val); } @@ -389,7 +414,7 @@ StrUtil_StrToInt64(int64 *out, // OUT: The output value *out = strtoll(str, &ptr, 0); #endif - return ptr[0] == '\0' && errno != ERANGE; + return ptr != str && ptr[0] == '\0' && errno != ERANGE; } @@ -429,7 +454,7 @@ StrUtil_StrToUint64(uint64 *out, // OUT: The output value *out = strtoull(str, &ptr, 0); #endif - return ptr[0] == '\0' && errno != ERANGE && errno != EINVAL; + return ptr != str && ptr[0] == '\0' && errno != ERANGE && errno != EINVAL; } @@ -475,7 +500,7 @@ StrUtil_StrToSizet(size_t *out, // OUT: The output value *out = strtoul(str, &ptr, 0); #endif - return *ptr == '\0' && errno != ERANGE; + return ptr != str && *ptr == '\0' && errno != ERANGE; } @@ -514,7 +539,7 @@ StrUtil_StrToDouble(double *out, // OUT: The output value * Input must be complete and no overflow. */ - return *ptr == '\0' && errno != ERANGE; + return ptr != str && *ptr == '\0' && errno != ERANGE; } @@ -657,7 +682,7 @@ StrUtil_CapacityToSectorType(SectorType *out, // OUT: The output value /* *----------------------------------------------------------------------------- * - * StrUtil_FormatSizeInBytes -- + * StrUtil_FormatSizeInBytesUnlocalized -- * * Format a size (in bytes) to a string in a user-friendly way. * @@ -1065,7 +1090,7 @@ StrUtil_DynBufPrintf(DynBuf *b, // IN/OUT * * StrUtil_SafeDynBufPrintf -- * - * A 'safe' variant of StrUtil_SafeDynBufPrintf(), which catches + * A 'safe' variant of StrUtil_DynBufPrintf(), which catches * memory allocation failures and panics. * * Results: @@ -1235,3 +1260,115 @@ StrUtil_TrimWhitespace(const char *str) // IN return res; } + + +/* + *----------------------------------------------------------------------------- + * + * StrUtil_ReplaceAll -- + * + * Replaces all occurrences of a non-empty substring with non-NULL pattern + * in non-NULL string. + * + * Results: + * Returns pointer to the allocated resulting string. The caller is + * responsible for freeing it. + * + *----------------------------------------------------------------------------- + */ + +char * +StrUtil_ReplaceAll(const char *orig, // IN + const char *what, // IN + const char *with) // IN +{ + char *result; + const char *current; + char *tmp; + size_t lenWhat; + size_t lenWith; + size_t lenBefore; + size_t occurrences = 0; + size_t lenNew; + + ASSERT(orig != NULL); + ASSERT(!StrUtil_IsEmpty(what)); + ASSERT(with != NULL); + + lenWhat = strlen(what); + lenWith = strlen(with); + + current = orig; + while ((tmp = strstr(current, what)) != NULL) { + current = tmp + lenWhat; + ++occurrences; + } + + lenNew = strlen(orig) + (lenWith - lenWhat) * occurrences; + tmp = Util_SafeMalloc(lenNew + 1); + result = tmp; + + while (occurrences--) { + current = strstr(orig, what); + lenBefore = current - orig; + tmp = memcpy(tmp, orig, lenBefore); + tmp += lenBefore; + tmp = memcpy(tmp, with, lenWith); + tmp += lenWith; + orig += lenBefore + lenWhat; + } + memcpy(tmp, orig, strlen(orig)); + + result[lenNew] = '\0'; + + return result; +} + +#if 0 + +#define FAIL(s) \ + do { \ + printf("FAIL: %s\n", s); \ + exit(1); \ + } while (0) + +#define REPLACE_TEST(_a, _b, _c, _x) \ + do { \ + char *s = StrUtil_ReplaceAll(_a, _b, _c); \ + if (strcmp(_x, s) != 0) { \ + printf("Got: %s\n", s); \ + FAIL("Failed ReplaceAll('" _a "', '" _b "', '" _c "') = '" _x "'"); \ + } \ + free(s); \ + } while (0) + +static void +StrUtil_UnitTests(void) +{ + REPLACE_TEST("", "a", "b", ""); + REPLACE_TEST("a", "a", "a", "a"); + + REPLACE_TEST("a", "a", "b", "b"); + REPLACE_TEST("/a", "a", "b", "/b"); + REPLACE_TEST("a/", "a", "b", "b/"); + + REPLACE_TEST("a/a", "a", "b", "b/b"); + REPLACE_TEST("/a/a", "a", "b", "/b/b"); + REPLACE_TEST("/a/a/", "a", "b", "/b/b/"); + + REPLACE_TEST("a", "a", "long", "long"); + REPLACE_TEST("a/", "a", "long", "long/"); + REPLACE_TEST("/a", "a", "long", "/long"); + + REPLACE_TEST("long", "long", "a", "a"); + REPLACE_TEST("long/", "long", "a", "a/"); + REPLACE_TEST("/long", "long", "a", "/a"); + + REPLACE_TEST("a", "a", "", ""); + REPLACE_TEST("aaa", "a", "", ""); + + REPLACE_TEST("a", "not_found", "b", "a"); +} + +#endif // 0 + diff --git a/open-vm-tools/lib/misc/timeutil.c b/open-vm-tools/lib/misc/timeutil.c index c4d78b5ab..5e3f9ff33 100644 --- a/open-vm-tools/lib/misc/timeutil.c +++ b/open-vm-tools/lib/misc/timeutil.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/utilMem.c b/open-vm-tools/lib/misc/utilMem.c index a527cfa17..4c45cf524 100644 --- a/open-vm-tools/lib/misc/utilMem.c +++ b/open-vm-tools/lib/misc/utilMem.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/util_misc.c b/open-vm-tools/lib/misc/util_misc.c index 473cc8b8d..d7c232e6f 100644 --- a/open-vm-tools/lib/misc/util_misc.c +++ b/open-vm-tools/lib/misc/util_misc.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -361,61 +361,6 @@ Util_IsAbsolutePath(const char *path) // IN: path to check } -/* - *----------------------------------------------------------------------------- - * - * Util_GetPrime -- - * - * Find next prime. - * - * Results: - * The smallest prime number greater than or equal to n0. - * - * Side effects: - * None. - * - *----------------------------------------------------------------------------- - */ - -unsigned -Util_GetPrime(unsigned n0) // IN: -{ - unsigned i, ii, n, nn; - - /* - * Keep the main algorithm clean by catching edge cases here. - * There is no 32-bit prime larger than 4294967291. - */ - - VERIFY(n0 <= 4294967291U); - if (n0 <= 2) { - return 2; - } - - for (n = n0 | 1;; n += 2) { - /* - * Run through the numbers 3,5, ..., sqrt(n) and check that none divides - * n. We exploit the identity (i + 2)^2 = i^2 + 4i + 4 to incrementially - * maintain the square of i (and thus save a multiplication each - * iteration). - * - * 65521 is the largest prime below 0xffff, which is where - * we can stop. Using it instead of 0xffff avoids overflowing ii. - */ - - nn = MIN(n, 65521U * 65521U); - for (i = 3, ii = 9;; ii += 4*i+4, i += 2) { - if (ii > nn) { - return n; - } - if (n % i == 0) { - break; - } - } - } -} - - /* *----------------------------------------------------------------------------- * @@ -444,21 +389,12 @@ Util_GetCurrentThreadId(void) * Linux does not declare gettid, but the raw syscall * works fine. We must supply our own TLS caching. */ -#if defined(GLIBC_VERSION_23) static __thread pid_t tid; if (UNLIKELY(tid == 0)) { tid = (pid_t)syscall(SYS_gettid); ASSERT(tid != -1); // All kernels that support TLS also implement gettid } return tid; -#else - /* - * Always a syscall, but glibc-2.2 doesn't have __thread TLS so we couldn't - * cache anyway. We don't support kernels from before 2.4.11 when SYS_gettid - * was introduced, so no need to check the return value. - */ - return (pid_t)syscall(SYS_gettid); -#endif #elif defined(__ANDROID__) /* diff --git a/open-vm-tools/lib/misc/vmstdio.c b/open-vm-tools/lib/misc/vmstdio.c index fb689803e..0b12cca9f 100644 --- a/open-vm-tools/lib/misc/vmstdio.c +++ b/open-vm-tools/lib/misc/vmstdio.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/misc/vthreadBase.c b/open-vm-tools/lib/misc/vthreadBase.c index 9b5959e59..7b4c4d01a 100644 --- a/open-vm-tools/lib/misc/vthreadBase.c +++ b/open-vm-tools/lib/misc/vthreadBase.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -61,7 +61,8 @@ * threads. If lib/thread is used on top of this library, the lib/thread * NoID function may introduce a smaller limit. * - * On Linux we make use of a combination of __thread and pthread support. + * On Linux we make use of a combination of __thread and pthread support + * (pthread being used to get a cleanup destructor). * On Mac our only option is to use pthreads. * On Windows we could use the compiler supported thread locals but * that has issues when dynamically loaded from a library, so instead @@ -69,12 +70,7 @@ */ #if defined __linux__ -# include /* for __GLIBC_PREREQ */ -# if defined __GLIBC_PREREQ -# if __GLIBC_PREREQ(2, 3) -# define HAVE_TLS -# endif -# endif +# define HAVE_TLS #endif #if defined _WIN32 @@ -271,14 +267,14 @@ VThreadBaseInitKeys(void) VThreadBaseInitKeyWork(&vthreadBaseGlobals.threadIDKey, NULL); } - +#ifdef VMX86_DEBUG static INLINE Bool VThreadBaseAreKeysInited(void) { return Atomic_Read(&vthreadBaseGlobals.baseKey) != VTHREADBASE_INVALID_KEY && Atomic_Read(&vthreadBaseGlobals.threadIDKey) != VTHREADBASE_INVALID_KEY; } - +#endif /* *----------------------------------------------------------------------------- diff --git a/open-vm-tools/lib/netUtil/Makefile.am b/open-vm-tools/lib/netUtil/Makefile.am index 6b13632e0..eddc4ae08 100644 --- a/open-vm-tools/lib/netUtil/Makefile.am +++ b/open-vm-tools/lib/netUtil/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/netUtil/Makefile.in b/open-vm-tools/lib/netUtil/Makefile.in deleted file mode 100644 index ce8b37f0a..000000000 --- a/open-vm-tools/lib/netUtil/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/netUtil -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libNetUtil_la_LIBADD = -am_libNetUtil_la_OBJECTS = netUtilLinux.lo -libNetUtil_la_OBJECTS = $(am_libNetUtil_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libNetUtil_la_SOURCES) -DIST_SOURCES = $(libNetUtil_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libNetUtil.la -libNetUtil_la_SOURCES = netUtilLinux.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/netUtil/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/netUtil/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libNetUtil.la: $(libNetUtil_la_OBJECTS) $(libNetUtil_la_DEPENDENCIES) - $(LINK) $(libNetUtil_la_OBJECTS) $(libNetUtil_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netUtilLinux.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/netUtil/netUtilLinux.c b/open-vm-tools/lib/netUtil/netUtilLinux.c index 13fcc1ea4..56bca8911 100644 --- a/open-vm-tools/lib/netUtil/netUtilLinux.c +++ b/open-vm-tools/lib/netUtil/netUtilLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/nicInfo/Makefile.am b/open-vm-tools/lib/nicInfo/Makefile.am index ff59606ba..de09172bf 100644 --- a/open-vm-tools/lib/nicInfo/Makefile.am +++ b/open-vm-tools/lib/nicInfo/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2014-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/nicInfo/Makefile.in b/open-vm-tools/lib/nicInfo/Makefile.in deleted file mode 100644 index a7b02aa0d..000000000 --- a/open-vm-tools/lib/nicInfo/Makefile.in +++ /dev/null @@ -1,572 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@USE_SLASH_PROC_TRUE@am__append_1 = -DUSE_SLASH_PROC -@HAVE_DNET_TRUE@am__append_2 = @DNET_LIBS@ -subdir = lib/nicInfo -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -libNicInfo_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libNicInfo_la_OBJECTS = libNicInfo_la-compareNicInfo.lo \ - libNicInfo_la-util.lo libNicInfo_la-nicInfo.lo \ - libNicInfo_la-nicInfoPosix.lo -libNicInfo_la_OBJECTS = $(am_libNicInfo_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libNicInfo_la_SOURCES) -DIST_SOURCES = $(libNicInfo_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libNicInfo.la -libNicInfo_la_SOURCES = compareNicInfo.c util.c nicInfo.c \ - nicInfoPosix.c -libNicInfo_la_CPPFLAGS = @GLIB2_CPPFLAGS@ -AM_CFLAGS = $(DNET_CPPFLAGS) $(am__append_1) -libNicInfo_la_LIBADD = $(am__append_2) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/nicInfo/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/nicInfo/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libNicInfo.la: $(libNicInfo_la_OBJECTS) $(libNicInfo_la_DEPENDENCIES) - $(LINK) $(libNicInfo_la_OBJECTS) $(libNicInfo_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libNicInfo_la-compareNicInfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libNicInfo_la-nicInfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libNicInfo_la-nicInfoPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libNicInfo_la-util.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libNicInfo_la-compareNicInfo.lo: compareNicInfo.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libNicInfo_la-compareNicInfo.lo -MD -MP -MF $(DEPDIR)/libNicInfo_la-compareNicInfo.Tpo -c -o libNicInfo_la-compareNicInfo.lo `test -f 'compareNicInfo.c' || echo '$(srcdir)/'`compareNicInfo.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libNicInfo_la-compareNicInfo.Tpo $(DEPDIR)/libNicInfo_la-compareNicInfo.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='compareNicInfo.c' object='libNicInfo_la-compareNicInfo.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libNicInfo_la-compareNicInfo.lo `test -f 'compareNicInfo.c' || echo '$(srcdir)/'`compareNicInfo.c - -libNicInfo_la-util.lo: util.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libNicInfo_la-util.lo -MD -MP -MF $(DEPDIR)/libNicInfo_la-util.Tpo -c -o libNicInfo_la-util.lo `test -f 'util.c' || echo '$(srcdir)/'`util.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libNicInfo_la-util.Tpo $(DEPDIR)/libNicInfo_la-util.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='util.c' object='libNicInfo_la-util.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libNicInfo_la-util.lo `test -f 'util.c' || echo '$(srcdir)/'`util.c - -libNicInfo_la-nicInfo.lo: nicInfo.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libNicInfo_la-nicInfo.lo -MD -MP -MF $(DEPDIR)/libNicInfo_la-nicInfo.Tpo -c -o libNicInfo_la-nicInfo.lo `test -f 'nicInfo.c' || echo '$(srcdir)/'`nicInfo.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libNicInfo_la-nicInfo.Tpo $(DEPDIR)/libNicInfo_la-nicInfo.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nicInfo.c' object='libNicInfo_la-nicInfo.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libNicInfo_la-nicInfo.lo `test -f 'nicInfo.c' || echo '$(srcdir)/'`nicInfo.c - -libNicInfo_la-nicInfoPosix.lo: nicInfoPosix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libNicInfo_la-nicInfoPosix.lo -MD -MP -MF $(DEPDIR)/libNicInfo_la-nicInfoPosix.Tpo -c -o libNicInfo_la-nicInfoPosix.lo `test -f 'nicInfoPosix.c' || echo '$(srcdir)/'`nicInfoPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libNicInfo_la-nicInfoPosix.Tpo $(DEPDIR)/libNicInfo_la-nicInfoPosix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nicInfoPosix.c' object='libNicInfo_la-nicInfoPosix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libNicInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libNicInfo_la-nicInfoPosix.lo `test -f 'nicInfoPosix.c' || echo '$(srcdir)/'`nicInfoPosix.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/nicInfo/compareNicInfo.c b/open-vm-tools/lib/nicInfo/compareNicInfo.c index b4570145b..d96b84e93 100644 --- a/open-vm-tools/lib/nicInfo/compareNicInfo.c +++ b/open-vm-tools/lib/nicInfo/compareNicInfo.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/nicInfo/nicInfo.c b/open-vm-tools/lib/nicInfo/nicInfo.c index f2eb0c700..9975dec60 100644 --- a/open-vm-tools/lib/nicInfo/nicInfo.c +++ b/open-vm-tools/lib/nicInfo/nicInfo.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/nicInfo/nicInfoInt.h b/open-vm-tools/lib/nicInfo/nicInfoInt.h index 6720c8610..4afe58166 100644 --- a/open-vm-tools/lib/nicInfo/nicInfoInt.h +++ b/open-vm-tools/lib/nicInfo/nicInfoInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c index 432463768..c5f7917ac 100644 --- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c +++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -45,6 +45,7 @@ # else # include # endif +#define USE_RESOLVE 1 #endif #ifdef USERWORLD @@ -52,6 +53,8 @@ #include #include #include + +#define USE_RESOLVE 1 #endif #include @@ -71,10 +74,6 @@ * the GNU C Library forked resolv.h and made modifications of their own, also * without changing __RES. * - * glibc 2.1.92 included a patch which provides IPv6 name server support by - * embedding in6_addr pointers in _res._u._ext. Since I only care about major - * and minor numbers, though, I'm going to condition this impl. on glibc 2.2. - * * ISC, OTOH, provided accessing IPv6 servers via a res_getservers API. * TTBOMK, this went public with BIND 8.3.0. Unfortunately __RES wasn't * bumped for this release, so instead I'm going to assume that appearance with @@ -93,13 +92,11 @@ * version. */ -#if defined __GLIBC__ -# if __GLIBC_PREREQ(2,2) -# define RESOLVER_IPV6_EXT -# endif // __GLIBC_PREREQ(2,2) +#if defined __linux__ +# define RESOLVER_IPV6_EXT #elif (__RES > 19991006 || (__RES == 19991006 && defined RES_F_EDNS0ERR)) # define RESOLVER_IPV6_GETSERVERS -#endif // if defined __GLIBC__ +#endif // if defined __linux__ #include "util.h" @@ -134,16 +131,23 @@ #ifndef NO_DNET static void RecordNetworkAddress(GuestNicV3 *nic, const struct addr *addr); static int ReadInterfaceDetails(const struct intf_entry *entry, void *arg); -static Bool RecordResolverInfo(NicInfoV3 *nicInfo); -static void RecordResolverNS(DnsConfigInfo *dnsConfigInfo); static Bool RecordRoutingInfo(NicInfoV3 *nicInfo); + #if !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(USERWORLD) static int GuestInfoGetIntf(const struct intf_entry *entry, void *arg); #endif + #endif + static char *ValidateConvertAddress(const struct sockaddr *addr); +#ifdef USE_RESOLVE +static Bool RecordResolverInfo(NicInfoV3 *nicInfo); +static void RecordResolverNS(DnsConfigInfo *dnsConfigInfo); +#endif + + /* ****************************************************************************** * GuestInfoGetFqdn -- */ /** @@ -167,6 +171,54 @@ GuestInfoGetFqdn(int outBufLen, // IN: length of output buffer } +#ifdef USERWORLD +/* + ****************************************************************************** + * CountNetmaskBits -- */ /** + * CountNetmaskBitsV4 -- */ /** + * CountNetmaskBitsV6 -- */ /** + * + * @brief Count the number of bits set in a IPV4 or IPV6 netmask + * + * @retval the number of bits set + * + ****************************************************************************** + */ + +static unsigned +CountNetmaskBits(uint64_t x) +{ + /* SWAR reduction, much faster than using the loop/shift */ + const uint64_t m1 = 0x5555555555555555; /* binary: 0101... */ + const uint64_t m2 = 0x3333333333333333; /* binary: 00110011 */ + const uint64_t m4 = 0x0f0f0f0f0f0f0f0f; /* binary: 4 zeros, 4 ones */ + + x -= (x >> 1) & m1; /* each 2 bits into those 2 bits */ + x = (x & m2) + ((x >> 2) & m2); /* each 4 bits into those 4 bits */ + x = (x + (x >> 4)) & m4; /* and so on ... */ + x += x >> 8; + x += x >> 16; + x += x >> 32; + return x & 0x7f; +} + +static unsigned +CountNetmaskBitsV4(struct sockaddr *netmask) +{ + uint64_t value = ((struct sockaddr_in *)netmask)->sin_addr.s_addr; + return CountNetmaskBits(value); +} + +static unsigned +CountNetmaskBitsV6(struct sockaddr *netmask) +{ + uint64_t *value = (uint64_t *)&((struct sockaddr_in6 *)netmask)->sin6_addr; + + return CountNetmaskBits(value[0]) + CountNetmaskBits(value[1]); +} +#endif + + /* ****************************************************************************** * GuestInfoGetNicInfo -- */ /** @@ -196,9 +248,11 @@ GuestInfoGetNicInfo(NicInfoV3 *nicInfo) // OUT intf_close(intf); +#ifdef USE_RESOLVE if (!RecordResolverInfo(nicInfo)) { return FALSE; } +#endif if (!RecordRoutingInfo(nicInfo)) { return FALSE; @@ -207,6 +261,7 @@ GuestInfoGetNicInfo(NicInfoV3 *nicInfo) // OUT return TRUE; #elif defined(USERWORLD) struct ifaddrs *ifaddrs = NULL; + if (getifaddrs(&ifaddrs) == 0 && ifaddrs != NULL) { struct ifaddrs *pkt; /* @@ -241,6 +296,7 @@ GuestInfoGetNicInfo(NicInfoV3 *nicInfo) // OUT strncmp(ip->ifa_name, pkt->ifa_name, IFNAMSIZ) == 0) { int family = sa->sa_family; Bool goodAddress = FALSE; + unsigned nBits = 0; /* * Ignore any loopback addresses. */ @@ -248,16 +304,19 @@ GuestInfoGetNicInfo(NicInfoV3 *nicInfo) // OUT struct sockaddr_in *sin = (struct sockaddr_in *)sa; if ((ntohl(sin->sin_addr.s_addr) >> IN_CLASSA_NSHIFT) != IN_LOOPBACKNET) { + nBits = CountNetmaskBitsV4(ip->ifa_netmask); goodAddress = TRUE; } } else if (family == AF_INET6) { struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa; if (!IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr)) { + nBits = CountNetmaskBitsV6(ip->ifa_netmask); goodAddress = TRUE; } } if (goodAddress) { - GuestInfoAddIpAddress(nic, ip->ifa_addr, 0, NULL, NULL); + GuestInfoAddIpAddress(nic, ip->ifa_addr, nBits, NULL, + NULL); } } } @@ -265,6 +324,15 @@ GuestInfoGetNicInfo(NicInfoV3 *nicInfo) // OUT } freeifaddrs(ifaddrs); } + +#ifdef USE_RESOLVE + if (!RecordResolverInfo(nicInfo)) { + return FALSE; + } +#endif + + // XXX - TODO -- fill in routing info + return TRUE; #else return FALSE; @@ -449,6 +517,10 @@ ReadInterfaceDetails(const struct intf_entry *entry, // IN: current interface e return 0; } +#endif // !NO_DNET + + +#ifdef USE_RESOLVE /* ****************************************************************************** @@ -621,6 +693,10 @@ RecordResolverNS(DnsConfigInfo *dnsConfigInfo) // IN #endif // if !defined RESOLVER_IPV6_GETSERVERS } +#endif // USE_RESOLVE + + +#ifndef NO_DNET #ifdef USE_SLASH_PROC /* diff --git a/open-vm-tools/lib/nicInfo/util.c b/open-vm-tools/lib/nicInfo/util.c index 46f24cd58..9f7cbb519 100644 --- a/open-vm-tools/lib/nicInfo/util.c +++ b/open-vm-tools/lib/nicInfo/util.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/panic/Makefile.am b/open-vm-tools/lib/panic/Makefile.am index 49b679331..e97858fc7 100644 --- a/open-vm-tools/lib/panic/Makefile.am +++ b/open-vm-tools/lib/panic/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/panic/Makefile.in b/open-vm-tools/lib/panic/Makefile.in deleted file mode 100644 index ab3a7a100..000000000 --- a/open-vm-tools/lib/panic/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/panic -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libPanic_la_LIBADD = -am_libPanic_la_OBJECTS = panic.lo -libPanic_la_OBJECTS = $(am_libPanic_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libPanic_la_SOURCES) -DIST_SOURCES = $(libPanic_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libPanic.la -libPanic_la_SOURCES = panic.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/panic/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/panic/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libPanic.la: $(libPanic_la_OBJECTS) $(libPanic_la_DEPENDENCIES) - $(LINK) $(libPanic_la_OBJECTS) $(libPanic_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panic.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/panic/panic.c b/open-vm-tools/lib/panic/panic.c index f33050809..7118fa23d 100644 --- a/open-vm-tools/lib/panic/panic.c +++ b/open-vm-tools/lib/panic/panic.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/panicDefault/Makefile.am b/open-vm-tools/lib/panicDefault/Makefile.am index 0b0c50478..9f0965c78 100644 --- a/open-vm-tools/lib/panicDefault/Makefile.am +++ b/open-vm-tools/lib/panicDefault/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/panicDefault/Makefile.in b/open-vm-tools/lib/panicDefault/Makefile.in deleted file mode 100644 index d9239b054..000000000 --- a/open-vm-tools/lib/panicDefault/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/panicDefault -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libPanicDefault_la_LIBADD = -am_libPanicDefault_la_OBJECTS = panicDefault.lo -libPanicDefault_la_OBJECTS = $(am_libPanicDefault_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libPanicDefault_la_SOURCES) -DIST_SOURCES = $(libPanicDefault_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libPanicDefault.la -libPanicDefault_la_SOURCES = panicDefault.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/panicDefault/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/panicDefault/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libPanicDefault.la: $(libPanicDefault_la_OBJECTS) $(libPanicDefault_la_DEPENDENCIES) - $(LINK) $(libPanicDefault_la_OBJECTS) $(libPanicDefault_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panicDefault.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/panicDefault/panicDefault.c b/open-vm-tools/lib/panicDefault/panicDefault.c index 9a412705a..e62c8e2cb 100644 --- a/open-vm-tools/lib/panicDefault/panicDefault.c +++ b/open-vm-tools/lib/panicDefault/panicDefault.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -19,7 +19,7 @@ /* * panic.c -- * - * Basic Panic() + * Basic Panic() */ @@ -48,8 +48,8 @@ */ void -Panic(const char *fmt, // IN: message format - ...) // IN: message format arguments +Panic(const char *fmt, // IN: message format + ...) // IN: message format arguments { va_list ap; diff --git a/open-vm-tools/lib/poll/Makefile.am b/open-vm-tools/lib/poll/Makefile.am index a0951ae06..d3ec844d4 100644 --- a/open-vm-tools/lib/poll/Makefile.am +++ b/open-vm-tools/lib/poll/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2013-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/poll/Makefile.in b/open-vm-tools/lib/poll/Makefile.in deleted file mode 100644 index d1a898191..000000000 --- a/open-vm-tools/lib/poll/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/poll -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libPoll_la_LIBADD = -am_libPoll_la_OBJECTS = poll.lo -libPoll_la_OBJECTS = $(am_libPoll_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libPoll_la_SOURCES) -DIST_SOURCES = $(libPoll_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libPoll.la -libPoll_la_SOURCES = poll.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/poll/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/poll/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libPoll.la: $(libPoll_la_OBJECTS) $(libPoll_la_DEPENDENCIES) - $(LINK) $(libPoll_la_OBJECTS) $(libPoll_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/poll/poll.c b/open-vm-tools/lib/poll/poll.c index c3b5bfdd2..221add046 100644 --- a/open-vm-tools/lib/poll/poll.c +++ b/open-vm-tools/lib/poll/poll.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -1067,7 +1067,6 @@ PollAddRemoveCBThread(void *clientData) // IN: unused /* Add and remove real time and main loop callbacks */ cbLock = MXUser_CreateRecLock("pollUnitTestLock", RANK_pollUnitTestLock); - VERIFY(cbLock); rtDeleted = FALSE; Poll_Callback(POLL_CS_MAIN, periodicFlag[oddIter], @@ -1119,7 +1118,6 @@ PollAddRemoveCBThread(void *clientData) // IN: unused /* Add and remove device callbacks */ cbLock = MXUser_CreateRecLock("pollUnitTestLock", RANK_pollUnitTestLock); - VERIFY(cbLock); drDeleted = FALSE; Poll_Callback(POLL_CS_MAIN, POLL_FLAG_SOCKET | POLL_FLAG_READ | periodicFlag[oddIter], @@ -1942,7 +1940,6 @@ PollUnitTest_StateMachine(void *clientData) // IN: Unused useLocking = TRUE; cbLock = MXUser_CreateRecLock("pollUnitTestLock", RANK_pollUnitTestLock); - VERIFY(cbLock); #ifdef _WIN32 /* Discard sockets used in connect test and re-create them. */ @@ -2063,7 +2060,6 @@ PollUnitTest_StateMachine(void *clientData) // IN: Unused /* The previous test may have destroyed the lock. */ cbLock = MXUser_CreateRecLock("pollUnitTestLock", RANK_pollUnitTestLock); - VERIFY(cbLock); } deviceEv0Count = 0; deviceEv1Count = 0; diff --git a/open-vm-tools/lib/pollGtk/Makefile.am b/open-vm-tools/lib/pollGtk/Makefile.am index 65683c11c..a4e97f538 100644 --- a/open-vm-tools/lib/pollGtk/Makefile.am +++ b/open-vm-tools/lib/pollGtk/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2013-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/pollGtk/Makefile.in b/open-vm-tools/lib/pollGtk/Makefile.in deleted file mode 100644 index d32f56f0c..000000000 --- a/open-vm-tools/lib/pollGtk/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/pollGtk -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libPollGtk_la_LIBADD = -am_libPollGtk_la_OBJECTS = pollGtk.lo -libPollGtk_la_OBJECTS = $(am_libPollGtk_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libPollGtk_la_SOURCES) -DIST_SOURCES = $(libPollGtk_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libPollGtk.la -libPollGtk_la_SOURCES = pollGtk.c -AM_CFLAGS = @GLIB2_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/pollGtk/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/pollGtk/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libPollGtk.la: $(libPollGtk_la_OBJECTS) $(libPollGtk_la_DEPENDENCIES) - $(LINK) $(libPollGtk_la_OBJECTS) $(libPollGtk_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pollGtk.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/pollGtk/pollGtk.c b/open-vm-tools/lib/pollGtk/pollGtk.c index e09fe15f2..9e57d4f56 100644 --- a/open-vm-tools/lib/pollGtk/pollGtk.c +++ b/open-vm-tools/lib/pollGtk/pollGtk.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -232,7 +232,6 @@ PollGtkInit(void) pollState->lock = MXUser_CreateExclLock("pollGtkLock", RANK_pollDefaultLock); - VERIFY(pollState->lock); pollState->deviceTable = g_hash_table_new_full(g_direct_hash, g_direct_equal, diff --git a/open-vm-tools/lib/procMgr/Makefile.am b/open-vm-tools/lib/procMgr/Makefile.am index bb552295d..0ee6d6690 100644 --- a/open-vm-tools/lib/procMgr/Makefile.am +++ b/open-vm-tools/lib/procMgr/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/procMgr/Makefile.in b/open-vm-tools/lib/procMgr/Makefile.in deleted file mode 100644 index 43bbc7fbc..000000000 --- a/open-vm-tools/lib/procMgr/Makefile.in +++ /dev/null @@ -1,536 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@SOLARIS_TRUE@am__append_1 = procMgrSolaris.c -subdir = lib/procMgr -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libProcMgr_la_LIBADD = -am__libProcMgr_la_SOURCES_DIST = procMgrPosix.c procMgrSolaris.c -@SOLARIS_TRUE@am__objects_1 = procMgrSolaris.lo -am_libProcMgr_la_OBJECTS = procMgrPosix.lo $(am__objects_1) -libProcMgr_la_OBJECTS = $(am_libProcMgr_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libProcMgr_la_SOURCES) -DIST_SOURCES = $(am__libProcMgr_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libProcMgr.la -libProcMgr_la_SOURCES = procMgrPosix.c $(am__append_1) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/procMgr/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/procMgr/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libProcMgr.la: $(libProcMgr_la_OBJECTS) $(libProcMgr_la_DEPENDENCIES) - $(LINK) $(libProcMgr_la_OBJECTS) $(libProcMgr_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procMgrPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procMgrSolaris.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/procMgr/procMgrPosix.c b/open-vm-tools/lib/procMgr/procMgrPosix.c index d0e78a4f7..e400c2c40 100644 --- a/open-vm-tools/lib/procMgr/procMgrPosix.c +++ b/open-vm-tools/lib/procMgr/procMgrPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -129,6 +129,8 @@ static Bool ProcMgrKill(pid_t pid, static int ProcMgrGetCommandLineArgs(long pid, DynBuf *argsBuf, char **procCmdName); + +Bool ProcMgr_PromoteEffectiveToReal(void); #endif #ifdef sun @@ -137,34 +139,6 @@ static int ProcMgrGetCommandLineArgs(long pid, #define BASH_PATH "/bin/bash" #endif -#if defined(linux) && !defined(GLIBC_VERSION_23) && !defined(__UCLIBC__) -/* - * Implements the system calls (they are not wrapped by glibc til 2.3.2). - * - * The _syscall3 macro from the Linux kernel headers is not PIC-safe. - * See: http://bugzilla.kernel.org/show_bug.cgi?id=7302 - * - * (In fact, newer Linux kernels don't even define _syscall macros anymore.) - */ - -static INLINE int -setresuid(uid_t ruid, - uid_t euid, - uid_t suid) -{ - return syscall(__NR_setresuid, ruid, euid, suid); -} - - -static INLINE int -setresgid(gid_t ruid, - gid_t euid, - gid_t suid) -{ - return syscall(__NR_setresgid, ruid, euid, suid); -} -#endif - /* *---------------------------------------------------------------------- @@ -1375,6 +1349,21 @@ ProcMgrStartProcess(char const *cmd, // IN: UTF-8 encoded cmd * Child */ +#ifdef __APPLE__ + /* + * On OS X with security fixes, we cannot revert the real uid if + * its changed, so only the effective uid is changed. But for + * running programs we need both. See comments for + * ProcMgr_ImpersonateUserStart() for details. + * + * If it fails, bail since its a security issue if real uid is still + * root. + */ + if (!ProcMgr_PromoteEffectiveToReal()) { + Panic("%s: Could not set real uid to effective\n", __FUNCTION__); + } +#endif + if (NULL != workDir) { if (chdir(workDir) != 0) { Warning("%s: Could not chdir(%s) %s\n", __FUNCTION__, workDir, @@ -1494,7 +1483,7 @@ ProcMgr_ExecAsync(char const *cmd, // IN: UTF-8 command line ProcMgr_AsyncProc *asyncProc = NULL; pid_t pid; int fds[2]; - Bool validExitCode; + Bool validExitCode = FALSE; int exitCode; pid_t resultPid; int readFd, writeFd; @@ -2046,6 +2035,15 @@ ProcMgr_Free(ProcMgr_AsyncProc *asyncProc) // IN * The user name should be UTF-8 encoded, although we do not enforce * it right now. * + * Note that for OS X, we cannot set real uid. Until a security + * patch for 10.10.3 (https://support.apple.com/en-us/HT204659) + * it worked, but since the patch once the real user has been + * changed, it cannot be restored. So for OS X we set just + * the effective uid. This requires additional tweaks in + * ProcMgr_ExecAsync() to call ProcMgr_PromoteEffectiveToReal(), + * and preventing kill(2) from being called since it looks at + * the real uid. + * * Assumes it will be called as root. * * Results: @@ -2107,7 +2105,7 @@ ProcMgr_ImpersonateUserStart(const char *user, // IN: UTF-8 encoded user name #if defined(USERWORLD) ret = Id_SetREGid(ppw->pw_gid, ppw->pw_gid); #elif defined(__APPLE__) - ret = setregid(ppw->pw_gid, ppw->pw_gid); + ret = setegid(ppw->pw_gid); #else ret = setresgid(ppw->pw_gid, ppw->pw_gid, root_gid); #endif @@ -2126,7 +2124,7 @@ ProcMgr_ImpersonateUserStart(const char *user, // IN: UTF-8 encoded user name #if defined(USERWORLD) ret = Id_SetREUid(ppw->pw_uid, ppw->pw_uid); #elif defined(__APPLE__) - ret = setreuid(ppw->pw_uid, ppw->pw_uid); + ret = seteuid(ppw->pw_uid); #else ret = setresuid(ppw->pw_uid, ppw->pw_uid, 0); #endif @@ -2188,7 +2186,7 @@ ProcMgr_ImpersonateUserStop(void) #if defined(USERWORLD) ret = Id_SetREUid(ppw->pw_uid, ppw->pw_uid); #elif defined(__APPLE__) - ret = setreuid(ppw->pw_uid, ppw->pw_uid); + ret = seteuid(ppw->pw_uid); #else ret = setresuid(ppw->pw_uid, ppw->pw_uid, 0); #endif @@ -2201,7 +2199,7 @@ ProcMgr_ImpersonateUserStop(void) #if defined(USERWORLD) ret = Id_SetREGid(ppw->pw_gid, ppw->pw_gid); #elif defined(__APPLE__) - ret = setregid(ppw->pw_gid, ppw->pw_gid); + ret = setegid(ppw->pw_gid); #else ret = setresgid(ppw->pw_gid, ppw->pw_gid, ppw->pw_gid); #endif @@ -2225,6 +2223,51 @@ ProcMgr_ImpersonateUserStop(void) return TRUE; } + +#ifdef __APPLE__ +/* + *---------------------------------------------------------------------- + * + * ProcMgr_PromoteEffectiveToReal -- + * + * Sets the processes real uid and gid to match the effective. + * Once done, it cannot be undone. + * + * See the commentary in ProcMgr_ImpersonateUserStart() for + * why this is needed. + * + * Results: + * TRUE on success + * + * Side effects: + * Real uid is now effective. + * + *---------------------------------------------------------------------- + */ + +Bool +ProcMgr_PromoteEffectiveToReal(void) +{ + int ret; + uid_t uid = geteuid(); + gid_t gid = getegid(); + + ret = setregid(gid, gid); + if (ret < 0) { + Warning("Failed to setregid(%d) %d\n", gid, errno); + return FALSE; + } + ret = setreuid(uid, uid); + if (ret < 0) { + Warning("Failed to setreuid(%d) %d\n", uid, errno); + return FALSE; + } + + return TRUE; +} +#endif // __APPLE__ + + /* *---------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/procMgr/procMgrSolaris.c b/open-vm-tools/lib/procMgr/procMgrSolaris.c index f5a4cada7..ede52d649 100644 --- a/open-vm-tools/lib/procMgr/procMgrSolaris.c +++ b/open-vm-tools/lib/procMgr/procMgrSolaris.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/rpcChannel/Makefile.am b/open-vm-tools/lib/rpcChannel/Makefile.am index 32a9f8ccf..4577b6552 100644 --- a/open-vm-tools/lib/rpcChannel/Makefile.am +++ b/open-vm-tools/lib/rpcChannel/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/rpcChannel/Makefile.in b/open-vm-tools/lib/rpcChannel/Makefile.in deleted file mode 100644 index 5178f81ea..000000000 --- a/open-vm-tools/lib/rpcChannel/Makefile.in +++ /dev/null @@ -1,570 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_VSOCK_TRUE@am__append_1 = vsockChannel.c simpleSocket.c -subdir = lib/rpcChannel -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libRpcChannel_la_LIBADD = -am__libRpcChannel_la_SOURCES_DIST = bdoorChannel.c rpcChannel.c \ - vsockChannel.c simpleSocket.c -@HAVE_VSOCK_TRUE@am__objects_1 = libRpcChannel_la-vsockChannel.lo \ -@HAVE_VSOCK_TRUE@ libRpcChannel_la-simpleSocket.lo -am_libRpcChannel_la_OBJECTS = libRpcChannel_la-bdoorChannel.lo \ - libRpcChannel_la-rpcChannel.lo $(am__objects_1) -libRpcChannel_la_OBJECTS = $(am_libRpcChannel_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libRpcChannel_la_SOURCES) -DIST_SOURCES = $(am__libRpcChannel_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libRpcChannel.la -libRpcChannel_la_SOURCES = bdoorChannel.c rpcChannel.c $(am__append_1) -libRpcChannel_la_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/rpcChannel/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/rpcChannel/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libRpcChannel.la: $(libRpcChannel_la_OBJECTS) $(libRpcChannel_la_DEPENDENCIES) - $(LINK) $(libRpcChannel_la_OBJECTS) $(libRpcChannel_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRpcChannel_la-bdoorChannel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRpcChannel_la-rpcChannel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRpcChannel_la-simpleSocket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRpcChannel_la-vsockChannel.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libRpcChannel_la-bdoorChannel.lo: bdoorChannel.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libRpcChannel_la-bdoorChannel.lo -MD -MP -MF $(DEPDIR)/libRpcChannel_la-bdoorChannel.Tpo -c -o libRpcChannel_la-bdoorChannel.lo `test -f 'bdoorChannel.c' || echo '$(srcdir)/'`bdoorChannel.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libRpcChannel_la-bdoorChannel.Tpo $(DEPDIR)/libRpcChannel_la-bdoorChannel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bdoorChannel.c' object='libRpcChannel_la-bdoorChannel.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libRpcChannel_la-bdoorChannel.lo `test -f 'bdoorChannel.c' || echo '$(srcdir)/'`bdoorChannel.c - -libRpcChannel_la-rpcChannel.lo: rpcChannel.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libRpcChannel_la-rpcChannel.lo -MD -MP -MF $(DEPDIR)/libRpcChannel_la-rpcChannel.Tpo -c -o libRpcChannel_la-rpcChannel.lo `test -f 'rpcChannel.c' || echo '$(srcdir)/'`rpcChannel.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libRpcChannel_la-rpcChannel.Tpo $(DEPDIR)/libRpcChannel_la-rpcChannel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpcChannel.c' object='libRpcChannel_la-rpcChannel.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libRpcChannel_la-rpcChannel.lo `test -f 'rpcChannel.c' || echo '$(srcdir)/'`rpcChannel.c - -libRpcChannel_la-vsockChannel.lo: vsockChannel.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libRpcChannel_la-vsockChannel.lo -MD -MP -MF $(DEPDIR)/libRpcChannel_la-vsockChannel.Tpo -c -o libRpcChannel_la-vsockChannel.lo `test -f 'vsockChannel.c' || echo '$(srcdir)/'`vsockChannel.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libRpcChannel_la-vsockChannel.Tpo $(DEPDIR)/libRpcChannel_la-vsockChannel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vsockChannel.c' object='libRpcChannel_la-vsockChannel.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libRpcChannel_la-vsockChannel.lo `test -f 'vsockChannel.c' || echo '$(srcdir)/'`vsockChannel.c - -libRpcChannel_la-simpleSocket.lo: simpleSocket.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libRpcChannel_la-simpleSocket.lo -MD -MP -MF $(DEPDIR)/libRpcChannel_la-simpleSocket.Tpo -c -o libRpcChannel_la-simpleSocket.lo `test -f 'simpleSocket.c' || echo '$(srcdir)/'`simpleSocket.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libRpcChannel_la-simpleSocket.Tpo $(DEPDIR)/libRpcChannel_la-simpleSocket.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simpleSocket.c' object='libRpcChannel_la-simpleSocket.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcChannel_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libRpcChannel_la-simpleSocket.lo `test -f 'simpleSocket.c' || echo '$(srcdir)/'`simpleSocket.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/rpcChannel/bdoorChannel.c b/open-vm-tools/lib/rpcChannel/bdoorChannel.c index d2827e37b..a91652bc4 100644 --- a/open-vm-tools/lib/rpcChannel/bdoorChannel.c +++ b/open-vm-tools/lib/rpcChannel/bdoorChannel.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -115,19 +115,23 @@ BkdoorChannelShutdown(RpcChannel *chan) /** * Sends the data using the RpcOut library. * + * rpcStatus is valid only when function returns success. + * * @param[in] chan The RPC channel instance. * @param[in] data Data to send. * @param[in] dataLen Number of bytes to send. + * @param[out] rpcStatus Status of RPC command. * @param[out] result Response from other side. * @param[out] resultLen Number of bytes in response. * - * @return The status from the remote end (TRUE if call was successful). + * @return The status from the remote end (TRUE if RPC was sent successfully). */ static gboolean BkdoorChannelSend(RpcChannel *chan, char const *data, size_t dataLen, + Bool *rpcStatus, char **result, size_t *resultLen) { @@ -140,7 +144,7 @@ BkdoorChannelSend(RpcChannel *chan, goto exit; } - ret = RpcOut_send(bdoor->out, data, dataLen, &reply, &replyLen); + ret = RpcOut_send(bdoor->out, data, dataLen, rpcStatus, &reply, &replyLen); /* * This is a hack to try to work around bug 393650 without having to revert @@ -148,8 +152,7 @@ BkdoorChannelSend(RpcChannel *chan, * outgoing message. The issue here is that it's possible for the code to * try to write to the channel when a "reset" has just happened. In these * cases, the current RpcOut channel is not valid anymore, and we'll get an - * error. The RpcOut lib doesn't really reply with a useful error, but it - * does have consistent error messages starting with "RpcOut:". + * error. * * So, if the error is one of those messages, restart the RpcOut channel and * try to send the message again. If this second attempt fails, then give up. @@ -161,12 +164,12 @@ BkdoorChannelSend(RpcChannel *chan, * starts with "RpcOut:", it will trigger this; but I don't think we have * any such handlers. */ - if (!ret && reply != NULL && replyLen > sizeof "RpcOut: " && - g_str_has_prefix(reply, "RpcOut: ")) { + if (!ret) { Debug("RpcOut failure, restarting channel.\n"); RpcOut_stop(bdoor->out); if (RpcOut_start(bdoor->out)) { - ret = RpcOut_send(bdoor->out, data, dataLen, &reply, &replyLen); + ret = RpcOut_send(bdoor->out, data, dataLen, rpcStatus, + &reply, &replyLen); } else { Warning("Couldn't restart RpcOut channel; bad things may happen " "until the RPC channel is reset.\n"); diff --git a/open-vm-tools/lib/rpcChannel/rpcChannel.c b/open-vm-tools/lib/rpcChannel/rpcChannel.c index 39cd63cea..7a97d08ff 100644 --- a/open-vm-tools/lib/rpcChannel/rpcChannel.c +++ b/open-vm-tools/lib/rpcChannel/rpcChannel.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -69,6 +69,8 @@ static gboolean gUseBackdoorOnly = FALSE; */ static gboolean gVSocketFailed = FALSE; +static void RpcChannelStopNoLock(RpcChannel *chan); + /** * Handler for a "ping" message. Does nothing. * @@ -96,13 +98,20 @@ static gboolean RpcChannelRestart(gpointer _chan) { RpcChannelInt *chan = _chan; + gboolean chanStarted; + + /* Synchronize with any RpcChannel_Send calls by other threads. */ + g_static_mutex_lock(&chan->impl.outLock); + + RpcChannelStopNoLock(&chan->impl); - RpcChannel_Stop(&chan->impl); /* Clear vSocket channel failure */ Debug(LGPFX "Clearing backdoor behavior ...\n"); gVSocketFailed = FALSE; - if (!RpcChannel_Start(&chan->impl)) { + chanStarted = RpcChannel_Start(&chan->impl); + g_static_mutex_unlock(&chan->impl.outLock); + if (!chanStarted) { Warning("Channel restart failed [%d]\n", chan->rpcErrorCount); if (chan->resetCb != NULL) { chan->resetCb(&chan->impl, FALSE, chan->resetData); @@ -214,6 +223,8 @@ RpcChannelXdrWrapper(RpcInData *data, RpcInData copy; void *xdrData = NULL; + copy.freeResult = FALSE; + copy.result = NULL; if (rpc->xdrIn != NULL) { xdrData = malloc(rpc->xdrInSize); if (xdrData == NULL) { @@ -261,7 +272,7 @@ RpcChannelXdrWrapper(RpcInData *data, goto exit; } - if (!xdrProc(&xdrs, copy.result)) { + if (!xdrProc(&xdrs, copy.result, 0)) { ret = RPCIN_SETRETVALS(data, "XDR serialization failed.", FALSE); DynXdr_Destroy(&xdrs, TRUE); goto exit; @@ -319,7 +330,7 @@ RpcChannel_BuildXdrCommand(const char *cmd, goto exit; } - if (!proc(&xdrs, xdrData)) { + if (!proc(&xdrs, xdrData, 0)) { goto exit; } @@ -764,19 +775,19 @@ RpcChannel_Start(RpcChannel *chan) /** - * Wrapper for the stop function of an RPC channel struct. + * Stop the RPC channel. + * The outLock must be acquired by the caller. * * @param[in] chan The RPC channel instance. */ -void -RpcChannel_Stop(RpcChannel *chan) +static void +RpcChannelStopNoLock(RpcChannel *chan) { g_return_if_fail(chan != NULL); g_return_if_fail(chan->funcs != NULL); g_return_if_fail(chan->funcs->stop != NULL); - g_static_mutex_lock(&chan->outLock); chan->funcs->stop(chan); if (chan->in != NULL) { @@ -787,6 +798,20 @@ RpcChannel_Stop(RpcChannel *chan) } else { ASSERT(!chan->inStarted); } +} + + +/** + * Wrapper for the stop function of an RPC channel struct. + * + * @param[in] chan The RPC channel instance. + */ + +void +RpcChannel_Stop(RpcChannel *chan) +{ + g_static_mutex_lock(&chan->outLock); + RpcChannelStopNoLock(chan); g_static_mutex_unlock(&chan->outLock); } @@ -845,6 +870,7 @@ RpcChannel_Send(RpcChannel *chan, size_t *resultLen) { gboolean ok; + Bool rpcStatus; char *res = NULL; size_t resLen = 0; const RpcChannelFuncs *funcs; @@ -865,14 +891,14 @@ RpcChannel_Send(RpcChannel *chan, *resultLen = 0; } - ok = funcs->send(chan, data, dataLen, &res, &resLen); + ok = funcs->send(chan, data, dataLen, &rpcStatus, &res, &resLen); if (!ok && (funcs->getType(chan) != RPCCHANNEL_TYPE_BKDOOR) && (funcs->stopRpcOut != NULL)) { - free(res); - res = NULL; - resLen = 0; + free(res); + res = NULL; + resLen = 0; /* retry once */ Debug(LGPFX "Stop RpcOut channel and try to send again ...\n"); @@ -881,7 +907,7 @@ RpcChannel_Send(RpcChannel *chan, /* The channel may get switched from vsocket to backdoor */ funcs = chan->funcs; ASSERT(funcs->send); - ok = funcs->send(chan, data, dataLen, &res, &resLen); + ok = funcs->send(chan, data, dataLen, &rpcStatus, &res, &resLen); goto done; } @@ -896,6 +922,8 @@ RpcChannel_Send(RpcChannel *chan, if (result != NULL) { *result = res; + } else { + free(res); } if (resultLen != NULL) { *resultLen = resLen; @@ -903,7 +931,7 @@ RpcChannel_Send(RpcChannel *chan, exit: g_static_mutex_unlock(&chan->outLock); - return ok; + return ok && rpcStatus; } diff --git a/open-vm-tools/lib/rpcChannel/rpcChannelInt.h b/open-vm-tools/lib/rpcChannel/rpcChannelInt.h index 85c4725b8..510999088 100644 --- a/open-vm-tools/lib/rpcChannel/rpcChannelInt.h +++ b/open-vm-tools/lib/rpcChannel/rpcChannelInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -37,7 +37,7 @@ typedef struct _RpcChannelFuncs{ gboolean (*start)(RpcChannel *); void (*stop)(RpcChannel *); gboolean (*send)(RpcChannel *, char const *data, size_t dataLen, - char **result, size_t *resultLen); + Bool *rpcStatus, char **result, size_t *resultLen); void (*setup)(RpcChannel *chan, GMainContext *mainCtx, const char *appName, gpointer appCtx); void (*shutdown)(RpcChannel *); @@ -46,7 +46,12 @@ typedef struct _RpcChannelFuncs{ gboolean (*stopRpcOut)(RpcChannel *); } RpcChannelFuncs; -/** Defines the interface between the application and the RPC channel. */ +/** + * Defines the interface between the application and the RPC channel. + * + * XXX- outLock is badly named and is used to protect the in and out + * channels, their state (inStarted/outStarted) and _private data. + */ struct _RpcChannel { const RpcChannelFuncs *funcs; gpointer _private; diff --git a/open-vm-tools/lib/rpcChannel/simpleSocket.c b/open-vm-tools/lib/rpcChannel/simpleSocket.c index 041b6f9b2..4b3ff883d 100644 --- a/open-vm-tools/lib/rpcChannel/simpleSocket.c +++ b/open-vm-tools/lib/rpcChannel/simpleSocket.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -61,9 +61,14 @@ static gboolean SocketStartup(void) { #if defined(_WIN32) + static Bool initialized = FALSE; int err; WSADATA wsaData; + if (initialized) { + return TRUE; + } + err = WSAStartup(MAKEWORD(2, 0), &wsaData); if (err) { Warning(LGPFX "Error in WSAStartup: %d[%s]\n", err, @@ -76,39 +81,10 @@ SocketStartup(void) LOBYTE(wsaData.wVersion), HIBYTE(wsaData.wVersion)); return FALSE; } -#endif - - return TRUE; -} - -/* - *----------------------------------------------------------------------------- - * - * SocketCleanup -- - * - * Win32 special socket cleanup. - * - * Results: - * TRUE on success, FALSE on failure. - * - * Side effects: - * None. - * - *----------------------------------------------------------------------------- - */ - -static gboolean -SocketCleanup(void) -{ -#if defined(_WIN32) - int err = WSACleanup(); - if (err) { - Warning(LGPFX "Error in WSACleanup: %d[%s]\n", err, - Err_Errno2String(err)); - return FALSE; - } + initialized = TRUE; #endif + return TRUE; } @@ -145,8 +121,6 @@ Socket_Close(SOCKET sock) Warning(LGPFX "Error in closing socket %d: %d[%s]\n", sock, err, Err_Errno2String(err)); } - - SocketCleanup(); } @@ -272,17 +246,86 @@ Socket_Send(SOCKET fd, // IN } +/* + *---------------------------------------------------------------------------- + * + * SocketConnectVmciInternal -- + * + * Connect to a VSOCK destination in blocking mode + * + * Results: + * The socket created/connected upon success. + * INVALID_SOCKET upon a failure: + * apiErr and sysErr are populated with the proper error codes. + * + * Side effects: + * None + * + *---------------------------------------------------------------------------- + */ +static SOCKET +SocketConnectVmciInternal(const struct sockaddr_vm *destAddr, // IN + unsigned int localPort, // IN + ApiError *apiErr, // OUT + int *sysErr) // OUT +{ + SOCKET fd; + struct sockaddr_vm localAddr; + + fd = socket(destAddr->svm_family, SOCK_STREAM, 0); + if (fd == INVALID_SOCKET) { + *apiErr = SOCKERR_SOCKET; + *sysErr = SocketGetLastError(); + Warning(LGPFX "failed to create socket, error %d: %s\n", + *sysErr, Err_Errno2String(*sysErr)); + return INVALID_SOCKET; + } + + memset(&localAddr, 0, sizeof localAddr); + localAddr.svm_family = destAddr->svm_family; + localAddr.svm_cid = VMCISock_GetLocalCID(); + localAddr.svm_port = localPort; + + if (bind(fd, (struct sockaddr *)&localAddr, sizeof localAddr) != 0) { + *apiErr = SOCKERR_BIND; + *sysErr = SocketGetLastError(); + Debug(LGPFX "Couldn't bind on source port %d, error %d, %s\n", + localPort, *sysErr, Err_Errno2String(*sysErr)); + Socket_Close(fd); + return INVALID_SOCKET; + } + + Debug(LGPFX "Successfully bound to source port %d\n", localPort); + + if (connect(fd, (struct sockaddr *)destAddr, sizeof *destAddr) != 0) { + *apiErr = SOCKERR_CONNECT; + *sysErr = SocketGetLastError(); + Warning(LGPFX "failed to connect (%d => %d), error %d: %s\n", + localPort, destAddr->svm_port, *sysErr, + Err_Errno2String(*sysErr)); + Socket_Close(fd); + return INVALID_SOCKET; + } + + *apiErr = SOCKERR_SUCCESS; + *sysErr = 0; + return fd; +} + + /* *---------------------------------------------------------------------------- * * Socket_ConnectVMCI -- * - * Connect to VMCI port in blocking mode. + * Connect to a VMCI port in blocking mode. * If isPriv is true, we will try to bind the local port to a port that * is less than 1024. * * Results: - * returns the raw socket on sucess, otherwise INVALID_SOCKET; + * The socket created/connected upon success. + * INVALID_SOCKET upon a failure: + * outApiErr and outSysErr are populated with proper error codes. * * Side effects: * None @@ -294,27 +337,28 @@ SOCKET Socket_ConnectVMCI(unsigned int cid, // IN unsigned int port, // IN gboolean isPriv, // IN - SockConnError *outError) // OUT + ApiError *outApiErr, // OUT optional + int *outSysErr) // OUT optional { struct sockaddr_vm addr; + unsigned int localPort; SOCKET fd; - SockConnError error = SOCKERR_GENERIC; - int sysErr; - socklen_t addrLen = sizeof addr; + int sysErr = 0; + ApiError apiErr; int vsockDev = -1; int family = VMCISock_GetAFValueFd(&vsockDev); - if (outError) { - *outError = SOCKERR_SUCCESS; + if (family == -1) { + Warning(LGPFX "Couldn't get VMCI socket family info."); + apiErr = SOCKERR_VMCI_FAMILY; + fd = INVALID_SOCKET; + goto done; } if (!SocketStartup()) { - goto error; - } - - if (family == -1) { - Warning(LGPFX "Couldn't get VMCI socket family info."); - goto error; + apiErr = SOCKERR_STARTUP; + fd = INVALID_SOCKET; + goto done; } memset((char *)&addr, 0, sizeof addr); @@ -324,84 +368,61 @@ Socket_ConnectVMCI(unsigned int cid, // IN Debug(LGPFX "creating new socket, connecting to %u:%u\n", cid, port); - fd = socket(addr.svm_family, SOCK_STREAM, 0); - if (fd == INVALID_SOCKET) { - sysErr = SocketGetLastError(); - Warning(LGPFX "failed to create socket, error %d: %s\n", - sysErr, Err_Errno2String(sysErr)); - goto error; + if (!isPriv) { + fd = SocketConnectVmciInternal(&addr, VMADDR_PORT_ANY, + &apiErr, &sysErr); + goto done; } - if (isPriv) { - struct sockaddr_vm localAddr; - gboolean bindOk = FALSE; - int localPort; - - memset(&localAddr, 0, sizeof localAddr); - localAddr.svm_family = addr.svm_family; - localAddr.svm_cid = VMCISock_GetLocalCID(); - - /* Try to bind to port 1~1023 for a privileged user. */ - for (localPort = PRIVILEGED_PORT_MAX; - localPort >= PRIVILEGED_PORT_MIN; localPort--) { - - localAddr.svm_port = localPort; - - if (bind(fd, (struct sockaddr *)&localAddr, sizeof localAddr) != 0) { - sysErr = SocketGetLastError(); - if (sysErr == SYSERR_EACCESS) { - Debug(LGPFX "Couldn't bind to privileged port for " - "socket %d\n", fd); - error = SOCKERR_EACCESS; - Socket_Close(fd); - goto error; - } - if (sysErr == SYSERR_EADDRINUSE) { - continue; - } - Warning(LGPFX "could not bind socket, error %d: %s\n", sysErr, - Err_Errno2String(sysErr)); - Socket_Close(fd); - error = SOCKERR_BIND; - goto error; - } else { - bindOk = TRUE; - break; - } + /* We are required to use a privileged source port. */ + localPort = PRIVILEGED_PORT_MAX; + while (localPort >= PRIVILEGED_PORT_MIN) { + fd = SocketConnectVmciInternal(&addr, localPort, &apiErr, &sysErr); + if (fd != INVALID_SOCKET) { + goto done; } - - if (!bindOk) { - Debug(LGPFX "Failed to bind to privileged port for socket %d, " - "no port available\n", fd); - error = SOCKERR_BIND; - Socket_Close(fd); - goto error; - } else { - Debug(LGPFX "Successfully bound to port %d for socket %d\n", - localAddr.svm_port, fd); + if (apiErr == SOCKERR_BIND && sysErr == SYSERR_EADDRINUSE) { + --localPort; + continue; /* Try next port */ + } + if (apiErr == SOCKERR_CONNECT && sysErr == SYSERR_ECONNRESET) { + /* + * VMX might be slow releasing a port pair + * when another client closed the client side end. + * Simply try next port. + */ + --localPort; + continue; + } + if (apiErr == SOCKERR_CONNECT && sysErr == SYSERR_EINTR) { + /* + * EINTR on connect due to signal. + * Try again using the same port. + */ + continue; } + /* Unrecoverable error occurred */ + goto done; } - if (connect(fd, (struct sockaddr *)&addr, addrLen) != 0) { - sysErr = SocketGetLastError(); - Debug(LGPFX "socket connect failed, error %d: %s\n", - sysErr, Err_Errno2String(sysErr)); - Socket_Close(fd); - error = SOCKERR_CONNECT; - goto error; - } + Debug(LGPFX "Failed to connect using a privileged port.\n"); + +done: VMCISock_ReleaseAFValueFd(vsockDev); - Debug(LGPFX "socket %d connected\n", fd); - return fd; -error: - if (outError) { - *outError = error; + if (outApiErr) { + *outApiErr = apiErr; } - VMCISock_ReleaseAFValueFd(vsockDev); - return INVALID_SOCKET; + if (outSysErr) { + *outSysErr = sysErr; + } + + if (fd != INVALID_SOCKET) { + Debug(LGPFX "socket %d connected\n", fd); + } + return fd; } @@ -562,11 +583,11 @@ Socket_RecvPacket(SOCKET sock, // IN int *payloadLen) // OUT { gboolean ok; - int32 packetLen; + uint32 packetLen; + uint32 partialPktLen; int packetLenSize = sizeof packetLen; int fullPktLen; char *recvBuf; - int recvBufLen; ok = Socket_Recv(sock, (char *)&packetLen, packetLenSize); if (!ok) { @@ -575,9 +596,13 @@ Socket_RecvPacket(SOCKET sock, // IN return FALSE; } - fullPktLen = ntohl(packetLen) + packetLenSize; - recvBufLen = fullPktLen; - recvBuf = malloc(recvBufLen); + partialPktLen = ntohl(packetLen); + if (partialPktLen > INT_MAX - packetLenSize) { + Panic(LGPFX "Invalid packetLen value 0x%08x\n", packetLen); + } + + fullPktLen = partialPktLen + packetLenSize; + recvBuf = malloc(fullPktLen); if (recvBuf == NULL) { Debug(LGPFX "Could not allocate recv buffer.\n"); return FALSE; diff --git a/open-vm-tools/lib/rpcChannel/simpleSocket.h b/open-vm-tools/lib/rpcChannel/simpleSocket.h index 150a996b7..a715aefbd 100644 --- a/open-vm-tools/lib/rpcChannel/simpleSocket.h +++ b/open-vm-tools/lib/rpcChannel/simpleSocket.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -37,19 +37,22 @@ #include "vmci_defs.h" #include "vmware/guestrpc/tclodefs.h" +/* Describe which socket API call failed */ typedef enum { SOCKERR_SUCCESS, - SOCKERR_GENERIC, + SOCKERR_VMCI_FAMILY, + SOCKERR_STARTUP, + SOCKERR_SOCKET, SOCKERR_CONNECT, - SOCKERR_BIND, - SOCKERR_EACCESS -} SockConnError; + SOCKERR_BIND +} ApiError; #if defined(_WIN32) #define SYSERR_EADDRINUSE WSAEADDRINUSE #define SYSERR_EACCESS WSAEACCES #define SYSERR_EINTR WSAEINTR +#define SYSERR_ECONNRESET WSAECONNRESET typedef int socklen_t; @@ -58,6 +61,7 @@ typedef int socklen_t; #define SYSERR_EADDRINUSE EADDRINUSE #define SYSERR_EACCESS EACCES #define SYSERR_EINTR EINTR +#define SYSERR_ECONNRESET ECONNRESET typedef int SOCKET; #define SOCKET_ERROR (-1) @@ -72,7 +76,8 @@ void Socket_Close(SOCKET sock); SOCKET Socket_ConnectVMCI(unsigned int cid, unsigned int port, gboolean isPriv, - SockConnError *outError); + ApiError *outApiErr, + int *outSysErr); gboolean Socket_Recv(SOCKET fd, char *buf, int len); diff --git a/open-vm-tools/lib/rpcChannel/vsockChannel.c b/open-vm-tools/lib/rpcChannel/vsockChannel.c index 78951f53d..ac2f624ac 100644 --- a/open-vm-tools/lib/rpcChannel/vsockChannel.c +++ b/open-vm-tools/lib/rpcChannel/vsockChannel.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -68,13 +68,14 @@ static void VSockChannelShutdown(RpcChannel *chan); static SOCKET VSockCreateConn(gboolean *isPriv) // OUT { - SockConnError err; + ApiError apiErr; + int sysErr; SOCKET fd; Debug(LGPFX "Creating privileged vsocket ...\n"); fd = Socket_ConnectVMCI(VMCI_HYPERVISOR_CONTEXT_ID, GUESTRPC_RPCI_VSOCK_LISTEN_PORT, - TRUE, &err); + TRUE, &apiErr, &sysErr); if (fd != INVALID_SOCKET) { Debug(LGPFX "Successfully created priv vsocket %d\n", fd); @@ -82,11 +83,11 @@ VSockCreateConn(gboolean *isPriv) // OUT return fd; } - if (err == SOCKERR_EACCESS) { + if (apiErr == SOCKERR_BIND && sysErr == SYSERR_EACCESS) { Debug(LGPFX "Creating unprivileged vsocket ...\n"); fd = Socket_ConnectVMCI(VMCI_HYPERVISOR_CONTEXT_ID, GUESTRPC_RPCI_VSOCK_LISTEN_PORT, - FALSE, &err); + FALSE, &apiErr, &sysErr); if (fd != INVALID_SOCKET) { Debug(LGPFX "Successfully created unpriv vsocket %d\n", fd); *isPriv = FALSE; @@ -94,7 +95,7 @@ VSockCreateConn(gboolean *isPriv) // OUT } } - Debug(LGPFX "Failed to create vsocket channel, err=%d\n", err); + Debug(LGPFX "Failed to create vsocket channel, %d, %d\n", apiErr, sysErr); return INVALID_SOCKET; } @@ -229,8 +230,11 @@ VSockOutStop(VSockOut *out) // IN * caller pass non-NULL reply and repLen arguments. * * Result - * TRUE on success. 'reply' contains the result of the rpc - * FALSE on error. 'reply' will contain a description of the error + * TRUE if RPC was sent successfully. 'reply' contains the result of the rpc. + * rpcStatus tells if the RPC command was processed successfully. + * + * FALSE if RPC could not be sent successfully. 'reply' will contain a + * description of the error. * * In both cases, the caller should not free the reply. * @@ -244,6 +248,7 @@ static gboolean VSockOutSend(VSockOut *out, // IN const char *request, // IN size_t reqLen, // IN + Bool *rpcStatus, // OUT const char **reply, // OUT size_t *repLen) // OUT { @@ -281,10 +286,12 @@ VSockOutSend(VSockOut *out, // IN Debug("VSockOut: recved %d bytes for conn %d\n", out->payloadLen, out->fd); - return out->payload[0] == '1'; + *rpcStatus = out->payload[0] == '1'; + return TRUE; error: *repLen = strlen(*reply); + *rpcStatus = FALSE; return FALSE; } @@ -420,6 +427,9 @@ VSockChannelShutdown(RpcChannel *chan) // IN * can be set to NULL, otherwise, the caller *must* free the result * whether the call is successful or not to avoid memory leak. * + * rpcStatus tells if VMware could process the RPC command successully. + * It is valid only when function returns success. + * * Result: * TRUE on success * FALSE on failure @@ -434,6 +444,7 @@ static gboolean VSockChannelSend(RpcChannel *chan, // IN char const *data, // IN size_t dataLen, // IN + Bool *rpcStatus, // OUT char **result, // OUT optional size_t *resultLen) // OUT optional { @@ -450,7 +461,7 @@ VSockChannelSend(RpcChannel *chan, // IN * We propagate all replies from VSockOutSend: either a reply of the RPC * result or a description of the error on failure. */ - ret = VSockOutSend(vsock->out, data, dataLen, &reply, &replyLen); + ret = VSockOutSend(vsock->out, data, dataLen, rpcStatus, &reply, &replyLen); if (result != NULL) { if (reply != NULL) { diff --git a/open-vm-tools/lib/rpcIn/Makefile.am b/open-vm-tools/lib/rpcIn/Makefile.am index 7dfe045fe..91ecd59dc 100644 --- a/open-vm-tools/lib/rpcIn/Makefile.am +++ b/open-vm-tools/lib/rpcIn/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/rpcIn/Makefile.in b/open-vm-tools/lib/rpcIn/Makefile.in deleted file mode 100644 index 800339734..000000000 --- a/open-vm-tools/lib/rpcIn/Makefile.in +++ /dev/null @@ -1,540 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/rpcIn -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libRpcIn_la_LIBADD = -am_libRpcIn_la_OBJECTS = libRpcIn_la-rpcin.lo -libRpcIn_la_OBJECTS = $(am_libRpcIn_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libRpcIn_la_SOURCES) -DIST_SOURCES = $(libRpcIn_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libRpcIn.la -libRpcIn_la_SOURCES = rpcin.c -libRpcIn_la_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/rpcIn/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/rpcIn/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libRpcIn.la: $(libRpcIn_la_OBJECTS) $(libRpcIn_la_DEPENDENCIES) - $(LINK) $(libRpcIn_la_OBJECTS) $(libRpcIn_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRpcIn_la-rpcin.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libRpcIn_la-rpcin.lo: rpcin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcIn_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libRpcIn_la-rpcin.lo -MD -MP -MF $(DEPDIR)/libRpcIn_la-rpcin.Tpo -c -o libRpcIn_la-rpcin.lo `test -f 'rpcin.c' || echo '$(srcdir)/'`rpcin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libRpcIn_la-rpcin.Tpo $(DEPDIR)/libRpcIn_la-rpcin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rpcin.c' object='libRpcIn_la-rpcin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libRpcIn_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libRpcIn_la-rpcin.lo `test -f 'rpcin.c' || echo '$(srcdir)/'`rpcin.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/rpcIn/rpcin.c b/open-vm-tools/lib/rpcIn/rpcin.c index abe48e611..2f3edecb8 100644 --- a/open-vm-tools/lib/rpcIn/rpcin.c +++ b/open-vm-tools/lib/rpcIn/rpcin.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -1147,7 +1147,7 @@ static Bool RpcInSend(RpcIn *in, // IN int flags) // IN { - Bool status; + Bool status = FALSE; Bool useBackdoor = TRUE; ASSERT(in); diff --git a/open-vm-tools/lib/rpcOut/Makefile.am b/open-vm-tools/lib/rpcOut/Makefile.am index 6b750a359..ebcd6ea5f 100644 --- a/open-vm-tools/lib/rpcOut/Makefile.am +++ b/open-vm-tools/lib/rpcOut/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/rpcOut/Makefile.in b/open-vm-tools/lib/rpcOut/Makefile.in deleted file mode 100644 index 5eab8bba3..000000000 --- a/open-vm-tools/lib/rpcOut/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/rpcOut -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libRpcOut_la_LIBADD = -am_libRpcOut_la_OBJECTS = rpcout.lo -libRpcOut_la_OBJECTS = $(am_libRpcOut_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libRpcOut_la_SOURCES) -DIST_SOURCES = $(libRpcOut_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libRpcOut.la -libRpcOut_la_SOURCES = rpcout.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/rpcOut/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/rpcOut/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libRpcOut.la: $(libRpcOut_la_OBJECTS) $(libRpcOut_la_DEPENDENCIES) - $(LINK) $(libRpcOut_la_OBJECTS) $(libRpcOut_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpcout.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/rpcOut/rpcout.c b/open-vm-tools/lib/rpcOut/rpcout.c index 2e5c326df..a59ce66cd 100644 --- a/open-vm-tools/lib/rpcOut/rpcout.c +++ b/open-vm-tools/lib/rpcOut/rpcout.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -216,8 +216,11 @@ RpcOut_start(RpcOut *out) // IN * caller pass non-NULL reply and repLen arguments. * * Result - * TRUE on success. 'reply' contains the result of the rpc - * FALSE on error. 'reply' will contain a description of the error + * TRUE if RPC was sent successfully. 'reply' contains the result of the rpc. + * rpcStatus tells if the RPC command was processed successfully. + * + * FALSE if RPC could not be sent successfully. 'reply' will contain a + * description of the error. * * In both cases, the caller should not free the reply. * @@ -231,6 +234,7 @@ Bool RpcOut_send(RpcOut *out, // IN char const *request, // IN size_t reqLen, // IN + Bool *rpcStatus, // OUT char const **reply, // OUT size_t *repLen) // OUT { @@ -264,10 +268,11 @@ RpcOut_send(RpcOut *out, // IN return FALSE; } + *rpcStatus = success; *reply = ((const char *)myReply) + 2; *repLen = myRepLen - 2; - return success; + return TRUE; } @@ -322,7 +327,7 @@ RpcOut_stop(RpcOut *out) // IN * * Return value: * TRUE on success. '*reply' contains an allocated result of the rpc - * FALSE on error. '*reply' contains an allocated description of the error + * FALSE on error. '*reply' contains an allocated description of the error * or NULL. * * Side effects: @@ -349,7 +354,7 @@ RpcOut_sendOne(char **reply, // OUT: Result request = Str_Vasprintf(&reqLen, reqFmt, args); va_end(args); - /* + /* * If Str_Vasprintf failed, write NULL into the reply if the caller wanted * a reply back. */ @@ -376,9 +381,9 @@ RpcOut_sendOne(char **reply, // OUT: Result free(request); request = tmp; - /* - * If Str_Asprintf failed, write NULL into reply if the caller wanted - * a reply back. + /* + * If Str_Asprintf failed, write NULL into reply if the caller wanted + * a reply back. */ if (request == NULL) { if (reply != NULL) { @@ -416,6 +421,7 @@ RpcOutSendOneRawWork(void *request, // IN: RPCI command size_t *repLen) // OUT: Length of the result { Bool status; + Bool rpcStatus; /* Stack allocate so this can be used in kernel logging. See 1389199. */ RpcOut out; char const *myReply; @@ -426,7 +432,7 @@ RpcOutSendOneRawWork(void *request, // IN: RPCI command if (!RpcOut_startWithReceiveBuffer(&out, callerReply, callerReplyLen)) { myReply = "RpcOut: Unable to open the communication channel"; myRepLen = strlen(myReply); - + if (callerReply != NULL) { unsigned s = MIN(callerReplyLen - 1, myRepLen); ASSERT(reply == NULL); @@ -437,14 +443,16 @@ RpcOutSendOneRawWork(void *request, // IN: RPCI command return FALSE; } - status = RpcOut_send(&out, request, reqLen, &myReply, &myRepLen); + status = RpcOut_send(&out, request, reqLen, + &rpcStatus, &myReply, &myRepLen); /* On failure, we already have the description of the error */ - Debug("Rpci: Sent request='%s', reply='%s', len=%"FMTSZ"u, status=%d\n", - (char *)request, myReply, myRepLen, status); + Debug("Rpci: Sent request='%s', reply='%s', len=%"FMTSZ"u, " + "status=%d, rpcStatus=%d\n", + (char *)request, myReply, myRepLen, status, rpcStatus); if (reply != NULL) { - /* + /* * If we got a non-NULL reply, make a copy of it, because the reply * we got back is inside the channel buffer, which will get destroyed * at the end of this function. @@ -468,15 +476,15 @@ RpcOutSendOneRawWork(void *request, // IN: RPCI command (*reply)[myRepLen] = 0; } } else { - /* + /* * Our reply was NULL, so just pass the NULL back up to the caller. - */ + */ *reply = NULL; } - - /* - * Only set the length if the caller wanted it and if we got a good - * reply. + + /* + * Only set the length if the caller wanted it and if we got a good + * reply. */ if (repLen != NULL && *reply != NULL) { *repLen = myRepLen; @@ -484,7 +492,7 @@ RpcOutSendOneRawWork(void *request, // IN: RPCI command } if (RpcOut_stop(&out) == FALSE) { - /* + /* * We couldn't stop the channel. Free anything we allocated, give our * client a reply of NULL, and return FALSE. */ @@ -497,7 +505,7 @@ RpcOutSendOneRawWork(void *request, // IN: RPCI command status = FALSE; } - return status; + return status && rpcStatus; } @@ -527,7 +535,7 @@ RpcOutSendOneRawWork(void *request, // IN: RPCI command * * Return value: * TRUE on success. '*reply' contains an allocated result of the rpc - * FALSE on error. '*reply' contains an allocated description of the + * FALSE on error. '*reply' contains an allocated description of the * error or NULL. * * @@ -565,7 +573,7 @@ RpcOut_SendOneRaw(void *request, // IN: RPCI command * * Return value: * TRUE on success. 'reply' contains an allocated result of the rpc - * FALSE on error. 'reply' contains an allocated description of the + * FALSE on error. 'reply' contains an allocated description of the * error or NULL. * * diff --git a/open-vm-tools/lib/rpcVmx/Makefile.am b/open-vm-tools/lib/rpcVmx/Makefile.am index 25586eeea..4229b5d94 100644 --- a/open-vm-tools/lib/rpcVmx/Makefile.am +++ b/open-vm-tools/lib/rpcVmx/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/rpcVmx/Makefile.in b/open-vm-tools/lib/rpcVmx/Makefile.in deleted file mode 100644 index 6caa18de4..000000000 --- a/open-vm-tools/lib/rpcVmx/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/rpcVmx -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libRpcVmx_la_LIBADD = -am_libRpcVmx_la_OBJECTS = rpcvmx.lo -libRpcVmx_la_OBJECTS = $(am_libRpcVmx_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libRpcVmx_la_SOURCES) -DIST_SOURCES = $(libRpcVmx_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libRpcVmx.la -libRpcVmx_la_SOURCES = rpcvmx.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/rpcVmx/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/rpcVmx/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libRpcVmx.la: $(libRpcVmx_la_OBJECTS) $(libRpcVmx_la_DEPENDENCIES) - $(LINK) $(libRpcVmx_la_OBJECTS) $(libRpcVmx_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpcvmx.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/rpcVmx/rpcvmx.c b/open-vm-tools/lib/rpcVmx/rpcvmx.c index 24c6203d1..f215c37a5 100644 --- a/open-vm-tools/lib/rpcVmx/rpcvmx.c +++ b/open-vm-tools/lib/rpcVmx/rpcvmx.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/slashProc/Makefile.am b/open-vm-tools/lib/slashProc/Makefile.am index e78988b0e..b3afe9e5e 100644 --- a/open-vm-tools/lib/slashProc/Makefile.am +++ b/open-vm-tools/lib/slashProc/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/slashProc/Makefile.in b/open-vm-tools/lib/slashProc/Makefile.in deleted file mode 100644 index d3a676900..000000000 --- a/open-vm-tools/lib/slashProc/Makefile.in +++ /dev/null @@ -1,541 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/slashProc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libSlashProc_la_LIBADD = -am_libSlashProc_la_OBJECTS = libSlashProc_la-net.lo -libSlashProc_la_OBJECTS = $(am_libSlashProc_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libSlashProc_la_SOURCES) -DIST_SOURCES = $(libSlashProc_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libSlashProc.la -libSlashProc_la_SOURCES = net.c -libSlashProc_la_CPPFLAGS = @GLIB2_CPPFLAGS@ -AM_CFLAGS = $(DNET_CPPFLAGS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/slashProc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/slashProc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libSlashProc.la: $(libSlashProc_la_OBJECTS) $(libSlashProc_la_DEPENDENCIES) - $(LINK) $(libSlashProc_la_OBJECTS) $(libSlashProc_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSlashProc_la-net.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libSlashProc_la-net.lo: net.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSlashProc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libSlashProc_la-net.lo -MD -MP -MF $(DEPDIR)/libSlashProc_la-net.Tpo -c -o libSlashProc_la-net.lo `test -f 'net.c' || echo '$(srcdir)/'`net.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libSlashProc_la-net.Tpo $(DEPDIR)/libSlashProc_la-net.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='net.c' object='libSlashProc_la-net.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSlashProc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libSlashProc_la-net.lo `test -f 'net.c' || echo '$(srcdir)/'`net.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/slashProc/net.c b/open-vm-tools/lib/slashProc/net.c index 2ea7ded25..1d2a88800 100644 --- a/open-vm-tools/lib/slashProc/net.c +++ b/open-vm-tools/lib/slashProc/net.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/slashProc/slashProcNetInt.h b/open-vm-tools/lib/slashProc/slashProcNetInt.h index 11194de32..a5a7fea8a 100644 --- a/open-vm-tools/lib/slashProc/slashProcNetInt.h +++ b/open-vm-tools/lib/slashProc/slashProcNetInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/sslDirect/Makefile.am b/open-vm-tools/lib/sslDirect/Makefile.am index 98d63dbfd..e058dba0d 100644 --- a/open-vm-tools/lib/sslDirect/Makefile.am +++ b/open-vm-tools/lib/sslDirect/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2013-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/sslDirect/Makefile.in b/open-vm-tools/lib/sslDirect/Makefile.in deleted file mode 100644 index 564b0ae73..000000000 --- a/open-vm-tools/lib/sslDirect/Makefile.in +++ /dev/null @@ -1,556 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2013-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_GRABBITMQPROXY_TRUE@am__append_1 = @SSL_CPPFLAGS@ -@ENABLE_GRABBITMQPROXY_TRUE@am__append_2 = sslDirect.c -@ENABLE_GRABBITMQPROXY_FALSE@am__append_3 = sslStubs.c -subdir = lib/sslDirect -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libSslDirect_la_LIBADD = -am__libSslDirect_la_SOURCES_DIST = sslDirect.c sslStubs.c -@ENABLE_GRABBITMQPROXY_TRUE@am__objects_1 = \ -@ENABLE_GRABBITMQPROXY_TRUE@ libSslDirect_la-sslDirect.lo -@ENABLE_GRABBITMQPROXY_FALSE@am__objects_2 = \ -@ENABLE_GRABBITMQPROXY_FALSE@ libSslDirect_la-sslStubs.lo -am_libSslDirect_la_OBJECTS = $(am__objects_1) $(am__objects_2) -libSslDirect_la_OBJECTS = $(am_libSslDirect_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libSslDirect_la_SOURCES) -DIST_SOURCES = $(am__libSslDirect_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libSslDirect.la -libSslDirect_la_CPPFLAGS = $(am__append_1) -libSslDirect_la_SOURCES = $(am__append_2) $(am__append_3) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/sslDirect/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/sslDirect/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libSslDirect.la: $(libSslDirect_la_OBJECTS) $(libSslDirect_la_DEPENDENCIES) - $(LINK) $(libSslDirect_la_OBJECTS) $(libSslDirect_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSslDirect_la-sslDirect.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSslDirect_la-sslStubs.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libSslDirect_la-sslDirect.lo: sslDirect.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSslDirect_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libSslDirect_la-sslDirect.lo -MD -MP -MF $(DEPDIR)/libSslDirect_la-sslDirect.Tpo -c -o libSslDirect_la-sslDirect.lo `test -f 'sslDirect.c' || echo '$(srcdir)/'`sslDirect.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libSslDirect_la-sslDirect.Tpo $(DEPDIR)/libSslDirect_la-sslDirect.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sslDirect.c' object='libSslDirect_la-sslDirect.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSslDirect_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libSslDirect_la-sslDirect.lo `test -f 'sslDirect.c' || echo '$(srcdir)/'`sslDirect.c - -libSslDirect_la-sslStubs.lo: sslStubs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSslDirect_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libSslDirect_la-sslStubs.lo -MD -MP -MF $(DEPDIR)/libSslDirect_la-sslStubs.Tpo -c -o libSslDirect_la-sslStubs.lo `test -f 'sslStubs.c' || echo '$(srcdir)/'`sslStubs.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libSslDirect_la-sslStubs.Tpo $(DEPDIR)/libSslDirect_la-sslStubs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sslStubs.c' object='libSslDirect_la-sslStubs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libSslDirect_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libSslDirect_la-sslStubs.lo `test -f 'sslStubs.c' || echo '$(srcdir)/'`sslStubs.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/sslDirect/sslDirect.c b/open-vm-tools/lib/sslDirect/sslDirect.c index a86722f86..4e7104b4e 100644 --- a/open-vm-tools/lib/sslDirect/sslDirect.c +++ b/open-vm-tools/lib/sslDirect/sslDirect.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -789,3 +789,89 @@ SSL_TryCompleteAccept(SSLSock ssl) // IN } } + +/* + * OpenSSL cipher lists are colon, comma, or space delimited lists. + * To get a full list of ciphers: + * openssl ciphers | sed 's#:#\n#g' + */ +#define SSL_CIPHER_LIST \ + "!aNULL:kECDH+AES:ECDH+AES:RSA+AES:@STRENGTH" + + +/* + *---------------------------------------------------------------------- + * + * SSL_NewContext -- + * + * Return an SSL context initialized with reasonable defaults. + * + *---------------------------------------------------------------------- + */ + +void * +SSL_NewContext(void) +{ + SSL_CTX *ctx; + long ctxOptions; + + ctx = SSL_CTX_new(SSLv23_method()); + + if (!ctx) { + SSLPrintErrors(VMW_LOG_WARNING); + Panic("Error Starting Up Default SSL context\n"); + NOT_REACHED(); + } + + /* + * Disable SSLv2/SSLv3 and enable all known bug workarounds. + */ + ctxOptions = SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | + SSL_OP_SINGLE_DH_USE | + SSL_OP_CIPHER_SERVER_PREFERENCE; + + /* + * Also turn off support for TLS ticket-based session resumption (RFC 4507) + * since this will cause connections to older versions of OpenSSL to fail. + * This was enabled by default starting with OpenSSL 0.9.8j. + */ + ctxOptions |= SSL_OP_NO_TICKET; + + /* SSL compression can be disabled per-context starting in OpenSSL 1.0.0 */ +#ifdef SSL_OP_NO_COMPRESSION + ctxOptions |= SSL_OP_NO_COMPRESSION; +#endif + + SSL_CTX_set_options(ctx, ctxOptions); + + /* + * Automatically retry an operation that failed with + * SSL_WANT_{READ|WRITE} if blocking sockets are being used + * + * This flag is ineffective for non-blocking sockets and the + * application must retry the SSL IO operation that needs to be retried + * until it succeeds, before it can perform any other IO on the + * SSL. + */ + SSL_CTX_ctrl(ctx, SSL_CTRL_MODE, SSL_MODE_AUTO_RETRY, NULL); + + /* Don't cache sessions (client not smart enough to use them */ + SSL_CTX_ctrl(ctx, SSL_CTRL_SET_SESS_CACHE_MODE, + SSL_SESS_CACHE_OFF, NULL); + /* + * disable the bidirectional shutdown sequence. This is really + * only useful when we want to use SSL session caching. + * (a session will only be cached if it was shutdown properly, + * using the full bidirectional method). + * */ + SSL_CTX_set_quiet_shutdown(ctx, 1); + + /* + * Set the cipher for the context. All sessions initiated from this + * context will use the same cipher. Use the SSL_set_cipher_list to + * change the cipher on a per session basis. + */ + SSL_CTX_set_cipher_list(ctx, SSL_CIPHER_LIST); + + return ctx; +} diff --git a/open-vm-tools/lib/sslDirect/sslStubs.c b/open-vm-tools/lib/sslDirect/sslStubs.c index 28d71f143..ab3454fc3 100644 --- a/open-vm-tools/lib/sslDirect/sslStubs.c +++ b/open-vm-tools/lib/sslDirect/sslStubs.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/string/Makefile.am b/open-vm-tools/lib/string/Makefile.am index f079c6cd1..0677836c1 100644 --- a/open-vm-tools/lib/string/Makefile.am +++ b/open-vm-tools/lib/string/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/string/Makefile.in b/open-vm-tools/lib/string/Makefile.in deleted file mode 100644 index 5c978af08..000000000 --- a/open-vm-tools/lib/string/Makefile.in +++ /dev/null @@ -1,542 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@USE_PRINTF_WRAPPERS_TRUE@am__append_1 = bsd_output_shared.c \ -@USE_PRINTF_WRAPPERS_TRUE@ bsd_vsnprintf.c bsd_vsnwprintf.c -subdir = lib/string -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libString_la_LIBADD = -am__libString_la_SOURCES_DIST = bsd_output_shared.c bsd_vsnprintf.c \ - bsd_vsnwprintf.c convertutf.c str.c -@USE_PRINTF_WRAPPERS_TRUE@am__objects_1 = bsd_output_shared.lo \ -@USE_PRINTF_WRAPPERS_TRUE@ bsd_vsnprintf.lo bsd_vsnwprintf.lo -am_libString_la_OBJECTS = $(am__objects_1) convertutf.lo str.lo -libString_la_OBJECTS = $(am_libString_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libString_la_SOURCES) -DIST_SOURCES = $(am__libString_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libString.la -libString_la_SOURCES = $(am__append_1) convertutf.c str.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/string/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/string/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libString.la: $(libString_la_OBJECTS) $(libString_la_DEPENDENCIES) - $(LINK) $(libString_la_OBJECTS) $(libString_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_output_shared.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_vsnprintf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_vsnwprintf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convertutf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/string/bsd_vsnprintf.c b/open-vm-tools/lib/string/bsd_vsnprintf.c index 536127b52..5fa07af1f 100644 --- a/open-vm-tools/lib/string/bsd_vsnprintf.c +++ b/open-vm-tools/lib/string/bsd_vsnprintf.c @@ -1,5 +1,5 @@ /* ********************************************************** - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * **********************************************************/ /* diff --git a/open-vm-tools/lib/string/bsd_vsnwprintf.c b/open-vm-tools/lib/string/bsd_vsnwprintf.c index b1a078c16..b78f95a66 100644 --- a/open-vm-tools/lib/string/bsd_vsnwprintf.c +++ b/open-vm-tools/lib/string/bsd_vsnwprintf.c @@ -62,6 +62,14 @@ #include "msgfmt.h" #include "convertutf.h" +#if defined(__ANDROID__) +/* + * Android doesn't support dtoa() or ldtoa(). + */ +#define NO_DTOA +#define NO_LDTOA +#endif + typedef struct StrBuf { Bool alloc; Bool error; @@ -738,8 +746,12 @@ bsd_vsnwprintf(wchar_t **outBuf, size_t bufSize, const wchar_t *fmt0, goto rflag; case '\'': flags |= GROUPING; +#if defined(__ANDROID__) + thousands_sep = ','; +#else thousands_sep = (wchar_t) *(localeconv()->thousands_sep); grouping = localeconv()->grouping; +#endif /* * Grouping should not begin with 0, but it nevertheless @@ -836,10 +848,14 @@ bsd_vsnwprintf(wchar_t **outBuf, size_t bufSize, const wchar_t *fmt0, flags |= LONGINT; /*FALLTHROUGH*/ case 'c': +#if defined(__ANDROID__) + *(cp = buf) = (wchar_t)GETARG(wint_t); +#else if (flags & LONGINT) *(cp = buf) = (wchar_t)GETARG(wint_t); else *(cp = buf) = (wchar_t)bsd_btowc(GETARG(int)); +#endif size = 1; sign = '\0'; break; @@ -888,14 +904,34 @@ bsd_vsnwprintf(wchar_t **outBuf, size_t bufSize, const wchar_t *fmt0, free(convbuf); if (flags & LLONGINT) { fparg.ldbl = GETARG(long double); +#if defined NO_DTOA + dtoaresult = NULL; + /* + * Below is to keep compiler happy + */ + signflag = -1; + expt = 0; + dtoaend = NULL; +#else dtoaresult = ldtoa(&fparg.ldbl, expchar ? 2 : 3, prec, &expt, &signflag, &dtoaend); +#endif } else { fparg.dbl = GETARG(double); +#if defined NO_DTOA + dtoaresult = NULL; + /* + * Below is to keep compiler happy + */ + signflag = -1; + expt = 0; + dtoaend = NULL; +#else dtoaresult = dtoa(fparg.dbl, expchar ? 2 : 3, prec, &expt, &signflag, &dtoaend); +#endif if (expt == 9999) expt = INT_MAX; } @@ -1025,7 +1061,7 @@ bsd_vsnwprintf(wchar_t **outBuf, size_t bufSize, const wchar_t *fmt0, if (flags & LONGINT) { /* Argument is wchar_t * */ if ((cp = GETARG(wchar_t *)) == NULL) - cp = L"(null)"; + cp = (wchar_t *)L"(null)"; } else { char *mbp; /* Argument is char * */ @@ -1033,7 +1069,7 @@ bsd_vsnwprintf(wchar_t **outBuf, size_t bufSize, const wchar_t *fmt0, if (convbuf!= NULL) free(convbuf); if ((mbp = GETARG(char *)) == NULL) - cp = L"(null)"; + cp = (wchar_t *)L"(null)"; else { convbuf = BSDFmt_UTF8ToWChar(mbp, prec); if (convbuf == NULL) { diff --git a/open-vm-tools/lib/string/str.c b/open-vm-tools/lib/string/str.c index 484489bca..6e65833a8 100644 --- a/open-vm-tools/lib/string/str.c +++ b/open-vm-tools/lib/string/str.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/stubs/Makefile.am b/open-vm-tools/lib/stubs/Makefile.am index 09b35dc09..368842e67 100644 --- a/open-vm-tools/lib/stubs/Makefile.am +++ b/open-vm-tools/lib/stubs/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2008-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/stubs/Makefile.in b/open-vm-tools/lib/stubs/Makefile.in deleted file mode 100644 index 8b13c1885..000000000 --- a/open-vm-tools/lib/stubs/Makefile.in +++ /dev/null @@ -1,557 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@LINUX_FALSE@am__append_1 = stub-msgfmt-fbsd.c -subdir = lib/stubs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libStubs_la_LIBADD = -am_libStubs_la_OBJECTS = stub-config.lo stub-log.lo stub-debug.lo \ - stub-warning.lo stub-panic.lo stub-user-msg.lo \ - stub-user-panic.lo stub-user-util.lo -libStubs_la_OBJECTS = $(am_libStubs_la_OBJECTS) -libStubsCS_la_LIBADD = -am__libStubsCS_la_SOURCES_DIST = stub-config.c stub-user-msg.c \ - stub-user-panic.c stub-msgfmt-fbsd.c -@LINUX_FALSE@am__objects_1 = stub-msgfmt-fbsd.lo -am_libStubsCS_la_OBJECTS = stub-config.lo stub-user-msg.lo \ - stub-user-panic.lo $(am__objects_1) -libStubsCS_la_OBJECTS = $(am_libStubsCS_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libStubs_la_SOURCES) $(libStubsCS_la_SOURCES) -DIST_SOURCES = $(libStubs_la_SOURCES) \ - $(am__libStubsCS_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libStubs.la libStubsCS.la -libStubs_la_SOURCES = stub-config.c stub-log.c stub-debug.c \ - stub-warning.c stub-panic.c stub-user-msg.c stub-user-panic.c \ - stub-user-util.c -libStubsCS_la_SOURCES = stub-config.c stub-user-msg.c \ - stub-user-panic.c $(am__append_1) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/stubs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/stubs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libStubs.la: $(libStubs_la_OBJECTS) $(libStubs_la_DEPENDENCIES) - $(LINK) $(libStubs_la_OBJECTS) $(libStubs_la_LIBADD) $(LIBS) -libStubsCS.la: $(libStubsCS_la_OBJECTS) $(libStubsCS_la_DEPENDENCIES) - $(LINK) $(libStubsCS_la_OBJECTS) $(libStubsCS_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-debug.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-msgfmt-fbsd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-panic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-msg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-panic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-user-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub-warning.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/stubs/stub-config.c b/open-vm-tools/lib/stubs/stub-config.c index c71f4ce61..333ce5e0a 100644 --- a/open-vm-tools/lib/stubs/stub-config.c +++ b/open-vm-tools/lib/stubs/stub-config.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/stubs/stub-log.c b/open-vm-tools/lib/stubs/stub-log.c index 749f91e3e..8d139b179 100644 --- a/open-vm-tools/lib/stubs/stub-log.c +++ b/open-vm-tools/lib/stubs/stub-log.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/stubs/stub-msgfmt-fbsd.c b/open-vm-tools/lib/stubs/stub-msgfmt-fbsd.c index 1e6488354..afb50f0e3 100644 --- a/open-vm-tools/lib/stubs/stub-msgfmt-fbsd.c +++ b/open-vm-tools/lib/stubs/stub-msgfmt-fbsd.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/stubs/stub-user-msg.c b/open-vm-tools/lib/stubs/stub-user-msg.c index e63ee2e2c..0ac1114dc 100644 --- a/open-vm-tools/lib/stubs/stub-user-msg.c +++ b/open-vm-tools/lib/stubs/stub-user-msg.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/stubs/stub-user-panic.c b/open-vm-tools/lib/stubs/stub-user-panic.c index 8b4b5a058..eaf8a5747 100644 --- a/open-vm-tools/lib/stubs/stub-user-panic.c +++ b/open-vm-tools/lib/stubs/stub-user-panic.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/stubs/stub-user-util.c b/open-vm-tools/lib/stubs/stub-user-util.c index 28006a27c..97d90b572 100644 --- a/open-vm-tools/lib/stubs/stub-user-util.c +++ b/open-vm-tools/lib/stubs/stub-user-util.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/stubs/stub-warning.c b/open-vm-tools/lib/stubs/stub-warning.c index f18ea7636..c32fa6945 100644 --- a/open-vm-tools/lib/stubs/stub-warning.c +++ b/open-vm-tools/lib/stubs/stub-warning.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/syncDriver/Makefile.am b/open-vm-tools/lib/syncDriver/Makefile.am index a31414efe..699c16ade 100644 --- a/open-vm-tools/lib/syncDriver/Makefile.am +++ b/open-vm-tools/lib/syncDriver/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -17,6 +17,9 @@ noinst_LTLIBRARIES = libSyncDriver.la +libSyncDriver_la_CPPFLAGS = +libSyncDriver_la_CPPFLAGS += @GLIB2_CPPFLAGS@ + libSyncDriver_la_SOURCES = libSyncDriver_la_SOURCES += syncDriverPosix.c diff --git a/open-vm-tools/lib/syncDriver/Makefile.in b/open-vm-tools/lib/syncDriver/Makefile.in deleted file mode 100644 index 6ea4574db..000000000 --- a/open-vm-tools/lib/syncDriver/Makefile.in +++ /dev/null @@ -1,541 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@LINUX_TRUE@am__append_1 = nullDriver.c syncDriverLinux.c \ -@LINUX_TRUE@ vmSyncDriver.c -subdir = lib/syncDriver -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libSyncDriver_la_LIBADD = -am__libSyncDriver_la_SOURCES_DIST = syncDriverPosix.c nullDriver.c \ - syncDriverLinux.c vmSyncDriver.c -@LINUX_TRUE@am__objects_1 = nullDriver.lo syncDriverLinux.lo \ -@LINUX_TRUE@ vmSyncDriver.lo -am_libSyncDriver_la_OBJECTS = syncDriverPosix.lo $(am__objects_1) -libSyncDriver_la_OBJECTS = $(am_libSyncDriver_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libSyncDriver_la_SOURCES) -DIST_SOURCES = $(am__libSyncDriver_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libSyncDriver.la -libSyncDriver_la_SOURCES = syncDriverPosix.c $(am__append_1) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/syncDriver/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/syncDriver/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libSyncDriver.la: $(libSyncDriver_la_OBJECTS) $(libSyncDriver_la_DEPENDENCIES) - $(LINK) $(libSyncDriver_la_OBJECTS) $(libSyncDriver_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nullDriver.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syncDriverLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syncDriverPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmSyncDriver.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/syncDriver/nullDriver.c b/open-vm-tools/lib/syncDriver/nullDriver.c index ff3016c30..5e19e2080 100644 --- a/open-vm-tools/lib/syncDriver/nullDriver.c +++ b/open-vm-tools/lib/syncDriver/nullDriver.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -63,7 +63,7 @@ NullDriverClose(SyncDriverHandle handle) */ SyncDriverErr -NullDriver_Freeze(const char *paths, +NullDriver_Freeze(const GSList *paths, SyncDriverHandle *handle) { /* diff --git a/open-vm-tools/lib/syncDriver/syncDriverInt.h b/open-vm-tools/lib/syncDriver/syncDriverInt.h index c9337c9ba..79c56f800 100644 --- a/open-vm-tools/lib/syncDriver/syncDriverInt.h +++ b/open-vm-tools/lib/syncDriver/syncDriverInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -25,19 +25,22 @@ * Internal definitions for the sync driver library. */ +#include #include "syncDriver.h" #define LGPFX "SyncDriver: " #if !defined(Win32) +#define SYNCDRIVER_PATH_SEPARATOR ':' + typedef enum { SD_SUCCESS, SD_ERROR, SD_UNAVAILABLE, } SyncDriverErr; -typedef SyncDriverErr (*SyncFreezeFn)(const char *paths, +typedef SyncDriverErr (*SyncFreezeFn)(const GSList *paths, SyncDriverHandle *handle); typedef struct SyncHandle { @@ -47,15 +50,15 @@ typedef struct SyncHandle { #if defined(linux) SyncDriverErr -LinuxDriver_Freeze(const char *userPaths, +LinuxDriver_Freeze(const GSList *userPaths, SyncDriverHandle *handle); SyncDriverErr -VmSync_Freeze(const char *userPaths, +VmSync_Freeze(const GSList *userPaths, SyncDriverHandle *handle); SyncDriverErr -NullDriver_Freeze(const char *userPaths, +NullDriver_Freeze(const GSList *userPaths, SyncDriverHandle *handle); #endif diff --git a/open-vm-tools/lib/syncDriver/syncDriverLinux.c b/open-vm-tools/lib/syncDriver/syncDriverLinux.c index 6521e414d..68d5f5f40 100644 --- a/open-vm-tools/lib/syncDriver/syncDriverLinux.c +++ b/open-vm-tools/lib/syncDriver/syncDriverLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -32,7 +32,6 @@ #include #include "debug.h" #include "dynbuf.h" -#include "strutil.h" #include "syncDriverInt.h" /* Out toolchain headers are somewhat outdated and don't define these. */ @@ -70,8 +69,11 @@ LinuxFiThaw(const SyncDriverHandle handle) LinuxDriver *sync = (LinuxDriver *) handle; SyncDriverErr err = SD_SUCCESS; - for (i = 0; i < sync->fdCnt; i++) { - if (ioctl(sync->fds[i], FITHAW) == -1) { + /* + * Thaw in the reverse order of freeze + */ + for (i = sync->fdCnt; i > 0; i--) { + if (ioctl(sync->fds[i-1], FITHAW) == -1) { err = SD_ERROR; } } @@ -98,8 +100,11 @@ LinuxFiClose(SyncDriverHandle handle) LinuxDriver *sync = (LinuxDriver *) handle; size_t i; - for (i = 0; i < sync->fdCnt; i++) { - close(sync->fds[i]); + /* + * Close in the reverse order of open + */ + for (i = sync->fdCnt; i > 0; i--) { + close(sync->fds[i-1]); } free(sync->fds); free(sync); @@ -120,7 +125,7 @@ LinuxFiClose(SyncDriverHandle handle) * slow when guest is performing significant IO. Therefore, caller should * consider running this function in a separate thread. * - * @param[in] paths Paths to freeze (colon-separated). + * @param[in] paths List of paths to freeze. * @param[out] handle Handle to use for thawing. * * @return A SyncDriverErr. @@ -129,13 +134,10 @@ LinuxFiClose(SyncDriverHandle handle) */ SyncDriverErr -LinuxDriver_Freeze(const char *paths, +LinuxDriver_Freeze(const GSList *paths, SyncDriverHandle *handle) { - char *path; - int fd; - size_t count = 0; - unsigned int index = 0; + ssize_t count = 0; Bool first = TRUE; DynBuf fds; LinuxDriver *sync = NULL; @@ -143,7 +145,7 @@ LinuxDriver_Freeze(const char *paths, DynBuf_Init(&fds); - Debug(LGPFX "Freezing %s using Linux ioctls...\n", paths); + Debug(LGPFX "Freezing using Linux ioctls...\n"); sync = calloc(1, sizeof *sync); if (sync == NULL) { @@ -153,13 +155,21 @@ LinuxDriver_Freeze(const char *paths, sync->driver.thaw = LinuxFiThaw; sync->driver.close = LinuxFiClose; + /* + * Ensure we did not get an empty list + */ + VERIFY(paths != NULL); + /* * Iterate through the requested paths. If we get an error for the first * path, and it's not EPERM, assume that the ioctls are not available in * the current kernel. */ - while ((path = StrUtil_GetNextToken(&index, paths, ":")) != NULL) { + while (paths != NULL) { + int fd; + const char *path = paths->data; Debug(LGPFX "opening path '%s'.\n", path); + paths = g_slist_next(paths); fd = open(path, O_RDONLY); if (fd == -1) { switch (errno) { @@ -169,7 +179,6 @@ LinuxDriver_Freeze(const char *paths, * as users with permission 700, so just ignore these. */ Debug(LGPFX "cannot access mounted directory '%s'.\n", path); - free(path); continue; case EIO: @@ -179,14 +188,12 @@ LinuxDriver_Freeze(const char *paths, * this should be enough. Just skip. */ Debug(LGPFX "I/O error reading directory '%s'.\n", path); - free(path); continue; default: Debug(LGPFX "failed to open '%s': %d (%s)\n", path, errno, strerror(errno)); err = SD_ERROR; - free(path); goto exit; } } @@ -211,7 +218,6 @@ LinuxDriver_Freeze(const char *paths, Debug(LGPFX "failed to freeze '%s': %d (%s)\n", path, ioctlerr, strerror(ioctlerr)); err = first && ioctlerr == ENOTTY ? SD_UNAVAILABLE : SD_ERROR; - free(path); break; } } else { @@ -221,7 +227,6 @@ LinuxDriver_Freeze(const char *paths, Warning(LGPFX "failed to thaw '%s': %d (%s)\n", path, errno, strerror(errno)); } - free(path); close(fd); err = SD_ERROR; break; @@ -229,7 +234,6 @@ LinuxDriver_Freeze(const char *paths, count++; } - free(path); first = FALSE; } diff --git a/open-vm-tools/lib/syncDriver/syncDriverPosix.c b/open-vm-tools/lib/syncDriver/syncDriverPosix.c index 400b8a705..f499faa47 100644 --- a/open-vm-tools/lib/syncDriver/syncDriverPosix.c +++ b/open-vm-tools/lib/syncDriver/syncDriverPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -25,9 +25,9 @@ #include #include #include +#include #include "vmware.h" #include "debug.h" -#include "dynbuf.h" #include "str.h" #include "syncDriverInt.h" #include "util.h" @@ -85,19 +85,21 @@ SyncDriverIsRemoteFSType(const char *fsType) /* *----------------------------------------------------------------------------- * - * SyncDriverListMounts -- + * SyncDriverLocalMounts -- * - * Returns a newly allocated string containing a list of colon-separated - * mount paths in the system. No filtering is done, so all paths are added. - * This assumes that the driver allows "unfreezable" paths to be provided - * to the freeze command. + * Returns a singly-linked list of all local disk paths mounted in the + * system filtering out remote file systems. There is no filtering for + * other mount points because we assume that the underlying driver and + * IOCTL can deal with "unfreezable" paths. The returned list of paths + * is in the reverse order of the paths returned by GETNEXT_MNTINFO. + * Caller must free each path and the list itself. * * XXX: mntinfo.h mentions Solaris and Linux, but not FreeBSD. If we ever * have a FreeBSD sync driver, we should make sure this function also * works there. * * Results: - * The list of devices to freeze, or NULL on failure. + * GSList* on success, NULL on failure. * * Side effects: * None @@ -105,21 +107,20 @@ SyncDriverIsRemoteFSType(const char *fsType) *----------------------------------------------------------------------------- */ -static char * -SyncDriverListMounts(void) +static GSList * +SyncDriverLocalMounts(void) { - char *paths = NULL; - DynBuf buf; + GSList *paths = NULL; MNTHANDLE mounts; DECLARE_MNTINFO(mntinfo); if ((mounts = OPEN_MNTFILE("r")) == NULL) { + Warning(LGPFX "Failed to open mount point table.\n"); return NULL; } - DynBuf_Init(&buf); - while (GETNEXT_MNTINFO(mounts, mntinfo)) { + char *path; /* * Skip remote mounts because they are not freezable and opening them * could lead to hangs. See PR 1196785. @@ -130,29 +131,21 @@ SyncDriverListMounts(void) continue; } + path = Util_SafeStrdup(MNTINFO_MNTPT(mntinfo)); + /* - * Add a separator if it's not the first path, and add the path to the - * tail of the list. + * A mount point could depend on existence of a previous mount + * point like a loopback. In order to avoid deadlock/hang in + * freeze operation, a mount point needs to be frozen before + * its dependency is frozen. + * Typically, mount points are listed in the order they are + * mounted by the system i.e. dependent comes after the + * dependency. So, we need to keep them in reverse order of + * mount points to achieve the dependency order. */ - if ((DynBuf_GetSize(&buf) != 0 && !DynBuf_Append(&buf, ":", 1)) - || !DynBuf_Append(&buf, - MNTINFO_MNTPT(mntinfo), - strlen(MNTINFO_MNTPT(mntinfo)))) { - goto exit; - } - } - - if (!DynBuf_Append(&buf, "\0", 1)) { - goto exit; + paths = g_slist_prepend(paths, path); } - paths = DynBuf_AllocGet(&buf); - if (paths == NULL) { - Debug(LGPFX "Failed to allocate path list.\n"); - } - -exit: - DynBuf_Destroy(&buf); (void) CLOSE_MNTFILE(mounts); return paths; } @@ -182,6 +175,29 @@ SyncDriver_Init(void) } +/* + *----------------------------------------------------------------------------- + * + * SyncDriverFreePath -- + * + * A GFunc for freeing path strings. It is intended for g_slist_foreach. + * + * Results: + * None + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static void +SyncDriverFreePath(gpointer data, gpointer userData) +{ + free(data); +} + + /* *----------------------------------------------------------------------------- * @@ -214,14 +230,11 @@ SyncDriver_Freeze(const char *userPaths, // IN Bool enableNullDriver, // IN SyncDriverHandle *handle) // OUT { - char *paths = NULL; + GSList *paths = NULL; SyncDriverErr err = SD_UNAVAILABLE; size_t i = 0; /* - * First, convert the given path list to something the backends will - * understand: a colon-separated list of paths. - * * NOTE: Ignore disk UUIDs. We ignore the userPaths if it does * not start with '/' because all paths are absolute and it is * possible only when we get diskUUID as userPaths. So, all @@ -229,26 +242,42 @@ SyncDriver_Freeze(const char *userPaths, // IN */ if (userPaths == NULL || Str_Strncmp(userPaths, "all", sizeof "all") == 0 || - *userPaths != '/') { - paths = SyncDriverListMounts(); - if (paths == NULL) { - Debug(LGPFX "Failed to list mount points.\n"); - return SD_ERROR; - } + userPaths[0] != '/') { + paths = SyncDriverLocalMounts(); } else { /* - * The sync driver API specifies spaces as separators, but the driver - * uses colons as the path separator on Unix. + * The sync driver API specifies spaces as separators. */ - char *c; - paths = Util_SafeStrdup(userPaths); - for (c = paths; *c != '\0'; c++) { - if (*c == ' ') { - *c = ':'; + while (*userPaths != '\0') { + const char *c; + char *path; + + if (*userPaths == ' ') { + /* + * Trim spaces from beginning + */ + userPaths++; + continue; + } + + c = strchr(userPaths, ' '); + if (c == NULL) { + path = Util_SafeStrdup(userPaths); + paths = g_slist_append(paths, path); + break; + } else { + path = Util_SafeStrndup(userPaths, c - userPaths); + paths = g_slist_append(paths, path); + userPaths = c; } } } + if (paths == NULL) { + Warning(LGPFX "No paths to freeze.\n"); + return SD_ERROR; + } + while (err == SD_UNAVAILABLE && i < ARRAYSIZE(gBackends)) { SyncFreezeFn freezeFn = gBackends[i]; Debug(LGPFX "Calling backend %d.\n", (int) i); @@ -262,7 +291,12 @@ SyncDriver_Freeze(const char *userPaths, // IN err = freezeFn(paths, handle); } - free(paths); + /* + * g_slist_free_full requires glib >= v2.28 + */ + g_slist_foreach(paths, SyncDriverFreePath, NULL); + g_slist_free(paths); + return err == SD_SUCCESS; } diff --git a/open-vm-tools/lib/syncDriver/vmSyncDriver.c b/open-vm-tools/lib/syncDriver/vmSyncDriver.c index c0c5158fe..2bd0e8862 100644 --- a/open-vm-tools/lib/syncDriver/vmSyncDriver.c +++ b/open-vm-tools/lib/syncDriver/vmSyncDriver.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -24,9 +24,11 @@ #include #include +#include #include "debug.h" #include "syncDriverInt.h" #include "syncDriverIoc.h" +#include "strutil.h" #include "util.h" #define SYNC_PROC_PATH "/proc/driver/vmware-sync" @@ -89,7 +91,7 @@ VmSyncClose(SyncDriverHandle handle) * Opens a description to the driver's proc node, and if successful, send an * ioctl to freeze the requested filesystems. * - * @param[in] paths Paths to freeze (colon-delimited). + * @param[in] paths List of paths to freeze. * @param[out] handle Where to store the handle to use for thawing. * * @return A SyncDriverErr. @@ -98,19 +100,41 @@ VmSyncClose(SyncDriverHandle handle) */ SyncDriverErr -VmSync_Freeze(const char *paths, +VmSync_Freeze(const GSList *paths, SyncDriverHandle *handle) { int file; + Bool first = TRUE; + char *allPaths = NULL; VmSyncDriver *sync = NULL; - Debug(LGPFX "Freezing %s using vmsync driver...\n", paths); + Debug(LGPFX "Freezing using vmsync driver...\n"); file = open(SYNC_PROC_PATH, O_RDONLY); if (file == -1) { return SD_UNAVAILABLE; } + /* + * Ensure we did not get an empty list + */ + VERIFY(paths != NULL); + + /* + * Concatenate all paths in the list into one string + */ + while (paths != NULL) { + if (!first) { + /* + * Append the separator (':') + */ + StrUtil_SafeStrcat(&allPaths, ":"); + } + StrUtil_SafeStrcat(&allPaths, paths->data); + first = FALSE; + paths = g_slist_next(paths); + } + sync = calloc(1, sizeof *sync); if (sync == NULL) { goto exit; @@ -120,7 +144,9 @@ VmSync_Freeze(const char *paths, sync->driver.close = VmSyncClose; sync->fd = file; - if (ioctl(file, SYNC_IOC_FREEZE, paths) == -1) { + Debug(LGPFX "Freezing %s using vmsync driver...\n", allPaths); + + if (ioctl(file, SYNC_IOC_FREEZE, allPaths) == -1) { free(sync); sync = NULL; } @@ -133,6 +159,7 @@ VmSync_Freeze(const char *paths, } else { *handle = &sync->driver; } + free(allPaths); return sync != NULL ? SD_SUCCESS : SD_ERROR; } diff --git a/open-vm-tools/lib/system/Makefile.am b/open-vm-tools/lib/system/Makefile.am index 2163df70d..52b1a1ddc 100644 --- a/open-vm-tools/lib/system/Makefile.am +++ b/open-vm-tools/lib/system/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/system/Makefile.in b/open-vm-tools/lib/system/Makefile.in deleted file mode 100644 index 2e283e9dd..000000000 --- a/open-vm-tools/lib/system/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/system -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libSystem_la_LIBADD = -am_libSystem_la_OBJECTS = systemLinux.lo -libSystem_la_OBJECTS = $(am_libSystem_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libSystem_la_SOURCES) -DIST_SOURCES = $(libSystem_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libSystem.la -libSystem_la_SOURCES = systemLinux.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/system/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/system/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libSystem.la: $(libSystem_la_OBJECTS) $(libSystem_la_DEPENDENCIES) - $(LINK) $(libSystem_la_OBJECTS) $(libSystem_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systemLinux.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/system/systemLinux.c b/open-vm-tools/lib/system/systemLinux.c index 559577a4f..8e6f77269 100644 --- a/open-vm-tools/lib/system/systemLinux.c +++ b/open-vm-tools/lib/system/systemLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/unicode/Makefile.am b/open-vm-tools/lib/unicode/Makefile.am index 62ca723aa..4284c51ca 100644 --- a/open-vm-tools/lib/unicode/Makefile.am +++ b/open-vm-tools/lib/unicode/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/unicode/Makefile.in b/open-vm-tools/lib/unicode/Makefile.in deleted file mode 100644 index d9e5cc0f1..000000000 --- a/open-vm-tools/lib/unicode/Makefile.in +++ /dev/null @@ -1,551 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_ICU_TRUE@am__append_1 = unicodeICU.c -subdir = lib/unicode -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libUnicode_la_LIBADD = -am__libUnicode_la_SOURCES_DIST = unicodeCommon.c unicodeSimpleBase.c \ - unicodeSimpleCaseFolding.c unicodeSimpleTypes.c \ - unicodeSimpleOperations.c unicodeSimpleTransforms.c \ - unicodeStatic.c unicodeICU.c -@HAVE_ICU_TRUE@am__objects_1 = unicodeICU.lo -am_libUnicode_la_OBJECTS = unicodeCommon.lo unicodeSimpleBase.lo \ - unicodeSimpleCaseFolding.lo unicodeSimpleTypes.lo \ - unicodeSimpleOperations.lo unicodeSimpleTransforms.lo \ - unicodeStatic.lo $(am__objects_1) -libUnicode_la_OBJECTS = $(am_libUnicode_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libUnicode_la_SOURCES) -DIST_SOURCES = $(am__libUnicode_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libUnicode.la -libUnicode_la_SOURCES = unicodeCommon.c unicodeSimpleBase.c \ - unicodeSimpleCaseFolding.c unicodeSimpleTypes.c \ - unicodeSimpleOperations.c unicodeSimpleTransforms.c \ - unicodeStatic.c $(am__append_1) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/unicode/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/unicode/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libUnicode.la: $(libUnicode_la_OBJECTS) $(libUnicode_la_DEPENDENCIES) - $(LINK) $(libUnicode_la_OBJECTS) $(libUnicode_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeCommon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeICU.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeSimpleBase.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeSimpleCaseFolding.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeSimpleOperations.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeSimpleTransforms.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeSimpleTypes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeStatic.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/unicode/unicodeCommon.c b/open-vm-tools/lib/unicode/unicodeCommon.c index f12f666f1..10dcb73b0 100644 --- a/open-vm-tools/lib/unicode/unicodeCommon.c +++ b/open-vm-tools/lib/unicode/unicodeCommon.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/unicode/unicodeICU.c b/open-vm-tools/lib/unicode/unicodeICU.c index ca018bf8f..b63932e0f 100644 --- a/open-vm-tools/lib/unicode/unicodeICU.c +++ b/open-vm-tools/lib/unicode/unicodeICU.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/unicode/unicodeInt.h b/open-vm-tools/lib/unicode/unicodeInt.h index 1774eb3b7..6c7e27277 100644 --- a/open-vm-tools/lib/unicode/unicodeInt.h +++ b/open-vm-tools/lib/unicode/unicodeInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/unicode/unicodeSimpleBase.c b/open-vm-tools/lib/unicode/unicodeSimpleBase.c index 5f99c00e4..ab877130d 100644 --- a/open-vm-tools/lib/unicode/unicodeSimpleBase.c +++ b/open-vm-tools/lib/unicode/unicodeSimpleBase.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -70,10 +70,10 @@ static const size_t UNICODE_UTF16_CODE_UNITS_PADDING = 10; * Return NULL if strict is true and the buffer contains an invalid * sequence in the specified encoding. * - * If strict is false, then an invalid sequence is replaced by + * If strict is false, then an invalid sequence is replaced by * a substitution character, which is either the Unicode - * substitution character (U+FFFD or \xef\xbf\xbd in UTF-8) - * or subchar1 (ASCII SUB or control-z, value 0x1a). + * substitution character (U+FFFD or \xef\xbf\xbd in UTF-8) + * or subchar1 (ASCII SUB or control-z, value 0x1a). * * Results: * An allocated Unicode string containing the decoded characters @@ -90,7 +90,7 @@ char * UnicodeAllocInternal(const void *buffer, // IN ssize_t lengthInBytes, // IN StringEncoding encoding, // IN - Bool strict) // IN + Bool strict) // IN { char *utf8Result = NULL; @@ -101,7 +101,7 @@ UnicodeAllocInternal(const void *buffer, // IN if (!strict) { CodeSet_GenericToGeneric(Unicode_EncodingEnumToName(encoding), buffer, lengthInBytes, - "UTF-8", CSGTG_TRANSLIT, &utf8Result, NULL); + "UTF-8", CSGTG_TRANSLIT, &utf8Result, NULL); return utf8Result; } @@ -109,7 +109,7 @@ UnicodeAllocInternal(const void *buffer, // IN case STRING_ENCODING_US_ASCII: case STRING_ENCODING_UTF8: if (Unicode_IsBufferValid(buffer, lengthInBytes, encoding)) { - utf8Result = Util_SafeStrndup(buffer, lengthInBytes); + utf8Result = Util_SafeStrndup(buffer, lengthInBytes); } break; case STRING_ENCODING_UTF16_LE: @@ -122,7 +122,7 @@ UnicodeAllocInternal(const void *buffer, // IN default: CodeSet_GenericToGeneric(Unicode_EncodingEnumToName(encoding), buffer, lengthInBytes, - "UTF-8", 0, &utf8Result, NULL); + "UTF-8", 0, &utf8Result, NULL); break; } @@ -130,6 +130,30 @@ UnicodeAllocInternal(const void *buffer, // IN } +/* + *----------------------------------------------------------------------------- + * + * Unicode_IsStringValidUTF8 -- + * + * Tests if the specified string (NUL terminated) is valid UTF8. + * + * Results: + * TRUE The string is valid UTF8. + * FALSE The string is not valid UTF8. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +Bool +Unicode_IsStringValidUTF8(const char *str) // IN: +{ + return CodeSet_IsStringValidUTF8(str); +} + + /* *----------------------------------------------------------------------------- * @@ -170,16 +194,25 @@ Unicode_IsBufferValid(const void *buffer, // IN encoding = Unicode_ResolveEncoding(encoding); - if (encoding == STRING_ENCODING_US_ASCII) { + switch (encoding) { + case STRING_ENCODING_US_ASCII: return UnicodeSanityCheck(buffer, lengthInBytes, encoding); - } - if (lengthInBytes == -1) { - lengthInBytes = Unicode_LengthInBytes(buffer, encoding); - } + case STRING_ENCODING_UTF8: + if (lengthInBytes == -1) { + return CodeSet_IsStringValidUTF8(buffer); + } else { + return CodeSet_IsValidUTF8(buffer, lengthInBytes); + } + + default: + if (lengthInBytes == -1) { + lengthInBytes = Unicode_LengthInBytes(buffer, encoding); + } - return CodeSet_Validate(buffer, lengthInBytes, - Unicode_EncodingEnumToName(encoding)); + return CodeSet_Validate(buffer, lengthInBytes, + Unicode_EncodingEnumToName(encoding)); + } } @@ -311,11 +344,11 @@ Unicode_GetAllocList(char *const srcList[], // IN: list of strings for (i = 0; i < length; i++) { dstList[i] = Unicode_GetAllocBytes(srcList[i], encoding); if (dstList[i] == NULL && srcList[i] != NULL) { - while (--i >= 0) { - free(dstList[i]); - } - free(dstList); - return NULL; + while (--i >= 0) { + free(dstList[i]); + } + free(dstList); + return NULL; } } @@ -467,7 +500,7 @@ Unicode_BytesRequired(const char *str, // IN * maxLengthInBytes bytes in total to the buffer. * * Results: - * FALSE on conversion failure or if the Unicode string requires + * FALSE on conversion failure or if the Unicode string requires * more than maxLengthInBytes bytes to be encoded in the specified * encoding, including NUL termination. (Call * Unicode_BytesRequired(str, encoding) to get the correct @@ -497,7 +530,7 @@ Unicode_CopyBytes(void *destBuffer, // OUT switch (encoding) { case STRING_ENCODING_US_ASCII: if (!UnicodeSanityCheck(utf8Str, -1, encoding)) { - break; + break; } // fall through case STRING_ENCODING_UTF8: @@ -511,8 +544,8 @@ Unicode_CopyBytes(void *destBuffer, // OUT * manner. */ if (copyBytes >= len) { - success = TRUE; - } else { + success = TRUE; + } else { if (encoding == STRING_ENCODING_UTF8) { copyBytes = CodeSet_Utf8FindCodePointBoundary(destBuffer, copyBytes); @@ -531,8 +564,8 @@ Unicode_CopyBytes(void *destBuffer, // OUT strlen(utf8Str), &utf16Buf, &utf16BufLen)) { - // input should be valid UTF-8, no conversion error possible - NOT_IMPLEMENTED(); + /* input should be valid UTF-8, no conversion error possible */ + NOT_IMPLEMENTED(); break; } copyBytes = MIN(utf16BufLen, maxLengthInBytes - 2); @@ -552,13 +585,13 @@ Unicode_CopyBytes(void *destBuffer, // OUT char *currentBuf; size_t currentBufSize; - if (!CodeSet_GenericToGeneric("UTF-8", utf8Str, strlen(utf8Str), - Unicode_EncodingEnumToName(encoding), - CSGTG_NORMAL, - ¤tBuf, ¤tBufSize)) { - // XXX can't distinguish error cause - break; - } + if (!CodeSet_GenericToGeneric("UTF-8", utf8Str, strlen(utf8Str), + Unicode_EncodingEnumToName(encoding), + CSGTG_NORMAL, + ¤tBuf, ¤tBufSize)) { + /* XXX can't distinguish error cause */ + break; + } copyBytes = MIN(currentBufSize, maxLengthInBytes - 1); memcpy(destBuffer, currentBuf, copyBytes); free(currentBuf); @@ -677,8 +710,7 @@ Unicode_GetAllocBytesWithLength(const char *str, // IN: * The converted string in an allocated buffer, * or NULL on conversion failure. * - * The length of the result (in bytes, without termination) - * in retLength. + * The length of the result (in bytes, without termination) in retLength. * * Side effects: * Panic on memory allocation failure. @@ -706,31 +738,31 @@ UnicodeGetAllocBytesInternal(const char *ustr, // IN switch (encoding) { case STRING_ENCODING_US_ASCII: if (!UnicodeSanityCheck(utf8Str, lengthInBytes, encoding)) { - break; + break; } // fall through case STRING_ENCODING_UTF8: result = Util_SafeMalloc(lengthInBytes + 1); memcpy(result, utf8Str, lengthInBytes + 1); if (retLength != NULL) { - *retLength = lengthInBytes; + *retLength = lengthInBytes; } break; case STRING_ENCODING_UTF16_LE: if (!CodeSet_Utf8ToUtf16le(utf8Str, lengthInBytes, &result, retLength)) { - // input should be valid UTF-8, no conversion error possible + /* input should be valid UTF-8, no conversion error possible */ NOT_IMPLEMENTED(); } break; default: if (!CodeSet_GenericToGeneric("UTF-8", utf8Str, lengthInBytes, - Unicode_EncodingEnumToName(encoding), - CSGTG_NORMAL, - &result, retLength)) { - // XXX can't distinguish error cause - ASSERT(result == NULL); + Unicode_EncodingEnumToName(encoding), + CSGTG_NORMAL, + &result, retLength)) { + /* XXX can't distinguish error cause */ + ASSERT(result == NULL); } } diff --git a/open-vm-tools/lib/unicode/unicodeSimpleOperations.c b/open-vm-tools/lib/unicode/unicodeSimpleOperations.c index eae5a929a..6c18ad29b 100644 --- a/open-vm-tools/lib/unicode/unicodeSimpleOperations.c +++ b/open-vm-tools/lib/unicode/unicodeSimpleOperations.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/unicode/unicodeSimpleTransforms.c b/open-vm-tools/lib/unicode/unicodeSimpleTransforms.c index 77b22c0a6..3369aea67 100644 --- a/open-vm-tools/lib/unicode/unicodeSimpleTransforms.c +++ b/open-vm-tools/lib/unicode/unicodeSimpleTransforms.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/unicode/unicodeSimpleTypes.c b/open-vm-tools/lib/unicode/unicodeSimpleTypes.c index 558441a50..743c3537d 100644 --- a/open-vm-tools/lib/unicode/unicodeSimpleTypes.c +++ b/open-vm-tools/lib/unicode/unicodeSimpleTypes.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/unicode/unicodeStatic.c b/open-vm-tools/lib/unicode/unicodeStatic.c index b9d2a81a8..39765dacc 100644 --- a/open-vm-tools/lib/unicode/unicodeStatic.c +++ b/open-vm-tools/lib/unicode/unicodeStatic.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/user/Makefile.am b/open-vm-tools/lib/user/Makefile.am index 29de663fe..a13573ef8 100644 --- a/open-vm-tools/lib/user/Makefile.am +++ b/open-vm-tools/lib/user/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/user/Makefile.in b/open-vm-tools/lib/user/Makefile.in deleted file mode 100644 index 8c2c6103a..000000000 --- a/open-vm-tools/lib/user/Makefile.in +++ /dev/null @@ -1,534 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/user -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libUser_la_LIBADD = -am_libUser_la_OBJECTS = util.lo utilBacktrace.lo -libUser_la_OBJECTS = $(am_libUser_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libUser_la_SOURCES) -DIST_SOURCES = $(libUser_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libUser.la -libUser_la_SOURCES = util.c utilBacktrace.c -AM_CFLAGS = @LIB_USER_CPPFLAGS@ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/user/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/user/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libUser.la: $(libUser_la_OBJECTS) $(libUser_la_DEPENDENCIES) - $(LINK) $(libUser_la_OBJECTS) $(libUser_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilBacktrace.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/user/util.c b/open-vm-tools/lib/user/util.c index f320635e3..0f3cb1cf1 100644 --- a/open-vm-tools/lib/user/util.c +++ b/open-vm-tools/lib/user/util.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -66,11 +66,11 @@ #include "su.h" #include "posix.h" #include "file.h" -#include "util_shared.h" #include "escape.h" #include "base64.h" #include "unicode.h" #include "posix.h" +#include "random.h" #ifndef O_BINARY #define O_BINARY 0 @@ -254,6 +254,124 @@ Util_HashString(const char *str) // IN: } +/* + *---------------------------------------------------------------------- + * + * CRC_Compute -- + * + * computes the CRC of a block of data + * + * Results: + * + * CRC code + * + * Side effects: + * Sets up the crc table if it hasn't already been computed. + * + *---------------------------------------------------------------------- + */ + +static void +UtilCRCMakeTable(uint32 crcTable[]) +{ + uint32 c; + int n, k; + + for (n = 0; n < 256; n++) { + c = (uint32) n; + for (k = 0; k < 8; k++) { + if (c & 1) { + c = 0xedb88320L ^ (c >> 1); + } else { + c = c >> 1; + } + } + crcTable[n] = c; + } +} + +static INLINE_SINGLE_CALLER uint32 +UtilCRCUpdate(uint32 crc, + const uint8 *buf, + int len) +{ + uint32 c = crc; + int n; + static uint32 crcTable[256]; + static int crcTableComputed = 0; + + if (!crcTableComputed) { + UtilCRCMakeTable(crcTable); + + crcTableComputed = 1; + } + + for (n = 0; n < len; n++) { + c = crcTable[(c ^ buf[n]) & 0xff] ^ (c >> 8); + } + + return c; +} + +uint32 +CRC_Compute(const uint8 *buf, + int len) +{ + return UtilCRCUpdate(0xffffffffL, buf, len) ^ 0xffffffffL; +} + + +/* + *---------------------------------------------------------------------- + * + * Util_FastRand -- + * + * Historical-name wrapper around Random_Simple. + * Deprecated: use Random_Fast, or Random_Simple directly. + * + * Results: + * A random number. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +uint32 +Util_FastRand(uint32 seed) +{ + return Random_Simple(seed); +} + + +/* + *---------------------------------------------------------------------- + * + * Util_Throttle -- + * + * Use for throttling of warnings. + * + * Results: + * Will return TRUE for an increasingly sparse set of counter values: + * 1, 2, ..., 100, 200, 300, ..., 10000, 20000, 30000, ..., . + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Bool +Util_Throttle(uint32 count) // IN: +{ + return count < 100 || + (count < 10000 && count % 100 == 0) || + (count < 1000000 && count % 10000 == 0) || + count % 1000000 == 0; +} + + /* *---------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/user/utilBacktrace.c b/open-vm-tools/lib/user/utilBacktrace.c index 8475a2e3a..9522b4f26 100644 --- a/open-vm-tools/lib/user/utilBacktrace.c +++ b/open-vm-tools/lib/user/utilBacktrace.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/vmCheck/Makefile.am b/open-vm-tools/lib/vmCheck/Makefile.am index 5ff9b2104..cc3e3677b 100644 --- a/open-vm-tools/lib/vmCheck/Makefile.am +++ b/open-vm-tools/lib/vmCheck/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/vmCheck/Makefile.in b/open-vm-tools/lib/vmCheck/Makefile.in deleted file mode 100644 index 407aa2d07..000000000 --- a/open-vm-tools/lib/vmCheck/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/vmCheck -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libVmCheck_la_LIBADD = -am_libVmCheck_la_OBJECTS = vmcheck.lo -libVmCheck_la_OBJECTS = $(am_libVmCheck_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libVmCheck_la_SOURCES) -DIST_SOURCES = $(libVmCheck_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libVmCheck.la -libVmCheck_la_SOURCES = vmcheck.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/vmCheck/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/vmCheck/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libVmCheck.la: $(libVmCheck_la_OBJECTS) $(libVmCheck_la_DEPENDENCIES) - $(LINK) $(libVmCheck_la_OBJECTS) $(libVmCheck_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmcheck.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/vmCheck/vmcheck.c b/open-vm-tools/lib/vmCheck/vmcheck.c index 2a9e033dd..503c7b9f4 100644 --- a/open-vm-tools/lib/vmCheck/vmcheck.c +++ b/open-vm-tools/lib/vmCheck/vmcheck.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/vmSignal/Makefile.am b/open-vm-tools/lib/vmSignal/Makefile.am index bd604fced..9ebbb9e5b 100644 --- a/open-vm-tools/lib/vmSignal/Makefile.am +++ b/open-vm-tools/lib/vmSignal/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/vmSignal/Makefile.in b/open-vm-tools/lib/vmSignal/Makefile.in deleted file mode 100644 index 4dc970bbc..000000000 --- a/open-vm-tools/lib/vmSignal/Makefile.in +++ /dev/null @@ -1,532 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/vmSignal -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libVmSignal_la_LIBADD = -am_libVmSignal_la_OBJECTS = vmsignal.lo -libVmSignal_la_OBJECTS = $(am_libVmSignal_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libVmSignal_la_SOURCES) -DIST_SOURCES = $(libVmSignal_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libVmSignal.la -libVmSignal_la_SOURCES = vmsignal.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/vmSignal/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/vmSignal/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libVmSignal.la: $(libVmSignal_la_OBJECTS) $(libVmSignal_la_DEPENDENCIES) - $(LINK) $(libVmSignal_la_OBJECTS) $(libVmSignal_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmsignal.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/vmSignal/vmsignal.c b/open-vm-tools/lib/vmSignal/vmsignal.c index 2d2c94796..670167b65 100644 --- a/open-vm-tools/lib/vmSignal/vmsignal.c +++ b/open-vm-tools/lib/vmSignal/vmsignal.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/wiper/Makefile.am b/open-vm-tools/lib/wiper/Makefile.am index a3aa30a26..ab3e1c21e 100644 --- a/open-vm-tools/lib/wiper/Makefile.am +++ b/open-vm-tools/lib/wiper/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/wiper/Makefile.in b/open-vm-tools/lib/wiper/Makefile.in deleted file mode 100644 index 8c82aba62..000000000 --- a/open-vm-tools/lib/wiper/Makefile.in +++ /dev/null @@ -1,533 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/wiper -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libWiper_la_LIBADD = -am_libWiper_la_OBJECTS = wiperCommon.lo wiperPosix.lo -libWiper_la_OBJECTS = $(am_libWiper_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libWiper_la_SOURCES) -DIST_SOURCES = $(libWiper_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libWiper.la -libWiper_la_SOURCES = wiperCommon.c wiperPosix.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/wiper/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/wiper/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libWiper.la: $(libWiper_la_OBJECTS) $(libWiper_la_DEPENDENCIES) - $(LINK) $(libWiper_la_OBJECTS) $(libWiper_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wiperCommon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wiperPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/wiper/wiperCommon.c b/open-vm-tools/lib/wiper/wiperCommon.c index cfead3183..8f111ea44 100644 --- a/open-vm-tools/lib/wiper/wiperCommon.c +++ b/open-vm-tools/lib/wiper/wiperCommon.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/wiper/wiperPosix.c b/open-vm-tools/lib/wiper/wiperPosix.c index b216bba45..d389eeeab 100644 --- a/open-vm-tools/lib/wiper/wiperPosix.c +++ b/open-vm-tools/lib/wiper/wiperPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/lib/xdg/Makefile.am b/open-vm-tools/lib/xdg/Makefile.am index cb914014a..65e0c3b65 100644 --- a/open-vm-tools/lib/xdg/Makefile.am +++ b/open-vm-tools/lib/xdg/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2010-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/lib/xdg/Makefile.in b/open-vm-tools/lib/xdg/Makefile.in deleted file mode 100644 index a12837298..000000000 --- a/open-vm-tools/lib/xdg/Makefile.in +++ /dev/null @@ -1,540 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = lib/xdg -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libXdg_la_LIBADD = -am_libXdg_la_OBJECTS = libXdg_la-xdg.lo -libXdg_la_OBJECTS = $(am_libXdg_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libXdg_la_SOURCES) -DIST_SOURCES = $(libXdg_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libXdg.la -libXdg_la_CPPFLAGS = @GLIB2_CPPFLAGS@ -libXdg_la_SOURCES = xdg.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/xdg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu lib/xdg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libXdg.la: $(libXdg_la_OBJECTS) $(libXdg_la_DEPENDENCIES) - $(LINK) $(libXdg_la_OBJECTS) $(libXdg_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libXdg_la-xdg.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libXdg_la-xdg.lo: xdg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libXdg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libXdg_la-xdg.lo -MD -MP -MF $(DEPDIR)/libXdg_la-xdg.Tpo -c -o libXdg_la-xdg.lo `test -f 'xdg.c' || echo '$(srcdir)/'`xdg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libXdg_la-xdg.Tpo $(DEPDIR)/libXdg_la-xdg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xdg.c' object='libXdg_la-xdg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libXdg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libXdg_la-xdg.lo `test -f 'xdg.c' || echo '$(srcdir)/'`xdg.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/lib/xdg/xdg.c b/open-vm-tools/lib/xdg/xdg.c index ac0fa55e6..7f93becf3 100644 --- a/open-vm-tools/lib/xdg/xdg.c +++ b/open-vm-tools/lib/xdg/xdg.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libDeployPkg/Makefile.am b/open-vm-tools/libDeployPkg/Makefile.am index 0af5a8b58..699b6a821 100644 --- a/open-vm-tools/libDeployPkg/Makefile.am +++ b/open-vm-tools/libDeployPkg/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2014-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -18,7 +18,7 @@ lib_LTLIBRARIES = libDeployPkg.la AM_CFLAGS = -AM_CFLAGS += -I$(top_builddir)/include +AM_CFLAGS += -I$(top_srcdir)/include AM_CFLAGS += $(MSPACK_CPPFLAGS) libDeployPkg_la_LIBADD = @@ -31,6 +31,8 @@ libDeployPkg_la_SOURCES += mspackConfig.h libDeployPkg_la_SOURCES += mspackWrapper.c libDeployPkg_la_SOURCES += mspackWrapper.h libDeployPkg_la_SOURCES += processPosix.c +libDeployPkg_la_SOURCES += linuxDeploymentUtilities.c +libDeployPkg_la_SOURCES += linuxDeploymentUtilities.h libDeployPkg_la_SOURCES += toolsDeployPkg.h libDeployPkg_la_LDFLAGS = diff --git a/open-vm-tools/libDeployPkg/Makefile.in b/open-vm-tools/libDeployPkg/Makefile.in deleted file mode 100644 index 29674048f..000000000 --- a/open-vm-tools/libDeployPkg/Makefile.in +++ /dev/null @@ -1,639 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = libDeployPkg -DIST_COMMON = $(libDeployPkg_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/libDeployPkg.pc.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = libDeployPkg.pc -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(libDeployPkg_includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libDeployPkg_la_DEPENDENCIES = -am_libDeployPkg_la_OBJECTS = linuxDeployment.lo mspackWrapper.lo \ - processPosix.lo -libDeployPkg_la_OBJECTS = $(am_libDeployPkg_la_OBJECTS) -libDeployPkg_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libDeployPkg_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libDeployPkg_la_SOURCES) -DIST_SOURCES = $(libDeployPkg_la_SOURCES) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgconfig_DATA) -libDeployPkg_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libDeployPkg_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libDeployPkg.la -AM_CFLAGS = -I$(top_builddir)/include $(MSPACK_CPPFLAGS) -libDeployPkg_la_LIBADD = @MSPACK_LIBS@ -libDeployPkg_la_SOURCES = deployPkgFormat.h linuxDeployment.c \ - mspackConfig.h mspackWrapper.c mspackWrapper.h processPosix.c \ - toolsDeployPkg.h -# We require GCC, so we're fine passing compiler-specific flags. -# Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD -libDeployPkg_la_LDFLAGS = -Wl,-lc -libDeployPkg_includedir = $(includedir)/libDeployPkg -libDeployPkg_include_HEADERS = \ - $(top_srcdir)/lib/include/includeCheck.h \ - $(top_srcdir)/lib/include/imgcust-common/imgcust-api.h \ - $(top_srcdir)/lib/include/imgcust-common/log.h \ - $(top_srcdir)/lib/include/imgcust-common/process.h \ - $(top_srcdir)/lib/include/imgcust-guest/guestcust-events.h \ - $(top_srcdir)/lib/include/vm_basic_types.h \ - $(top_srcdir)/lib/include/rpcout.h \ - $(top_srcdir)/lib/include/deployPkg/linuxDeployment.h -EXTRA_DIST = libDeployPkg.pc.in -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libDeployPkg.pc -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libDeployPkg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu libDeployPkg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -libDeployPkg.pc: $(top_builddir)/config.status $(srcdir)/libDeployPkg.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libDeployPkg.la: $(libDeployPkg_la_OBJECTS) $(libDeployPkg_la_DEPENDENCIES) - $(libDeployPkg_la_LINK) -rpath $(libdir) $(libDeployPkg_la_OBJECTS) $(libDeployPkg_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linuxDeployment.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mspackWrapper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/processPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -install-libDeployPkg_includeHEADERS: $(libDeployPkg_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libDeployPkg_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libDeployPkg_includedir)" - @list='$(libDeployPkg_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libDeployPkg_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libDeployPkg_includedir)/$$f'"; \ - $(libDeployPkg_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libDeployPkg_includedir)/$$f"; \ - done - -uninstall-libDeployPkg_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libDeployPkg_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libDeployPkg_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libDeployPkg_includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libDeployPkg_includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libDeployPkg_includeHEADERS \ - install-pkgconfigDATA - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libDeployPkg_includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-pkgconfigDATA - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libDeployPkg_includeHEADERS install-libLTLIBRARIES \ - install-man install-pdf install-pdf-am install-pkgconfigDATA \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am \ - uninstall-libDeployPkg_includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-pkgconfigDATA - - -$(pkgconfig_DATA): $(top_builddir)/config.status -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/libDeployPkg/deployPkgFormat.h b/open-vm-tools/libDeployPkg/deployPkgFormat.h index e1f281473..755c76135 100644 --- a/open-vm-tools/libDeployPkg/deployPkgFormat.h +++ b/open-vm-tools/libDeployPkg/deployPkgFormat.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,14 +16,14 @@ * *********************************************************/ -/** - * @file deployPkgFormat.h +/* + * deployPkgFormat.h -- * - * @brief A deployment package format used primarily to - * upload and install software in a guest OS. + * A deployment package format used primarily to + * upload and install software in a guest OS. * - * The package can be a file, or a section embedded inside - * of another file or raw block device. + * The package can be a file, or a section embedded inside + * of another file or raw block device. */ #ifndef _DEPLOY_PKG_FORMAT_H_ @@ -46,19 +46,19 @@ typedef enum { GzippedTar // tar.gz } VMwareDeployPkgPayloadType; -// Current versions #define VMWAREDEPLOYPKG_CURRENT_MAJOR_VERSION 1 #define VMWAREDEPLOYPKG_CURRENT_MINOR_VERSION 0 - #include "vm_basic_types.h" -// 4 byte alignment assumed +#define VMWAREDEPLOYPKG_HEADER_FLAGS_NONE 0 +#define VMWAREDEPLOYPKG_HEADER_FLAGS_SKIP_REBOOT 1 + #ifdef _WIN32 -#include "pshpack4.h" +#include "pshpack4.h" // 4 byte alignment assumed. #endif -/** +/* * VMware deployment package header. 4 byte alignment assumed. * The header size is exactly 512 bytes to make it easier to * embed in a disk device, such as a partition. @@ -108,43 +108,43 @@ typedef enum { typedef struct { - char signature[VMWAREDEPLOYPKG_SIGNATURE_LENGTH]; // Not null terminated + char signature[VMWAREDEPLOYPKG_SIGNATURE_LENGTH]; // Not null terminated. uint8 majorVersion; uint8 minorVersion; uint8 payloadType; uint8 reserved; - /* + /* * Structs are aligned to word length. For 32 bit architecture it is 4 bytes * aligned and for 64 bit it is 8 bytes aligned. To make sure 64 bit field - * "pkgLength" starts at the same place in both 32 bit and 64 bit architecture, - * we need to add a 4 byte padding. If the padding is not present then a package + * "pkgLength" starts at the same place in both 32 and 64 bit architecture, + * we need to add a 4 byte padding. If the padding is not present, package * created in 32 bit architecture will not be read correctly in 64 bit * architecture and vice-versa. - * + * * NOTE: Positioning and size of the pad will change if fields are - * added/removed. - */ + * added/removed. + */ uint32 archPadding; - uint64 pkgLength; // total length of package including header -- offset 20 - uint64 payloadOffset; // offset of payload relative to beginning of header -- offset 28 - uint64 payloadLength; // length of payload -- offset 36 - + uint64 pkgLength; // Total length of package including header, offset 20. + uint64 payloadOffset; // Relative to beginning of header, offset 28. + uint64 payloadLength; // Length of payload, offset 36. + /* - * Command string and padding, null terminated -- offset 44 + * Command string and padding, null terminated, offset 44. * This padding makes the header sector-aligned, making it easier * to embed in disks and disk partitions. - * This string may contain OS-specific environment variables, e.g. %SYSTEMDRIVE% + * This string may contain OS-specific env variables, e.g. %SYSTEMDRIVE%. */ char seed[VMWAREDEPLOYPKG_SEED_LENGTH]; - char command[VMWAREDEPLOYPKG_CMD_LENGTH]; - + char command[VMWAREDEPLOYPKG_CMD_LENGTH]; + } VMwareDeployPkgHdr; #ifdef _WIN32 #include "poppack.h" #endif -#endif +#endif // _DEPLOY_PKG_FORMAT_H_ diff --git a/open-vm-tools/libDeployPkg/libDeployPkg_version.h b/open-vm-tools/libDeployPkg/libDeployPkg_version.h index d506d1127..75b0e3440 100644 --- a/open-vm-tools/libDeployPkg/libDeployPkg_version.h +++ b/open-vm-tools/libDeployPkg/libDeployPkg_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libDeployPkg/linuxDeployment.c b/open-vm-tools/libDeployPkg/linuxDeployment.c index 951258e3a..1c8f7855d 100644 --- a/open-vm-tools/libDeployPkg/linuxDeployment.c +++ b/open-vm-tools/libDeployPkg/linuxDeployment.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2014 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,6 +16,12 @@ * *********************************************************/ +/* + * linuxDeployment.c -- + * + * Implementation of libDeployPkg.so. + */ + #include #include #include @@ -33,6 +39,7 @@ #include "deployPkg/linuxDeployment.h" #include "imgcust-common/process.h" #include "imgcust-guest/guestcust-events.h" +#include "linuxDeploymentUtilities.h" #include "mspackWrapper.h" #include "rpcout.h" #include "toolsDeployPkg.h" @@ -106,9 +113,9 @@ struct List { */ // Private functions -static Bool GetPackageInfo(const char* pkgName, char** cmd, uint8* type); +static Bool GetPackageInfo(const char* pkgName, char** cmd, uint8* type, uint8* flags); static Bool ExtractZipPackage(const char* pkg, const char* dest); -static Bool CreateDir(const char* path); +static Bool CreateDir(const char *path); static void Init(void); static struct List* AddToList(struct List* head, const char* token); static int ListSize(struct List* head); @@ -141,12 +148,12 @@ static LogFunction sLog = NoLogging; * @param args [in] Argument list. * **/ -void -Panic(const char *fmtstr, - va_list args) +NORETURN void +Panic(const char *fmtstr, ...) { /* Ignored */ - sLog(log_warning, "Panic call back invoked. \n"); + sLog(log_warning, "Panic callback invoked. \n"); + exit(1); } // ..................................................................................... @@ -167,7 +174,7 @@ Debug(const char *fmtstr, { /* Ignored */ #ifdef VMX86_DEBUG - sLog(log_debug, "Debug callback invoked. \n"); + sLog(log_warning, "Debug callback invoked. \n"); #endif } @@ -517,13 +524,15 @@ Init(void) * @param [IN] packageName package file name * @param [OUT] command command line from header * @param [OUT] archiveType package archive format + * @param [OUT] flags package header flags * @return TRUE is success * **/ Bool GetPackageInfo(const char* packageName, char** command, - uint8* archiveType) + uint8* archiveType, + uint8* flags) { unsigned int sz; VMwareDeployPkgHdr hdr; @@ -557,6 +566,9 @@ GetPackageInfo(const char* packageName, memcpy(*command, hdr.command, VMWAREDEPLOYPKG_CMD_LENGTH); *archiveType = hdr.payloadType; + *flags = hdr.reserved; + + //TODO hdr->command[VMWAREDEPLOYPKG_CMD_LENGTH - 1] = '\0'; return TRUE; } @@ -697,7 +709,6 @@ TransitionState(const char* stateFrom, const char* stateTo) * *----------------------------------------------------------------------------- */ - static char* GetNicsToEnable(const char* dir) { @@ -745,7 +756,7 @@ GetNicsToEnable(const char* dir) } /** - *----------------------------------------------------------------------------- + *------------------------------------------------------------------------------ * * TryToEnableNics -- * @@ -760,9 +771,8 @@ GetNicsToEnable(const char* dir) * * @param nics List of nics that need to be activated. * - *----------------------------------------------------------------------------- + *------------------------------------------------------------------------------ */ - static void TryToEnableNics(const char *nics) { @@ -845,6 +855,113 @@ _DeployPkg_SkipReboot(bool skip) sSkipReboot = skip; } +/** + *---------------------------------------------------------------------------- + * + * CloudInitSetup -- + * + * Function which does the setup for cloud-init if it is enabled. + * Essentially it copies + * - nics.tx + * - cust.cfg to a predefined location. + * + * @param [IN] tmpDirPath Path where nics.txt and cust.cfg exist + * @returns DEPLOY_SUCCESS on success and DEPLOY_ERROR on error + * + *---------------------------------------------------------------------------- + * */ +static int +CloudInitSetup(const char *tmpDirPath) +{ + int deployStatus = DEPLOY_ERROR; + const char *cloudInitTmpDirPath = "/var/run/vmware-imc"; + int forkExecResult; + char command[1024]; + Bool cloudInitTmpDirCreated = FALSE; + + snprintf(command, sizeof(command), + "/bin/mkdir -p %s", cloudInitTmpDirPath); + command[sizeof(command) - 1] = '\0'; + + forkExecResult = ForkExecAndWaitCommand(command); + if (forkExecResult != 0) { + SetDeployError("Error creating %s dir: %s", + cloudInitTmpDirPath, + strerror(errno)); + goto done; + } + + cloudInitTmpDirCreated = TRUE; + + snprintf(command, sizeof(command), + "/bin/rm -f %s/cust.cfg %s/nics.txt", + cloudInitTmpDirPath, cloudInitTmpDirPath); + command[sizeof(command) - 1] = '\0'; + + forkExecResult = ForkExecAndWaitCommand(command); + + snprintf(command, sizeof(command), + "/bin/cp %s/cust.cfg %s/cust.cfg", + tmpDirPath, cloudInitTmpDirPath); + command[sizeof(command) - 1] = '\0'; + + forkExecResult = ForkExecAndWaitCommand(command); + + if (forkExecResult != 0) { + SetDeployError("Error copying cust.cfg file: %s", + strerror(errno)); + goto done; + } + + snprintf(command, sizeof(command), + "/usr/bin/test -f %s/nics.txt", tmpDirPath); + command[sizeof(command) - 1] = '\0'; + + forkExecResult = ForkExecAndWaitCommand(command); + + /* + * /usr/bin/test -f returns 0 if the file exists + * non zero is returned if the file does not exist. + * We need to copy the nics.txt only if it exists. + */ + if (forkExecResult == 0) { + snprintf(command, sizeof(command), + "/bin/cp %s/nics.txt %s/nics.txt", + tmpDirPath, cloudInitTmpDirPath); + command[sizeof(command) - 1] = '\0'; + + forkExecResult = ForkExecAndWaitCommand(command); + if (forkExecResult != 0) { + SetDeployError("Error copying nics.txt file: %s", + strerror(errno)); + goto done; + } + } + + deployStatus = DEPLOY_SUCCESS; + +done: + if (DEPLOY_SUCCESS == deployStatus) { + TransitionState(INPROGRESS, DONE); + } else { + if (cloudInitTmpDirCreated) { + snprintf(command, sizeof(command), + "/bin/rm -rf %s", + cloudInitTmpDirPath); + command[sizeof(command) - 1] = '\0'; + ForkExecAndWaitCommand(command); + } + sLog(log_error, "Setting generic error status in vmx. \n"); + SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, + GUESTCUST_EVENT_CUSTOMIZE_FAILED, + NULL); + TransitionState(INPROGRESS, ERRORED); + } + + return deployStatus; +} + + //...................................................................................... /** @@ -863,12 +980,17 @@ Deploy(const char* packageName) { int deployStatus = DEPLOY_SUCCESS; char* command = NULL; - int deploymentResult; + int deploymentResult = 0; char *nics; char* cleanupCommand; uint8 archiveType; + uint8 flags; + bool forceSkipReboot = false; + Bool cloudInitEnabled = FALSE; + const char *cloudInitConfigFilePath = "/etc/cloud/cloud.cfg"; + char cloudCommand[1024]; + int forkExecResult; - // Move to IN PROGRESS state TransitionState(NULL, INPROGRESS); // Notify the vpx of customization in-progress state @@ -879,7 +1001,7 @@ Deploy(const char* packageName) sLog(log_info, "Reading cabinet file %s. \n", packageName); // Get the command to execute - if (!GetPackageInfo(packageName, &command, &archiveType)) { + if (!GetPackageInfo(packageName, &command, &archiveType, &flags)) { SetDeployError("Error extracting package header information. (%s)", GetDeployError()); return DEPLOY_ERROR; @@ -908,70 +1030,80 @@ Deploy(const char* packageName) } } - // Run the deployment command - sLog(log_info, "Launching deployment %s. \n", command); - deploymentResult = ForkExecAndWaitCommand(command); - free (command); + // check if cloud-init installed + snprintf(cloudCommand, sizeof(cloudCommand), + "/usr/bin/cloud-init -h"); + cloudCommand[sizeof(cloudCommand) - 1] = '\0'; + forkExecResult = ForkExecAndWaitCommand(cloudCommand); + // if cloud-init is installed, check if it is enabled + if (forkExecResult == 0 && IsCloudInitEnabled(cloudInitConfigFilePath)) { + cloudInitEnabled = TRUE; + sSkipReboot = TRUE; + free(command); + deployStatus = CloudInitSetup(EXTRACTPATH); + } else { + // Run the deployment command + sLog(log_info, "Launching deployment %s. \n", command); + deploymentResult = ForkExecAndWaitCommand(command); + free(command); - if (deploymentResult != 0) { - sLog(log_error, "Customization process returned with error. \n"); - sLog(log_debug, "Deployment result = %d \n", deploymentResult); + if (deploymentResult != 0) { + sLog(log_error, "Customization process returned with error. \n"); + sLog(log_debug, "Deployment result = %d \n", deploymentResult); + + if (deploymentResult == CUST_NETWORK_ERROR || + deploymentResult == CUST_NIC_ERROR) { + sLog(log_info, "Setting network error status in vmx. \n"); + SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, + GUESTCUST_EVENT_NETWORK_SETUP_FAILED, + NULL); + } else { + sLog(log_info, "Setting generic error status in vmx. \n"); + SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, + GUESTCUST_EVENT_CUSTOMIZE_FAILED, + NULL); + } - if (deploymentResult == CUST_NETWORK_ERROR || deploymentResult == CUST_NIC_ERROR) { - // Network specific error in the guest - sLog(log_info, "Setting network error status in vmx. \n"); - SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, - GUESTCUST_EVENT_NETWORK_SETUP_FAILED, - NULL); + TransitionState(INPROGRESS, ERRORED); + + deployStatus = DEPLOY_ERROR; + SetDeployError("Deployment failed. " + "The forked off process returned error code."); + sLog(log_error, "Deployment failed. " + "The forked off process returned error code. \n"); } else { - // Generic error in the guest - sLog(log_info, "Setting generic error status in vmx. \n"); - SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_RUNNING, - GUESTCUST_EVENT_CUSTOMIZE_FAILED, + SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_DONE, + TOOLSDEPLOYPKG_ERROR_SUCCESS, NULL); - } - // Move to ERROR state - TransitionState(INPROGRESS, ERRORED); + TransitionState(INPROGRESS, DONE); - // Set deploy status to be returned - deployStatus = DEPLOY_ERROR; - SetDeployError("Deployment failed. The forked off process returned error code."); - sLog(log_error, "Deployment failed. " - "The forked off process returned error code. \n"); - } else { - // Set vmx status - customization success - SetCustomizationStatusInVmx(TOOLSDEPLOYPKG_DONE, - TOOLSDEPLOYPKG_ERROR_SUCCESS, - NULL); - - // Move to DONE state - TransitionState(INPROGRESS, DONE); - - deployStatus = DEPLOY_SUCCESS; - sLog(log_info, "Deployment succeded. \n"); + deployStatus = DEPLOY_SUCCESS; + sLog(log_info, "Deployment succeded. \n"); + } } - /* - * Read in nics to enable from the nics.txt file. We do it irrespective of the - * sucess/failure of the customization so that at the end of it we always - * have nics enabled. - */ - nics = GetNicsToEnable(EXTRACTPATH); - if (nics) { - // XXX: Sleep before the last SetCustomizationStatusInVmx - // This is a temporary-hack for PR 422790 - sleep(5); - sLog(log_info, "Wait before set enable-nics stats in vmx.\n"); + if (!cloudInitEnabled || DEPLOY_SUCCESS != deployStatus) { + /* + * Read in nics to enable from the nics.txt file. We do it irrespective + * of the sucess/failure of the customization so that at the end of it we + * always have nics enabled. + */ + nics = GetNicsToEnable(EXTRACTPATH); + if (nics) { + // XXX: Sleep before the last SetCustomizationStatusInVmx + // This is a temporary-hack for PR 422790 + sleep(5); + sLog(log_info, "Wait before set enable-nics stats in vmx.\n"); - TryToEnableNics(nics); + TryToEnableNics(nics); - free(nics); - } else { - sLog(log_info, "No nics to enable.\n"); + free(nics); + } else { + sLog(log_info, "No nics to enable.\n"); + } } - // Clean up command cleanupCommand = malloc(strlen(CLEANUPCMD) + strlen(CLEANUPPATH) + 1); if (!cleanupCommand) { SetDeployError("Error allocating memory."); @@ -989,9 +1121,17 @@ Deploy(const char* packageName) } free (cleanupCommand); + if (flags & VMWAREDEPLOYPKG_HEADER_FLAGS_SKIP_REBOOT) { + forceSkipReboot = true; + } + sLog(log_info, + "sSkipReboot: %s, forceSkipReboot %s\n", + sSkipReboot ? "true" : "false", + forceSkipReboot ? "true" : "false"); + sSkipReboot |= forceSkipReboot; + //Reset the guest OS if (!sSkipReboot && !deploymentResult) { - // Reboot the Vm pid_t pid = fork(); if (pid == -1) { sLog(log_error, "Failed to fork: %s", strerror(errno)); @@ -1015,8 +1155,8 @@ Deploy(const char* packageName) return deployStatus; } -/* - * Extract all files into the destination folder +/** + * Extract all files into the destination folder. */ Bool ExtractCabPackage(const char* cabFileName, @@ -1049,8 +1189,8 @@ ExtractCabPackage(const char* cabFileName, return TRUE; } -/* - * Extract all files into the destination folder +/** + * Extract all files into the destination folder. */ static Bool ExtractZipPackage(const char* pkgName, diff --git a/open-vm-tools/libDeployPkg/linuxDeploymentUtilities.c b/open-vm-tools/libDeployPkg/linuxDeploymentUtilities.c new file mode 100644 index 000000000..735036ce8 --- /dev/null +++ b/open-vm-tools/libDeployPkg/linuxDeploymentUtilities.c @@ -0,0 +1,71 @@ +/********************************************************* + * Copyright (C) 2016 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +#include +#include +#include +#include +#include "linuxDeploymentUtilities.h" + +/** + *---------------------------------------------------------------------------- + * + * IsCloudInitEnabled -- + * + * Function to determine if cloud-init is enabled. + * Essentially it does + * - read a cloud-init config file + * - Find if a particular flag is enabled or disabled. + * + * @param [IN] cloudFilePath path of the cloud-init config file + * @returns TRUE if disable_vmware_customization is false and FALSE otherwise. + * + *---------------------------------------------------------------------------- + **/ +bool +IsCloudInitEnabled(const char *cloudFilePath) +{ + bool isEnabled = false; + FILE *cloudFile; + char line[256]; + regex_t regex; + // Expected regex in cloud.cfg file + const char *cloudInitRegex = "^\\s*disable_vmware_customization\\s*:\\s*false\\s*$"; + int reti = regcomp(®ex, cloudInitRegex, 0); + if (reti) { + return isEnabled; + } + + // Read cloud.cfg file and find expected string. + cloudFile = fopen(cloudFilePath, "r"); + if (cloudFile == NULL) { + return isEnabled; + } + while(fgets(line, sizeof(line), cloudFile)) { + if (!regexec(®ex, line, 0, NULL, 0)) { + isEnabled = true; + break; + } + } + if (ferror(cloudFile)) { + isEnabled = false; + } + fclose(cloudFile); + + return isEnabled; +} diff --git a/open-vm-tools/libDeployPkg/linuxDeploymentUtilities.h b/open-vm-tools/libDeployPkg/linuxDeploymentUtilities.h new file mode 100644 index 000000000..56640f1ca --- /dev/null +++ b/open-vm-tools/libDeployPkg/linuxDeploymentUtilities.h @@ -0,0 +1,27 @@ +/********************************************************* + * Copyright (C) 2016 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +#ifndef LINUXDEPLOYMENTUTILITIES_H_ +#define LINUXDEPLOYMENTUTILITIES_H_ + +#include + +bool IsCloudInitEnabled(const char* configFile); + +#endif //LINUXDEPLOYMENTUTILITIES_H_ + diff --git a/open-vm-tools/libDeployPkg/mspackConfig.h b/open-vm-tools/libDeployPkg/mspackConfig.h index c7b354a11..ab9003dbb 100644 --- a/open-vm-tools/libDeployPkg/mspackConfig.h +++ b/open-vm-tools/libDeployPkg/mspackConfig.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,14 +16,20 @@ * *********************************************************/ +/* + * mspackConfig.h -- + * + * Definitions of mspack constants. + */ + /* * This file is a version of the auto generated code. This has a bunch of * #definitions which are required to make the mspack library compatible with * the client scenario. An alternative is to use define HAVE_CONFIG_H and use - * the auto generated file. + * the auto generated file. * * The ownership has been taken into our codebase in order to be able to compile - * for different flavours of linux/unix using -target in gcc + * for different flavors of linux/unix using -target in gcc. */ // Define to 1 if you have the `alarm' function. @@ -35,114 +41,114 @@ // Define to 1 if you have and it should be used (not on Ultrix). #define HAVE_ALLOCA_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_CTYPE_H 1 // Define to 1 if you have the header file, and it defines `DIR'. #define HAVE_DIRENT_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_ERRNO_H 1 -// Define to 1 if your system has a working POSIX `fnmatch' function. +// Define to 1 if your system has a working POSIX `fnmatch' function. #define HAVE_FNMATCH 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_FNMATCH_H 1 -// Define to 1 if fseeko (and presumably ftello) exists and is declared. +// Define to 1 if fseeko (and presumably ftello) exists and is declared. #define HAVE_FSEEKO 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_GETOPT_H 1 -// Define to 1 if you have the `getopt_long' function. +// Define to 1 if you have the `getopt_long' function. #define HAVE_GETOPT_LONG 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_INTTYPES_H 1 // Define to 1 if you have the header file. #define HAVE_LIBINTL_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_LIMITS_H 1 -// Define to 1 if declares mbstate_t. +// Define to 1 if declares mbstate_t. #define HAVE_MBSTATE_T 1 -// Define to 1 if you have the `memcpy' function. +// Define to 1 if you have the `memcpy' function. #define HAVE_MEMCPY 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_MEMORY_H 1 -// Define to 1 if you have the `mempcpy' function. +// Define to 1 if you have the `mempcpy' function. #define HAVE_MEMPCPY 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_STDARG_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_STDINT_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_STDLIB_H 1 -// Define to 1 if you have the `strcasecmp' function. +// Define to 1 if you have the `strcasecmp' function. #define HAVE_STRCASECMP 1 -// Define to 1 if you have the `strchr' function. +// Define to 1 if you have the `strchr' function. #define HAVE_STRCHR 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_STRINGS_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_STRING_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_SYS_STAT_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_SYS_TIME_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_SYS_TYPES_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_UNISTD_H 1 -// Define to 1 if you have the `utime' function. +// Define to 1 if you have the `utime' function. #define HAVE_UTIME 1 -// Define to 1 if you have the `utimes' function. +// Define to 1 if you have the `utimes' function. #define HAVE_UTIMES 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_UTIME_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_WCHAR_H 1 -// Define to 1 if you have the header file. +// Define to 1 if you have the header file. #define HAVE_WCTYPE_H 1 /* * PACKAGE, PACKAGE_BUGREPORT, PACKAGE_NAME, PACKAGE_STRING, PACKAGE_TARNAME, - * PACKAGE_VERSION and VERSION should not be defined here, since they will be in conflict - * with open-vm-tools definitions. + * PACKAGE_VERSION and VERSION should not be defined here, since they will be in + * conflict with open-vm-tools definitions. */ -// Define to 1 if you have the ANSI C header files. +// Define to 1 if you have the ANSI C header files. #define STDC_HEADERS 1 -// Define to 1 if you can safely include both and . +// Define to 1 if you can safely include both and . #define TIME_WITH_SYS_TIME 1 -// Number of bits in a file offset, on hosts where this is settable. +// Number of bits in a file offset, on hosts where this is settable. #define _FILE_OFFSET_BITS 64 -// Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). +// Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). #define _LARGEFILE_SOURCE 1 diff --git a/open-vm-tools/libDeployPkg/mspackWrapper.c b/open-vm-tools/libDeployPkg/mspackWrapper.c index b415d936a..da20d6845 100644 --- a/open-vm-tools/libDeployPkg/mspackWrapper.c +++ b/open-vm-tools/libDeployPkg/mspackWrapper.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,6 +16,12 @@ * *********************************************************/ +/* + * mspackWrapper.c -- + * + * Implementation of the mspack wrapper. + */ + #include "mspackWrapper.h" #include #include diff --git a/open-vm-tools/libDeployPkg/mspackWrapper.h b/open-vm-tools/libDeployPkg/mspackWrapper.h index 214e4249e..cf064e40e 100644 --- a/open-vm-tools/libDeployPkg/mspackWrapper.h +++ b/open-vm-tools/libDeployPkg/mspackWrapper.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,6 +16,12 @@ * *********************************************************/ +/* + * mspackWrapper.h -- + * + * Definitions of the mspack wrapper. + */ + #ifndef _MSPACKWRAPPER_H_ #define _MSPACKWRAPPER_H_ diff --git a/open-vm-tools/libDeployPkg/processPosix.c b/open-vm-tools/libDeployPkg/processPosix.c index bfea9e4fd..b81ec80ed 100644 --- a/open-vm-tools/libDeployPkg/processPosix.c +++ b/open-vm-tools/libDeployPkg/processPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,6 +16,12 @@ * *********************************************************/ +/* + * processPosix.c -- + * + * Implementation of the POSIX process wrapper. + */ + #include "imgcust-common/log.h" #include "imgcust-common/process.h" #include @@ -23,7 +29,6 @@ #include #include -// vmware headers #include "util.h" typedef struct _ProcessInternal { @@ -44,19 +49,25 @@ typedef enum _ReadStatus { READSTATUS_ERROR } ReadStatus; -static void ProcessRead(ProcessInternal* p, ReadStatus* status, Bool stdout, Bool readToEof); +static void +ProcessRead(ProcessInternal *p, ReadStatus *status, Bool out, Bool readToEof); + -/** - * Create and initialize a process object +/* + *------------------------------------------------------------------------------ + * + * Process_Create -- + * + * Create and initialize a process object. + * + *------------------------------------------------------------------------------ */ -ProcessError -Process_Create(ProcessHandle *h, - char* args[], - void* logPtr) +ProcessError +Process_Create(ProcessHandle *h, char *args[], void *logPtr) { int i, numArgs; - ProcessInternal* p; + ProcessInternal *p; LogFunction log = (LogFunction)logPtr; log(log_info, "sizeof ProcessInternal is %d\n", sizeof(ProcessInternal)); p = Util_SafeMalloc(sizeof(ProcessInternal)); @@ -83,23 +94,30 @@ Process_Create(ProcessHandle *h, return PROCESS_SUCCESS; } -/** - * Run a process until complete, collecting stdout and stderr - * into the process object. + +/* + *------------------------------------------------------------------------------ + * + * Process_RunToComplete -- + * + * Runs a process until complete, collecting stdout and stderr into the + * process object. + * + *------------------------------------------------------------------------------ */ -ProcessError -Process_RunToComplete(ProcessHandle h, - unsigned long timeoutSec) +ProcessError +Process_RunToComplete(ProcessHandle h, unsigned long timeoutSec) { int stdout[2]; int stderr[2]; int flags; ProcessInternal* p; // poll for the process to complete and read the output - const unsigned int OneSecondMicrosec = 1000000; - const unsigned int LoopSleepMicrosec = OneSecondMicrosec / 10; - const unsigned long timeoutLoopSleeps = timeoutSec * (OneSecondMicrosec / LoopSleepMicrosec); + const unsigned int OneSecMicroSec = 1000000; + const unsigned int LoopSleepMicrosec = OneSecMicroSec / 10; + const unsigned long timeoutLoopSleeps = + timeoutSec * (OneSecMicroSec / LoopSleepMicrosec); unsigned long elapsedTimeLoopSleeps; ReadStatus res_stdout = READSTATUS_UNDEFINED; @@ -109,13 +127,13 @@ Process_RunToComplete(ProcessHandle h, stdout[0] = stdout[1] = 0; if (pipe(stdout) < 0) { - p->log(log_error, "Failed to create pipe for stdout: %s", strerror(errno)); + p->log(log_error, "Failed to create pipe for stdout:%s", strerror(errno)); return PROCESS_FAILED; } - + stderr[0] = stderr[1] = 0; if (pipe(stderr) < 0) { - p->log(log_error, "Failed to create pipe for stderr, %s", strerror(errno)); + p->log(log_error, "Failed to create pipe for stderr,%s", strerror(errno)); close(stdout[0]); close(stdout[1]); return PROCESS_FAILED; @@ -157,20 +175,20 @@ Process_RunToComplete(ProcessHandle h, while (1) { int processStatus; - const int processFinished = (waitpid(p->pid, &processStatus, WNOHANG) > 0); + int processFinished = (waitpid(p->pid, &processStatus, WNOHANG) > 0); if (processFinished) { if (WIFEXITED(processStatus)) { p->exitCode = WEXITSTATUS(processStatus); - p->log(log_info, + p->log(log_info, "Process exited normally after %d seconds, returned %d", - elapsedTimeLoopSleeps * LoopSleepMicrosec / OneSecondMicrosec, + elapsedTimeLoopSleeps * LoopSleepMicrosec / OneSecMicroSec, p->exitCode); } else if (WIFSIGNALED(processStatus)) { p->exitCode = 127; p->log(log_error, - "Process exited abnormally after %d seconds, uncaught signal %d", - elapsedTimeLoopSleeps * LoopSleepMicrosec / OneSecondMicrosec, + "Process exited abnormally after %d sec, uncaught signal %d", + elapsedTimeLoopSleeps * LoopSleepMicrosec / OneSecMicroSec, WTERMSIG(processStatus)); } @@ -181,16 +199,16 @@ Process_RunToComplete(ProcessHandle h, kill(p->pid, SIGKILL); } - // empty the pipes + // Empty the pipes. ProcessRead(p, &res_stdout, TRUE, FALSE); if (res_stdout == READSTATUS_ERROR) { - p->log(log_error, "Error occured while reading process output, killing..."); + p->log(log_error, "Error while reading process output, killing..."); kill(p->pid, SIGKILL); } ProcessRead(p, &res_stderr, FALSE, FALSE); if (res_stderr == READSTATUS_ERROR) { - p->log(log_error, "Error occured while reading process output, killing..."); + p->log(log_error, "Error while reading process output, killing..."); kill(p->pid, SIGKILL); } @@ -199,15 +217,15 @@ Process_RunToComplete(ProcessHandle h, } } - // Process completed. Now read all the output to EOF + // Process completed. Now read all the output to EOF. ProcessRead(p, &res_stdout, TRUE, TRUE); if (res_stdout == READSTATUS_ERROR) { - p->log(log_error, "Error occured while reading process output, killing..."); + p->log(log_error, "Error while reading process output, killing..."); } ProcessRead(p, &res_stderr, FALSE, TRUE); if (res_stderr == READSTATUS_ERROR) { - p->log(log_error, "Error occured while reading process output, killing..."); + p->log(log_error, "Error while reading process output, killing..."); } close(stdout[1]); @@ -215,9 +233,13 @@ Process_RunToComplete(ProcessHandle h, return PROCESS_SUCCESS; } -/** + +/* + *------------------------------------------------------------------------------ + * + * ProcessRead -- * - * Read redirected stdout or stderr. + * Read redirected stdout or stderr. * * status - as IN - holds the result from previous read operation. * as OUT - returns the status from the read operation. @@ -228,12 +250,12 @@ Process_RunToComplete(ProcessHandle h, * readToEof = FALSE- Just empty the pipe. This will return even if we get * EAGAIN back from the read. Use this in the midst of the poll * loop so the pipe doesn't fill up and block the process. + * + *------------------------------------------------------------------------------ */ + static void -ProcessRead(ProcessInternal* p, - ReadStatus* status, /* IN/OUT */ - Bool stdout, - Bool readToEof) +ProcessRead(ProcessInternal *p, ReadStatus *status, Bool stdout, Bool readToEof) { char buf[1024]; size_t currSize, newSize; @@ -292,42 +314,75 @@ ProcessRead(ProcessInternal* p, } } } while (1); -} +} + + +/* + *------------------------------------------------------------------------------ + * + * Process_GetStdout -- + * + * Returns process's standard output. + * + *------------------------------------------------------------------------------ + */ -/** - * Get the readonly stdout buffer from the object - */ -const char* +const char * Process_GetStdout(ProcessHandle h) { - ProcessInternal* p = (ProcessInternal*)h; + ProcessInternal *p = (ProcessInternal *)h; return p->stdoutStr; } -/** - * Get the readonly stderr buffer from the object - */ -const char* + +/* + *------------------------------------------------------------------------------ + * + * Process_GetStderr -- + * + * Returns process's standard error output. + * + *------------------------------------------------------------------------------ + */ + +const char * Process_GetStderr(ProcessHandle h) { - ProcessInternal* p = (ProcessInternal*)h; + ProcessInternal *p = (ProcessInternal *)h; return p->stderrStr; } -/** - * Get the process return code - */ -int + +/* + *------------------------------------------------------------------------------ + * + * Process_GetExitCode -- + * + * Returns process's exit code. + * + *------------------------------------------------------------------------------ + */ + +int Process_GetExitCode(ProcessHandle h) { - ProcessInternal* p = (ProcessInternal*)h; + ProcessInternal *p = (ProcessInternal *)h; return p->exitCode; } -/** - * clean up + +/* + *------------------------------------------------------------------------------ + * + * Process_Destroy -- + * + * Destroys the process and returns result of the operation. + * + *------------------------------------------------------------------------------ */ -ProcessError Process_Destroy(ProcessHandle h) + +ProcessError +Process_Destroy(ProcessHandle h) { ProcessInternal* p; int i; diff --git a/open-vm-tools/libDeployPkg/toolsDeployPkg.h b/open-vm-tools/libDeployPkg/toolsDeployPkg.h index 724421cd8..8e8eab183 100644 --- a/open-vm-tools/libDeployPkg/toolsDeployPkg.h +++ b/open-vm-tools/libDeployPkg/toolsDeployPkg.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -16,19 +16,18 @@ * *********************************************************/ +/* + * toolsDeployPkg.h -- + * + * Define constants & exported methods related to tools package deployment. + */ + #ifndef __TOOLS_DEPLOYPKG_H_ #define __TOOLS_DEPLOYPKG_H_ #define INCLUDE_ALLOW_USERLEVEL #include "includeCheck.h" - -/* - * toolsDeployPkg.h - * - * -- Define constants & exported methods related to tools package deployment. - */ - typedef enum { TOOLSDEPLOYPKG_IDLE = 0, TOOLSDEPLOYPKG_PENDING, @@ -40,15 +39,40 @@ typedef enum { typedef enum { TOOLSDEPLOYPKG_ERROR_SUCCESS = 0, - TOOLSDEPLOYPKG_ERROR_NOT_SUPPORT, // Old tools do not support opetion - TOOLSDEPLOYPKG_ERROR_PKG_NOT_FOUND, // Specified pkg is not found + TOOLSDEPLOYPKG_ERROR_NOT_SUPPORT, // Old tools do not support option. + TOOLSDEPLOYPKG_ERROR_PKG_NOT_FOUND, // Specified pkg is not found. TOOLSDEPLOYPKG_ERROR_RPC_INVALID, TOOLSDEPLOYPKG_ERROR_COPY_FAILED, TOOLSDEPLOYPKG_ERROR_DEPLOY_FAILED, } ToolsDeployPkgError; -Bool ToolsDeployPkg_PowerOn(void); -void ToolsDeployPkg_Begin(void); + +/* + *------------------------------------------------------------------------------ + * + * ToolsDeployPkg_PowerOn -- + * + * Tools callback for PowerOn. + * + *------------------------------------------------------------------------------ + */ + +Bool +ToolsDeployPkg_PowerOn(void); + + +/* + *------------------------------------------------------------------------------ + * + * ToolsDeployPkg_PowerOn -- + * + * Tools callback for Begin. + * + *------------------------------------------------------------------------------ + */ + +void +ToolsDeployPkg_Begin(void); #define QUERY_NICS_SUPPORTED "queryNicsSupported" #define NICS_STATUS_CONNECTED "connected" diff --git a/open-vm-tools/libguestlib/Makefile.am b/open-vm-tools/libguestlib/Makefile.am index b05d43a1c..b49af696f 100644 --- a/open-vm-tools/libguestlib/Makefile.am +++ b/open-vm-tools/libguestlib/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -18,7 +18,7 @@ lib_LTLIBRARIES = libguestlib.la AM_CFLAGS = -AM_CFLAGS += -I$(top_builddir)/include +AM_CFLAGS += -I$(top_srcdir)/include libguestlib_la_LIBADD = libguestlib_la_LIBADD += @VMTOOLS_LIBS@ diff --git a/open-vm-tools/libguestlib/Makefile.in b/open-vm-tools/libguestlib/Makefile.in deleted file mode 100644 index f80d23b76..000000000 --- a/open-vm-tools/libguestlib/Makefile.in +++ /dev/null @@ -1,678 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = libguestlib -DIST_COMMON = $(libguestlib_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/vmguestlib.pc.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = vmguestlib.pc -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(libguestlib_includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libguestlib_la_DEPENDENCIES = -am_libguestlib_la_OBJECTS = libguestlib_la-guestlibV3_xdr.lo \ - libguestlib_la-guestlibIoctl_xdr.lo \ - libguestlib_la-vmGuestLib.lo -libguestlib_la_OBJECTS = $(am_libguestlib_la_OBJECTS) -libguestlib_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libguestlib_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libguestlib_la_SOURCES) -DIST_SOURCES = $(libguestlib_la_SOURCES) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgconfig_DATA) -libguestlib_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libguestlib_include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ - -# XXX: see explanation in lib/guestRpc/Makefile.am -CFLAGS = @CFLAGS@ -Wno-unused -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libguestlib.la -AM_CFLAGS = -I$(top_builddir)/include -libguestlib_la_LIBADD = @VMTOOLS_LIBS@ -libguestlib_la_SOURCES = guestlibV3_xdr.c guestlibIoctl_xdr.c \ - vmGuestLib.c -# We require GCC, so we're fine passing compiler-specific flags. -# Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD -libguestlib_la_LDFLAGS = -Wl,-lc -libguestlib_includedir = $(includedir)/vmGuestLib -libguestlib_include_HEADERS = \ - $(top_srcdir)/lib/include/includeCheck.h \ - $(top_srcdir)/lib/include/vmGuestLib.h \ - $(top_srcdir)/lib/include/vmSessionId.h \ - $(top_srcdir)/lib/include/vm_basic_types.h -BUILT_SOURCES = guestlibV3.h guestlibV3_xdr.c guestlibIoctl.h \ - guestlibIoctl_xdr.c -CLEANFILES = $(BUILT_SOURCES) -libguestlib_la_CPPFLAGS = -DVMTOOLS_USE_GLIB @GLIB2_CPPFLAGS@ -EXTRA_DIST = vmguestlib.pc.in -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = vmguestlib.pc -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libguestlib/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu libguestlib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -vmguestlib.pc: $(top_builddir)/config.status $(srcdir)/vmguestlib.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libguestlib.la: $(libguestlib_la_OBJECTS) $(libguestlib_la_DEPENDENCIES) - $(libguestlib_la_LINK) -rpath $(libdir) $(libguestlib_la_OBJECTS) $(libguestlib_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestlib_la-guestlibIoctl_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestlib_la-guestlibV3_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestlib_la-vmGuestLib.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libguestlib_la-guestlibV3_xdr.lo: guestlibV3_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestlib_la-guestlibV3_xdr.lo -MD -MP -MF $(DEPDIR)/libguestlib_la-guestlibV3_xdr.Tpo -c -o libguestlib_la-guestlibV3_xdr.lo `test -f 'guestlibV3_xdr.c' || echo '$(srcdir)/'`guestlibV3_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestlib_la-guestlibV3_xdr.Tpo $(DEPDIR)/libguestlib_la-guestlibV3_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='guestlibV3_xdr.c' object='libguestlib_la-guestlibV3_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestlib_la-guestlibV3_xdr.lo `test -f 'guestlibV3_xdr.c' || echo '$(srcdir)/'`guestlibV3_xdr.c - -libguestlib_la-guestlibIoctl_xdr.lo: guestlibIoctl_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestlib_la-guestlibIoctl_xdr.lo -MD -MP -MF $(DEPDIR)/libguestlib_la-guestlibIoctl_xdr.Tpo -c -o libguestlib_la-guestlibIoctl_xdr.lo `test -f 'guestlibIoctl_xdr.c' || echo '$(srcdir)/'`guestlibIoctl_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestlib_la-guestlibIoctl_xdr.Tpo $(DEPDIR)/libguestlib_la-guestlibIoctl_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='guestlibIoctl_xdr.c' object='libguestlib_la-guestlibIoctl_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestlib_la-guestlibIoctl_xdr.lo `test -f 'guestlibIoctl_xdr.c' || echo '$(srcdir)/'`guestlibIoctl_xdr.c - -libguestlib_la-vmGuestLib.lo: vmGuestLib.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestlib_la-vmGuestLib.lo -MD -MP -MF $(DEPDIR)/libguestlib_la-vmGuestLib.Tpo -c -o libguestlib_la-vmGuestLib.lo `test -f 'vmGuestLib.c' || echo '$(srcdir)/'`vmGuestLib.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestlib_la-vmGuestLib.Tpo $(DEPDIR)/libguestlib_la-vmGuestLib.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmGuestLib.c' object='libguestlib_la-vmGuestLib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestlib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestlib_la-vmGuestLib.lo `test -f 'vmGuestLib.c' || echo '$(srcdir)/'`vmGuestLib.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -install-libguestlib_includeHEADERS: $(libguestlib_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libguestlib_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libguestlib_includedir)" - @list='$(libguestlib_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libguestlib_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libguestlib_includedir)/$$f'"; \ - $(libguestlib_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libguestlib_includedir)/$$f"; \ - done - -uninstall-libguestlib_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libguestlib_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libguestlib_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libguestlib_includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libguestlib_includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libguestlib_includeHEADERS \ - install-pkgconfigDATA - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES \ - uninstall-libguestlib_includeHEADERS uninstall-pkgconfigDATA - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-libguestlib_includeHEADERS \ - install-man install-pdf install-pdf-am install-pkgconfigDATA \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES \ - uninstall-libguestlib_includeHEADERS uninstall-pkgconfigDATA - - -$(pkgconfig_DATA): $(top_builddir)/config.status - -guestlibIoctl.h: guestlibIoctl.x - @RPCGEN_WRAPPER@ libguestlib/guestlibIoctl.x $@ - -guestlibIoctl_xdr.c: guestlibIoctl.x guestlibIoctl.h - @RPCGEN_WRAPPER@ libguestlib/guestlibIoctl.x $@ - -guestlibV3.h: guestlibV3.x - @RPCGEN_WRAPPER@ libguestlib/guestlibV3.x $@ - -guestlibV3_xdr.c: guestlibV3.x guestlibV3.h - @RPCGEN_WRAPPER@ libguestlib/guestlibV3.x $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/libguestlib/guestlibIoctl.x b/open-vm-tools/libguestlib/guestlibIoctl.x index 2ef2e244d..0487335a8 100644 --- a/open-vm-tools/libguestlib/guestlibIoctl.x +++ b/open-vm-tools/libguestlib/guestlibIoctl.x @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libguestlib/guestlibV3.x b/open-vm-tools/libguestlib/guestlibV3.x index e1806b7ad..327cdc3a6 100644 --- a/open-vm-tools/libguestlib/guestlibV3.x +++ b/open-vm-tools/libguestlib/guestlibV3.x @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libguestlib/vmGuestLib.c b/open-vm-tools/libguestlib/vmGuestLib.c index 487826c3a..544e0fa4b 100644 --- a/open-vm-tools/libguestlib/vmGuestLib.c +++ b/open-vm-tools/libguestlib/vmGuestLib.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libguestlib/vmGuestLibInt.h b/open-vm-tools/libguestlib/vmGuestLibInt.h index 87057a6b4..d97951dc2 100644 --- a/open-vm-tools/libguestlib/vmGuestLibInt.h +++ b/open-vm-tools/libguestlib/vmGuestLibInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libguestlib/vmguestlib_version.h b/open-vm-tools/libguestlib/vmguestlib_version.h index f3d0aac9f..9349bff7a 100644 --- a/open-vm-tools/libguestlib/vmguestlib_version.h +++ b/open-vm-tools/libguestlib/vmguestlib_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libhgfs/Makefile.am b/open-vm-tools/libhgfs/Makefile.am index fb0b08349..760914525 100644 --- a/open-vm-tools/libhgfs/Makefile.am +++ b/open-vm-tools/libhgfs/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2010-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/libhgfs/Makefile.in b/open-vm-tools/libhgfs/Makefile.in deleted file mode 100644 index bb1d60f67..000000000 --- a/open-vm-tools/libhgfs/Makefile.in +++ /dev/null @@ -1,588 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_GTKMM_TRUE@am__append_1 = ../lib/hgfsUri/libHgfsUri.la -subdir = libhgfs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libhgfs_la_DEPENDENCIES = ../lib/hgfs/libHgfs.la \ - ../lib/hgfsHelper/libHgfsHelper.la \ - ../lib/hgfsServer/libHgfsServer.la $(am__append_1) \ - ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.la \ - ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.la -am_libhgfs_la_OBJECTS = libhgfs_la-hgfslib.lo -libhgfs_la_OBJECTS = $(am_libhgfs_la_OBJECTS) -libhgfs_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libhgfs_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libhgfs_la_SOURCES) -DIST_SOURCES = $(libhgfs_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libhgfs.la -libhgfs_la_LIBADD = ../lib/hgfs/libHgfs.la \ - ../lib/hgfsHelper/libHgfsHelper.la \ - ../lib/hgfsServer/libHgfsServer.la $(am__append_1) \ - ../lib/hgfsServerManagerGuest/libHgfsServerManagerGuest.la \ - ../lib/hgfsServerPolicyGuest/libHgfsServerPolicyGuest.la \ - @GLIB2_LIBS@ @GTHREAD_LIBS@ @VMTOOLS_LIBS@ $(am__empty) -libhgfs_la_SOURCES = hgfslib.c -libhgfs_la_CPPFLAGS = -I$(top_srcdir)/libvmtools -# We require GCC, so we're fine passing compiler-specific flags. -# Needed for OS's that don't link shared libraries against libc by -#default, e.g. FreeBSD -libhgfs_la_LDFLAGS = -Wl,-z,defs -Wl,-lc -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libhgfs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu libhgfs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libhgfs.la: $(libhgfs_la_OBJECTS) $(libhgfs_la_DEPENDENCIES) - $(libhgfs_la_LINK) -rpath $(libdir) $(libhgfs_la_OBJECTS) $(libhgfs_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhgfs_la-hgfslib.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libhgfs_la-hgfslib.lo: hgfslib.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhgfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhgfs_la-hgfslib.lo -MD -MP -MF $(DEPDIR)/libhgfs_la-hgfslib.Tpo -c -o libhgfs_la-hgfslib.lo `test -f 'hgfslib.c' || echo '$(srcdir)/'`hgfslib.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libhgfs_la-hgfslib.Tpo $(DEPDIR)/libhgfs_la-hgfslib.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hgfslib.c' object='libhgfs_la-hgfslib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhgfs_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhgfs_la-hgfslib.lo `test -f 'hgfslib.c' || echo '$(srcdir)/'`hgfslib.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/libhgfs/hgfslib.c b/open-vm-tools/libhgfs/hgfslib.c index 8e44a59cd..ec4720f5b 100644 --- a/open-vm-tools/libhgfs/hgfslib.c +++ b/open-vm-tools/libhgfs/hgfslib.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libvmtools/Makefile.am b/open-vm-tools/libvmtools/Makefile.am index be6a1bebb..19719422f 100644 --- a/open-vm-tools/libvmtools/Makefile.am +++ b/open-vm-tools/libvmtools/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2008-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/libvmtools/Makefile.in b/open-vm-tools/libvmtools/Makefile.in deleted file mode 100644 index 80527a684..000000000 --- a/open-vm-tools/libvmtools/Makefile.in +++ /dev/null @@ -1,693 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_VSOCK_TRUE@am__append_1 = ../lib/asyncsocket/libAsyncSocket.la -@ENABLE_GRABBITMQPROXY_TRUE@am__append_2 = @SSL_LIBS@ -lcrypto -@USE_SLASH_PROC_TRUE@am__append_3 = ../lib/slashProc/libSlashProc.la -subdir = libvmtools -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -libvmtools_la_DEPENDENCIES = ../lib/lock/libLock.la \ - ../lib/backdoor/libBackdoor.la $(am__append_1) \ - ../lib/sslDirect/libSslDirect.la ../lib/pollGtk/libPollGtk.la \ - ../lib/poll/libPoll.la ../lib/dataMap/libDataMap.la \ - ../lib/hashMap/libHashMap.la ../lib/dict/libDict.la \ - ../lib/dynxdr/libDynxdr.la ../lib/err/libErr.la \ - ../lib/file/libFile.la ../lib/glibUtils/libGlibUtils.la \ - ../lib/guestApp/libGuestApp.la ../lib/guestRpc/libGuestRpc.la \ - ../lib/message/libMessage.la ../lib/netUtil/libNetUtil.la \ - ../lib/nicInfo/libNicInfo.la ../lib/panic/libPanic.la \ - ../lib/procMgr/libProcMgr.la \ - ../lib/rpcChannel/libRpcChannel.la ../lib/rpcIn/libRpcIn.la \ - ../lib/rpcOut/libRpcOut.la ../lib/rpcVmx/libRpcVmx.la \ - ../lib/string/libString.la ../lib/syncDriver/libSyncDriver.la \ - ../lib/system/libSystem.la ../lib/stubs/libStubsCS.la \ - ../lib/unicode/libUnicode.la ../lib/user/libUser.la \ - ../lib/vmCheck/libVmCheck.la ../lib/vmSignal/libVmSignal.la \ - ../lib/wiper/libWiper.la ../lib/misc/libMisc.la \ - $(am__DEPENDENCIES_1) $(am__append_3) -am_libvmtools_la_OBJECTS = libvmtools_la-i18n.lo \ - libvmtools_la-monotonicTimer.lo libvmtools_la-signalSource.lo \ - libvmtools_la-vmtools.lo libvmtools_la-vmtoolsConfig.lo \ - libvmtools_la-vmtoolsLog.lo libvmtools_la-vmxLogger.lo \ - libvmtools_la-guestSDKLog.lo libvmtools_la-stub-log.lo -libvmtools_la_OBJECTS = $(am_libvmtools_la_OBJECTS) -libvmtools_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libvmtools_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libvmtools_la_SOURCES) -DIST_SOURCES = $(libvmtools_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libvmtools.la -libvmtools_la_LIBADD = ../lib/lock/libLock.la \ - ../lib/backdoor/libBackdoor.la $(am__append_1) \ - ../lib/sslDirect/libSslDirect.la ../lib/pollGtk/libPollGtk.la \ - ../lib/poll/libPoll.la ../lib/dataMap/libDataMap.la \ - ../lib/hashMap/libHashMap.la ../lib/dict/libDict.la \ - ../lib/dynxdr/libDynxdr.la ../lib/err/libErr.la \ - ../lib/file/libFile.la ../lib/glibUtils/libGlibUtils.la \ - ../lib/guestApp/libGuestApp.la ../lib/guestRpc/libGuestRpc.la \ - ../lib/message/libMessage.la ../lib/netUtil/libNetUtil.la \ - ../lib/nicInfo/libNicInfo.la ../lib/panic/libPanic.la \ - ../lib/procMgr/libProcMgr.la \ - ../lib/rpcChannel/libRpcChannel.la ../lib/rpcIn/libRpcIn.la \ - ../lib/rpcOut/libRpcOut.la ../lib/rpcVmx/libRpcVmx.la \ - ../lib/string/libString.la ../lib/syncDriver/libSyncDriver.la \ - ../lib/system/libSystem.la ../lib/stubs/libStubsCS.la \ - ../lib/unicode/libUnicode.la ../lib/user/libUser.la \ - ../lib/vmCheck/libVmCheck.la ../lib/vmSignal/libVmSignal.la \ - ../lib/wiper/libWiper.la ../lib/misc/libMisc.la \ - @LIBVMTOOLS_LIBADD@ @GLIB2_LIBS@ @ICU_LIBS@ $(am__append_2) \ - $(am__append_3) - -# Recompile the stub for Log_* functions, but not Log() itself (see -DNO_LOG_STUB). -libvmtools_la_SOURCES = i18n.c monotonicTimer.c signalSource.c \ - vmtools.c vmtoolsConfig.c vmtoolsLog.c vmxLogger.c \ - guestSDKLog.c $(top_srcdir)/lib/stubs/stub-log.c -libvmtools_la_CPPFLAGS = -DVMTOOLS_USE_GLIB -DNO_LOG_STUB \ - -DVMTOOLS_DATA_DIR=\"$(datadir)/open-vm-tools\" \ - @GLIB2_CPPFLAGS@ $(am__empty) -# We require GCC, so we're fine passing compiler-specific flags. -# Needed for OS's that don't link shared libraries against libc by -#default, e.g. FreeBSD -libvmtools_la_LDFLAGS = -Wl,-z,defs -Wl,-lc -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libvmtools/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu libvmtools/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libvmtools.la: $(libvmtools_la_OBJECTS) $(libvmtools_la_DEPENDENCIES) - $(libvmtools_la_LINK) -rpath $(libdir) $(libvmtools_la_OBJECTS) $(libvmtools_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-guestSDKLog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-i18n.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-monotonicTimer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-signalSource.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-stub-log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-vmtools.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-vmtoolsConfig.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-vmtoolsLog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmtools_la-vmxLogger.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libvmtools_la-i18n.lo: i18n.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-i18n.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-i18n.Tpo -c -o libvmtools_la-i18n.lo `test -f 'i18n.c' || echo '$(srcdir)/'`i18n.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-i18n.Tpo $(DEPDIR)/libvmtools_la-i18n.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i18n.c' object='libvmtools_la-i18n.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-i18n.lo `test -f 'i18n.c' || echo '$(srcdir)/'`i18n.c - -libvmtools_la-monotonicTimer.lo: monotonicTimer.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-monotonicTimer.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-monotonicTimer.Tpo -c -o libvmtools_la-monotonicTimer.lo `test -f 'monotonicTimer.c' || echo '$(srcdir)/'`monotonicTimer.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-monotonicTimer.Tpo $(DEPDIR)/libvmtools_la-monotonicTimer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='monotonicTimer.c' object='libvmtools_la-monotonicTimer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-monotonicTimer.lo `test -f 'monotonicTimer.c' || echo '$(srcdir)/'`monotonicTimer.c - -libvmtools_la-signalSource.lo: signalSource.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-signalSource.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-signalSource.Tpo -c -o libvmtools_la-signalSource.lo `test -f 'signalSource.c' || echo '$(srcdir)/'`signalSource.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-signalSource.Tpo $(DEPDIR)/libvmtools_la-signalSource.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signalSource.c' object='libvmtools_la-signalSource.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-signalSource.lo `test -f 'signalSource.c' || echo '$(srcdir)/'`signalSource.c - -libvmtools_la-vmtools.lo: vmtools.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-vmtools.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-vmtools.Tpo -c -o libvmtools_la-vmtools.lo `test -f 'vmtools.c' || echo '$(srcdir)/'`vmtools.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-vmtools.Tpo $(DEPDIR)/libvmtools_la-vmtools.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmtools.c' object='libvmtools_la-vmtools.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-vmtools.lo `test -f 'vmtools.c' || echo '$(srcdir)/'`vmtools.c - -libvmtools_la-vmtoolsConfig.lo: vmtoolsConfig.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-vmtoolsConfig.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-vmtoolsConfig.Tpo -c -o libvmtools_la-vmtoolsConfig.lo `test -f 'vmtoolsConfig.c' || echo '$(srcdir)/'`vmtoolsConfig.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-vmtoolsConfig.Tpo $(DEPDIR)/libvmtools_la-vmtoolsConfig.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmtoolsConfig.c' object='libvmtools_la-vmtoolsConfig.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-vmtoolsConfig.lo `test -f 'vmtoolsConfig.c' || echo '$(srcdir)/'`vmtoolsConfig.c - -libvmtools_la-vmtoolsLog.lo: vmtoolsLog.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-vmtoolsLog.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-vmtoolsLog.Tpo -c -o libvmtools_la-vmtoolsLog.lo `test -f 'vmtoolsLog.c' || echo '$(srcdir)/'`vmtoolsLog.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-vmtoolsLog.Tpo $(DEPDIR)/libvmtools_la-vmtoolsLog.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmtoolsLog.c' object='libvmtools_la-vmtoolsLog.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-vmtoolsLog.lo `test -f 'vmtoolsLog.c' || echo '$(srcdir)/'`vmtoolsLog.c - -libvmtools_la-vmxLogger.lo: vmxLogger.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-vmxLogger.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-vmxLogger.Tpo -c -o libvmtools_la-vmxLogger.lo `test -f 'vmxLogger.c' || echo '$(srcdir)/'`vmxLogger.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-vmxLogger.Tpo $(DEPDIR)/libvmtools_la-vmxLogger.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmxLogger.c' object='libvmtools_la-vmxLogger.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-vmxLogger.lo `test -f 'vmxLogger.c' || echo '$(srcdir)/'`vmxLogger.c - -libvmtools_la-guestSDKLog.lo: guestSDKLog.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-guestSDKLog.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-guestSDKLog.Tpo -c -o libvmtools_la-guestSDKLog.lo `test -f 'guestSDKLog.c' || echo '$(srcdir)/'`guestSDKLog.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-guestSDKLog.Tpo $(DEPDIR)/libvmtools_la-guestSDKLog.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='guestSDKLog.c' object='libvmtools_la-guestSDKLog.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-guestSDKLog.lo `test -f 'guestSDKLog.c' || echo '$(srcdir)/'`guestSDKLog.c - -libvmtools_la-stub-log.lo: $(top_srcdir)/lib/stubs/stub-log.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmtools_la-stub-log.lo -MD -MP -MF $(DEPDIR)/libvmtools_la-stub-log.Tpo -c -o libvmtools_la-stub-log.lo `test -f '$(top_srcdir)/lib/stubs/stub-log.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/stubs/stub-log.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmtools_la-stub-log.Tpo $(DEPDIR)/libvmtools_la-stub-log.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/stubs/stub-log.c' object='libvmtools_la-stub-log.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmtools_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmtools_la-stub-log.lo `test -f '$(top_srcdir)/lib/stubs/stub-log.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/stubs/stub-log.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/libvmtools/guestSDKLog.c b/open-vm-tools/libvmtools/guestSDKLog.c index 1c793b238..843047a7e 100644 --- a/open-vm-tools/libvmtools/guestSDKLog.c +++ b/open-vm-tools/libvmtools/guestSDKLog.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libvmtools/i18n.c b/open-vm-tools/libvmtools/i18n.c index 4c6485dfb..e4803ab6b 100644 --- a/open-vm-tools/libvmtools/i18n.c +++ b/open-vm-tools/libvmtools/i18n.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -105,6 +105,7 @@ MsgCatalogFree(MsgCatalog *catalog) ****************************************************************************** */ +#ifdef VMX86_DEBUG static INLINE gboolean MsgHasMsgID(const gchar *s) { @@ -112,7 +113,7 @@ MsgHasMsgID(const gchar *s) *(s += MSG_MAGIC_LEN) == '(' && strchr(s + 1, ')') != NULL; } - +#endif /* ****************************************************************************** diff --git a/open-vm-tools/libvmtools/monotonicTimer.c b/open-vm-tools/libvmtools/monotonicTimer.c index 9e270cade..4014b7b5e 100644 --- a/open-vm-tools/libvmtools/monotonicTimer.c +++ b/open-vm-tools/libvmtools/monotonicTimer.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libvmtools/signalSource.c b/open-vm-tools/libvmtools/signalSource.c index fa78ba195..b3be1f96b 100644 --- a/open-vm-tools/libvmtools/signalSource.c +++ b/open-vm-tools/libvmtools/signalSource.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -86,6 +86,7 @@ SignalSourceReadSigInfo(void) ASSERT(nbytes == sizeof info); } memcpy(&gHandler.currSignal, &info, sizeof info); + ASSERT(0 <= info.si_signo && info.si_signo < MAX_SIGNALS); gHandler.signals[info.si_signo] = SIG_SRC_SIGNALED; gHandler.wakeupFd.revents = 0; } @@ -110,7 +111,7 @@ SignalSourceSigHandler(int signum, { ssize_t bytes; siginfo_t dummy; - if (signum >= MAX_SIGNALS) { + if (signum >= MAX_SIGNALS || signum < 0) { return; } @@ -265,7 +266,7 @@ VMTools_NewSignalSource(int signum) }; SignalSource *ret; - ASSERT(signum < MAX_SIGNALS); + ASSERT(0 <= signum && signum < MAX_SIGNALS); ASSERT(signum != SIGKILL && signum != SIGSTOP); G_LOCK(gLock); diff --git a/open-vm-tools/libvmtools/vmtools.c b/open-vm-tools/libvmtools/vmtools.c index bc4e95cd0..2347bc0cc 100644 --- a/open-vm-tools/libvmtools/vmtools.c +++ b/open-vm-tools/libvmtools/vmtools.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libvmtools/vmtoolsConfig.c b/open-vm-tools/libvmtools/vmtoolsConfig.c index 6b1472f0c..36bcff7cc 100644 --- a/open-vm-tools/libvmtools/vmtoolsConfig.c +++ b/open-vm-tools/libvmtools/vmtoolsConfig.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -329,7 +329,12 @@ VMTools_LoadConfig(const gchar *path, gchar *backup = NULL; gchar *defaultPath = NULL; gchar *localPath = NULL; + /* GStatBuf was added in 2.26. */ +#if GLIB_CHECK_VERSION(2, 26, 0) + GStatBuf confStat; +#else struct stat confStat; +#endif GHashTable *old = NULL; GError *err = NULL; GKeyFile *cfg = NULL; @@ -527,3 +532,122 @@ VMTools_WriteConfig(const gchar *path, return ret; } + +/** + * Loads boolean value for a key from the specified config section. + * + * @param[in] config Config file to read the key from. + * @param[in] section Section to look for in the config file. + * @param[in] defValue Default value if the key is not found or error. + * + * @return value of the key if value was read successfully, else defValue. + */ + +gboolean +VMTools_ConfigGetBoolean(GKeyFile *config, + const gchar *section, + const gchar *key, + gboolean defValue) +{ + GError *err = NULL; + gboolean value; + + if (config == NULL || section == NULL || key == NULL) { + g_debug("%s: Returning default value for '[%s] %s'=%s.\n", + __FUNCTION__, section ? section : "(null)", + key ? key : "(null)", defValue ? "TRUE" : "FALSE"); + return defValue; + } + + value = g_key_file_get_boolean(config, section, key, &err); + if (err != NULL) { + if (err->code != G_KEY_FILE_ERROR_KEY_NOT_FOUND && + err->code != G_KEY_FILE_ERROR_GROUP_NOT_FOUND) { + g_warning("%s: Failed to get value for '[%s] %s': %s (err=%d).\n", + __FUNCTION__, section, key, err->message, err->code); + } + g_debug("%s: Returning default value for '[%s] %s'=%s.\n", + __FUNCTION__, section, key, defValue ? "TRUE" : "FALSE"); + value = defValue; + g_clear_error(&err); + } + return value; +} + + +/** + * Loads integer value for a key from the specified config section. + * + * @param[in] config Config file to read the key from. + * @param[in] section Section to look for in the config file. + * @param[in] defValue Default value if the key is not found or error. + * + * @return value of the key if value was read successfully, else defValue. + */ + +gint +VMTools_ConfigGetInteger(GKeyFile *config, + const gchar *section, + const gchar *key, + gint defValue) +{ + GError *err = NULL; + gint value; + + ASSERT(config); + ASSERT(key); + ASSERT(section); + + value = g_key_file_get_integer(config, section, key, &err); + if (err != NULL) { + if (err->code != G_KEY_FILE_ERROR_KEY_NOT_FOUND && + err->code != G_KEY_FILE_ERROR_GROUP_NOT_FOUND) { + g_warning("%s: Failed to get value for '[%s] %s': %s (err=%d).\n", + __FUNCTION__, section, key, err->message, err->code); + } + g_debug("%s: Returning default value for '[%s] %s'=%d.\n", + __FUNCTION__, section, key, defValue); + value = defValue; + g_clear_error(&err); + } + return value; +} + + +/** + * Loads string value for a key from the specified config section. + * + * @param[in] config Config file to read the key from. + * @param[in] section Section to look for in the config file. + * @param[in] defValue Default value if the key is not found or error. + * + * @return value of the key if value was read successfully, else defValue. + */ + +gchar * +VMTools_ConfigGetString(GKeyFile *config, + const gchar *section, + const gchar *key, + gchar *defValue) +{ + GError *err = NULL; + gchar *value; + + ASSERT(config); + ASSERT(key); + ASSERT(section); + + value = g_key_file_get_string(config, section, key, &err); + if (err != NULL) { + if (err->code != G_KEY_FILE_ERROR_KEY_NOT_FOUND && + err->code != G_KEY_FILE_ERROR_GROUP_NOT_FOUND) { + g_warning("%s: Failed to get value for '[%s] %s': %s (err=%d).\n", + __FUNCTION__, section, key, err->message, err->code); + } + g_debug("%s: Returning default value for '[%s] %s'=%s.\n", + __FUNCTION__, section, key, defValue ? defValue : "(null)"); + value = defValue; + g_clear_error(&err); + } + return value; +} diff --git a/open-vm-tools/libvmtools/vmtoolsInt.h b/open-vm-tools/libvmtools/vmtoolsInt.h index bb38070ed..daa09176c 100644 --- a/open-vm-tools/libvmtools/vmtoolsInt.h +++ b/open-vm-tools/libvmtools/vmtoolsInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libvmtools/vmtoolsLog.c b/open-vm-tools/libvmtools/vmtoolsLog.c index 381797ac4..7d55fa603 100644 --- a/open-vm-tools/libvmtools/vmtoolsLog.c +++ b/open-vm-tools/libvmtools/vmtoolsLog.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -86,6 +86,8 @@ # define SAFE_HANDLER "std" #endif +#define STD_HANDLER "std" + /** Tells whether the given log level is a fatal error. */ #define IS_FATAL(level) ((level) & G_LOG_FLAG_FATAL) @@ -412,7 +414,7 @@ VMToolsLogMsg(gpointer _data, gpointer userData) /* * Any fatal errors need to go to syslog no matter what. */ - if (!usedSyslog && IS_FATAL(entry->level)) { + if (!usedSyslog && IS_FATAL(entry->level) && gErrorSyslog) { gErrorSyslog->logger->logfn(entry->domain, entry->level, entry->msg, gErrorSyslog->logger); } @@ -875,6 +877,7 @@ VMToolsConfigLogDomain(const gchar *domain, exit: g_free(handler); g_free(level); + g_free(confData); } @@ -954,6 +957,46 @@ VMTools_AttachConsole(void) #endif +/** + * Configures the logging system to log to the STDIO. + * + * @param[in] defaultDomain Name of the default log domain. + */ + +void +VMTools_ConfigLogToStdio(const gchar *domain) +{ + static LogHandler *gStdLogHandler = NULL; + GKeyFile *cfg; + + g_return_if_fail(gStdLogHandler == NULL); /* Already called */ + + ASSERT(domain != NULL); + gLogDomain = g_strdup(domain); + cfg = g_key_file_new(); + gStdLogHandler = VMToolsGetLogHandler(STD_HANDLER, + gLogDomain, + ~0, + cfg); + if (!gStdLogHandler) { + fprintf(stderr, "Failed to create the STD log handler\n"); + goto exit; + } + + g_log_set_handler(gLogDomain, ~0, VMToolsLog, gStdLogHandler); + + if (!gLogInitialized) { + gLogInitialized = TRUE; + g_static_rec_mutex_init(&gLogStateMutex); + } + + gLogEnabled = TRUE; + +exit: + g_key_file_free(cfg); +} + + /** * Configures the logging system according to the configuration in the given * dictionary. diff --git a/open-vm-tools/libvmtools/vmtoolslib_version.h b/open-vm-tools/libvmtools/vmtoolslib_version.h index c6e095762..bdf18e61b 100644 --- a/open-vm-tools/libvmtools/vmtoolslib_version.h +++ b/open-vm-tools/libvmtools/vmtoolslib_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/libvmtools/vmxLogger.c b/open-vm-tools/libvmtools/vmxLogger.c index 2e5ddf834..113c55c1a 100644 --- a/open-vm-tools/libvmtools/vmxLogger.c +++ b/open-vm-tools/libvmtools/vmxLogger.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/m4/vmtools.m4 b/open-vm-tools/m4/vmtools.m4 index e4478ab68..1692e6ec2 100644 --- a/open-vm-tools/m4/vmtools.m4 +++ b/open-vm-tools/m4/vmtools.m4 @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### VMware-specific macros for use with autoconf. ### diff --git a/open-vm-tools/modules/Makefile.in b/open-vm-tools/modules/Makefile.in deleted file mode 100644 index 9c594ec28..000000000 --- a/open-vm-tools/modules/Makefile.in +++ /dev/null @@ -1,550 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = modules -DIST_COMMON = $(am__include_HEADERS_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__include_HEADERS_DIST = $(top_srcdir)/lib/include/vmci_sockets.h -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -modulesrc = $(abs_top_srcdir)/modules -@FREEBSD_CUSTOM_SYSDIR_TRUE@EXTRA_ARGS = "SYSDIR=@SYSDIR@" -# Solaris does not have Kbuild-like system so we need to supply -# compiler and linker and other items discovered by configure -# script. -@SOLARIS_TRUE@EXTRA_ARGS = "CC=$(CC)" "CC_WARNINGS=$(CC_WARNINGS)" \ -@SOLARIS_TRUE@ "GLOBAL_DEFS=$(GLOBAL_DEFS)" "LD=$(LD)" \ -@SOLARIS_TRUE@ "HAVE_GNU_LD=$(HAVE_GNU_LD)" -@LINUX_TRUE@include_HEADERS = $(top_srcdir)/lib/include/vmci_sockets.h -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu modules/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu modules/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-dvi: install-dvi-am - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - -.MAKE: install-am install-exec-am install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-local ctags distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-includeHEADERS install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags uninstall uninstall-am uninstall-hook \ - uninstall-includeHEADERS - -all: modules - -.PHONY: modules $(MODULES) -modules: $(MODULES) - -$(MODULES): - $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm \ - OVT_SOURCE_DIR=$(abs_top_srcdir) \ - MODULEBUILDDIR=$(modulesrc)/$(MODULES_OS) \ - $(EXTRA_ARGS) -C "$(modulesrc)/$(MODULES_OS)/$@" - -@LINUX_TRUE@export LINUXINCLUDE := @LINUXINCLUDE@ -@LINUX_TRUE@export vmblockdir := $(MODULES_DIR)/fs/vmblock -@LINUX_TRUE@export vmcidir := $(MODULES_DIR)/drivers/misc -@LINUX_TRUE@export vmhgfsdir := $(MODULES_DIR)/fs/vmhgfs -@LINUX_TRUE@export vmsyncdir := $(MODULES_DIR)/drivers/misc -@LINUX_TRUE@export vmxnetdir := $(MODULES_DIR)/drivers/net -@LINUX_TRUE@export vsockdir := $(MODULES_DIR)/net/vsock -@LINUX_TRUE@@WITH_ROOT_PRIVILEGES_TRUE@export DEPMOD := depmod -a $(KERNEL_RELEASE) - -@SOLARIS_TRUE@export vmhgfsdir := $(MODULES_DIR) - -clean-local: - for MOD in $(MODULES); do \ - if [ -d "$(modulesrc)/$(MODULES_OS)/$$MOD" ]; then \ - $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm \ - -C "$(modulesrc)/$(MODULES_OS)/$$MOD" clean || exit 1; \ - fi \ - done - rm -f $(modulesrc)/$(MODULES_OS)/*.o $(modulesrc)/$(MODULES_OS)/*.ko - rm -f $(modulesrc)/$(MODULES_OS)/VMwareVMCIModule.symvers - -install-exec-hook: -@SOLARIS_TRUE@ for MOD in $(MODULES); do \ -@SOLARIS_TRUE@ $(MAKE) VM_UNAME=$(KERNEL_RELEASE) MV=mv RM=rm \ -@SOLARIS_TRUE@ -C "$(modulesrc)/$(MODULES_OS)/$$MOD" install || exit 1; \ -@SOLARIS_TRUE@ done -@FREEBSD_TRUE@ for MOD in $(MODULES); do \ -@FREEBSD_TRUE@ $(INSTALL) -d $(DESTDIR)$(MODULES_DIR); \ -@FREEBSD_TRUE@ $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko \ -@FREEBSD_TRUE@ $(DESTDIR)$(MODULES_DIR); \ -@FREEBSD_TRUE@ done -@LINUX_TRUE@ for MOD in $(MODULES); do \ -@LINUX_TRUE@ $(INSTALL) -d $(DESTDIR)`eval echo '$$'$${MOD}dir`; \ -@LINUX_TRUE@ $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD/$$MOD.ko \ -@LINUX_TRUE@ $(DESTDIR)`eval echo '$$'$${MOD}dir`; \ -@LINUX_TRUE@ done -@LINUX_TRUE@ eval "$$DEPMOD" - -uninstall-hook: - for MOD in $(MODULES); do \ - rm -f $(DESTDIR)`eval echo '$$'$${MOD}dir`/$$MOD.ko &> /dev/null;\ - done - eval "$$DEPMOD" -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/modules/linux/dkms.conf b/open-vm-tools/modules/linux/dkms.conf index b7144fb84..43c6c8a29 100644 --- a/open-vm-tools/modules/linux/dkms.conf +++ b/open-vm-tools/modules/linux/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME=open-vm-tools -PACKAGE_VERSION=10.0.5 +PACKAGE_VERSION=10.1.0 MAKE_CMD_TMPL="make VM_UNAME=\$kernelver \ MODULEBUILDDIR=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build" diff --git a/open-vm-tools/modules/linux/dkms.sh b/open-vm-tools/modules/linux/dkms.sh index 7696edb2a..e4733ec49 100644 --- a/open-vm-tools/modules/linux/dkms.sh +++ b/open-vm-tools/modules/linux/dkms.sh @@ -1,6 +1,6 @@ #!/bin/sh ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### Script for creating a dmks-compliant source tree from an open-vm-tools ### distribution. @@ -28,12 +28,12 @@ then echo " src: root of unpacked open-vm-tools package" echo " dst: where to create the dkms tree" echo - echo "The script will create an 'open-vm-tools' module with version 10.0.5." + echo "The script will create an 'open-vm-tools' module with version 10.1.0." exit 1 fi src=$1 -dst=$2/open-vm-tools-10.0.5 +dst=$2/open-vm-tools-10.1.0 SHARED_HEADERS="backdoor_def.h" SHARED_HEADERS="$SHARED_HEADERS backdoor_types.h" diff --git a/open-vm-tools/modules/linux/shared/autoconf/dalias.c b/open-vm-tools/modules/linux/shared/autoconf/dalias.c index 2b8dc44c0..5c0deb601 100644 --- a/open-vm-tools/modules/linux/shared/autoconf/dalias.c +++ b/open-vm-tools/modules/linux/shared/autoconf/dalias.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2015 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/shared/autoconf/dalias1.c b/open-vm-tools/modules/linux/shared/autoconf/dalias1.c index 457c20a24..0b785fdc4 100644 --- a/open-vm-tools/modules/linux/shared/autoconf/dalias1.c +++ b/open-vm-tools/modules/linux/shared/autoconf/dalias1.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2015 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/shared/autoconf/truncate_pagecache.c b/open-vm-tools/modules/linux/shared/autoconf/truncate_pagecache.c index 2ced8e0eb..31c933117 100644 --- a/open-vm-tools/modules/linux/shared/autoconf/truncate_pagecache.c +++ b/open-vm-tools/modules/linux/shared/autoconf/truncate_pagecache.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2015 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/shared/autoconf/wait_on_bit.c b/open-vm-tools/modules/linux/shared/autoconf/wait_on_bit.c new file mode 100644 index 000000000..a543cc13e --- /dev/null +++ b/open-vm-tools/modules/linux/shared/autoconf/wait_on_bit.c @@ -0,0 +1,53 @@ +/********************************************************* + * Copyright (C) 2016 VMware, Inc. All rights reserved. + * + * 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 version 2 and no 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, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *********************************************************/ + +#include "compat_version.h" +#include "compat_autoconf.h" + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && \ + LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) + +#include +#include +#include + +unsigned long test_bits; + +/* + * After 3.17.0, wait_on_bit changed its interface to remove the action + * callback argument and this was backported to some Linux kernel versions + * such as 3.10 for the RHEL 7.3 version. + * + * This test will fail on a kernel with such a patch. + */ + +int test(void) +{ + + return wait_on_bit(&test_bits, + 0, + NULL, + TASK_UNINTERRUPTIBLE); +} +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) +#error "This test intentionally fails on 3.17.0 and newer kernels." +#else +/* + * It must be older than 2.6.13 in which case we don't use the function. + */ +#endif diff --git a/open-vm-tools/modules/linux/shared/kernelStubs.h b/open-vm-tools/modules/linux/shared/kernelStubs.h index c242fccde..772127a80 100644 --- a/open-vm-tools/modules/linux/shared/kernelStubs.h +++ b/open-vm-tools/modules/linux/shared/kernelStubs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 @@ -61,6 +61,8 @@ # include "vm_assert.h" # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_NDIS # include "vm_basic_types.h" +# include +# include "kernelStubsFloorFixes.h" # include # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_WDM # include "vm_basic_types.h" @@ -74,6 +76,7 @@ # include /* for min macro. */ # include "vm_basic_defs.h" # include "vm_assert.h" /* Our assert macros */ +# include "kernelStubsFloorFixes.h" # else # error Type KRNL_STUBS_DRIVER_TYPE must be defined. # endif diff --git a/open-vm-tools/modules/linux/shared/kernelStubsSal.h b/open-vm-tools/modules/linux/shared/kernelStubsSal.h index 36c9d0deb..7d2720950 100644 --- a/open-vm-tools/modules/linux/shared/kernelStubsSal.h +++ b/open-vm-tools/modules/linux/shared/kernelStubsSal.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * 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 @@ -23,8 +23,7 @@ * This solves two issues: * 1. Microsoft changed their annotation language from SAL 1.0 (original one * widely distributed by the Windows team) to their more final SAL 2.0 - * langauge (championed by the VS team). We target multiple versions of - * Driver Kits, so we have to map 2.0 to 1.0. + * langauge (championed by the VS team). * 2. We want these annotations to do nothing during non-Win32 compiles. * * A longer term goal is to rationalize this into Bora. @@ -39,68 +38,66 @@ # endif #endif -#if !defined(_SAL_VERSION) +#if !defined(_SAL_VERSION) || (defined(_SAL_VERSION) && _SAL_VERSION == 10) #define _In_ -#define _In_z_ #define _In_opt_ +#define _In_reads_bytes_(count) +#define _In_reads_bytes_opt_(count) +#define _In_z_ #define _In_opt_z_ #define _Out_ #define _Out_opt_ +#define _Out_writes_bytes_(capcount) +#define _Out_writes_bytes_opt_(capcount) +#define _Out_writes_bytes_to_(cap, count) +#define _Out_writes_bytes_to_opt_(cap, count) +#define _Out_bytecap_post_bytecount_(cap, count) +#define _Out_writes_z_(cap) +#define _Out_writes_opt_z_(cap) #define _Out_z_cap_(e) +#define _Outptr_result_buffer_(count) +#define _Outptr_result_bytebuffer_(count) +#define _Outptr_result_bytebuffer_maybenull_(count) +#define _Outptr_opt_result_buffer_(count) +#define _Outptr_opt_result_bytebuffer_(count) +#define _Outptr_opt_result_bytebuffer_maybenull_(count) +#define _COM_Outptr_ #define _Inout_ +#define _Inout_updates_bytes_(e) #define _Inout_z_cap_(e) #define _Post_z_count_(e) #define _Ret_writes_z_(e) #define _Ret_writes_maybenull_z_(e) +#define _Ret_maybenull_ #define _Ret_maybenull_z_ +#define _Ret_range_(l,h) #define _Success_(expr) #define _Check_return_ #define _Must_inspect_result_ #define _Group_(annos) #define _When_(expr, annos) +#define _Always_(annos) #define _Printf_format_string_ #define _Use_decl_annotations_ -#elif defined(_SAL_VERSION) && _SAL_VERSION == 10 -// Microsoft didn't create a header mapping SAL 2.0 to 1.0. We do that here. -#define _In_ __in -#define _In_z_ __in_z -#define _In_opt_ __in_opt -#define _In_opt_z_ __in_z_opt -#define _Out_ __out -#define _Out_opt_ __out_opt -#define _Out_z_cap_(expr) __out_ecount_z(expr) -#define _Inout_ __inout -#define _Inout_z_cap_(expr) __inout_ecount_z(expr) -#define _Post_z_count_(expr) -#define _Ret_writes_z_(expr) __out_ecount_z(expr) -#define _Ret_writes_maybenull_z_(expr) __out_ecount_z_opt(expr) -#define _Ret_maybenull_z_ __out_z -#define _Check_return_ __checkReturn -#define _Must_inspect_result_ __checkReturn -#define _Success_(annos) __success(annos) -#define _Printf_format_string_ __format_string -#define _Use_decl_annotations_ - -// DriverSpecs.h was pretty much empty until the DDK that defined -// NTDDK_WIN6SP1 appeared. -#if defined(NTDDI_WIN6SP1) -#define _Group_(annos) __$drv_group(annos) -#define _When_(expr, annos) __drv_when(expr, annos) -#define _IRQL_requires_max_(irql) __drv_maxIRQL(irql) -#else -#define _Group_(annos) -#define _When_(expr, annos) -#define _IRQL_requires_max_(irql) -#define __drv_allocatesMem(kind) -#define __drv_freesMem(kind) -#endif +#define _Dispatch_type_(mj) +#define _Function_class_(c) +#define _Requires_lock_held_(cs) +#define _Requires_lock_not_held_(cs) +#define _Acquires_lock_(l) +#define _Releases_lock_(l) +#define _IRQL_requires_max_(i) +#define _IRQL_requires_(i) +#define _IRQL_requires_same_ +#define _Analysis_assume_(e) +#define _Pre_notnull_ +#define _At_(expr,annos) #else // Sal 2.0 path - everything is already defined. #endif // _SAL_VERSION // Now define our own annotations -#if !defined(_SAL_VERSION) +#if !defined(_SAL_VERSION) || (defined(_SAL_VERSION) && _SAL_VERSION == 10) #define _When_windrv_(annos) #define _Ret_allocates_malloc_mem_opt_bytecap_(_Size) #define _Ret_allocates_malloc_mem_opt_bytecount_(_Size) @@ -108,14 +105,6 @@ #define _Ret_allocates_malloc_mem_opt_z_bytecount_(_Size) #define _Ret_allocates_malloc_mem_opt_z_ #define _In_frees_malloc_mem_opt_ -#elif defined(_SAL_VERSION) && _SAL_VERSION == 10 -#define _When_windrv_(annos) annos -#define _Ret_allocates_malloc_mem_opt_bytecap_(_Cap) __drv_allocatesMem("Memory") __checkReturn __post __byte_writableTo(_Cap) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_bytecount_(_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_readableTo(_Count) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_bytecap_post_bytecount_(_Cap,_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_writableTo(_Cap) __byte_readableTo(_Count) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_z_bytecount_(_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_readableTo(_Count) __valid __nullterminated __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_z_ __drv_allocatesMem("Memory") __checkReturn __post __valid __nullterminated __exceptthat __maybenull -#define _In_frees_malloc_mem_opt_ __drv_freesMem("Memory") __in_opt __post __notvalid #else #define _When_windrv_(annos) annos #define _Ret_allocates_malloc_mem_opt_bytecap_(_Cap) __drv_allocatesMem("Memory") _Must_inspect_result_ _Ret_opt_bytecap_(_Cap) diff --git a/open-vm-tools/modules/linux/shared/vmci_call_defs.h b/open-vm-tools/modules/linux/shared/vmci_call_defs.h index ecfcbde78..77be59f49 100644 --- a/open-vm-tools/modules/linux/shared/vmci_call_defs.h +++ b/open-vm-tools/modules/linux/shared/vmci_call_defs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2014 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 @@ -75,7 +75,7 @@ typedef struct VMCIDatagram { #define VMCI_DG_PAYLOAD(_dg) (void *)((char *)(_dg) + sizeof(VMCIDatagram)) #define VMCI_DG_HEADERSIZE sizeof(VMCIDatagram) #define VMCI_DG_SIZE(_dg) (VMCI_DG_HEADERSIZE + (size_t)(_dg)->payloadSize) -#define VMCI_DG_SIZE_ALIGNED(_dg) ((VMCI_DG_SIZE(_dg) + 7) & (size_t)CONST64U(0xfffffffffffffff8)) +#define VMCI_DG_SIZE_ALIGNED(_dg) ((VMCI_DG_SIZE(_dg) + 7) & (size_t)~7) #define VMCI_MAX_DATAGRAM_QUEUE_SIZE (VMCI_MAX_DG_SIZE * 2) /* @@ -281,14 +281,12 @@ VMCIEventMsgPayload(VMCIEventMsg *eMsg) // IN: #define VMCI_QPFLAG_ATTACH_ONLY 0x1 /* Fail alloc if QP not created by peer. */ #define VMCI_QPFLAG_LOCAL 0x2 /* Only allow attaches from local context. */ #define VMCI_QPFLAG_NONBLOCK 0x4 /* Host won't block when guest is quiesced. */ -#define VMCI_QPFLAG_PINNED 0x8 /* Keep all data pages pinned. This flag */ - /* must be combined with NONBLOCK. */ /* For asymmetric queuepairs, update as new flags are added. */ -#define VMCI_QP_ASYMM (VMCI_QPFLAG_NONBLOCK | VMCI_QPFLAG_PINNED) +#define VMCI_QP_ASYMM VMCI_QPFLAG_NONBLOCK #define VMCI_QP_ASYMM_PEER (VMCI_QPFLAG_ATTACH_ONLY | VMCI_QP_ASYMM) /* Update the following (bitwise OR flags) while adding new flags. */ #define VMCI_QP_ALL_FLAGS (VMCI_QPFLAG_ATTACH_ONLY | VMCI_QPFLAG_LOCAL | \ - VMCI_QPFLAG_NONBLOCK | VMCI_QPFLAG_PINNED) + VMCI_QPFLAG_NONBLOCK) /* * Structs used for QueuePair alloc and detach messages. We align fields of diff --git a/open-vm-tools/modules/linux/shared/vmci_defs.h b/open-vm-tools/modules/linux/shared/vmci_defs.h index da28b7f84..fe8dc4f7f 100644 --- a/open-vm-tools/modules/linux/shared/vmci_defs.h +++ b/open-vm-tools/modules/linux/shared/vmci_defs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * 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 @@ -96,17 +96,6 @@ typedef enum VMCIIntrType { */ #define VMCI_MAX_GUEST_QP_MEMORY (128 * 1024 * 1024) -/* - * Queues with pre-mapped data pages must be small, so that we don't pin - * too much kernel memory (especially on vmkernel). We limit a queuepair to - * 32 KB, or 16 KB per queue for symmetrical pairs. - * - * XXX, we are raising this limit to 4MB to support high-throughput workloads - * with vioi-filter. Once we switch to rings instead of queuepairs for the - * page channel, we will drop this limit again. See PR 852983. - */ -#define VMCI_MAX_PINNED_QP_MEMORY (4 * 1024 * 1024) - /* * We have a fixed set of resource IDs available in the VMX. * This allows us to have a very simple implementation since we statically @@ -275,6 +264,7 @@ static const VMCIHandle VMCI_INVALID_HANDLE = {VMCI_INVALID_ID, * Context ID used by host endpoints. */ #define VMCI_HOST_CONTEXT_ID 2 +#define VMCI_HOST_CONTEXT_INVALID_EVENT ((uintptr_t)~0) #define VMCI_CONTEXT_IS_VM(_cid) (VMCI_INVALID_ID != _cid && \ _cid > VMCI_HOST_CONTEXT_ID) diff --git a/open-vm-tools/modules/linux/shared/vmci_kernel_if.h b/open-vm-tools/modules/linux/shared/vmci_kernel_if.h index 9def671a4..964cbd57f 100644 --- a/open-vm-tools/modules/linux/shared/vmci_kernel_if.h +++ b/open-vm-tools/modules/linux/shared/vmci_kernel_if.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2014 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 @@ -34,6 +34,8 @@ #if defined(_WIN32) # include +#else +#define UNREFERENCED_PARAMETER(P) #endif #if defined(linux) && !defined(VMKERNEL) @@ -375,6 +377,8 @@ typedef uint32 VMCIGuestMemID; struct VMCIQueue *consumeQ); void VMCIHost_MarkQueuesUnavailable(struct VMCIQueue *produceQ, struct VMCIQueue *consumeQ); + int VMCIHost_RevalidateQueues(struct VMCIQueue *produceQ, + struct VMCIQueue *consumeQ); #else # define VMCIHost_MarkQueuesAvailable(_q, _p) do { } while (0) # define VMCIHost_MarkQueuesUnavailable(_q, _p) do { } while(0) @@ -388,6 +392,12 @@ typedef uint32 VMCIGuestMemID; # define VMCI_UnlockQueueHeader(_q) NOT_IMPLEMENTED() #endif +#if defined(VMKERNEL) + void VMCI_QueueHeaderUpdated(struct VMCIQueue *produceQ); +#else +# define VMCI_QueueHeaderUpdated(_q) do { } while (0) +#endif + #if (!defined(VMKERNEL) && defined(__linux__)) || defined(_WIN32) || \ defined(__APPLE__) int VMCIHost_GetUserMemory(VA64 produceUVA, VA64 consumeUVA, diff --git a/open-vm-tools/modules/linux/vmblock/Makefile b/open-vm-tools/modules/linux/vmblock/Makefile index 21e5dc169..0a7cae6d8 100644 --- a/open-vm-tools/modules/linux/vmblock/Makefile +++ b/open-vm-tools/modules/linux/vmblock/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/make -f ########################################################## -# Copyright (C) 1998-2015 VMware, Inc. All rights reserved. +# Copyright (C) 1998-2016 VMware, Inc. All rights reserved. # # 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 diff --git a/open-vm-tools/modules/linux/vmci/Makefile b/open-vm-tools/modules/linux/vmci/Makefile index 05aa915ca..3bbbaefe9 100644 --- a/open-vm-tools/modules/linux/vmci/Makefile +++ b/open-vm-tools/modules/linux/vmci/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/make -f ########################################################## -# Copyright (C) 1998-2015 VMware, Inc. All rights reserved. +# Copyright (C) 1998-2016 VMware, Inc. All rights reserved. # # 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 diff --git a/open-vm-tools/modules/linux/vmci/common/vmciContext.c b/open-vm-tools/modules/linux/vmci/common/vmciContext.c index d2d03622c..5e452f6a3 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciContext.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciContext.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2012,2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2012,2014-2016 VMware, Inc. All rights reserved. * * 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 @@ -34,7 +34,9 @@ #include "vmciEvent.h" #include "vmciKernelAPI.h" #include "vmciQueuePair.h" -#if defined(VMKERNEL) +#if defined(_WIN32) +# include "kernelStubsSal.h" +#elif defined(VMKERNEL) # include "vmciVmkInt.h" # include "vm_libc.h" # include "helper_ext.h" @@ -870,6 +872,9 @@ VMCIContext_DequeueDatagram(VMCIContext *context, // IN ASSERT (listItem != NULL); dqEntry = VMCIList_Entry(listItem, DatagramQueueEntry, listItem); +#if defined(_WIN32) + _Analysis_assume_(dqEntry != NULL); +#endif ASSERT(dqEntry->dg); /* Check size of caller's buffer. */ @@ -896,6 +901,9 @@ VMCIContext_DequeueDatagram(VMCIContext *context, // IN listItem = VMCIList_First(&context->datagramQueue); ASSERT(listItem); nextEntry = VMCIList_Entry(listItem, DatagramQueueEntry, listItem); +#if defined(_WIN32) + _Analysis_assume_(nextEntry != NULL); +#endif ASSERT(nextEntry && nextEntry->dg); /* * The following size_t -> int truncation is fine as the maximum size of @@ -1621,6 +1629,8 @@ VMCIContextDgHypervisorSaveStateSize(VMCIContext *context, // IN uint32 total; VMCIListItem *iter; + UNREFERENCED_PARAMETER(cptBufPtr); + *bufSize = total = 0; VMCIList_Scan(iter, &context->datagramQueue) { @@ -1673,12 +1683,12 @@ VMCIContextDgHypervisorSaveState(VMCIContext *context, // IN return VMCI_ERROR_INVALID_ARGS; } - p = VMCI_AllocKernelMem(*bufSize, VMCI_MEMORY_NORMAL); + p = VMCI_AllocKernelMem(*bufSize, VMCI_MEMORY_NONPAGED); if (p == NULL) { return VMCI_ERROR_NO_MEM; } - *cptBufPtr = p; + *cptBufPtr = (char *)p; /* Leave space for the datagram count at the start. */ total = sizeof(uint32); @@ -1816,6 +1826,15 @@ VMCIContext_GetCheckpointState(VMCIId contextID, // IN: for (i = 0; i < arraySize; i++) { VMCIHandle tmpHandle = VMCIHandleArray_GetEntry(array, i); if (cptType == VMCI_DOORBELL_CPT_STATE) { +/* + * PreFAST thinks this might overflow on arraySize>=2. However, we've + * looked *very* carefully at this, tested PreFAST's assumptions, and + * concluded PreFAST is getting confused about the relationships between + * cptDataSize, arraySize, and i. + */ +#if defined(_WIN32) +#pragma warning(suppress: 6386) +#endif ((VMCIDoorbellCptState *)cptBuf)[i].handle = tmpHandle; } else { ((VMCIId *)cptBuf)[i] = @@ -2420,6 +2439,9 @@ vmci_cid_2_host_vm_id(VMCIId contextID, // IN return result; #else // !defined(VMKERNEL) + UNREFERENCED_PARAMETER(contextID); + UNREFERENCED_PARAMETER(hostVmID); + UNREFERENCED_PARAMETER(hostVmIDLen); return VMCI_ERROR_UNAVAILABLE; #endif } @@ -2723,6 +2745,9 @@ VMCIContext_RegisterGuestMem(VMCIContext *context, // IN: Context structure out: VMCIMutex_Release(&context->guestMemMutex); +#else + UNREFERENCED_PARAMETER(context); + UNREFERENCED_PARAMETER(gid); #endif } @@ -2824,10 +2849,65 @@ VMCIContext_ReleaseGuestMem(VMCIContext *context, // IN: Context structure } VMCIMutex_Release(&context->guestMemMutex); +#else + UNREFERENCED_PARAMETER(context); + UNREFERENCED_PARAMETER(gid); + UNREFERENCED_PARAMETER(powerOff); #endif } #if defined(VMKERNEL) +/* + *---------------------------------------------------------------------- + * + * VMCIContext_RevalidateMappings -- + * + * Updates the mappings for all QPs. Should only be called with the VMCI + * device lock held. + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Bool +VMCIContext_RevalidateMappings(VMCIContext *context) // IN: Context structure +{ + uint32 numQueuePairs; + uint32 cur; + + numQueuePairs = VMCIHandleArray_GetSize(context->queuePairArray); + for (cur = 0; cur < numQueuePairs; cur++) { + VMCIHandle handle; + + handle = VMCIHandleArray_GetEntry(context->queuePairArray, cur); + if (!VMCI_HANDLE_EQUAL(handle, VMCI_INVALID_HANDLE)) { + int res = VMCIQPBroker_Revalidate(handle, context); + + if (res < VMCI_SUCCESS) { + VMCI_WARNING(("Failed to revalidate guest mappings for queue " + " pair (handle=0x%x:0x%x, res=%d).\n", + handle.context, handle.resource, res)); + /* + * I have not seen these errors but I do not think they should be + * considered fatal. + */ + if (res != VMCI_ERROR_NOT_FOUND && + res != VMCI_ERROR_QUEUEPAIR_NOTATTACHED) { + return FALSE; + } + } + } + } + + return TRUE; +} + + /* *---------------------------------------------------------------------- * diff --git a/open-vm-tools/modules/linux/vmci/common/vmciContext.h b/open-vm-tools/modules/linux/vmci/common/vmciContext.h index 6ec9c30ef..2149193bc 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciContext.h +++ b/open-vm-tools/modules/linux/vmci/common/vmciContext.h @@ -67,6 +67,7 @@ void VMCIContext_ClearDatagrams(VMCIContext *context); void VMCIContext_SetId(VMCIContext *context, VMCIId cid); void VMCIContext_NotifyGuestPaused(VMCIId cid, Bool paused); void VMCIContext_NotifyMemoryAccess(VMCIId cid, Bool on); +Bool VMCIContext_RevalidateMappings(VMCIContext *context); #endif Bool VMCIContext_SupportsHostQP(VMCIContext *context); void VMCIContext_ReleaseContext(VMCIContext *context); diff --git a/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c b/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c index 5a3fbfd5e..ed1c74fb2 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciDoorbell.c @@ -782,6 +782,8 @@ VMCIDoorbellNotifyAsGuest(VMCIHandle handle, // IN #else // VMKERNEL VMCIDoorbellNotifyMsg notifyMsg; + UNREFERENCED_PARAMETER(privFlags); + ASSERT(VMCI_GuestPersonalityActive()); notifyMsg.hdr.dst = VMCI_MAKE_HANDLE(VMCI_HYPERVISOR_CONTEXT_ID, @@ -898,6 +900,8 @@ VMCIDoorbellHostContextNotify(VMCIId srcCID, // IN VMCIResource *resource; int result; + UNREFERENCED_PARAMETER(srcCID); + ASSERT(VMCI_HostPersonalityActive()); if (VMCI_HANDLE_INVALID(handle)) { diff --git a/open-vm-tools/modules/linux/vmci/common/vmciDriver.c b/open-vm-tools/modules/linux/vmci/common/vmciDriver.c index 4a3795857..5de7e83f5 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciDriver.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciDriver.c @@ -78,7 +78,8 @@ VMCI_HostInit(void) */ result = VMCIContext_InitContext(VMCI_HOST_CONTEXT_ID, VMCI_DEFAULT_PROC_PRIVILEGE_FLAGS, - -1, VMCI_VERSION, NULL, &hostContext); + VMCI_HOST_CONTEXT_INVALID_EVENT, + VMCI_VERSION, NULL, &hostContext); if (result < VMCI_SUCCESS) { VMCI_WARNING((LGPFX"Failed to initialize VMCIContext (result=%d).\n", result)); @@ -215,6 +216,8 @@ VMCIUtilCidUpdate(VMCIId subID, // IN: { VMCIEventPayload_Context *evPayload = VMCIEventDataPayload(eventData); + UNREFERENCED_PARAMETER(clientData); + if (subID != ctxUpdateSubID) { VMCI_DEBUG_LOG(4, (LGPFX"Invalid subscriber (ID=0x%x).\n", subID)); return; @@ -421,7 +424,7 @@ VMCI_ReadDatagramsFromPort(VMCIIoHandle ioHandle, // IN remainingBytes = currentDgInBufferSize; while (dg->dst.resource != VMCI_INVALID_ID || remainingBytes > PAGE_SIZE) { - unsigned dgInSize; + size_t dgInSize; /* * When the input buffer spans multiple pages, a datagram can @@ -493,7 +496,7 @@ VMCI_ReadDatagramsFromPort(VMCIIoHandle ioHandle, // IN * Datagram doesn't fit in datagram buffer of maximal size. We drop it. */ - VMCI_DEBUG_LOG(4, (LGPFX"Failed to receive datagram (size=%u bytes).\n", + VMCI_DEBUG_LOG(4, (LGPFX"Failed to receive datagram (size=%"FMTSZ"u bytes).\n", dgInSize)); bytesToSkip = dgInSize - remainingBytes; diff --git a/open-vm-tools/modules/linux/vmci/common/vmciEvent.c b/open-vm-tools/modules/linux/vmci/common/vmciEvent.c index ee781d0fb..7c3a145aa 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciEvent.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciEvent.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * 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 @@ -27,6 +27,9 @@ #include "vmci_infrastructure.h" #include "vmciEvent.h" #include "vmciKernelAPI.h" +#if defined(_WIN32) +# include "kernelStubsSal.h" +#endif #if defined(VMKERNEL) # include "vmciVmkInt.h" # include "vm_libc.h" @@ -400,6 +403,9 @@ VMCIEventDeliver(VMCIEventMsg *eventMsg) // IN VMCISubscription *cur = VMCIList_Entry(iter, VMCISubscription, subscriberListItem); ASSERT(cur && cur->event == eventMsg->eventData.event); +#if defined(_WIN32) + _Analysis_assume_(cur != NULL); +#endif if (cur->runDelayed) { VMCIDelayedEventInfo *eventInfo; @@ -455,6 +461,13 @@ VMCIEventDeliver(VMCIEventMsg *eventMsg) // IN VMCI_EventData *ed; VMCIListItem *iter2; +/* + * The below ScanSafe macro makes the analyzer think iter might be NULL and + * then dereferenced. + */ +#if defined(_WIN32) +#pragma warning(suppress: 28182) +#endif VMCIList_ScanSafe(iter, iter2, &noDelayList) { VMCIEventRef *eventRef = VMCIList_Entry(iter, VMCIEventRef, listItem); diff --git a/open-vm-tools/modules/linux/vmci/common/vmciQPair.c b/open-vm-tools/modules/linux/vmci/common/vmciQPair.c index 7a0212788..246e59732 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciQPair.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciQPair.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2012 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. * * 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 @@ -122,10 +122,6 @@ static INLINE int VMCIQPairLock(const VMCIQPair *qpair) // IN { #if !defined VMX86_VMX - if (qpair->flags & VMCI_QPFLAG_PINNED) { - VMCI_LockQueueHeader(qpair->produceQ); - return VMCI_SUCCESS; - } return VMCI_AcquireQueueMutex(qpair->produceQ, !(qpair->flags & VMCI_QPFLAG_NONBLOCK)); #else @@ -154,11 +150,7 @@ static INLINE void VMCIQPairUnlock(const VMCIQPair *qpair) // IN { #if !defined VMX86_VMX - if (qpair->flags & VMCI_QPFLAG_PINNED) { - VMCI_UnlockQueueHeader(qpair->produceQ); - } else { - VMCI_ReleaseQueueMutex(qpair->produceQ); - } + VMCI_ReleaseQueueMutex(qpair->produceQ); #endif } @@ -225,6 +217,58 @@ VMCIQPairUnlockHeader(const VMCIQPair *qpair) // IN } +/* + *----------------------------------------------------------------------------- + * + * VMCIQueueAddProducerTail() -- + * + * Helper routine to increment the Producer Tail. + * + * Results: + * None. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +VMCIQueueAddProducerTail(VMCIQueue *queue, // IN/OUT + size_t add, // IN + uint64 queueSize) // IN +{ + VMCIQueueHeader_AddProducerTail(queue->qHeader, add, queueSize); + VMCI_QueueHeaderUpdated(queue); +} + + +/* + *----------------------------------------------------------------------------- + * + * VMCIQueueAddConsumerHead() -- + * + * Helper routine to increment the Consumer Head. + * + * Results: + * None. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static INLINE void +VMCIQueueAddConsumerHead(VMCIQueue *queue, // IN/OUT + size_t add, // IN + uint64 queueSize) // IN +{ + VMCIQueueHeader_AddConsumerHead(queue->qHeader, add, queueSize); + VMCI_QueueHeaderUpdated(queue); +} + + /* *----------------------------------------------------------------------------- * @@ -477,29 +521,10 @@ vmci_qpair_alloc(VMCIQPair **qpair, // OUT } } - if ((flags & (VMCI_QPFLAG_NONBLOCK | VMCI_QPFLAG_PINNED)) && !vmkernel) { + if (flags & VMCI_QPFLAG_NONBLOCK && !vmkernel) { return VMCI_ERROR_INVALID_ARGS; } - if (flags & VMCI_QPFLAG_PINNED) { - /* - * Pinned pages implies non-blocking mode. Technically it doesn't - * have to, but there doesn't seem much point in pinning the pages if you - * can block since the queues will be small, so there's no performance - * gain to be had. - */ - - if (!(flags & VMCI_QPFLAG_NONBLOCK)) { - return VMCI_ERROR_INVALID_ARGS; - } - - /* Limit the amount of memory that can be pinned. */ - - if (produceQSize + consumeQSize > VMCI_MAX_PINNED_QP_MEMORY) { - return VMCI_ERROR_NO_RESOURCES; - } - } - myQPair = VMCI_AllocKernelMem(sizeof *myQPair, VMCI_MEMORY_NONPAGED); if (!myQPair) { return VMCI_ERROR_NO_MEM; @@ -511,7 +536,8 @@ vmci_qpair_alloc(VMCIQPair **qpair, // OUT myQPair->flags = flags; myQPair->privFlags = privFlags; - wakeupCB = clientData = NULL; + clientData = NULL; + wakeupCB = NULL; if (VMCI_ROUTE_AS_HOST == route) { myQPair->guestEndpoint = FALSE; if (!(flags & VMCI_QPFLAG_LOCAL)) { @@ -971,7 +997,7 @@ EnqueueLocked(VMCIQueue *produceQ, // IN return result; } - VMCIQueueHeader_AddProducerTail(produceQ->qHeader, written, produceQSize); + VMCIQueueAddProducerTail(produceQ, written, produceQSize); return written; } @@ -1053,9 +1079,7 @@ DequeueLocked(VMCIQueue *produceQ, // IN } if (updateConsumer) { - VMCIQueueHeader_AddConsumerHead(produceQ->qHeader, - read, - consumeQSize); + VMCIQueueAddConsumerHead(produceQ, read, consumeQSize); } return read; diff --git a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c index e7a805fcb..d2bf29774 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2014 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * 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 @@ -557,6 +557,7 @@ static void QueuePairList_RemoveEntry(QueuePairList *qpList, // IN QueuePairEntry *entry) // IN { + UNREFERENCED_PARAMETER(qpList); if (entry) { VMCIList_Remove(&entry->listItem); } @@ -640,7 +641,7 @@ VMCIQPBroker_Exit(void) VMCIQPBrokerLock(); - while ((entry = (QPBrokerEntry *)QueuePairList_GetHead(&qpBrokerList))) { + while ((entry = (QPBrokerEntry *)QueuePairList_GetHead(&qpBrokerList)) != NULL) { QueuePairList_RemoveEntry(&qpBrokerList, &entry->qp); VMCI_FreeKernelMem(entry, sizeof *entry); } @@ -902,6 +903,9 @@ VMCIQPBrokerAllocInt(VMCIHandle handle, // IN Bool isLocal = flags & VMCI_QPFLAG_LOCAL; int result; +#if defined(_WIN32) +#pragma warning(suppress: 6235) /* !vmkernel always true */ +#endif if (VMCI_HANDLE_INVALID(handle) || (flags & ~VMCI_QP_ALL_FLAGS) || (isLocal && (!vmkernel || contextId != VMCI_HOST_CONTEXT_ID || @@ -1219,6 +1223,8 @@ VMCIQPBrokerAttach(QPBrokerEntry *entry, // IN Bool isLocal = flags & VMCI_QPFLAG_LOCAL; int result; + UNREFERENCED_PARAMETER(peer); + if (entry->state != VMCIQPB_CREATED_NO_MEM && entry->state != VMCIQPB_CREATED_MEM) { VMCI_DEBUG_LOG(5, ("QP Attach - state is %x\n", entry->state)); @@ -1400,7 +1406,7 @@ VMCIQPBrokerAttach(QPBrokerEntry *entry, // IN VMCI_DEBUG_LOG(5, ("QP Attach - cannot map queues for host\n")); return result; } - entry->qp.flags |= flags & (VMCI_QPFLAG_NONBLOCK | VMCI_QPFLAG_PINNED); + entry->qp.flags |= flags & VMCI_QPFLAG_NONBLOCK; } /* @@ -1651,7 +1657,7 @@ VMCIQPBroker_Detach(VMCIHandle handle, // IN isLocal = entry->qp.flags & VMCI_QPFLAG_LOCAL; if (contextId != VMCI_HOST_CONTEXT_ID) { - int result; + int result2; Bool headersMapped; ASSERT(!isLocal); @@ -1665,13 +1671,13 @@ VMCIQPBroker_Detach(VMCIHandle handle, // IN VMCI_AcquireQueueMutex(entry->produceQ, TRUE); headersMapped = entry->produceQ->qHeader || entry->consumeQ->qHeader; if (QPBROKERSTATE_HAS_MEM(entry)) { - result = VMCIHost_UnmapQueues(INVALID_VMCI_GUEST_MEM_ID, + result2 = VMCIHost_UnmapQueues(INVALID_VMCI_GUEST_MEM_ID, entry->produceQ, entry->consumeQ); - if (result < VMCI_SUCCESS) { + if (result2 < VMCI_SUCCESS) { VMCI_WARNING((LGPFX"Failed to unmap queue headers for queue pair " - "(handle=0x%x:0x%x,result=%d).\n", handle.context, - handle.resource, result)); + "(handle=0x%x:0x%x,result2=%d).\n", handle.context, + handle.resource, result2)); } VMCIHost_MarkQueuesUnavailable(entry->produceQ, entry->consumeQ); if (entry->vmciPageFiles) { @@ -1885,6 +1891,10 @@ QueuePairSaveHeaders(QPBrokerEntry *entry) // IN if (result < VMCI_SUCCESS) { return result; } +#if defined(_WIN32) + __assume(entry->produceQ->qHeader != NULL); + __assume(entry->consumeQ->qHeader != NULL); +#endif } memcpy(&entry->savedProduceQ, entry->produceQ->qHeader, sizeof entry->savedProduceQ); @@ -2029,6 +2039,75 @@ VMCIQPBroker_Unmap(VMCIHandle handle, // IN return result; } +#if defined(VMKERNEL) +/* + *----------------------------------------------------------------------------- + * + * VMCIQPBroker_Revalidate -- + * + * Revalidates the guest memory mappings of a given queue pair. + * + * Results: + * VMCI_SUCCESS on success, appropriate error code otherwise. + * + * Side effects: + * Nond. + * + *----------------------------------------------------------------------------- + */ + +int +VMCIQPBroker_Revalidate(VMCIHandle handle, // IN + VMCIContext *context) // IN +{ + QPBrokerEntry *entry; + const VMCIId contextId = VMCIContext_GetId(context); + int result = VMCI_SUCCESS; + + ASSERT(!VMCI_HANDLE_INVALID(handle) && contextId != VMCI_INVALID_ID); + + VMCIQPBrokerLock(); + if (!VMCIContext_QueuePairExists(context, handle)) { + VMCI_DEBUG_LOG(4, (LGPFX"Context (ID=0x%x) not attached to queue pair " + "(handle=0x%x:0x%x).\n", + contextId, handle.context, handle.resource)); + result = VMCI_ERROR_NOT_FOUND; + goto out; + } + + entry = (QPBrokerEntry *)QueuePairList_FindEntry(&qpBrokerList, handle); + if (entry == NULL) { + VMCI_DEBUG_LOG(4, (LGPFX"Context (ID=0x%x) reports being attached to " + "queue pair (handle=0x%x:0x%x) that isn't present in " + "broker.\n", + contextId, handle.context, handle.resource)); + result = VMCI_ERROR_NOT_FOUND; + goto out; + } + + if (contextId != entry->createId && contextId != entry->attachId) { + result = VMCI_ERROR_QUEUEPAIR_NOTATTACHED; + goto out; + } + + if (contextId != VMCI_HOST_CONTEXT_ID) { + ASSERT(entry->state != VMCIQPB_CREATED_NO_MEM && + entry->state != VMCIQPB_SHUTDOWN_NO_MEM && + entry->state != VMCIQPB_ATTACHED_NO_MEM); + ASSERT((entry->qp.flags & VMCI_QPFLAG_LOCAL) == 0); + + VMCI_AcquireQueueMutex(entry->produceQ, TRUE); + result = VMCIHost_RevalidateQueues(entry->produceQ, entry->consumeQ); + VMCI_ReleaseQueueMutex(entry->produceQ); + } + +out: + VMCIQPBrokerUnlock(); + return result; +} +#endif + + #if !defined(VMKERNEL) /* @@ -2108,7 +2187,7 @@ VMCIQPGuestEndpoints_Exit(void) VMCIMutex_Acquire(&qpGuestEndpoints.mutex); - while ((entry = (QPGuestEndpoint *)QueuePairList_GetHead(&qpGuestEndpoints))) { + while ((entry = (QPGuestEndpoint *)QueuePairList_GetHead(&qpGuestEndpoints)) != NULL) { /* * Don't make a hypercall for local QueuePairs. */ @@ -2399,7 +2478,7 @@ VMCIQueuePairAllocGuestWork(VMCIHandle *handle, // IN/OUT } if ((queuePairEntry = (QPGuestEndpoint *) - QueuePairList_FindEntry(&qpGuestEndpoints, *handle))) { + QueuePairList_FindEntry(&qpGuestEndpoints, *handle)) != NULL) { if (queuePairEntry->qp.flags & VMCI_QPFLAG_LOCAL) { /* Local attach case. */ if (queuePairEntry->qp.refCount > 1) { diff --git a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.h b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.h index 9c0be1412..90be2b7ce 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.h +++ b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.h @@ -98,7 +98,9 @@ int VMCIQueuePair_Alloc(VMCIHandle *handle, VMCIQueue **produceQ, int VMCIQueuePair_Detach(VMCIHandle handle, Bool guestEndpoint); int VMCIQPBroker_Map(VMCIHandle handle, VMCIContext *context, VMCIQPGuestMem guestMem); int VMCIQPBroker_Unmap(VMCIHandle handle, VMCIContext *context, VMCIGuestMemID gid); - +#ifdef VMKERNEL +int VMCIQPBroker_Revalidate(VMCIHandle handle, VMCIContext *context); +#endif #endif /* !_VMCI_QUEUE_PAIR_H_ */ diff --git a/open-vm-tools/modules/linux/vmci/shared/vmciQueue.h b/open-vm-tools/modules/linux/vmci/shared/vmciQueue.h index 000784f67..eb2faa7cc 100644 --- a/open-vm-tools/modules/linux/vmci/shared/vmciQueue.h +++ b/open-vm-tools/modules/linux/vmci/shared/vmciQueue.h @@ -110,7 +110,7 @@ typedef int VMCIMemcpyFromQueueFunc(void *dest, size_t destOffset, * Windows needs iovec for the V functions. We use an MDL for the actual * buffers, but we also have an offset that comes from WSK_BUF. */ -typedef struct iovec { +struct iovec { PMDL mdl; // List of memory descriptors. ULONG offset; // Base offset. }; diff --git a/open-vm-tools/modules/linux/vmhgfs/Makefile b/open-vm-tools/modules/linux/vmhgfs/Makefile index 648dab58f..2313270d8 100644 --- a/open-vm-tools/modules/linux/vmhgfs/Makefile +++ b/open-vm-tools/modules/linux/vmhgfs/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/make -f ########################################################## -# Copyright (C) 1998-2015 VMware, Inc. All rights reserved. +# Copyright (C) 1998-2016 VMware, Inc. All rights reserved. # # 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/Makefile.kernel b/open-vm-tools/modules/linux/vmhgfs/Makefile.kernel index fe6126a36..0efef44f3 100644 --- a/open-vm-tools/modules/linux/vmhgfs/Makefile.kernel +++ b/open-vm-tools/modules/linux/vmhgfs/Makefile.kernel @@ -1,6 +1,6 @@ #!/usr/bin/make -f ########################################################## -# Copyright (C) 1998-2015 VMware, Inc. All rights reserved. +# Copyright (C) 1998-2016 VMware, Inc. All rights reserved. # # 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 @@ -38,6 +38,7 @@ EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/dcount.c,, -DVMW_DCOUNT_3 EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/dalias.c,, -DVMW_DALIAS_319) EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/dalias1.c,, -DVMW_DALIAS_319) EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/truncate_pagecache.c,, -DVMW_PAGECACHE_312) +EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/wait_on_bit.c,, -DVMW_WAITONBIT_317) obj-m += $(DRIVER).o diff --git a/open-vm-tools/modules/linux/vmhgfs/bdhandler.c b/open-vm-tools/modules/linux/vmhgfs/bdhandler.c index b891019e8..d815f7d0d 100644 --- a/open-vm-tools/modules/linux/vmhgfs/bdhandler.c +++ b/open-vm-tools/modules/linux/vmhgfs/bdhandler.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/dentry.c b/open-vm-tools/modules/linux/vmhgfs/dentry.c index 2da16dcc2..84bd3af81 100644 --- a/open-vm-tools/modules/linux/vmhgfs/dentry.c +++ b/open-vm-tools/modules/linux/vmhgfs/dentry.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/dir.c b/open-vm-tools/modules/linux/vmhgfs/dir.c index 718be2e56..227bdcb8d 100644 --- a/open-vm-tools/modules/linux/vmhgfs/dir.c +++ b/open-vm-tools/modules/linux/vmhgfs/dir.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/file.c b/open-vm-tools/modules/linux/vmhgfs/file.c index 027622f84..073f2848e 100644 --- a/open-vm-tools/modules/linux/vmhgfs/file.c +++ b/open-vm-tools/modules/linux/vmhgfs/file.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/filesystem.c b/open-vm-tools/modules/linux/vmhgfs/filesystem.c index 6d7a64b2e..5e09a1c08 100644 --- a/open-vm-tools/modules/linux/vmhgfs/filesystem.c +++ b/open-vm-tools/modules/linux/vmhgfs/filesystem.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 @@ -218,16 +218,16 @@ HgfsValidateMountInfo(void *rawData, // IN: Fs-specific mount data /* Sanity check the incoming user data. */ if (rawData == NULL) { - LOG(4, (KERN_CRIT LGPFX "%s: error: no user supplied mount data\n", - __func__)); + printk(KERN_WARNING LGPFX "%s: error: no user supplied mount data\n", + __func__); goto exit; } /* Magic number is always first 4 bytes of the header. */ magicNumber = rawData; if (*magicNumber != HGFS_SUPER_MAGIC) { - LOG(4, (KERN_CRIT LGPFX "%s: error: user supplied mount data is not valid!\n", - __func__)); + printk(KERN_WARNING LGPFX "%s: error: user supplied mount data is not valid!\n", + __func__); goto exit; } @@ -265,8 +265,8 @@ HgfsValidateMountInfo(void *rawData, // IN: Fs-specific mount data * The version and info size fields could not be validated * for the known structure. It is probably a newer version. */ - LOG(4, (KERN_DEBUG LGPFX "%s: error: user supplied mount data version %d\n", - __func__, infoV1->version)); + printk(KERN_WARNING LGPFX "%s: error: user supplied mount data version %d\n", + __func__, infoV1->version); } exit: diff --git a/open-vm-tools/modules/linux/vmhgfs/filesystem.h b/open-vm-tools/modules/linux/vmhgfs/filesystem.h index b0bcb5b47..cea3d680f 100644 --- a/open-vm-tools/modules/linux/vmhgfs/filesystem.h +++ b/open-vm-tools/modules/linux/vmhgfs/filesystem.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/fsutil.c b/open-vm-tools/modules/linux/vmhgfs/fsutil.c index 8c21c949e..fb439231c 100644 --- a/open-vm-tools/modules/linux/vmhgfs/fsutil.c +++ b/open-vm-tools/modules/linux/vmhgfs/fsutil.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 @@ -1041,6 +1041,9 @@ HgfsChangeFileAttributes(struct inode *inode, // IN/OUT: Inode if (attr->mask & HGFS_ATTR_VALID_WRITE_TIME) { HGFS_DECLARE_TIME(newTime); HGFS_SET_TIME(newTime, attr->writeTime); + LOG(4, (KERN_DEBUG "VMware hgfs: %s: server mod " + "time: %ld:%lu, inode mod time: %ld:%lu\n", __func__, + HGFS_PRINT_TIME(newTime), HGFS_PRINT_TIME(inode->i_mtime))); if (hgfs_timespec_compare(&newTime, &inode->i_mtime) > 0 && iinfo->numWbPages == 0 && isSafeToChange) { diff --git a/open-vm-tools/modules/linux/vmhgfs/fsutil.h b/open-vm-tools/modules/linux/vmhgfs/fsutil.h index 754ad0dce..054a98df9 100644 --- a/open-vm-tools/modules/linux/vmhgfs/fsutil.h +++ b/open-vm-tools/modules/linux/vmhgfs/fsutil.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/inode.c b/open-vm-tools/modules/linux/vmhgfs/inode.c index a600c0e90..c6110e044 100644 --- a/open-vm-tools/modules/linux/vmhgfs/inode.c +++ b/open-vm-tools/modules/linux/vmhgfs/inode.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 @@ -31,6 +31,7 @@ #include #endif #include +#include // for current_fs_time #include "compat_cred.h" #include "compat_dcache.h" @@ -1599,6 +1600,28 @@ HgfsRename(struct inode *oldDir, // IN: Inode of original directory "%d\n", result)); } +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + if (result == 0) { + /* + * We force revalidate to go get the file info as soon as needed. + * We only add this fix, borrowed from CIFS, for newer versions + * of the kernel which have the current_fs_time function. + * For details see bug 1613734 but here is a short summary. + * This addresses issues in editors such as gedit which use + * rename when saving the updated contents of a file. + * If we don't force the revalidation here, then the dentry + * will randomly age over some time which will then pick up the + * file's new timestamps from the server at that time. + * This delay will cause the editor to think the file has been modified + * underneath it and prompt the user if they want to reload the file. + */ + HgfsDentryAgeForce(oldDentry); + HgfsDentryAgeForce(newDentry); + oldDir->i_ctime = oldDir->i_mtime = newDir->i_ctime = + newDir->i_mtime = current_fs_time(oldDir->i_sb); + } +#endif // LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) + out: HgfsFreeRequest(req); return result; diff --git a/open-vm-tools/modules/linux/vmhgfs/inode.h b/open-vm-tools/modules/linux/vmhgfs/inode.h index c86f848d0..4d6f36d49 100644 --- a/open-vm-tools/modules/linux/vmhgfs/inode.h +++ b/open-vm-tools/modules/linux/vmhgfs/inode.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/link.c b/open-vm-tools/modules/linux/vmhgfs/link.c index 30a66d8ab..c7b00eb86 100644 --- a/open-vm-tools/modules/linux/vmhgfs/link.c +++ b/open-vm-tools/modules/linux/vmhgfs/link.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/module.c b/open-vm-tools/modules/linux/vmhgfs/module.c index aa9612837..dfee1869e 100644 --- a/open-vm-tools/modules/linux/vmhgfs/module.c +++ b/open-vm-tools/modules/linux/vmhgfs/module.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/module.h b/open-vm-tools/modules/linux/vmhgfs/module.h index d30184ec0..528a2e056 100644 --- a/open-vm-tools/modules/linux/vmhgfs/module.h +++ b/open-vm-tools/modules/linux/vmhgfs/module.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 @@ -45,9 +45,10 @@ #endif /* Logging stuff. */ +#define LGPFX "VMware hgfs: " + #ifdef VMX86_DEVEL extern int LOGLEVEL_THRESHOLD; -#define LGPFX "VMware hgfs: " #define LOG(level, args) ((void) (LOGLEVEL_THRESHOLD >= (level) ? (printk args) : 0)) #else #define LOG(level, args) diff --git a/open-vm-tools/modules/linux/vmhgfs/page.c b/open-vm-tools/modules/linux/vmhgfs/page.c index 9e31c12d9..0f5f7d39c 100644 --- a/open-vm-tools/modules/linux/vmhgfs/page.c +++ b/open-vm-tools/modules/linux/vmhgfs/page.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 @@ -1603,7 +1603,7 @@ HgfsWbRequestPut(HgfsWbPage *req) // IN: request of page data to write *---------------------------------------------------------------------- */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) && \ +#if !defined VMW_WAITONBIT_317 && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) && \ LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) static int HgfsWbRequestWaitUninterruptible(void *word) // IN:unused @@ -1624,7 +1624,9 @@ HgfsWbRequestWaitUninterruptible(void *word) // IN:unused * The user is responsible for holding a count on the request. * * Results: - * None + * Returned value will be zero if the bit was cleared, + * non-zero if the process received a signal and the mode + * permitted wakeup on that signal. * * Side effects: * None @@ -1643,7 +1645,7 @@ HgfsWbRequestWait(HgfsWbPage *req) // IN: request of page data to write #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) return wait_on_bit(&req->wb_flags, PG_BUSY, -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) +#if !defined VMW_WAITONBIT_317 && LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) HgfsWbRequestWaitUninterruptible, #endif TASK_UNINTERRUPTIBLE); diff --git a/open-vm-tools/modules/linux/vmhgfs/request.c b/open-vm-tools/modules/linux/vmhgfs/request.c index dccf481e9..0667cb8c8 100644 --- a/open-vm-tools/modules/linux/vmhgfs/request.c +++ b/open-vm-tools/modules/linux/vmhgfs/request.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/request.h b/open-vm-tools/modules/linux/vmhgfs/request.h index 7537ac51a..6559265b3 100644 --- a/open-vm-tools/modules/linux/vmhgfs/request.h +++ b/open-vm-tools/modules/linux/vmhgfs/request.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/stubs.c b/open-vm-tools/modules/linux/vmhgfs/stubs.c index 029d833c0..36d5e16bd 100644 --- a/open-vm-tools/modules/linux/vmhgfs/stubs.c +++ b/open-vm-tools/modules/linux/vmhgfs/stubs.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/super.c b/open-vm-tools/modules/linux/vmhgfs/super.c index 359bf39e4..78d205717 100644 --- a/open-vm-tools/modules/linux/vmhgfs/super.c +++ b/open-vm-tools/modules/linux/vmhgfs/super.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/transport.c b/open-vm-tools/modules/linux/vmhgfs/transport.c index c7fdb04c1..24446052a 100644 --- a/open-vm-tools/modules/linux/vmhgfs/transport.c +++ b/open-vm-tools/modules/linux/vmhgfs/transport.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/transport.h b/open-vm-tools/modules/linux/vmhgfs/transport.h index 0c0c9542e..571c4ab2c 100644 --- a/open-vm-tools/modules/linux/vmhgfs/transport.h +++ b/open-vm-tools/modules/linux/vmhgfs/transport.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/linux/vmhgfs/vmhgfs_version.h b/open-vm-tools/modules/linux/vmhgfs/vmhgfs_version.h index b8569b51e..8b614a900 100644 --- a/open-vm-tools/modules/linux/vmhgfs/vmhgfs_version.h +++ b/open-vm-tools/modules/linux/vmhgfs/vmhgfs_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * 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 @@ -25,8 +25,8 @@ #ifndef _VMHGFS_VERSION_H_ #define _VMHGFS_VERSION_H_ -#define VMHGFS_DRIVER_VERSION 2.0.17.1 -#define VMHGFS_DRIVER_VERSION_COMMAS 2,0,17,1 -#define VMHGFS_DRIVER_VERSION_STRING "2.0.17.1" +#define VMHGFS_DRIVER_VERSION 2.0.21.0 +#define VMHGFS_DRIVER_VERSION_COMMAS 2,0,21,0 +#define VMHGFS_DRIVER_VERSION_STRING "2.0.21.0" #endif /* _VMHGFS_VERSION_H_ */ diff --git a/open-vm-tools/modules/linux/vmsync/Makefile b/open-vm-tools/modules/linux/vmsync/Makefile index 3c681a36f..7078c2fdc 100644 --- a/open-vm-tools/modules/linux/vmsync/Makefile +++ b/open-vm-tools/modules/linux/vmsync/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/make -f ########################################################## -# Copyright (C) 1998-2015 VMware, Inc. All rights reserved. +# Copyright (C) 1998-2016 VMware, Inc. All rights reserved. # # 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 diff --git a/open-vm-tools/modules/linux/vmxnet/Makefile b/open-vm-tools/modules/linux/vmxnet/Makefile index 1c1bfd803..4583a8539 100644 --- a/open-vm-tools/modules/linux/vmxnet/Makefile +++ b/open-vm-tools/modules/linux/vmxnet/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/make -f ########################################################## -# Copyright (C) 1998-2015 VMware, Inc. All rights reserved. +# Copyright (C) 1998-2016 VMware, Inc. All rights reserved. # # 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 diff --git a/open-vm-tools/modules/linux/vsock/Makefile b/open-vm-tools/modules/linux/vsock/Makefile index 7549fa50b..565451abe 100644 --- a/open-vm-tools/modules/linux/vsock/Makefile +++ b/open-vm-tools/modules/linux/vsock/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/make -f ########################################################## -# Copyright (C) 1998-2015 VMware, Inc. All rights reserved. +# Copyright (C) 1998-2016 VMware, Inc. All rights reserved. # # 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 diff --git a/open-vm-tools/modules/shared/vmmemctl/balloonInt.h b/open-vm-tools/modules/shared/vmmemctl/balloonInt.h index bada6ce4c..db775f088 100644 --- a/open-vm-tools/modules/shared/vmmemctl/balloonInt.h +++ b/open-vm-tools/modules/shared/vmmemctl/balloonInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012,2014 VMware, Inc. All rights reserved. + * Copyright (C) 2012,2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -57,6 +57,8 @@ #ifndef BALLOONINT_H_ # define BALLOONINT_H_ +#include "balloon_def.h" + /* * Compile-Time Options */ @@ -64,10 +66,11 @@ #define BALLOON_NAME "vmmemctl" #define BALLOON_NAME_VERBOSE "VMware memory control driver" +// Capabilities for Windows are defined at run-tine (see nt/vmballoon.c) #if defined __linux__ || (defined __APPLE__ && defined __LP64__) #define BALLOON_CAPABILITIES (BALLOON_BASIC_CMDS|BALLOON_BATCHED_CMDS|\ BALLOON_BATCHED_2M_CMDS) -#elif defined __FreeBSD__ || defined _WIN32 || (defined __APPLE__ && !defined __LP64__) +#elif defined __FreeBSD__ || (defined __APPLE__ && !defined __LP64__) #define BALLOON_CAPABILITIES (BALLOON_BASIC_CMDS|BALLOON_BATCHED_CMDS) #else #define BALLOON_CAPABILITIES BALLOON_BASIC_CMDS diff --git a/open-vm-tools/modules/shared/vmmemctl/dbllnklst.h b/open-vm-tools/modules/shared/vmmemctl/dbllnklst.h index 2037dcdb2..2bec9eb43 100644 --- a/open-vm-tools/modules/shared/vmmemctl/dbllnklst.h +++ b/open-vm-tools/modules/shared/vmmemctl/dbllnklst.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h b/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h index d0a53ad79..a08c97dee 100644 --- a/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h +++ b/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -100,6 +100,8 @@ # include "vm_assert.h" # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_NDIS # include "vm_basic_types.h" +# include +# include "kernelStubsFloorFixes.h" # include # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_WDM # include "vm_basic_types.h" @@ -113,6 +115,7 @@ # include /* for min macro. */ # include "vm_basic_defs.h" # include "vm_assert.h" /* Our assert macros */ +# include "kernelStubsFloorFixes.h" # else # error Type KRNL_STUBS_DRIVER_TYPE must be defined. # endif diff --git a/open-vm-tools/modules/shared/vmmemctl/kernelStubsSal.h b/open-vm-tools/modules/shared/vmmemctl/kernelStubsSal.h index d88b04971..29a50c2d4 100644 --- a/open-vm-tools/modules/shared/vmmemctl/kernelStubsSal.h +++ b/open-vm-tools/modules/shared/vmmemctl/kernelStubsSal.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -62,8 +62,7 @@ * This solves two issues: * 1. Microsoft changed their annotation language from SAL 1.0 (original one * widely distributed by the Windows team) to their more final SAL 2.0 - * langauge (championed by the VS team). We target multiple versions of - * Driver Kits, so we have to map 2.0 to 1.0. + * langauge (championed by the VS team). * 2. We want these annotations to do nothing during non-Win32 compiles. * * A longer term goal is to rationalize this into Bora. @@ -78,68 +77,66 @@ # endif #endif -#if !defined(_SAL_VERSION) +#if !defined(_SAL_VERSION) || (defined(_SAL_VERSION) && _SAL_VERSION == 10) #define _In_ -#define _In_z_ #define _In_opt_ +#define _In_reads_bytes_(count) +#define _In_reads_bytes_opt_(count) +#define _In_z_ #define _In_opt_z_ #define _Out_ #define _Out_opt_ +#define _Out_writes_bytes_(capcount) +#define _Out_writes_bytes_opt_(capcount) +#define _Out_writes_bytes_to_(cap, count) +#define _Out_writes_bytes_to_opt_(cap, count) +#define _Out_bytecap_post_bytecount_(cap, count) +#define _Out_writes_z_(cap) +#define _Out_writes_opt_z_(cap) #define _Out_z_cap_(e) +#define _Outptr_result_buffer_(count) +#define _Outptr_result_bytebuffer_(count) +#define _Outptr_result_bytebuffer_maybenull_(count) +#define _Outptr_opt_result_buffer_(count) +#define _Outptr_opt_result_bytebuffer_(count) +#define _Outptr_opt_result_bytebuffer_maybenull_(count) +#define _COM_Outptr_ #define _Inout_ +#define _Inout_updates_bytes_(e) #define _Inout_z_cap_(e) #define _Post_z_count_(e) #define _Ret_writes_z_(e) #define _Ret_writes_maybenull_z_(e) +#define _Ret_maybenull_ #define _Ret_maybenull_z_ +#define _Ret_range_(l,h) #define _Success_(expr) #define _Check_return_ #define _Must_inspect_result_ #define _Group_(annos) #define _When_(expr, annos) +#define _Always_(annos) #define _Printf_format_string_ #define _Use_decl_annotations_ -#elif defined(_SAL_VERSION) && _SAL_VERSION == 10 -// Microsoft didn't create a header mapping SAL 2.0 to 1.0. We do that here. -#define _In_ __in -#define _In_z_ __in_z -#define _In_opt_ __in_opt -#define _In_opt_z_ __in_z_opt -#define _Out_ __out -#define _Out_opt_ __out_opt -#define _Out_z_cap_(expr) __out_ecount_z(expr) -#define _Inout_ __inout -#define _Inout_z_cap_(expr) __inout_ecount_z(expr) -#define _Post_z_count_(expr) -#define _Ret_writes_z_(expr) __out_ecount_z(expr) -#define _Ret_writes_maybenull_z_(expr) __out_ecount_z_opt(expr) -#define _Ret_maybenull_z_ __out_z -#define _Check_return_ __checkReturn -#define _Must_inspect_result_ __checkReturn -#define _Success_(annos) __success(annos) -#define _Printf_format_string_ __format_string -#define _Use_decl_annotations_ - -// DriverSpecs.h was pretty much empty until the DDK that defined -// NTDDK_WIN6SP1 appeared. -#if defined(NTDDI_WIN6SP1) -#define _Group_(annos) __$drv_group(annos) -#define _When_(expr, annos) __drv_when(expr, annos) -#define _IRQL_requires_max_(irql) __drv_maxIRQL(irql) -#else -#define _Group_(annos) -#define _When_(expr, annos) -#define _IRQL_requires_max_(irql) -#define __drv_allocatesMem(kind) -#define __drv_freesMem(kind) -#endif +#define _Dispatch_type_(mj) +#define _Function_class_(c) +#define _Requires_lock_held_(cs) +#define _Requires_lock_not_held_(cs) +#define _Acquires_lock_(l) +#define _Releases_lock_(l) +#define _IRQL_requires_max_(i) +#define _IRQL_requires_(i) +#define _IRQL_requires_same_ +#define _Analysis_assume_(e) +#define _Pre_notnull_ +#define _At_(expr,annos) #else // Sal 2.0 path - everything is already defined. #endif // _SAL_VERSION // Now define our own annotations -#if !defined(_SAL_VERSION) +#if !defined(_SAL_VERSION) || (defined(_SAL_VERSION) && _SAL_VERSION == 10) #define _When_windrv_(annos) #define _Ret_allocates_malloc_mem_opt_bytecap_(_Size) #define _Ret_allocates_malloc_mem_opt_bytecount_(_Size) @@ -147,14 +144,6 @@ #define _Ret_allocates_malloc_mem_opt_z_bytecount_(_Size) #define _Ret_allocates_malloc_mem_opt_z_ #define _In_frees_malloc_mem_opt_ -#elif defined(_SAL_VERSION) && _SAL_VERSION == 10 -#define _When_windrv_(annos) annos -#define _Ret_allocates_malloc_mem_opt_bytecap_(_Cap) __drv_allocatesMem("Memory") __checkReturn __post __byte_writableTo(_Cap) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_bytecount_(_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_readableTo(_Count) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_bytecap_post_bytecount_(_Cap,_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_writableTo(_Cap) __byte_readableTo(_Count) __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_z_bytecount_(_Count) __drv_allocatesMem("Memory") __checkReturn __post __byte_readableTo(_Count) __valid __nullterminated __exceptthat __maybenull -#define _Ret_allocates_malloc_mem_opt_z_ __drv_allocatesMem("Memory") __checkReturn __post __valid __nullterminated __exceptthat __maybenull -#define _In_frees_malloc_mem_opt_ __drv_freesMem("Memory") __in_opt __post __notvalid #else #define _When_windrv_(annos) annos #define _Ret_allocates_malloc_mem_opt_bytecap_(_Cap) __drv_allocatesMem("Memory") _Must_inspect_result_ _Ret_opt_bytecap_(_Cap) diff --git a/open-vm-tools/modules/shared/vmxnet/net.h b/open-vm-tools/modules/shared/vmxnet/net.h index 88950a4aa..d96e746b6 100644 --- a/open-vm-tools/modules/shared/vmxnet/net.h +++ b/open-vm-tools/modules/shared/vmxnet/net.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * 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 diff --git a/open-vm-tools/modules/shared/vmxnet/vmnet_def.h b/open-vm-tools/modules/shared/vmxnet/vmnet_def.h index 999c1bcb9..112480f3a 100644 --- a/open-vm-tools/modules/shared/vmxnet/vmnet_def.h +++ b/open-vm-tools/modules/shared/vmxnet/vmnet_def.h @@ -113,6 +113,7 @@ #define VMNET_CAP_TRANSCEIVER_TYPE CONST64U(0x10000000000000) /* Uplink supports getting and setting transceiver type. */ #define VMNET_CAP_MESSAGE_LEVEL CONST64U(0x20000000000000) /* Uplink supports getting and setting message level. */ #define VMNET_CAP_RING_PARAMS CONST64U(0x40000000000000) /* Support getting/setting RX/TX ring size parameters */ +#define VMNET_CAP_ADVERTISE_MODES CONST64U(0x80000000000000) /* Support getting/setting interconnect modes */ #define VMNET_CAP_LEGACY CONST64U(0x8000000000000000) /* Uplink is compatible with vmklinux drivers */ #endif // _VMNET_DEF_H_ diff --git a/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h b/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h index dfc4657d7..d593265c8 100644 --- a/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h +++ b/open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h @@ -121,6 +121,7 @@ typedef enum { VMXNET3_CMD_STOP_EMULATION, VMXNET3_CMD_LOAD_PLUGIN, VMXNET3_CMD_ACTIVATE_VF, + VMXNET3_CMD_SET_POLLING, VMXNET3_CMD_FIRST_GET = 0xF00D0000, VMXNET3_CMD_GET_QUEUE_STATUS = VMXNET3_CMD_FIRST_GET, @@ -133,6 +134,7 @@ typedef enum { VMXNET3_CMD_GET_DEV_EXTRA_INFO, VMXNET3_CMD_GET_CONF_INTR, VMXNET3_CMD_GET_ADAPTIVE_RING_INFO + } Vmxnet3_Cmd; /* Adaptive Ring Info Flags */ @@ -733,6 +735,29 @@ struct Vmxnet3_RxQueueDesc { #include "vmware_pack_end.h" Vmxnet3_RxQueueDesc; +typedef +#include "vmware_pack_begin.h" +struct Vmxnet3_SetPolling { + uint8 enablePolling; +} +#include "vmware_pack_end.h" +Vmxnet3_SetPolling; + +/* + * If a command data does not exceed 16 bytes, it can use + * the shared memory directly. Otherwise use variable length + * configuration descriptor to pass the data. + */ +typedef +#include "vmware_pack_begin.h" +union Vmxnet3_CmdInfo { + Vmxnet3_VariableLenConfDesc varConf; + Vmxnet3_SetPolling setPolling; + __le64 data[2]; +} +#include "vmware_pack_end.h" +Vmxnet3_CmdInfo; + typedef #include "vmware_pack_begin.h" struct Vmxnet3_DriverShared { @@ -740,7 +765,13 @@ struct Vmxnet3_DriverShared { __le32 pad; /* make devRead start at 64-bit boundaries */ Vmxnet3_DSDevRead devRead; __le32 ecr; - __le32 reserved[5]; + __le32 reserved; + union { + __le32 reserved1[4]; + Vmxnet3_CmdInfo cmdInfo; /* only valid in the context of executing the relevant + * command. + */ + } cu; } #include "vmware_pack_end.h" Vmxnet3_DriverShared; diff --git a/open-vm-tools/modules/solaris/vmhgfs/Makefile b/open-vm-tools/modules/solaris/vmhgfs/Makefile index 1979d435c..0978ef746 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/Makefile +++ b/open-vm-tools/modules/solaris/vmhgfs/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/make -f ########################################################## -# Copyright (C) 2008-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2008-2016 VMware, Inc. All rights reserved. # # The contents of this file are subject to the terms of the Common # Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/debug.c b/open-vm-tools/modules/solaris/vmhgfs/debug.c index 25039e08f..b21d90aab 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/debug.c +++ b/open-vm-tools/modules/solaris/vmhgfs/debug.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/debug.h b/open-vm-tools/modules/solaris/vmhgfs/debug.h index 44096ae46..3d427a434 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/debug.h +++ b/open-vm-tools/modules/solaris/vmhgfs/debug.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/filesystem.c b/open-vm-tools/modules/solaris/vmhgfs/filesystem.c index 0240013e2..5a3510c5a 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/filesystem.c +++ b/open-vm-tools/modules/solaris/vmhgfs/filesystem.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/filesystem.h b/open-vm-tools/modules/solaris/vmhgfs/filesystem.h index 5c05c4bcb..c1b1cf29f 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/filesystem.h +++ b/open-vm-tools/modules/solaris/vmhgfs/filesystem.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/hgfsBdGlue.c b/open-vm-tools/modules/solaris/vmhgfs/hgfsBdGlue.c index 4b52814bc..e0c90c109 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/hgfsBdGlue.c +++ b/open-vm-tools/modules/solaris/vmhgfs/hgfsBdGlue.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/hgfsBdGlue.h b/open-vm-tools/modules/solaris/vmhgfs/hgfsBdGlue.h index eb27ec215..cef67f55e 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/hgfsBdGlue.h +++ b/open-vm-tools/modules/solaris/vmhgfs/hgfsBdGlue.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/hgfsSolaris.h b/open-vm-tools/modules/solaris/vmhgfs/hgfsSolaris.h index 506d9a23c..219d31e48 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/hgfsSolaris.h +++ b/open-vm-tools/modules/solaris/vmhgfs/hgfsSolaris.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/hgfsState.c b/open-vm-tools/modules/solaris/vmhgfs/hgfsState.c index 77c2ff0bb..c97556579 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/hgfsState.c +++ b/open-vm-tools/modules/solaris/vmhgfs/hgfsState.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/hgfsState.h b/open-vm-tools/modules/solaris/vmhgfs/hgfsState.h index 9fc349a4a..873896009 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/hgfsState.h +++ b/open-vm-tools/modules/solaris/vmhgfs/hgfsState.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h b/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h index 1f8fef073..ded612db5 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h +++ b/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 @@ -59,6 +59,8 @@ # include "vm_assert.h" # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_NDIS # include "vm_basic_types.h" +# include +# include "kernelStubsFloorFixes.h" # include # elif KRNL_STUBS_DRIVER_TYPE == KRNL_STUBS_DRIVER_TYPE_WDM # include "vm_basic_types.h" @@ -72,6 +74,7 @@ # include /* for min macro. */ # include "vm_basic_defs.h" # include "vm_assert.h" /* Our assert macros */ +# include "kernelStubsFloorFixes.h" # else # error Type KRNL_STUBS_DRIVER_TYPE must be defined. # endif diff --git a/open-vm-tools/modules/solaris/vmhgfs/kernelStubsSolaris.c b/open-vm-tools/modules/solaris/vmhgfs/kernelStubsSolaris.c index 947ff8e29..53f3cae19 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/kernelStubsSolaris.c +++ b/open-vm-tools/modules/solaris/vmhgfs/kernelStubsSolaris.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/module.c b/open-vm-tools/modules/solaris/vmhgfs/module.c index 07bd75705..94f504c36 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/module.c +++ b/open-vm-tools/modules/solaris/vmhgfs/module.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/module.h b/open-vm-tools/modules/solaris/vmhgfs/module.h index 164c2bf63..d3766cc92 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/module.h +++ b/open-vm-tools/modules/solaris/vmhgfs/module.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/request.c b/open-vm-tools/modules/solaris/vmhgfs/request.c index 293e71be8..de8703395 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/request.c +++ b/open-vm-tools/modules/solaris/vmhgfs/request.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/request.h b/open-vm-tools/modules/solaris/vmhgfs/request.h index d735e680d..5a6dcb821 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/request.h +++ b/open-vm-tools/modules/solaris/vmhgfs/request.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/vnode.c b/open-vm-tools/modules/solaris/vmhgfs/vnode.c index b746403a1..6145a91af 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/vnode.c +++ b/open-vm-tools/modules/solaris/vmhgfs/vnode.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmhgfs/vnode.h b/open-vm-tools/modules/solaris/vmhgfs/vnode.h index a9265ac1e..71cd6c9db 100644 --- a/open-vm-tools/modules/solaris/vmhgfs/vnode.h +++ b/open-vm-tools/modules/solaris/vmhgfs/vnode.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2004-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2004-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmmemctl/kernelStubsSolaris.c b/open-vm-tools/modules/solaris/vmmemctl/kernelStubsSolaris.c index 947ff8e29..53f3cae19 100644 --- a/open-vm-tools/modules/solaris/vmmemctl/kernelStubsSolaris.c +++ b/open-vm-tools/modules/solaris/vmmemctl/kernelStubsSolaris.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License (the "License") version 1.0 diff --git a/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_tx.c b/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_tx.c index 9b2af6a02..d292d3f11 100644 --- a/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_tx.c +++ b/open-vm-tools/modules/solaris/vmxnet3/vmxnet3_tx.c @@ -103,16 +103,23 @@ vmxnet3_tx_prepare_offload(vmxnet3_softc_t *dp, mblk_t *mp) { int ret = 0; - uint32_t start, stuff, value, flags, lso_flag, mss; + uint32_t start, stuff, value, flags; +#if defined(OPEN_SOLARIS) || defined(SOL11) + uint32_t lso_flag, mss; +#endif ol->om = VMXNET3_OM_NONE; ol->hlen = 0; ol->msscof = 0; hcksum_retrieve(mp, NULL, NULL, &start, &stuff, NULL, &value, &flags); +#if defined(OPEN_SOLARIS) || defined(SOL11) mac_lso_get(mp, &mss, &lso_flag); if (flags || lso_flag) { +#else + if (flags) { +#endif struct ether_vlan_header *eth = (void *) mp->b_rptr; uint8_t ethLen; @@ -125,7 +132,16 @@ vmxnet3_tx_prepare_offload(vmxnet3_softc_t *dp, VMXNET3_DEBUG(dp, 4, "flags=0x%x, ethLen=%u, start=%u, stuff=%u, value=%u\n", flags, ethLen, start, stuff, value); +#if defined(OPEN_SOLARIS) || defined(SOL11) if (lso_flag & HW_LSO) { +#else + if (flags & HCK_PARTIALCKSUM) { + ol->om = VMXNET3_OM_CSUM; + ol->hlen = start + ethLen; + ol->msscof = stuff + ethLen; + } + if (flags & HW_LSO) { +#endif mblk_t *mblk = mp; uint8_t *ip, *tcp; uint8_t ipLen, tcpLen; @@ -154,17 +170,23 @@ vmxnet3_tx_prepare_offload(vmxnet3_softc_t *dp, ol->om = VMXNET3_OM_TSO; ol->hlen = ethLen + ipLen + tcpLen; +#if defined(OPEN_SOLARIS) || defined(SOL11) ol->msscof = mss; - +#else + /* OpenSolaris fills 'value' with the MSS but Solaris doesn't. */ + ol->msscof = DB_LSOMSS(mp); +#endif if (mblk != mp) { ret = ol->hlen; } - } else if (flags & HCK_PARTIALCKSUM) { + } +#if defined(OPEN_SOLARIS) || defined(SOL11) + else if (flags & HCK_PARTIALCKSUM) { ol->om = VMXNET3_OM_CSUM; ol->hlen = start + ethLen; ol->msscof = stuff + ethLen; } - +#endif } return ret; diff --git a/open-vm-tools/namespacetool/COPYING b/open-vm-tools/namespacetool/COPYING new file mode 100644 index 000000000..09f465ab7 --- /dev/null +++ b/open-vm-tools/namespacetool/COPYING @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/open-vm-tools/namespacetool/Makefile.am b/open-vm-tools/namespacetool/Makefile.am new file mode 100644 index 000000000..883c7f1db --- /dev/null +++ b/open-vm-tools/namespacetool/Makefile.am @@ -0,0 +1,40 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +bin_PROGRAMS = vmware-namespace-cmd + +vmware_namespace_cmd_SOURCES = +vmware_namespace_cmd_SOURCES += namespacetool.c + +vmware_namespace_cmd_CPPFLAGS = +vmware_namespace_cmd_CPPFLAGS += -DVMTOOLS_USE_GLIB +vmware_namespace_cmd_CPPFLAGS += @GLIB2_CPPFLAGS@ +vmware_namespace_cmd_CPPFLAGS += -I$(top_srcdir)/libvmtools + +vmware_namespace_cmd_LDADD = +vmware_namespace_cmd_LDADD += @VMTOOLS_LIBS@ +vmware_namespace_cmd_LDADD += @GLIB2_LIBS@ + +if HAVE_ICU + vmware_namespace_cmd_LDADD += @ICU_LIBS@ + vmware_namespace_cmd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXX) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +else + vmware_namespace_cmd_LINK = $(LINK) +endif \ No newline at end of file diff --git a/open-vm-tools/namespacetool/namespacetool.c b/open-vm-tools/namespacetool/namespacetool.c new file mode 100644 index 000000000..b3e9700cd --- /dev/null +++ b/open-vm-tools/namespacetool/namespacetool.c @@ -0,0 +1,724 @@ +/********************************************************* + * Copyright (C) 2016 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * namespacetool.c -- + * + * Command line tool to communicate namespace DB. + */ + +#include +#include +#include "vmware.h" +#include "str.h" +#include "util.h" +#include "dynbuf.h" +#include "vmware/tools/guestrpc.h" +#include "vmware/tools/log.h" +#include "debug.h" + +// Core Namespace commands +#define NSDB_PRIV_GET_VALUES_CMD "namespace-priv-get-values" +#define NSDB_PRIV_SET_KEYS_CMD "namespace-priv-set-keys" + +// namespace commands for end user +#define NSDB_GET_VALUE_USER_CMD "get-value" +#define NSDB_SET_KEY_USER_CMD "set-key" +#define NSDB_DEL_KEY_USER_CMD "delete-key" + +#define SUPPORTED_FILE_SIZE_IN_BYTES (16 * 1024) // Refer to namespaceDb.h + +/* + * Aggregation of command options. + */ + +typedef struct NamespaceOptionsState { + gchar *cmdName; + gchar *nsName; + gchar *keyName; //for command set-key or delete-key or get-value + gchar *valueToSet; + gchar *oldValueToSet; + gchar *getValueFromFile; + gboolean verboseLogFlag; + gboolean standardInput; +} NamespaceOptionsState; + +static gchar *gAppName = NULL; + + +/* + ****************************************************************************** + * PrintUsage -- + * + * Prints the usage mesage. + * + ****************************************************************************** + */ + +static void +PrintUsage(GOptionContext *optCtx) +{ + gchar *usage; + + usage = g_option_context_get_help(optCtx, TRUE, NULL); + g_printerr("%s", usage); + g_free(usage); +} + + +/* + ****************************************************************************** + * GetInternalNamespaceCommand -- + * + * Namespacetool should allow only privilege namespaceDB. + * + * @param[in] cmd namespace command name. + * + * @return internal namespace command + * + ****************************************************************************** + */ + +static char* +GetInternalNamespaceCommand(const gchar *cmd) +{ + if (g_strcmp0(cmd, NSDB_GET_VALUE_USER_CMD) == 0) { + return NSDB_PRIV_GET_VALUES_CMD; + } else if (g_strcmp0(cmd, NSDB_SET_KEY_USER_CMD) == 0) { + return NSDB_PRIV_SET_KEYS_CMD; + } else if (g_strcmp0(cmd, NSDB_DEL_KEY_USER_CMD) == 0) { + return NSDB_PRIV_SET_KEYS_CMD; + } else { + return NULL; + } +} + + +/* + ****************************************************************************** + * ValidateNSCommands -- + * + * Namespacetool should allow only privilege and non privilege commands of + * namespaceDB. + * @param[in] cmdName namespace command name. + * + * @return TRUE if successful, FALSE otherwise. + * + ****************************************************************************** + */ + +static gboolean +ValidateNSCommands(const gchar *cmdName) +{ + if ((g_strcmp0(cmdName, NSDB_GET_VALUE_USER_CMD) == 0) || + (g_strcmp0(cmdName, NSDB_SET_KEY_USER_CMD) == 0) || + (g_strcmp0(cmdName, NSDB_DEL_KEY_USER_CMD) == 0)) { + return TRUE; + } else { + fprintf(stderr, "Invalid command \"%s\"\n", cmdName); + return FALSE; + } +} + + +/* + ******************************************************************************* + * PrintInternalCommand -- + * + * Prints internal command in verbose mode + * + * @param[in] data set of strings which has '\0' as a delimiter. + * @param[in] dataSize size of data. + * + ******************************************************************************* + */ + +static void +PrintInternalCommand(const char *data, size_t dataSize) +{ + int readCounter = 0; + char *tmp = NULL; + char *printBuf = NULL; + if (dataSize > 0) { + printBuf = (char *) calloc((int)dataSize, sizeof(char)); + if (printBuf == NULL) { + fprintf(stderr, "Out of memory error"); + return; + } + tmp = printBuf; + while (dataSize > readCounter) { + if (*data != '\0') { + *printBuf++ = *data; + } else if (readCounter < dataSize - 1) { + *printBuf++ = ','; + } + ++data; + ++readCounter; + } + fprintf(stdout, "Internal command is %s\n", tmp); + } + free(tmp); +} + + +/* + ****************************************************************************** + * GetValueFromStdin -- + * + * Get standard input as a value + * + * @param[Out] data return standard input strings. This data is terminated + * by an extra nul character, but there may be other + * nuls in the intervening data. + * @param[Out] length return length of standard input strings. + * + * @return TRUE on success or FALSE if stdin data is empty or more than Max + * limit + * + ****************************************************************************** + */ + +static Bool +GetValueFromStdin(gchar **data, gsize *length) +{ + GError *gErr = NULL; + GIOStatus status; + GIOChannel* iochannel; + Bool retVal = TRUE; +#if defined(_WIN32) + iochannel = g_io_channel_win32_new_fd(0); +#else + iochannel = g_io_channel_unix_new(0); +#endif + /** + * This function never returns EOF + */ + status = g_io_channel_read_to_end(iochannel, data, length, &gErr); + + if (status != G_IO_STATUS_NORMAL) { + fprintf(stderr, "%s: Read failed from stdin with status code %d. %s\n", + gAppName, status, (gErr != NULL ? gErr->message : "")); + retVal = FALSE; + } else { + if (*length > SUPPORTED_FILE_SIZE_IN_BYTES) { + retVal = FALSE; + fprintf(stderr, "%s: stdin data must not exceed %d bytes\n", + gAppName, SUPPORTED_FILE_SIZE_IN_BYTES); + } else if (*length == 0) { + retVal = FALSE; + fprintf(stderr, "%s: stdin data must not be empty\n", gAppName); + } + } + if (retVal == FALSE) { + g_free(*data); + *data = NULL; + *length = 0; + } + g_free(gErr); + return retVal; +} + + +/* + ****************************************************************************** + * GetValueFromFile -- + * + * Read file contents as a string. + * + * @param[in] filePath file path + * @param[out] fileContents file contents + * @param[out] length length of file + * + * @return TRUE on success or FALSE if file is empty or more than Max limit + * + ****************************************************************************** + */ + +static Bool +GetValueFromFile(const char *filePath, char **fileContents, gsize *length) +{ + GError *gErr = NULL; + Bool retVal = FALSE; + retVal = g_file_get_contents(filePath, fileContents, length, &gErr); + if (retVal == FALSE) { + fprintf(stderr, "%s: %s: %s\n", gAppName, + (gErr != NULL ? gErr->message : "Failed while reading file"), + filePath); + } else { + if (*length > SUPPORTED_FILE_SIZE_IN_BYTES) { + retVal = FALSE; + fprintf(stderr, "%s: File size must not exceed %d bytes\n", + gAppName, SUPPORTED_FILE_SIZE_IN_BYTES); + } else if (*length == 0) { + retVal = FALSE; + fprintf(stderr, "%s: File must not be empty\n", gAppName); + } + } + if (retVal == FALSE) { + g_free(*fileContents); + *fileContents = NULL; + *length = 0; + } + g_free(gErr); + return retVal; +} + + +/* + ****************************************************************************** + * RunNamespaceCommand -- + * + * Processes the namespace command for get/set/delete key. + * @param[in] nsOptions Parsed namespace command line options will + * be placed in this struct. + * + * @return TRUE if successful, FALSE otherwise. + * + ****************************************************************************** + */ + +static Bool +RunNamespaceCommand(NamespaceOptionsState *nsOptions) +{ + char *result = NULL; + size_t resultLen = 0; + Bool status = FALSE; + gchar *opCode = NULL; + gchar *keyValueData = NULL; + gsize keyValueLength = 0; + + const char *nscmd = GetInternalNamespaceCommand(nsOptions->cmdName); + + DynBuf buf; + ASSERT(nscmd); + DynBuf_Init(&buf); + if (!DynBuf_Append(&buf, nscmd, strlen(nscmd)) || + !DynBuf_Append(&buf, " ", 1) || + !DynBuf_AppendString(&buf, nsOptions->nsName)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + if (strlen(nsOptions->oldValueToSet) == 0) { + opCode = g_strdup("0"); + } else { + opCode = g_strdup("1"); + } + if (g_strcmp0(nsOptions->cmdName, NSDB_GET_VALUE_USER_CMD) == 0) { + ASSERT(nsOptions->keyName); + if (!DynBuf_AppendString(&buf, nsOptions->keyName)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + } else if (g_strcmp0(nsOptions->cmdName, NSDB_SET_KEY_USER_CMD) == 0) { + ASSERT(nsOptions->keyName); + if (!DynBuf_AppendString(&buf, "1") || // numOps + !DynBuf_AppendString(&buf, opCode)|| + !DynBuf_AppendString(&buf, nsOptions->keyName)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + if (nsOptions->getValueFromFile == NULL) { + if (nsOptions->valueToSet != NULL) { + if (strlen(nsOptions->valueToSet) == 0) { + fprintf(stderr, "%s: Key value must not be empty\n", gAppName); + goto exit; + } + if (!DynBuf_AppendString(&buf, nsOptions->valueToSet) || + !DynBuf_AppendString(&buf, nsOptions->oldValueToSet)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + } else { + if (GetValueFromStdin(&keyValueData, &keyValueLength) == FALSE) { + goto exit; + } + if (!DynBuf_Append(&buf, keyValueData, keyValueLength + 1) || + !DynBuf_AppendString(&buf, nsOptions->oldValueToSet)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + } + } else { + if (GetValueFromFile(nsOptions->getValueFromFile, + &keyValueData, &keyValueLength) == FALSE) { + goto exit; + } + if (!DynBuf_Append(&buf, keyValueData, keyValueLength + 1) || + !DynBuf_AppendString(&buf, nsOptions->oldValueToSet)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + } + } else if (g_strcmp0(nsOptions->cmdName, NSDB_DEL_KEY_USER_CMD) == 0) { + ASSERT(nsOptions->keyName); + if (!DynBuf_AppendString(&buf, "1") || + !DynBuf_AppendString(&buf, opCode) || + !DynBuf_AppendString(&buf, nsOptions->keyName) || + !DynBuf_AppendString(&buf, "") || // zero length for value to delete + !DynBuf_AppendString(&buf, nsOptions->oldValueToSet)) { + fprintf(stderr, "Could not construct request buffer\n"); + goto exit; + } + } + + if (nsOptions->verboseLogFlag) { + PrintInternalCommand(DynBuf_Get(&buf), DynBuf_GetSize(&buf)); + } + + status = RpcChannel_SendOneRaw(DynBuf_Get(&buf), + DynBuf_GetSize(&buf), &result, &resultLen); + if (!status) { + fprintf(stderr, "failure: %s\n", + result && *result ? result : "unknown"); + } else { + char *p = result; + if (resultLen == 0) { + if (nsOptions->verboseLogFlag) { + printf("success\n"); + } + } else { + if (nsOptions->verboseLogFlag) { + printf("success - result:"); + } + while (p < result + resultLen) { + printf("%s", p); + p += strlen(p) + 1; + } + } + fflush(stdout); + } + free( result); + + exit: + DynBuf_Destroy(&buf); + fflush(stderr); + g_free(keyValueData); + g_free(opCode); + return status; +} + + +/* + ****************************************************************************** + * PostVerifyGetValueOptions -- + * + * Post parse hook to verify namespace command get-value + * + * @param[in] context Unused. + * @param[in] group Unused. + * @param[in] data Unused. + * @param[out] error Setting error message to display in case of invalid + * command line options. + * + * @return TRUE if successful, FALSE if option is invalid. + * + ****************************************************************************** + */ + +static gboolean +PostVerifyGetValueOptions(GOptionContext *context, GOptionGroup *group, + gpointer data, GError **error) +{ + NamespaceOptionsState *nsOptions; + ASSERT(data); + nsOptions = (NamespaceOptionsState *) data; + if (nsOptions->cmdName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace command must be specified"); + return FALSE; + } + if (nsOptions->nsName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace name must be specified"); + return FALSE; + } + if (g_strcmp0(nsOptions->cmdName, NSDB_GET_VALUE_USER_CMD) == 0) { + if (nsOptions->keyName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Key name must be specified"); + return FALSE; + } + } + return TRUE; +} + + +/* + ****************************************************************************** + * PostVerifyDeleteKeyOptions -- + * + * Post parse hook to verify namespace command delete-key + * + * @param[in] context Unused. + * @param[in] group Unused. + * @param[in] data Unused. + * @param[out] error Setting error message to display in case of invalid + * command line options. + * + * @return TRUE if successful, FALSE if option is invalid. + * + ****************************************************************************** + */ + +static gboolean +PostVerifyDeleteKeyOptions(GOptionContext *context, GOptionGroup *group, + gpointer data, GError **error) +{ + NamespaceOptionsState *nsOptions; + ASSERT(data); + nsOptions = (NamespaceOptionsState *) data; + + if (nsOptions->cmdName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace command must be specified"); + return FALSE; + } + if (nsOptions->nsName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace name must be specified"); + return FALSE; + } + if (g_strcmp0(nsOptions->cmdName, NSDB_DEL_KEY_USER_CMD) == 0) { + if (nsOptions->keyName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Key name must be specified"); + return FALSE; + } + } + return TRUE; +} + + +/* + ****************************************************************************** + * PostVerifySetKeyOptions -- + * + * Post parse hook to verify namespace command set-key + * + * @param[in] context Unused. + * @param[in] group Unused. + * @param[in] data Unused. + * @param[out] error Setting error message to display in case of invalid + * command line options. + * + * @return TRUE if successful, FALSE if option is invalid. + * + ****************************************************************************** + */ + +static gboolean +PostVerifySetKeyOptions(GOptionContext *context, GOptionGroup *group, + gpointer data, GError **error) +{ + int usedOptions = 0; + NamespaceOptionsState *nsOptions; + ASSERT(data); + nsOptions = (NamespaceOptionsState *) data; + + if (nsOptions->cmdName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace command must be specified"); + return FALSE; + } + if (nsOptions->nsName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Namespace name must be specified"); + return FALSE; + } + if (g_strcmp0(nsOptions->cmdName, NSDB_SET_KEY_USER_CMD) == 0) { + if (nsOptions->keyName == NULL) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Key name must be specified"); + return FALSE; + } + if (nsOptions->valueToSet != NULL) { + ++usedOptions; + } + if (nsOptions->getValueFromFile != NULL) { + ++usedOptions; + } + if (nsOptions->standardInput == 1) { + ++usedOptions; + } + if ((usedOptions > 1) || (usedOptions == 0)) { + g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, + "Key value must be specified with either -f or -v or -s"); + return FALSE; + } + } + return TRUE; +} + + +/* + ****************************************************************************** + * main -- + * + * Main entry point. + * + * @param[in] argc Number of args. + * @param[in] argv The args. + * + ****************************************************************************** + */ + +int +main(int argc, char *argv[]) +{ + int success = -1; + GError *gErr = NULL; + gchar *descriptionBuf; + gchar *helpBuf; + GOptionContext *optCtx; + GOptionGroup *gr; + gchar *summary; + NamespaceOptionsState nsOptions = { NULL, NULL, NULL, NULL, "", + NULL, FALSE, FALSE}; + + //Options for namespacetool commands + + GOptionEntry mainEntry[] = { + { "verbose", 'V', 0, G_OPTION_ARG_NONE, &nsOptions.verboseLogFlag, + "Verbose logging mode", NULL }, + { NULL } + }; + GOptionEntry getValuesEntry[] = { + { "key", 'k', G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, &nsOptions.keyName, + "Key value to return", "" }, + { NULL } + }; + GOptionEntry setKeysEntry[] = { + { "key", 'k', G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, + &nsOptions.keyName, "Key name to use", "" }, + { "value", 'v', 0, G_OPTION_ARG_STRING, &nsOptions.valueToSet, + "Value to set", ""}, + { "oldValue", 'o', 0, G_OPTION_ARG_STRING, &nsOptions.oldValueToSet, + "Value must match with current key value in the " + "namespace for update operation to proceed", ""}, + { "fromFile", 'f', 0, G_OPTION_ARG_STRING, &nsOptions.getValueFromFile, + "Value to use from file path", ""}, + { "stdin", 's', 0, G_OPTION_ARG_NONE, &nsOptions.standardInput, + "Value to use from standard input", NULL}, + { NULL } + }; + GOptionEntry deleteKeyEntry[] = { + { "key", 'k', G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, + &nsOptions.keyName, "Key name to use", ""}, + { "oldValue", 'o', G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, + &nsOptions.oldValueToSet, + "Value must match with current key value in " + "the namespace for delete operation to proceed", ""}, + { NULL } + }; + + gAppName = g_path_get_basename(argv[0]); + g_set_prgname(gAppName); + + optCtx = g_option_context_new("[get-value | set-key | delete-key] " + "[]"); + + gr = g_option_group_new("namespace commands", "", "", optCtx, NULL); + g_option_group_add_entries(gr, mainEntry); + g_option_context_set_main_group(optCtx, gr); + + summary = g_strdup_printf("Example:\n %s set-key " + "-k -v \n %s set-key " + " -k -f " + "\n echo \"\" | %s set-key " + " -k -s\n %s " + "delete-key -k " + "\n %s get-value " + "-k \n", gAppName, + gAppName, gAppName, gAppName, gAppName); + g_option_context_set_summary(optCtx, summary); + + if (argc > 1) { + nsOptions.cmdName = g_strdup(argv[1]); + } + if (argc > 2) { + nsOptions.nsName = g_strdup(argv[2]); + } + //Namespacetool command - namespace-get-values + descriptionBuf = g_strdup_printf("%s command %s:", gAppName, + NSDB_GET_VALUE_USER_CMD); + helpBuf = g_strdup_printf("Show help for command \"%s\"", + NSDB_GET_VALUE_USER_CMD); + gr = g_option_group_new(NSDB_GET_VALUE_USER_CMD, descriptionBuf, + helpBuf, &nsOptions, NULL); + g_free(descriptionBuf); + g_free(helpBuf); + g_option_group_add_entries(gr, getValuesEntry); + g_option_context_add_group(optCtx, gr); + g_option_group_set_parse_hooks(gr, NULL, PostVerifyGetValueOptions); + + //Namespacetool command - namespace-set-keys + descriptionBuf = g_strdup_printf("%s command %s: - " + "Create or update key value pair\n", + gAppName, NSDB_SET_KEY_USER_CMD); + helpBuf = g_strdup_printf ("Show help for command \"%s\"", + NSDB_SET_KEY_USER_CMD); + + gr = g_option_group_new(NSDB_SET_KEY_USER_CMD, descriptionBuf, helpBuf, + &nsOptions, NULL); + g_free(descriptionBuf); + g_free(helpBuf); + g_option_group_add_entries(gr, setKeysEntry); + g_option_context_add_group(optCtx, gr); + g_option_group_set_parse_hooks(gr, NULL, PostVerifySetKeyOptions); + + //Namespacetool command - namespace-set-key for deleting key + descriptionBuf = g_strdup_printf("%s command %s:- Delete key value pair\n", + gAppName, NSDB_DEL_KEY_USER_CMD); + helpBuf = g_strdup_printf("Show help for command \"%s\"", + NSDB_DEL_KEY_USER_CMD); + + gr = g_option_group_new(NSDB_DEL_KEY_USER_CMD, descriptionBuf, helpBuf, + &nsOptions, NULL); + g_free(descriptionBuf); + g_free(helpBuf); + g_option_group_add_entries(gr, deleteKeyEntry); + g_option_context_add_group(optCtx, gr); + g_option_group_set_parse_hooks(gr, NULL, PostVerifyDeleteKeyOptions); + + if (!g_option_context_parse(optCtx, &argc, &argv, &gErr)) { + PrintUsage(optCtx); + fprintf(stderr, "%s: %s\n", gAppName, (gErr != NULL ? gErr->message : "")); + g_error_free(gErr); + goto exit; + } + + if (nsOptions.verboseLogFlag) { + VMTools_ConfigLogToStdio(gAppName); + } + + /* + * Validating namespace command name after g_context_parser + * because argv[1] can have string "--help" + */ + if (argc > 1 && ValidateNSCommands(nsOptions.cmdName) == FALSE) { + goto exit; + } + + success = RunNamespaceCommand(&nsOptions) ? 0 : 1; + + exit: + g_option_context_free(optCtx); + g_free(summary); + g_free(gAppName); + return success; +} diff --git a/open-vm-tools/rpctool/Makefile.am b/open-vm-tools/rpctool/Makefile.am index fd004b4f1..cb05cf8ae 100644 --- a/open-vm-tools/rpctool/Makefile.am +++ b/open-vm-tools/rpctool/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/rpctool/Makefile.in b/open-vm-tools/rpctool/Makefile.in deleted file mode 100644 index a6a320e53..000000000 --- a/open-vm-tools/rpctool/Makefile.in +++ /dev/null @@ -1,562 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-rpctool$(EXEEXT) -subdir = rpctool -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_rpctool_OBJECTS = rpctool.$(OBJEXT) -vmware_rpctool_OBJECTS = $(am_vmware_rpctool_OBJECTS) -vmware_rpctool_DEPENDENCIES = ../lib/rpcOut/libRpcOut.la \ - ../lib/message/libMessage.la ../lib/backdoor/libBackdoor.la \ - ../lib/string/libString.la -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_rpctool_SOURCES) -DIST_SOURCES = $(vmware_rpctool_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_rpctool_SOURCES = rpctool.c -vmware_rpctool_LDADD = ../lib/rpcOut/libRpcOut.la \ - ../lib/message/libMessage.la ../lib/backdoor/libBackdoor.la \ - ../lib/string/libString.la -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu rpctool/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu rpctool/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-rpctool$(EXEEXT): $(vmware_rpctool_OBJECTS) $(vmware_rpctool_DEPENDENCIES) - @rm -f vmware-rpctool$(EXEEXT) - $(LINK) $(vmware_rpctool_OBJECTS) $(vmware_rpctool_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpctool.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/rpctool/rpctool.c b/open-vm-tools/rpctool/rpctool.c index bef0c8292..f15289484 100644 --- a/open-vm-tools/rpctool/rpctool.c +++ b/open-vm-tools/rpctool/rpctool.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2002-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2002-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/scripts/Makefile.in b/open-vm-tools/scripts/Makefile.in deleted file mode 100644 index 2e813d777..000000000 --- a/open-vm-tools/scripts/Makefile.in +++ /dev/null @@ -1,463 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_GRABBITMQPROXY_TRUE@am__append_1 = ./common/guestproxy-ssl.conf -subdir = scripts -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(confdir)" "$(DESTDIR)$(vmwsrcdir)" -confSCRIPT_INSTALL = $(INSTALL_SCRIPT) -vmwsrcSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(conf_SCRIPTS) $(vmwsrc_SCRIPTS) -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -defaultscripts = poweron-vm-default poweroff-vm-default \ - suspend-vm-default resume-vm-default -confdir = /etc/vmware-tools -conf_SCRIPTS = ./common/vm-support ./common/statechange.subr \ - $(am__append_1) $(defaultscripts) -vmwsrcdir = $(confdir)/scripts/vmware -vmwsrc_SCRIPTS = $(MODULES_OS)/network -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu scripts/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-confSCRIPTS: $(conf_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(confdir)" || $(MKDIR_P) "$(DESTDIR)$(confdir)" - @list='$(conf_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(confSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(confdir)/$$f'"; \ - $(confSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(confdir)/$$f"; \ - else :; fi; \ - done - -uninstall-confSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(conf_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(confdir)/$$f'"; \ - rm -f "$(DESTDIR)$(confdir)/$$f"; \ - done -install-vmwsrcSCRIPTS: $(vmwsrc_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(vmwsrcdir)" || $(MKDIR_P) "$(DESTDIR)$(vmwsrcdir)" - @list='$(vmwsrc_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(vmwsrcSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(vmwsrcdir)/$$f'"; \ - $(vmwsrcSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(vmwsrcdir)/$$f"; \ - else :; fi; \ - done - -uninstall-vmwsrcSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(vmwsrc_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(vmwsrcdir)/$$f'"; \ - rm -f "$(DESTDIR)$(vmwsrcdir)/$$f"; \ - done - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(SCRIPTS) -installdirs: - for dir in "$(DESTDIR)$(confdir)" "$(DESTDIR)$(vmwsrcdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-confSCRIPTS install-vmwsrcSCRIPTS - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-confSCRIPTS uninstall-vmwsrcSCRIPTS - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-confSCRIPTS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip install-vmwsrcSCRIPTS installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-confSCRIPTS uninstall-vmwsrcSCRIPTS - - -$(defaultscripts): $(top_srcdir)/scripts/common/statechange.sh - cp $(top_srcdir)/scripts/common/statechange.sh $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/scripts/build/instvmsg.sh b/open-vm-tools/scripts/build/instvmsg.sh index 45c51b068..7c829a25d 100644 --- a/open-vm-tools/scripts/build/instvmsg.sh +++ b/open-vm-tools/scripts/build/instvmsg.sh @@ -1,6 +1,6 @@ #!/bin/sh ################################################################################ -### Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2011-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/scripts/build/rpcgen_wrapper.sh.in b/open-vm-tools/scripts/build/rpcgen_wrapper.sh.in index 36a2fbd90..fae0a8bb0 100644 --- a/open-vm-tools/scripts/build/rpcgen_wrapper.sh.in +++ b/open-vm-tools/scripts/build/rpcgen_wrapper.sh.in @@ -1,6 +1,6 @@ #!/bin/sh ################################################################################ -### Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2011-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/scripts/common/statechange.sh b/open-vm-tools/scripts/common/statechange.sh index 68088d3bf..39df65796 100644 --- a/open-vm-tools/scripts/common/statechange.sh +++ b/open-vm-tools/scripts/common/statechange.sh @@ -1,6 +1,6 @@ #!/bin/sh ########################################################## -# Copyright (C) 2010-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2010-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/scripts/common/statechange.subr b/open-vm-tools/scripts/common/statechange.subr index 9e6550d76..8005f7d4f 100644 --- a/open-vm-tools/scripts/common/statechange.subr +++ b/open-vm-tools/scripts/common/statechange.subr @@ -1,6 +1,6 @@ #!/bin/sh ########################################################## -# Copyright (C) 2010-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2010-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/scripts/common/vm-support b/open-vm-tools/scripts/common/vm-support index a16320e16..62634be22 100644 --- a/open-vm-tools/scripts/common/vm-support +++ b/open-vm-tools/scripts/common/vm-support @@ -1,6 +1,6 @@ #!/bin/sh ########################################################## -# Copyright (C) 2006-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2006-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/scripts/freebsd/network b/open-vm-tools/scripts/freebsd/network index b841739f2..47a98fd66 100644 --- a/open-vm-tools/scripts/freebsd/network +++ b/open-vm-tools/scripts/freebsd/network @@ -1,6 +1,6 @@ #!/bin/sh ########################################################## -# Copyright (C) 2010-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2010-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/scripts/linux/network b/open-vm-tools/scripts/linux/network index d9142a7a0..93a5a08af 100644 --- a/open-vm-tools/scripts/linux/network +++ b/open-vm-tools/scripts/linux/network @@ -1,6 +1,6 @@ #!/bin/sh ########################################################## -# Copyright (C) 2001-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2001-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published @@ -330,9 +330,11 @@ save_active_NIC_list() >$activeList - # Find out all the non-loopback up interfaces. Use ifconfig if available - # otherwise fall back to the ip command. - if [ -z "$ifconfig_cmd" ]; then + # Find out all the non-loopback up interfaces. Use ip if available + # otherwise fall back to the ifconfig command. + # ifconfig is buggy on some platforms and truncates long + # network names + if [ -n "$ip_cmd" ]; then for nic in $($ip_cmd link show up | egrep '\bUP\b' | awk -F: '{print $2}'); do $ip_cmd link show ${nic%@*} | grep -iq 'link/ether' && echo ${nic%@*} >> $activeList done @@ -363,7 +365,7 @@ rescue_NIC() if [ -f "$activeList" ]; then while read nic; do - if [ -z "$ifconfig_cmd" ]; then + if [ -n "$ip_cmd" ]; then intf_out=$($ip_cmd link show $nic up) else intf_out=$($ifconfig_cmd $nic) diff --git a/open-vm-tools/scripts/linux/pam.d/vmtoolsd b/open-vm-tools/scripts/linux/pam.d/vmtoolsd index eb0599db0..1c860ac11 100644 --- a/open-vm-tools/scripts/linux/pam.d/vmtoolsd +++ b/open-vm-tools/scripts/linux/pam.d/vmtoolsd @@ -1,7 +1,7 @@ #%PAM-1.0 -auth sufficient pam_unix2.so +auth required pam_shells.so auth sufficient pam_unix.so shadow auth required pam_unix_auth.so shadow -account sufficient pam_unix2.so +account required pam_shells.so account sufficient pam_unix.so account required pam_unix_acct.so diff --git a/open-vm-tools/scripts/solaris/network b/open-vm-tools/scripts/solaris/network index 777daa5f8..1e355a2df 100644 --- a/open-vm-tools/scripts/solaris/network +++ b/open-vm-tools/scripts/solaris/network @@ -1,6 +1,6 @@ #!/bin/sh ########################################################## -# Copyright (C) 2006-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2006-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/Makefile.am b/open-vm-tools/services/Makefile.am index 95f7927f6..ff127916b 100644 --- a/open-vm-tools/services/Makefile.am +++ b/open-vm-tools/services/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/Makefile.in b/open-vm-tools/services/Makefile.in deleted file mode 100644 index 282d9e086..000000000 --- a/open-vm-tools/services/Makefile.in +++ /dev/null @@ -1,581 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = vmtoolsd plugins -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/Makefile.am b/open-vm-tools/services/plugins/Makefile.am index 15f3fa83c..5d757185d 100644 --- a/open-vm-tools/services/plugins/Makefile.am +++ b/open-vm-tools/services/plugins/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/Makefile.in b/open-vm-tools/services/plugins/Makefile.in deleted file mode 100644 index d394536fa..000000000 --- a/open-vm-tools/services/plugins/Makefile.in +++ /dev/null @@ -1,601 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_X11_TRUE@am__append_1 = desktopEvents -@HAVE_GTKMM_TRUE@am__append_2 = dndcp -@ENABLE_GRABBITMQPROXY_TRUE@am__append_3 = grabbitmqProxy -@ENABLE_DEPLOYPKG_TRUE@am__append_4 = deployPkg -@HAVE_X11_TRUE@am__append_5 = resolutionSet -subdir = services/plugins -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = desktopEvents dndcp grabbitmqProxy guestInfo hgfsServer \ - powerOps deployPkg resolutionSet timeSync vix vmbackup -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) guestInfo \ - hgfsServer powerOps $(am__append_4) $(am__append_5) timeSync \ - vix vmbackup -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: install-exec-local - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-local install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am - - -# -# plugin_LTLIBRARIES causes both .la and .so files to be installed to the -# plugin directories. Clean up the .la files and keep just the shared -# libraries around. Sometimes, even though we're passing "-shared" to -# libtool, .a files are also generated, so clean up those too. -# -install-exec-local: - rm -f $(DESTDIR)$(VMSVC_PLUGIN_INSTALLDIR)/*.a - rm -f $(DESTDIR)$(VMSVC_PLUGIN_INSTALLDIR)/*.la - rm -f $(DESTDIR)$(VMUSR_PLUGIN_INSTALLDIR)/*.a - rm -f $(DESTDIR)$(VMUSR_PLUGIN_INSTALLDIR)/*.la -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/deployPkg/Makefile.am b/open-vm-tools/services/plugins/deployPkg/Makefile.am index 7e9c48c02..6f6873cde 100644 --- a/open-vm-tools/services/plugins/deployPkg/Makefile.am +++ b/open-vm-tools/services/plugins/deployPkg/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2014-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/deployPkg/Makefile.in b/open-vm-tools/services/plugins/deployPkg/Makefile.in deleted file mode 100644 index f0042f9e7..000000000 --- a/open-vm-tools/services/plugins/deployPkg/Makefile.in +++ /dev/null @@ -1,712 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/deployPkg -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libdeployPkgPlugin_la_DEPENDENCIES = \ - $(top_builddir)/libDeployPkg/libDeployPkg.la -am_libdeployPkgPlugin_la_OBJECTS = libdeployPkgPlugin_la-deployPkg.lo \ - libdeployPkgPlugin_la-deployPkgLog.lo \ - libdeployPkgPlugin_la-deployPkgPlugin.lo -libdeployPkgPlugin_la_OBJECTS = $(am_libdeployPkgPlugin_la_OBJECTS) -libdeployPkgPlugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libdeployPkgPlugin_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libdeployPkgPlugin_la_SOURCES) -DIST_SOURCES = $(libdeployPkgPlugin_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libdeployPkgPlugin.la -libdeployPkgPlugin_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libdeployPkgPlugin_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libdeployPkgPlugin_la_LIBADD = @VMTOOLS_LIBS@ \ - $(top_builddir)/libDeployPkg/libDeployPkg.la -libdeployPkgPlugin_la_SOURCES = deployPkg.c deployPkgInt.h \ - deployPkgLog.c deployPkgPlugin.c -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/deployPkg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/deployPkg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libdeployPkgPlugin.la: $(libdeployPkgPlugin_la_OBJECTS) $(libdeployPkgPlugin_la_DEPENDENCIES) - $(libdeployPkgPlugin_la_LINK) -rpath $(plugindir) $(libdeployPkgPlugin_la_OBJECTS) $(libdeployPkgPlugin_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeployPkgPlugin_la-deployPkg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeployPkgPlugin_la-deployPkgLog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeployPkgPlugin_la-deployPkgPlugin.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libdeployPkgPlugin_la-deployPkg.lo: deployPkg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdeployPkgPlugin_la-deployPkg.lo -MD -MP -MF $(DEPDIR)/libdeployPkgPlugin_la-deployPkg.Tpo -c -o libdeployPkgPlugin_la-deployPkg.lo `test -f 'deployPkg.c' || echo '$(srcdir)/'`deployPkg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdeployPkgPlugin_la-deployPkg.Tpo $(DEPDIR)/libdeployPkgPlugin_la-deployPkg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='deployPkg.c' object='libdeployPkgPlugin_la-deployPkg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdeployPkgPlugin_la-deployPkg.lo `test -f 'deployPkg.c' || echo '$(srcdir)/'`deployPkg.c - -libdeployPkgPlugin_la-deployPkgLog.lo: deployPkgLog.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdeployPkgPlugin_la-deployPkgLog.lo -MD -MP -MF $(DEPDIR)/libdeployPkgPlugin_la-deployPkgLog.Tpo -c -o libdeployPkgPlugin_la-deployPkgLog.lo `test -f 'deployPkgLog.c' || echo '$(srcdir)/'`deployPkgLog.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdeployPkgPlugin_la-deployPkgLog.Tpo $(DEPDIR)/libdeployPkgPlugin_la-deployPkgLog.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='deployPkgLog.c' object='libdeployPkgPlugin_la-deployPkgLog.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdeployPkgPlugin_la-deployPkgLog.lo `test -f 'deployPkgLog.c' || echo '$(srcdir)/'`deployPkgLog.c - -libdeployPkgPlugin_la-deployPkgPlugin.lo: deployPkgPlugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdeployPkgPlugin_la-deployPkgPlugin.lo -MD -MP -MF $(DEPDIR)/libdeployPkgPlugin_la-deployPkgPlugin.Tpo -c -o libdeployPkgPlugin_la-deployPkgPlugin.lo `test -f 'deployPkgPlugin.c' || echo '$(srcdir)/'`deployPkgPlugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdeployPkgPlugin_la-deployPkgPlugin.Tpo $(DEPDIR)/libdeployPkgPlugin_la-deployPkgPlugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='deployPkgPlugin.c' object='libdeployPkgPlugin_la-deployPkgPlugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdeployPkgPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdeployPkgPlugin_la-deployPkgPlugin.lo `test -f 'deployPkgPlugin.c' || echo '$(srcdir)/'`deployPkgPlugin.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-pluginLTLIBRARIES ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/deployPkg/deployPkg.c b/open-vm-tools/services/plugins/deployPkg/deployPkg.c index 60c08cdae..add51252a 100644 --- a/open-vm-tools/services/plugins/deployPkg/deployPkg.c +++ b/open-vm-tools/services/plugins/deployPkg/deployPkg.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/deployPkg/deployPkgInt.h b/open-vm-tools/services/plugins/deployPkg/deployPkgInt.h index 58b952ec2..8b9c5269c 100644 --- a/open-vm-tools/services/plugins/deployPkg/deployPkgInt.h +++ b/open-vm-tools/services/plugins/deployPkg/deployPkgInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/deployPkg/deployPkgLog.c b/open-vm-tools/services/plugins/deployPkg/deployPkgLog.c index dea4158e5..a70762a38 100644 --- a/open-vm-tools/services/plugins/deployPkg/deployPkgLog.c +++ b/open-vm-tools/services/plugins/deployPkg/deployPkgLog.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/deployPkg/deployPkgPlugin.c b/open-vm-tools/services/plugins/deployPkg/deployPkgPlugin.c index 03e365d22..fb1d2be2f 100644 --- a/open-vm-tools/services/plugins/deployPkg/deployPkgPlugin.c +++ b/open-vm-tools/services/plugins/deployPkg/deployPkgPlugin.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/desktopEvents/Makefile.am b/open-vm-tools/services/plugins/desktopEvents/Makefile.am index ce9848785..97f02fde3 100644 --- a/open-vm-tools/services/plugins/desktopEvents/Makefile.am +++ b/open-vm-tools/services/plugins/desktopEvents/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2010-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/desktopEvents/Makefile.in b/open-vm-tools/services/plugins/desktopEvents/Makefile.in deleted file mode 100644 index ede911520..000000000 --- a/open-vm-tools/services/plugins/desktopEvents/Makefile.in +++ /dev/null @@ -1,643 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2010-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_XSM_TRUE@am__append_1 = @XSM_LIBS@ -@HAVE_XSM_TRUE@am__append_2 = sessionMgr.c sessionMgrSignals.c -subdir = services/plugins/desktopEvents -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -am__DEPENDENCIES_1 = -libdesktopEvents_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__libdesktopEvents_la_SOURCES_DIST = desktopEvents.c reload.c \ - x11Lock.c xioError.c sessionMgr.c sessionMgrSignals.c -@HAVE_XSM_TRUE@am__objects_1 = libdesktopEvents_la-sessionMgr.lo \ -@HAVE_XSM_TRUE@ libdesktopEvents_la-sessionMgrSignals.lo -am_libdesktopEvents_la_OBJECTS = libdesktopEvents_la-desktopEvents.lo \ - libdesktopEvents_la-reload.lo libdesktopEvents_la-x11Lock.lo \ - libdesktopEvents_la-xioError.lo $(am__objects_1) -libdesktopEvents_la_OBJECTS = $(am_libdesktopEvents_la_OBJECTS) -libdesktopEvents_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libdesktopEvents_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libdesktopEvents_la_SOURCES) -DIST_SOURCES = $(am__libdesktopEvents_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMUSR_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libdesktopEvents.la -libdesktopEvents_la_CPPFLAGS = @GTK_CPPFLAGS@ @PLUGIN_CPPFLAGS@ -libdesktopEvents_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libdesktopEvents_la_LIBADD = @COMMON_XLIBS@ @GTK_LIBS@ @VMTOOLS_LIBS@ \ - $(am__append_1) -libdesktopEvents_la_SOURCES = desktopEvents.c reload.c x11Lock.c \ - xioError.c $(am__append_2) -@HAVE_XSM_TRUE@BUILT_SOURCES = sessionMgrSignals.c sessionMgrSignals.h -@HAVE_XSM_TRUE@CLEANFILES = sessionMgrSignals.c sessionMgrSignals.h -@HAVE_XSM_TRUE@EXTRA_DIST = sessionMgrSignals.gm -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/desktopEvents/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/desktopEvents/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libdesktopEvents.la: $(libdesktopEvents_la_OBJECTS) $(libdesktopEvents_la_DEPENDENCIES) - $(libdesktopEvents_la_LINK) -rpath $(plugindir) $(libdesktopEvents_la_OBJECTS) $(libdesktopEvents_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-desktopEvents.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-reload.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-sessionMgr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-sessionMgrSignals.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-x11Lock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdesktopEvents_la-xioError.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libdesktopEvents_la-desktopEvents.lo: desktopEvents.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-desktopEvents.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-desktopEvents.Tpo -c -o libdesktopEvents_la-desktopEvents.lo `test -f 'desktopEvents.c' || echo '$(srcdir)/'`desktopEvents.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-desktopEvents.Tpo $(DEPDIR)/libdesktopEvents_la-desktopEvents.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='desktopEvents.c' object='libdesktopEvents_la-desktopEvents.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-desktopEvents.lo `test -f 'desktopEvents.c' || echo '$(srcdir)/'`desktopEvents.c - -libdesktopEvents_la-reload.lo: reload.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-reload.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-reload.Tpo -c -o libdesktopEvents_la-reload.lo `test -f 'reload.c' || echo '$(srcdir)/'`reload.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-reload.Tpo $(DEPDIR)/libdesktopEvents_la-reload.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='reload.c' object='libdesktopEvents_la-reload.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-reload.lo `test -f 'reload.c' || echo '$(srcdir)/'`reload.c - -libdesktopEvents_la-x11Lock.lo: x11Lock.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-x11Lock.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-x11Lock.Tpo -c -o libdesktopEvents_la-x11Lock.lo `test -f 'x11Lock.c' || echo '$(srcdir)/'`x11Lock.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-x11Lock.Tpo $(DEPDIR)/libdesktopEvents_la-x11Lock.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='x11Lock.c' object='libdesktopEvents_la-x11Lock.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-x11Lock.lo `test -f 'x11Lock.c' || echo '$(srcdir)/'`x11Lock.c - -libdesktopEvents_la-xioError.lo: xioError.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-xioError.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-xioError.Tpo -c -o libdesktopEvents_la-xioError.lo `test -f 'xioError.c' || echo '$(srcdir)/'`xioError.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-xioError.Tpo $(DEPDIR)/libdesktopEvents_la-xioError.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xioError.c' object='libdesktopEvents_la-xioError.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-xioError.lo `test -f 'xioError.c' || echo '$(srcdir)/'`xioError.c - -libdesktopEvents_la-sessionMgr.lo: sessionMgr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-sessionMgr.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-sessionMgr.Tpo -c -o libdesktopEvents_la-sessionMgr.lo `test -f 'sessionMgr.c' || echo '$(srcdir)/'`sessionMgr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-sessionMgr.Tpo $(DEPDIR)/libdesktopEvents_la-sessionMgr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sessionMgr.c' object='libdesktopEvents_la-sessionMgr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-sessionMgr.lo `test -f 'sessionMgr.c' || echo '$(srcdir)/'`sessionMgr.c - -libdesktopEvents_la-sessionMgrSignals.lo: sessionMgrSignals.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdesktopEvents_la-sessionMgrSignals.lo -MD -MP -MF $(DEPDIR)/libdesktopEvents_la-sessionMgrSignals.Tpo -c -o libdesktopEvents_la-sessionMgrSignals.lo `test -f 'sessionMgrSignals.c' || echo '$(srcdir)/'`sessionMgrSignals.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdesktopEvents_la-sessionMgrSignals.Tpo $(DEPDIR)/libdesktopEvents_la-sessionMgrSignals.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sessionMgrSignals.c' object='libdesktopEvents_la-sessionMgrSignals.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdesktopEvents_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdesktopEvents_la-sessionMgrSignals.lo `test -f 'sessionMgrSignals.c' || echo '$(srcdir)/'`sessionMgrSignals.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -@HAVE_XSM_TRUE@sessionMgrSignals.c: $(top_srcdir)/services/plugins/desktopEvents/sessionMgrSignals.gm -@HAVE_XSM_TRUE@ glib-genmarshal --body $(top_srcdir)/services/plugins/desktopEvents/sessionMgrSignals.gm > \ -@HAVE_XSM_TRUE@ $@ || (rm -f $@ && exit 1) - -@HAVE_XSM_TRUE@sessionMgrSignals.h: $(top_srcdir)/services/plugins/desktopEvents/sessionMgrSignals.gm -@HAVE_XSM_TRUE@ glib-genmarshal --header $(top_srcdir)/services/plugins/desktopEvents/sessionMgrSignals.gm > \ -@HAVE_XSM_TRUE@ $@ || (rm -f $@ && exit 1) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/desktopEvents/deFeatures.h b/open-vm-tools/services/plugins/desktopEvents/deFeatures.h index 9d1fe5ae3..ba4fda5a5 100644 --- a/open-vm-tools/services/plugins/desktopEvents/deFeatures.h +++ b/open-vm-tools/services/plugins/desktopEvents/deFeatures.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/desktopEvents/desktopEvents.c b/open-vm-tools/services/plugins/desktopEvents/desktopEvents.c index 76db88250..b32c98021 100644 --- a/open-vm-tools/services/plugins/desktopEvents/desktopEvents.c +++ b/open-vm-tools/services/plugins/desktopEvents/desktopEvents.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/desktopEvents/desktopEventsInt.h b/open-vm-tools/services/plugins/desktopEvents/desktopEventsInt.h index f5a96a12d..4609e4728 100644 --- a/open-vm-tools/services/plugins/desktopEvents/desktopEventsInt.h +++ b/open-vm-tools/services/plugins/desktopEvents/desktopEventsInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/desktopEvents/reload.c b/open-vm-tools/services/plugins/desktopEvents/reload.c index 3074038a8..7c648ad95 100644 --- a/open-vm-tools/services/plugins/desktopEvents/reload.c +++ b/open-vm-tools/services/plugins/desktopEvents/reload.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/desktopEvents/sessionMgr.c b/open-vm-tools/services/plugins/desktopEvents/sessionMgr.c index dfae2ef88..928d0ceff 100644 --- a/open-vm-tools/services/plugins/desktopEvents/sessionMgr.c +++ b/open-vm-tools/services/plugins/desktopEvents/sessionMgr.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/desktopEvents/sessionMgrSignals.gm b/open-vm-tools/services/plugins/desktopEvents/sessionMgrSignals.gm index 8e77e825c..7cf902956 100644 --- a/open-vm-tools/services/plugins/desktopEvents/sessionMgrSignals.gm +++ b/open-vm-tools/services/plugins/desktopEvents/sessionMgrSignals.gm @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/desktopEvents/x11Lock.c b/open-vm-tools/services/plugins/desktopEvents/x11Lock.c index b70f5915b..572234ac1 100644 --- a/open-vm-tools/services/plugins/desktopEvents/x11Lock.c +++ b/open-vm-tools/services/plugins/desktopEvents/x11Lock.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -82,14 +82,14 @@ InitGroupLeader(Window *groupLeader, gdkDisplay = gdk_display_get_default(); gdkLeader = gdk_display_get_default_group(gdkDisplay); - myGroupLeader = GDK_WINDOW_XWINDOW(gdkLeader); + myGroupLeader = GDK_WINDOW_XID(gdkLeader); myRootWindow = GDK_ROOT_WINDOW(); ASSERT(myGroupLeader); ASSERT(myRootWindow); /* XXX: With g_set_prgname() being called, this can probably go away. */ - XStoreName(GDK_DISPLAY(), myGroupLeader, VMUSER_TITLE); + XStoreName(gdk_x11_get_default_xdisplay(), myGroupLeader, VMUSER_TITLE); /* * Sanity check: Set the override redirect property on our group leader @@ -97,10 +97,10 @@ InitGroupLeader(Window *groupLeader, * This makes sure that (a) a window manager can't re-parent our window, * and (b) that we remain a top-level window. */ - XChangeWindowAttributes(GDK_DISPLAY(), myGroupLeader, CWOverrideRedirect, + XChangeWindowAttributes(gdk_x11_get_default_xdisplay(), myGroupLeader, CWOverrideRedirect, &attr); - XReparentWindow(GDK_DISPLAY(), myGroupLeader, myRootWindow, 10, 10); - XSync(GDK_DISPLAY(), FALSE); + XReparentWindow(gdk_x11_get_default_xdisplay(), myGroupLeader, myRootWindow, 10, 10); + XSync(gdk_x11_get_default_xdisplay(), FALSE); *groupLeader = myGroupLeader; *rootWindow = myRootWindow; @@ -216,7 +216,7 @@ AcquireDisplayLock(void) Bool alreadyLocked = FALSE; // Set to TRUE if we discover lock is held. Bool retval = FALSE; - defaultDisplay = GDK_DISPLAY(); + defaultDisplay = gdk_x11_get_default_xdisplay(); /* * Reset some of our main window's settings & fetch Xlib handles for diff --git a/open-vm-tools/services/plugins/desktopEvents/xioError.c b/open-vm-tools/services/plugins/desktopEvents/xioError.c index 5eaa92c0b..b7b637685 100644 --- a/open-vm-tools/services/plugins/desktopEvents/xioError.c +++ b/open-vm-tools/services/plugins/desktopEvents/xioError.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/Makefile.am b/open-vm-tools/services/plugins/dndcp/Makefile.am index 37e23c8ae..d1543054c 100644 --- a/open-vm-tools/services/plugins/dndcp/Makefile.am +++ b/open-vm-tools/services/plugins/dndcp/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -15,18 +15,25 @@ ### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ################################################################################ +AUTOMAKE_OPTIONS = subdir-objects + plugindir = @VMUSR_PLUGIN_INSTALLDIR@ plugin_LTLIBRARIES = libdndcp.la libdndcp_la_CPPFLAGS = libdndcp_la_CPPFLAGS += @GTK_CPPFLAGS@ -libdndcp_la_CPPFLAGS += @GTKMM_CPPFLAGS@ libdndcp_la_CPPFLAGS += @PLUGIN_CPPFLAGS@ libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/dnd libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/dndGuest libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/stringxx libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/xutils -libdndcp_la_CPPFLAGS += -I$(top_builddir)/include +libdndcp_la_CPPFLAGS += -I$(top_srcdir)/include + +# Passing C++ related flags to CPPFLAGS generates error. +# So, we need to pass these to C++ compilation only. +libdndcp_la_CXXFLAGS = +libdndcp_la_CXXFLAGS += @SIGCXX_CPPFLAGS@ +libdndcp_la_CXXFLAGS += @GTKMM_CPPFLAGS@ libdndcp_la_LDFLAGS = libdndcp_la_LDFLAGS += @PLUGIN_LDFLAGS@ @@ -37,6 +44,7 @@ libdndcp_la_LIBADD += @GTK_LIBS@ libdndcp_la_LIBADD += @GTKMM_LIBS@ libdndcp_la_LIBADD += @VMTOOLS_LIBS@ libdndcp_la_LIBADD += @HGFS_LIBS@ +libdndcp_la_LIBADD += $(top_builddir)/lib/hgfsUri/hgfsUriPosix.lo libdndcp_la_SOURCES = @@ -77,6 +85,11 @@ libdndcp_la_SOURCES += dndcp.cpp libdndcp_la_SOURCES += dragDetWndX11.cpp libdndcp_la_SOURCES += pointer.cpp +if HAVE_MKDTEMP +libdndcp_la_CPPFLAGS += -DDND_IS_XDG +libdndcp_la_SOURCES += dnd/dndXdg.c +endif + BUILT_SOURCES = BUILT_SOURCES += cpFileContents.h BUILT_SOURCES += cpFileContents_xdr.c @@ -91,5 +104,3 @@ cpFileContents.h: cpFileContents.x cpFileContents_xdr.c: cpFileContents.x cpFileContents.h @RPCGEN_WRAPPER@ services/plugins/dndcp/cpFileContents.x $@ - - diff --git a/open-vm-tools/services/plugins/dndcp/Makefile.in b/open-vm-tools/services/plugins/dndcp/Makefile.in deleted file mode 100644 index 344d537cc..000000000 --- a/open-vm-tools/services/plugins/dndcp/Makefile.in +++ /dev/null @@ -1,943 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/dndcp -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libdndcp_la_DEPENDENCIES = -am_libdndcp_la_OBJECTS = libdndcp_la-dndClipboard.lo \ - libdndcp_la-dndCommon.lo libdndcp_la-dndCPMsgV4.lo \ - libdndcp_la-dndLinux.lo libdndcp_la-dndMsg.lo \ - libdndcp_la-copyPasteRpcV3.lo libdndcp_la-dndFileList.lo \ - libdndcp_la-dndRpcV3.lo libdndcp_la-guestCopyPasteDest.lo \ - libdndcp_la-guestCopyPasteMgr.lo \ - libdndcp_la-guestCopyPasteSrc.lo libdndcp_la-guestDnDCPMgr.lo \ - libdndcp_la-guestDnDDest.lo libdndcp_la-guestDnDMgr.lo \ - libdndcp_la-guestDnDSrc.lo libdndcp_la-guestFileTransfer.lo \ - libdndcp_la-copyPasteRpcV4.lo libdndcp_la-dndRpcV4.lo \ - libdndcp_la-fileTransferRpcV4.lo libdndcp_la-rpcV3Util.lo \ - libdndcp_la-rpcV4Util.lo libdndcp_la-dndCPTransportGuestRpc.lo \ - libdndcp_la-string.lo libdndcp_la-xutils.lo \ - libdndcp_la-copyPasteCompat.lo \ - libdndcp_la-copyPasteCompatX11.lo \ - libdndcp_la-copyPasteDnDWrapper.lo \ - libdndcp_la-copyPasteDnDX11.lo libdndcp_la-copyPasteUIX11.lo \ - libdndcp_la-dndUIX11.lo libdndcp_la-dndcp.lo \ - libdndcp_la-dragDetWndX11.lo libdndcp_la-pointer.lo \ - libdndcp_la-cpFileContents_xdr.lo -libdndcp_la_OBJECTS = $(am_libdndcp_la_OBJECTS) -libdndcp_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libdndcp_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libdndcp_la_SOURCES) -DIST_SOURCES = $(libdndcp_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMUSR_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libdndcp.la -libdndcp_la_CPPFLAGS = @GTK_CPPFLAGS@ @GTKMM_CPPFLAGS@ \ - @PLUGIN_CPPFLAGS@ -I$(top_srcdir)/services/plugins/dndcp/dnd \ - -I$(top_srcdir)/services/plugins/dndcp/dndGuest \ - -I$(top_srcdir)/services/plugins/dndcp/stringxx \ - -I$(top_srcdir)/services/plugins/dndcp/xutils \ - -I$(top_builddir)/include -libdndcp_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libdndcp_la_LIBADD = @COMMON_XLIBS@ @GTK_LIBS@ @GTKMM_LIBS@ \ - @VMTOOLS_LIBS@ @HGFS_LIBS@ $(am__empty) -libdndcp_la_SOURCES = dnd/dndClipboard.c dnd/dndCommon.c \ - dnd/dndCPMsgV4.c dnd/dndLinux.c dnd/dndMsg.c \ - dndGuest/copyPasteRpcV3.cc dndGuest/dndFileList.cc \ - dndGuest/dndRpcV3.cc dndGuest/guestCopyPasteDest.cc \ - dndGuest/guestCopyPasteMgr.cc dndGuest/guestCopyPasteSrc.cc \ - dndGuest/guestDnDCPMgr.cc dndGuest/guestDnDDest.cc \ - dndGuest/guestDnDMgr.cc dndGuest/guestDnDSrc.cc \ - dndGuest/guestFileTransfer.cc dndGuest/copyPasteRpcV4.cc \ - dndGuest/dndRpcV4.cc dndGuest/fileTransferRpcV4.cc \ - dndGuest/rpcV3Util.cpp dndGuest/rpcV4Util.cpp \ - dndGuest/dndCPTransportGuestRpc.cpp stringxx/string.cc \ - xutils/xutils.cc copyPasteCompat.c copyPasteCompatX11.c \ - copyPasteDnDWrapper.cpp copyPasteDnDX11.cpp copyPasteUIX11.cpp \ - dndUIX11.cpp dndcp.cpp dragDetWndX11.cpp pointer.cpp \ - cpFileContents_xdr.c -BUILT_SOURCES = cpFileContents.h cpFileContents_xdr.c -CLEANFILES = $(BUILT_SOURCES) -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .cc .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/dndcp/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/dndcp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libdndcp.la: $(libdndcp_la_OBJECTS) $(libdndcp_la_DEPENDENCIES) - $(libdndcp_la_LINK) -rpath $(plugindir) $(libdndcp_la_OBJECTS) $(libdndcp_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteCompat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteCompatX11.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteDnDWrapper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteDnDX11.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteRpcV3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteRpcV4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-copyPasteUIX11.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-cpFileContents_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndCPMsgV4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndCPTransportGuestRpc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndClipboard.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndCommon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndFileList.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndMsg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndRpcV3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndRpcV4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndUIX11.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dndcp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-dragDetWndX11.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-fileTransferRpcV4.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestCopyPasteDest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestCopyPasteMgr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestCopyPasteSrc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestDnDCPMgr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestDnDDest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestDnDMgr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestDnDSrc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-guestFileTransfer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-pointer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-rpcV3Util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-rpcV4Util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-string.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdndcp_la-xutils.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libdndcp_la-dndClipboard.lo: dnd/dndClipboard.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-dndClipboard.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndClipboard.Tpo -c -o libdndcp_la-dndClipboard.lo `test -f 'dnd/dndClipboard.c' || echo '$(srcdir)/'`dnd/dndClipboard.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndClipboard.Tpo $(DEPDIR)/libdndcp_la-dndClipboard.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dnd/dndClipboard.c' object='libdndcp_la-dndClipboard.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-dndClipboard.lo `test -f 'dnd/dndClipboard.c' || echo '$(srcdir)/'`dnd/dndClipboard.c - -libdndcp_la-dndCommon.lo: dnd/dndCommon.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-dndCommon.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndCommon.Tpo -c -o libdndcp_la-dndCommon.lo `test -f 'dnd/dndCommon.c' || echo '$(srcdir)/'`dnd/dndCommon.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndCommon.Tpo $(DEPDIR)/libdndcp_la-dndCommon.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dnd/dndCommon.c' object='libdndcp_la-dndCommon.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-dndCommon.lo `test -f 'dnd/dndCommon.c' || echo '$(srcdir)/'`dnd/dndCommon.c - -libdndcp_la-dndCPMsgV4.lo: dnd/dndCPMsgV4.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-dndCPMsgV4.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndCPMsgV4.Tpo -c -o libdndcp_la-dndCPMsgV4.lo `test -f 'dnd/dndCPMsgV4.c' || echo '$(srcdir)/'`dnd/dndCPMsgV4.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndCPMsgV4.Tpo $(DEPDIR)/libdndcp_la-dndCPMsgV4.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dnd/dndCPMsgV4.c' object='libdndcp_la-dndCPMsgV4.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-dndCPMsgV4.lo `test -f 'dnd/dndCPMsgV4.c' || echo '$(srcdir)/'`dnd/dndCPMsgV4.c - -libdndcp_la-dndLinux.lo: dnd/dndLinux.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-dndLinux.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndLinux.Tpo -c -o libdndcp_la-dndLinux.lo `test -f 'dnd/dndLinux.c' || echo '$(srcdir)/'`dnd/dndLinux.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndLinux.Tpo $(DEPDIR)/libdndcp_la-dndLinux.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dnd/dndLinux.c' object='libdndcp_la-dndLinux.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-dndLinux.lo `test -f 'dnd/dndLinux.c' || echo '$(srcdir)/'`dnd/dndLinux.c - -libdndcp_la-dndMsg.lo: dnd/dndMsg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-dndMsg.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndMsg.Tpo -c -o libdndcp_la-dndMsg.lo `test -f 'dnd/dndMsg.c' || echo '$(srcdir)/'`dnd/dndMsg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndMsg.Tpo $(DEPDIR)/libdndcp_la-dndMsg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dnd/dndMsg.c' object='libdndcp_la-dndMsg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-dndMsg.lo `test -f 'dnd/dndMsg.c' || echo '$(srcdir)/'`dnd/dndMsg.c - -libdndcp_la-copyPasteCompat.lo: copyPasteCompat.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-copyPasteCompat.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteCompat.Tpo -c -o libdndcp_la-copyPasteCompat.lo `test -f 'copyPasteCompat.c' || echo '$(srcdir)/'`copyPasteCompat.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteCompat.Tpo $(DEPDIR)/libdndcp_la-copyPasteCompat.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copyPasteCompat.c' object='libdndcp_la-copyPasteCompat.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-copyPasteCompat.lo `test -f 'copyPasteCompat.c' || echo '$(srcdir)/'`copyPasteCompat.c - -libdndcp_la-copyPasteCompatX11.lo: copyPasteCompatX11.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-copyPasteCompatX11.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteCompatX11.Tpo -c -o libdndcp_la-copyPasteCompatX11.lo `test -f 'copyPasteCompatX11.c' || echo '$(srcdir)/'`copyPasteCompatX11.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteCompatX11.Tpo $(DEPDIR)/libdndcp_la-copyPasteCompatX11.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copyPasteCompatX11.c' object='libdndcp_la-copyPasteCompatX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-copyPasteCompatX11.lo `test -f 'copyPasteCompatX11.c' || echo '$(srcdir)/'`copyPasteCompatX11.c - -libdndcp_la-cpFileContents_xdr.lo: cpFileContents_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdndcp_la-cpFileContents_xdr.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-cpFileContents_xdr.Tpo -c -o libdndcp_la-cpFileContents_xdr.lo `test -f 'cpFileContents_xdr.c' || echo '$(srcdir)/'`cpFileContents_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libdndcp_la-cpFileContents_xdr.Tpo $(DEPDIR)/libdndcp_la-cpFileContents_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cpFileContents_xdr.c' object='libdndcp_la-cpFileContents_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdndcp_la-cpFileContents_xdr.lo `test -f 'cpFileContents_xdr.c' || echo '$(srcdir)/'`cpFileContents_xdr.c - -.cc.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -libdndcp_la-copyPasteRpcV3.lo: dndGuest/copyPasteRpcV3.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-copyPasteRpcV3.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteRpcV3.Tpo -c -o libdndcp_la-copyPasteRpcV3.lo `test -f 'dndGuest/copyPasteRpcV3.cc' || echo '$(srcdir)/'`dndGuest/copyPasteRpcV3.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteRpcV3.Tpo $(DEPDIR)/libdndcp_la-copyPasteRpcV3.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/copyPasteRpcV3.cc' object='libdndcp_la-copyPasteRpcV3.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-copyPasteRpcV3.lo `test -f 'dndGuest/copyPasteRpcV3.cc' || echo '$(srcdir)/'`dndGuest/copyPasteRpcV3.cc - -libdndcp_la-dndFileList.lo: dndGuest/dndFileList.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndFileList.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndFileList.Tpo -c -o libdndcp_la-dndFileList.lo `test -f 'dndGuest/dndFileList.cc' || echo '$(srcdir)/'`dndGuest/dndFileList.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndFileList.Tpo $(DEPDIR)/libdndcp_la-dndFileList.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/dndFileList.cc' object='libdndcp_la-dndFileList.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndFileList.lo `test -f 'dndGuest/dndFileList.cc' || echo '$(srcdir)/'`dndGuest/dndFileList.cc - -libdndcp_la-dndRpcV3.lo: dndGuest/dndRpcV3.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndRpcV3.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndRpcV3.Tpo -c -o libdndcp_la-dndRpcV3.lo `test -f 'dndGuest/dndRpcV3.cc' || echo '$(srcdir)/'`dndGuest/dndRpcV3.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndRpcV3.Tpo $(DEPDIR)/libdndcp_la-dndRpcV3.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/dndRpcV3.cc' object='libdndcp_la-dndRpcV3.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndRpcV3.lo `test -f 'dndGuest/dndRpcV3.cc' || echo '$(srcdir)/'`dndGuest/dndRpcV3.cc - -libdndcp_la-guestCopyPasteDest.lo: dndGuest/guestCopyPasteDest.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestCopyPasteDest.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestCopyPasteDest.Tpo -c -o libdndcp_la-guestCopyPasteDest.lo `test -f 'dndGuest/guestCopyPasteDest.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteDest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestCopyPasteDest.Tpo $(DEPDIR)/libdndcp_la-guestCopyPasteDest.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestCopyPasteDest.cc' object='libdndcp_la-guestCopyPasteDest.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestCopyPasteDest.lo `test -f 'dndGuest/guestCopyPasteDest.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteDest.cc - -libdndcp_la-guestCopyPasteMgr.lo: dndGuest/guestCopyPasteMgr.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestCopyPasteMgr.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestCopyPasteMgr.Tpo -c -o libdndcp_la-guestCopyPasteMgr.lo `test -f 'dndGuest/guestCopyPasteMgr.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteMgr.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestCopyPasteMgr.Tpo $(DEPDIR)/libdndcp_la-guestCopyPasteMgr.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestCopyPasteMgr.cc' object='libdndcp_la-guestCopyPasteMgr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestCopyPasteMgr.lo `test -f 'dndGuest/guestCopyPasteMgr.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteMgr.cc - -libdndcp_la-guestCopyPasteSrc.lo: dndGuest/guestCopyPasteSrc.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestCopyPasteSrc.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestCopyPasteSrc.Tpo -c -o libdndcp_la-guestCopyPasteSrc.lo `test -f 'dndGuest/guestCopyPasteSrc.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteSrc.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestCopyPasteSrc.Tpo $(DEPDIR)/libdndcp_la-guestCopyPasteSrc.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestCopyPasteSrc.cc' object='libdndcp_la-guestCopyPasteSrc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestCopyPasteSrc.lo `test -f 'dndGuest/guestCopyPasteSrc.cc' || echo '$(srcdir)/'`dndGuest/guestCopyPasteSrc.cc - -libdndcp_la-guestDnDCPMgr.lo: dndGuest/guestDnDCPMgr.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestDnDCPMgr.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestDnDCPMgr.Tpo -c -o libdndcp_la-guestDnDCPMgr.lo `test -f 'dndGuest/guestDnDCPMgr.cc' || echo '$(srcdir)/'`dndGuest/guestDnDCPMgr.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestDnDCPMgr.Tpo $(DEPDIR)/libdndcp_la-guestDnDCPMgr.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestDnDCPMgr.cc' object='libdndcp_la-guestDnDCPMgr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestDnDCPMgr.lo `test -f 'dndGuest/guestDnDCPMgr.cc' || echo '$(srcdir)/'`dndGuest/guestDnDCPMgr.cc - -libdndcp_la-guestDnDDest.lo: dndGuest/guestDnDDest.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestDnDDest.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestDnDDest.Tpo -c -o libdndcp_la-guestDnDDest.lo `test -f 'dndGuest/guestDnDDest.cc' || echo '$(srcdir)/'`dndGuest/guestDnDDest.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestDnDDest.Tpo $(DEPDIR)/libdndcp_la-guestDnDDest.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestDnDDest.cc' object='libdndcp_la-guestDnDDest.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestDnDDest.lo `test -f 'dndGuest/guestDnDDest.cc' || echo '$(srcdir)/'`dndGuest/guestDnDDest.cc - -libdndcp_la-guestDnDMgr.lo: dndGuest/guestDnDMgr.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestDnDMgr.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestDnDMgr.Tpo -c -o libdndcp_la-guestDnDMgr.lo `test -f 'dndGuest/guestDnDMgr.cc' || echo '$(srcdir)/'`dndGuest/guestDnDMgr.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestDnDMgr.Tpo $(DEPDIR)/libdndcp_la-guestDnDMgr.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestDnDMgr.cc' object='libdndcp_la-guestDnDMgr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestDnDMgr.lo `test -f 'dndGuest/guestDnDMgr.cc' || echo '$(srcdir)/'`dndGuest/guestDnDMgr.cc - -libdndcp_la-guestDnDSrc.lo: dndGuest/guestDnDSrc.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestDnDSrc.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestDnDSrc.Tpo -c -o libdndcp_la-guestDnDSrc.lo `test -f 'dndGuest/guestDnDSrc.cc' || echo '$(srcdir)/'`dndGuest/guestDnDSrc.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestDnDSrc.Tpo $(DEPDIR)/libdndcp_la-guestDnDSrc.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestDnDSrc.cc' object='libdndcp_la-guestDnDSrc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestDnDSrc.lo `test -f 'dndGuest/guestDnDSrc.cc' || echo '$(srcdir)/'`dndGuest/guestDnDSrc.cc - -libdndcp_la-guestFileTransfer.lo: dndGuest/guestFileTransfer.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-guestFileTransfer.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-guestFileTransfer.Tpo -c -o libdndcp_la-guestFileTransfer.lo `test -f 'dndGuest/guestFileTransfer.cc' || echo '$(srcdir)/'`dndGuest/guestFileTransfer.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-guestFileTransfer.Tpo $(DEPDIR)/libdndcp_la-guestFileTransfer.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/guestFileTransfer.cc' object='libdndcp_la-guestFileTransfer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-guestFileTransfer.lo `test -f 'dndGuest/guestFileTransfer.cc' || echo '$(srcdir)/'`dndGuest/guestFileTransfer.cc - -libdndcp_la-copyPasteRpcV4.lo: dndGuest/copyPasteRpcV4.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-copyPasteRpcV4.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteRpcV4.Tpo -c -o libdndcp_la-copyPasteRpcV4.lo `test -f 'dndGuest/copyPasteRpcV4.cc' || echo '$(srcdir)/'`dndGuest/copyPasteRpcV4.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteRpcV4.Tpo $(DEPDIR)/libdndcp_la-copyPasteRpcV4.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/copyPasteRpcV4.cc' object='libdndcp_la-copyPasteRpcV4.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-copyPasteRpcV4.lo `test -f 'dndGuest/copyPasteRpcV4.cc' || echo '$(srcdir)/'`dndGuest/copyPasteRpcV4.cc - -libdndcp_la-dndRpcV4.lo: dndGuest/dndRpcV4.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndRpcV4.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndRpcV4.Tpo -c -o libdndcp_la-dndRpcV4.lo `test -f 'dndGuest/dndRpcV4.cc' || echo '$(srcdir)/'`dndGuest/dndRpcV4.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndRpcV4.Tpo $(DEPDIR)/libdndcp_la-dndRpcV4.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/dndRpcV4.cc' object='libdndcp_la-dndRpcV4.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndRpcV4.lo `test -f 'dndGuest/dndRpcV4.cc' || echo '$(srcdir)/'`dndGuest/dndRpcV4.cc - -libdndcp_la-fileTransferRpcV4.lo: dndGuest/fileTransferRpcV4.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-fileTransferRpcV4.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-fileTransferRpcV4.Tpo -c -o libdndcp_la-fileTransferRpcV4.lo `test -f 'dndGuest/fileTransferRpcV4.cc' || echo '$(srcdir)/'`dndGuest/fileTransferRpcV4.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-fileTransferRpcV4.Tpo $(DEPDIR)/libdndcp_la-fileTransferRpcV4.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/fileTransferRpcV4.cc' object='libdndcp_la-fileTransferRpcV4.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-fileTransferRpcV4.lo `test -f 'dndGuest/fileTransferRpcV4.cc' || echo '$(srcdir)/'`dndGuest/fileTransferRpcV4.cc - -libdndcp_la-rpcV3Util.lo: dndGuest/rpcV3Util.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-rpcV3Util.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-rpcV3Util.Tpo -c -o libdndcp_la-rpcV3Util.lo `test -f 'dndGuest/rpcV3Util.cpp' || echo '$(srcdir)/'`dndGuest/rpcV3Util.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-rpcV3Util.Tpo $(DEPDIR)/libdndcp_la-rpcV3Util.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/rpcV3Util.cpp' object='libdndcp_la-rpcV3Util.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-rpcV3Util.lo `test -f 'dndGuest/rpcV3Util.cpp' || echo '$(srcdir)/'`dndGuest/rpcV3Util.cpp - -libdndcp_la-rpcV4Util.lo: dndGuest/rpcV4Util.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-rpcV4Util.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-rpcV4Util.Tpo -c -o libdndcp_la-rpcV4Util.lo `test -f 'dndGuest/rpcV4Util.cpp' || echo '$(srcdir)/'`dndGuest/rpcV4Util.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-rpcV4Util.Tpo $(DEPDIR)/libdndcp_la-rpcV4Util.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/rpcV4Util.cpp' object='libdndcp_la-rpcV4Util.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-rpcV4Util.lo `test -f 'dndGuest/rpcV4Util.cpp' || echo '$(srcdir)/'`dndGuest/rpcV4Util.cpp - -libdndcp_la-dndCPTransportGuestRpc.lo: dndGuest/dndCPTransportGuestRpc.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndCPTransportGuestRpc.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndCPTransportGuestRpc.Tpo -c -o libdndcp_la-dndCPTransportGuestRpc.lo `test -f 'dndGuest/dndCPTransportGuestRpc.cpp' || echo '$(srcdir)/'`dndGuest/dndCPTransportGuestRpc.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndCPTransportGuestRpc.Tpo $(DEPDIR)/libdndcp_la-dndCPTransportGuestRpc.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndGuest/dndCPTransportGuestRpc.cpp' object='libdndcp_la-dndCPTransportGuestRpc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndCPTransportGuestRpc.lo `test -f 'dndGuest/dndCPTransportGuestRpc.cpp' || echo '$(srcdir)/'`dndGuest/dndCPTransportGuestRpc.cpp - -libdndcp_la-string.lo: stringxx/string.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-string.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-string.Tpo -c -o libdndcp_la-string.lo `test -f 'stringxx/string.cc' || echo '$(srcdir)/'`stringxx/string.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-string.Tpo $(DEPDIR)/libdndcp_la-string.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='stringxx/string.cc' object='libdndcp_la-string.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-string.lo `test -f 'stringxx/string.cc' || echo '$(srcdir)/'`stringxx/string.cc - -libdndcp_la-xutils.lo: xutils/xutils.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-xutils.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-xutils.Tpo -c -o libdndcp_la-xutils.lo `test -f 'xutils/xutils.cc' || echo '$(srcdir)/'`xutils/xutils.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-xutils.Tpo $(DEPDIR)/libdndcp_la-xutils.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xutils/xutils.cc' object='libdndcp_la-xutils.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-xutils.lo `test -f 'xutils/xutils.cc' || echo '$(srcdir)/'`xutils/xutils.cc - -libdndcp_la-copyPasteDnDWrapper.lo: copyPasteDnDWrapper.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-copyPasteDnDWrapper.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteDnDWrapper.Tpo -c -o libdndcp_la-copyPasteDnDWrapper.lo `test -f 'copyPasteDnDWrapper.cpp' || echo '$(srcdir)/'`copyPasteDnDWrapper.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteDnDWrapper.Tpo $(DEPDIR)/libdndcp_la-copyPasteDnDWrapper.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='copyPasteDnDWrapper.cpp' object='libdndcp_la-copyPasteDnDWrapper.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-copyPasteDnDWrapper.lo `test -f 'copyPasteDnDWrapper.cpp' || echo '$(srcdir)/'`copyPasteDnDWrapper.cpp - -libdndcp_la-copyPasteDnDX11.lo: copyPasteDnDX11.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-copyPasteDnDX11.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteDnDX11.Tpo -c -o libdndcp_la-copyPasteDnDX11.lo `test -f 'copyPasteDnDX11.cpp' || echo '$(srcdir)/'`copyPasteDnDX11.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteDnDX11.Tpo $(DEPDIR)/libdndcp_la-copyPasteDnDX11.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='copyPasteDnDX11.cpp' object='libdndcp_la-copyPasteDnDX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-copyPasteDnDX11.lo `test -f 'copyPasteDnDX11.cpp' || echo '$(srcdir)/'`copyPasteDnDX11.cpp - -libdndcp_la-copyPasteUIX11.lo: copyPasteUIX11.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-copyPasteUIX11.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-copyPasteUIX11.Tpo -c -o libdndcp_la-copyPasteUIX11.lo `test -f 'copyPasteUIX11.cpp' || echo '$(srcdir)/'`copyPasteUIX11.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-copyPasteUIX11.Tpo $(DEPDIR)/libdndcp_la-copyPasteUIX11.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='copyPasteUIX11.cpp' object='libdndcp_la-copyPasteUIX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-copyPasteUIX11.lo `test -f 'copyPasteUIX11.cpp' || echo '$(srcdir)/'`copyPasteUIX11.cpp - -libdndcp_la-dndUIX11.lo: dndUIX11.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndUIX11.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndUIX11.Tpo -c -o libdndcp_la-dndUIX11.lo `test -f 'dndUIX11.cpp' || echo '$(srcdir)/'`dndUIX11.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndUIX11.Tpo $(DEPDIR)/libdndcp_la-dndUIX11.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndUIX11.cpp' object='libdndcp_la-dndUIX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndUIX11.lo `test -f 'dndUIX11.cpp' || echo '$(srcdir)/'`dndUIX11.cpp - -libdndcp_la-dndcp.lo: dndcp.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dndcp.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dndcp.Tpo -c -o libdndcp_la-dndcp.lo `test -f 'dndcp.cpp' || echo '$(srcdir)/'`dndcp.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dndcp.Tpo $(DEPDIR)/libdndcp_la-dndcp.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dndcp.cpp' object='libdndcp_la-dndcp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dndcp.lo `test -f 'dndcp.cpp' || echo '$(srcdir)/'`dndcp.cpp - -libdndcp_la-dragDetWndX11.lo: dragDetWndX11.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-dragDetWndX11.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-dragDetWndX11.Tpo -c -o libdndcp_la-dragDetWndX11.lo `test -f 'dragDetWndX11.cpp' || echo '$(srcdir)/'`dragDetWndX11.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-dragDetWndX11.Tpo $(DEPDIR)/libdndcp_la-dragDetWndX11.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dragDetWndX11.cpp' object='libdndcp_la-dragDetWndX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-dragDetWndX11.lo `test -f 'dragDetWndX11.cpp' || echo '$(srcdir)/'`dragDetWndX11.cpp - -libdndcp_la-pointer.lo: pointer.cpp -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libdndcp_la-pointer.lo -MD -MP -MF $(DEPDIR)/libdndcp_la-pointer.Tpo -c -o libdndcp_la-pointer.lo `test -f 'pointer.cpp' || echo '$(srcdir)/'`pointer.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libdndcp_la-pointer.Tpo $(DEPDIR)/libdndcp_la-pointer.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pointer.cpp' object='libdndcp_la-pointer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdndcp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libdndcp_la-pointer.lo `test -f 'pointer.cpp' || echo '$(srcdir)/'`pointer.cpp - -.cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -cpFileContents.h: cpFileContents.x - @RPCGEN_WRAPPER@ services/plugins/dndcp/cpFileContents.x $@ - -cpFileContents_xdr.c: cpFileContents.x cpFileContents.h - @RPCGEN_WRAPPER@ services/plugins/dndcp/cpFileContents.x $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteCompat.c b/open-vm-tools/services/plugins/dndcp/copyPasteCompat.c index 4e31d277f..260af1f94 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteCompat.c +++ b/open-vm-tools/services/plugins/dndcp/copyPasteCompat.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteCompat.h b/open-vm-tools/services/plugins/dndcp/copyPasteCompat.h index 3d01d137b..b0d1ac3e3 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteCompat.h +++ b/open-vm-tools/services/plugins/dndcp/copyPasteCompat.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteCompatX11.c b/open-vm-tools/services/plugins/dndcp/copyPasteCompatX11.c index 21e0ed4aa..d5a0fdf97 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteCompatX11.c +++ b/open-vm-tools/services/plugins/dndcp/copyPasteCompatX11.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -159,7 +159,11 @@ CopyPasteSelectionRemoveTarget(GtkWidget *widget, GList *selectionLists; /* Get selection list. */ +#ifndef GTK3 selectionLists = gtk_object_get_data(GTK_OBJECT (widget), selection_handler_key); +#else + selectionLists = g_object_get_data(G_OBJECT (widget), selection_handler_key); +#endif tempList = selectionLists; while (tempList) { /* Enumerate the list to find the selection. */ @@ -168,6 +172,10 @@ CopyPasteSelectionRemoveTarget(GtkWidget *widget, /* Remove target. */ gtk_target_list_remove(targetList->list, target); /* If no more target, remove selection from list. */ +#ifndef GTK3 + /* the following code does not build with gtk3 - it may not be + necessary and gtk_target_list_remove() takes care of it, + or we create a memory leak. */ if (!targetList->list->list) { /* Free target list. */ gtk_target_list_unref(targetList->list); @@ -176,12 +184,17 @@ CopyPasteSelectionRemoveTarget(GtkWidget *widget, selectionLists = g_list_remove_link(selectionLists, tempList); g_list_free_1(tempList); } +#endif break; } tempList = tempList->next; } /* Put new selection list back. */ +#ifndef GTK3 gtk_object_set_data (GTK_OBJECT (widget), selection_handler_key, selectionLists); +#else + g_object_set_data (G_OBJECT (widget), selection_handler_key, selectionLists); +#endif } @@ -335,7 +348,12 @@ CopyPasteSelectionReceivedCB(GtkWidget *widget, // IN: unused gpointer data) // IN: unused { char *target; +#ifndef GTK3 char *utf8Str = NULL; +#else + const char *utf8Str = NULL; + char *utf8Str_cvt = NULL; +#endif size_t len; size_t aligned_len; @@ -344,52 +362,96 @@ CopyPasteSelectionReceivedCB(GtkWidget *widget, // IN: unused goto exit; } +#ifndef GTK3 if (selection_data->length < 0) { +#else + if (gtk_selection_data_get_length(selection_data) < 0) { +#endif g_debug("CopyPasteSelectionReceivedCB: Error, length less than 0\n"); goto exit; } /* Try to get clipboard or selection timestamp. */ +#ifndef GTK3 if (selection_data->target == GDK_SELECTION_TYPE_TIMESTAMP) { if (selection_data->selection == GDK_SELECTION_PRIMARY) { if (selection_data->length == 4) { gGuestSelPrimaryTime = *(uint32 *)selection_data->data; +#else + if (gtk_selection_data_get_target(selection_data) == GDK_SELECTION_TYPE_TIMESTAMP) { + if (gtk_selection_data_get_selection(selection_data) == GDK_SELECTION_PRIMARY) { + if (gtk_selection_data_get_length(selection_data) == 4) { + gGuestSelPrimaryTime = *(uint32 *)gtk_selection_data_get_data(selection_data); +#endif g_debug("CopyPasteSelectionReceivedCB: Got pri time [%"FMT64"u]\n", gGuestSelPrimaryTime); +#ifndef GTK3 } else if (selection_data->length == 8) { gGuestSelPrimaryTime = *(uint64 *)selection_data->data; +#else + } else if (gtk_selection_data_get_length(selection_data) == 8) { + gGuestSelPrimaryTime = *(uint64 *)gtk_selection_data_get_data(selection_data); +#endif g_debug("CopyPasteSelectionReceivedCB: Got pri time [%"FMT64"u]\n", gGuestSelPrimaryTime); } else { g_debug("CopyPasteSelectionReceivedCB: Unknown pri time. Size %d\n", +#ifndef GTK3 selection_data->length); +#else + gtk_selection_data_get_length(selection_data)); +#endif } } +#ifndef GTK3 if (selection_data->selection == GDK_SELECTION_CLIPBOARD) { if (selection_data->length == 4) { gGuestSelClipboardTime = *(uint32 *)selection_data->data; +#else + if (gtk_selection_data_get_selection(selection_data) == GDK_SELECTION_CLIPBOARD) { + if (gtk_selection_data_get_length(selection_data) == 4) { + gGuestSelClipboardTime = *(uint32 *)gtk_selection_data_get_data(selection_data); +#endif g_debug("CopyPasteSelectionReceivedCB: Got clip time [%"FMT64"u]\n", gGuestSelClipboardTime); +#ifndef GTK3 } else if (selection_data->length == 8) { gGuestSelClipboardTime = *(uint64 *)selection_data->data; +#else + } else if (gtk_selection_data_get_length(selection_data) == 8) { + gGuestSelClipboardTime = *(uint64 *)gtk_selection_data_get_data(selection_data); +#endif g_debug("CopyPasteSelectionReceivedCB: Got clip time [%"FMT64"u]\n", gGuestSelClipboardTime); } else { g_debug("CopyPasteSelectionReceivedCB: Unknown clip time. Size %d\n", +#ifndef GTK3 selection_data->length); +#else + gtk_selection_data_get_length(selection_data)); +#endif } } goto exit; } +#ifndef GTK3 if (selection_data->selection == GDK_SELECTION_PRIMARY) { +#else + if (gtk_selection_data_get_selection(selection_data) == GDK_SELECTION_PRIMARY) { +#endif target = gGuestSelPrimaryBuf; +#ifndef GTK3 } else if (selection_data->selection == GDK_SELECTION_CLIPBOARD) { +#else + } else if (gtk_selection_data_get_selection(selection_data) == GDK_SELECTION_CLIPBOARD) { +#endif target = gGuestSelClipboardBuf; } else { goto exit; } +#ifndef GTK3 utf8Str = selection_data->data; len = strlen(selection_data->data); @@ -403,11 +465,27 @@ CopyPasteSelectionReceivedCB(GtkWidget *widget, // IN: unused } goto exit; } +#else + utf8Str = gtk_selection_data_get_data(selection_data); + len = strlen(gtk_selection_data_get_data(selection_data)); + + if (gtk_selection_data_get_target(selection_data) != GDK_SELECTION_TYPE_STRING && + gtk_selection_data_get_target(selection_data) != GDK_SELECTION_TYPE_UTF8_STRING) { + /* It is a file list. */ + if (len >= MAX_SELECTION_BUFFER_LENGTH - 1) { + Warning("CopyPasteSelectionReceivedCB file list too long\n"); + } else { + memcpy(target, gtk_selection_data_get_data(selection_data), len + 1); + } + goto exit; + } +#endif /* * If target is GDK_SELECTION_TYPE_STRING, assume encoding is local code * set. Convert to utf8 before send to vmx. */ +#ifndef GTK3 if (selection_data->target == GDK_SELECTION_TYPE_STRING && !CodeSet_CurrentToUtf8(selection_data->data, selection_data->length, @@ -417,6 +495,20 @@ CopyPasteSelectionReceivedCB(GtkWidget *widget, // IN: unused gWaitingOnGuestSelection = FALSE; return; } +#else + if (gtk_selection_data_get_target(selection_data) == GDK_SELECTION_TYPE_STRING) { + if (!CodeSet_CurrentToUtf8(gtk_selection_data_get_data(selection_data), + gtk_selection_data_get_length(selection_data), + &utf8Str_cvt, + &len)) { + g_debug("CopyPasteSelectionReceivedCB: Couldn't convert to utf8 code set\n"); + gWaitingOnGuestSelection = FALSE; + return; + } else { + utf8Str = utf8Str_cvt; + } + } +#endif /* * String in backdoor communication is 4 bytes by 4 bytes, so the len @@ -436,8 +528,13 @@ CopyPasteSelectionReceivedCB(GtkWidget *widget, // IN: unused } exit: +#ifndef GTK3 if (selection_data->target == GDK_SELECTION_TYPE_STRING) { free(utf8Str); +#else + if (gtk_selection_data_get_target(selection_data) == GDK_SELECTION_TYPE_STRING) { + free(utf8Str_cvt); +#endif } gWaitingOnGuestSelection = FALSE; } @@ -483,8 +580,13 @@ CopyPasteSelectionGetCB(GtkWidget *widget, // IN: unused } /* If it is text copy paste, return gHostClipboardBuf. */ +#ifndef GTK3 if (GDK_SELECTION_TYPE_STRING == selection_data->target || GDK_SELECTION_TYPE_UTF8_STRING == selection_data->target) { +#else + if (GDK_SELECTION_TYPE_STRING == gtk_selection_data_get_target(selection_data) || + GDK_SELECTION_TYPE_UTF8_STRING == gtk_selection_data_get_target(selection_data)) { +#endif char *outBuf = gHostClipboardBuf; size_t len = strlen(gHostClipboardBuf); @@ -492,7 +594,11 @@ CopyPasteSelectionGetCB(GtkWidget *widget, // IN: unused * If target is GDK_SELECTION_TYPE_STRING, assume encoding is local code * set. Convert from utf8 to local one. */ +#ifndef GTK3 if (GDK_SELECTION_TYPE_STRING == selection_data->target && +#else + if (GDK_SELECTION_TYPE_STRING == gtk_selection_data_get_target(selection_data) && +#endif !CodeSet_Utf8ToCurrent(gHostClipboardBuf, strlen(gHostClipboardBuf), &outBuf, @@ -501,11 +607,19 @@ CopyPasteSelectionGetCB(GtkWidget *widget, // IN: unused return; } +#ifndef GTK3 gtk_selection_data_set(selection_data, selection_data->target, 8, +#else + gtk_selection_data_set(selection_data, gtk_selection_data_get_target(selection_data), 8, +#endif outBuf, len); g_debug("CopyPasteSelectionGetCB: Set text [%s]\n", outBuf); +#ifndef GTK3 if (GDK_SELECTION_TYPE_STRING == selection_data->target) { +#else + if (GDK_SELECTION_TYPE_STRING == gtk_selection_data_get_target(selection_data)) { +#endif free(outBuf); } @@ -728,12 +842,21 @@ CopyPaste_Register(GtkWidget* mainWnd, // IN gtk_selection_add_target(mainWnd, GDK_SELECTION_CLIPBOARD, GDK_SELECTION_TYPE_UTF8_STRING, 0); +#ifndef GTK3 gtk_signal_connect(GTK_OBJECT(mainWnd), "selection_received", GTK_SIGNAL_FUNC(CopyPasteSelectionReceivedCB), mainWnd); gtk_signal_connect(GTK_OBJECT(mainWnd), "selection_get", GTK_SIGNAL_FUNC(CopyPasteSelectionGetCB), mainWnd); gtk_signal_connect(GTK_OBJECT(mainWnd), "selection_clear_event", GTK_SIGNAL_FUNC(CopyPasteSelectionClearCB), mainWnd); +#else + g_signal_connect(G_OBJECT(mainWnd), "selection_received", + G_CALLBACK(CopyPasteSelectionReceivedCB), mainWnd); + g_signal_connect(G_OBJECT(mainWnd), "selection_get", + G_CALLBACK(CopyPasteSelectionGetCB), mainWnd); + g_signal_connect(G_OBJECT(mainWnd), "selection_clear_event", + G_CALLBACK(CopyPasteSelectionClearCB), mainWnd); +#endif CopyPasteStateInit(); @@ -761,6 +884,7 @@ void CopyPaste_Unregister(GtkWidget* mainWnd) { g_debug("%s: enter\n", __FUNCTION__); +#ifndef GTK3 gtk_signal_disconnect_by_func(GTK_OBJECT(mainWnd), GTK_SIGNAL_FUNC(CopyPasteSelectionReceivedCB), mainWnd); @@ -770,6 +894,17 @@ CopyPaste_Unregister(GtkWidget* mainWnd) gtk_signal_disconnect_by_func(GTK_OBJECT(mainWnd), GTK_SIGNAL_FUNC(CopyPasteSelectionClearCB), mainWnd); +#else + g_signal_handlers_disconnect_by_func(G_OBJECT(mainWnd), + G_CALLBACK(CopyPasteSelectionReceivedCB), + mainWnd); + g_signal_handlers_disconnect_by_func(G_OBJECT(mainWnd), + G_CALLBACK(CopyPasteSelectionGetCB), + mainWnd); + g_signal_handlers_disconnect_by_func(G_OBJECT(mainWnd), + G_CALLBACK(CopyPasteSelectionClearCB), + mainWnd); +#endif } diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteDnDImpl.h b/open-vm-tools/services/plugins/dndcp/copyPasteDnDImpl.h index c635b0896..b969ec489 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteDnDImpl.h +++ b/open-vm-tools/services/plugins/dndcp/copyPasteDnDImpl.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteDnDWrapper.cpp b/open-vm-tools/services/plugins/dndcp/copyPasteDnDWrapper.cpp index 73211023f..5f4808fed 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteDnDWrapper.cpp +++ b/open-vm-tools/services/plugins/dndcp/copyPasteDnDWrapper.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteDnDWrapper.h b/open-vm-tools/services/plugins/dndcp/copyPasteDnDWrapper.h index 1fddc9bab..ff95d1d77 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteDnDWrapper.h +++ b/open-vm-tools/services/plugins/dndcp/copyPasteDnDWrapper.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp b/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp index 55a5cb5b3..fffdc4026 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp +++ b/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -223,7 +223,11 @@ CopyPasteDnDX11::Init(ToolsAppCtx *ctx) } gUserMainWidget = gtk_invisible_new(); +#ifndef GTK3 gXDisplay = GDK_WINDOW_XDISPLAY(gUserMainWidget->window); +#else + gXDisplay = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gUserMainWidget)); +#endif gXRoot = RootWindow(gXDisplay, DefaultScreen(gXDisplay)); /* diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.h b/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.h index 0606566ad..2a5f887fb 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.h +++ b/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp index 1762ac68d..cef64c1b2 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp +++ b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -214,7 +214,7 @@ CopyPasteUIX11::~CopyPasteUIX11() !mHGStagingDir.empty()) { uint64 totalSize = File_GetSizeEx(mHGStagingDir.c_str()); if (mTotalFileSize != totalSize) { - g_debug("%s: deleting %s, expecting %"FMT64"d, finished %"FMT64"d\n", + g_debug("%s: deleting %s, expecting %" FMT64 "u, finished %" FMT64 "u\n", __FUNCTION__, mHGStagingDir.c_str(), mTotalFileSize, totalSize); DnD_DeleteStagingFiles(mHGStagingDir.c_str(), FALSE); @@ -552,7 +552,7 @@ CopyPasteUIX11::LocalGetTextOrRTFRequestCB(Gtk::SelectionData& sd, // IN/OUT return; } - g_debug("%s: providing RTF data, size %"FMTSZ"u\n", + g_debug("%s: providing RTF data, size %" FMTSZ "u\n", __FUNCTION__, mHGRTFData.size()); sd.set(target.c_str(), mHGRTFData.c_str()); @@ -566,7 +566,7 @@ CopyPasteUIX11::LocalGetTextOrRTFRequestCB(Gtk::SelectionData& sd, // IN/OUT g_debug("%s: Can not get valid text data\n", __FUNCTION__); return; } - g_debug("%s: providing plain text, size %"FMTSZ"u\n", + g_debug("%s: providing plain text, size %" FMTSZ "u\n", __FUNCTION__, mHGTextData.bytes()); sd.set(target.c_str(), mHGTextData.c_str()); @@ -743,7 +743,7 @@ CopyPasteUIX11::LocalPrimTimestampCB(const Gtk::SelectionData& sd) // IN CPClipboard_SetItem(&mClipboard, CPFORMAT_IMG_PNG, buf, bufSize)) { validDataInClip = true; - g_debug("%s: Got PNG: %"FMTSZ"u\n", __FUNCTION__, bufSize); + g_debug("%s: Got PNG: %" FMTSZ "u\n", __FUNCTION__, bufSize); } else { g_debug("%s: Failed to get PNG\n", __FUNCTION__); } @@ -796,7 +796,7 @@ CopyPasteUIX11::LocalPrimTimestampCB(const Gtk::SelectionData& sd) // IN CPClipboard_SetItem(&mClipboard, CPFORMAT_TEXT, (const void *)str.data(), bufSize + 1)) { validDataInClip = true; - g_debug("%s: Got TEXT: %"FMTSZ"u\n", __FUNCTION__, bufSize); + g_debug("%s: Got TEXT: %" FMTSZ "u\n", __FUNCTION__, bufSize); } else { g_debug("%s: Failed to get TEXT\n", __FUNCTION__); } @@ -1031,7 +1031,7 @@ CopyPasteUIX11::LocalGetSelectionFileList(const Gtk::SelectionData& sd) // DynBuf_Init(&buf); fileList.SetFileSize(totalSize); - g_debug("%s: totalSize is %"FMT64"u\n", __FUNCTION__, totalSize); + g_debug("%s: totalSize is %" FMT64 "u\n", __FUNCTION__, totalSize); fileList.ToCPClipboard(&buf, false); CPClipboard_SetItem(&mClipboard, CPFORMAT_FILELIST, DynBuf_Get(&buf), DynBuf_GetSize(&buf)); @@ -1191,14 +1191,14 @@ CopyPasteUIX11::GetRemoteClipboardCB(const CPClipboard *clip) // IN if (CPClipboard_ItemExists(clip, CPFORMAT_TEXT) || CPClipboard_ItemExists(clip, CPFORMAT_RTF)) { - std::list targets; + std::vector targets; /* * rtf should be first in the target list otherwise OpenOffice may not * accept paste. */ if (CPClipboard_GetItem(clip, CPFORMAT_RTF, &buf, &sz)) { - g_debug("%s: RTF data, size %"FMTSZ"u.\n", __FUNCTION__, sz); + g_debug("%s: RTF data, size %" FMTSZ "u.\n", __FUNCTION__, sz); Gtk::TargetEntry appRtf(TARGET_NAME_APPLICATION_RTF); Gtk::TargetEntry textRtf(TARGET_NAME_TEXT_RICHTEXT); @@ -1214,7 +1214,7 @@ CopyPasteUIX11::GetRemoteClipboardCB(const CPClipboard *clip) // IN Gtk::TargetEntry utf8Text(TARGET_NAME_UTF8_STRING); Gtk::TargetEntry compountText(TARGET_NAME_COMPOUND_TEXT); - g_debug("%s: Text data, size %"FMTSZ"u.\n", __FUNCTION__, sz); + g_debug("%s: Text data, size %" FMTSZ "u.\n", __FUNCTION__, sz); targets.push_back(stringText); targets.push_back(plainText); targets.push_back(utf8Text); @@ -1234,7 +1234,7 @@ CopyPasteUIX11::GetRemoteClipboardCB(const CPClipboard *clip) // IN } if (CPClipboard_GetItem(clip, CPFORMAT_IMG_PNG, &buf, &sz)) { - g_debug("%s: PNG data, size %"FMTSZ"u.\n", __FUNCTION__, sz); + g_debug("%s: PNG data, size %" FMTSZ "u.\n", __FUNCTION__, sz); /* Try to load buf into pixbuf, and write to local clipboard. */ try { Glib::RefPtr loader = Gdk::PixbufLoader::create(); @@ -1388,7 +1388,7 @@ CopyPasteUIX11::LocalPrepareFileContents(const CPClipboard *clip) // IN if (!fileItem[i].cpName.cpName_val || 0 == fileItem[i].cpName.cpName_len) { - g_debug("%s: invalid fileItem[%"FMTSZ"u].cpName.\n", __FUNCTION__, i); + g_debug("%s: invalid fileItem[%" FMTSZ "u].cpName.\n", __FUNCTION__, i); goto exit; } diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.h b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.h index 73e6d5054..5b139123d 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.h +++ b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -110,7 +110,7 @@ class CopyPasteUIX11 : public sigc::trackable GuestCopyPasteMgr *mCP; bool mClipboardEmpty; utf::string mHGStagingDir; - std::list mListTargets; + std::vector mListTargets; bool mIsClipboardOwner; uint64 mClipTime; uint64 mPrimTime; diff --git a/open-vm-tools/services/plugins/dndcp/cpFileContents.x b/open-vm-tools/services/plugins/dndcp/cpFileContents.x index 4e8c51b7b..39155de71 100644 --- a/open-vm-tools/services/plugins/dndcp/cpFileContents.x +++ b/open-vm-tools/services/plugins/dndcp/cpFileContents.x @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/copyPasteRpc.hh b/open-vm-tools/services/plugins/dndcp/dnd/copyPasteRpc.hh index 90daa29c1..40064eac6 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/copyPasteRpc.hh +++ b/open-vm-tools/services/plugins/dndcp/dnd/copyPasteRpc.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/copyPasteRpcV4.hh b/open-vm-tools/services/plugins/dndcp/dnd/copyPasteRpcV4.hh index e69e0a5f4..2d4dfd801 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/copyPasteRpcV4.hh +++ b/open-vm-tools/services/plugins/dndcp/dnd/copyPasteRpcV4.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dnd.h b/open-vm-tools/services/plugins/dndcp/dnd/dnd.h index 3594c7290..a40db1912 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dnd.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/dnd.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndCPLibExport.hh b/open-vm-tools/services/plugins/dndcp/dnd/dndCPLibExport.hh index 2770cd839..25a29c622 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndCPLibExport.hh +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndCPLibExport.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.c b/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.c index a8ce267eb..690b06451 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.c +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.h b/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.h index 288d6f8d1..765c081fc 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndCPMsgV4.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndCPTransport.h b/open-vm-tools/services/plugins/dndcp/dnd/dndCPTransport.h index 2413b397a..d88d3ee14 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndCPTransport.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndCPTransport.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndClipboard.c b/open-vm-tools/services/plugins/dndcp/dnd/dndClipboard.c index 8ead4cd88..b134fc7be 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndClipboard.c +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndClipboard.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndClipboard.h b/open-vm-tools/services/plugins/dndcp/dnd/dndClipboard.h index 55e86be0c..2fb7d2bbe 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndClipboard.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndClipboard.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndCommon.c b/open-vm-tools/services/plugins/dndcp/dnd/dndCommon.c index 7e553196a..a5e7361bd 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndCommon.c +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndCommon.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndFileContentsUtil.h b/open-vm-tools/services/plugins/dndcp/dnd/dndFileContentsUtil.h index 769971c72..6b87d7cf6 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndFileContentsUtil.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndFileContentsUtil.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndInt.h b/open-vm-tools/services/plugins/dndcp/dnd/dndInt.h index 7fa26b058..02fcefec7 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndInt.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c index 133219c85..36ca66025 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2005-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2005-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndMsg.c b/open-vm-tools/services/plugins/dndcp/dnd/dndMsg.c index 2bd5be4c4..eb1f81bdb 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndMsg.c +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndMsg.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndMsg.h b/open-vm-tools/services/plugins/dndcp/dnd/dndMsg.h index a50b325ee..365ab024f 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndMsg.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndMsg.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndRpc.hh b/open-vm-tools/services/plugins/dndcp/dnd/dndRpc.hh index 57484a363..c610367ff 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndRpc.hh +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndRpc.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndRpcV4.hh b/open-vm-tools/services/plugins/dndcp/dnd/dndRpcV4.hh index bc230958b..ae0cdc2eb 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/dndRpcV4.hh +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndRpcV4.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndXdg.c b/open-vm-tools/services/plugins/dndcp/dnd/dndXdg.c new file mode 100644 index 000000000..4f52829e7 --- /dev/null +++ b/open-vm-tools/services/plugins/dndcp/dnd/dndXdg.c @@ -0,0 +1,454 @@ +/********************************************************* + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * dndXdg.c -- + * + * Drag and drop routines for X Desktop Group (XDG) / freedesktop.org + * platforms. + */ + + +#include +#include +#include +#include + +#if defined __FreeBSD__ +#include +#endif + +#include "dndInt.h" +#include "dnd.h" + +#include "err.h" +#include "file.h" +#include "log.h" +#include "posix.h" +#include "str.h" +#include "strutil.h" +#include "su.h" +#include "unicode.h" +#include "vm_atomic.h" + + +static const char *CreateRealRootDirectory(void); +static const char *CreateApparentRootDirectory(void); +static char *FindSuitableExistingDirectory(const char *realRoot, + const char *apparentRoot); +static char *CreateStagingDirectory(const char *realRoot, + const char *apparentRoot); + + +/* + *----------------------------------------------------------------------------- + * + * Xdg_GetCacheHome -- + * + * Determine path appropriate for "user-specific non-essential (cached) + * data"[1]. + * + * 1. + * + * Results: + * Returns a pointer to a valid path on success or NULL on failure. + * + * Side effects: + * First call may allocate memory which remains allocated for the life + * of the program. + * + * NOT thread-safe. + * + * TODO: + * Move bora-vmsoft/lib/xdg to bora/lib, then move this to bora/lib/xdg. + * Unit tests. (There is no good home for these at the moment.) + * + *----------------------------------------------------------------------------- + */ + +const char * +Xdg_GetCacheHome(void) +{ + static char *result = NULL; + struct passwd *pw; + + if (result == NULL) { + do { + if (!Id_IsSetUGid()) { + const char *base = NULL; + + /* + * Paranoia: Avoid environment variables if running in a sensitive + * context. sudo or other loader should've sanitized the + * environment, but, well, we're paranoid, remember? + */ + + // 1. $XDG_CACHE_HOME + base = Posix_Getenv("XDG_CACHE_HOME"); + if (Util_IsAbsolutePath(base)) { + result = Util_SafeStrdup(base); + break; + } + + // 2. $HOME/.cache + base = Posix_Getenv("HOME"); + if (Util_IsAbsolutePath(base)) { + result = Util_SafeStrdup(base); + StrUtil_SafeStrcat(&result, "/.cache"); + break; + } + } + + // 3. /.cache + pw = Posix_Getpwuid(geteuid()); + + if (pw != NULL && Util_IsAbsolutePath(pw->pw_dir)) { + result = Str_Asprintf(NULL, "%s/.cache", pw->pw_dir); + } + } while(0); + } + + VERIFY(result == NULL || result[0] == '/'); + return result; +} + + +/* + *----------------------------------------------------------------------------- + * + * DnD_CreateStagingDirectory -- + * + * See dndCommon.c. + * + * Results: + * A string containing the newly created name, or NULL on failure. + * + * Side effects: + * A directory is created + * + * Caller is responsible for freeing returned pointer. + * + * NOT thread-safe. + * + *----------------------------------------------------------------------------- + */ + +char * +DnD_CreateStagingDirectory(void) +{ + const char *realRoot; + const char *apparentRoot; + char *existingDir; + + /* + * On XDG platforms, there are two roots: + * + * 1. Per-user real root ($HOME/.cache/vmware/drag_and_drop) + * + * Files are stored here, leaving cleanup to discretion of users and + * adminisitrators, and may count against users' storage quotas. Most + * importantly, however, is that it means avoiding tmpfs-backed /tmp + * which may be too small for large files. + * + * 2. Apparent root - /tmp/VMwareDnD + * + * Path known to vmblock implementations. Contains only symlinks to + * users' real root. + * + * Therefore DnD targets may access paths via + * /var/run/vmblock (vmblock file system) -> + * /tmp/VMwareDnD (apparent root) -> + * $HOME/.cache/vmware/drag_and_drop (real root). + */ + + + /* + * Lookup or create real root. + * + * We don't worry about cleaning up or removing this directory in case + * of failure later in this function. + */ + + realRoot = CreateRealRootDirectory(); + if (realRoot == NULL) { + return NULL; + } + + + /* + * Lookup or create apparent root. + */ + + apparentRoot = CreateApparentRootDirectory(); + if (apparentRoot == NULL) { + return NULL; + } + + + /* + * Search real root for empty directory. If found, (re)use it. + */ + + existingDir = FindSuitableExistingDirectory(realRoot, apparentRoot); + if (existingDir != NULL) { + return existingDir; + } + + + /* + * Generate new temporary directory. + * - Attempt to symlink $apparent/XXXXXX to $real/XXXXXX. + * - mkdir -p $real/XXXXXX. + */ + + return CreateStagingDirectory(realRoot, apparentRoot); +} + + +/* + *----------------------------------------------------------------------------- + * + * DetermineRealRootDirectory -- + * CreateRealRootDirectory -- + * + * Produces the path of the real staging directory root (e.g. + * $HOME/.cache/vmware/drag_and_drop). + * + * Results: + * !NULL Success. Points to real staging root path. + * NULL Failure. + * + * Side effects: + * May create the .cache/vmware/drag_and_drop hierarchy. + * + *----------------------------------------------------------------------------- + */ + +static const char * +DetermineRealRootDirectory(void) +{ + static char *completePath; + const char *cachePath; + + if (completePath != NULL) { + return completePath; + } + + cachePath = Xdg_GetCacheHome(); + if (cachePath != NULL) { + const char dndSuffix[] = "/vmware/drag_and_drop/"; + + completePath = Unicode_Duplicate(cachePath); + StrUtil_SafeStrcat(&completePath, dndSuffix); + VERIFY(strlen(completePath) < PATH_MAX); + + Log_Trivia("dnd: will stage to %s\n", completePath); + return completePath; + } + + Log_Trivia("dnd: failed to determine path\n"); + return NULL; +} + +static const char * +CreateRealRootDirectory(void) +{ + const char *realRoot = DetermineRealRootDirectory(); + + if ( realRoot != NULL + && ( File_IsDirectory(realRoot) + || File_CreateDirectoryHierarchyEx(realRoot, 0700, NULL))) { + return realRoot; + } + + return NULL; +} + + +/* + *---------------------------------------------------------------------------- + * + * CreateApparentRootDirectory -- + * + * Checks if the root staging directory exists with the correct permissions, + * or creates it if necessary. + * + * Results: + * !NULL Success. String containing apparent root directory path. + * NULL failure. + * + * Side effects: + * May create apparent root (/tmp/VMwareDnD) and/or change its permissions. + * + *---------------------------------------------------------------------------- + */ + +static const char * +CreateApparentRootDirectory(void) +{ + const char *root; + + /* + * DnD_GetFileRoot() gives us a pointer to a static string, so there's no + * need to free anything. + * + * XXX On XDG platforms this path ("/tmp/VMwareDnD") is created by an + * init script, so we could remove some of the code below and just bail + * if the user deletes it. + */ + + root = DnD_GetFileRoot(); + if (!root) { + return NULL; + } + + if (File_Exists(root)) { + if ( !DnDRootDirUsable(root) + && !DnDSetPermissionsOnRootDir(root)) { + /* + * The directory already exists and its permissions are wrong and + * cannot be set, so there's not much we can do. + */ + return NULL; + } + } else { + if ( !File_CreateDirectory(root) + || !DnDSetPermissionsOnRootDir(root)) { + /* We couldn't create the directory or set the permissions. */ + return NULL; + } + } + + return root; +} + + +/* + *----------------------------------------------------------------------------- + * + * FindSuitableExistingDirectory -- + * + * Given the pair of , search for an existing + * directory within `realRoot` satisfying the following conditions: + * + * 1. it's empty; + * 2. it's pointed to by a symlink of the same name from apparentRoot. + * + * Results: + * !NULL Success. Caller must free result. + * NULL Failure. + * + * Side effects: + * May create a symlink. + * + *----------------------------------------------------------------------------- + */ + +static char * +FindSuitableExistingDirectory( + const char *realRoot, // IN: e.g. $HOME/.cache/vmware/drag_and_drop/ + const char *apparentRoot) // IN: e.g. /tmp/VMwareDnD/ +{ + char *result = NULL; + + char **stagingDirList; + int numStagingDirs = File_ListDirectory(realRoot, &stagingDirList); + int i; + + for (i = 0; i < numStagingDirs && result == NULL; i++) { + char *stagingDir = Unicode_Append(realRoot, stagingDirList[i]); + char *apparentStagingDir = Unicode_Append(apparentRoot, stagingDirList[i]); + char *temp = NULL; + struct stat sb; + + if ( File_IsEmptyDirectory(stagingDir) + && ( Posix_Symlink(stagingDir, apparentStagingDir) == 0 + || ( Posix_Lstat(apparentStagingDir, &sb) == 0 + && sb.st_uid == getuid() + && (temp = Posix_ReadLink(apparentStagingDir)) != NULL + && strcmp(stagingDir, temp) == 0))) { + result = apparentStagingDir; + apparentStagingDir = NULL; + } + + free(stagingDir); + free(apparentStagingDir); + free(temp); + } + + Util_FreeStringList(stagingDirList, numStagingDirs); + return result; +} + + +/* + *----------------------------------------------------------------------------- + * + * CreateStagingDirectory -- + * + * Creates a fresh staging directory within `realRoot` and creates a + * symlink to it within `apparentRoot`. + * + * Results: + * !NULL Success. Caller must free result. + * NULL Failure. + * + * Side effects: + * Creates directories and stuff. + * + *----------------------------------------------------------------------------- + */ + +static char * +CreateStagingDirectory( + const char *realRoot, // IN: e.g. $HOME/.cache/vmware/drag_and_drop/ + const char *apparentRoot) // IN: e.g. /tmp/VMwareDnD/ +{ + char *result = NULL; + int i; + + for (i = 0; i < 10 && result == NULL; i++) { + char *realStagingDir = NULL; + char *apparentStagingDir = NULL; + + // Reminder: mkdtemp updates its arg in-place. + realStagingDir = Str_SafeAsprintf(NULL, "%sXXXXXX", realRoot); + if (mkdtemp(realStagingDir) != NULL) { + char *randomPart = strrchr(realStagingDir, '/') + 1; + VERIFY(*randomPart != '\0'); + + apparentStagingDir = Unicode_Append(apparentRoot, randomPart); + + if (Posix_Symlink(realStagingDir, apparentStagingDir) == 0) { + // Transfer ownership to caller. + result = apparentStagingDir; + apparentStagingDir = NULL; + } else { + Warning("dnd: symlink(%s): %s", apparentStagingDir, Err_ErrString()); + Posix_Rmdir(realStagingDir); + } + } else { + Warning("dnd: mkdtemp(%s): %s", realStagingDir, Err_ErrString()); + } + + free(realStagingDir); + free(apparentStagingDir); + } + + return result; +} diff --git a/open-vm-tools/services/plugins/dndcp/dnd/fileTransferRpc.hh b/open-vm-tools/services/plugins/dndcp/dnd/fileTransferRpc.hh index 5cd1eb49b..40f7c0141 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/fileTransferRpc.hh +++ b/open-vm-tools/services/plugins/dndcp/dnd/fileTransferRpc.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/fileTransferRpcV4.hh b/open-vm-tools/services/plugins/dndcp/dnd/fileTransferRpcV4.hh index a7b5eb929..5f42a1032 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/fileTransferRpcV4.hh +++ b/open-vm-tools/services/plugins/dndcp/dnd/fileTransferRpcV4.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/rpcBase.h b/open-vm-tools/services/plugins/dndcp/dnd/rpcBase.h index b550f405d..8497031d1 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/rpcBase.h +++ b/open-vm-tools/services/plugins/dndcp/dnd/rpcBase.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dnd/rpcV3Util.hpp b/open-vm-tools/services/plugins/dndcp/dnd/rpcV3Util.hpp index aa8158672..30635d59c 100644 --- a/open-vm-tools/services/plugins/dndcp/dnd/rpcV3Util.hpp +++ b/open-vm-tools/services/plugins/dndcp/dnd/rpcV3Util.hpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndFileList.hh b/open-vm-tools/services/plugins/dndcp/dndFileList.hh index 9880f1c8e..e7731a688 100644 --- a/open-vm-tools/services/plugins/dndcp/dndFileList.hh +++ b/open-vm-tools/services/plugins/dndcp/dndFileList.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV3.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV3.cc index 792ae29f2..3bacd4d2e 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV3.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV3.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV3.hh b/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV3.hh index d68a5c2bc..30c499a6d 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV3.hh +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV3.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV4.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV4.cc index 004d972d6..72432903c 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV4.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/copyPasteRpcV4.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.cpp b/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.cpp index 2b0e49368..6c9feae13 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.cpp +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.hpp b/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.hpp index f481e96c2..0f7087c23 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.hpp +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.hpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/dndFileList.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/dndFileList.cc index 5155158f4..870348886 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/dndFileList.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/dndFileList.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/dndFileList.hh b/open-vm-tools/services/plugins/dndcp/dndGuest/dndFileList.hh index 9880f1c8e..e7731a688 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/dndFileList.hh +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/dndFileList.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcListener.hpp b/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcListener.hpp index ec02734be..a9d6bc2cb 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcListener.hpp +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcListener.hpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV3.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV3.cc index a75fc58fc..8080b9ffb 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV3.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV3.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV3.hh b/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV3.hh index 317827fba..66be30751 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV3.hh +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV3.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV4.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV4.cc index f234d8df5..6b9e0d13b 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV4.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/dndRpcV4.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/fileTransferRpcV4.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/fileTransferRpcV4.cc index 159931016..a6317c0e1 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/fileTransferRpcV4.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/fileTransferRpcV4.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPaste.hh b/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPaste.hh index 41eb45370..5738b3438 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPaste.hh +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPaste.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -113,7 +113,6 @@ private: GuestCopyPasteMgr *mMgr; CPClipboard mClipboard; - bool mIsActive; std::string mStagingDir; }; diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteDest.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteDest.cc index 54b897087..260399af3 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteDest.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteDest.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteMgr.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteMgr.cc index 4d33da370..369279d6d 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteMgr.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteMgr.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -253,6 +253,7 @@ GuestCopyPasteMgr::VmxCopyPasteVersionChanged(uint32 version) if (mRpc) { delete mRpc; + mRpc = NULL; } switch(version) { diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteSrc.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteSrc.cc index 74d7acead..8530fb313 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteSrc.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestCopyPasteSrc.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnD.hh b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnD.hh index d9af48714..a6ce3fdaf 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnD.hh +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnD.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -121,7 +121,6 @@ private: GuestDnDSrc *mSrc; GuestDnDDest *mDest; DnDRpc *mRpc; - GuestFileTransfer *mFileTransfer; GUEST_DND_STATE mDnDState; uint32 mSessionId; GSource *mHideDetWndTimer; @@ -129,7 +128,6 @@ private: GSource *mUngrabTimeout; ToolsAppCtx *mToolsAppCtx; bool mDnDAllowed; - uint32 mVmxDnDVersion; DnDCPTransport *mDnDTransport; uint32 mCapabilities; }; @@ -183,7 +181,6 @@ private: void OnRpcCancel(uint32 sessionId); GuestDnDMgr *mMgr; - DnDRpc *mRpc; CPClipboard mClipboard; }; diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDCPMgr.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDCPMgr.cc index e779fa95d..84b44d34d 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDCPMgr.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDCPMgr.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDCPMgr.hh b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDCPMgr.hh index 5d7e1d649..e4539dd00 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDCPMgr.hh +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDCPMgr.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDDest.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDDest.cc index 9b8c8483a..8d234d4cd 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDDest.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDDest.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDMgr.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDMgr.cc index 7146043c6..0913b3b39 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDMgr.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDMgr.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -115,7 +115,6 @@ GuestDnDMgr::GuestDnDMgr(DnDCPTransport *transport, : mSrc(NULL), mDest(NULL), mRpc(NULL), - mFileTransfer(NULL), mDnDState(GUEST_DND_READY), mSessionId(0), mHideDetWndTimer(NULL), @@ -640,6 +639,7 @@ GuestDnDMgr::VmxDnDVersionChanged(uint32 version) } if (mRpc) { delete mRpc; + mRpc = NULL; } switch(version) { diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDSrc.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDSrc.cc index 9fec5d7e2..f4ad8e262 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDSrc.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestDnDSrc.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestFileTransfer.cc b/open-vm-tools/services/plugins/dndcp/dndGuest/guestFileTransfer.cc index b782b161f..737761481 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestFileTransfer.cc +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestFileTransfer.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/guestFileTransfer.hh b/open-vm-tools/services/plugins/dndcp/dndGuest/guestFileTransfer.hh index 13a0435af..654b6c1f6 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/guestFileTransfer.hh +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/guestFileTransfer.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV3Util.cpp b/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV3Util.cpp index f1754feff..987ecf5c1 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV3Util.cpp +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV3Util.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV4Util.cpp b/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV4Util.cpp index e04ec5890..861c6606d 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV4Util.cpp +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV4Util.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV4Util.hpp b/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV4Util.hpp index 13f3a30ca..496114cf4 100644 --- a/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV4Util.hpp +++ b/open-vm-tools/services/plugins/dndcp/dndGuest/rpcV4Util.hpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndPluginInt.h b/open-vm-tools/services/plugins/dndcp/dndPluginInt.h index f97c83fa0..53e8ea4bf 100644 --- a/open-vm-tools/services/plugins/dndcp/dndPluginInt.h +++ b/open-vm-tools/services/plugins/dndcp/dndPluginInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndPluginIntX11.h b/open-vm-tools/services/plugins/dndcp/dndPluginIntX11.h index f1c17e223..13ffac829 100644 --- a/open-vm-tools/services/plugins/dndcp/dndPluginIntX11.h +++ b/open-vm-tools/services/plugins/dndcp/dndPluginIntX11.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp b/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp index 97980828c..231479a99 100644 --- a/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp +++ b/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -128,7 +128,7 @@ DnDUIX11::~DnDUIX11() && !mHGStagingDir.empty()) { uint64 totalSize = File_GetSizeEx(mHGStagingDir.c_str()); if (mTotalFileSize != totalSize) { - g_debug("%s: deleting %s, expecting %"FMT64"d, finished %"FMT64"d\n", + g_debug("%s: deleting %s, expecting %" FMT64 "u, finished %" FMT64 "u\n", __FUNCTION__, mHGStagingDir.c_str(), mTotalFileSize, totalSize); DnD_DeleteStagingFiles(mHGStagingDir.c_str(), FALSE); @@ -251,7 +251,7 @@ DnDUIX11::InitGtk() TRACE_CALL(); /* Construct supported target list for HG DnD. */ - std::list targets; + std::vector targets; /* File DnD. */ targets.push_back(Gtk::TargetEntry(DRAG_TARGET_NAME_URI_LIST)); @@ -367,7 +367,7 @@ DnDUIX11::OnSrcDragBegin(const CPClipboard *clip, // IN * Construct the target and action list, as well as a fake motion notify * event that's consistent with one that would typically start a drag. */ - targets = Gtk::TargetList::create(std::list()); + targets = Gtk::TargetList::create(std::vector()); if (CPClipboard_ItemExists(&mClipboard, CPFORMAT_FILELIST)) { mHGStagingDir = stagingDir; @@ -414,7 +414,12 @@ DnDUIX11::OnSrcDragBegin(const CPClipboard *clip, // IN event.axes = NULL; event.state = GDK_BUTTON1_MASK; event.is_hint = 0; +#ifndef GTK3 event.device = gdk_device_get_core_pointer(); +#else + GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_window_get_display(event.window)); + event.device = gdk_device_manager_get_client_pointer(manager); +#endif event.x_root = mOrigin.get_x(); event.y_root = mOrigin.get_y(); @@ -763,7 +768,11 @@ DnDUIX11::OnMoveMouse(int32 x, // IN: Pointer x-coord // If we are the context of a DnD, send DnD feedback to the source. DND_DROPEFFECT effect; +#ifndef GTK3 effect = ToDropEffect((Gdk::DragAction)(mDragCtx->action)); +#else + effect = ToDropEffect((Gdk::DragAction)(gdk_drag_context_get_selected_action(mDragCtx))); +#endif if (effect != mEffect) { mEffect = effect; g_debug("%s: Updating feedback\n", __FUNCTION__); @@ -851,11 +860,16 @@ DnDUIX11::OnGtkDragMotion( * Gdk::DragContext::get_targets, but API/ABI broke between 2.10 and * 2.12, so we work around it like this for now. */ +#ifndef GTK3 Glib::ListHandle targets( dc->gobj()->targets, Glib::OWNERSHIP_NONE); +#else + Glib::ListHandle targets( + gdk_drag_context_list_targets(dc->gobj()), Glib::OWNERSHIP_NONE); +#endif - std::list as = targets; - std::list::iterator result; + std::vector as = targets; + std::vector::iterator result; char *pid; pid = Str_Asprintf(NULL, "guest-dnd-target %d", static_cast(getpid())); if (pid) { @@ -1125,14 +1139,14 @@ DnDUIX11::OnGtkDragDataGet( if ( TargetIsPlainText(target) && CPClipboard_GetItem(&mClipboard, CPFORMAT_TEXT, &buf, &sz)) { - g_debug("%s: providing plain text, size %"FMTSZ"u\n", __FUNCTION__, sz); + g_debug("%s: providing plain text, size %" FMTSZ "u\n", __FUNCTION__, sz); selection_data.set(target.c_str(), (const char *)buf); return; } if ( TargetIsRichText(target) && CPClipboard_GetItem(&mClipboard, CPFORMAT_RTF, &buf, &sz)) { - g_debug("%s: providing rtf text, size %"FMTSZ"u\n", __FUNCTION__, sz); + g_debug("%s: providing rtf text, size %" FMTSZ "u\n", __FUNCTION__, sz); selection_data.set(target.c_str(), (const char *)buf); return; } @@ -1457,7 +1471,7 @@ DnDUIX11::SetCPClipboardFromGtk(const Gtk::SelectionData& sd) // IN && source.size() < DNDMSG_MAX_ARGSZ && CPClipboard_SetItem(&mClipboard, CPFORMAT_TEXT, source.c_str(), source.size() + 1)) { - g_debug("%s: Got text, size %"FMTSZ"u\n", __FUNCTION__, source.size()); + g_debug("%s: Got text, size %" FMTSZ "u\n", __FUNCTION__, source.size()); } else { g_debug("%s: Failed to get text\n", __FUNCTION__); return false; @@ -1473,7 +1487,7 @@ DnDUIX11::SetCPClipboardFromGtk(const Gtk::SelectionData& sd) // IN && source.size() < DNDMSG_MAX_ARGSZ && CPClipboard_SetItem(&mClipboard, CPFORMAT_RTF, source.c_str(), source.size() + 1)) { - g_debug("%s: Got RTF, size %"FMTSZ"u\n", __FUNCTION__, source.size()); + g_debug("%s: Got RTF, size %" FMTSZ "u\n", __FUNCTION__, source.size()); return true; } else { g_debug("%s: Failed to get text\n", __FUNCTION__ ); @@ -1509,7 +1523,7 @@ DnDUIX11::RequestData( guint time) // IN: event timestamp { Glib::RefPtr targets; - targets = Gtk::TargetList::create(std::list()); + targets = Gtk::TargetList::create(std::vector()); CPClipboard_Clear(&mClipboard); mNumPendingRequest = 0; @@ -1757,9 +1771,13 @@ DnDUIX11::SendFakeXEvents( g_debug("%s: unable to get widget\n", __FUNCTION__); return false; } - +#ifndef GTK3 dndXDisplay = GDK_WINDOW_XDISPLAY(widget->window); dndXWindow = GDK_WINDOW_XWINDOW(widget->window); +#else + dndXDisplay = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(widget)); + dndXWindow = GDK_WINDOW_XID(gtk_widget_get_window(widget)); +#endif rootWnd = RootWindow(dndXDisplay, DefaultScreen(dndXDisplay)); /* @@ -1773,7 +1791,11 @@ DnDUIX11::SendFakeXEvents( if (showWidget) { g_debug("%s: showing Gtk widget\n", __FUNCTION__); gtk_widget_show(widget); +#ifndef GTK3 gdk_window_show(widget->window); +#else + gdk_window_show(gtk_widget_get_window(widget)); +#endif } /* Get the current location of the mouse if coordinates weren't provided. */ @@ -1937,8 +1959,11 @@ DnDUIX11::TryXTestFakeDeviceButtonEvent() g_debug("%s: unable to get widget\n", __FUNCTION__); return false; } - +#ifndef GTK3 dndXDisplay = GDK_WINDOW_XDISPLAY(widget->window); +#else + dndXDisplay = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(widget)); +#endif /* First get list of all input device. */ if (!(list = XListInputDevices (dndXDisplay, &numDevices))) { @@ -2229,7 +2254,7 @@ DnDUIX11::WriteFileContentsToStagingDir() if (!fileItem[i].cpName.cpName_val || 0 == fileItem[i].cpName.cpName_len) { - g_debug("%s: invalid fileItem[%"FMTSZ"u].cpName.\n", __FUNCTION__, i); + g_debug("%s: invalid fileItem[%" FMTSZ "u].cpName.\n", __FUNCTION__, i); goto exit; } diff --git a/open-vm-tools/services/plugins/dndcp/dndUIX11.h b/open-vm-tools/services/plugins/dndcp/dndUIX11.h index 0ab134974..4c2ba6c03 100644 --- a/open-vm-tools/services/plugins/dndcp/dndUIX11.h +++ b/open-vm-tools/services/plugins/dndcp/dndUIX11.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dndcp.cpp b/open-vm-tools/services/plugins/dndcp/dndcp.cpp index f0e69ecc8..645bc2544 100644 --- a/open-vm-tools/services/plugins/dndcp/dndcp.cpp +++ b/open-vm-tools/services/plugins/dndcp/dndcp.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/dragDetWndX11.cpp b/open-vm-tools/services/plugins/dndcp/dragDetWndX11.cpp index 94288bfff..11094ff3f 100644 --- a/open-vm-tools/services/plugins/dndcp/dragDetWndX11.cpp +++ b/open-vm-tools/services/plugins/dndcp/dragDetWndX11.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -219,11 +219,14 @@ DragDetWnd::SetGeometry(const int x, void DragDetWnd::GetGeometry(int &x, int &y, int &width, int &height) { - int dummy; - Glib::RefPtr gdkwin = get_window(); if (gdkwin) { +#ifndef GTK3 + int dummy; gdkwin->get_geometry(x, y, width, height, dummy); +#else + gdkwin->get_geometry(x, y, width, height); +#endif #if defined(DETWNDTEST) Flush(); #endif diff --git a/open-vm-tools/services/plugins/dndcp/dragDetWndX11.h b/open-vm-tools/services/plugins/dndcp/dragDetWndX11.h index c4fba84ad..8995f3d07 100644 --- a/open-vm-tools/services/plugins/dndcp/dragDetWndX11.h +++ b/open-vm-tools/services/plugins/dndcp/dragDetWndX11.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/pointer.cpp b/open-vm-tools/services/plugins/dndcp/pointer.cpp index 4c79026e3..4c74f74ae 100644 --- a/open-vm-tools/services/plugins/dndcp/pointer.cpp +++ b/open-vm-tools/services/plugins/dndcp/pointer.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/pointer.h b/open-vm-tools/services/plugins/dndcp/pointer.h index a69c1277d..3b1f9ec25 100644 --- a/open-vm-tools/services/plugins/dndcp/pointer.h +++ b/open-vm-tools/services/plugins/dndcp/pointer.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1999-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1999-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/string.cc b/open-vm-tools/services/plugins/dndcp/stringxx/string.cc index c4e0ba353..ddab1e706 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/string.cc +++ b/open-vm-tools/services/plugins/dndcp/stringxx/string.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -91,7 +91,11 @@ string::string(const char *s) // IN mUtf16Cache(NULL), mUtf16Length(npos) { - ASSERT(s); + // If the input is NULL, then there's nothing to do. + if (UNLIKELY(s == NULL)) { + return; + } + mUstr = s; ASSERT(Validate(mUstr)); } @@ -225,7 +229,10 @@ string::string(const utf16_t *s) // IN mUtf16Cache(NULL), mUtf16Length(npos) { - ASSERT(s != NULL); + // If the input is NULL, then there's nothing to do. + if (UNLIKELY(s == NULL)) { + return; + } /* * Since we already have a UTF-16 representation of the string, copy it @@ -261,7 +268,10 @@ string::string(const char *s, // IN mUtf16Cache(NULL), mUtf16Length(npos) { - ASSERT(s != NULL); + // If the input is NULL, then there's nothing to do. + if (UNLIKELY(s == NULL)) { + return; + } mUstr = AutoCPtr(Unicode_Alloc(s, encoding), free).get(); diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/string.hh b/open-vm-tools/services/plugins/dndcp/stringxx/string.hh index 138610f81..bec5ec73a 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/string.hh +++ b/open-vm-tools/services/plugins/dndcp/stringxx/string.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -39,6 +39,22 @@ #pragma pack(push, 8) #endif // _WIN32 +/* + * Include glib.h here as a work-around - hopefully temporary - for a + * compilation error that would otherwise occur as a result of the + * inclusion of on the next line. The compilation + * error that would otherwise occur is the result of: + * (1) nested includes in ultimately include a + * glib-related header file other than glib.h; but + * (2) including a glib header file other than glib.h outside + * of glib code is not allowed with the latest glib. + * + * Although including glib.h here does not actually fix the underlying + * problem, it does turn off the complaint. It's believed (hoped?) that + * an upgrade of glibmm will fix the issue properly and eliminate the + * need to include here. + */ +#include #include #ifdef _WIN32 diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/ubstr_t.hh b/open-vm-tools/services/plugins/dndcp/stringxx/ubstr_t.hh index e8031340c..f5341a3b4 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/ubstr_t.hh +++ b/open-vm-tools/services/plugins/dndcp/stringxx/ubstr_t.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/xutils/xutils.cc b/open-vm-tools/services/plugins/dndcp/xutils/xutils.cc index db2b54264..7915ecd9d 100644 --- a/open-vm-tools/services/plugins/dndcp/xutils/xutils.cc +++ b/open-vm-tools/services/plugins/dndcp/xutils/xutils.cc @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/dndcp/xutils/xutils.hh b/open-vm-tools/services/plugins/dndcp/xutils/xutils.hh index a660ce068..3ef8d75f4 100644 --- a/open-vm-tools/services/plugins/dndcp/xutils/xutils.hh +++ b/open-vm-tools/services/plugins/dndcp/xutils/xutils.hh @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/grabbitmqProxy/Makefile.am b/open-vm-tools/services/plugins/grabbitmqProxy/Makefile.am index e8d769557..bc33b393c 100644 --- a/open-vm-tools/services/plugins/grabbitmqProxy/Makefile.am +++ b/open-vm-tools/services/plugins/grabbitmqProxy/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2014-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/grabbitmqProxy/Makefile.in b/open-vm-tools/services/plugins/grabbitmqProxy/Makefile.in deleted file mode 100644 index 8ca0e87d0..000000000 --- a/open-vm-tools/services/plugins/grabbitmqProxy/Makefile.in +++ /dev/null @@ -1,577 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/grabbitmqProxy -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libgrabbitmqProxy_la_DEPENDENCIES = -am_libgrabbitmqProxy_la_OBJECTS = \ - libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo -libgrabbitmqProxy_la_OBJECTS = $(am_libgrabbitmqProxy_la_OBJECTS) -libgrabbitmqProxy_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libgrabbitmqProxy_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libgrabbitmqProxy_la_SOURCES) -DIST_SOURCES = $(libgrabbitmqProxy_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libgrabbitmqProxy.la -libgrabbitmqProxy_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ @SSL_CPPFLAGS@ -libgrabbitmqProxy_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libgrabbitmqProxy_la_LIBADD = @VMTOOLS_LIBS@ @SSL_LIBS@ -libgrabbitmqProxy_la_SOURCES = grabbitmqProxyPlugin.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/grabbitmqProxy/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/grabbitmqProxy/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libgrabbitmqProxy.la: $(libgrabbitmqProxy_la_OBJECTS) $(libgrabbitmqProxy_la_DEPENDENCIES) - $(libgrabbitmqProxy_la_LINK) -rpath $(plugindir) $(libgrabbitmqProxy_la_OBJECTS) $(libgrabbitmqProxy_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrabbitmqProxy_la-grabbitmqProxyPlugin.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo: grabbitmqProxyPlugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgrabbitmqProxy_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo -MD -MP -MF $(DEPDIR)/libgrabbitmqProxy_la-grabbitmqProxyPlugin.Tpo -c -o libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo `test -f 'grabbitmqProxyPlugin.c' || echo '$(srcdir)/'`grabbitmqProxyPlugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libgrabbitmqProxy_la-grabbitmqProxyPlugin.Tpo $(DEPDIR)/libgrabbitmqProxy_la-grabbitmqProxyPlugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grabbitmqProxyPlugin.c' object='libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgrabbitmqProxy_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgrabbitmqProxy_la-grabbitmqProxyPlugin.lo `test -f 'grabbitmqProxyPlugin.c' || echo '$(srcdir)/'`grabbitmqProxyPlugin.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c index 9451dccb9..fee0f5edc 100644 --- a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c +++ b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -1299,17 +1299,35 @@ TheSslContext(void) const char *certFile; const char *keyFile; const char *trustDir; + long sslCtxOptions; if (sslCtx) { goto done; } - workingCtx = SSL_CTX_new(SSLv23_server_method()); + workingCtx = SSL_NewContext(); if (!workingCtx) { g_warning("Cannot create the SSL context.\n"); goto done; } + /* + * The bora/lib/ssl code not yet ready to disable TLS1, and TLS1_1, + * we shall remove the code below once it is able to. + */ + sslCtxOptions = SSL_CTX_get_options(workingCtx); + /* Allow only TLSv1_2 */ + +#ifdef SSL_OP_NO_TLSv1 + sslCtxOptions |= SSL_OP_NO_TLSv1; +#endif + +#ifdef SSL_OP_NO_TLSv1_1 + sslCtxOptions |= SSL_OP_NO_TLSv1_1; +#endif + + SSL_CTX_set_options(workingCtx, sslCtxOptions); + certFile = GetSslCertFile(); if (!certFile) { g_warning("Cannot find the certificate file\n"); diff --git a/open-vm-tools/services/plugins/grabbitmqProxy/rabbitmqProxyConst.h b/open-vm-tools/services/plugins/grabbitmqProxy/rabbitmqProxyConst.h index 1953b2c76..c1f8df9a4 100644 --- a/open-vm-tools/services/plugins/grabbitmqProxy/rabbitmqProxyConst.h +++ b/open-vm-tools/services/plugins/grabbitmqProxy/rabbitmqProxyConst.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/guestInfo/Makefile.am b/open-vm-tools/services/plugins/guestInfo/Makefile.am index 4ac05f48d..4400e5a1a 100644 --- a/open-vm-tools/services/plugins/guestInfo/Makefile.am +++ b/open-vm-tools/services/plugins/guestInfo/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/guestInfo/Makefile.in b/open-vm-tools/services/plugins/guestInfo/Makefile.in deleted file mode 100644 index 65062a5b1..000000000 --- a/open-vm-tools/services/plugins/guestInfo/Makefile.in +++ /dev/null @@ -1,721 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_DNET_TRUE@am__append_1 = @DNET_LIBS@ -subdir = services/plugins/guestInfo -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -am__DEPENDENCIES_1 = -libguestInfo_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libguestInfo_la_OBJECTS = libguestInfo_la-guestInfoServer.lo \ - libguestInfo_la-perfMonLinux.lo libguestInfo_la-diskInfo.lo \ - libguestInfo_la-diskInfoPosix.lo -libguestInfo_la_OBJECTS = $(am_libguestInfo_la_OBJECTS) -libguestInfo_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libguestInfo_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libguestInfo_la_SOURCES) -DIST_SOURCES = $(libguestInfo_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libguestInfo.la -libguestInfo_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libguestInfo_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libguestInfo_la_LIBADD = @VMTOOLS_LIBS@ @PROCPS_LIBS@ @XDR_LIBS@ \ - $(am__append_1) -libguestInfo_la_SOURCES = guestInfoServer.c perfMonLinux.c diskInfo.c \ - diskInfoPosix.c -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/guestInfo/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/guestInfo/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libguestInfo.la: $(libguestInfo_la_OBJECTS) $(libguestInfo_la_DEPENDENCIES) - $(libguestInfo_la_LINK) -rpath $(plugindir) $(libguestInfo_la_OBJECTS) $(libguestInfo_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestInfo_la-diskInfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestInfo_la-diskInfoPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestInfo_la-guestInfoServer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libguestInfo_la-perfMonLinux.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libguestInfo_la-guestInfoServer.lo: guestInfoServer.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestInfo_la-guestInfoServer.lo -MD -MP -MF $(DEPDIR)/libguestInfo_la-guestInfoServer.Tpo -c -o libguestInfo_la-guestInfoServer.lo `test -f 'guestInfoServer.c' || echo '$(srcdir)/'`guestInfoServer.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestInfo_la-guestInfoServer.Tpo $(DEPDIR)/libguestInfo_la-guestInfoServer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='guestInfoServer.c' object='libguestInfo_la-guestInfoServer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestInfo_la-guestInfoServer.lo `test -f 'guestInfoServer.c' || echo '$(srcdir)/'`guestInfoServer.c - -libguestInfo_la-perfMonLinux.lo: perfMonLinux.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestInfo_la-perfMonLinux.lo -MD -MP -MF $(DEPDIR)/libguestInfo_la-perfMonLinux.Tpo -c -o libguestInfo_la-perfMonLinux.lo `test -f 'perfMonLinux.c' || echo '$(srcdir)/'`perfMonLinux.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestInfo_la-perfMonLinux.Tpo $(DEPDIR)/libguestInfo_la-perfMonLinux.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='perfMonLinux.c' object='libguestInfo_la-perfMonLinux.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestInfo_la-perfMonLinux.lo `test -f 'perfMonLinux.c' || echo '$(srcdir)/'`perfMonLinux.c - -libguestInfo_la-diskInfo.lo: diskInfo.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestInfo_la-diskInfo.lo -MD -MP -MF $(DEPDIR)/libguestInfo_la-diskInfo.Tpo -c -o libguestInfo_la-diskInfo.lo `test -f 'diskInfo.c' || echo '$(srcdir)/'`diskInfo.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestInfo_la-diskInfo.Tpo $(DEPDIR)/libguestInfo_la-diskInfo.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diskInfo.c' object='libguestInfo_la-diskInfo.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestInfo_la-diskInfo.lo `test -f 'diskInfo.c' || echo '$(srcdir)/'`diskInfo.c - -libguestInfo_la-diskInfoPosix.lo: diskInfoPosix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libguestInfo_la-diskInfoPosix.lo -MD -MP -MF $(DEPDIR)/libguestInfo_la-diskInfoPosix.Tpo -c -o libguestInfo_la-diskInfoPosix.lo `test -f 'diskInfoPosix.c' || echo '$(srcdir)/'`diskInfoPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libguestInfo_la-diskInfoPosix.Tpo $(DEPDIR)/libguestInfo_la-diskInfoPosix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diskInfoPosix.c' object='libguestInfo_la-diskInfoPosix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libguestInfo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libguestInfo_la-diskInfoPosix.lo `test -f 'diskInfoPosix.c' || echo '$(srcdir)/'`diskInfoPosix.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-pluginLTLIBRARIES ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/guestInfo/diskInfo.c b/open-vm-tools/services/plugins/guestInfo/diskInfo.c index 2500ff900..35dd682fa 100644 --- a/open-vm-tools/services/plugins/guestInfo/diskInfo.c +++ b/open-vm-tools/services/plugins/guestInfo/diskInfo.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/guestInfo/diskInfoPosix.c b/open-vm-tools/services/plugins/guestInfo/diskInfoPosix.c index b672e1adf..dc23e6bf9 100644 --- a/open-vm-tools/services/plugins/guestInfo/diskInfoPosix.c +++ b/open-vm-tools/services/plugins/guestInfo/diskInfoPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2014-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/guestInfo/guestInfoInt.h b/open-vm-tools/services/plugins/guestInfo/guestInfoInt.h index f55f04866..52eed777d 100644 --- a/open-vm-tools/services/plugins/guestInfo/guestInfoInt.h +++ b/open-vm-tools/services/plugins/guestInfo/guestInfoInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -27,6 +27,7 @@ #define G_LOG_DOMAIN "guestinfo" #include "vmware/tools/log.h" +#include "vmware/tools/plugin.h" #include "nicInfo.h" #include "dynbuf.h" @@ -53,12 +54,11 @@ extern int guestInfoPollInterval; Bool -GuestInfo_PerfMon(DynBuf *stats); +GuestInfo_ServerReportStats(ToolsAppCtx *ctx, // IN + DynBuf *stats); // IN -#if defined(_WIN32) -void -GuestInfo_SetStatLogging(Bool isEnabled); -#endif +gboolean +GuestInfo_StatProviderPoll(gpointer data); GuestDiskInfo * GuestInfoGetDiskInfoWiper(void); diff --git a/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c b/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c index 3cb5e39ae..59afde422 100644 --- a/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c +++ b/open-vm-tools/services/plugins/guestInfo/guestInfoServer.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2015 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -63,6 +63,7 @@ #if defined(_WIN32) #include "guestStats.h" #include "win32/guestInfoWin32.h" +#include #endif #if !defined(__APPLE__) @@ -118,6 +119,14 @@ typedef struct _GuestInfoCache { */ int guestInfoPollInterval = 0; +/** + * The time when the guestInfo was last gathered. + * + * TODO: Need to reset this value when a VM is resumed or restored from a + * snapshot. + */ +time_t guestInfoLastGatherTime = 0; + /** * Defines the current stats interval (in milliseconds). * @@ -251,6 +260,58 @@ GuestInfoVMSupport(RpcInData *data) } +/* + ****************************************************************************** + * GuestInfoCheckIfRunningSlow -- */ /** + * + * Checks the time when the guestInfo was last collected. + * Logs a warning message and sends a RPC message to the VMX if + * the function was called after longer than expected interval. + * + * @param[in] ctx The application context. + * + * @return None + * + ****************************************************************************** + */ + +static void +GuestInfoCheckIfRunningSlow(ToolsAppCtx *ctx) +{ + time_t now = time(NULL); + + if (guestInfoLastGatherTime != 0) { + time_t delta = now - guestInfoLastGatherTime; + /* + * Have a long enough delta to ensure that we have really missed a + * collection. + */ + if (((int) delta * 1000) >= (2 * guestInfoPollInterval)) { + gchar *msg, *rpcMsg; + + msg = g_strdup_printf( + "*** WARNING: GuestInfo collection interval longer than " + "expected; actual=%d sec, expected=%d sec. ***\n", + (int) delta, guestInfoPollInterval / 1000); + + rpcMsg = g_strdup_printf("log %s", msg); + + if (!RpcChannel_Send(ctx->rpc, rpcMsg, strlen(rpcMsg) + 1, + NULL, NULL)) { + g_warning("%s: Error sending rpc message.\n", __FUNCTION__); + } + + g_warning("%s", msg); + + g_free(rpcMsg); + g_free(msg); + } + } + + guestInfoLastGatherTime = now; +} + + /* ****************************************************************************** * GuestInfoGather -- */ /** @@ -279,6 +340,8 @@ GuestInfoGather(gpointer data) g_debug("Entered guest info gather.\n"); + GuestInfoCheckIfRunningSlow(ctx); + /* Send tools version. */ if (!GuestInfoUpdateVmdb(ctx, INFO_BUILD_NUMBER, BUILD_NUMBER, 0)) { /* @@ -366,61 +429,6 @@ GuestInfoGather(gpointer data) } -/* - ****************************************************************************** - * GuestInfoStatsGather -- */ /** - * - * Collects all the desired guest stats and updates the VMX. - * - * @param[in] data The application context. - * - * @return TRUE to indicate that the timer should be rescheduled. - * - ****************************************************************************** - */ - -static gboolean -GuestInfoStatsGather(gpointer data) -{ -#if (defined(__linux__) && !defined(USERWORLD)) || defined(_WIN32) - ToolsAppCtx *ctx = data; - DynBuf stats; -#endif -#if defined(_WIN32) - gboolean perfmonLogStats; -#endif - - g_debug("Entered guest info stats gather.\n"); - -#if defined(_WIN32) - perfmonLogStats = g_key_file_get_boolean(ctx->config, - CONFGROUPNAME_GUESTINFO, - CONFNAME_GUESTINFO_ENABLESTATLOGGING, - NULL); - - GuestInfo_SetStatLogging(perfmonLogStats); -#endif - -#if (defined(__linux__) && !defined(USERWORLD)) || defined(_WIN32) - /* Send the vmstats to the VMX. */ - DynBuf_Init(&stats); - - if (GuestInfo_PerfMon(&stats)) { - if (!GuestInfoUpdateVmdb(ctx, INFO_MEMORY, DynBuf_Get(&stats), - DynBuf_GetSize(&stats))) { - g_warning("Failed to send vmstats.\n"); - } - } else { - g_warning("Failed to get vmstats.\n"); - } - - DynBuf_Destroy(&stats); -#endif - - return TRUE; -} - - /* ****************************************************************************** * GuestInfoConvertNicInfoToNicInfoV1 -- */ /** @@ -832,6 +840,15 @@ GuestInfoSendNicInfo(ToolsAppCtx *ctx, // IN ****************************************************************************** */ + +#if defined(_WIN64) && (_MSC_VER == 1500) && GLIB_CHECK_VERSION(2, 46, 0) +/* + * Turn off optimizer for this compiler, since something with new glib + * makes it go into an infinite loop, only on 64bit. + */ +#pragma optimize("", off) +#endif + static Bool GuestInfoUpdateVmdb(ToolsAppCtx *ctx, // IN: Application context GuestInfoType infoType, // IN: guest information type @@ -981,6 +998,12 @@ GuestInfoUpdateVmdb(ToolsAppCtx *ctx, // IN: Application context g_debug("Returning after updating guest information: %d\n", infoType); return TRUE; } +#if defined(_WIN64) && (_MSC_VER == 1500) && GLIB_CHECK_VERSION(2, 46, 0) +/* + * Restore optimizer. + */ +#pragma optimize("", on) +#endif /* @@ -1307,25 +1330,27 @@ TweakGatherLoop(ToolsAppCtx *ctx, } } - /* - * If the interval hasn't changed, let's not interfere with the existing - * timeout source. - */ - if (pollInterval == *currInterval) { - ASSERT(pollInterval || *timeoutSource == NULL); - return; - } + if (*timeoutSource != NULL) { + /* + * If the interval hasn't changed, let's not interfere with the existing + * timeout source. + */ + if (pollInterval == *currInterval) { + ASSERT(pollInterval); + return; + } - /* - * All checks have passed. Destroy the existing timeout source, if it - * exists, then create and attach a new one. - */ + /* + * Destroy the existing timeout source since the interval has changed. + */ - if (*timeoutSource != NULL) { g_source_destroy(*timeoutSource); *timeoutSource = NULL; } + /* + * All checks have passed. Create a new timeout source and attach it. + */ *currInterval = pollInterval; if (*currInterval) { @@ -1362,6 +1387,7 @@ static void TweakGatherLoops(ToolsAppCtx *ctx, gboolean enable) { +#if (defined(__linux__) && !defined(USERWORLD)) || defined(_WIN32) gboolean perfmonEnabled; perfmonEnabled = !g_key_file_get_boolean(ctx->config, @@ -1376,7 +1402,7 @@ TweakGatherLoops(ToolsAppCtx *ctx, TweakGatherLoop(ctx, enable, CONFNAME_GUESTINFO_STATSINTERVAL, GUESTINFO_STATS_INTERVAL, - GuestInfoStatsGather, + GuestInfo_StatProviderPoll, &guestInfoStatsInterval, &gatherStatsTimeoutSource); } else { @@ -1390,6 +1416,7 @@ TweakGatherLoops(ToolsAppCtx *ctx, g_info("PerfMon gather loop disabled.\n"); } } +#endif /* * Tweak GuestInfo gather loop @@ -1403,6 +1430,34 @@ TweakGatherLoops(ToolsAppCtx *ctx, } +/* + ****************************************************************************** + * + * GuestInfo_ServerReportStats -- + * + * Report gathered stats. + * + * Results: + * Stats reported to VMX/VMDB. Returns FALSE on failure. + * + * Side effects: + * None. + * + ****************************************************************************** + */ + +Bool +GuestInfo_ServerReportStats( + ToolsAppCtx *ctx, // IN + DynBuf *stats) // IN +{ + return GuestInfoUpdateVmdb(ctx, + INFO_MEMORY, + DynBuf_Get(stats), + DynBuf_GetSize(stats)); +} + + /* ****************************************************************************** * BEGIN Tools Core Services goodies. diff --git a/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c b/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c index 9946d4208..1aa96fc58 100644 --- a/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c +++ b/open-vm-tools/services/plugins/guestInfo/perfMonLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -1108,7 +1108,7 @@ GuestInfoConstructCollector(GuestInfoQuery *queries, // IN: /* *---------------------------------------------------------------------- * - * GuestInfo_PerfMon -- + * GuestInfoTakeSample -- * * Gather performance stats. * @@ -1123,7 +1123,7 @@ GuestInfoConstructCollector(GuestInfoQuery *queries, // IN: */ Bool -GuestInfo_PerfMon(DynBuf *statBuf) // IN/OUT: inited, ready to fill +GuestInfoTakeSample(DynBuf *statBuf) // IN/OUT: inited, ready to fill { GuestInfoCollector *temp; static GuestInfoCollector *current = NULL; @@ -1168,3 +1168,40 @@ GuestInfo_PerfMon(DynBuf *statBuf) // IN/OUT: inited, ready to fill return TRUE; } + +/* + *---------------------------------------------------------------------- + * + * GuestInfo_StatProviderPoll -- + * + * Called when a new stat sample is requested. GuestInfo_ReportStats + * should be called once the sample is available. If gathering is taking + * longer than sampling frequency, the request may be ignored. + * + * @param[in] data The application context. + * + * @return TRUE to indicate that the timer should be rescheduled. + * + *---------------------------------------------------------------------- + */ + +gboolean +GuestInfo_StatProviderPoll(gpointer data) +{ + ToolsAppCtx *ctx = data; + DynBuf stats; + + g_debug("Entered guest info stats gather.\n"); + + /* Send the vmstats to the VMX. */ + DynBuf_Init(&stats); + + if (!GuestInfoTakeSample(&stats)) { + g_warning("Failed to get vmstats.\n"); + } else if (!GuestInfo_ServerReportStats(ctx, &stats)) { + g_warning("Failed to send vmstats.\n"); + } + + DynBuf_Destroy(&stats); + return TRUE; +} diff --git a/open-vm-tools/services/plugins/hgfsServer/Makefile.am b/open-vm-tools/services/plugins/hgfsServer/Makefile.am index 1e7909566..ca8833dd7 100644 --- a/open-vm-tools/services/plugins/hgfsServer/Makefile.am +++ b/open-vm-tools/services/plugins/hgfsServer/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/hgfsServer/Makefile.in b/open-vm-tools/services/plugins/hgfsServer/Makefile.in deleted file mode 100644 index 43969caba..000000000 --- a/open-vm-tools/services/plugins/hgfsServer/Makefile.in +++ /dev/null @@ -1,576 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/hgfsServer -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libhgfsServer_la_DEPENDENCIES = -am_libhgfsServer_la_OBJECTS = libhgfsServer_la-hgfsPlugin.lo -libhgfsServer_la_OBJECTS = $(am_libhgfsServer_la_OBJECTS) -libhgfsServer_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libhgfsServer_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libhgfsServer_la_SOURCES) -DIST_SOURCES = $(libhgfsServer_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @COMMON_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libhgfsServer.la -libhgfsServer_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libhgfsServer_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libhgfsServer_la_LIBADD = @VMTOOLS_LIBS@ @HGFS_LIBS@ -libhgfsServer_la_SOURCES = hgfsPlugin.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/hgfsServer/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/hgfsServer/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libhgfsServer.la: $(libhgfsServer_la_OBJECTS) $(libhgfsServer_la_DEPENDENCIES) - $(libhgfsServer_la_LINK) -rpath $(plugindir) $(libhgfsServer_la_OBJECTS) $(libhgfsServer_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhgfsServer_la-hgfsPlugin.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libhgfsServer_la-hgfsPlugin.lo: hgfsPlugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhgfsServer_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhgfsServer_la-hgfsPlugin.lo -MD -MP -MF $(DEPDIR)/libhgfsServer_la-hgfsPlugin.Tpo -c -o libhgfsServer_la-hgfsPlugin.lo `test -f 'hgfsPlugin.c' || echo '$(srcdir)/'`hgfsPlugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libhgfsServer_la-hgfsPlugin.Tpo $(DEPDIR)/libhgfsServer_la-hgfsPlugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hgfsPlugin.c' object='libhgfsServer_la-hgfsPlugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhgfsServer_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhgfsServer_la-hgfsPlugin.lo `test -f 'hgfsPlugin.c' || echo '$(srcdir)/'`hgfsPlugin.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c b/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c index a19187963..34dfefa73 100644 --- a/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c +++ b/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -22,6 +22,9 @@ * Functionality to utilize the hgfs server in bora/lib as a tools plugin. */ +#if defined(_WIN32) +#include +#endif // defined(_WIN32) #include #define G_LOG_DOMAIN "hgfsd" @@ -144,6 +147,89 @@ HgfsServerCapReg(gpointer src, } +#if defined(_WIN32) +/** + * Starts the client driver service. + * + * @param[in] serviceControlManager Service Control Manager handle. + * @param[in] driverName Name of the driver service to start. + * + * @return ERROR_SUCCESS on success, an appropriate error otherwise. + */ + +static DWORD +HgfsServerStartClientService(SC_HANDLE serviceControlManager, // IN: control manager + PCWSTR driverName) // IN: driver name +{ + SC_HANDLE service; + DWORD result = ERROR_SUCCESS; + + g_info("%s: starting service %S\n", __FUNCTION__, driverName); + + /* + * Open the handle to the existing service. + */ + service = OpenServiceW(serviceControlManager, driverName, SERVICE_ALL_ACCESS); + if (NULL == service) { + result = GetLastError(); + g_warning("%s: Error: open service %S = %d \n", __FUNCTION__, driverName, result); + goto exit; + } + + /* + * Start the execution of the service (i.e. start the driver). + */ + if (!StartServiceW(service, 0, NULL)) { + result = GetLastError(); + + if (ERROR_SERVICE_ALREADY_RUNNING == result) { + result = ERROR_SUCCESS; + } else { + g_warning("%s: Error: start service %S = %d \n", __FUNCTION__, driverName, result); + } + goto exit; + } + +exit: + if (NULL != service) { + CloseServiceHandle(service); + } + + return result; +} +#endif // defined(_WIN32) + + +/** + * Start the HGFS client redirector. + * + * @return None. + */ + +static void +HgfsServerStartClientRedirector(void) +{ +#if defined(_WIN32) + SC_HANDLE serviceControlManager = NULL; + PCWSTR driverName = L"vmhgfs"; + DWORD result = ERROR_SUCCESS; + + serviceControlManager = OpenSCManagerW(NULL, NULL, SERVICE_START); + if (NULL == serviceControlManager) { + result = GetLastError(); + g_warning("%s: Error: Open SC Manager = %d \n", __FUNCTION__, result); + goto exit; + } + result = HgfsServerStartClientService(serviceControlManager, driverName); + +exit: + if (NULL != serviceControlManager) { + CloseServiceHandle(serviceControlManager); + } +#endif // defined(_WIN32) +} + + /** * Returns the registration data for the HGFS server. * @@ -167,6 +253,11 @@ ToolsOnLoad(ToolsAppCtx *ctx) return NULL; } + if (TOOLS_IS_MAIN_SERVICE(ctx)) { + /* Start the Shared Folders redirector client. */ + HgfsServerStartClientRedirector(); + } + mgrData = g_malloc0(sizeof *mgrData); HgfsServerManager_DataInit(mgrData, ctx->name, diff --git a/open-vm-tools/services/plugins/powerOps/Makefile.am b/open-vm-tools/services/plugins/powerOps/Makefile.am index 3c8bcc6b4..4896690d3 100644 --- a/open-vm-tools/services/plugins/powerOps/Makefile.am +++ b/open-vm-tools/services/plugins/powerOps/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/powerOps/Makefile.in b/open-vm-tools/services/plugins/powerOps/Makefile.in deleted file mode 100644 index 9eeffc67e..000000000 --- a/open-vm-tools/services/plugins/powerOps/Makefile.in +++ /dev/null @@ -1,576 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/powerOps -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libpowerOps_la_DEPENDENCIES = -am_libpowerOps_la_OBJECTS = libpowerOps_la-powerOps.lo -libpowerOps_la_OBJECTS = $(am_libpowerOps_la_OBJECTS) -libpowerOps_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libpowerOps_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libpowerOps_la_SOURCES) -DIST_SOURCES = $(libpowerOps_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libpowerOps.la -libpowerOps_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libpowerOps_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libpowerOps_la_LIBADD = @VMTOOLS_LIBS@ -libpowerOps_la_SOURCES = powerOps.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/powerOps/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/powerOps/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libpowerOps.la: $(libpowerOps_la_OBJECTS) $(libpowerOps_la_DEPENDENCIES) - $(libpowerOps_la_LINK) -rpath $(plugindir) $(libpowerOps_la_OBJECTS) $(libpowerOps_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpowerOps_la-powerOps.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libpowerOps_la-powerOps.lo: powerOps.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpowerOps_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpowerOps_la-powerOps.lo -MD -MP -MF $(DEPDIR)/libpowerOps_la-powerOps.Tpo -c -o libpowerOps_la-powerOps.lo `test -f 'powerOps.c' || echo '$(srcdir)/'`powerOps.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libpowerOps_la-powerOps.Tpo $(DEPDIR)/libpowerOps_la-powerOps.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='powerOps.c' object='libpowerOps_la-powerOps.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpowerOps_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpowerOps_la-powerOps.lo `test -f 'powerOps.c' || echo '$(srcdir)/'`powerOps.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/powerOps/powerOps.c b/open-vm-tools/services/plugins/powerOps/powerOps.c index 7d46e029d..3f7a1bf92 100644 --- a/open-vm-tools/services/plugins/powerOps/powerOps.c +++ b/open-vm-tools/services/plugins/powerOps/powerOps.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/resolutionSet/Makefile.am b/open-vm-tools/services/plugins/resolutionSet/Makefile.am index 75432d7f8..3d8dbc4f1 100644 --- a/open-vm-tools/services/plugins/resolutionSet/Makefile.am +++ b/open-vm-tools/services/plugins/resolutionSet/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/resolutionSet/Makefile.in b/open-vm-tools/services/plugins/resolutionSet/Makefile.in deleted file mode 100644 index b33790c2b..000000000 --- a/open-vm-tools/services/plugins/resolutionSet/Makefile.in +++ /dev/null @@ -1,605 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/resolutionSet -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libresolutionSet_la_DEPENDENCIES = -am_libresolutionSet_la_OBJECTS = libresolutionSet_la-libvmwarectrl.lo \ - libresolutionSet_la-resolutionSet.lo \ - libresolutionSet_la-resolutionX11.lo \ - libresolutionSet_la-resolutionRandR12.lo -libresolutionSet_la_OBJECTS = $(am_libresolutionSet_la_OBJECTS) -libresolutionSet_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libresolutionSet_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libresolutionSet_la_SOURCES) -DIST_SOURCES = $(libresolutionSet_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMUSR_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libresolutionSet.la -libresolutionSet_la_CPPFLAGS = @GTK_CPPFLAGS@ @PLUGIN_CPPFLAGS@ \ - -DRESOLUTION_X11 -libresolutionSet_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libresolutionSet_la_LIBADD = @COMMON_XLIBS@ @GTK_LIBS@ @VMTOOLS_LIBS@ -libresolutionSet_la_SOURCES = libvmwarectrl.c resolutionSet.c \ - resolutionX11.c resolutionRandR12.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/resolutionSet/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/resolutionSet/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libresolutionSet.la: $(libresolutionSet_la_OBJECTS) $(libresolutionSet_la_DEPENDENCIES) - $(libresolutionSet_la_LINK) -rpath $(plugindir) $(libresolutionSet_la_OBJECTS) $(libresolutionSet_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libresolutionSet_la-libvmwarectrl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libresolutionSet_la-resolutionRandR12.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libresolutionSet_la-resolutionSet.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libresolutionSet_la-resolutionX11.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libresolutionSet_la-libvmwarectrl.lo: libvmwarectrl.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libresolutionSet_la-libvmwarectrl.lo -MD -MP -MF $(DEPDIR)/libresolutionSet_la-libvmwarectrl.Tpo -c -o libresolutionSet_la-libvmwarectrl.lo `test -f 'libvmwarectrl.c' || echo '$(srcdir)/'`libvmwarectrl.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libresolutionSet_la-libvmwarectrl.Tpo $(DEPDIR)/libresolutionSet_la-libvmwarectrl.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libvmwarectrl.c' object='libresolutionSet_la-libvmwarectrl.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libresolutionSet_la-libvmwarectrl.lo `test -f 'libvmwarectrl.c' || echo '$(srcdir)/'`libvmwarectrl.c - -libresolutionSet_la-resolutionSet.lo: resolutionSet.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libresolutionSet_la-resolutionSet.lo -MD -MP -MF $(DEPDIR)/libresolutionSet_la-resolutionSet.Tpo -c -o libresolutionSet_la-resolutionSet.lo `test -f 'resolutionSet.c' || echo '$(srcdir)/'`resolutionSet.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libresolutionSet_la-resolutionSet.Tpo $(DEPDIR)/libresolutionSet_la-resolutionSet.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolutionSet.c' object='libresolutionSet_la-resolutionSet.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libresolutionSet_la-resolutionSet.lo `test -f 'resolutionSet.c' || echo '$(srcdir)/'`resolutionSet.c - -libresolutionSet_la-resolutionX11.lo: resolutionX11.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libresolutionSet_la-resolutionX11.lo -MD -MP -MF $(DEPDIR)/libresolutionSet_la-resolutionX11.Tpo -c -o libresolutionSet_la-resolutionX11.lo `test -f 'resolutionX11.c' || echo '$(srcdir)/'`resolutionX11.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libresolutionSet_la-resolutionX11.Tpo $(DEPDIR)/libresolutionSet_la-resolutionX11.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolutionX11.c' object='libresolutionSet_la-resolutionX11.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libresolutionSet_la-resolutionX11.lo `test -f 'resolutionX11.c' || echo '$(srcdir)/'`resolutionX11.c - -libresolutionSet_la-resolutionRandR12.lo: resolutionRandR12.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libresolutionSet_la-resolutionRandR12.lo -MD -MP -MF $(DEPDIR)/libresolutionSet_la-resolutionRandR12.Tpo -c -o libresolutionSet_la-resolutionRandR12.lo `test -f 'resolutionRandR12.c' || echo '$(srcdir)/'`resolutionRandR12.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libresolutionSet_la-resolutionRandR12.Tpo $(DEPDIR)/libresolutionSet_la-resolutionRandR12.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolutionRandR12.c' object='libresolutionSet_la-resolutionRandR12.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libresolutionSet_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libresolutionSet_la-resolutionRandR12.lo `test -f 'resolutionRandR12.c' || echo '$(srcdir)/'`resolutionRandR12.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/resolutionSet/resolutionInt.h b/open-vm-tools/services/plugins/resolutionSet/resolutionInt.h index 0a1834b52..55bb7041d 100644 --- a/open-vm-tools/services/plugins/resolutionSet/resolutionInt.h +++ b/open-vm-tools/services/plugins/resolutionSet/resolutionInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c b/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c index fe5d170da..84b788b7e 100644 --- a/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c +++ b/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.h b/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.h index c8f53f22c..6c83946e8 100644 --- a/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.h +++ b/open-vm-tools/services/plugins/resolutionSet/resolutionRandR12.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/resolutionSet/resolutionSet.c b/open-vm-tools/services/plugins/resolutionSet/resolutionSet.c index 92e031465..96c834996 100644 --- a/open-vm-tools/services/plugins/resolutionSet/resolutionSet.c +++ b/open-vm-tools/services/plugins/resolutionSet/resolutionSet.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/resolutionSet/resolutionX11.c b/open-vm-tools/services/plugins/resolutionSet/resolutionX11.c index 2ad13ccc9..3c5c12078 100644 --- a/open-vm-tools/services/plugins/resolutionSet/resolutionX11.c +++ b/open-vm-tools/services/plugins/resolutionSet/resolutionX11.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -643,6 +643,10 @@ ResolutionToolkitInit(void) XSetErrorHandler(ResolutionX11ErrorHandler); gtk_init(&argc, (char ***) &argv); wnd = gtk_invisible_new(); +#ifndef GTK3 display = GDK_WINDOW_XDISPLAY(wnd->window); +#else + display = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(wnd)); +#endif return (InitHandle) display; } diff --git a/open-vm-tools/services/plugins/timeSync/Makefile.am b/open-vm-tools/services/plugins/timeSync/Makefile.am index 0f5ca0767..d05028516 100644 --- a/open-vm-tools/services/plugins/timeSync/Makefile.am +++ b/open-vm-tools/services/plugins/timeSync/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/timeSync/Makefile.in b/open-vm-tools/services/plugins/timeSync/Makefile.in deleted file mode 100644 index f955bffc0..000000000 --- a/open-vm-tools/services/plugins/timeSync/Makefile.in +++ /dev/null @@ -1,630 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@SOLARIS_TRUE@am__append_1 = slewAdjtime.c pllNone.c -@FREEBSD_TRUE@am__append_2 = slewAdjtime.c pllNone.c -@LINUX_TRUE@am__append_3 = slewLinux.c pllLinux.c -subdir = services/plugins/timeSync -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libtimeSync_la_DEPENDENCIES = -am__libtimeSync_la_SOURCES_DIST = timeSync.c timeSyncPosix.c \ - slewAdjtime.c pllNone.c slewLinux.c pllLinux.c -@SOLARIS_TRUE@am__objects_1 = libtimeSync_la-slewAdjtime.lo \ -@SOLARIS_TRUE@ libtimeSync_la-pllNone.lo -@FREEBSD_TRUE@am__objects_2 = libtimeSync_la-slewAdjtime.lo \ -@FREEBSD_TRUE@ libtimeSync_la-pllNone.lo -@LINUX_TRUE@am__objects_3 = libtimeSync_la-slewLinux.lo \ -@LINUX_TRUE@ libtimeSync_la-pllLinux.lo -am_libtimeSync_la_OBJECTS = libtimeSync_la-timeSync.lo \ - libtimeSync_la-timeSyncPosix.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) -libtimeSync_la_OBJECTS = $(am_libtimeSync_la_OBJECTS) -libtimeSync_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libtimeSync_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libtimeSync_la_SOURCES) -DIST_SOURCES = $(am__libtimeSync_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libtimeSync.la -libtimeSync_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libtimeSync_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libtimeSync_la_LIBADD = @VMTOOLS_LIBS@ -libtimeSync_la_SOURCES = timeSync.c timeSyncPosix.c $(am__append_1) \ - $(am__append_2) $(am__append_3) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/timeSync/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/timeSync/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libtimeSync.la: $(libtimeSync_la_OBJECTS) $(libtimeSync_la_DEPENDENCIES) - $(libtimeSync_la_LINK) -rpath $(plugindir) $(libtimeSync_la_OBJECTS) $(libtimeSync_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-pllLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-pllNone.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-slewAdjtime.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-slewLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-timeSync.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtimeSync_la-timeSyncPosix.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libtimeSync_la-timeSync.lo: timeSync.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-timeSync.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-timeSync.Tpo -c -o libtimeSync_la-timeSync.lo `test -f 'timeSync.c' || echo '$(srcdir)/'`timeSync.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-timeSync.Tpo $(DEPDIR)/libtimeSync_la-timeSync.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timeSync.c' object='libtimeSync_la-timeSync.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-timeSync.lo `test -f 'timeSync.c' || echo '$(srcdir)/'`timeSync.c - -libtimeSync_la-timeSyncPosix.lo: timeSyncPosix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-timeSyncPosix.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-timeSyncPosix.Tpo -c -o libtimeSync_la-timeSyncPosix.lo `test -f 'timeSyncPosix.c' || echo '$(srcdir)/'`timeSyncPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-timeSyncPosix.Tpo $(DEPDIR)/libtimeSync_la-timeSyncPosix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timeSyncPosix.c' object='libtimeSync_la-timeSyncPosix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-timeSyncPosix.lo `test -f 'timeSyncPosix.c' || echo '$(srcdir)/'`timeSyncPosix.c - -libtimeSync_la-slewAdjtime.lo: slewAdjtime.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-slewAdjtime.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-slewAdjtime.Tpo -c -o libtimeSync_la-slewAdjtime.lo `test -f 'slewAdjtime.c' || echo '$(srcdir)/'`slewAdjtime.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-slewAdjtime.Tpo $(DEPDIR)/libtimeSync_la-slewAdjtime.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slewAdjtime.c' object='libtimeSync_la-slewAdjtime.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-slewAdjtime.lo `test -f 'slewAdjtime.c' || echo '$(srcdir)/'`slewAdjtime.c - -libtimeSync_la-pllNone.lo: pllNone.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-pllNone.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-pllNone.Tpo -c -o libtimeSync_la-pllNone.lo `test -f 'pllNone.c' || echo '$(srcdir)/'`pllNone.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-pllNone.Tpo $(DEPDIR)/libtimeSync_la-pllNone.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pllNone.c' object='libtimeSync_la-pllNone.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-pllNone.lo `test -f 'pllNone.c' || echo '$(srcdir)/'`pllNone.c - -libtimeSync_la-slewLinux.lo: slewLinux.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-slewLinux.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-slewLinux.Tpo -c -o libtimeSync_la-slewLinux.lo `test -f 'slewLinux.c' || echo '$(srcdir)/'`slewLinux.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-slewLinux.Tpo $(DEPDIR)/libtimeSync_la-slewLinux.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slewLinux.c' object='libtimeSync_la-slewLinux.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-slewLinux.lo `test -f 'slewLinux.c' || echo '$(srcdir)/'`slewLinux.c - -libtimeSync_la-pllLinux.lo: pllLinux.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtimeSync_la-pllLinux.lo -MD -MP -MF $(DEPDIR)/libtimeSync_la-pllLinux.Tpo -c -o libtimeSync_la-pllLinux.lo `test -f 'pllLinux.c' || echo '$(srcdir)/'`pllLinux.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtimeSync_la-pllLinux.Tpo $(DEPDIR)/libtimeSync_la-pllLinux.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pllLinux.c' object='libtimeSync_la-pllLinux.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtimeSync_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtimeSync_la-pllLinux.lo `test -f 'pllLinux.c' || echo '$(srcdir)/'`pllLinux.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/timeSync/pllLinux.c b/open-vm-tools/services/plugins/timeSync/pllLinux.c index 8b762824a..e9c8e61de 100644 --- a/open-vm-tools/services/plugins/timeSync/pllLinux.c +++ b/open-vm-tools/services/plugins/timeSync/pllLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/timeSync/pllNone.c b/open-vm-tools/services/plugins/timeSync/pllNone.c index 6c73b74e6..a7a74453c 100644 --- a/open-vm-tools/services/plugins/timeSync/pllNone.c +++ b/open-vm-tools/services/plugins/timeSync/pllNone.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/timeSync/slewAdjtime.c b/open-vm-tools/services/plugins/timeSync/slewAdjtime.c index f3d88fed8..ecad33218 100644 --- a/open-vm-tools/services/plugins/timeSync/slewAdjtime.c +++ b/open-vm-tools/services/plugins/timeSync/slewAdjtime.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/timeSync/slewLinux.c b/open-vm-tools/services/plugins/timeSync/slewLinux.c index 4e2d332d8..1ab6e3584 100644 --- a/open-vm-tools/services/plugins/timeSync/slewLinux.c +++ b/open-vm-tools/services/plugins/timeSync/slewLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/timeSync/timeSync.c b/open-vm-tools/services/plugins/timeSync/timeSync.c index 57ee25457..8f3138ef2 100644 --- a/open-vm-tools/services/plugins/timeSync/timeSync.c +++ b/open-vm-tools/services/plugins/timeSync/timeSync.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/timeSync/timeSync.h b/open-vm-tools/services/plugins/timeSync/timeSync.h index 1bec24981..77591522f 100644 --- a/open-vm-tools/services/plugins/timeSync/timeSync.h +++ b/open-vm-tools/services/plugins/timeSync/timeSync.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/timeSync/timeSyncPosix.c b/open-vm-tools/services/plugins/timeSync/timeSyncPosix.c index 17cede665..f6492fec5 100644 --- a/open-vm-tools/services/plugins/timeSync/timeSyncPosix.c +++ b/open-vm-tools/services/plugins/timeSync/timeSyncPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/timeSync/timeSyncPosix.h b/open-vm-tools/services/plugins/timeSync/timeSyncPosix.h index 3fd9a1db9..213e7005a 100644 --- a/open-vm-tools/services/plugins/timeSync/timeSyncPosix.h +++ b/open-vm-tools/services/plugins/timeSync/timeSyncPosix.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/vix/Makefile.am b/open-vm-tools/services/plugins/vix/Makefile.am index b19a15d0f..f7d541e52 100644 --- a/open-vm-tools/services/plugins/vix/Makefile.am +++ b/open-vm-tools/services/plugins/vix/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/vix/Makefile.in b/open-vm-tools/services/plugins/vix/Makefile.in deleted file mode 100644 index 82f5e7f3e..000000000 --- a/open-vm-tools/services/plugins/vix/Makefile.in +++ /dev/null @@ -1,611 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_VGAUTH_TRUE@am__append_1 = $(top_builddir)/vgauth/lib/libvgauth.la -subdir = services/plugins/vix -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libvix_la_DEPENDENCIES = $(top_builddir)/lib/auth/libAuth.la \ - $(top_builddir)/lib/foundryMsg/libFoundryMsg.la \ - $(top_builddir)/lib/impersonate/libImpersonate.la \ - $(am__append_1) -am_libvix_la_OBJECTS = libvix_la-foundryToolsDaemon.lo \ - libvix_la-vixPlugin.lo libvix_la-vixTools.lo \ - libvix_la-vixToolsEnvVars.lo -libvix_la_OBJECTS = $(am_libvix_la_OBJECTS) -libvix_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libvix_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libvix_la_SOURCES) -DIST_SOURCES = $(libvix_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @COMMON_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libvix.la -libvix_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -I$(top_srcdir)/vgauth/public -libvix_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libvix_la_LIBADD = @VIX_LIBADD@ @VMTOOLS_LIBS@ @HGFS_LIBS@ \ - $(top_builddir)/lib/auth/libAuth.la \ - $(top_builddir)/lib/foundryMsg/libFoundryMsg.la \ - $(top_builddir)/lib/impersonate/libImpersonate.la \ - $(am__append_1) -libvix_la_SOURCES = foundryToolsDaemon.c vixPlugin.c vixTools.c \ - vixToolsEnvVars.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/vix/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/vix/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libvix.la: $(libvix_la_OBJECTS) $(libvix_la_DEPENDENCIES) - $(libvix_la_LINK) -rpath $(plugindir) $(libvix_la_OBJECTS) $(libvix_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvix_la-foundryToolsDaemon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvix_la-vixPlugin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvix_la-vixTools.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvix_la-vixToolsEnvVars.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libvix_la-foundryToolsDaemon.lo: foundryToolsDaemon.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvix_la-foundryToolsDaemon.lo -MD -MP -MF $(DEPDIR)/libvix_la-foundryToolsDaemon.Tpo -c -o libvix_la-foundryToolsDaemon.lo `test -f 'foundryToolsDaemon.c' || echo '$(srcdir)/'`foundryToolsDaemon.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvix_la-foundryToolsDaemon.Tpo $(DEPDIR)/libvix_la-foundryToolsDaemon.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='foundryToolsDaemon.c' object='libvix_la-foundryToolsDaemon.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvix_la-foundryToolsDaemon.lo `test -f 'foundryToolsDaemon.c' || echo '$(srcdir)/'`foundryToolsDaemon.c - -libvix_la-vixPlugin.lo: vixPlugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvix_la-vixPlugin.lo -MD -MP -MF $(DEPDIR)/libvix_la-vixPlugin.Tpo -c -o libvix_la-vixPlugin.lo `test -f 'vixPlugin.c' || echo '$(srcdir)/'`vixPlugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvix_la-vixPlugin.Tpo $(DEPDIR)/libvix_la-vixPlugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vixPlugin.c' object='libvix_la-vixPlugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvix_la-vixPlugin.lo `test -f 'vixPlugin.c' || echo '$(srcdir)/'`vixPlugin.c - -libvix_la-vixTools.lo: vixTools.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvix_la-vixTools.lo -MD -MP -MF $(DEPDIR)/libvix_la-vixTools.Tpo -c -o libvix_la-vixTools.lo `test -f 'vixTools.c' || echo '$(srcdir)/'`vixTools.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvix_la-vixTools.Tpo $(DEPDIR)/libvix_la-vixTools.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vixTools.c' object='libvix_la-vixTools.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvix_la-vixTools.lo `test -f 'vixTools.c' || echo '$(srcdir)/'`vixTools.c - -libvix_la-vixToolsEnvVars.lo: vixToolsEnvVars.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvix_la-vixToolsEnvVars.lo -MD -MP -MF $(DEPDIR)/libvix_la-vixToolsEnvVars.Tpo -c -o libvix_la-vixToolsEnvVars.lo `test -f 'vixToolsEnvVars.c' || echo '$(srcdir)/'`vixToolsEnvVars.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvix_la-vixToolsEnvVars.Tpo $(DEPDIR)/libvix_la-vixToolsEnvVars.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vixToolsEnvVars.c' object='libvix_la-vixToolsEnvVars.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvix_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvix_la-vixToolsEnvVars.lo `test -f 'vixToolsEnvVars.c' || echo '$(srcdir)/'`vixToolsEnvVars.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c b/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c index 317df9584..795dd1180 100644 --- a/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c +++ b/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2003-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2003-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -57,6 +57,7 @@ #define G_LOG_DOMAIN "vix" #include +#include #include "vixPluginInt.h" #include "vmware/tools/utils.h" @@ -80,6 +81,7 @@ #include "vixToolsInt.h" #if defined(linux) +#include "mntinfo.h" #include "hgfsDevLinux.h" #endif @@ -174,7 +176,7 @@ FoundryToolsDaemonRunProgram(RpcInData *data) // IN static char resultBuffer[DEFAULT_RESULT_MSG_MAX_LENGTH]; Bool impersonatingVMWareUser = FALSE; void *userToken = NULL; - ProcMgr_Pid pid; + ProcMgr_Pid pid = -1; GMainLoop *eventQueue = ((ToolsAppCtx *)data->appCtx)->mainLoop; /* @@ -723,14 +725,81 @@ ToolsDaemonTcloSyncDriverThaw(RpcInData *data) // IN #endif +#if defined(linux) +/* + *----------------------------------------------------------------------------- + * + * ToolsDaemonCheckMountedHGFS -- + * + * Check if the HGFS file system is already mounted. + * + * Return value: + * VIX_OK and vmhgfsMntFound is TRUE if mounted or FALSE if not. + * set VixError otherwise. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +static VixError +ToolsDaemonCheckMountedHGFS(Bool isFuseEnabled, // IN: + Bool *vmhgfsMntFound) // OUT: HGFS is mounted +{ + MNTHANDLE mtab; + DECLARE_MNTINFO(mnt); + const char *fsName; + const char *fsType; + VixError err = VIX_OK; + + if ((mtab = OPEN_MNTFILE("r")) == NULL) { + err = VIX_E_FAIL; + g_warning("%s: ERROR: opening mounted file system table -> %d\n", __FUNCTION__, errno); + goto exit; + } + + *vmhgfsMntFound = FALSE; + if (isFuseEnabled) { + fsName = HGFS_FUSENAME; + fsType = HGFS_FUSETYPE; + } else { + fsName = ".host:/"; + fsType = HGFS_NAME; + } + while (GETNEXT_MNTINFO(mtab, mnt)) { + if ((strcmp(MNTINFO_NAME(mnt), fsName) == 0) && + (strcmp(MNTINFO_FSTYPE(mnt), fsType) == 0) && + (strcmp(MNTINFO_MNTPT(mnt), HGFS_MOUNT_POINT) == 0)) { + *vmhgfsMntFound = TRUE; + g_debug("%s: mnt fs \"%s\" type \"%s\" dir \"%s\"\n", __FUNCTION__, + MNTINFO_NAME(mnt), MNTINFO_FSTYPE(mnt), MNTINFO_MNTPT(mnt)); + break; + } + } + CLOSE_MNTFILE(mtab); + +exit: + return err; +} +#endif + + /* *----------------------------------------------------------------------------- * * ToolsDaemonTcloMountHGFS -- * + * Mount the HGFS file system. + * + * This will do nothing if the file system is already mounted. In some cases + * it might be necessary to create the mount path too. * * Return value: - * VixError + * TRUE always and VixError status for the RPC call reply. + * VIX_OK if mount succeeded or was already mounted + * VIX_E_FAIL if we couldn't check the mount was available + * VIX_E_HGFS_MOUNT_FAIL if the mount operation itself failed * * Side effects: * None @@ -747,85 +816,91 @@ ToolsDaemonTcloMountHGFS(RpcInData *data) // IN #if defined(linux) #define MOUNT_PATH_BIN "/bin/mount" #define MOUNT_PATH_USR_BIN "/usr" MOUNT_PATH_BIN -#define MOUNT_HGFS_ARGS " -t vmhgfs .host:/ /mnt/hgfs" +#define MOUNT_HGFS_PATH "/mnt/hgfs" +#define MOUNT_HGFS_ARGS " -t vmhgfs .host:/ " MOUNT_HGFS_PATH /* * Look for a vmhgfs mount at /mnt/hgfs. If one exists, nothing * else needs to be done. If one doesn't exist, then mount at * that location. */ - FILE *mtab; - struct mntent *mnt; + ProcMgr_ProcArgs vmhgfsExecProcArgs; + Bool execRes; + const char *mountCmd = NULL; Bool isFuseEnabled = TRUE; + Bool vmhgfsMntFound = FALSE; + Bool vmhgfsMntPointCreated = FALSE; int ret; - ret = system("/usr/bin/vmhgfs-fuse --enabled"); - if (ret != 0 || WIFSIGNALED(ret) || - (WIFEXITED(ret) && WEXITSTATUS(ret) != 0)) { - g_warning("%s: vmhgfs-fuse -> %d\n", __FUNCTION__, ret); + vmhgfsExecProcArgs.envp = NULL; + vmhgfsExecProcArgs.workingDirectory = NULL; + + execRes = ProcMgr_ExecSync("/usr/bin/vmhgfs-fuse --enabled", &vmhgfsExecProcArgs); + if (!execRes) { + g_warning("%s: vmhgfs-fuse -> not available\n", __FUNCTION__); isFuseEnabled = FALSE; } - if ((mtab = setmntent(_PATH_MOUNTED, "r")) == NULL) { - err = VIX_E_FAIL; + err = ToolsDaemonCheckMountedHGFS(isFuseEnabled, &vmhgfsMntFound); + if (err != VIX_OK) { + goto exit; + } + + if (vmhgfsMntFound) { + g_message("%s: vmhgfs already mounted\n", __FUNCTION__); + goto exit; + } + + /* Verify that mount point exists, if not create it. */ + ret = g_access(MOUNT_HGFS_PATH, F_OK); + if (ret != 0) { + g_message("%s: no mount point found, create %s\n", __FUNCTION__, MOUNT_HGFS_PATH); + ret = g_mkdir_with_parents(MOUNT_HGFS_PATH, 0755); + if (ret != 0) { + err = VIX_E_HGFS_MOUNT_FAIL; + g_warning("%s: ERROR: vmhgfs mount point creation -> %d\n", __FUNCTION__, errno); + goto exit; + } + vmhgfsMntPointCreated = TRUE; + } + + /* Do the HGFS mount. */ + if (isFuseEnabled) { + mountCmd = "/usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other"; } else { - Bool vmhgfsMntFound = FALSE; - char *fsName; - char *fsType; - if (isFuseEnabled) { - fsName = HGFS_FUSENAME; - fsType = HGFS_FUSETYPE; + /* + * We need to call the mount program, not the mount system call. The + * mount program does several additional things, like compute the mount + * options from the contents of /etc/fstab, and invoke custom mount + * programs like the one needed for HGFS. + */ + ret = g_access(MOUNT_PATH_USR_BIN, F_OK); + if (ret == 0) { + mountCmd = MOUNT_PATH_USR_BIN MOUNT_HGFS_ARGS; } else { - fsName = ".host:/"; - fsType = HGFS_NAME; - } - while ((mnt = getmntent(mtab)) != NULL) { - if ((strcmp(mnt->mnt_fsname, fsName) == 0) && - (strcmp(mnt->mnt_type, fsType) == 0) && - (strcmp(mnt->mnt_dir, HGFS_MOUNT_POINT) == 0)) { - vmhgfsMntFound = TRUE; - g_debug("%s: mnt fs %s type %s dir %s\n", __FUNCTION__, - mnt->mnt_fsname, mnt->mnt_type, mnt->mnt_dir); - break; + ret = g_access(MOUNT_PATH_BIN, F_OK); + if (ret == 0) { + mountCmd = MOUNT_PATH_BIN MOUNT_HGFS_ARGS; + } else { + g_warning("%s: failed to find mount -> %d\n", __FUNCTION__, errno); + err = VIX_E_HGFS_MOUNT_FAIL; + goto exit; } } - endmntent(mtab); - - if (!vmhgfsMntFound) { - int ret; + } - if (isFuseEnabled) { - ret = - system("/usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other"); - } else { - const char *mountCmd = NULL; - - ret = access(MOUNT_PATH_USR_BIN, F_OK); - if (ret == 0) { - mountCmd = MOUNT_PATH_USR_BIN MOUNT_HGFS_ARGS; - } else { - ret = access(MOUNT_PATH_BIN, F_OK); - if (ret == 0) { - mountCmd = MOUNT_PATH_BIN MOUNT_HGFS_ARGS; - } else { - g_warning("%s: failed to find mount -> %d\n", __FUNCTION__, errno); - } - } - if (ret == 0) { - /* - * We need to call the mount program, not the mount system call. The - * mount program does several additional things, like compute the mount - * options from the contents of /etc/fstab, and invoke custom mount - * programs like the one needed for HGFS. - */ - g_debug("%s: system: %s\n", __FUNCTION__, mountCmd); - ret = system(mountCmd); - } - } - if (ret == -1 || WIFSIGNALED(ret) || - (WIFEXITED(ret) && WEXITSTATUS(ret) != 0)) { - err = VIX_E_HGFS_MOUNT_FAIL; - g_warning("%s: vmhgfs mounting -> %d\n", __FUNCTION__, ret); + g_debug("%s: Mounting: %s\n", __FUNCTION__, mountCmd); + execRes = ProcMgr_ExecSync(mountCmd, &vmhgfsExecProcArgs); + if (!execRes) { + err = VIX_E_HGFS_MOUNT_FAIL; + g_warning("%s: ERROR: no vmhgfs mount\n", __FUNCTION__); + } +exit: + if (err != VIX_OK) { + if (vmhgfsMntPointCreated) { + ret = g_rmdir(MOUNT_HGFS_PATH); + if (ret != 0) { + g_warning("%s: vmhgfs mount point not deleted %d\n", __FUNCTION__, errno); } } } diff --git a/open-vm-tools/services/plugins/vix/vixPlugin.c b/open-vm-tools/services/plugins/vix/vixPlugin.c index 9448a6560..7ca357cab 100644 --- a/open-vm-tools/services/plugins/vix/vixPlugin.c +++ b/open-vm-tools/services/plugins/vix/vixPlugin.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/vix/vixPluginInt.h b/open-vm-tools/services/plugins/vix/vixPluginInt.h index 95e7a2921..22670fc2f 100644 --- a/open-vm-tools/services/plugins/vix/vixPluginInt.h +++ b/open-vm-tools/services/plugins/vix/vixPluginInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c index 3b195540d..54b02398a 100644 --- a/open-vm-tools/services/plugins/vix/vixTools.c +++ b/open-vm-tools/services/plugins/vix/vixTools.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -140,6 +140,12 @@ #define SUPPORT_VGAUTH 0 #endif +#ifdef _WIN32 +/* + * vmwsu can't generate an impersonation token for local SYSTEM. + */ +#define ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS 1 +#endif #if SUPPORT_VGAUTH #include "VGAuthCommon.h" @@ -155,6 +161,19 @@ static gboolean gSupportVGAuth = USE_VGAUTH_DEFAULT; static gboolean QueryVGAuthConfig(GKeyFile *confDictRef); +#if ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS +static gchar *gCurrentUsername = NULL; + +#define VIXTOOLS_CONFIG_ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS \ + "allowLocalSystemImpersonationBypass" +/* + * This isn't on by default because it won't leave a complete + * audit trail. + */ +#define ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS_DEFAULT FALSE + +#endif + /* * XXX * @@ -209,6 +228,8 @@ char *gImpersonatedUsername = NULL; #define VIX_TOOLS_CONFIG_API_AUTHENTICATION "Authentication" #define VIX_TOOLS_CONFIG_AUTHTYPE_AGENTS "InfrastructureAgents" +#define VIX_TOOLS_CONFIG_INFRA_AGENT_DISABLED_DEFAULT TRUE + /* * The switch that controls all APIs */ @@ -695,6 +716,14 @@ VixTools_Initialize(Bool thisProcessRunsAsRootParam, VixError err = VIX_OK; #if SUPPORT_VGAUTH ToolsAppCtx *ctx = (ToolsAppCtx *) clientData; +#if ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS + if (!gCurrentUsername) { + gCurrentUsername = VixToolsGetCurrentUsername(); + ASSERT(gCurrentUsername); + g_message("%s: Toolsd running as user '%s'\n", + __FUNCTION__, gCurrentUsername); + } +#endif #endif /* @@ -1061,7 +1090,7 @@ VixTools_RunProgram(VixCommandRequestHeader *requestMsg, // IN const char *commandLineArgs = NULL; Bool impersonatingVMWareUser = FALSE; void *userToken = NULL; - int64 pid; + int64 pid = -1; static char resultBuffer[32]; VMAutomationRequestParser parser; @@ -5759,6 +5788,27 @@ VixToolsKillProcess(VixCommandRequestHeader *requestMsg) // IN goto abort; } +#if defined(__APPLE__) + /* + * On OS X, we can only impersonate the effective UID, not real. + * But the kill(2) syscall looks at real UID. This means its working + * as root, and therefore its a massive security hole to leave it + * as-is. + * + * Its unclear if anyone actually cares, so for now, just turn + * it off. Its trivial to workaround (RunProgram of 'kill '.) + * + * Two possible fixes if necessary: + * + * - sleaze things and rewrite as a RunProgram("kill "). This + * will lose probably error info. + * - do the kill inside fork(), sending back any error code + * on a pipe. + */ + err = VIX_E_NOT_SUPPORTED; + goto abort; +#endif + if (!ProcMgr_KillByPid(killProcessRequest->pid)) { /* * Save off the error code so any debug statements added later @@ -7905,6 +7955,11 @@ VixToolsUnimpersonateUser(void *userToken) gImpersonatedUsername = NULL; #if SUPPORT_VGAUTH +#if ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS + if (PROCESS_CREATOR_USER_TOKEN == userToken) { + g_debug("%s: Faking unimpersonate\n", __FUNCTION__); + } +#endif if (NULL != currentUserHandle) { GuestAuthUnimpersonate(); return; @@ -10384,15 +10439,26 @@ static Bool VixToolsCheckIfAuthenticationTypeEnabled(GKeyFile *confDictRef, // IN const char *typeName) // IN { - char authenticationType[64]; // Authentication. + char authnDisabledName[64]; // Authentication..disabled + gboolean disabled; - Str_Snprintf(authenticationType, sizeof(authenticationType), - VIX_TOOLS_CONFIG_API_AUTHENTICATION ".%s", + Str_Snprintf(authnDisabledName, sizeof(authnDisabledName), + VIX_TOOLS_CONFIG_API_AUTHENTICATION ".%s.disabled", typeName); ASSERT(confDictRef != NULL); - return !VixToolsGetAPIDisabledFromConf(confDictRef, authenticationType); + /* + * XXX Skip doing the strcmp() to verify the auth type since we only + * have the one typeName (VIX_TOOLS_CONFIG_AUTHTYPE_AGENTS), and default + * it to VIX_TOOLS_CONFIG_INFRA_AGENT_DISABLED_DEFAULT. + */ + disabled = VixTools_ConfigGetBoolean(confDictRef, + VIX_TOOLS_CONFIG_API_GROUPNAME, + authnDisabledName, + VIX_TOOLS_CONFIG_INFRA_AGENT_DISABLED_DEFAULT); + + return !disabled; } @@ -11293,8 +11359,8 @@ GuestAuthPasswordAuthenticateImpersonate( { #if SUPPORT_VGAUTH VixError err; - char *username; - char *password; + char *username = NULL; + char *password = NULL; VGAuthContext *ctx = NULL; VGAuthError vgErr; VGAuthUserHandle *newHandle = NULL; @@ -11343,6 +11409,8 @@ GuestAuthPasswordAuthenticateImpersonate( err = VIX_OK; done: + free(username); + Util_ZeroFreeString(password); return err; #else @@ -11402,11 +11470,107 @@ GuestAuthSAMLAuthenticateAndImpersonate( 0, NULL, &newHandle); +#if ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS + /* + * Special support for local SYSTEM account. + * + * If validation fails, try again without token + * creation, and if it passes, fake the impersonation. + */ + + // normal case worked + if (!VGAUTH_FAILED(vgErr)) { + goto impersonate; + } + + /* + * If the config is off, bypass the special-case. + */ + if (!VixTools_ConfigGetBoolean(gConfDictRef, + VIX_TOOLS_CONFIG_API_GROUPNAME, + VIXTOOLS_CONFIG_ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS, + ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS_DEFAULT)) { + g_debug("%s: SAML authn failed, %s not set, skipping local SYSTEM check", + __FUNCTION__, + VIXTOOLS_CONFIG_ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS); + err = VixToolsTranslateVGAuthError(vgErr); + goto done; + } + + /* + * VGAUTH_E_FAIL will be returned if token creation fails. + */ + if (vgErr != VGAUTH_E_FAIL) { + err = VixToolsTranslateVGAuthError(vgErr); + goto done; + } else { + VGAuthExtraParams extraParams[1]; + VGAuthError vgErr2; + + extraParams[0].name = VGAUTH_PARAM_VALIDATE_INFO_ONLY; + extraParams[0].value = VGAUTH_PARAM_VALUE_TRUE; + + vgErr2 = VGAuth_ValidateSamlBearerToken(ctx, + token, + username, + 1, + extraParams, + &newHandle); + // if it passes with VALIDATE_ONLY, see if its the current user (SYSTEM) + if (vgErr2 == VGAUTH_E_OK) { + gchar *tokenUser = NULL; + + vgErr2 = VGAuth_UserHandleUsername(ctx, newHandle, &tokenUser); + if (VGAUTH_FAILED(vgErr2)) { + g_warning("%s: VGAuth_UserHandleUsername() failed\n", __FUNCTION__); + err = VixToolsTranslateVGAuthError(vgErr2); + goto done; + } + + g_debug("%s: VGAuth_ValidateSamlBearerToken() with " + "VGAUTH_PARAM_VALIDATE_INFO_ONLY: user is %s, " + "toolsd user is %s\n", + __FUNCTION__, tokenUser, gCurrentUsername); + + /* + * If VGAUTH_PARAM_VALIDATE_INFO_ONLY passed, and the + * username matches, bypass impersonation. Be sure + * to do a case-less comparison. + */ + if (Unicode_CompareIgnoreCase(tokenUser, gCurrentUsername) == 0) { + g_message("%s: User '%s' matched; bypassing impersonation\n", + __FUNCTION__, gCurrentUsername); + + // set the impersonation token to the magic value + *userToken = PROCESS_CREATOR_USER_TOKEN; + gImpersonatedUsername = Util_SafeStrdup("_CONSOLE_USER_NAME_"); + currentUserHandle = newHandle; + err = VIX_OK; + } else { + g_message("%s: User '%s' mismatch with process user '%s'\n", + __FUNCTION__, tokenUser, gCurrentUsername); + // use original error code + err = VixToolsTranslateVGAuthError(vgErr); + } + VGAuth_FreeBuffer(tokenUser); + goto done; + + } else { + // use original error code + err = VixToolsTranslateVGAuthError(vgErr); + goto done; + } + } +#else if (VGAUTH_FAILED(vgErr)) { err = VixToolsTranslateVGAuthError(vgErr); goto done; } +#endif +#if ALLOW_LOCAL_SYSTEM_IMPERSONATION_BYPASS +impersonate: +#endif vgErr = VGAuth_Impersonate(ctx, newHandle, 0, NULL); if (VGAUTH_FAILED(vgErr)) { err = VixToolsTranslateVGAuthError(vgErr); @@ -11460,6 +11624,7 @@ GuestAuthUnimpersonate(void) VGAuthError vgErr = TheVGAuthContext(&ctx); ASSERT(vgErr == VGAUTH_E_OK); + vgErr = VGAuth_EndImpersonation(ctx); ASSERT(vgErr == VGAUTH_E_OK); @@ -11588,9 +11753,9 @@ TheVGAuthContext(VGAuthContext **ctx) // OUT VGAuthError vgaCode = VGAUTH_E_OK; /* - * XXX This needs to handle errors better -- if the service gets - * reset, the context will point to junk and anything using it will - * fail. + * XXX This needs to handle errors better -- if the VGAuthService + * service gets reset, the context will point to junk and anything + * using it will fail. * * Maybe add a no-op API here to poke it? Or make the underlying * VGAuth code smarter. diff --git a/open-vm-tools/services/plugins/vix/vixToolsEnvVars.c b/open-vm-tools/services/plugins/vix/vixToolsEnvVars.c index c98da4bba..cfb5006ee 100644 --- a/open-vm-tools/services/plugins/vix/vixToolsEnvVars.c +++ b/open-vm-tools/services/plugins/vix/vixToolsEnvVars.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/vix/vixToolsInt.h b/open-vm-tools/services/plugins/vix/vixToolsInt.h index e7739d61d..fc86953bb 100644 --- a/open-vm-tools/services/plugins/vix/vixToolsInt.h +++ b/open-vm-tools/services/plugins/vix/vixToolsInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -187,6 +187,8 @@ VixError VixToolsListRegValuesImpl(VixCommandRequestHeader *requestMsg, VixError VixToolsDeleteRegValueImpl(VixCommandRequestHeader *requestMsg); +gchar *VixToolsGetCurrentUsername(void); + #endif // _WIN32 #ifdef VMX86_DEVEL diff --git a/open-vm-tools/services/plugins/vmbackup/Makefile.am b/open-vm-tools/services/plugins/vmbackup/Makefile.am index 99589bfb3..81fc5c7f2 100644 --- a/open-vm-tools/services/plugins/vmbackup/Makefile.am +++ b/open-vm-tools/services/plugins/vmbackup/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/plugins/vmbackup/Makefile.in b/open-vm-tools/services/plugins/vmbackup/Makefile.in deleted file mode 100644 index 3512124e1..000000000 --- a/open-vm-tools/services/plugins/vmbackup/Makefile.in +++ /dev/null @@ -1,646 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = services/plugins/vmbackup -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libvmbackup_la_DEPENDENCIES = -am_libvmbackup_la_OBJECTS = libvmbackup_la-nullProvider.lo \ - libvmbackup_la-scriptOps.lo libvmbackup_la-stateMachine.lo \ - libvmbackup_la-syncDriverOps.lo \ - libvmbackup_la-vmBackupSignals.lo \ - libvmbackup_la-guestQuiesce_xdr.lo -libvmbackup_la_OBJECTS = $(am_libvmbackup_la_OBJECTS) -libvmbackup_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libvmbackup_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libvmbackup_la_SOURCES) -DIST_SOURCES = $(libvmbackup_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @VMSVC_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libvmbackup.la -libvmbackup_la_CPPFLAGS = @PLUGIN_CPPFLAGS@ -libvmbackup_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libvmbackup_la_LIBADD = @GOBJECT_LIBS@ @VMTOOLS_LIBS@ -libvmbackup_la_SOURCES = nullProvider.c scriptOps.c stateMachine.c \ - syncDriverOps.c vmBackupSignals.c guestQuiesce_xdr.c -BUILT_SOURCES = vmBackupSignals.c vmBackupSignals.h guestQuiesce.h \ - guestQuiesce_xdr.c -CLEANFILES = vmBackupSignals.c vmBackupSignals.h guestQuiesce.h \ - guestQuiesce_xdr.c -EXTRA_DIST = vmBackupSignals.gm -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/plugins/vmbackup/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/plugins/vmbackup/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libvmbackup.la: $(libvmbackup_la_OBJECTS) $(libvmbackup_la_DEPENDENCIES) - $(libvmbackup_la_LINK) -rpath $(plugindir) $(libvmbackup_la_OBJECTS) $(libvmbackup_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-guestQuiesce_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-nullProvider.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-scriptOps.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-stateMachine.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-syncDriverOps.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmbackup_la-vmBackupSignals.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libvmbackup_la-nullProvider.lo: nullProvider.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-nullProvider.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-nullProvider.Tpo -c -o libvmbackup_la-nullProvider.lo `test -f 'nullProvider.c' || echo '$(srcdir)/'`nullProvider.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-nullProvider.Tpo $(DEPDIR)/libvmbackup_la-nullProvider.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nullProvider.c' object='libvmbackup_la-nullProvider.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-nullProvider.lo `test -f 'nullProvider.c' || echo '$(srcdir)/'`nullProvider.c - -libvmbackup_la-scriptOps.lo: scriptOps.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-scriptOps.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-scriptOps.Tpo -c -o libvmbackup_la-scriptOps.lo `test -f 'scriptOps.c' || echo '$(srcdir)/'`scriptOps.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-scriptOps.Tpo $(DEPDIR)/libvmbackup_la-scriptOps.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scriptOps.c' object='libvmbackup_la-scriptOps.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-scriptOps.lo `test -f 'scriptOps.c' || echo '$(srcdir)/'`scriptOps.c - -libvmbackup_la-stateMachine.lo: stateMachine.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-stateMachine.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-stateMachine.Tpo -c -o libvmbackup_la-stateMachine.lo `test -f 'stateMachine.c' || echo '$(srcdir)/'`stateMachine.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-stateMachine.Tpo $(DEPDIR)/libvmbackup_la-stateMachine.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stateMachine.c' object='libvmbackup_la-stateMachine.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-stateMachine.lo `test -f 'stateMachine.c' || echo '$(srcdir)/'`stateMachine.c - -libvmbackup_la-syncDriverOps.lo: syncDriverOps.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-syncDriverOps.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-syncDriverOps.Tpo -c -o libvmbackup_la-syncDriverOps.lo `test -f 'syncDriverOps.c' || echo '$(srcdir)/'`syncDriverOps.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-syncDriverOps.Tpo $(DEPDIR)/libvmbackup_la-syncDriverOps.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='syncDriverOps.c' object='libvmbackup_la-syncDriverOps.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-syncDriverOps.lo `test -f 'syncDriverOps.c' || echo '$(srcdir)/'`syncDriverOps.c - -libvmbackup_la-vmBackupSignals.lo: vmBackupSignals.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-vmBackupSignals.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-vmBackupSignals.Tpo -c -o libvmbackup_la-vmBackupSignals.lo `test -f 'vmBackupSignals.c' || echo '$(srcdir)/'`vmBackupSignals.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-vmBackupSignals.Tpo $(DEPDIR)/libvmbackup_la-vmBackupSignals.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmBackupSignals.c' object='libvmbackup_la-vmBackupSignals.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-vmBackupSignals.lo `test -f 'vmBackupSignals.c' || echo '$(srcdir)/'`vmBackupSignals.c - -libvmbackup_la-guestQuiesce_xdr.lo: guestQuiesce_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmbackup_la-guestQuiesce_xdr.lo -MD -MP -MF $(DEPDIR)/libvmbackup_la-guestQuiesce_xdr.Tpo -c -o libvmbackup_la-guestQuiesce_xdr.lo `test -f 'guestQuiesce_xdr.c' || echo '$(srcdir)/'`guestQuiesce_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmbackup_la-guestQuiesce_xdr.Tpo $(DEPDIR)/libvmbackup_la-guestQuiesce_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='guestQuiesce_xdr.c' object='libvmbackup_la-guestQuiesce_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmbackup_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmbackup_la-guestQuiesce_xdr.lo `test -f 'guestQuiesce_xdr.c' || echo '$(srcdir)/'`guestQuiesce_xdr.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -guestQuiesce.h: guestQuiesce.x - @RPCGEN_WRAPPER@ services/plugins/vmbackup/guestQuiesce.x $@ - -guestQuiesce_xdr.c: guestQuiesce.x guestQuiesce.h - @RPCGEN_WRAPPER@ services/plugins/vmbackup/guestQuiesce.x $@ - -vmBackupSignals.c: $(top_srcdir)/services/plugins/vmbackup/vmBackupSignals.gm - glib-genmarshal --body $(top_srcdir)/services/plugins/vmbackup/vmBackupSignals.gm > \ - $@ || (rm -f $@ && exit 1) - -vmBackupSignals.h: $(top_srcdir)/services/plugins/vmbackup/vmBackupSignals.gm - glib-genmarshal --header $(top_srcdir)/services/plugins/vmbackup/vmBackupSignals.gm > \ - $@ || (rm -f $@ && exit 1) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/plugins/vmbackup/README b/open-vm-tools/services/plugins/vmbackup/README index eba803c7d..6155584cf 100644 --- a/open-vm-tools/services/plugins/vmbackup/README +++ b/open-vm-tools/services/plugins/vmbackup/README @@ -24,6 +24,10 @@ The main state machine, implemented in stateMachine.c, works as follows: | d | \/ | SCRIPT_THAW -------- + | | + | f | g + \/ | + COMPLETE_WAIT------- The transitions mean the following events / conditions: @@ -33,6 +37,8 @@ b. vmbackup operation is finished c. vmbackup.snapshotDone RPC d. sync provider operation is finished e. error condition: runtime error, or vmbackup.abort RPC +f. thaw scripts run finished +g. get notification that snapshot succeeds Sending a vmbackup.start RPC while the state machine is not IDLE causes an error to be returned to the client, but the state machine is not changed. diff --git a/open-vm-tools/services/plugins/vmbackup/guestQuiesce.x b/open-vm-tools/services/plugins/vmbackup/guestQuiesce.x index 7e8731f87..033740eeb 100644 --- a/open-vm-tools/services/plugins/vmbackup/guestQuiesce.x +++ b/open-vm-tools/services/plugins/vmbackup/guestQuiesce.x @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -24,12 +24,14 @@ */ enum GuestQuiesceParamsVersion { - GUESTQUIESCEPARAMS_V1 = 1 + GUESTQUIESCEPARAMS_V1 = 1, + GUESTQUIESCEPARAMS_V2 = 2 }; const GUESTQUIESCE_SCRIPTARG_MAX_LEN = 256; const GUESTQUIESCE_DISKUUID_MAX_LEN = 3200; /* (UUID_MAXLEN + 1) * 64 disks */ + /* Guest Quiescing parameters. */ struct GuestQuiesceParamsV1 { Bool createManifest; /* Create manifest describing the operations */ @@ -42,7 +44,19 @@ struct GuestQuiesceParamsV1 { string diskUuids; /* disk Uuids */ }; +/* Guest Quiescing parameters V2. */ +struct GuestQuiesceParamsV2 { + struct GuestQuiesceParamsV1 paramsV1; + uint32 vssBackupContext; + uint32 vssBackupType; + Bool vssBootableSystemState; + Bool vssPartialFileSupport; +}; + + union GuestQuiesceParams switch (GuestQuiesceParamsVersion ver) { case GUESTQUIESCEPARAMS_V1: struct GuestQuiesceParamsV1 *guestQuiesceParamsV1; +case GUESTQUIESCEPARAMS_V2: + struct GuestQuiesceParamsV2 *guestQuiesceParamsV2; }; diff --git a/open-vm-tools/services/plugins/vmbackup/nullProvider.c b/open-vm-tools/services/plugins/vmbackup/nullProvider.c index 60856dd84..1abc5f606 100644 --- a/open-vm-tools/services/plugins/vmbackup/nullProvider.c +++ b/open-vm-tools/services/plugins/vmbackup/nullProvider.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -32,6 +32,7 @@ #if defined(_WIN32) + /* ****************************************************************************** * VmBackupNullStart -- */ /** @@ -54,14 +55,128 @@ VmBackupNullStart(VmBackupState *state, return VmBackup_SendEvent(VMBACKUP_EVENT_SNAPSHOT_COMMIT, 0, ""); } + +/* + ****************************************************************************** + * VmBackupNullSnapshotDone -- */ /** + * + * Does nothing, just keep the backup state machine alive. + * + * @param[in] state Backup state. + * @param[in] clientData Unused. + * + * @return TRUE. + * + ****************************************************************************** + */ + +static Bool +VmBackupNullSnapshotDone(VmBackupState *state, + void *clientData) +{ + VmBackup_SetCurrentOp(state, NULL, NULL, __FUNCTION__); + return TRUE; +} + #else +/* + ****************************************************************************** + * VmBackupNullReadyForSnapshot -- */ /** + * + * Sends an event to the VMX indicating that the guest is ready for a + * snapshot to be taken (i.e., scripts have run and Nulldriver is + * enabled). + * + * @param[in] state Backup state. + * + * @return TRUE, unless sending the message fails. + * + ****************************************************************************** + */ + +static Bool +VmBackupNullReadyForSnapshot(VmBackupState *state) +{ + Bool success; + + g_debug("*** %s\n", __FUNCTION__); + success = VmBackup_SendEvent(VMBACKUP_EVENT_SNAPSHOT_COMMIT, 0, ""); + if (success) { + state->freezeStatus = VMBACKUP_FREEZE_FINISHED; + } else { + g_warning("Failed to send commit event to host"); + state->freezeStatus = VMBACKUP_FREEZE_ERROR; + } + return success; +} + + +/* + ****************************************************************************** + * VmBackupNullOpQuery -- */ /** + * + * Checks the status of the operation that is enabling or disabling the + * Null driver. Nulldriver is enabled immediately and there is nothing + * to disable. + * + * @param[in] op VmBackupOp. + * + * @return VMBACKUP_STATUS_FINISHED always. + * + ****************************************************************************** + */ + +static VmBackupOpStatus +VmBackupNullOpQuery(VmBackupOp *op) // IN +{ + return VMBACKUP_STATUS_FINISHED; +} + + +/* + ****************************************************************************** + * VmBackupNullOpRelease -- */ /** + * + * Cleans up data held by the op object. + * + * @param[in] op VmBackupOp. + * + ****************************************************************************** + */ + +static void +VmBackupNullOpRelease(VmBackupOp *op) // IN +{ + g_free(op); +} + + +/* + ****************************************************************************** + * VmBackupNullOpCancel -- */ /** + * + * Cancel an ongoing Nulldriver operation. This doesn't actually + * do anything because there is no operation to cancel as such. + * + * @param[in] op VmBackupOp. + * + ****************************************************************************** + */ + +static void +VmBackupNullOpCancel(VmBackupOp *op) // IN +{ + /* Nothing to do */ +} + + /* ****************************************************************************** * VmBackupNullStart -- */ /** * - * Calls sync(2) on POSIX systems. Sends the "commit snapshot" event to the - * host. + * Calls sync(2) on POSIX systems. Sets up an asynchronous operation + * for tracking. * * @param[in] ctx Plugin context. * @param[in] state Backup state. @@ -73,28 +188,35 @@ static void VmBackupNullStart(ToolsAppCtx *ctx, void *clientData) { + VmBackupOp *op; VmBackupState *state = (VmBackupState*) clientData; + + g_debug("*** %s\n", __FUNCTION__); + + op = g_new0(VmBackupOp, 1); + op->queryFn = VmBackupNullOpQuery; + op->cancelFn = VmBackupNullOpCancel; + op->releaseFn = VmBackupNullOpRelease; + /* * This is more of a "let's at least do something" than something that * will actually ensure data integrity... */ sync(); - VmBackup_SetCurrentOp(state, NULL, NULL, __FUNCTION__); - if (!VmBackup_SendEvent(VMBACKUP_EVENT_SNAPSHOT_COMMIT, 0, "")) { - g_warning("Failed to send commit event to host"); - state->freezeStatus = VMBACKUP_FREEZE_ERROR; - } else { - state->freezeStatus = VMBACKUP_FREEZE_FINISHED; - } + + VmBackup_SetCurrentOp(state, + op, + VmBackupNullReadyForSnapshot, + __FUNCTION__); } -#endif /* ****************************************************************************** * VmBackupNullSnapshotDone -- */ /** * - * Does nothing, just keep the backup state machine alive. + * Does nothing except setting up an asynchronous operation to keep the + * backup state machine alive. * * @param[in] state Backup state. * @param[in] clientData Unused. @@ -108,10 +230,20 @@ static Bool VmBackupNullSnapshotDone(VmBackupState *state, void *clientData) { - VmBackup_SetCurrentOp(state, NULL, NULL, __FUNCTION__); + VmBackupOp *op; + + g_debug("*** %s\n", __FUNCTION__); + + op = g_new0(VmBackupOp, 1); + op->queryFn = VmBackupNullOpQuery; + op->cancelFn = VmBackupNullOpCancel; + op->releaseFn = VmBackupNullOpRelease; + + VmBackup_SetCurrentOp(state, op, NULL, __FUNCTION__); return TRUE; } +#endif /* ****************************************************************************** diff --git a/open-vm-tools/services/plugins/vmbackup/scriptOps.c b/open-vm-tools/services/plugins/vmbackup/scriptOps.c index 8e9b00931..cfff69aef 100644 --- a/open-vm-tools/services/plugins/vmbackup/scriptOps.c +++ b/open-vm-tools/services/plugins/vmbackup/scriptOps.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/plugins/vmbackup/stateMachine.c b/open-vm-tools/services/plugins/vmbackup/stateMachine.c index 071648ccb..c040f5f46 100644 --- a/open-vm-tools/services/plugins/vmbackup/stateMachine.c +++ b/open-vm-tools/services/plugins/vmbackup/stateMachine.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -74,6 +74,18 @@ VM_EMBED_VERSION(VMTOOLSD_VERSION_STRING); NULL); \ } while (0) +/* + * Macros to read values from config file. + */ +#define VMBACKUP_CONFIG_GET_BOOL(config, key, defVal) \ + VMTools_ConfigGetBoolean(config, "vmbackup", key, defVal) + +#define VMBACKUP_CONFIG_GET_STR(config, key, defVal) \ + VMTools_ConfigGetString(config, "vmbackup", key, defVal) + +#define VMBACKUP_CONFIG_GET_INT(config, key, defVal) \ + VMTools_ConfigGetInteger(config, "vmbackup", key, defVal) + static VmBackupState *gBackupState = NULL; static Bool @@ -82,6 +94,9 @@ VmBackupEnableSync(void); static Bool VmBackupEnableSyncWait(void); +static Bool +VmBackupEnableCompleteWait(void); + /** * Returns a string representation of the given state machine state. @@ -113,6 +128,9 @@ VmBackupGetStateName(VmBackupMState state) case VMBACKUP_MSTATE_SCRIPT_THAW: return "SCRIPT_THAW"; + case VMBACKUP_MSTATE_COMPLETE_WAIT: + return "COMPLETE_WAIT"; + case VMBACKUP_MSTATE_SCRIPT_ERROR: return "SCRIPT_ERROR"; @@ -299,6 +317,9 @@ VmBackupFinalize(void) } gBackupState->provider->release(gBackupState->provider); + if (gBackupState->completer != NULL) { + gBackupState->completer->release(gBackupState->completer); + } g_static_mutex_free(&gBackupState->opLock); g_free(gBackupState->scriptArg); g_free(gBackupState->volumes); @@ -393,6 +414,7 @@ VmBackupOnError(void) break; case VMBACKUP_MSTATE_SCRIPT_THAW: + case VMBACKUP_MSTATE_COMPLETE_WAIT: /* Next state is "idle". */ gBackupState->machineState = VMBACKUP_MSTATE_IDLE; break; @@ -417,6 +439,7 @@ VmBackupDoAbort(void) ASSERT(gBackupState != NULL); if (gBackupState->machineState != VMBACKUP_MSTATE_SCRIPT_ERROR && gBackupState->machineState != VMBACKUP_MSTATE_SYNC_ERROR) { + const char *eventMsg = "Quiesce aborted."; /* Mark the current operation as cancelled. */ g_static_mutex_lock(&gBackupState->opLock); if (gBackupState->currentOp != NULL) { @@ -426,9 +449,21 @@ VmBackupDoAbort(void) } g_static_mutex_unlock(&gBackupState->opLock); +#ifdef __linux__ + /* Thaw the guest if already quiesced */ + if (gBackupState->machineState == VMBACKUP_MSTATE_SYNC_FREEZE) { + g_debug("Guest already quiesced, thawing for abort\n"); + if (!gBackupState->provider->snapshotDone(gBackupState, + gBackupState->provider->clientData)) { + g_debug("Thaw during abort failed\n"); + eventMsg = "Quiesce could not be aborted."; + } + } +#endif + VmBackup_SendEvent(VMBACKUP_EVENT_REQUESTOR_ABORT, VMBACKUP_REMOTE_ABORT, - "Quiesce aborted."); + eventMsg); /* Transition to the error state. */ if (VmBackupOnError()) { @@ -459,51 +494,49 @@ VmBackupAbortTimer(gpointer data) /** - * Callback that checks for the status of the current operation. Calls the - * queued operations as needed. + * Post-process the current operation. Calls the queued + * operations as needed. * - * @param[in] clientData Unused. + * @param[out] pending Tells if currentOp is pending. * - * @return FALSE + * @return TRUE if currentOp finished or pending, FALSE on error. */ static gboolean -VmBackupAsyncCallback(void *clientData) +VmBackupPostProcessCurrentOp(gboolean *pending) { + gboolean retVal = TRUE; VmBackupOpStatus status = VMBACKUP_STATUS_FINISHED; g_debug("*** %s\n", __FUNCTION__); ASSERT(gBackupState != NULL); - g_source_unref(gBackupState->timerEvent); - gBackupState->timerEvent = NULL; + *pending = FALSE; g_static_mutex_lock(&gBackupState->opLock); + if (gBackupState->currentOp != NULL) { - g_debug("VmBackupAsyncCallback: checking %s\n", gBackupState->currentOpName); + g_debug("%s: checking %s\n", __FUNCTION__, gBackupState->currentOpName); status = VmBackup_QueryStatus(gBackupState->currentOp); } - g_static_mutex_unlock(&gBackupState->opLock); switch (status) { case VMBACKUP_STATUS_PENDING: + *pending = TRUE; goto exit; case VMBACKUP_STATUS_FINISHED: - g_static_mutex_lock(&gBackupState->opLock); if (gBackupState->currentOpName != NULL) { g_debug("Async request '%s' completed\n", gBackupState->currentOpName); VmBackup_Release(gBackupState->currentOp); gBackupState->currentOpName = NULL; } gBackupState->currentOp = NULL; - g_static_mutex_unlock(&gBackupState->opLock); break; default: { gchar *msg; - g_static_mutex_lock(&gBackupState->opLock); if (gBackupState->errorMsg != NULL) { msg = g_strdup_printf("'%s' operation failed: %s", gBackupState->currentOpName, @@ -519,8 +552,7 @@ VmBackupAsyncCallback(void *clientData) VmBackup_Release(gBackupState->currentOp); gBackupState->currentOp = NULL; - g_static_mutex_unlock(&gBackupState->opLock); - VmBackupOnError(); + retVal = FALSE; goto exit; } } @@ -533,23 +565,62 @@ VmBackupAsyncCallback(void *clientData) VmBackupCallback cb = gBackupState->callback; gBackupState->callback = NULL; + /* + * Callback should not acquire opLock, but instead assume that + * it holds the lock already. + */ if (cb(gBackupState)) { - g_static_mutex_lock(&gBackupState->opLock); if (gBackupState->currentOp != NULL || gBackupState->forceRequeue) { - g_static_mutex_unlock(&gBackupState->opLock); goto exit; } - g_static_mutex_unlock(&gBackupState->opLock); } else { - VmBackupOnError(); + retVal = FALSE; goto exit; } } +exit: + g_static_mutex_unlock(&gBackupState->opLock); + return retVal; +} + + +/** + * Callback to advance the state machine to next state once + * current operation finishes. + * + * @param[in] clientData Unused. + * + * @return FALSE + */ + +static gboolean +VmBackupAsyncCallback(void *clientData) +{ + gboolean opPending; + g_debug("*** %s\n", __FUNCTION__); + ASSERT(gBackupState != NULL); + + g_source_unref(gBackupState->timerEvent); + gBackupState->timerEvent = NULL; + /* - * At this point, the current operation can be declared finished, and the - * state machine can move to the next state. + * Move the state machine to the next state, if the + * currentOp has finished. */ + if (!VmBackupPostProcessCurrentOp(&opPending)) { + VmBackupOnError(); + goto exit; + } else { + /* + * State transition can't be done if currentOp + * has not finished yet. + */ + if (opPending) { + goto exit; + } + } + switch (gBackupState->machineState) { case VMBACKUP_MSTATE_SCRIPT_FREEZE: /* Next state is "sync freeze wait". */ @@ -583,8 +654,15 @@ VmBackupAsyncCallback(void *clientData) } break; - case VMBACKUP_MSTATE_SCRIPT_ERROR: case VMBACKUP_MSTATE_SCRIPT_THAW: + /* Next state is "complete wait" or "idle". */ + if (!VmBackupEnableCompleteWait()) { + VmBackupOnError(); + } + break; + + case VMBACKUP_MSTATE_SCRIPT_ERROR: + case VMBACKUP_MSTATE_COMPLETE_WAIT: /* Next state is "idle". */ gBackupState->machineState = VMBACKUP_MSTATE_IDLE; break; @@ -675,6 +753,62 @@ VmBackupEnableSyncWait(void) } +/** + * Calls the completer's start function and moves the state + * machine to next state. + * + * @return Whether the completer's start callback was successful. + */ + +static Bool +VmBackupEnableCompleteWait(void) +{ + Bool ret = TRUE; + + g_debug("*** %s\n", __FUNCTION__); + + if (gBackupState->completer == NULL) { + gBackupState->machineState = VMBACKUP_MSTATE_IDLE; + goto exit; + } + + if (gBackupState->abortTimer != NULL) { + g_source_destroy(gBackupState->abortTimer); + g_source_unref(gBackupState->abortTimer); + + /* Host make timeout maximum as 15 minutes for complete process. */ + if (gBackupState->timeout > GUEST_QUIESCE_DEFAULT_TIMEOUT_IN_SEC) { + gBackupState->timeout = GUEST_QUIESCE_DEFAULT_TIMEOUT_IN_SEC; + } + + if (gBackupState->timeout != 0) { + g_debug("Using completer timeout: %u\n", gBackupState->timeout); + gBackupState->abortTimer = + g_timeout_source_new_seconds(gBackupState->timeout); + VMTOOLSAPP_ATTACH_SOURCE(gBackupState->ctx, + gBackupState->abortTimer, + VmBackupAbortTimer, + NULL, + NULL); + } + } + + if (gBackupState->completer->start(gBackupState, + gBackupState->completer->clientData)) { + /* Move to next state */ + gBackupState->machineState = VMBACKUP_MSTATE_COMPLETE_WAIT; + } else { + VmBackup_SendEvent(VMBACKUP_EVENT_REQUESTOR_ERROR, + VMBACKUP_SYNC_ERROR, + "Error when enabling the sync provider."); + ret = FALSE; + } + +exit: + return ret; +} + + /** * After sync provider's start function returns and moves the state * machine to VMBACKUP_MSTATE_SYNC_FREEZE state. @@ -708,36 +842,6 @@ VmBackupEnableSync(void) } -/** - * Get boolean entry for the key from the config file. - * - * @param[in] config Config file to read the key from. - * @param[in] key Key to look for in the config file. - * @param[in] defaultValue Default value if the key is not found. - */ - -static gboolean -VmBackupConfigGetBoolean(GKeyFile *config, - const char *key, - gboolean defValue) -{ - GError *err = NULL; - gboolean value = defValue; - - if (key != NULL) { - value = g_key_file_get_boolean(config, - "vmbackup", - key, - &err); - if (err != NULL) { - g_clear_error(&err); - value = defValue; - } - } - return value; -} - - /** * Starts the quiesce operation according to the supplied specification unless * some unexpected error occurs. @@ -754,9 +858,9 @@ static gboolean VmBackupStartCommon(RpcInData *data, gboolean forceQuiesce) { - GError *err = NULL; ToolsAppCtx *ctx = data->appCtx; VmBackupSyncProvider *provider = NULL; + VmBackupSyncCompleter *completer = NULL; size_t i; @@ -779,7 +883,7 @@ VmBackupStartCommon(RpcInData *data, * only allow VSS provider */ #if defined(_WIN32) - if (VmBackupConfigGetBoolean(ctx->config, "enableVSS", TRUE)) { + if (VMBACKUP_CONFIG_GET_BOOL(ctx->config, "enableVSS", TRUE)) { provider = VmBackup_NewVssProvider(); } #elif defined(_LINUX) || defined(__linux__) @@ -788,9 +892,9 @@ VmBackupStartCommon(RpcInData *data, * only allow SyncDriver provider */ if (gBackupState->quiesceFS && - VmBackupConfigGetBoolean(ctx->config, "enableSyncDriver", TRUE)) { + VMBACKUP_CONFIG_GET_BOOL(ctx->config, "enableSyncDriver", TRUE)) { provider = VmBackup_NewSyncDriverOnlyProvider(); - } + } #endif } else { /* If no quiescing is requested only allow null provider */ @@ -805,7 +909,7 @@ VmBackupStartCommon(RpcInData *data, for (i = 0; i < ARRAYSIZE(providers); i++) { struct SyncProvider *sp = &providers[i]; - if (VmBackupConfigGetBoolean(ctx->config, sp->cfgEntry, TRUE)) { + if (VMBACKUP_CONFIG_GET_BOOL(ctx->config, sp->cfgEntry, TRUE)) { provider = sp->ctor(); if (provider != NULL) { break; @@ -816,15 +920,27 @@ VmBackupStartCommon(RpcInData *data, ASSERT(provider != NULL); +#if defined(_WIN32) + if (VMBACKUP_CONFIG_GET_BOOL(ctx->config, "enableVSS", TRUE)) { + completer = VmBackup_NewVssCompleter(provider); + if (completer == NULL) { + provider->release(provider); + g_warning("Requested quiescing cannot be initialized."); + goto error; + } + } +#endif + /* Instantiate the backup state and start the operation. */ gBackupState->ctx = data->appCtx; gBackupState->pollPeriod = 1000; gBackupState->machineState = VMBACKUP_MSTATE_IDLE; gBackupState->freezeStatus = VMBACKUP_FREEZE_FINISHED; gBackupState->provider = provider; + gBackupState->completer = completer; gBackupState->needsPriv = FALSE; g_static_mutex_init(&gBackupState->opLock); - gBackupState->enableNullDriver = VmBackupConfigGetBoolean(ctx->config, + gBackupState->enableNullDriver = VMBACKUP_CONFIG_GET_BOOL(ctx->config, "enableNullDriver", TRUE); @@ -864,15 +980,8 @@ VmBackupStartCommon(RpcInData *data, * See bug 506106. */ if (gBackupState->timeout == 0) { - gBackupState->timeout = (guint) g_key_file_get_integer( - gBackupState->ctx->config, - "vmbackup", - "timeout", - &err); - if (err != NULL) { - g_clear_error(&err); - gBackupState->timeout = 15 * 60; - } + gBackupState->timeout = VMBACKUP_CONFIG_GET_INT(ctx->config, "timeout", + GUEST_QUIESCE_DEFAULT_TIMEOUT_IN_SEC); } /* Treat "0" as no timeout. */ @@ -898,6 +1007,9 @@ VmBackupStartCommon(RpcInData *data, if (gBackupState->provider) { gBackupState->provider->release(gBackupState->provider); } + if (gBackupState->completer) { + gBackupState->completer->release(gBackupState->completer); + } g_free(gBackupState->scriptArg); g_free(gBackupState->volumes); g_free(gBackupState); @@ -923,6 +1035,8 @@ VmBackupStartCommon(RpcInData *data, static gboolean VmBackupStart(RpcInData *data) { + ToolsAppCtx *ctx = data->appCtx; + g_debug("*** %s\n", __FUNCTION__); if (gBackupState != NULL) { return RPCIN_SETRETVALS(data, "Quiesce operation already in progress.", @@ -936,12 +1050,26 @@ VmBackupStart(RpcInData *data) if (StrUtil_GetNextIntToken(&generateManifests, &index, data->args, " ")) { gBackupState->generateManifests = generateManifests; } - gBackupState->quiesceApps = TRUE; - gBackupState->quiesceFS = TRUE; - gBackupState->allowHWProvider = TRUE; - gBackupState->execScripts = TRUE; - gBackupState->scriptArg = NULL; - gBackupState->timeout = 0; + gBackupState->quiesceApps = VMBACKUP_CONFIG_GET_BOOL(ctx->config, + "quiesceApps", + TRUE); + gBackupState->quiesceFS = VMBACKUP_CONFIG_GET_BOOL(ctx->config, + "quiesceFS", + TRUE); + gBackupState->allowHWProvider = VMBACKUP_CONFIG_GET_BOOL(ctx->config, + "allowHWProvider", + TRUE); + gBackupState->execScripts = VMBACKUP_CONFIG_GET_BOOL(ctx->config, + "execScripts", + TRUE); + gBackupState->scriptArg = VMBACKUP_CONFIG_GET_STR(ctx->config, + "scriptArg", + NULL); + gBackupState->timeout = VMBACKUP_CONFIG_GET_INT(ctx->config, + "timeout", 0); + gBackupState->vssUseDefault = VMBACKUP_CONFIG_GET_BOOL(ctx->config, + "vssUseDefault", + TRUE); /* get volume uuids if provided */ if (data->args[index] != '\0') { @@ -949,7 +1077,9 @@ VmBackupStart(RpcInData *data) data->argsSize - index); } } - return VmBackupStartCommon(data, FALSE); + return VmBackupStartCommon(data, VMBACKUP_CONFIG_GET_BOOL(ctx->config, + "forceQuiesce", + FALSE)); } @@ -987,8 +1117,10 @@ VmBackupStart(RpcInData *data) static gboolean VmBackupStartWithOpts(RpcInData *data) { + ToolsAppCtx *ctx = data->appCtx; GuestQuiesceParams *params; - GuestQuiesceParamsV1 *paramsV1; + GuestQuiesceParamsV1 *paramsV1 = NULL; + GuestQuiesceParamsV2 *paramsV2; gboolean retval; g_debug("*** %s\n", __FUNCTION__); @@ -997,24 +1129,57 @@ VmBackupStartWithOpts(RpcInData *data) FALSE); } params = (GuestQuiesceParams *)data->args; + +#if defined(_WIN32) + if (params->ver != GUESTQUIESCEPARAMS_V1 && + params->ver != GUESTQUIESCEPARAMS_V2) { + g_warning("%s: Incompatible quiesce parameter version. \n", __FUNCTION__); + return RPCIN_SETRETVALS(data, "Incompatible quiesce parameter version", + FALSE); + } +#else if (params->ver != GUESTQUIESCEPARAMS_V1) { g_warning("%s: Incompatible quiesce parameter version. \n", __FUNCTION__); return RPCIN_SETRETVALS(data, "Incompatible quiesce parameter version", FALSE); } +#endif + gBackupState = g_new0(VmBackupState, 1); - paramsV1 = params->GuestQuiesceParams_u.guestQuiesceParamsV1; - gBackupState->generateManifests = paramsV1->createManifest; - gBackupState->quiesceApps = paramsV1->quiesceApps; - gBackupState->quiesceFS = paramsV1->quiesceFS; - gBackupState->allowHWProvider = paramsV1->writableSnapshot; - gBackupState->execScripts = paramsV1->execScripts; - gBackupState->scriptArg = g_strndup(paramsV1->scriptArg, - strlen(paramsV1->scriptArg)); - gBackupState->timeout = paramsV1->timeout; - gBackupState->volumes = g_strndup(paramsV1->diskUuids, - strlen(paramsV1->diskUuids)); - retval = VmBackupStartCommon(data, TRUE); + + if (params->ver == GUESTQUIESCEPARAMS_V1) { + paramsV1 = params->GuestQuiesceParams_u.guestQuiesceParamsV1; + gBackupState->vssUseDefault = VMBACKUP_CONFIG_GET_BOOL(ctx->config, + "vssUseDefault", + TRUE); + } else if (params->ver == GUESTQUIESCEPARAMS_V2) { + paramsV2 = params->GuestQuiesceParams_u.guestQuiesceParamsV2; + paramsV1 = ¶msV2->paramsV1; + gBackupState->vssBackupContext = paramsV2->vssBackupContext; + gBackupState->vssBackupType = paramsV2->vssBackupType; + gBackupState->vssBootableSystemState = paramsV2->vssBootableSystemState; + gBackupState->vssPartialFileSupport = paramsV2->vssPartialFileSupport; + gBackupState->vssUseDefault = VMBACKUP_CONFIG_GET_BOOL(ctx->config, + "vssUseDefault", + FALSE); + } + + if (paramsV1 != NULL) { + gBackupState->generateManifests = paramsV1->createManifest; + gBackupState->quiesceApps = paramsV1->quiesceApps; + gBackupState->quiesceFS = paramsV1->quiesceFS; + gBackupState->allowHWProvider = paramsV1->writableSnapshot; + gBackupState->execScripts = paramsV1->execScripts; + gBackupState->scriptArg = g_strndup(paramsV1->scriptArg, + strlen(paramsV1->scriptArg)); + gBackupState->timeout = paramsV1->timeout; + gBackupState->volumes = g_strndup(paramsV1->diskUuids, + strlen(paramsV1->diskUuids)); + } + + retval = VmBackupStartCommon(data, VMBACKUP_CONFIG_GET_BOOL(ctx->config, + "forceQuiesce", + TRUE)); return retval; } @@ -1084,6 +1249,45 @@ VmBackupSnapshotDone(RpcInData *data) } +/** + * Notifies the completer to complete the provider process + * machine in the COMPLETE_WAIT state. + * + * @param[in] data RPC data. + * + * @return TRUE + */ + +static gboolean +VmBackupSnapshotCompleted(RpcInData *data) +{ + g_debug("*** %s\n", __FUNCTION__); + + if (gBackupState == NULL || + gBackupState->completer == NULL) { + return RPCIN_SETRETVALS(data, "Error: no quiesce complete in progress", + FALSE); + } else if (gBackupState->machineState != VMBACKUP_MSTATE_COMPLETE_WAIT) { + g_warning("Error: unexpected state for snapshot complete message: %s", + VmBackupGetStateName(gBackupState->machineState)); + return RPCIN_SETRETVALS(data, + "Error: unexpected state for complete message.", + FALSE); + } else { + if (!gBackupState->completer->snapshotCompleted(gBackupState, + gBackupState->completer->clientData)) { + VmBackup_SendEvent(VMBACKUP_EVENT_REQUESTOR_ERROR, + VMBACKUP_SYNC_ERROR, + "Error when notifying the sync completer."); + if (VmBackupOnError()) { + VmBackupFinalize(); + } + } + return RPCIN_SETRETVALS(data, "", TRUE); + } +} + + /** * Prints some information about the plugin's state to the log. * @@ -1167,6 +1371,8 @@ ToolsOnLoad(ToolsAppCtx *ctx) { VMBACKUP_PROTOCOL_START_WITH_OPTS, VmBackupStartWithOpts, NULL, xdr_GuestQuiesceParams, NULL, sizeof (GuestQuiesceParams) }, { VMBACKUP_PROTOCOL_ABORT, VmBackupAbort, NULL, NULL, NULL, 0 }, + { VMBACKUP_PROTOCOL_SNAPSHOT_COMPLETED, VmBackupSnapshotCompleted, NULL, + NULL, NULL, 0 }, { VMBACKUP_PROTOCOL_SNAPSHOT_DONE, VmBackupSnapshotDone, NULL, NULL, NULL, 0 } }; ToolsPluginSignalCb sigs[] = { diff --git a/open-vm-tools/services/plugins/vmbackup/syncDriverOps.c b/open-vm-tools/services/plugins/vmbackup/syncDriverOps.c index 11d37843c..5559aa306 100644 --- a/open-vm-tools/services/plugins/vmbackup/syncDriverOps.c +++ b/open-vm-tools/services/plugins/vmbackup/syncDriverOps.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -488,7 +488,7 @@ VmBackupSyncDriverSnapshotDone(VmBackupState *state, static Bool VmBackupSyncDriverOnlySnapshotDone(VmBackupState *state, - void *clientData) + void *clientData) { VmBackupDriverOp *op; diff --git a/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h b/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h index 04e866ca7..312ee4a18 100644 --- a/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h +++ b/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -35,6 +35,11 @@ #include "vmware/tools/threadPool.h" #endif +/* + * The default timeout in seconds for guest OS quiescing process + */ +#define GUEST_QUIESCE_DEFAULT_TIMEOUT_IN_SEC (15 * 60) + typedef enum { VMBACKUP_STATUS_PENDING, VMBACKUP_STATUS_FINISHED, @@ -62,6 +67,7 @@ typedef enum { VMBACKUP_MSTATE_SYNC_FREEZE, VMBACKUP_MSTATE_SYNC_THAW, VMBACKUP_MSTATE_SCRIPT_THAW, + VMBACKUP_MSTATE_COMPLETE_WAIT, VMBACKUP_MSTATE_SCRIPT_ERROR, VMBACKUP_MSTATE_SYNC_ERROR } VmBackupMState; @@ -81,6 +87,7 @@ typedef struct VmBackupOp { struct VmBackupSyncProvider; +struct VmBackupSyncCompleter; /** * Holds information about the current state of the backup operation. @@ -114,7 +121,7 @@ typedef struct VmBackupState { Bool execScripts; Bool enableNullDriver; Bool needsPriv; - char *scriptArg; + gchar *scriptArg; guint timeout; gpointer clientData; void *scripts; @@ -124,10 +131,17 @@ typedef struct VmBackupState { VmBackupMState machineState; VmBackupFreezeStatus freezeStatus; struct VmBackupSyncProvider *provider; + struct VmBackupSyncCompleter *completer; + gint vssBackupContext; + gint vssBackupType; + Bool vssBootableSystemState; + Bool vssPartialFileSupport; + Bool vssUseDefault; } VmBackupState; typedef Bool (*VmBackupCallback)(VmBackupState *); typedef Bool (*VmBackupProviderCallback)(VmBackupState *, void *clientData); +typedef Bool (*VmBackupCompleterCallback)(VmBackupState *, void *clientData); /** @@ -147,6 +161,19 @@ typedef struct VmBackupSyncProvider { void *clientData; } VmBackupSyncProvider; +/** + * Defines the interface between the state machine and the implementation + * of the "sync completer": either the VSS completer or the sync driver + * completer, currently. + */ + +typedef struct VmBackupSyncCompleter { + VmBackupCompleterCallback start; + VmBackupCompleterCallback snapshotCompleted; + void (*release)(struct VmBackupSyncCompleter *); + void *clientData; +} VmBackupSyncCompleter; + /** * Sets the current asynchronous operation being monitored, and an @@ -251,6 +278,9 @@ VmBackup_NewSyncDriverOnlyProvider(void); VmBackupSyncProvider * VmBackup_NewVssProvider(void); +VmBackupSyncCompleter * +VmBackup_NewVssCompleter(VmBackupSyncProvider *provider); + void VmBackup_UnregisterSnapshotProvider(void); #endif diff --git a/open-vm-tools/services/plugins/vmbackup/vmBackupSignals.gm b/open-vm-tools/services/plugins/vmbackup/vmBackupSignals.gm index 9b58ea158..63144a600 100644 --- a/open-vm-tools/services/plugins/vmbackup/vmBackupSignals.gm +++ b/open-vm-tools/services/plugins/vmbackup/vmBackupSignals.gm @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2010-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2010-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/vmtoolsd/Makefile.am b/open-vm-tools/services/vmtoolsd/Makefile.am index 47c7fa2d5..c21a8bb3e 100644 --- a/open-vm-tools/services/vmtoolsd/Makefile.am +++ b/open-vm-tools/services/vmtoolsd/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/services/vmtoolsd/Makefile.in b/open-vm-tools/services/vmtoolsd/Makefile.in deleted file mode 100644 index 1631b1cca..000000000 --- a/open-vm-tools/services/vmtoolsd/Makefile.in +++ /dev/null @@ -1,755 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmtoolsd$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = services/vmtoolsd -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pamdir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmtoolsd_OBJECTS = vmtoolsd-cmdLine.$(OBJEXT) \ - vmtoolsd-mainLoop.$(OBJEXT) vmtoolsd-mainPosix.$(OBJEXT) \ - vmtoolsd-pluginMgr.$(OBJEXT) vmtoolsd-serviceObj.$(OBJEXT) \ - vmtoolsd-threadPool.$(OBJEXT) vmtoolsd-toolsRpc.$(OBJEXT) \ - vmtoolsd-svcSignals.$(OBJEXT) -vmtoolsd_OBJECTS = $(am_vmtoolsd_OBJECTS) -am__DEPENDENCIES_1 = -vmtoolsd_DEPENDENCIES = $(am__DEPENDENCIES_1) -pamSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(pam_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmtoolsd_SOURCES) -DIST_SOURCES = $(vmtoolsd_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -pamdir = $(PAM_PREFIX)/pam.d -vmtoolsd_CPPFLAGS = @VMTOOLS_CPPFLAGS@ @GMODULE_CPPFLAGS@ \ - @GOBJECT_CPPFLAGS@ @GTHREAD_CPPFLAGS@ -I$(builddir) \ - -DVMTOOLSD_PLUGIN_ROOT=\"$(pkglibdir)/plugins\" -vmtoolsd_LDADD = @VMTOOLS_LIBS@ @GMODULE_LIBS@ @GOBJECT_LIBS@ \ - @GTHREAD_LIBS@ $(am__append_1) -vmtoolsd_SOURCES = cmdLine.c mainLoop.c mainPosix.c pluginMgr.c \ - serviceObj.c threadPool.c toolsRpc.c svcSignals.c -BUILT_SOURCES = svcSignals.c svcSignals.h -CLEANFILES = svcSignals.c svcSignals.h -EXTRA_DIST = svcSignals.gm -@HAVE_ICU_FALSE@vmtoolsd_LINK = $(LINK) -@HAVE_ICU_TRUE@vmtoolsd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - - -# PAM support is currently only available for Linux, so HAVE_PAM is only -# defined for that OS. -@HAVE_PAM_TRUE@pam_SCRIPTS = $(top_srcdir)/scripts/linux/pam.d/vmtoolsd -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu services/vmtoolsd/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu services/vmtoolsd/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmtoolsd$(EXEEXT): $(vmtoolsd_OBJECTS) $(vmtoolsd_DEPENDENCIES) - @rm -f vmtoolsd$(EXEEXT) - $(vmtoolsd_LINK) $(vmtoolsd_OBJECTS) $(vmtoolsd_LDADD) $(LIBS) -install-pamSCRIPTS: $(pam_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(pamdir)" || $(MKDIR_P) "$(DESTDIR)$(pamdir)" - @list='$(pam_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(pamSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(pamdir)/$$f'"; \ - $(pamSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(pamdir)/$$f"; \ - else :; fi; \ - done - -uninstall-pamSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(pam_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(pamdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pamdir)/$$f"; \ - done - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-cmdLine.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-mainLoop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-mainPosix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-pluginMgr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-serviceObj.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-svcSignals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-threadPool.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmtoolsd-toolsRpc.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmtoolsd-cmdLine.o: cmdLine.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-cmdLine.o -MD -MP -MF $(DEPDIR)/vmtoolsd-cmdLine.Tpo -c -o vmtoolsd-cmdLine.o `test -f 'cmdLine.c' || echo '$(srcdir)/'`cmdLine.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-cmdLine.Tpo $(DEPDIR)/vmtoolsd-cmdLine.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdLine.c' object='vmtoolsd-cmdLine.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-cmdLine.o `test -f 'cmdLine.c' || echo '$(srcdir)/'`cmdLine.c - -vmtoolsd-cmdLine.obj: cmdLine.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-cmdLine.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-cmdLine.Tpo -c -o vmtoolsd-cmdLine.obj `if test -f 'cmdLine.c'; then $(CYGPATH_W) 'cmdLine.c'; else $(CYGPATH_W) '$(srcdir)/cmdLine.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-cmdLine.Tpo $(DEPDIR)/vmtoolsd-cmdLine.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmdLine.c' object='vmtoolsd-cmdLine.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-cmdLine.obj `if test -f 'cmdLine.c'; then $(CYGPATH_W) 'cmdLine.c'; else $(CYGPATH_W) '$(srcdir)/cmdLine.c'; fi` - -vmtoolsd-mainLoop.o: mainLoop.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-mainLoop.o -MD -MP -MF $(DEPDIR)/vmtoolsd-mainLoop.Tpo -c -o vmtoolsd-mainLoop.o `test -f 'mainLoop.c' || echo '$(srcdir)/'`mainLoop.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-mainLoop.Tpo $(DEPDIR)/vmtoolsd-mainLoop.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mainLoop.c' object='vmtoolsd-mainLoop.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-mainLoop.o `test -f 'mainLoop.c' || echo '$(srcdir)/'`mainLoop.c - -vmtoolsd-mainLoop.obj: mainLoop.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-mainLoop.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-mainLoop.Tpo -c -o vmtoolsd-mainLoop.obj `if test -f 'mainLoop.c'; then $(CYGPATH_W) 'mainLoop.c'; else $(CYGPATH_W) '$(srcdir)/mainLoop.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-mainLoop.Tpo $(DEPDIR)/vmtoolsd-mainLoop.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mainLoop.c' object='vmtoolsd-mainLoop.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-mainLoop.obj `if test -f 'mainLoop.c'; then $(CYGPATH_W) 'mainLoop.c'; else $(CYGPATH_W) '$(srcdir)/mainLoop.c'; fi` - -vmtoolsd-mainPosix.o: mainPosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-mainPosix.o -MD -MP -MF $(DEPDIR)/vmtoolsd-mainPosix.Tpo -c -o vmtoolsd-mainPosix.o `test -f 'mainPosix.c' || echo '$(srcdir)/'`mainPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-mainPosix.Tpo $(DEPDIR)/vmtoolsd-mainPosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mainPosix.c' object='vmtoolsd-mainPosix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-mainPosix.o `test -f 'mainPosix.c' || echo '$(srcdir)/'`mainPosix.c - -vmtoolsd-mainPosix.obj: mainPosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-mainPosix.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-mainPosix.Tpo -c -o vmtoolsd-mainPosix.obj `if test -f 'mainPosix.c'; then $(CYGPATH_W) 'mainPosix.c'; else $(CYGPATH_W) '$(srcdir)/mainPosix.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-mainPosix.Tpo $(DEPDIR)/vmtoolsd-mainPosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mainPosix.c' object='vmtoolsd-mainPosix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-mainPosix.obj `if test -f 'mainPosix.c'; then $(CYGPATH_W) 'mainPosix.c'; else $(CYGPATH_W) '$(srcdir)/mainPosix.c'; fi` - -vmtoolsd-pluginMgr.o: pluginMgr.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-pluginMgr.o -MD -MP -MF $(DEPDIR)/vmtoolsd-pluginMgr.Tpo -c -o vmtoolsd-pluginMgr.o `test -f 'pluginMgr.c' || echo '$(srcdir)/'`pluginMgr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-pluginMgr.Tpo $(DEPDIR)/vmtoolsd-pluginMgr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pluginMgr.c' object='vmtoolsd-pluginMgr.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-pluginMgr.o `test -f 'pluginMgr.c' || echo '$(srcdir)/'`pluginMgr.c - -vmtoolsd-pluginMgr.obj: pluginMgr.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-pluginMgr.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-pluginMgr.Tpo -c -o vmtoolsd-pluginMgr.obj `if test -f 'pluginMgr.c'; then $(CYGPATH_W) 'pluginMgr.c'; else $(CYGPATH_W) '$(srcdir)/pluginMgr.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-pluginMgr.Tpo $(DEPDIR)/vmtoolsd-pluginMgr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pluginMgr.c' object='vmtoolsd-pluginMgr.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-pluginMgr.obj `if test -f 'pluginMgr.c'; then $(CYGPATH_W) 'pluginMgr.c'; else $(CYGPATH_W) '$(srcdir)/pluginMgr.c'; fi` - -vmtoolsd-serviceObj.o: serviceObj.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-serviceObj.o -MD -MP -MF $(DEPDIR)/vmtoolsd-serviceObj.Tpo -c -o vmtoolsd-serviceObj.o `test -f 'serviceObj.c' || echo '$(srcdir)/'`serviceObj.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-serviceObj.Tpo $(DEPDIR)/vmtoolsd-serviceObj.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serviceObj.c' object='vmtoolsd-serviceObj.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-serviceObj.o `test -f 'serviceObj.c' || echo '$(srcdir)/'`serviceObj.c - -vmtoolsd-serviceObj.obj: serviceObj.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-serviceObj.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-serviceObj.Tpo -c -o vmtoolsd-serviceObj.obj `if test -f 'serviceObj.c'; then $(CYGPATH_W) 'serviceObj.c'; else $(CYGPATH_W) '$(srcdir)/serviceObj.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-serviceObj.Tpo $(DEPDIR)/vmtoolsd-serviceObj.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serviceObj.c' object='vmtoolsd-serviceObj.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-serviceObj.obj `if test -f 'serviceObj.c'; then $(CYGPATH_W) 'serviceObj.c'; else $(CYGPATH_W) '$(srcdir)/serviceObj.c'; fi` - -vmtoolsd-threadPool.o: threadPool.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-threadPool.o -MD -MP -MF $(DEPDIR)/vmtoolsd-threadPool.Tpo -c -o vmtoolsd-threadPool.o `test -f 'threadPool.c' || echo '$(srcdir)/'`threadPool.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-threadPool.Tpo $(DEPDIR)/vmtoolsd-threadPool.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='threadPool.c' object='vmtoolsd-threadPool.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-threadPool.o `test -f 'threadPool.c' || echo '$(srcdir)/'`threadPool.c - -vmtoolsd-threadPool.obj: threadPool.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-threadPool.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-threadPool.Tpo -c -o vmtoolsd-threadPool.obj `if test -f 'threadPool.c'; then $(CYGPATH_W) 'threadPool.c'; else $(CYGPATH_W) '$(srcdir)/threadPool.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-threadPool.Tpo $(DEPDIR)/vmtoolsd-threadPool.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='threadPool.c' object='vmtoolsd-threadPool.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-threadPool.obj `if test -f 'threadPool.c'; then $(CYGPATH_W) 'threadPool.c'; else $(CYGPATH_W) '$(srcdir)/threadPool.c'; fi` - -vmtoolsd-toolsRpc.o: toolsRpc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-toolsRpc.o -MD -MP -MF $(DEPDIR)/vmtoolsd-toolsRpc.Tpo -c -o vmtoolsd-toolsRpc.o `test -f 'toolsRpc.c' || echo '$(srcdir)/'`toolsRpc.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-toolsRpc.Tpo $(DEPDIR)/vmtoolsd-toolsRpc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolsRpc.c' object='vmtoolsd-toolsRpc.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-toolsRpc.o `test -f 'toolsRpc.c' || echo '$(srcdir)/'`toolsRpc.c - -vmtoolsd-toolsRpc.obj: toolsRpc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-toolsRpc.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-toolsRpc.Tpo -c -o vmtoolsd-toolsRpc.obj `if test -f 'toolsRpc.c'; then $(CYGPATH_W) 'toolsRpc.c'; else $(CYGPATH_W) '$(srcdir)/toolsRpc.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-toolsRpc.Tpo $(DEPDIR)/vmtoolsd-toolsRpc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolsRpc.c' object='vmtoolsd-toolsRpc.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-toolsRpc.obj `if test -f 'toolsRpc.c'; then $(CYGPATH_W) 'toolsRpc.c'; else $(CYGPATH_W) '$(srcdir)/toolsRpc.c'; fi` - -vmtoolsd-svcSignals.o: svcSignals.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-svcSignals.o -MD -MP -MF $(DEPDIR)/vmtoolsd-svcSignals.Tpo -c -o vmtoolsd-svcSignals.o `test -f 'svcSignals.c' || echo '$(srcdir)/'`svcSignals.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-svcSignals.Tpo $(DEPDIR)/vmtoolsd-svcSignals.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='svcSignals.c' object='vmtoolsd-svcSignals.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-svcSignals.o `test -f 'svcSignals.c' || echo '$(srcdir)/'`svcSignals.c - -vmtoolsd-svcSignals.obj: svcSignals.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmtoolsd-svcSignals.obj -MD -MP -MF $(DEPDIR)/vmtoolsd-svcSignals.Tpo -c -o vmtoolsd-svcSignals.obj `if test -f 'svcSignals.c'; then $(CYGPATH_W) 'svcSignals.c'; else $(CYGPATH_W) '$(srcdir)/svcSignals.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmtoolsd-svcSignals.Tpo $(DEPDIR)/vmtoolsd-svcSignals.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='svcSignals.c' object='vmtoolsd-svcSignals.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmtoolsd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmtoolsd-svcSignals.obj `if test -f 'svcSignals.c'; then $(CYGPATH_W) 'svcSignals.c'; else $(CYGPATH_W) '$(srcdir)/svcSignals.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pamdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pamSCRIPTS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-pamSCRIPTS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - -.MAKE: install-am install-data-am install-exec-am install-strip \ - uninstall-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-info install-info-am install-man install-pamSCRIPTS \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-hook uninstall-pamSCRIPTS - - -svcSignals.c: $(top_srcdir)/services/vmtoolsd/svcSignals.gm - glib-genmarshal --body $(top_srcdir)/services/vmtoolsd/svcSignals.gm > \ - $@ || (rm -f $@ && exit 1) - -svcSignals.h: $(top_srcdir)/services/vmtoolsd/svcSignals.gm - glib-genmarshal --header $(top_srcdir)/services/vmtoolsd/svcSignals.gm > \ - $@ || (rm -f $@ && exit 1) - -# Message catalogs. -install-data-hook: - @INSTVMSG@ vmtoolsd $(srcdir)/l10n $(DESTDIR)$(datadir) - -install-exec-hook: - $(INSTALL) -d $(DESTDIR)/etc/vmware-tools - -uninstall-hook: - rm -rf $(DESTDIR)/etc/vmware-tools -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/services/vmtoolsd/cmdLine.c b/open-vm-tools/services/vmtoolsd/cmdLine.c index c0a64cb5c..6e619f1d0 100644 --- a/open-vm-tools/services/vmtoolsd/cmdLine.c +++ b/open-vm-tools/services/vmtoolsd/cmdLine.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -35,13 +35,13 @@ #include "vm_assert.h" #include "conf.h" -#include "rpcout.h" #include "str.h" #include "vmcheck.h" #include "vmtoolsd_version.h" #include "vmware/tools/log.h" #include "vmware/tools/utils.h" #include "vmware/tools/i18n.h" +#include "vmware/tools/guestrpc.h" #include "vm_version.h" /** @@ -69,7 +69,7 @@ ToolsCoreRunCommand(const gchar *option, char *result = NULL; Bool status = FALSE; - status = RpcOut_sendOne(&result, NULL, "%s", value); + status = RpcChannel_SendOne(&result, NULL, "%s", value); if (!status) { g_printerr("%s\n", result ? result : "NULL"); diff --git a/open-vm-tools/services/vmtoolsd/l10n/ja.vmsg b/open-vm-tools/services/vmtoolsd/l10n/ja.vmsg index d36ba3143..2261153a2 100644 --- a/open-vm-tools/services/vmtoolsd/l10n/ja.vmsg +++ b/open-vm-tools/services/vmtoolsd/l10n/ja.vmsg @@ -26,7 +26,7 @@ cmdline.blockfd.fd = "fd" cmdline.commonpath = "共通プラグイン ディレクトリã®ãƒ‘スã§ã™ã€‚" -cmdline.config = "指定ã•ã‚ŒãŸãƒ‘スã§æ§‹æˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ã¾ã™ã€‚" +cmdline.config = "指定ã•ã‚ŒãŸãƒ‘スã§è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã‚’使用ã—ã¾ã™ã€‚" cmdline.debug = "指定ã•ã‚ŒãŸãƒ—ラグインを使用ã—ã¦ã€ãƒ‡ãƒãƒƒã‚° モードã§å®Ÿè¡Œã—ã¾ã™ã€‚" @@ -38,7 +38,7 @@ cmdline.install = "Service Control Manager を使ã£ã¦ã‚µãƒ¼ãƒ“スをインス cmdline.install.args = "args" -cmdline.kill = "ツール サービスã®å®Ÿè¡Œä¸­ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’åœæ­¢ã—ã¾ã™ã€‚" +cmdline.kill = "Tools Service ã®å®Ÿè¡Œä¸­ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’åœæ­¢ã—ã¾ã™ã€‚" cmdline.log = "無視ã•ã‚Œã¾ã™ã€‚後方互æ›æ€§ã®ãŸã‚ã«ä¿æŒã•ã‚Œã¦ã„ã¾ã™ã€‚" diff --git a/open-vm-tools/services/vmtoolsd/mainLoop.c b/open-vm-tools/services/vmtoolsd/mainLoop.c index f773cff10..98670d4c7 100644 --- a/open-vm-tools/services/vmtoolsd/mainLoop.c +++ b/open-vm-tools/services/vmtoolsd/mainLoop.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -60,6 +60,11 @@ ToolsCoreCleanup(ToolsServiceState *state) { ToolsCorePool_Shutdown(&state->ctx); ToolsCore_UnloadPlugins(state); +#if defined(__linux__) + if (state->mainService) { + ToolsCore_ReleaseVsockFamily(state); + } +#endif if (state->ctx.rpc != NULL) { RpcChannel_Stop(state->ctx.rpc); RpcChannel_Destroy(state->ctx.rpc); @@ -202,6 +207,15 @@ ToolsCoreRunLoop(ToolsServiceState *state) return 1; } +#if defined(__linux__) + /* + * Init a reference to vSocket family in the main service. + */ + if (state->mainService) { + ToolsCore_InitVsockFamily(state); + } +#endif + /* * The following criteria needs to hold for the main loop to be run: * diff --git a/open-vm-tools/services/vmtoolsd/mainPosix.c b/open-vm-tools/services/vmtoolsd/mainPosix.c index af01a494f..cf200103b 100644 --- a/open-vm-tools/services/vmtoolsd/mainPosix.c +++ b/open-vm-tools/services/vmtoolsd/mainPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/vmtoolsd/pluginMgr.c b/open-vm-tools/services/vmtoolsd/pluginMgr.c index 700f23fe3..51feecdcf 100644 --- a/open-vm-tools/services/vmtoolsd/pluginMgr.c +++ b/open-vm-tools/services/vmtoolsd/pluginMgr.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -557,6 +557,8 @@ ToolsCoreLoadDirectory(ToolsAppCtx *ctx, module = g_module_open(path, G_MODULE_BIND_LOCAL); #ifdef USE_APPLOADER if (module == NULL) { + g_info("Opening plugin '%s' with system libraries failed: %s\n", + entry, g_module_error()); /* Falling back to the shipped libraries */ if (!LoadDependencies(path, TRUE)) { g_warning("Loading of shipped library dependencies for %s failed.\n", diff --git a/open-vm-tools/services/vmtoolsd/serviceObj.c b/open-vm-tools/services/vmtoolsd/serviceObj.c index 6f2f9616a..1dbd4eda2 100644 --- a/open-vm-tools/services/vmtoolsd/serviceObj.c +++ b/open-vm-tools/services/vmtoolsd/serviceObj.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/vmtoolsd/serviceObj.h b/open-vm-tools/services/vmtoolsd/serviceObj.h index 1e99c2525..b9a1af5f8 100644 --- a/open-vm-tools/services/vmtoolsd/serviceObj.h +++ b/open-vm-tools/services/vmtoolsd/serviceObj.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/vmtoolsd/svcSignals.gm b/open-vm-tools/services/vmtoolsd/svcSignals.gm index a4c293e8b..436c56141 100644 --- a/open-vm-tools/services/vmtoolsd/svcSignals.gm +++ b/open-vm-tools/services/vmtoolsd/svcSignals.gm @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2009-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/vmtoolsd/threadPool.c b/open-vm-tools/services/vmtoolsd/threadPool.c index b7fd7ae66..323cbac56 100644 --- a/open-vm-tools/services/vmtoolsd/threadPool.c +++ b/open-vm-tools/services/vmtoolsd/threadPool.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/services/vmtoolsd/toolsCoreInt.h b/open-vm-tools/services/vmtoolsd/toolsCoreInt.h index b4f24b1ff..6d304a716 100644 --- a/open-vm-tools/services/vmtoolsd/toolsCoreInt.h +++ b/open-vm-tools/services/vmtoolsd/toolsCoreInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -86,6 +86,17 @@ typedef struct ToolsServiceState { RpcDebugLibData *debugData; ToolsAppCtx ctx; GArray *providers; +#if defined(__linux__) + /* + * We hold a reference to vSocket device to avoid + * address family re-registration when someone + * connects over vSocket. We have vsockFamily + * here mainly because it does not cost much + * and it is useful for debug logs. + */ + int vsockDev; + int vsockFamily; +#endif } ToolsServiceState; @@ -112,6 +123,14 @@ ToolsCore_Setup(ToolsServiceState *state); gboolean ToolsCore_InitRpc(ToolsServiceState *state); +#if defined(__linux__) +void +ToolsCore_InitVsockFamily(ToolsServiceState *state); + +void +ToolsCore_ReleaseVsockFamily(ToolsServiceState *state); +#endif + gboolean ToolsCore_LoadPlugins(ToolsServiceState *state); diff --git a/open-vm-tools/services/vmtoolsd/toolsRpc.c b/open-vm-tools/services/vmtoolsd/toolsRpc.c index 941447640..a10ef3d83 100644 --- a/open-vm-tools/services/vmtoolsd/toolsRpc.c +++ b/open-vm-tools/services/vmtoolsd/toolsRpc.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -40,6 +40,9 @@ #include "vmware/tools/utils.h" #include "vmware/tools/log.h" #include "vm_version.h" +#if defined(__linux__) +#include "vmci_sockets.h" +#endif /** * Take action after an RPC channel reset. @@ -58,6 +61,7 @@ ToolsCoreCheckReset(RpcChannel *chan, static gboolean version_sent = FALSE; ASSERT(state != NULL); + ASSERT(chan == state->ctx.rpc); if (success) { const gchar *app; @@ -90,6 +94,15 @@ ToolsCoreCheckReset(RpcChannel *chan, g_signal_emit_by_name(state->ctx.serviceObj, TOOLS_CORE_SIG_RESET, &state->ctx); +#if defined(__linux__) + if (state->mainService) { + /* + * Release the existing vSocket family. + */ + ToolsCore_ReleaseVsockFamily(state); + ToolsCore_InitVsockFamily(state); + } +#endif } else { VMTOOLSAPP_ERROR(&state->ctx, EXIT_FAILURE); } @@ -140,10 +153,10 @@ ToolsCoreRpcCapReg(RpcInData *data) char *result = NULL; size_t resultLen; gchar *toolsVersion; - gboolean disableVersion = g_key_file_get_boolean(state->ctx.config, - "vmtools", - CONFNAME_DISABLETOOLSVERSION, - NULL); + gboolean hideVersion = g_key_file_get_boolean(state->ctx.config, + "vmtools", + CONFNAME_HIDETOOLSVERSION, + NULL); #if defined(_WIN32) type = TOOLS_TYPE_MSI; @@ -162,7 +175,7 @@ ToolsCoreRpcCapReg(RpcInData *data) #endif #endif - version = disableVersion ? TOOLS_VERSION_UNMANAGED : TOOLS_VERSION_CURRENT; + version = hideVersion ? TOOLS_VERSION_UNMANAGED : TOOLS_VERSION_CURRENT; /* * First try "tools.set.versiontype", if that fails because host is too @@ -172,6 +185,8 @@ ToolsCoreRpcCapReg(RpcInData *data) if (!RpcChannel_Send(state->ctx.rpc, toolsVersion, strlen(toolsVersion) + 1, &result, &resultLen)) { + GError *gerror = NULL; + gboolean disableVersion; vm_free(result); g_free(toolsVersion); @@ -179,9 +194,19 @@ ToolsCoreRpcCapReg(RpcInData *data) * Fall back to old behavior for OSPs and OVT so that tools will be * reported as guest managed. */ - if (type == TOOLS_TYPE_OSP || type == TOOLS_TYPE_OVT) { - version = TOOLS_VERSION_UNMANAGED; + disableVersion = g_key_file_get_boolean(state->ctx.config, + "vmtools", + CONFNAME_DISABLETOOLSVERSION, + &gerror); + + /* By default disableVersion is FALSE, except for open-vm-tools */ + if (type == TOOLS_TYPE_OVT && gerror != NULL) { + g_debug("gerror->code = %d when checking for %s\n", gerror->code, CONFNAME_DISABLETOOLSVERSION); + g_clear_error(&gerror); + disableVersion = TRUE; } + + version = disableVersion ? TOOLS_VERSION_UNMANAGED : TOOLS_VERSION_CURRENT; toolsVersion = g_strdup_printf("tools.set.version %u", version); if (!RpcChannel_Send(state->ctx.rpc, toolsVersion, strlen(toolsVersion) + 1, @@ -394,3 +419,83 @@ ToolsCore_SetCapabilities(RpcChannel *chan, g_free(newcaps); } } + + +#if defined(__linux__) +/** + * Initializes the vSocket address family and sticks a reference + * to it in the service state. + * + * @param[in] state The service state. + */ + +void +ToolsCore_InitVsockFamily(ToolsServiceState *state) +{ + int vsockDev = -1; + int vsockFamily = -1; + + ASSERT(state); + + state->vsockDev = -1; + state->vsockFamily = -1; + + if (!state->ctx.rpc) { + /* + * Nothing more to do when there is no RPC channel. + */ + g_debug("No RPC channel; skipping reference to vSocket family.\n"); + return; + } + + switch (RpcChannel_GetType(state->ctx.rpc)) { + case RPCCHANNEL_TYPE_INACTIVE: + case RPCCHANNEL_TYPE_PRIV_VSOCK: + case RPCCHANNEL_TYPE_UNPRIV_VSOCK: + return; + case RPCCHANNEL_TYPE_BKDOOR: + vsockFamily = VMCISock_GetAFValueFd(&vsockDev); + if (vsockFamily == -1) { + /* + * vSocket driver may not be loaded, log and continue. + */ + g_warning("Couldn't get vSocket family.\n"); + } else if (vsockDev >= 0) { + g_debug("Saving reference to vSocket device=%d, family=%d\n", + vsockDev, vsockFamily); + state->vsockFamily = vsockFamily; + state->vsockDev = vsockDev; + } + return; + default: + NOT_IMPLEMENTED(); + } +} + + +/** + * Releases the reference to vSocket address family. + * + * @param[in] state The service state. + * + * @return TRUE on success. + */ + +void +ToolsCore_ReleaseVsockFamily(ToolsServiceState *state) +{ + ASSERT(state); + + /* + * vSocket device is not opened in case of new kernels. + * Therefore, we release it only if it was opened. + */ + if (state->vsockFamily >= 0 && state->vsockDev >= 0) { + g_debug("Releasing reference to vSocket device=%d, family=%d\n", + state->vsockDev, state->vsockFamily); + VMCISock_ReleaseAFValueFd(state->vsockDev); + state->vsockDev = -1; + state->vsockFamily = -1; + } +} +#endif diff --git a/open-vm-tools/tests/Makefile.am b/open-vm-tools/tests/Makefile.am index 07e80fe9e..a751ec75f 100644 --- a/open-vm-tools/tests/Makefile.am +++ b/open-vm-tools/tests/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/tests/Makefile.in b/open-vm-tools/tests/Makefile.in deleted file mode 100644 index f102fd387..000000000 --- a/open-vm-tools/tests/Makefile.in +++ /dev/null @@ -1,585 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = vmrpcdbg testDebug testPlugin testVmblock -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: install-exec-local - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-local install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am - - -install-exec-local: - rm -f $(DESTDIR)$(TEST_PLUGIN_INSTALLDIR)/*.a - rm -f $(DESTDIR)$(TEST_PLUGIN_INSTALLDIR)/*.la -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/tests/testDebug/Makefile.am b/open-vm-tools/tests/testDebug/Makefile.am index 576ecbb5d..575fa3bb9 100644 --- a/open-vm-tools/tests/testDebug/Makefile.am +++ b/open-vm-tools/tests/testDebug/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/tests/testDebug/Makefile.in b/open-vm-tools/tests/testDebug/Makefile.in deleted file mode 100644 index 24670670f..000000000 --- a/open-vm-tools/tests/testDebug/Makefile.in +++ /dev/null @@ -1,602 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests/testDebug -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libtestDebug_la_DEPENDENCIES = ../vmrpcdbg/libvmrpcdbg.la -am_libtestDebug_la_OBJECTS = libtestDebug_la-testDebug.lo \ - libtestDebug_la-testData_xdr.lo -libtestDebug_la_OBJECTS = $(am_libtestDebug_la_OBJECTS) -libtestDebug_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libtestDebug_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libtestDebug_la_SOURCES) -DIST_SOURCES = $(libtestDebug_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ - -# XXX: see explanation in lib/guestRpc/Makefile.am -CFLAGS = @CFLAGS@ -Wno-unused -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @TEST_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libtestDebug.la -libtestDebug_la_CPPFLAGS = @CUNIT_CPPFLAGS@ @GOBJECT_CPPFLAGS@ \ - @PLUGIN_CPPFLAGS@ $(am__empty) -libtestDebug_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libtestDebug_la_LIBADD = @CUNIT_LIBS@ @GOBJECT_LIBS@ @VMTOOLS_LIBS@ \ - ../vmrpcdbg/libvmrpcdbg.la -libtestDebug_la_SOURCES = testDebug.c testData_xdr.c -BUILT_SOURCES = testData_xdr.c testData.h -CLEANFILES = testData_xdr.c testData.h -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/testDebug/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/testDebug/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libtestDebug.la: $(libtestDebug_la_OBJECTS) $(libtestDebug_la_DEPENDENCIES) - $(libtestDebug_la_LINK) -rpath $(plugindir) $(libtestDebug_la_OBJECTS) $(libtestDebug_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtestDebug_la-testData_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtestDebug_la-testDebug.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libtestDebug_la-testDebug.lo: testDebug.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestDebug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtestDebug_la-testDebug.lo -MD -MP -MF $(DEPDIR)/libtestDebug_la-testDebug.Tpo -c -o libtestDebug_la-testDebug.lo `test -f 'testDebug.c' || echo '$(srcdir)/'`testDebug.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtestDebug_la-testDebug.Tpo $(DEPDIR)/libtestDebug_la-testDebug.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDebug.c' object='libtestDebug_la-testDebug.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestDebug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtestDebug_la-testDebug.lo `test -f 'testDebug.c' || echo '$(srcdir)/'`testDebug.c - -libtestDebug_la-testData_xdr.lo: testData_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestDebug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtestDebug_la-testData_xdr.lo -MD -MP -MF $(DEPDIR)/libtestDebug_la-testData_xdr.Tpo -c -o libtestDebug_la-testData_xdr.lo `test -f 'testData_xdr.c' || echo '$(srcdir)/'`testData_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtestDebug_la-testData_xdr.Tpo $(DEPDIR)/libtestDebug_la-testData_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testData_xdr.c' object='libtestDebug_la-testData_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestDebug_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtestDebug_la-testData_xdr.lo `test -f 'testData_xdr.c' || echo '$(srcdir)/'`testData_xdr.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -testData.h: $(top_srcdir)/tests/testPlugin/testData.x - @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ - -testData_xdr.c: testData.h - @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/tests/testDebug/testDebug.c b/open-vm-tools/tests/testDebug/testDebug.c index 331b63c7c..32f45c617 100644 --- a/open-vm-tools/tests/testDebug/testDebug.c +++ b/open-vm-tools/tests/testDebug/testDebug.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/tests/testPlugin/Makefile.am b/open-vm-tools/tests/testPlugin/Makefile.am index a04eb9421..e1951ecfd 100644 --- a/open-vm-tools/tests/testPlugin/Makefile.am +++ b/open-vm-tools/tests/testPlugin/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/tests/testPlugin/Makefile.in b/open-vm-tools/tests/testPlugin/Makefile.in deleted file mode 100644 index fea090e51..000000000 --- a/open-vm-tools/tests/testPlugin/Makefile.in +++ /dev/null @@ -1,603 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests/testPlugin -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(plugindir)" -pluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(plugin_LTLIBRARIES) -libtestPlugin_la_DEPENDENCIES = -am_libtestPlugin_la_OBJECTS = libtestPlugin_la-testData_xdr.lo \ - libtestPlugin_la-testPlugin.lo -libtestPlugin_la_OBJECTS = $(am_libtestPlugin_la_OBJECTS) -libtestPlugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libtestPlugin_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libtestPlugin_la_SOURCES) -DIST_SOURCES = $(libtestPlugin_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ - -# XXX: see explanation in lib/guestRpc/Makefile.am -CFLAGS = @CFLAGS@ -Wno-unused -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugindir = @TEST_PLUGIN_INSTALLDIR@ -plugin_LTLIBRARIES = libtestPlugin.la -libtestPlugin_la_CPPFLAGS = @CUNIT_CPPFLAGS@ @GOBJECT_CPPFLAGS@ \ - @PLUGIN_CPPFLAGS@ $(am__empty) -libtestPlugin_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libtestPlugin_la_LIBADD = @CUNIT_LIBS@ @GOBJECT_LIBS@ @VMTOOLS_LIBS@ \ - @XDR_LIBS@ $(am__empty) -libtestPlugin_la_SOURCES = testData_xdr.c testPlugin.c -BUILT_SOURCES = testData_xdr.c testData.h -CLEANFILES = testData_xdr.c testData.h -EXTRA_DIST = testData.x -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/testPlugin/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/testPlugin/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libtestPlugin.la: $(libtestPlugin_la_OBJECTS) $(libtestPlugin_la_DEPENDENCIES) - $(libtestPlugin_la_LINK) -rpath $(plugindir) $(libtestPlugin_la_OBJECTS) $(libtestPlugin_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtestPlugin_la-testData_xdr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtestPlugin_la-testPlugin.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libtestPlugin_la-testData_xdr.lo: testData_xdr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtestPlugin_la-testData_xdr.lo -MD -MP -MF $(DEPDIR)/libtestPlugin_la-testData_xdr.Tpo -c -o libtestPlugin_la-testData_xdr.lo `test -f 'testData_xdr.c' || echo '$(srcdir)/'`testData_xdr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtestPlugin_la-testData_xdr.Tpo $(DEPDIR)/libtestPlugin_la-testData_xdr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testData_xdr.c' object='libtestPlugin_la-testData_xdr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtestPlugin_la-testData_xdr.lo `test -f 'testData_xdr.c' || echo '$(srcdir)/'`testData_xdr.c - -libtestPlugin_la-testPlugin.lo: testPlugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtestPlugin_la-testPlugin.lo -MD -MP -MF $(DEPDIR)/libtestPlugin_la-testPlugin.Tpo -c -o libtestPlugin_la-testPlugin.lo `test -f 'testPlugin.c' || echo '$(srcdir)/'`testPlugin.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libtestPlugin_la-testPlugin.Tpo $(DEPDIR)/libtestPlugin_la-testPlugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testPlugin.c' object='libtestPlugin_la-testPlugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtestPlugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtestPlugin_la-testPlugin.lo `test -f 'testPlugin.c' || echo '$(srcdir)/'`testPlugin.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -testData.h: testData.x - @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ - -testData_xdr.c: testData.x testData.h - @RPCGEN_WRAPPER@ tests/testPlugin/testData.x $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/tests/testPlugin/testData.x b/open-vm-tools/tests/testPlugin/testData.x index 378c7d36e..5a1a1d42c 100644 --- a/open-vm-tools/tests/testPlugin/testData.x +++ b/open-vm-tools/tests/testPlugin/testData.x @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/tests/testPlugin/testPlugin.c b/open-vm-tools/tests/testPlugin/testPlugin.c index 56f3c1bea..5229e9a87 100644 --- a/open-vm-tools/tests/testPlugin/testPlugin.c +++ b/open-vm-tools/tests/testPlugin/testPlugin.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/tests/testVmblock/Makefile.am b/open-vm-tools/tests/testVmblock/Makefile.am index 165abcab3..b2ae31eff 100644 --- a/open-vm-tools/tests/testVmblock/Makefile.am +++ b/open-vm-tools/tests/testVmblock/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/tests/testVmblock/Makefile.in b/open-vm-tools/tests/testVmblock/Makefile.in deleted file mode 100644 index 0a717345c..000000000 --- a/open-vm-tools/tests/testVmblock/Makefile.in +++ /dev/null @@ -1,613 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = vmware-testvmblock-legacy$(EXEEXT) \ - vmware-testvmblock-manual-legacy$(EXEEXT) $(am__EXEEXT_1) -@HAVE_FUSE_TRUE@am__append_1 = vmware-testvmblock-fuse \ -@HAVE_FUSE_TRUE@ vmware-testvmblock-manual-fuse -subdir = tests/testVmblock -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -@HAVE_FUSE_TRUE@am__EXEEXT_1 = vmware-testvmblock-fuse$(EXEEXT) \ -@HAVE_FUSE_TRUE@ vmware-testvmblock-manual-fuse$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am_vmware_testvmblock_fuse_OBJECTS = \ - vmware_testvmblock_fuse-vmblocktest.$(OBJEXT) -vmware_testvmblock_fuse_OBJECTS = \ - $(am_vmware_testvmblock_fuse_OBJECTS) -vmware_testvmblock_fuse_LDADD = $(LDADD) -vmware_testvmblock_fuse_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(vmware_testvmblock_fuse_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_vmware_testvmblock_legacy_OBJECTS = vmblocktest.$(OBJEXT) -vmware_testvmblock_legacy_OBJECTS = \ - $(am_vmware_testvmblock_legacy_OBJECTS) -vmware_testvmblock_legacy_LDADD = $(LDADD) -am_vmware_testvmblock_manual_fuse_OBJECTS = \ - vmware_testvmblock_manual_fuse-manual-blocker.$(OBJEXT) -vmware_testvmblock_manual_fuse_OBJECTS = \ - $(am_vmware_testvmblock_manual_fuse_OBJECTS) -vmware_testvmblock_manual_fuse_LDADD = $(LDADD) -vmware_testvmblock_manual_fuse_LINK = $(LIBTOOL) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(vmware_testvmblock_manual_fuse_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -am_vmware_testvmblock_manual_legacy_OBJECTS = \ - manual-blocker.$(OBJEXT) -vmware_testvmblock_manual_legacy_OBJECTS = \ - $(am_vmware_testvmblock_manual_legacy_OBJECTS) -vmware_testvmblock_manual_legacy_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_testvmblock_fuse_SOURCES) \ - $(vmware_testvmblock_legacy_SOURCES) \ - $(vmware_testvmblock_manual_fuse_SOURCES) \ - $(vmware_testvmblock_manual_legacy_SOURCES) -DIST_SOURCES = $(vmware_testvmblock_fuse_SOURCES) \ - $(vmware_testvmblock_legacy_SOURCES) \ - $(vmware_testvmblock_manual_fuse_SOURCES) \ - $(vmware_testvmblock_manual_legacy_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CFLAGS = -DVMX86_DEVEL -DVMX86_DEBUG -AM_LDFLAGS = -lpthread -vmware_testvmblock_legacy_SOURCES = vmblocktest.c -vmware_testvmblock_manual_legacy_SOURCES = manual-blocker.c -vmware_testvmblock_fuse_CFLAGS = $(AM_CFLAGS) -Dvmblock_fuse -vmware_testvmblock_fuse_SOURCES = vmblocktest.c -vmware_testvmblock_manual_fuse_CFLAGS = $(AM_CFLAGS) -Dvmblock_fuse -vmware_testvmblock_manual_fuse_SOURCES = manual-blocker.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/testVmblock/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/testVmblock/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-testvmblock-fuse$(EXEEXT): $(vmware_testvmblock_fuse_OBJECTS) $(vmware_testvmblock_fuse_DEPENDENCIES) - @rm -f vmware-testvmblock-fuse$(EXEEXT) - $(vmware_testvmblock_fuse_LINK) $(vmware_testvmblock_fuse_OBJECTS) $(vmware_testvmblock_fuse_LDADD) $(LIBS) -vmware-testvmblock-legacy$(EXEEXT): $(vmware_testvmblock_legacy_OBJECTS) $(vmware_testvmblock_legacy_DEPENDENCIES) - @rm -f vmware-testvmblock-legacy$(EXEEXT) - $(LINK) $(vmware_testvmblock_legacy_OBJECTS) $(vmware_testvmblock_legacy_LDADD) $(LIBS) -vmware-testvmblock-manual-fuse$(EXEEXT): $(vmware_testvmblock_manual_fuse_OBJECTS) $(vmware_testvmblock_manual_fuse_DEPENDENCIES) - @rm -f vmware-testvmblock-manual-fuse$(EXEEXT) - $(vmware_testvmblock_manual_fuse_LINK) $(vmware_testvmblock_manual_fuse_OBJECTS) $(vmware_testvmblock_manual_fuse_LDADD) $(LIBS) -vmware-testvmblock-manual-legacy$(EXEEXT): $(vmware_testvmblock_manual_legacy_OBJECTS) $(vmware_testvmblock_manual_legacy_DEPENDENCIES) - @rm -f vmware-testvmblock-manual-legacy$(EXEEXT) - $(LINK) $(vmware_testvmblock_manual_legacy_OBJECTS) $(vmware_testvmblock_manual_legacy_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manual-blocker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmblocktest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmware_testvmblock_fuse-vmblocktest.o: vmblocktest.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_fuse_CFLAGS) $(CFLAGS) -MT vmware_testvmblock_fuse-vmblocktest.o -MD -MP -MF $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Tpo -c -o vmware_testvmblock_fuse-vmblocktest.o `test -f 'vmblocktest.c' || echo '$(srcdir)/'`vmblocktest.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Tpo $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmblocktest.c' object='vmware_testvmblock_fuse-vmblocktest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_fuse_CFLAGS) $(CFLAGS) -c -o vmware_testvmblock_fuse-vmblocktest.o `test -f 'vmblocktest.c' || echo '$(srcdir)/'`vmblocktest.c - -vmware_testvmblock_fuse-vmblocktest.obj: vmblocktest.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_fuse_CFLAGS) $(CFLAGS) -MT vmware_testvmblock_fuse-vmblocktest.obj -MD -MP -MF $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Tpo -c -o vmware_testvmblock_fuse-vmblocktest.obj `if test -f 'vmblocktest.c'; then $(CYGPATH_W) 'vmblocktest.c'; else $(CYGPATH_W) '$(srcdir)/vmblocktest.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Tpo $(DEPDIR)/vmware_testvmblock_fuse-vmblocktest.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmblocktest.c' object='vmware_testvmblock_fuse-vmblocktest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_fuse_CFLAGS) $(CFLAGS) -c -o vmware_testvmblock_fuse-vmblocktest.obj `if test -f 'vmblocktest.c'; then $(CYGPATH_W) 'vmblocktest.c'; else $(CYGPATH_W) '$(srcdir)/vmblocktest.c'; fi` - -vmware_testvmblock_manual_fuse-manual-blocker.o: manual-blocker.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_manual_fuse_CFLAGS) $(CFLAGS) -MT vmware_testvmblock_manual_fuse-manual-blocker.o -MD -MP -MF $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Tpo -c -o vmware_testvmblock_manual_fuse-manual-blocker.o `test -f 'manual-blocker.c' || echo '$(srcdir)/'`manual-blocker.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Tpo $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='manual-blocker.c' object='vmware_testvmblock_manual_fuse-manual-blocker.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_manual_fuse_CFLAGS) $(CFLAGS) -c -o vmware_testvmblock_manual_fuse-manual-blocker.o `test -f 'manual-blocker.c' || echo '$(srcdir)/'`manual-blocker.c - -vmware_testvmblock_manual_fuse-manual-blocker.obj: manual-blocker.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_manual_fuse_CFLAGS) $(CFLAGS) -MT vmware_testvmblock_manual_fuse-manual-blocker.obj -MD -MP -MF $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Tpo -c -o vmware_testvmblock_manual_fuse-manual-blocker.obj `if test -f 'manual-blocker.c'; then $(CYGPATH_W) 'manual-blocker.c'; else $(CYGPATH_W) '$(srcdir)/manual-blocker.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Tpo $(DEPDIR)/vmware_testvmblock_manual_fuse-manual-blocker.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='manual-blocker.c' object='vmware_testvmblock_manual_fuse-manual-blocker.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vmware_testvmblock_manual_fuse_CFLAGS) $(CFLAGS) -c -o vmware_testvmblock_manual_fuse-manual-blocker.obj `if test -f 'manual-blocker.c'; then $(CYGPATH_W) 'manual-blocker.c'; else $(CYGPATH_W) '$(srcdir)/manual-blocker.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/tests/testVmblock/manual-blocker.c b/open-vm-tools/tests/testVmblock/manual-blocker.c index f7783c837..42ac297db 100644 --- a/open-vm-tools/tests/testVmblock/manual-blocker.c +++ b/open-vm-tools/tests/testVmblock/manual-blocker.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/tests/testVmblock/vmblocktest.c b/open-vm-tools/tests/testVmblock/vmblocktest.c index 2763680a6..10d2f6e43 100644 --- a/open-vm-tools/tests/testVmblock/vmblocktest.c +++ b/open-vm-tools/tests/testVmblock/vmblocktest.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/tests/vmrpcdbg/Makefile.am b/open-vm-tools/tests/vmrpcdbg/Makefile.am index cfdd1566c..c28f4f38f 100644 --- a/open-vm-tools/tests/vmrpcdbg/Makefile.am +++ b/open-vm-tools/tests/vmrpcdbg/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2009-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -21,7 +21,7 @@ libvmrpcdbg_la_CPPFLAGS = libvmrpcdbg_la_CPPFLAGS += @CUNIT_CPPFLAGS@ libvmrpcdbg_la_CPPFLAGS += @GMODULE_CPPFLAGS@ libvmrpcdbg_la_CPPFLAGS += @VMTOOLS_CPPFLAGS@ -libvmrpcdbg_la_CPPFLAGS += -I$(top_builddir)/lib/rpcChannel +libvmrpcdbg_la_CPPFLAGS += -I$(top_srcdir)/lib/rpcChannel libvmrpcdbg_la_LDFLAGS = libvmrpcdbg_la_LDFLAGS += @PLUGIN_LDFLAGS@ diff --git a/open-vm-tools/tests/vmrpcdbg/Makefile.in b/open-vm-tools/tests/vmrpcdbg/Makefile.in deleted file mode 100644 index 8a4c25c71..000000000 --- a/open-vm-tools/tests/vmrpcdbg/Makefile.in +++ /dev/null @@ -1,556 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2009-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests/vmrpcdbg -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libvmrpcdbg_la_DEPENDENCIES = -am_libvmrpcdbg_la_OBJECTS = libvmrpcdbg_la-debugChannel.lo \ - libvmrpcdbg_la-vmrpcdbg.lo -libvmrpcdbg_la_OBJECTS = $(am_libvmrpcdbg_la_OBJECTS) -libvmrpcdbg_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libvmrpcdbg_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libvmrpcdbg_la_SOURCES) -DIST_SOURCES = $(libvmrpcdbg_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -noinst_LTLIBRARIES = libvmrpcdbg.la -libvmrpcdbg_la_CPPFLAGS = @CUNIT_CPPFLAGS@ @GMODULE_CPPFLAGS@ \ - @VMTOOLS_CPPFLAGS@ -I$(top_builddir)/lib/rpcChannel -libvmrpcdbg_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libvmrpcdbg_la_LIBADD = @CUNIT_LIBS@ @GMODULE_LIBS@ @VMTOOLS_LIBS@ \ - @XDR_LIBS@ $(am__empty) -libvmrpcdbg_la_SOURCES = debugChannel.c vmrpcdbg.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/vmrpcdbg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/vmrpcdbg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libvmrpcdbg.la: $(libvmrpcdbg_la_OBJECTS) $(libvmrpcdbg_la_DEPENDENCIES) - $(libvmrpcdbg_la_LINK) $(libvmrpcdbg_la_OBJECTS) $(libvmrpcdbg_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmrpcdbg_la-debugChannel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvmrpcdbg_la-vmrpcdbg.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libvmrpcdbg_la-debugChannel.lo: debugChannel.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmrpcdbg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmrpcdbg_la-debugChannel.lo -MD -MP -MF $(DEPDIR)/libvmrpcdbg_la-debugChannel.Tpo -c -o libvmrpcdbg_la-debugChannel.lo `test -f 'debugChannel.c' || echo '$(srcdir)/'`debugChannel.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmrpcdbg_la-debugChannel.Tpo $(DEPDIR)/libvmrpcdbg_la-debugChannel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='debugChannel.c' object='libvmrpcdbg_la-debugChannel.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmrpcdbg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmrpcdbg_la-debugChannel.lo `test -f 'debugChannel.c' || echo '$(srcdir)/'`debugChannel.c - -libvmrpcdbg_la-vmrpcdbg.lo: vmrpcdbg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmrpcdbg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvmrpcdbg_la-vmrpcdbg.lo -MD -MP -MF $(DEPDIR)/libvmrpcdbg_la-vmrpcdbg.Tpo -c -o libvmrpcdbg_la-vmrpcdbg.lo `test -f 'vmrpcdbg.c' || echo '$(srcdir)/'`vmrpcdbg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvmrpcdbg_la-vmrpcdbg.Tpo $(DEPDIR)/libvmrpcdbg_la-vmrpcdbg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vmrpcdbg.c' object='libvmrpcdbg_la-vmrpcdbg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvmrpcdbg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvmrpcdbg_la-vmrpcdbg.lo `test -f 'vmrpcdbg.c' || echo '$(srcdir)/'`vmrpcdbg.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/tests/vmrpcdbg/debugChannel.c b/open-vm-tools/tests/vmrpcdbg/debugChannel.c index 58cf83447..604da5e09 100644 --- a/open-vm-tools/tests/vmrpcdbg/debugChannel.c +++ b/open-vm-tools/tests/vmrpcdbg/debugChannel.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -165,6 +165,7 @@ RpcDebugStop(RpcChannel *chan) * @param[in] chan The RPC channel instance. * @param[in] data Data to send. * @param[in] dataLen Number of bytes to send. + * @param[out] rpcStatus Status of RPC command from other side. * @param[out] result Response from other side. * @param[out] resultLen Number of bytes in response. * @@ -176,6 +177,7 @@ static gboolean RpcDebugSend(RpcChannel *chan, char const *data, size_t dataLen, + Bool *rpcStatus, char **result, size_t *resultLen) { @@ -254,6 +256,8 @@ RpcDebugSend(RpcChannel *chan, g_free(xdrdata); } g_free(copy); + /* For now, just make rpcStatus same as ret */ + *rpcStatus = ret; return ret; } diff --git a/open-vm-tools/tests/vmrpcdbg/vmrpcdbg.c b/open-vm-tools/tests/vmrpcdbg/vmrpcdbg.c index bf248a5e6..bbb270def 100644 --- a/open-vm-tools/tests/vmrpcdbg/vmrpcdbg.c +++ b/open-vm-tools/tests/vmrpcdbg/vmrpcdbg.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -38,6 +38,15 @@ VM_EMBED_VERSION(VMTOOLSD_VERSION_STRING); static GModule *gPlugin = NULL; +#if defined(_WIN64) && (_MSC_VER == 1500) && GLIB_CHECK_VERSION(2, 46, 0) +/* + * Turn off optimizer for this compiler, since something with new glib makes it + * go into an infinite loop, only on 64bit and only with beta. + */ +#pragma optimize("", off) +#endif + + /* * Static variables to hold the app's main loop data. CUnit test functions * don't take any parameters so there's no other way to do this... @@ -256,3 +265,10 @@ RpcDebug_SetResult(const char *str, } } +#if defined(_WIN64) && (_MSC_VER == 1500) && GLIB_CHECK_VERSION(2, 46, 0) +/* + * Restore optimizer. + */ +#pragma optimize("", on) +#endif + diff --git a/open-vm-tools/tests/vmrpcdbg/vmrpcdbgInt.h b/open-vm-tools/tests/vmrpcdbg/vmrpcdbgInt.h index c6f742700..0d556f54c 100644 --- a/open-vm-tools/tests/vmrpcdbg/vmrpcdbgInt.h +++ b/open-vm-tools/tests/vmrpcdbg/vmrpcdbgInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2009-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2009-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/toolbox/Makefile.am b/open-vm-tools/toolbox/Makefile.am index 5733c573c..66d36ac69 100644 --- a/open-vm-tools/toolbox/Makefile.am +++ b/open-vm-tools/toolbox/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -26,7 +26,9 @@ vmware_toolbox_cmd_CPPFLAGS += @VMTOOLS_CPPFLAGS@ vmware_toolbox_cmd_SOURCES = vmware_toolbox_cmd_SOURCES += toolbox-cmd.c +vmware_toolbox_cmd_SOURCES += toolboxcmd-config.c vmware_toolbox_cmd_SOURCES += toolboxcmd-devices.c +vmware_toolbox_cmd_SOURCES += toolboxcmd-info.c vmware_toolbox_cmd_SOURCES += toolboxcmd-logging.c vmware_toolbox_cmd_SOURCES += toolboxcmd-scripts.c vmware_toolbox_cmd_SOURCES += toolboxcmd-shrink.c diff --git a/open-vm-tools/toolbox/Makefile.in b/open-vm-tools/toolbox/Makefile.in deleted file mode 100644 index 069447786..000000000 --- a/open-vm-tools/toolbox/Makefile.in +++ /dev/null @@ -1,688 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-toolbox-cmd$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = toolbox -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_toolbox_cmd_OBJECTS = \ - vmware_toolbox_cmd-toolbox-cmd.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-devices.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-logging.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-scripts.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-shrink.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-stat.$(OBJEXT) \ - vmware_toolbox_cmd-toolboxcmd-time.$(OBJEXT) -vmware_toolbox_cmd_OBJECTS = $(am_vmware_toolbox_cmd_OBJECTS) -am__DEPENDENCIES_1 = -vmware_toolbox_cmd_DEPENDENCIES = ../libguestlib/libguestlib.la \ - $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_toolbox_cmd_SOURCES) -DIST_SOURCES = $(vmware_toolbox_cmd_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_toolbox_cmd_LDADD = ../libguestlib/libguestlib.la \ - @VMTOOLS_LIBS@ $(am__append_1) -vmware_toolbox_cmd_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -vmware_toolbox_cmd_SOURCES = toolbox-cmd.c toolboxcmd-devices.c \ - toolboxcmd-logging.c toolboxcmd-scripts.c toolboxcmd-shrink.c \ - toolboxcmd-stat.c toolboxcmd-time.c -@HAVE_ICU_FALSE@vmware_toolbox_cmd_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_toolbox_cmd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu toolbox/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu toolbox/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-toolbox-cmd$(EXEEXT): $(vmware_toolbox_cmd_OBJECTS) $(vmware_toolbox_cmd_DEPENDENCIES) - @rm -f vmware-toolbox-cmd$(EXEEXT) - $(vmware_toolbox_cmd_LINK) $(vmware_toolbox_cmd_OBJECTS) $(vmware_toolbox_cmd_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmware_toolbox_cmd-toolbox-cmd.o: toolbox-cmd.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolbox-cmd.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Tpo -c -o vmware_toolbox_cmd-toolbox-cmd.o `test -f 'toolbox-cmd.c' || echo '$(srcdir)/'`toolbox-cmd.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolbox-cmd.c' object='vmware_toolbox_cmd-toolbox-cmd.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolbox-cmd.o `test -f 'toolbox-cmd.c' || echo '$(srcdir)/'`toolbox-cmd.c - -vmware_toolbox_cmd-toolbox-cmd.obj: toolbox-cmd.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolbox-cmd.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Tpo -c -o vmware_toolbox_cmd-toolbox-cmd.obj `if test -f 'toolbox-cmd.c'; then $(CYGPATH_W) 'toolbox-cmd.c'; else $(CYGPATH_W) '$(srcdir)/toolbox-cmd.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolbox-cmd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolbox-cmd.c' object='vmware_toolbox_cmd-toolbox-cmd.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolbox-cmd.obj `if test -f 'toolbox-cmd.c'; then $(CYGPATH_W) 'toolbox-cmd.c'; else $(CYGPATH_W) '$(srcdir)/toolbox-cmd.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-devices.o: toolboxcmd-devices.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-devices.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-devices.o `test -f 'toolboxcmd-devices.c' || echo '$(srcdir)/'`toolboxcmd-devices.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-devices.c' object='vmware_toolbox_cmd-toolboxcmd-devices.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-devices.o `test -f 'toolboxcmd-devices.c' || echo '$(srcdir)/'`toolboxcmd-devices.c - -vmware_toolbox_cmd-toolboxcmd-devices.obj: toolboxcmd-devices.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-devices.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-devices.obj `if test -f 'toolboxcmd-devices.c'; then $(CYGPATH_W) 'toolboxcmd-devices.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-devices.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-devices.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-devices.c' object='vmware_toolbox_cmd-toolboxcmd-devices.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-devices.obj `if test -f 'toolboxcmd-devices.c'; then $(CYGPATH_W) 'toolboxcmd-devices.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-devices.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-logging.o: toolboxcmd-logging.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-logging.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-logging.o `test -f 'toolboxcmd-logging.c' || echo '$(srcdir)/'`toolboxcmd-logging.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-logging.c' object='vmware_toolbox_cmd-toolboxcmd-logging.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-logging.o `test -f 'toolboxcmd-logging.c' || echo '$(srcdir)/'`toolboxcmd-logging.c - -vmware_toolbox_cmd-toolboxcmd-logging.obj: toolboxcmd-logging.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-logging.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-logging.obj `if test -f 'toolboxcmd-logging.c'; then $(CYGPATH_W) 'toolboxcmd-logging.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-logging.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-logging.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-logging.c' object='vmware_toolbox_cmd-toolboxcmd-logging.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-logging.obj `if test -f 'toolboxcmd-logging.c'; then $(CYGPATH_W) 'toolboxcmd-logging.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-logging.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-scripts.o: toolboxcmd-scripts.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-scripts.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-scripts.o `test -f 'toolboxcmd-scripts.c' || echo '$(srcdir)/'`toolboxcmd-scripts.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-scripts.c' object='vmware_toolbox_cmd-toolboxcmd-scripts.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-scripts.o `test -f 'toolboxcmd-scripts.c' || echo '$(srcdir)/'`toolboxcmd-scripts.c - -vmware_toolbox_cmd-toolboxcmd-scripts.obj: toolboxcmd-scripts.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-scripts.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-scripts.obj `if test -f 'toolboxcmd-scripts.c'; then $(CYGPATH_W) 'toolboxcmd-scripts.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-scripts.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-scripts.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-scripts.c' object='vmware_toolbox_cmd-toolboxcmd-scripts.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-scripts.obj `if test -f 'toolboxcmd-scripts.c'; then $(CYGPATH_W) 'toolboxcmd-scripts.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-scripts.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-shrink.o: toolboxcmd-shrink.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-shrink.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-shrink.o `test -f 'toolboxcmd-shrink.c' || echo '$(srcdir)/'`toolboxcmd-shrink.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-shrink.c' object='vmware_toolbox_cmd-toolboxcmd-shrink.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-shrink.o `test -f 'toolboxcmd-shrink.c' || echo '$(srcdir)/'`toolboxcmd-shrink.c - -vmware_toolbox_cmd-toolboxcmd-shrink.obj: toolboxcmd-shrink.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-shrink.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-shrink.obj `if test -f 'toolboxcmd-shrink.c'; then $(CYGPATH_W) 'toolboxcmd-shrink.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-shrink.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-shrink.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-shrink.c' object='vmware_toolbox_cmd-toolboxcmd-shrink.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-shrink.obj `if test -f 'toolboxcmd-shrink.c'; then $(CYGPATH_W) 'toolboxcmd-shrink.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-shrink.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-stat.o: toolboxcmd-stat.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-stat.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-stat.o `test -f 'toolboxcmd-stat.c' || echo '$(srcdir)/'`toolboxcmd-stat.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-stat.c' object='vmware_toolbox_cmd-toolboxcmd-stat.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-stat.o `test -f 'toolboxcmd-stat.c' || echo '$(srcdir)/'`toolboxcmd-stat.c - -vmware_toolbox_cmd-toolboxcmd-stat.obj: toolboxcmd-stat.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-stat.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-stat.obj `if test -f 'toolboxcmd-stat.c'; then $(CYGPATH_W) 'toolboxcmd-stat.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-stat.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-stat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-stat.c' object='vmware_toolbox_cmd-toolboxcmd-stat.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-stat.obj `if test -f 'toolboxcmd-stat.c'; then $(CYGPATH_W) 'toolboxcmd-stat.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-stat.c'; fi` - -vmware_toolbox_cmd-toolboxcmd-time.o: toolboxcmd-time.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-time.o -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-time.o `test -f 'toolboxcmd-time.c' || echo '$(srcdir)/'`toolboxcmd-time.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-time.c' object='vmware_toolbox_cmd-toolboxcmd-time.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-time.o `test -f 'toolboxcmd-time.c' || echo '$(srcdir)/'`toolboxcmd-time.c - -vmware_toolbox_cmd-toolboxcmd-time.obj: toolboxcmd-time.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_toolbox_cmd-toolboxcmd-time.obj -MD -MP -MF $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Tpo -c -o vmware_toolbox_cmd-toolboxcmd-time.obj `if test -f 'toolboxcmd-time.c'; then $(CYGPATH_W) 'toolboxcmd-time.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-time.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Tpo $(DEPDIR)/vmware_toolbox_cmd-toolboxcmd-time.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='toolboxcmd-time.c' object='vmware_toolbox_cmd-toolboxcmd-time.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_toolbox_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_toolbox_cmd-toolboxcmd-time.obj `if test -f 'toolboxcmd-time.c'; then $(CYGPATH_W) 'toolboxcmd-time.c'; else $(CYGPATH_W) '$(srcdir)/toolboxcmd-time.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-data-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS - - -# Message catalogs. -install-data-hook: - @INSTVMSG@ toolboxcmd $(srcdir)/l10n $(DESTDIR)$(datadir) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/toolbox/l10n/de.vmsg b/open-vm-tools/toolbox/l10n/de.vmsg index 1546fbaf0..a2f2f7bbf 100644 --- a/open-vm-tools/toolbox/l10n/de.vmsg +++ b/open-vm-tools/toolbox/l10n/de.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2010 VMware, Inc. All rights reserved. +# Copyright (C) 2010-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published @@ -18,8 +18,20 @@ arg.command = "Befehl" +arg.config.key = "Konfigurationsschlüssel" + +arg.config.operation = "Konfigurationsvorgang" + +arg.config.section = "Konfigurationsabschnitt" + +arg.config.value = "Konfigurationswert" + arg.devicename = "Gerätename" +arg.info.class = "info-Infoklasse" + +arg.info.subcommand = "info-Vorgang" + arg.logging.level = "Ebene der Protokollierung" arg.logging.service = "Dienstname der Protokollierung" @@ -80,19 +92,23 @@ error.novirtual = "%1$s muss innerhalb einer virtuellen Maschine ausgeführt wer error.unknown = "%1$s: %2$s '%3$s' unbekannt\n" +help.config = "%1$s: Tools-Konfiguration bearbeiten\nNutzung: %2$s %3$s \n\nUnterbefehle:\n get : Aktuellen Wert für anzeigen\n set : auf einstellen\n\n remove : entfernen\n\n kann ein beliebiger unterstützter Abschnitt sein, z. B. logging, guestoperations oder guestinfo.\n kann ein beliebiger Konfigurationsschlüssel sein.\n kann ein beliebiger Wert sein.\n" + help.device = "%1$s: Funktionen für die Hardwaregeräte der virtuellen Maschine\nNutzung: %2$s %3$s [Argumente]\n'dev' ist der Name des Geräts.\n\nUnterbefehle:\n enable : Aktivieren des Geräts 'dev' \n disable : Deaktivieren des Geräts 'dev'\n list: Auflisten aller verfügbaren Geräte\n status : Ausgeben des Status eines Geräts\n" help.disk = "%1$s: Führt Verkleinerungen von Festplatten durch\nNutzung: %2$s %3$s [Argumente]\n\nUnterbefehle:\n list: Auflisten der verfügbaren Speicherorte\n shrink : Löschen und Verkleinern eines Dateisystems am angegebenen Speicherort\n shrinkonly: Verkleinern alle Festplatten\n wipe : Löschen eines Dateisystems am angegebenen Speicherort\n" help.hint = "Siehe '%1$s %2$s%3$s%4$s' für weitere Informationen.\n" +help.info = "%1$s: Aktualisieren von Gastbetriebssysteminformationen auf dem Host\nNutzung: %2$s %3$s update \n\nUnterbefehle:\n update < Infoklasse >: Aktualisieren von durch ermittelte Informationen\n< Infoklasse > kann 'network' sein\n" + help.logging = "%1$s: Toolsprotokollierung verändern\nNutzung: %2$s %3$s level \n\nUnterbefehle:\n get : Anzeige der aktuellen Ebene\n set : Einrichten der aktuellen Ebene\n\n kann jeder unterstützte Dienst sein wie vmsvc oder vmusr\n kann für einen Fehler, ein kritisches Ereignis, eine Warnung, Info, Meldung oder ein Debugging stehen \n Standard ist %4$s\n" -help.main = "Nutzung: %1$s [Optionen] [Unterbefehl]<\nGeben> Sie '%2$s %3$s ' für die Hilfe zu einem bestimmten Befehl ein.\Geben Sie '%4$s -v' für die Anzeige der Version von VMware Tools ein.\nVerwenden Sie den Parameter'-q' zur Ausblendung der stdout-Ausgabe.\nDie meisten Befehle verwenden einen Unterbefehl.\n\nVerfügbare Befehle:\n device\n disk\n logging\n script\n stat\n timesync\n upgrade (nicht für alle Betriebssysteme verfügbar)\n" +help.main = "Nutzung: %1$s [Optionen] [Unterbefehl]\nWenn Sie Hilfe zu einem bestimmten Befehl benötigen, geben Sie '%2$s %3$s ' ein.\nGeben Sie '%4$s -v' ein, um die VMware Tools-Version anzuzeigen.\nVerwenden Sie die Option '-q' zum Unterdrücken der stdout-Ausgabe.\nFür die meisten Befehle gibt es Unterbefehle.\n\nVerfügbare Befehle:\n config\n device\n disk (nicht auf allen Betriebssystemen verfügbar)\n info\n logging\n script\n stat\n timesync\n upgrade (nicht auf allen Betriebssystemen verfügbar)\n" help.script = "%1$s: Steuerung der Skripts, die als Reaktion auf Betriebsvorgänge ausgeführt werden\nNutzung: %2$s %3$s [Argumente]\n\nUnterbefehle:\n enable: Aktivieren des angegebenen Skripts und Wiederherstellen dessen Pfads auf den Standardpfad\n disable: Deaktivieren des vorhandenen Skripts\n set : Festlegen des angegebenen Skripts auf den angegebenen Pfad\n default: Ausgeben des Standardpfads des angegebenen Skripts\n current: Ausgeben des aktuellen Pfads des angegebenen Skripts\n" -help.stat = "%1$s: Drucken von hilfreichen Gast- und Hostinformationen\nNutzung: %2$s %3$s \n\nUnterbefehle:\n hosttime: Ausgeben der Hostuhrzeit\n speed: Ausgeben der CPU-Geschwindigkeit in MHz\nUnterbefehle nur für ESX-Gäste:\n sessionid: Ausgeben der aktuellen Sitzungs-ID\n balloon: Ausgeben der Balloon-Arbeitsspeicher-Informationen\n swap: Ausgeben der Auslagerungsinformationen für den Arbeitsspeicher\n memlimit: Ausgeben des Arbeitsspeicher-Limits\n memres: Ausgeben der Arbeitsspeicherreservierung\n cpures: Ausgeben der CPU-Reservierung\n cpulimit: Ausgeben des CPU-Limits\n" +help.stat = "%1$s: Drucken von hilfreichen Gast- und Hostinformationen\nNutzung: %2$s %3$s \n\nUnterbefehle:\n hosttime: Ausgeben der Hostuhrzeit\n speed: Ausgeben der CPU-Geschwindigkeit in MHz\nUnterbefehle nur für ESX-Gäste:\n sessionid: Ausgeben der aktuellen Sitzungs-ID\n balloon: Ausgeben der Balloon-Arbeitsspeicher-Informationen\n swap: Ausgeben der Auslagerungsinformationen für den Arbeitsspeicher\n memlimit: Ausgeben des Arbeitsspeicher-Limits\n memres: Ausgeben der Arbeitsspeicherreservierung\n cpures: Ausgeben der CPU-Reservierung\n cpulimit: Ausgeben des CPU-Limits\n raw [ ]: Drucken von statistischen Rohdaten\n steht für 'text', 'json', 'xml' oder 'yaml'.\n beinhaltet session, host, resources, vscsi und\n vnet (einige Statistiken wie vsci bestehen aus zwei Wörtern, z. B. 'vscsi scsi0:0').\n Druckt verfügbare Statistiken wenn für und \n keine Argumente angegeben wurden.\n" help.timesync = "%1$s: Funktionen für die Steuerung der Zeitsynchronisierung auf dem Gastbetriebssystem\Nutzung: %2$s %3$s \n\nUnterbefehle:\n enable: Aktivieren der Zeitsynchronisierung\n disable: Deaktivieren der Zeitsynchronisierung\n status: Ausgeben des Status der Zeitsynchronisierung\n" diff --git a/open-vm-tools/toolbox/l10n/ja.vmsg b/open-vm-tools/toolbox/l10n/ja.vmsg index f2bfd5f69..c9927d4f8 100644 --- a/open-vm-tools/toolbox/l10n/ja.vmsg +++ b/open-vm-tools/toolbox/l10n/ja.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2010 VMware, Inc. All rights reserved. +# Copyright (C) 2010-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published @@ -18,8 +18,20 @@ arg.command = "コマンド" +arg.config.key = "設定キー" + +arg.config.operation = "設定æ“作" + +arg.config.section = "セクションã®è¨­å®š" + +arg.config.value = "設定値" + arg.devicename = "デãƒã‚¤ã‚¹å" +arg.info.class = "情報カテゴリ情報" + +arg.info.subcommand = "æ“作情報" + arg.logging.level = "ログ レベル" arg.logging.service = "サービスåã®ãƒ­ã‚°" @@ -80,19 +92,23 @@ error.novirtual = "%1$s ã¯ä»®æƒ³ãƒžã‚·ãƒ³å†…ã§å®Ÿè¡Œã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ error.unknown = "%1$s: ä¸æ˜Žãª %2$s '%3$s'\n" +help.config = "%1$s: VMware Tools ã®è¨­å®šã‚’変更ã—ã¾ã™\n使用方法: %2$s %3$s <サブコマンド>\n\nサブコマンド: \n get <セクション> <キー>: <キー> ã®ç¾åœ¨å€¤ã‚’表示ã—ã¾ã™\n set <セクション> <キー> <値>: <キー> ã‚’ <値> ã«è¨­å®šã—ã¾ã™\n\n remove <セクション> <キー>: <キー> を削除ã—ã¾ã™\n\n<セクション> ã«ã¯ã€loggingã€guestoperationsã€ã¾ãŸã¯ guestinfo ãªã©ã®ã‚µãƒãƒ¼ãƒˆã•ã‚Œã‚‹ä»»æ„ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’指定ã§ãã¾ã™ã€‚\n<キー> ã«ã¯ã€ä»»æ„ã®æ§‹æˆã‚­ãƒ¼ã‚’指定ã§ãã¾ã™ã€‚\n<値> ã«ã¯ä»»æ„ã®å€¤ã‚’指定ã§ãã¾ã™ã€‚\n" + help.device = "%1$s: 仮想マシンã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ デãƒã‚¤ã‚¹ã«é–¢é€£ã™ã‚‹æ©Ÿèƒ½\n使用方法: %2$s %3$s <サブコマンド> [引数]\ndev ã«ã¯ãƒ‡ãƒã‚¤ã‚¹åを指定ã—ã¾ã™ã€‚\n\nサブコマンド:\n enable <デãƒã‚¤ã‚¹>: デãƒã‚¤ã‚¹ dev を有効ã«ã™ã‚‹\n disable <デãƒã‚¤ã‚¹>: デãƒã‚¤ã‚¹ dev を無効ã«ã™ã‚‹\n list: 有効ãªãƒ‡ãƒã‚¤ã‚¹ã‚’一覧表示\n status <デãƒã‚¤ã‚¹>: デãƒã‚¤ã‚¹ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’出力\n" help.disk = "%1$s: ディスク圧縮æ“作を実行\n使用方法: %2$s %3$s <サブコマンド> [引数]\n\nサブコマンド:\n list: 使用å¯èƒ½ãªå ´æ‰€ã‚’一覧表示\n shrink <場所>: 指定ã•ã‚ŒãŸå ´æ‰€ã®ãƒ•ã‚¡ã‚¤ãƒ« システムをワイプãŠã‚ˆã³åœ§ç¸®\n shrinkonly: ã™ã¹ã¦ã®ãƒ‡ã‚£ã‚¹ã‚¯ã‚’圧縮\n wipe <場所>: 指定ã•ã‚ŒãŸå ´æ‰€ã®ãƒ•ã‚¡ã‚¤ãƒ« システムをワイプ\n" help.hint = "詳細ã«ã¤ã„ã¦ã¯ã€ã€Œ%1$s %2$s%3$s%4$sã€ã‚’å‚ç…§ã—ã¦ãã ã•ã„。\n" +help.info = "%1$s: ホストã®ã‚²ã‚¹ãƒˆæƒ…報を更新ã—ã¾ã™\n使用方法: %2$s %3$s update <情報カテゴリ>\n\nサブコマンド:\n update <情報カテゴリ>: <情報カテゴリ> ã§ç‰¹å®šã•ã‚Œã‚‹æƒ…報を更新ã—ã¾ã™\n<情報カテゴリ> ã«ã¯ã€Œnetworkã€ã‚’指定ã§ãã¾ã™\n" + help.logging = "%1$s: Tools ログを変更ã—ã¾ã™\n使用法: %2$s %3$s level \n\nサブコマンド:\n ã®å–å¾—: ç¾åœ¨ã®ãƒ¬ãƒ™ãƒ«ã‚’表示ã—ã¾ã™\n ã®è¨­å®š: ç¾åœ¨ã®ãƒ¬ãƒ™ãƒ«ã‚’設定ã—ã¾ã™\n\n ã¯ã€vmsvc ã‚„ vmusr ãªã©ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るサービスを指定ã§ãã¾ã™\n ã¯ã€ã‚¨ãƒ©ãƒ¼ã€ã‚¯ãƒªãƒ†ã‚£ã‚«ãƒ«ã€è­¦å‘Šã€æƒ…å ±ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ãƒ‡ãƒãƒƒã‚°ã®ã„ãšã‚Œã‹ã‚’指定ã§ãã¾ã™\n デフォルト㯠%4$s ã§ã™\n" -help.main = "使用方法: %1$s <コマンド> [オプション] [サブコマンド]\n特定ã®ã‚³ãƒžãƒ³ãƒ‰ã®ãƒ˜ãƒ«ãƒ—ã«ã¤ã„ã¦ã¯ã€'%2$s %3$s <コマンド>' を入力ã—ã¾ã™ã€‚\nVMware Tools ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’確èªã™ã‚‹ã«ã¯ã€'%4$s -v' を入力ã—ã¾ã™ã€‚\nstdout 出力を行ã‚ãªã„å ´åˆã¯ '-q' オプションを使用ã—ã¾ã™ã€‚\nã»ã¨ã‚“ã©ã®ã‚³ãƒžãƒ³ãƒ‰ã§ã¯ã€ã‚µãƒ–コマンドを使用ã—ã¾ã™ã€‚\n\n使用å¯èƒ½ãªã‚³ãƒžãƒ³ãƒ‰:\n device\n disk\n logging\n script\n stat\n timesync\n upgrade (ã™ã¹ã¦ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚° システムã§ä½¿ç”¨ã§ãã‚‹ã‚ã‘ã§ã¯ã‚ã‚Šã¾ã›ã‚“)\n" +help.main = "使用方法: %1$s <コマンド> [オプション] [サブコマンド]\n「%2$s %3$s <コマンド>ã€ã¨å…¥åŠ›ã™ã‚‹ã¨ã€ãã®ã‚³ãƒžãƒ³ãƒ‰ã®ãƒ˜ãƒ«ãƒ—を表示ã§ãã¾ã™ã€‚\nVMware Tools ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’確èªã™ã‚‹ã«ã¯ã€Œ%4$s -vã€ã¨å…¥åŠ›ã—ã¾ã™ã€‚.\nstdout 出力を抑止ã™ã‚‹ã«ã¯ã€Œ-qã€ã‚ªãƒ—ションを使用ã—ã¾ã™ã€‚\nã»ã¨ã‚“ã©ã®ã‚³ãƒžãƒ³ãƒ‰ã§ã¯ã‚µãƒ–コマンドも使用ã•ã‚Œã¾ã™ã€‚\n\n使用å¯èƒ½ãªã‚³ãƒžãƒ³ãƒ‰: \n config\n device\n disk(オペレーティング システムã«ã‚ˆã£ã¦ã¯ä½¿ç”¨ã§ããªã„å ´åˆã‚‚ã‚ã‚Šã¾ã™ï¼‰\n info\n logging\n script\n stat\n timesync\n upgrade(オペレーティング システムã«ã‚ˆã£ã¦ã¯ä½¿ç”¨ã§ããªã„å ´åˆã‚‚ã‚ã‚Šã¾ã™ï¼‰\n" help.script = "%1$s: é›»æºæ“作ã«å¯¾å¿œã—ã¦å®Ÿè¡Œã•ã‚Œã‚‹ã‚¹ã‚¯ãƒªãƒ—トを制御\n使用方法: %2$s %3$s <サブコマンド> [引数]\n\nサブコマンド:\n enable: 指定ã•ã‚ŒãŸã‚¹ã‚¯ãƒªãƒ—トを有効ã«ã—ã¦ã€ãã®ãƒ‘スをデフォルトã«å¾©å…ƒ\n disable: 指定ã•ã‚ŒãŸã‚¹ã‚¯ãƒªãƒ—トを無効ã«ã™ã‚‹\n set <フル パス>: 指定ã•ã‚ŒãŸã‚¹ã‚¯ãƒªãƒ—トを指定ã•ã‚ŒãŸãƒ‘スã«è¨­å®š\n default: 指定ã•ã‚ŒãŸã‚¹ã‚¯ãƒªãƒ—トã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ãƒ‘スを出力\n current: 指定ã•ã‚ŒãŸã‚¹ã‚¯ãƒªãƒ—トã®ç¾åœ¨ã®ãƒ‘スを出力\n" -help.stat = "%1$s: å½¹ã«ç«‹ã¤ã‚²ã‚¹ãƒˆãŠã‚ˆã³ãƒ›ã‚¹ãƒˆæƒ…報を出力\n使用方法: %2$s %3$s <サブコマンド>\n\nサブコマンド:\n hosttime: ホスト時刻を出力\n speed: CPU 速度 (MHz) を出力\nESX ゲストã®ã¿ã®ã‚µãƒ–コマンド:\n sessionid: ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ ID を出力\n balloon: メモリã®ãƒãƒ«ãƒ¼ãƒ‹ãƒ³ã‚°æƒ…報を出力\n swap: メモリã®ã‚¹ãƒ¯ãƒƒãƒ—情報を出力\n memlimit: メモリã®åˆ¶é™æƒ…報を出力\n memres: メモリã®äºˆç´„情報を出力\n cpures: CPU ã®äºˆç´„情報を出力\n cpulimit: CPU ã®åˆ¶é™æƒ…報を出力\n" +help.stat = "%1$s: å½¹ã«ç«‹ã¤ã‚²ã‚¹ãƒˆãŠã‚ˆã³ãƒ›ã‚¹ãƒˆæƒ…報を出力\n使用方法: %2$s %3$s <サブコマンド>\n\nサブコマンド:\n hosttime: ホスト時刻を出力\n speed: CPU 速度 (MHz) を出力\nESX ゲストã®ã¿ã®ã‚µãƒ–コマンド:\n sessionid: ç¾åœ¨ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ ID を出力\n balloon: メモリã®ãƒãƒ«ãƒ¼ãƒ‹ãƒ³ã‚°æƒ…報を出力\n swap: メモリã®ã‚¹ãƒ¯ãƒƒãƒ—情報を出力\n memlimit: メモリã®åˆ¶é™æƒ…報を出力\n memres: メモリã®äºˆç´„情報を出力\n cpures: CPU ã®äºˆç´„情報を出力\n cpulimit: CPU ã®åˆ¶é™æƒ…報を出力\n raw [<エンコーディング> <統計å>]: RAW 統計情報を出力\n <エンコーディング> ã«ã¯ã€ã€Œtext'ã€ã€ã€Œjsonã€ã€ã€Œxmlã€ã€ã€Œyamlã€ã®ã„ãšã‚Œã‹ã‚’指定ã§ãã¾ã™ã€‚\n <統計å> ã«ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã€ãƒ›ã‚¹ãƒˆã€ãƒªã‚½ãƒ¼ã‚¹ã€vscsi ãŠã‚ˆã³\n vnet ãŒå«ã¾ã‚Œã¾ã™ï¼ˆvscsi ãªã©ã®ã„ãã¤ã‹ã®çµ±è¨ˆã¯ã€ãŸã¨ãˆã°ã€Œvscsi scsi0:0ã€ãªã©ã€2 語ã«ãªã‚Šã¾ã™ï¼‰ã€‚\n <エンコーディング> ãŠã‚ˆã³ <統計å>\n ã®å¼•æ•°ãŒæŒ‡å®šã•ã‚Œãªã„å ´åˆã€åˆ©ç”¨å¯èƒ½ãªçµ±è¨ˆãŒå‡ºåŠ›ã•ã‚Œã¾ã™ã€‚\n" help.timesync = "%1$s: ゲスト OS ã®æ™‚刻ã®åŒæœŸã‚’制御ã™ã‚‹ãŸã‚ã®æ©Ÿèƒ½\n使用方法: %2$s %3$s <サブコマンド>\n\nサブコマンド:\n enable: 時刻ã®åŒæœŸã‚’有効ã«ã™ã‚‹\n disable: 時刻ã®åŒæœŸã‚’無効ã«ã™ã‚‹\n status: 時刻ã®åŒæœŸã®çŠ¶æ…‹ã‚’出力\n" @@ -108,7 +124,7 @@ script.operation = "æ“作" script.unknownop = "æ“作 %1$s ã®ã‚¹ã‚¯ãƒªãƒ—トãŒã‚ã‚Šã¾ã›ã‚“。\n" -script.write.error = "構æˆæ›¸ãè¾¼ã¿ã‚¨ãƒ©ãƒ¼: %1$s\n" +script.write.error = "設定書ãè¾¼ã¿ã‚¨ãƒ©ãƒ¼: %1$s\n" stat.balloon.failed = "ãƒãƒ«ãƒ¼ãƒ³ メモリã®å–å¾—ã«å¤±æ•—ã—ã¾ã—ãŸ: %1$s\n" diff --git a/open-vm-tools/toolbox/l10n/ko.vmsg b/open-vm-tools/toolbox/l10n/ko.vmsg index 1e8e1b652..25aedee5b 100644 --- a/open-vm-tools/toolbox/l10n/ko.vmsg +++ b/open-vm-tools/toolbox/l10n/ko.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2010 VMware, Inc. All rights reserved. +# Copyright (C) 2010-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published @@ -18,8 +18,20 @@ arg.command = "명령" +arg.config.key = "구성 키" + +arg.config.operation = "구성 ìž‘ì—…" + +arg.config.section = "구성 섹션" + +arg.config.value = "구성 ê°’" + arg.devicename = "디바ì´ìŠ¤ ì´ë¦„" +arg.info.class = "ì •ë³´ ì •ë³´ í´ëž˜ìŠ¤" + +arg.info.subcommand = "ì •ë³´ ìž‘ì—…" + arg.logging.level = "로깅 수준" arg.logging.service = "로깅 서비스 ì´ë¦„" @@ -80,19 +92,23 @@ error.novirtual = "%1$sì€(는) ê°€ìƒ ì‹œìŠ¤í…œ 내부ì—ì„œ 실행해야 í•© error.unknown = "%1$s: ì•Œ 수 없는 %2$s '%3$s'\n" +help.config = "%1$s: ë„구 구성 수정\n사용법: %2$s %3$s <하위 명령>\n\n하위 명령:\n get <섹션> <키>: <키>ì— ëŒ€í•œ 현재 ê°’ 표시\n set <섹션> <키> <ê°’>: <키>를 <ê°’>으로 설정\n\n remove <섹션> <키>: <키> 제거\n\n<섹션>ì€ ì§€ì›ë˜ëŠ” ì–´ë–¤ 섹션(예: logging, guestoperations ë˜ëŠ” guestinfo)ì´ë¼ë„ ë  ìˆ˜ 있습니다.\n<키>는 ì–´ë–¤ 구성 키ë¼ë„ ë  ìˆ˜ 있습니다.\n<ê°’>ì€ ì–´ë–¤ ê°’ì´ë¼ë„ ë  ìˆ˜ 있습니다.\n" + help.device = "%1$s: ê°€ìƒ ì‹œìŠ¤í…œì˜ í•˜ë“œì›¨ì–´ 디바ì´ìŠ¤ì™€ ê´€ë ¨ëœ ê¸°ëŠ¥\n사용법: %2$s %3$s <하위 명령> [ì¸ìˆ˜]\ndev는 디바ì´ìŠ¤ ì´ë¦„입니다.\n\n하위 명령:\n enable : 디바ì´ìŠ¤ devê°€ 사용ë˜ë„ë¡ ì„¤ì •í•©ë‹ˆë‹¤.\n disable : 디바ì´ìŠ¤ devê°€ 사용ë˜ì§€ ì•Šë„ë¡ ì„¤ì •í•©ë‹ˆë‹¤.\n list: 사용 가능한 모든 디바ì´ìŠ¤ë¥¼ 나열합니다.\n status : 디바ì´ìŠ¤ì˜ ìƒíƒœë¥¼ 출력합니다.\n" help.disk = "%1$s: ë””ìŠ¤í¬ ì¶•ì†Œ ìž‘ì—…ì„ ìˆ˜í–‰í•©ë‹ˆë‹¤.\n사용법: %2$s %3$s <하위명령> [ì¸ìˆ˜]\n\n하위 명령:\n list: 사용 가능한 위치를 나열합니다.\n shrink <위치>: ì§€ì •ëœ ìœ„ì¹˜ì—ì„œ íŒŒì¼ ì‹œìŠ¤í…œì„ ì§€ìš°ê³  축소합니다.\n shrinkonly: 모든 디스í¬ë¥¼ 축소합니다.\n wipe <위치>: ì§€ì •ëœ ìœ„ì¹˜ì—ì„œ íŒŒì¼ ì‹œìŠ¤í…œì„ ì§€ì›ë‹ˆë‹¤.\n" help.hint = "ìžì„¸í•œ ë‚´ìš©ì„ ë³´ë ¤ë©´ '%1$s %2$s%3$s%4$s'ì„(를) ì‹œë„í•´ 보십시오.\n" +help.info = "%1$s: 호스트ì—ì„œ 게스트 ì •ë³´ ì—…ë°ì´íŠ¸\n사용법: %2$s %3$s ì—…ë°ì´íŠ¸ <ì •ë³´ í´ëž˜ìŠ¤>\n\n하위 명령:\n update <ì •ë³´ í´ëž˜ìŠ¤>: <ì •ë³´ í´ëž˜ìŠ¤>ì—ì„œ ì‹ë³„í•œ ì •ë³´ ì—…ë°ì´íŠ¸\n<ì •ë³´ í´ëž˜ìŠ¤>는 '네트워í¬'ì¼ ìˆ˜ 있ìŒ\n" + help.logging = "%1$s: ë„구 로깅 수정\n사용: %2$s %3$s 수준 \n\n하위 명령:\n 가져오기: 현재 수준 표시\n 설정: 현재 수준 설정\n\nì€ vmsvc ë˜ëŠ” vmusrê³¼ ê°™ì€ ì§€ì› ì„œë¹„ìŠ¤ì¼ ìˆ˜ 있습니다.\nì€ ì˜¤ë¥˜, 중요, 경고, ì •ë³´, 메시지, 디버그 중 í•˜ë‚˜ì¼ ìˆ˜ 있습니다.\n ê¸°ë³¸ê°’ì€ %4$s입니다.\n" -help.main = "사용법: %1$s <명령> [옵션] [하위 명령]\n특정 ëª…ë ¹ì— ëŒ€í•œ ë„움ë§ì„ 보려면 '%2$s %3$s <명령>'ì„(를) 입력합니다.\nVMware Tools ë²„ì „ì„ í™•ì¸í•˜ë ¤ë©´ '%4$s -v'를 입력합니다.\nstdout ì¶œë ¥ì„ í‘œì‹œí•˜ì§€ 않으려면 '-q' ì˜µì…˜ì„ ì‚¬ìš©í•©ë‹ˆë‹¤.\nëŒ€ë¶€ë¶„ì˜ ëª…ë ¹ì—는 하위 ëª…ë ¹ì´ ìžˆìŠµë‹ˆë‹¤.\n\n사용 가능한 명령:\n device\n disk\n logging\n script\n stat\n timesync\n upgrade(모든 ìš´ì˜ ì²´ì œì—ì„œ 사용할 수 있는 ê²ƒì€ ì•„ë‹˜)\n" +help.main = "사용법: %1$s <명령> [옵션] [하위 명령]\n특정 ëª…ë ¹ì— ëŒ€í•œ ë„움ë§ì„ 보려면 '%2$s %3$s <명령>'ì„ ìž…ë ¥í•˜ì‹­ì‹œì˜¤.\nVMware Tools ë²„ì „ì„ í™•ì¸í•˜ë ¤ë©´ '%4$s -v'를 입력하십시오.\nstdout ì¶œë ¥ì„ í‘œì‹œí•˜ì§€ 않으려면 '-q' ì˜µì…˜ì„ ì‚¬ìš©í•˜ì‹­ì‹œì˜¤.\nëŒ€ë¶€ë¶„ì˜ ëª…ë ¹ì— í•˜ìœ„ ëª…ë ¹ì´ ì‚¬ìš©ë©ë‹ˆë‹¤.\n\n사용 가능한 명령:\n config\n device\n disk(ì¼ë¶€ ìš´ì˜ ì²´ì œì—서만 사용할 수 있ìŒ)\n info\n logging\n script\n stat\n timesync\n upgrade(ì¼ë¶€ ìš´ì˜ ì²´ì œì—서만 사용할 수 있ìŒ)\n" -help.script = "%1$s: ì „ì› ìž‘ì—…ì— ëŒ€í•œ ì‘답으로 실행ë˜ëŠ” 스í¬ë¦½íŠ¸ë¥¼ 제어합니다.\n사용법: %2$s %3$s <ì „ì›|재개|ì¼ì‹œ 중단|종료> <하위 명령> [ì¸ìˆ˜]\n\n하위 명령:\n enable: ì§€ì •ëœ ìŠ¤í¬ë¦½íŠ¸ê°€ 사용ë˜ë„ë¡ ì„¤ì •í•˜ê³  해당 경로를 기본값으로 ë³µì›í•©ë‹ˆë‹¤.\n disable: ì§€ì •ëœ ìŠ¤í¬ë¦½íŠ¸ê°€ 사용ë˜ì§€ ì•Šë„ë¡ ì„¤ì •í•©ë‹ˆë‹¤.\n set <ì „ì²´ 경로>: ì§€ì •ëœ ìŠ¤í¬ë¦½íŠ¸ë¥¼ ì§€ì •ëœ ê²½ë¡œë¡œ 설정합니다.\n default: ì§€ì •ëœ ìŠ¤í¬ë¦½íŠ¸ì˜ 기본 경로를 출력합니다.\n current: ì§€ì •ëœ ìŠ¤í¬ë¦½íŠ¸ì˜ 현재 경로를 출력합니다.\n" +help.script = "%1$s: ì „ì› ìž‘ì—…ì— ëŒ€í•œ ì‘답으로 실행ë˜ëŠ” 스í¬ë¦½íŠ¸ë¥¼ 제어합니다.\n사용법: %2$s %3$s <하위 명령> [ì¸ìˆ˜]\n\n하위 명령:\n enable: ì§€ì •ëœ ìŠ¤í¬ë¦½íŠ¸ê°€ 사용ë˜ë„ë¡ ì„¤ì •í•˜ê³  해당 경로를 기본값으로 ë³µì›í•©ë‹ˆë‹¤.\n disable: ì§€ì •ëœ ìŠ¤í¬ë¦½íŠ¸ê°€ 사용ë˜ì§€ ì•Šë„ë¡ ì„¤ì •í•©ë‹ˆë‹¤.\n set <ì „ì²´ 경로>: ì§€ì •ëœ ìŠ¤í¬ë¦½íŠ¸ë¥¼ ì§€ì •ëœ ê²½ë¡œë¡œ 설정합니다.\n default: ì§€ì •ëœ ìŠ¤í¬ë¦½íŠ¸ì˜ 기본 경로를 출력합니다.\n current: ì§€ì •ëœ ìŠ¤í¬ë¦½íŠ¸ì˜ 현재 경로를 출력합니다.\n" -help.stat = "%1$s: 유용한 게스트 ë° í˜¸ìŠ¤íŠ¸ ì •ë³´ ì¸ì‡„\n사용법: %2$s %3$s <하위 명령>\n\n하위 명령:\n hosttime: 호스트 시간 ì¸ì‡„\n speed: CPU ì†ë„(MHz) ì¸ì‡„\nESX 게스트 ì „ìš© 하위 명령:\n sessionid: 현재 세션 ID ì¸ì‡„\n balloon: 메모리 ë²Œë£¨ë‹ ì •ë³´ ì¸ì‡„\n swap: 메모리 스와핑 ì •ë³´ ì¸ì‡„\n memlimit: 메모리 제한 ì •ë³´ ì¸ì‡„\n memres: 메모리 예약 ì •ë³´ ì¸ì‡„\n cpures: CPU 예약 ì •ë³´ ì¸ì‡„\n cpulimit: CPU 제한 ì •ë³´ ì¸ì‡„\n" +help.stat = "%1$s: 유용한 게스트 ë° í˜¸ìŠ¤íŠ¸ ì •ë³´ ì¸ì‡„\n사용법: %2$s %3$s <하위 명령>\n\n하위 명령:\n hosttime: 호스트 시간 ì¸ì‡„\n speed: CPU ì†ë„(MHz) ì¸ì‡„\nESX 게스트 ì „ìš© 하위 명령:\n sessionid: 현재 세션 ID ì¸ì‡„\n balloon: 메모리 ë²Œë£¨ë‹ ì •ë³´ ì¸ì‡„\n swap: 메모리 스와핑 ì •ë³´ ì¸ì‡„\n memlimit: 메모리 제한 ì •ë³´ ì¸ì‡„\n memres: 메모리 예약 ì •ë³´ ì¸ì‡„\n cpures: CPU 예약 ì •ë³´ ì¸ì‡„\n cpulimit: CPU 제한 ì •ë³´ ì¸ì‡„\n raw [<ì¸ì½”딩> <통계 ì´ë¦„>]: ì›ì‹œ 통계 ì •ë³´ ì¸ì‡„\n <ì¸ì½”딩>ì€ 'text', 'json', 'xml', 'yaml' 중 í•˜ë‚˜ì¼ ìˆ˜ 있습니다.\n <통계 ì´ë¦„>ì€ ì„¸ì…˜, 호스트, 리소스, vscsi ë°\n vnetì„ í¬í•¨í•©ë‹ˆë‹¤(vscsi와 ê°™ì€ ì¼ë¶€ 통계는 'vscsi scsi0:0'ê³¼ ê°™ì´ 2ê°œì˜ ë‹¨ì–´ë¡œ 구성ë¨).\n <ì¸ì½”딩> ë° <통계 ì´ë¦„>\n ì¸ìˆ˜ê°€ 지정ë˜ì§€ ì•Šì€ ê²½ìš° 사용 가능한 통계를 ì¸ì‡„합니다.\n" help.timesync = "%1$s: 게스트 OSì˜ ì‹œê°„ ë™ê¸°í™” 제어 기능\n사용법: %2$s %3$s <하위 명령>\n\n하위 명령:\n enable: 시간 ë™ê¸°í™” 사용\n disable: 시간 ë™ê¸°í™” 사용 안 함\n status: 시간 ë™ê¸°í™” ìƒíƒœ ì¸ì‡„\n" diff --git a/open-vm-tools/toolbox/l10n/zh_CN.vmsg b/open-vm-tools/toolbox/l10n/zh_CN.vmsg index 316120a9c..ec187b950 100644 --- a/open-vm-tools/toolbox/l10n/zh_CN.vmsg +++ b/open-vm-tools/toolbox/l10n/zh_CN.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2010 VMware, Inc. All rights reserved. +# Copyright (C) 2010-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published @@ -18,8 +18,20 @@ arg.command = "命令" +arg.config.key = "é…置项" + +arg.config.operation = "é…ç½®æ“作" + +arg.config.section = "é…置节" + +arg.config.value = "é…置值" + arg.devicename = "设备å称" +arg.info.class = "ä¿¡æ¯çš„ä¿¡æ¯ç±»" + +arg.info.subcommand = "ä¿¡æ¯æ“作" + arg.logging.level = "日志记录级别" arg.logging.service = "日志记录æœåŠ¡å" @@ -80,19 +92,23 @@ error.novirtual = "%1$s 必须在虚拟机内部è¿è¡Œã€‚\n" error.unknown = "%1$s: %2$s“%3$sâ€æœªçŸ¥\n" +help.config = "%1$s: 修改 Tools é…ç½®\n用法: %2$s %3$s <å­å‘½ä»¤>\n\nå­å‘½ä»¤:\n get <节> <项>: 显示 <项> 的当å‰å€¼\n set <节> <项> <值>: å°† <项> 设置为 <值>\n\n remove <节> <项>: 移除 <项>\n\n<节> å¯ä»¥æ˜¯å—支æŒçš„任何节,如 loggingã€guestoperations 或 guestinfo。\n<项> å¯ä»¥æ˜¯ä»»ä½•é…置项。\n<值> å¯ä»¥æ˜¯ä»»ä½•å€¼ã€‚\n" + help.device = "%1$s: 与虚拟机的硬件设备相关的功能\n用法: %2$s %3$s <å­å‘½ä»¤> [å‚æ•°]\ndev 是设备的å称。\n\nå­å‘½ä»¤:\n enable : å¯ç”¨è®¾å¤‡ dev\n disable : ç¦ç”¨è®¾å¤‡ dev\n list: 列出所有å¯ç”¨çš„设备\n status : 打å°è®¾å¤‡çš„状æ€\n" help.disk = "%1$s: 执行ç£ç›˜åŽ‹ç¼©æ“作\n用法: %2$s %3$s <å­å‘½ä»¤> [å‚æ•°]\n\nå­å‘½ä»¤:\n list: 列出å¯ç”¨çš„ä½ç½®\n shrink <ä½ç½®>: 擦除并压缩指定ä½ç½®çš„文件系统\n shrinkonly: 压缩所有ç£ç›˜\n wipe <ä½ç½®>: 擦除指定ä½ç½®çš„文件系统\n" help.hint = "有关详细信æ¯ï¼Œè¯·å°è¯•â€œ%1$s %2$s%3$s%4$sâ€ã€‚\n" +help.info = "%1$s: 更新主机上的æ¥å®¾ä¿¡æ¯\n用法: %2$s %3$s update <ä¿¡æ¯ç±»>\n\nå­å‘½ä»¤:\n update <ä¿¡æ¯ç±»>: æ›´æ–°ç”± <ä¿¡æ¯ç±»> 标识的信æ¯\n<ä¿¡æ¯ç±»> å¯ä»¥ä¸ºâ€œnetworkâ€\n" + help.logging = ""%1$s: 修改 Tools 日志记录\n用法: %2$s %3$s level <å­å‘½ä»¤> <æœåŠ¡å> <级别>\n\nå­å‘½ä»¤:\n get <æœåŠ¡å>: 显示当å‰çº§åˆ«\n set <æœåŠ¡å> <级别>: 设置当å‰çº§åˆ«\n\n<æœåŠ¡å> å¯ä»¥æ˜¯å—支æŒçš„任何æœåŠ¡ï¼ŒåŒ…括 vmsvc 或 vmusr\n<级别> å¯ä»¥æ˜¯ errorã€criticalã€warningã€infoã€message 或 debug 中的一ç§\n 默认为 %4$s\n"" -help.main = "用法:%1$s <命令> [选项] [å­å‘½ä»¤]\n键入“%2$s %3$s <命令>â€ä»¥èŽ·å–特定命令的帮助。\n键入“%4$s -vâ€ä»¥æŸ¥çœ‹ VMware Tools 版本。\n使用“-qâ€é€‰é¡¹ä»¥ç¦ç”¨æ ‡å‡†è¾“出。\n大多数命令具有å­å‘½ä»¤ã€‚\n\nå¯ç”¨çš„命令:\n device\n disk\n logging\n script\n stat\n timesync\n upgrade (并éžé€‚用于所有æ“作系统)\n" +help.main = "用法: %1$s <命令> [选项] [å­å‘½ä»¤]\n键入“%2$s %3$s <命令>â€å¯èŽ·å–有关特定命令的帮助。\n键入“%4$s -vâ€å¯æŸ¥çœ‹ VMware Tools 版本。\n使用“-qâ€é€‰é¡¹å¯å–消 stdout 输出。\n大多数命令都有å­å‘½ä»¤ã€‚\n\nå¯ç”¨å‘½ä»¤:\n config\n device\n disk (并éžæ‰€æœ‰æ“作系统都支æŒ)\n info\n logging\n script\n stat\n timesync\n upgrade (并éžæ‰€æœ‰æ“作系统都支æŒ)\n" help.script = "%1$s: 控制脚本è¿è¡Œä»¥å“应打开电æºæ“作\n用法: %2$s %3$s <å­å‘½ä»¤> [å‚æ•°]\n\nå­å‘½ä»¤:\n enable: å¯ç”¨ç»™å®šè„šæœ¬ï¼Œå¹¶å°†å…¶è·¯å¾„æ¢å¤ä¸ºé»˜è®¤å€¼\n disable: ç¦ç”¨ç»™å®šè„šæœ¬\n set <完整路径>: 将给定脚本设置为给定路径\n default: 打å°ç»™å®šè„šæœ¬çš„默认路径\n current: 打å°ç»™å®šè„šæœ¬çš„当å‰è·¯å¾„\n" -help.stat = "%1$s: 打å°æœ‰ç”¨çš„æ¥å®¾å’Œä¸»æœºä¿¡æ¯\n用法: %2$s %3$s <å­å‘½ä»¤>\n\nå­å‘½ä»¤:\n hosttime: 打å°ä¸»æœºæ—¶é—´\n speed: æ‰“å° CPU 速度(以 MHz 为å•ä½)\nä»… ESX æ¥å®¾å­å‘½ä»¤:\n sessionid: 打å°å½“å‰ä¼šè¯ id\n balloon: 打å°å†…存扩大信æ¯\n swap: 打å°å†…存交æ¢ä¿¡æ¯\n memlimit: 打å°å†…å­˜é™åˆ¶ä¿¡æ¯\n memres: 打å°å†…å­˜ä¿ç•™ä¿¡æ¯\n cpures: æ‰“å° CPU ä¿ç•™ä¿¡æ¯\n cpulimit: æ‰“å° CPU é™åˆ¶ä¿¡æ¯\n" +help.stat = "%1$s: 打å°æœ‰ç”¨çš„æ¥å®¾å’Œä¸»æœºä¿¡æ¯\n用法: %2$s %3$s <å­å‘½ä»¤>\n\nå­å‘½ä»¤:\n hosttime: 打å°ä¸»æœºæ—¶é—´\n speed: æ‰“å° CPU 速度 (以 MHz 为å•ä½)\nä»… ESX æ¥å®¾å­å‘½ä»¤:\n sessionid: 打å°å½“å‰ä¼šè¯ id\n balloon: 打å°å†…存扩大信æ¯\n swap: 打å°å†…存交æ¢ä¿¡æ¯\n memlimit: 打å°å†…å­˜é™åˆ¶ä¿¡æ¯\n memres: 打å°å†…å­˜ä¿ç•™ä¿¡æ¯\n cpures: æ‰“å° CPU ä¿ç•™ä¿¡æ¯\n cpulimit: æ‰“å° CPU é™åˆ¶ä¿¡æ¯\n raw [<ç¼–ç > <统计å称>]: 打å°åŽŸå§‹ç»Ÿè®¡ä¿¡æ¯\n <ç¼–ç > å¯ä»¥ä¸ºâ€œtextâ€ã€â€œjsonâ€ã€â€œxmlâ€å’Œâ€œyamlâ€ä¹‹ä¸€ã€‚\n <统计å称> 包括 sessionã€hostã€resourcesã€vscsi å’Œ\n vnet (诸如 vscsi 之类的æŸäº›ç»Ÿè®¡ç”±ä¸¤ä¸ªå•è¯ç»„æˆï¼Œä¾‹å¦‚“vscsi scsi0:0â€)。\n 如果未指定 <ç¼–ç > å’Œ <统计å称> å‚数,\n 则会打å°å¯ç”¨çš„统计信æ¯ã€‚\n" help.timesync = "%1$s: 用于控制æ¥å®¾æ“作系统上的时间åŒæ­¥çš„功能\n用法: %2$s %3$s <å­å‘½ä»¤>\n\nå­å‘½ä»¤:\n enable: å¯ç”¨æ—¶é—´åŒæ­¥\n disable: ç¦ç”¨æ—¶é—´åŒæ­¥\n status: 打å°æ—¶é—´åŒæ­¥çŠ¶æ€\n" diff --git a/open-vm-tools/toolbox/toolbox-cmd.c b/open-vm-tools/toolbox/toolbox-cmd.c index e8b50ed2f..1fd91e8dc 100644 --- a/open-vm-tools/toolbox/toolbox-cmd.c +++ b/open-vm-tools/toolbox/toolbox-cmd.c @@ -1,6 +1,6 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -100,13 +100,18 @@ ToolboxCmdHelp(const char *progName, static CmdTable commands[] = { { "timesync", TimeSync_Command, TRUE, FALSE, TimeSync_Help}, { "script", Script_Command, FALSE, TRUE, Script_Help}, +#if !defined(USERWORLD) { "disk", Disk_Command, TRUE, TRUE, Disk_Help}, +#endif { "stat", Stat_Command, TRUE, FALSE, Stat_Help}, { "device", Device_Command, TRUE, FALSE, Device_Help}, -#if (defined(_WIN32) || defined(linux)) && !defined(OPEN_VM_TOOLS) +#if defined(_WIN32) || \ + (defined(linux) && !defined(OPEN_VM_TOOLS) && !defined(USERWORLD)) { "upgrade", Upgrade_Command, TRUE, TRUE, Upgrade_Help}, #endif { "logging", Logging_Command, TRUE, TRUE, Logging_Help}, + { "info", Info_Command, TRUE, TRUE, Info_Help}, + { "config", Config_Command, TRUE, TRUE, Config_Help}, { "help", HelpCommand, FALSE, FALSE, ToolboxCmdHelp}, }; @@ -293,8 +298,10 @@ ToolboxCmdHelp(const char *progName, // IN "Use '-q' option to suppress stdout output.\n" "Most commands take a subcommand.\n\n" "Available commands:\n" + " config\n" " device\n" - " disk\n" + " disk (not available on all operating systems)\n" + " info\n" " logging\n" " script\n" " stat\n" diff --git a/open-vm-tools/toolbox/toolboxCmdInt.h b/open-vm-tools/toolbox/toolboxCmdInt.h index d52d9e004..7d5341f08 100644 --- a/open-vm-tools/toolbox/toolboxCmdInt.h +++ b/open-vm-tools/toolbox/toolboxCmdInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -128,8 +128,11 @@ DECLARE_COMMAND(Script); DECLARE_COMMAND(Stat); DECLARE_COMMAND(TimeSync); DECLARE_COMMAND(Logging); +DECLARE_COMMAND(Info); +DECLARE_COMMAND(Config); -#if defined(_WIN32) || (defined(linux) && !defined(OPEN_VM_TOOLS)) +#if defined(_WIN32) || \ + (defined(linux) && !defined(OPEN_VM_TOOLS) && !defined(USERWORLD)) DECLARE_COMMAND(Upgrade); #endif diff --git a/open-vm-tools/toolbox/toolboxcmd-config.c b/open-vm-tools/toolbox/toolboxcmd-config.c new file mode 100644 index 000000000..bb656ea43 --- /dev/null +++ b/open-vm-tools/toolbox/toolboxcmd-config.c @@ -0,0 +1,298 @@ +/********************************************************* + * Copyright (C) 2016 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * toolboxcmd-config.c -- + * + * VMTools config operations. + * + * Supports a basic set/get of individual tools.conf key-value pairs. + * + */ + +#include + +#include "conf.h" +#include "toolboxCmdInt.h" +#include "vmware/tools/i18n.h" +#include "vmware/tools/utils.h" +#include "vmware/tools/log.h" + + +/* + *----------------------------------------------------------------------------- + * + * ConfigSet -- + * + * Set a config entry. + * + * Results: + * Returns EXIT_SUCCESS on success. + * Returns the appropriate exit codes on errors. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static int +ConfigSet(const char *section, // config section + const char *key, // key + const char *value) // value +{ + GKeyFile *confDict = NULL; + GError *err = NULL; + int ret = EXIT_SUCCESS; + + VMTools_LoadConfig(NULL, + G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, + &confDict, + NULL); + + if (confDict == NULL) { + confDict = g_key_file_new(); + } + + g_key_file_set_string(confDict, section, + key, value); + + if (!VMTools_WriteConfig(NULL, confDict, &err)) { + ToolsCmd_PrintErr(SU_(script.write.error, "Error writing config: %s\n"), + err ? err->message : ""); + g_clear_error(&err); + ret = EX_TEMPFAIL; + } + + g_key_file_free(confDict); + + return ret; +} + + +/* + *----------------------------------------------------------------------------- + * + * ConfigGet -- + * + * Get config value. + * + * Results: + * Returns EXIT_SUCCESS on success. + * Returns the appropriate exit codes on errors. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static int +ConfigGet(const char *section, // section + const char *key) // key +{ + GKeyFile *confDict = NULL; + int ret = EXIT_SUCCESS; + gchar *value = NULL; + + VMTools_LoadConfig(NULL, + G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, + &confDict, + NULL); + + if (confDict) { + value = g_key_file_get_string(confDict, section, + key, NULL); + } else { + ret = EX_UNAVAILABLE; + } + + if (value) { + g_print("[%s] %s = %s\n", section, key, value); + } else { + g_print("[%s] %s UNSET\n", section, key); + } + + g_key_file_free(confDict); + g_free(value); + + return ret; +} + + +/* + *----------------------------------------------------------------------------- + * + * ConfigRemove -- + * + * Remove config key. + * + * Results: + * Returns EXIT_SUCCESS on success. + * Returns the appropriate exit codes on errors. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static int +ConfigRemove(const char *section, // section + const char *key) // key +{ + GKeyFile *confDict = NULL; + int ret = EXIT_SUCCESS; + GError *err = NULL; + + VMTools_LoadConfig(NULL, + G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, + &confDict, + NULL); + + // be idempotent -- ignore any error about non-existant config or key + if (confDict) { + /* + * our ancient FreeBSD glib expects g_key_file_remove_key() + * to return void, and since we don't care anyways, ignore the + * return so it builds everywhere. + */ + (void) g_key_file_remove_key(confDict, section, + key, NULL); + } else { + return EX_UNAVAILABLE; + } + + if (!VMTools_WriteConfig(NULL, confDict, &err)) { + ToolsCmd_PrintErr(SU_(script.write.error, "Error writing config: %s\n"), + err ? err->message : ""); + g_clear_error(&err); + ret = EX_TEMPFAIL; + } + + g_key_file_free(confDict); + + return ret; +} + + +/* + *----------------------------------------------------------------------------- + * + * Config_Command -- + * + * Handle and parse config commands. + * + * Results: + * Returns EXIT_SUCCESS on success. + * Returns the appropriate exit codes on errors. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +int +Config_Command(char **argv, // IN: Command line arguments + int argc, // IN: Length of command line arguments + gboolean quiet) // IN +{ + const char *op; + const char *section; + const char *key; + + if (optind >= argc) { + ToolsCmd_MissingEntityError(argv[0], + SU_(arg.config.operation, "config operation")); + return EX_USAGE; + } + + if ((optind + 1) >= argc) { + ToolsCmd_MissingEntityError(argv[0], + SU_(arg.config.section, "config section")); + return EX_USAGE; + } + + if ((optind + 2) >= argc) { + ToolsCmd_MissingEntityError(argv[0], + SU_(arg.config.key, "config key")); + return EX_USAGE; + } + + op = argv[optind]; + section = argv[optind + 1]; + key = argv[optind + 2]; + + if (toolbox_strcmp(op, "set") == 0) { + const char *value; + + if ((optind + 3) >= argc) { + ToolsCmd_MissingEntityError(argv[0], + SU_(arg.config.value, "config value")); + return EX_USAGE; + } + value = argv[optind + 3]; + + return ConfigSet(section, key, value); + } else if (toolbox_strcmp(op, "get") == 0) { + return ConfigGet(section, key); + } else if (toolbox_strcmp(op, "remove") == 0) { + return ConfigRemove(section, key); + } else { + ToolsCmd_UnknownEntityError(argv[0], + SU_(arg.subcommand, "subcommand"), + argv[optind]); + return EX_USAGE; + } +} + + +/* + *----------------------------------------------------------------------------- + * + * Config_Help -- + * + * Prints the help for the config command. + * + * Results: + * None. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +Config_Help(const char *progName, // IN: The name of the program obtained from argv[0] + const char *cmd) // IN +{ + g_print(SU_(help.config, + "%s: modify Tools configuration\n" + "Usage: %s %s \n\n" + "Subcommands:\n" + " get
: display current value for \n" + " set
: set to \n\n" + " remove
: remove \n\n" + "
can be any supported section, such as logging, guestoperations or guestinfo.\n" + " can be any configuration key.\n" + " can be any value.\n"), + cmd, progName, cmd); +} + diff --git a/open-vm-tools/toolbox/toolboxcmd-devices.c b/open-vm-tools/toolbox/toolboxcmd-devices.c index 0f2f44cb4..f97ee39d6 100644 --- a/open-vm-tools/toolbox/toolboxcmd-devices.c +++ b/open-vm-tools/toolbox/toolboxcmd-devices.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/toolbox/toolboxcmd-info.c b/open-vm-tools/toolbox/toolboxcmd-info.c new file mode 100644 index 000000000..aa5f2173b --- /dev/null +++ b/open-vm-tools/toolbox/toolboxcmd-info.c @@ -0,0 +1,237 @@ +/********************************************************* + * Copyright (C) 2016 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/* + * toolboxcmd-info.c -- + * + * Various guest info operations for toolbox-cmd. + */ + +#include + +#include "conf.h" +#include "nicInfo.h" +#include "dynxdr.h" +#include "xdrutil.h" +#include "toolboxCmdInt.h" +#include "vmware/tools/i18n.h" +#include "vmware/tools/utils.h" +#ifdef _WIN32 +#include "netutil.h" +#endif + +/* + *----------------------------------------------------------------------------- + * + * InfoSendNetworkXdr -- + * + * Send network info to the VMX. + * + * Results: + * Returns TRUE on success. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +static Bool +InfoSendNetworkXdr(GuestNicProto *message, + GuestInfoType type) +{ + Bool status = FALSE; + XDR xdrs; + gchar *request; + char *reply = NULL; + size_t replyLen; + + /* Add the RPC preamble: message name, and type. */ + request = g_strdup_printf("%s %d ", GUEST_INFO_COMMAND, type); + + if (DynXdr_Create(&xdrs) == NULL) { + goto exit; + } + + /* Write preamble and serialized nic info to XDR stream. */ + if (!DynXdr_AppendRaw(&xdrs, request, strlen(request)) || + !xdr_GuestNicProto(&xdrs, message)) { + g_warning("Error serializing nic info v%d data.", message->ver); + } else { + status = ToolsCmd_SendRPC(DynXdr_Get(&xdrs), xdr_getpos(&xdrs), + &reply, &replyLen); + if (!status) { + g_warning("%s: update failed: request \"%s\", reply \"%s\".\n", + __FUNCTION__, request, reply); + } + vm_free(reply); + } + DynXdr_Destroy(&xdrs, TRUE); + +exit: + g_free(request); + return status; +} + + +/* + *----------------------------------------------------------------------------- + * + * InfoUpdateNetwork -- + * + * Update network info. + * + * Results: + * Returns EXIT_SUCCESS on success. + * Returns the appropriate exit codes on errors. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +int +InfoUpdateNetwork(void) +{ + int ret = EXIT_SUCCESS; + NicInfoV3 *info = NULL; + GuestNicProto msg = { 0 }; + GuestInfoType type = INFO_IPADDRESS_V3; + +#ifdef _WIN32 + DWORD dwRet = NetUtil_LoadIpHlpApiDll(); + if (dwRet != ERROR_SUCCESS) { + g_warning("NetUtil_LoadIpHlpApiDll() failed\n"); + return EXIT_FAILURE; + } +#endif + + if (!GuestInfo_GetNicInfo(&info)) { + g_warning("Failed to get nic info\n"); + ret = EXIT_FAILURE; + goto done; + } + + // Only useful for VMXs that support V3 + msg.ver = NIC_INFO_V3; + msg.GuestNicProto_u.nicInfoV3 = info; + if (!InfoSendNetworkXdr(&msg, type)) { + ret = EXIT_FAILURE; + } + + GuestInfo_FreeNicInfo(info); + +done: +#ifdef _WIN32 + NetUtil_FreeIpHlpApiDll(); +#endif + + return ret; +} + + +/* + *----------------------------------------------------------------------------- + * + * Info_Command -- + * + * Handle and parse info commands. + * + * Results: + * Returns EXIT_SUCCESS on success. + * Returns the appropriate exit codes on errors. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +int +Info_Command(char **argv, // IN: Command line arguments + int argc, // IN: Length of command line arguments + gboolean quiet) // IN +{ + char *subcommand; + char *class; + + // subcommand: 'update' + if ((optind) >= argc) { + ToolsCmd_MissingEntityError(argv[0], + SU_(arg.info.subcommand, "info operation")); + return EX_USAGE; + } + subcommand = argv[optind]; + + // info class: 'network' + if ((optind + 1) >= argc) { + ToolsCmd_MissingEntityError(argv[0], + SU_(arg.info.class, "info infoclass")); + return EX_USAGE; + } + + class = argv[optind + 1]; + + if (toolbox_strcmp(subcommand, "update") == 0) { + if (toolbox_strcmp(class, "network") == 0) { + return InfoUpdateNetwork(); + } else { + ToolsCmd_UnknownEntityError(argv[0], + SU_(arg.info.class, "info infoclass"), + class); + return EX_USAGE; + } + } else { + ToolsCmd_UnknownEntityError(argv[0], + SU_(arg.subcommand, "subcommand"), + subcommand); + return EX_USAGE; + } +} + + +/* + *----------------------------------------------------------------------------- + * + * Info_Help -- + * + * Prints the help for the info command. + * + * Results: + * None. + * + * Side effects: + * None. + * + *----------------------------------------------------------------------------- + */ + +void +Info_Help(const char *progName, // IN: The name of the program obtained from argv[0] + const char *cmd) // IN +{ + g_print(SU_(help.info, + "%s: update guest information on the host\n" + "Usage: %s %s update \n\n" + "Subcommands:\n" + " update : update information identified by \n" + " can be 'network'\n"), + cmd, progName, cmd); +} + diff --git a/open-vm-tools/toolbox/toolboxcmd-logging.c b/open-vm-tools/toolbox/toolboxcmd-logging.c index 69e1c05b0..2de6a4f4b 100644 --- a/open-vm-tools/toolbox/toolboxcmd-logging.c +++ b/open-vm-tools/toolbox/toolboxcmd-logging.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2015 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/toolbox/toolboxcmd-scripts.c b/open-vm-tools/toolbox/toolboxcmd-scripts.c index f0d4accd0..4aab4c68a 100644 --- a/open-vm-tools/toolbox/toolboxcmd-scripts.c +++ b/open-vm-tools/toolbox/toolboxcmd-scripts.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/toolbox/toolboxcmd-shrink.c b/open-vm-tools/toolbox/toolboxcmd-shrink.c index 5b0ab02d0..bf38f7be6 100644 --- a/open-vm-tools/toolbox/toolboxcmd-shrink.c +++ b/open-vm-tools/toolbox/toolboxcmd-shrink.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/toolbox/toolboxcmd-stat.c b/open-vm-tools/toolbox/toolboxcmd-stat.c index fe71d2ca2..764e4ae06 100644 --- a/open-vm-tools/toolbox/toolboxcmd-stat.c +++ b/open-vm-tools/toolbox/toolboxcmd-stat.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -609,7 +609,13 @@ Stat_Help(const char *progName, // IN: The name of the program obtained from arg " memlimit: print memory limit information\n" " memres: print memory reservation information\n" " cpures: print CPU reservation information\n" - " cpulimit: print CPU limit information\n"), + " cpulimit: print CPU limit information\n" + " raw [ ]: print raw stat information\n" + " can be one of 'text', 'json', 'xml', 'yaml'.\n" + " includes session, host, resources, vscsi and\n" + " vnet (Some stats like vscsi are two words, e.g. 'vscsi scsi0:0').\n" + " Prints the available stats if and \n" + " arguments are not specified.\n"), cmd, progName, cmd); } diff --git a/open-vm-tools/toolbox/toolboxcmd-time.c b/open-vm-tools/toolbox/toolboxcmd-time.c index 2d6bb6fda..d6b7a9851 100644 --- a/open-vm-tools/toolbox/toolboxcmd-time.c +++ b/open-vm-tools/toolbox/toolboxcmd-time.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/toolbox/toolboxcmd_version.h b/open-vm-tools/toolbox/toolboxcmd_version.h index 3dbd35386..fe53e43a2 100644 --- a/open-vm-tools/toolbox/toolboxcmd_version.h +++ b/open-vm-tools/toolbox/toolboxcmd_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/udev/99-vmware-scsi-udev.rules b/open-vm-tools/udev/99-vmware-scsi-udev.rules new file mode 100644 index 000000000..896354203 --- /dev/null +++ b/open-vm-tools/udev/99-vmware-scsi-udev.rules @@ -0,0 +1,3 @@ +ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*" , ATTRS{model}=="Virtual disk*", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'" +ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*" , ATTRS{model}=="VMware Virtual S", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'" + diff --git a/open-vm-tools/udev/Makefile.am b/open-vm-tools/udev/Makefile.am new file mode 100644 index 000000000..68fbc3e27 --- /dev/null +++ b/open-vm-tools/udev/Makefile.am @@ -0,0 +1,21 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### 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, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +install-data-local: + $(INSTALL) -d $(DESTDIR)$(UDEVRULESDIR) + $(INSTALL) $(srcdir)/99-vmware-scsi-udev.rules $(DESTDIR)$(UDEVRULESDIR) + diff --git a/open-vm-tools/vgauth/Makefile.am b/open-vm-tools/vgauth/Makefile.am index 66af3585a..e246dcded 100644 --- a/open-vm-tools/vgauth/Makefile.am +++ b/open-vm-tools/vgauth/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2014-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/vgauth/Makefile.in b/open-vm-tools/vgauth/Makefile.in deleted file mode 100644 index d0d39f0eb..000000000 --- a/open-vm-tools/vgauth/Makefile.in +++ /dev/null @@ -1,581 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = vgauth -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = lib cli service -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vgauth/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vgauth/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-exec-am: - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vgauth/cli/Makefile.am b/open-vm-tools/vgauth/cli/Makefile.am index fd6eb37f6..bea91390b 100644 --- a/open-vm-tools/vgauth/cli/Makefile.am +++ b/open-vm-tools/vgauth/cli/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2014-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/vgauth/cli/Makefile.in b/open-vm-tools/vgauth/cli/Makefile.in deleted file mode 100644 index 97e6883db..000000000 --- a/open-vm-tools/vgauth/cli/Makefile.in +++ /dev/null @@ -1,591 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-vgauth-cmd$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = vgauth/cli -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_vgauth_cmd_OBJECTS = vmware_vgauth_cmd-main.$(OBJEXT) -vmware_vgauth_cmd_OBJECTS = $(am_vmware_vgauth_cmd_OBJECTS) -am__DEPENDENCIES_1 = -vmware_vgauth_cmd_DEPENDENCIES = ../lib/libvgauth.la \ - $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_vgauth_cmd_SOURCES) -DIST_SOURCES = $(vmware_vgauth_cmd_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_vgauth_cmd_SOURCES = main.c -vmware_vgauth_cmd_CPPFLAGS = -DVMTOOLS_USE_GLIB @GLIB2_CPPFLAGS@ \ - -I$(top_srcdir)/libvmtools -I$(top_srcdir)/vgauth/public \ - -I$(top_srcdir)/vgauth/common -vmware_vgauth_cmd_LDADD = @VMTOOLS_LIBS@ @GLIB2_LIBS@ @GTHREAD_LIBS@ \ - @SSL_LIBS@ ../lib/libvgauth.la -lssl -lcrypto $(am__append_1) -@HAVE_ICU_FALSE@vmware_vgauth_cmd_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_vgauth_cmd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vgauth/cli/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vgauth/cli/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-vgauth-cmd$(EXEEXT): $(vmware_vgauth_cmd_OBJECTS) $(vmware_vgauth_cmd_DEPENDENCIES) - @rm -f vmware-vgauth-cmd$(EXEEXT) - $(vmware_vgauth_cmd_LINK) $(vmware_vgauth_cmd_OBJECTS) $(vmware_vgauth_cmd_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmware_vgauth_cmd-main.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -vmware_vgauth_cmd-main.o: main.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_vgauth_cmd-main.o -MD -MP -MF $(DEPDIR)/vmware_vgauth_cmd-main.Tpo -c -o vmware_vgauth_cmd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_vgauth_cmd-main.Tpo $(DEPDIR)/vmware_vgauth_cmd-main.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='vmware_vgauth_cmd-main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_vgauth_cmd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c - -vmware_vgauth_cmd-main.obj: main.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vmware_vgauth_cmd-main.obj -MD -MP -MF $(DEPDIR)/vmware_vgauth_cmd-main.Tpo -c -o vmware_vgauth_cmd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vmware_vgauth_cmd-main.Tpo $(DEPDIR)/vmware_vgauth_cmd-main.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='vmware_vgauth_cmd-main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vmware_vgauth_cmd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vmware_vgauth_cmd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-data-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS - - -# Message catalogs. -install-data-hook: - @INSTVMSG@ vmware-vgauth-cmd $(srcdir)/l10n $(DESTDIR)$(datadir) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vgauth/cli/l10n/de.vmsg b/open-vm-tools/vgauth/cli/l10n/de.vmsg index 637f5ca0f..0650a715a 100644 --- a/open-vm-tools/vgauth/cli/l10n/de.vmsg +++ b/open-vm-tools/vgauth/cli/l10n/de.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/cli/l10n/en.vmsg b/open-vm-tools/vgauth/cli/l10n/en.vmsg index 320b5cf2a..e826a064e 100644 --- a/open-vm-tools/vgauth/cli/l10n/en.vmsg +++ b/open-vm-tools/vgauth/cli/l10n/en.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/cli/l10n/es.vmsg b/open-vm-tools/vgauth/cli/l10n/es.vmsg index df21665c0..3f0cc38c3 100644 --- a/open-vm-tools/vgauth/cli/l10n/es.vmsg +++ b/open-vm-tools/vgauth/cli/l10n/es.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/cli/l10n/fr.vmsg b/open-vm-tools/vgauth/cli/l10n/fr.vmsg index d7e6d82aa..650e7214b 100644 --- a/open-vm-tools/vgauth/cli/l10n/fr.vmsg +++ b/open-vm-tools/vgauth/cli/l10n/fr.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/cli/l10n/it.vmsg b/open-vm-tools/vgauth/cli/l10n/it.vmsg index 014f83342..954d73902 100644 --- a/open-vm-tools/vgauth/cli/l10n/it.vmsg +++ b/open-vm-tools/vgauth/cli/l10n/it.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/cli/l10n/ja.vmsg b/open-vm-tools/vgauth/cli/l10n/ja.vmsg index 21b312508..b19198856 100644 --- a/open-vm-tools/vgauth/cli/l10n/ja.vmsg +++ b/open-vm-tools/vgauth/cli/l10n/ja.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/cli/l10n/ko.vmsg b/open-vm-tools/vgauth/cli/l10n/ko.vmsg index 676625486..5f3ddbd53 100644 --- a/open-vm-tools/vgauth/cli/l10n/ko.vmsg +++ b/open-vm-tools/vgauth/cli/l10n/ko.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/cli/l10n/zh_CN.vmsg b/open-vm-tools/vgauth/cli/l10n/zh_CN.vmsg index bf161d3d6..8d1ec96a0 100644 --- a/open-vm-tools/vgauth/cli/l10n/zh_CN.vmsg +++ b/open-vm-tools/vgauth/cli/l10n/zh_CN.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/cli/l10n/zh_TW.vmsg b/open-vm-tools/vgauth/cli/l10n/zh_TW.vmsg index 5e48d625b..9319ba543 100644 --- a/open-vm-tools/vgauth/cli/l10n/zh_TW.vmsg +++ b/open-vm-tools/vgauth/cli/l10n/zh_TW.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/cli/main.c b/open-vm-tools/vgauth/cli/main.c index 1efa658ad..7209e95c3 100644 --- a/open-vm-tools/vgauth/cli/main.c +++ b/open-vm-tools/vgauth/cli/main.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -394,6 +394,12 @@ CliListMapped(VGAuthContext *ctx) ****************************************************************************** */ +#ifdef _WIN32 +#define use_glib_parser 0 +#else +#define use_glib_parser 1 +#endif + static int mainRun(int argc, char *argv[]) @@ -415,7 +421,12 @@ mainRun(int argc, const gchar *lSubject = SU_(cmdline.summary.subject, "subject"); const gchar *lPEMfile = SU_(cmdline.summary.pemfile, "PEM-file"); const gchar *lComm = SU_(cmdline.summary.comm, "comment"); +#if (use_glib_parser == 0) + int i; + GOptionEntry *cmdOptions; +#else GError *gErr = NULL; +#endif PrefHandle prefs; gchar *msgCatalog = NULL; GOptionEntry listOptions[] = { @@ -450,7 +461,7 @@ mainRun(int argc, { "global", 'g', 0, G_OPTION_ARG_NONE, &addMapped, SU_(addoptions.global, "Add the certificate to the global mapping file"), NULL }, - { "comment", 'a', 0, G_OPTION_ARG_STRING, &comment, + { "comment", 'c', 0, G_OPTION_ARG_STRING, &comment, SU_(addoptions.comment, "subject comment"), NULL}, { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, SU_(addoptions.verbose, "Verbose operation"), NULL }, @@ -512,43 +523,104 @@ mainRun(int argc, if (strcmp(argvCopy[1], "add") == 0) { doAdd = TRUE; g_option_context_add_main_entries(context, addOptions, NULL); +#if (use_glib_parser == 0) + cmdOptions = addOptions; +#endif } else if (strcmp(argvCopy[1], "remove") == 0) { doRemove = TRUE; g_option_context_add_main_entries(context, removeOptions, NULL); +#if (use_glib_parser == 0) + cmdOptions = removeOptions; +#endif } else if (strcmp(argvCopy[1], "list") == 0) { doList = TRUE; g_option_context_add_main_entries(context, listOptions, NULL); +#if (use_glib_parser == 0) + cmdOptions = listOptions; +#endif } else { Usage(context); } +#if (use_glib_parser == 0) /* - * Pull out the options. + * In Windows, g_option_context_parse() does the wrong thing for locale + * conversion of the incoming Unicode cmdline. Modern glib (2.40 or + * later) solves this with g_option_context_parse_strv(), but we're stuck + * with an older glib for now. + * + * So instead lets do it all by hand. + * + * This does almost everything for the two types of options this code + * cares about. It doesn't handle multiple + * short options behind a single dash, or '--' alone meaning + * to stop parsing. + * + * XXX fix this when we upgrade glib. */ -#ifdef _WIN32 - { - char * val = getenv("CHARSET"); - char *saved = g_strdup_printf("CHARSET=%s", val ? val : ""); - - /* - * Force the glib parser to interpret the input as the UTF-8 - * Otherwise, glib treat the input encoding as the current code page, - * e.g. 1252 - */ - _putenv("CHARSET=UTF-8"); -#endif - - if (!g_option_context_parse(context, &argcCopy, &argvCopy, &gErr)) { - g_printerr("%s: %s: %s\n", appName, - SU_(cmdline.parse, "Command line parsing failed"), - gErr->message); - g_error_free(gErr); - exit(-1); + for (i = 2; i < argc; i++) { + GOptionEntry *e; + gboolean match = FALSE; + + e = &cmdOptions[0]; + while (e && e->long_name) { + gsize len; + char longName[32]; + char shortName[3]; + + g_snprintf(longName, sizeof(longName), "--%s", e->long_name); + g_snprintf(shortName, sizeof(shortName), "-%c", e->short_name); + len = strlen(longName); + + // short options don't support '=' + if (strcmp(shortName, argv[i]) == 0) { + if (e->arg == G_OPTION_ARG_STRING) { + if (argv[i+1]) { + *(gchar **) e->arg_data = argv[++i]; + match = TRUE; + } else { + Usage(context); + } + } else if (e->arg == G_OPTION_ARG_NONE) { + *(gboolean *) e->arg_data = TRUE; + match = TRUE; + } + } else if (strncmp(longName, argv[i], len) == 0 && + (argv[i][len] == '=' || argv[i][len] == '\0')) { + gchar *val = NULL; + + if (e->arg == G_OPTION_ARG_STRING) { + if (argv[i][len] == '=') { + val = (gchar *) &(argv[i][len+1]); + } else if (argv[i+1]) { + val = argv[++i]; + } + *(gchar **) e->arg_data = val; + match = TRUE; + } else if ((e->arg == G_OPTION_ARG_NONE) && argv[i][len] == '\0') { + *(gboolean *) e->arg_data = TRUE; + match = TRUE; + } else { + Usage(context); + } + } + if (match) { + goto next; + } + e++; } - -#ifdef _WIN32 - _putenv("CHARSET="); - g_free(saved); +next: + if (!match) { + Usage(context); + } + } +#else + if (!g_option_context_parse(context, &argcCopy, &argvCopy, &gErr)) { + g_printerr("%s: %s: %s\n", appName, + SU_(cmdline.parse, "Command line parsing failed"), + gErr->message); + g_error_free(gErr); + exit(-1); } #endif diff --git a/open-vm-tools/vgauth/common/VGAuthBasicDefs.h b/open-vm-tools/vgauth/common/VGAuthBasicDefs.h index ef4ce85fe..abdc0cd4c 100644 --- a/open-vm-tools/vgauth/common/VGAuthBasicDefs.h +++ b/open-vm-tools/vgauth/common/VGAuthBasicDefs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/VGAuthLog.c b/open-vm-tools/vgauth/common/VGAuthLog.c index 00e1d9528..fb4261efc 100644 --- a/open-vm-tools/vgauth/common/VGAuthLog.c +++ b/open-vm-tools/vgauth/common/VGAuthLog.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/VGAuthLog.h b/open-vm-tools/vgauth/common/VGAuthLog.h index 247f00ff4..ee30f6050 100644 --- a/open-vm-tools/vgauth/common/VGAuthLog.h +++ b/open-vm-tools/vgauth/common/VGAuthLog.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/VGAuthProto.h b/open-vm-tools/vgauth/common/VGAuthProto.h index 3a054260f..0d7e125f1 100644 --- a/open-vm-tools/vgauth/common/VGAuthProto.h +++ b/open-vm-tools/vgauth/common/VGAuthProto.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/VGAuthUtil.c b/open-vm-tools/vgauth/common/VGAuthUtil.c index b4d132bb2..76383c462 100644 --- a/open-vm-tools/vgauth/common/VGAuthUtil.c +++ b/open-vm-tools/vgauth/common/VGAuthUtil.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/VGAuthUtil.h b/open-vm-tools/vgauth/common/VGAuthUtil.h index 72cbd67de..f7f3aa216 100644 --- a/open-vm-tools/vgauth/common/VGAuthUtil.h +++ b/open-vm-tools/vgauth/common/VGAuthUtil.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/audit.c b/open-vm-tools/vgauth/common/audit.c index d394f10d0..89ebd9994 100644 --- a/open-vm-tools/vgauth/common/audit.c +++ b/open-vm-tools/vgauth/common/audit.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/audit.h b/open-vm-tools/vgauth/common/audit.h index 7ba46f202..54294b604 100644 --- a/open-vm-tools/vgauth/common/audit.h +++ b/open-vm-tools/vgauth/common/audit.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/certverify.c b/open-vm-tools/vgauth/common/certverify.c index b4507de24..14ff11a7a 100644 --- a/open-vm-tools/vgauth/common/certverify.c +++ b/open-vm-tools/vgauth/common/certverify.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -156,6 +156,8 @@ VerifyCallback(int ok, switch (certErr) { // self-signed is ok case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: + case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: + g_debug("%s: allowing error %d\n", __FUNCTION__, certErr); ret = 1; break; default: @@ -827,11 +829,15 @@ CertVerify_CheckSignature(VGAuthHashAlg hash, const unsigned char *signature) { VGAuthError err = VGAUTH_E_FAIL; - EVP_MD_CTX mdCtx; + EVP_MD_CTX *mdCtx = NULL; const EVP_MD *hashAlg; int ret; - EVP_MD_CTX_init(&mdCtx); + mdCtx = EVP_MD_CTX_new(); + if (mdCtx == NULL) { + g_warning("%s: unable to allocate a message digest.\n", __FUNCTION__); + return(VGAUTH_E_OUT_OF_MEMORY); + } switch (hash) { case VGAUTH_HASH_ALG_SHA256: @@ -843,7 +849,7 @@ CertVerify_CheckSignature(VGAuthHashAlg hash, goto done; } - ret = EVP_VerifyInit(&mdCtx, hashAlg); + ret = EVP_VerifyInit(mdCtx, hashAlg); if (ret <= 0) { VerifyDumpSSLErrors(); g_warning("%s: unable to initialize verificatation context (ret = %d)\n", @@ -856,7 +862,7 @@ CertVerify_CheckSignature(VGAuthHashAlg hash, * one shot. We probably should put some upper bound on the size of the * data. */ - ret = EVP_VerifyUpdate(&mdCtx, data, dataLen); + ret = EVP_VerifyUpdate(mdCtx, data, dataLen); if (ret <= 0) { VerifyDumpSSLErrors(); g_warning("%s: unable to update verificatation context (ret = %d)\n", @@ -864,7 +870,7 @@ CertVerify_CheckSignature(VGAuthHashAlg hash, goto done; } - ret = EVP_VerifyFinal(&mdCtx, signature, (unsigned int) signatureLen, publicKey); + ret = EVP_VerifyFinal(mdCtx, signature, (unsigned int) signatureLen, publicKey); if (0 == ret) { g_debug("%s: verification failed!\n", __FUNCTION__); err = VGAUTH_E_AUTHENTICATION_DENIED; @@ -879,7 +885,7 @@ CertVerify_CheckSignature(VGAuthHashAlg hash, err = VGAUTH_E_OK; done: - EVP_MD_CTX_cleanup(&mdCtx); + EVP_MD_CTX_free(mdCtx); return err; } diff --git a/open-vm-tools/vgauth/common/certverify.h b/open-vm-tools/vgauth/common/certverify.h index 3931d8570..3fe1bcb4e 100644 --- a/open-vm-tools/vgauth/common/certverify.h +++ b/open-vm-tools/vgauth/common/certverify.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -28,6 +28,18 @@ #include #include "VGAuthAuthentication.h" +/* new API from OpenSSL 1.1.0 + * https://www.openssl.org/docs/manmaster/crypto/EVP_DigestInit.html + * + * EVP_MD_CTX_create() and EVP_MD_CTX_destroy() were renamed to + * EVP_MD_CTX_new() and EVP_MD_CTX_free() in OpenSSL 1.1. + */ +#if OPENSSL_VERSION_NUMBER < 0x10100000L +#define EVP_MD_CTX_new() EVP_MD_CTX_create() +#define EVP_MD_CTX_free(x) EVP_MD_CTX_destroy((x)) +#endif /* OpenSSL version < 1.1.0 */ + + /* * XXX Do we still need this? What other algorithms do SAML tokens use? */ @@ -58,4 +70,6 @@ gchar * CertVerify_StripPEMCert(const gchar *pemCert); gchar * CertVerify_CertToX509String(const gchar *pemCert); +gchar * CertVerify_EncodePEMForSSL(const gchar *pemCert); + #endif // _CERTVERIFY_H_ diff --git a/open-vm-tools/vgauth/common/createToken.h b/open-vm-tools/vgauth/common/createToken.h index 21001aafc..a62b32bad 100644 --- a/open-vm-tools/vgauth/common/createToken.h +++ b/open-vm-tools/vgauth/common/createToken.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/i18n.c b/open-vm-tools/vgauth/common/i18n.c index 1f7450ea4..4454f48ae 100644 --- a/open-vm-tools/vgauth/common/i18n.c +++ b/open-vm-tools/vgauth/common/i18n.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/i18n.h b/open-vm-tools/vgauth/common/i18n.h index 9babb2e4d..8e0345b90 100644 --- a/open-vm-tools/vgauth/common/i18n.h +++ b/open-vm-tools/vgauth/common/i18n.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/prefs.c b/open-vm-tools/vgauth/common/prefs.c index f7f47da6b..b269b8e44 100644 --- a/open-vm-tools/vgauth/common/prefs.c +++ b/open-vm-tools/vgauth/common/prefs.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/prefs.h b/open-vm-tools/vgauth/common/prefs.h index 5523e5f87..09b97aea9 100644 --- a/open-vm-tools/vgauth/common/prefs.h +++ b/open-vm-tools/vgauth/common/prefs.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/s4u2self.h b/open-vm-tools/vgauth/common/s4u2self.h index e67991b06..ba2c8a987 100644 --- a/open-vm-tools/vgauth/common/s4u2self.h +++ b/open-vm-tools/vgauth/common/s4u2self.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/serviceUser.h b/open-vm-tools/vgauth/common/serviceUser.h index 28d072332..ae2f2f1f5 100644 --- a/open-vm-tools/vgauth/common/serviceUser.h +++ b/open-vm-tools/vgauth/common/serviceUser.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/usercheck.c b/open-vm-tools/vgauth/common/usercheck.c index 0ddccd50f..185a60778 100644 --- a/open-vm-tools/vgauth/common/usercheck.c +++ b/open-vm-tools/vgauth/common/usercheck.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/common/usercheck.h b/open-vm-tools/vgauth/common/usercheck.h index e357650cf..e232cdeaa 100644 --- a/open-vm-tools/vgauth/common/usercheck.h +++ b/open-vm-tools/vgauth/common/usercheck.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/Makefile.am b/open-vm-tools/vgauth/lib/Makefile.am index a2dee36a7..bce97aacb 100644 --- a/open-vm-tools/vgauth/lib/Makefile.am +++ b/open-vm-tools/vgauth/lib/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2014-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/vgauth/lib/Makefile.in b/open-vm-tools/vgauth/lib/Makefile.in deleted file mode 100644 index 94afbb92b..000000000 --- a/open-vm-tools/vgauth/lib/Makefile.in +++ /dev/null @@ -1,727 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = vgauth/lib -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libvgauth_la_DEPENDENCIES = -am_libvgauth_la_OBJECTS = libvgauth_la-alias.lo libvgauth_la-auth.lo \ - libvgauth_la-authPosix.lo libvgauth_la-comm.lo \ - libvgauth_la-common.lo libvgauth_la-errortext.lo \ - libvgauth_la-impersonate.lo libvgauth_la-impersonateLinux.lo \ - libvgauth_la-netPosix.lo libvgauth_la-proto.lo \ - libvgauth_la-audit.lo libvgauth_la-certverify.lo \ - libvgauth_la-i18n.lo libvgauth_la-prefs.lo \ - libvgauth_la-usercheck.lo libvgauth_la-VGAuthLog.lo \ - libvgauth_la-VGAuthUtil.lo -libvgauth_la_OBJECTS = $(am_libvgauth_la_OBJECTS) -libvgauth_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libvgauth_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libvgauth_la_SOURCES) -DIST_SOURCES = $(libvgauth_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libvgauth.la -libvgauth_la_LIBADD = @VGAUTH_LIBADD@ @GLIB2_LIBS@ @GTHREAD_LIBS@ \ - @VMTOOLS_LIBS@ @SSL_LIBS@ -lssl -lcrypto -libvgauth_la_SOURCES = alias.c auth.c authPosix.c comm.c common.c \ - errortext.c impersonate.c impersonateLinux.c netPosix.c \ - proto.c ../common/audit.c ../common/certverify.c \ - ../common/i18n.c ../common/prefs.c ../common/usercheck.c \ - ../common/VGAuthLog.c ../common/VGAuthUtil.c -libvgauth_la_CPPFLAGS = @GLIB2_CPPFLAGS@ -DG_LOG_DOMAIN=\"VCGA\" \ - @PAM_CPPFLAGS@ @SSL_CPPFLAGS@ -I$(top_srcdir)/libvmtools \ - -I$(top_srcdir)/vgauth/public -I$(top_srcdir)/vgauth/common -# We require GCC, so we're fine passing compiler-specific flags. -# Needed for OS's that don't link shared libraries against libc by -#default, e.g. FreeBSD -libvgauth_la_LDFLAGS = -Wl,-z,defs -Wl,-lc -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vgauth/lib/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vgauth/lib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libvgauth.la: $(libvgauth_la_OBJECTS) $(libvgauth_la_DEPENDENCIES) - $(libvgauth_la_LINK) -rpath $(libdir) $(libvgauth_la_OBJECTS) $(libvgauth_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-VGAuthLog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-VGAuthUtil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-alias.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-audit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-auth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-authPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-certverify.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-comm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-common.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-errortext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-i18n.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-impersonate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-impersonateLinux.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-netPosix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-prefs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-proto.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvgauth_la-usercheck.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libvgauth_la-alias.lo: alias.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-alias.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-alias.Tpo -c -o libvgauth_la-alias.lo `test -f 'alias.c' || echo '$(srcdir)/'`alias.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-alias.Tpo $(DEPDIR)/libvgauth_la-alias.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='alias.c' object='libvgauth_la-alias.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-alias.lo `test -f 'alias.c' || echo '$(srcdir)/'`alias.c - -libvgauth_la-auth.lo: auth.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-auth.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-auth.Tpo -c -o libvgauth_la-auth.lo `test -f 'auth.c' || echo '$(srcdir)/'`auth.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-auth.Tpo $(DEPDIR)/libvgauth_la-auth.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='auth.c' object='libvgauth_la-auth.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-auth.lo `test -f 'auth.c' || echo '$(srcdir)/'`auth.c - -libvgauth_la-authPosix.lo: authPosix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-authPosix.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-authPosix.Tpo -c -o libvgauth_la-authPosix.lo `test -f 'authPosix.c' || echo '$(srcdir)/'`authPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-authPosix.Tpo $(DEPDIR)/libvgauth_la-authPosix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='authPosix.c' object='libvgauth_la-authPosix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-authPosix.lo `test -f 'authPosix.c' || echo '$(srcdir)/'`authPosix.c - -libvgauth_la-comm.lo: comm.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-comm.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-comm.Tpo -c -o libvgauth_la-comm.lo `test -f 'comm.c' || echo '$(srcdir)/'`comm.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-comm.Tpo $(DEPDIR)/libvgauth_la-comm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='comm.c' object='libvgauth_la-comm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-comm.lo `test -f 'comm.c' || echo '$(srcdir)/'`comm.c - -libvgauth_la-common.lo: common.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-common.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-common.Tpo -c -o libvgauth_la-common.lo `test -f 'common.c' || echo '$(srcdir)/'`common.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-common.Tpo $(DEPDIR)/libvgauth_la-common.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='common.c' object='libvgauth_la-common.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-common.lo `test -f 'common.c' || echo '$(srcdir)/'`common.c - -libvgauth_la-errortext.lo: errortext.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-errortext.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-errortext.Tpo -c -o libvgauth_la-errortext.lo `test -f 'errortext.c' || echo '$(srcdir)/'`errortext.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-errortext.Tpo $(DEPDIR)/libvgauth_la-errortext.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='errortext.c' object='libvgauth_la-errortext.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-errortext.lo `test -f 'errortext.c' || echo '$(srcdir)/'`errortext.c - -libvgauth_la-impersonate.lo: impersonate.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-impersonate.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-impersonate.Tpo -c -o libvgauth_la-impersonate.lo `test -f 'impersonate.c' || echo '$(srcdir)/'`impersonate.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-impersonate.Tpo $(DEPDIR)/libvgauth_la-impersonate.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='impersonate.c' object='libvgauth_la-impersonate.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-impersonate.lo `test -f 'impersonate.c' || echo '$(srcdir)/'`impersonate.c - -libvgauth_la-impersonateLinux.lo: impersonateLinux.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-impersonateLinux.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-impersonateLinux.Tpo -c -o libvgauth_la-impersonateLinux.lo `test -f 'impersonateLinux.c' || echo '$(srcdir)/'`impersonateLinux.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-impersonateLinux.Tpo $(DEPDIR)/libvgauth_la-impersonateLinux.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='impersonateLinux.c' object='libvgauth_la-impersonateLinux.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-impersonateLinux.lo `test -f 'impersonateLinux.c' || echo '$(srcdir)/'`impersonateLinux.c - -libvgauth_la-netPosix.lo: netPosix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-netPosix.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-netPosix.Tpo -c -o libvgauth_la-netPosix.lo `test -f 'netPosix.c' || echo '$(srcdir)/'`netPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-netPosix.Tpo $(DEPDIR)/libvgauth_la-netPosix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='netPosix.c' object='libvgauth_la-netPosix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-netPosix.lo `test -f 'netPosix.c' || echo '$(srcdir)/'`netPosix.c - -libvgauth_la-proto.lo: proto.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-proto.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-proto.Tpo -c -o libvgauth_la-proto.lo `test -f 'proto.c' || echo '$(srcdir)/'`proto.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-proto.Tpo $(DEPDIR)/libvgauth_la-proto.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='proto.c' object='libvgauth_la-proto.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-proto.lo `test -f 'proto.c' || echo '$(srcdir)/'`proto.c - -libvgauth_la-audit.lo: ../common/audit.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-audit.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-audit.Tpo -c -o libvgauth_la-audit.lo `test -f '../common/audit.c' || echo '$(srcdir)/'`../common/audit.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-audit.Tpo $(DEPDIR)/libvgauth_la-audit.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/audit.c' object='libvgauth_la-audit.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-audit.lo `test -f '../common/audit.c' || echo '$(srcdir)/'`../common/audit.c - -libvgauth_la-certverify.lo: ../common/certverify.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-certverify.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-certverify.Tpo -c -o libvgauth_la-certverify.lo `test -f '../common/certverify.c' || echo '$(srcdir)/'`../common/certverify.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-certverify.Tpo $(DEPDIR)/libvgauth_la-certverify.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/certverify.c' object='libvgauth_la-certverify.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-certverify.lo `test -f '../common/certverify.c' || echo '$(srcdir)/'`../common/certverify.c - -libvgauth_la-i18n.lo: ../common/i18n.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-i18n.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-i18n.Tpo -c -o libvgauth_la-i18n.lo `test -f '../common/i18n.c' || echo '$(srcdir)/'`../common/i18n.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-i18n.Tpo $(DEPDIR)/libvgauth_la-i18n.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/i18n.c' object='libvgauth_la-i18n.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-i18n.lo `test -f '../common/i18n.c' || echo '$(srcdir)/'`../common/i18n.c - -libvgauth_la-prefs.lo: ../common/prefs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-prefs.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-prefs.Tpo -c -o libvgauth_la-prefs.lo `test -f '../common/prefs.c' || echo '$(srcdir)/'`../common/prefs.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-prefs.Tpo $(DEPDIR)/libvgauth_la-prefs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/prefs.c' object='libvgauth_la-prefs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-prefs.lo `test -f '../common/prefs.c' || echo '$(srcdir)/'`../common/prefs.c - -libvgauth_la-usercheck.lo: ../common/usercheck.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-usercheck.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-usercheck.Tpo -c -o libvgauth_la-usercheck.lo `test -f '../common/usercheck.c' || echo '$(srcdir)/'`../common/usercheck.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-usercheck.Tpo $(DEPDIR)/libvgauth_la-usercheck.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/usercheck.c' object='libvgauth_la-usercheck.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-usercheck.lo `test -f '../common/usercheck.c' || echo '$(srcdir)/'`../common/usercheck.c - -libvgauth_la-VGAuthLog.lo: ../common/VGAuthLog.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-VGAuthLog.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-VGAuthLog.Tpo -c -o libvgauth_la-VGAuthLog.lo `test -f '../common/VGAuthLog.c' || echo '$(srcdir)/'`../common/VGAuthLog.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-VGAuthLog.Tpo $(DEPDIR)/libvgauth_la-VGAuthLog.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/VGAuthLog.c' object='libvgauth_la-VGAuthLog.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-VGAuthLog.lo `test -f '../common/VGAuthLog.c' || echo '$(srcdir)/'`../common/VGAuthLog.c - -libvgauth_la-VGAuthUtil.lo: ../common/VGAuthUtil.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libvgauth_la-VGAuthUtil.lo -MD -MP -MF $(DEPDIR)/libvgauth_la-VGAuthUtil.Tpo -c -o libvgauth_la-VGAuthUtil.lo `test -f '../common/VGAuthUtil.c' || echo '$(srcdir)/'`../common/VGAuthUtil.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libvgauth_la-VGAuthUtil.Tpo $(DEPDIR)/libvgauth_la-VGAuthUtil.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/VGAuthUtil.c' object='libvgauth_la-VGAuthUtil.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libvgauth_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libvgauth_la-VGAuthUtil.lo `test -f '../common/VGAuthUtil.c' || echo '$(srcdir)/'`../common/VGAuthUtil.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - -.MAKE: install-am install-data-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES - - -# Message catalogs. -install-data-hook: - @INSTVMSG@ libvgauth.la $(srcdir)/l10n $(DESTDIR)$(datadir) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vgauth/lib/VGAuthInt.h b/open-vm-tools/vgauth/lib/VGAuthInt.h index 37b71179c..9bd6499f4 100644 --- a/open-vm-tools/vgauth/lib/VGAuthInt.h +++ b/open-vm-tools/vgauth/lib/VGAuthInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/alias.c b/open-vm-tools/vgauth/lib/alias.c index 229d2949b..c4860b244 100644 --- a/open-vm-tools/vgauth/lib/alias.c +++ b/open-vm-tools/vgauth/lib/alias.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/auth.c b/open-vm-tools/vgauth/lib/auth.c index 88a497319..3eede1a03 100644 --- a/open-vm-tools/vgauth/lib/auth.c +++ b/open-vm-tools/vgauth/lib/auth.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/authPosix.c b/open-vm-tools/vgauth/lib/authPosix.c index 52f98e177..c77c14f0c 100644 --- a/open-vm-tools/vgauth/lib/authPosix.c +++ b/open-vm-tools/vgauth/lib/authPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/comm.c b/open-vm-tools/vgauth/lib/comm.c index d87f7b389..6055c569b 100644 --- a/open-vm-tools/vgauth/lib/comm.c +++ b/open-vm-tools/vgauth/lib/comm.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/common.c b/open-vm-tools/vgauth/lib/common.c index 15ef92e36..96dc2311a 100644 --- a/open-vm-tools/vgauth/lib/common.c +++ b/open-vm-tools/vgauth/lib/common.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/errortext.c b/open-vm-tools/vgauth/lib/errortext.c index cac80cdf2..da22269dd 100644 --- a/open-vm-tools/vgauth/lib/errortext.c +++ b/open-vm-tools/vgauth/lib/errortext.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/impersonate.c b/open-vm-tools/vgauth/lib/impersonate.c index 0dfa5ed32..e07fd8c45 100644 --- a/open-vm-tools/vgauth/lib/impersonate.c +++ b/open-vm-tools/vgauth/lib/impersonate.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -296,7 +296,8 @@ VGAuth_UserHandleFree(VGAuthUserHandle *handle) g_free(handle->userName); - if (handle->details.type == VGAUTH_AUTH_TYPE_SAML) { + if (handle->details.type == VGAUTH_AUTH_TYPE_SAML || + handle->details.type == VGAUTH_AUTH_TYPE_SAML_INFO_ONLY) { g_free(handle->details.val.samlData.subject); VGAuth_FreeAliasInfoContents(&(handle->details.val.samlData.aliasInfo)); } diff --git a/open-vm-tools/vgauth/lib/impersonateLinux.c b/open-vm-tools/vgauth/lib/impersonateLinux.c index 471b3a779..1556bd28e 100644 --- a/open-vm-tools/vgauth/lib/impersonateLinux.c +++ b/open-vm-tools/vgauth/lib/impersonateLinux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/l10n/de.vmsg b/open-vm-tools/vgauth/lib/l10n/de.vmsg index c712d31e2..47a47d355 100644 --- a/open-vm-tools/vgauth/lib/l10n/de.vmsg +++ b/open-vm-tools/vgauth/lib/l10n/de.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/l10n/en.vmsg b/open-vm-tools/vgauth/lib/l10n/en.vmsg index bfa381d8f..551ed3769 100644 --- a/open-vm-tools/vgauth/lib/l10n/en.vmsg +++ b/open-vm-tools/vgauth/lib/l10n/en.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/l10n/es.vmsg b/open-vm-tools/vgauth/lib/l10n/es.vmsg index f1a95d4dd..590b2d1e4 100644 --- a/open-vm-tools/vgauth/lib/l10n/es.vmsg +++ b/open-vm-tools/vgauth/lib/l10n/es.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/l10n/fr.vmsg b/open-vm-tools/vgauth/lib/l10n/fr.vmsg index a2364a19e..252617004 100644 --- a/open-vm-tools/vgauth/lib/l10n/fr.vmsg +++ b/open-vm-tools/vgauth/lib/l10n/fr.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/l10n/it.vmsg b/open-vm-tools/vgauth/lib/l10n/it.vmsg index 0cdc1b458..27487e63b 100644 --- a/open-vm-tools/vgauth/lib/l10n/it.vmsg +++ b/open-vm-tools/vgauth/lib/l10n/it.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/l10n/ja.vmsg b/open-vm-tools/vgauth/lib/l10n/ja.vmsg index a5c74ea3b..8e9d991f3 100644 --- a/open-vm-tools/vgauth/lib/l10n/ja.vmsg +++ b/open-vm-tools/vgauth/lib/l10n/ja.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/l10n/ko.vmsg b/open-vm-tools/vgauth/lib/l10n/ko.vmsg index f1d1c2946..29113db5d 100644 --- a/open-vm-tools/vgauth/lib/l10n/ko.vmsg +++ b/open-vm-tools/vgauth/lib/l10n/ko.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/l10n/zh_CN.vmsg b/open-vm-tools/vgauth/lib/l10n/zh_CN.vmsg index d6db6d5a8..e777208bf 100644 --- a/open-vm-tools/vgauth/lib/l10n/zh_CN.vmsg +++ b/open-vm-tools/vgauth/lib/l10n/zh_CN.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/l10n/zh_TW.vmsg b/open-vm-tools/vgauth/lib/l10n/zh_TW.vmsg index 1f9e4dc97..b78b4816e 100644 --- a/open-vm-tools/vgauth/lib/l10n/zh_TW.vmsg +++ b/open-vm-tools/vgauth/lib/l10n/zh_TW.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/netPosix.c b/open-vm-tools/vgauth/lib/netPosix.c index 8876b6604..8f0f0670e 100644 --- a/open-vm-tools/vgauth/lib/netPosix.c +++ b/open-vm-tools/vgauth/lib/netPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/lib/proto.c b/open-vm-tools/vgauth/lib/proto.c index 0c13d30d9..b5cbfeb33 100644 --- a/open-vm-tools/vgauth/lib/proto.c +++ b/open-vm-tools/vgauth/lib/proto.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/public/VGAuthAlias.h b/open-vm-tools/vgauth/public/VGAuthAlias.h index ad8b18ce6..66d601a8e 100644 --- a/open-vm-tools/vgauth/public/VGAuthAlias.h +++ b/open-vm-tools/vgauth/public/VGAuthAlias.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2012-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/public/VGAuthAuthentication.h b/open-vm-tools/vgauth/public/VGAuthAuthentication.h index d72a26dd0..97a21de33 100644 --- a/open-vm-tools/vgauth/public/VGAuthAuthentication.h +++ b/open-vm-tools/vgauth/public/VGAuthAuthentication.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/public/VGAuthCommon.h b/open-vm-tools/vgauth/public/VGAuthCommon.h index 420e2086c..12d243936 100644 --- a/open-vm-tools/vgauth/public/VGAuthCommon.h +++ b/open-vm-tools/vgauth/public/VGAuthCommon.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/public/VGAuthError.h b/open-vm-tools/vgauth/public/VGAuthError.h index 7ce59fce3..f15f7864f 100644 --- a/open-vm-tools/vgauth/public/VGAuthError.h +++ b/open-vm-tools/vgauth/public/VGAuthError.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/public/VGAuthIdProvider.h b/open-vm-tools/vgauth/public/VGAuthIdProvider.h index 86486eb8d..8f25de2df 100644 --- a/open-vm-tools/vgauth/public/VGAuthIdProvider.h +++ b/open-vm-tools/vgauth/public/VGAuthIdProvider.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/Makefile.am b/open-vm-tools/vgauth/service/Makefile.am index 975020613..8c51d9f2a 100644 --- a/open-vm-tools/vgauth/service/Makefile.am +++ b/open-vm-tools/vgauth/service/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2014-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -30,11 +30,23 @@ VGAuthService_SOURCES += ../serviceImpl/filePosix.c VGAuthService_SOURCES += ../serviceImpl/netPosix.c VGAuthService_SOURCES += ../serviceImpl/proto.c VGAuthService_SOURCES += ../serviceImpl/random.c -VGAuthService_SOURCES += ../serviceImpl/saml.cpp +if USE_XMLSEC1 +VGAuthService_SOURCES += ../serviceImpl/saml-xmlsec1.c +else +VGAuthService_SOURCES += ../serviceImpl/saml-xml-security-c.cpp +endif VGAuthService_SOURCES += ../serviceImpl/service.c VGAuthService_SOURCES += ../serviceImpl/ticket.c VGAuthService_SOURCES += ../serviceImpl/verify.c +VGAuthService_SOURCES += ../common/audit.c +VGAuthService_SOURCES += ../common/certverify.c +VGAuthService_SOURCES += ../common/i18n.c +VGAuthService_SOURCES += ../common/prefs.c +VGAuthService_SOURCES += ../common/usercheck.c +VGAuthService_SOURCES += ../common/VGAuthLog.c +VGAuthService_SOURCES += ../common/VGAuthUtil.c + VGAuthServicedir = /etc/vmware-tools/vgauth/schemas VGAuthService_SCRIPTS = VGAuthService_SCRIPTS += ../serviceImpl/schemas/datatypes.dtd @@ -46,28 +58,33 @@ VGAuthService_SCRIPTS += ../serviceImpl/schemas/XMLSchema-hasFacetAndProperty.xs VGAuthService_SCRIPTS += ../serviceImpl/schemas/XMLSchema-instance.xsd VGAuthService_SCRIPTS += ../serviceImpl/schemas/XMLSchema.xsd VGAuthService_SCRIPTS += ../serviceImpl/schemas/xml.xsd +VGAuthService_SCRIPTS += ../serviceImpl/schemas/catalog.xml VGAuthService_CPPFLAGS = -VGAuthService_CPPFLAGS += -DVMTOOLS_USE_GLIB VGAuthService_CPPFLAGS += @GLIB2_CPPFLAGS@ +if USE_XMLSEC1 +VGAuthService_CPPFLAGS += @XMLSEC1_CPPFLAGS@ +else VGAuthService_CPPFLAGS += @XERCES_CPPFLAGS@ VGAuthService_CPPFLAGS += @XMLSECURITY_CPPFLAGS@ +endif VGAuthService_CPPFLAGS += @SSL_CPPFLAGS@ -VGAuthService_CPPFLAGS += -I$(top_srcdir)/libvmtools VGAuthService_CPPFLAGS += -I$(top_srcdir)/vgauth/public VGAuthService_CPPFLAGS += -I$(top_srcdir)/vgauth/common VGAuthService_CPPFLAGS += -I$(top_srcdir)/vgauth/serviceImpl VGAuthService_LDADD = -VGAuthService_LDADD += @VMTOOLS_LIBS@ VGAuthService_LDADD += @GLIB2_LIBS@ VGAuthService_LDADD += @GTHREAD_LIBS@ -VGAuthService_LDADD += ../lib/libvgauth.la +if USE_XMLSEC1 +VGAuthService_LDADD += @XMLSEC1_LIBS@ +else VGAuthService_LDADD += @XERCES_LIBS@ VGAuthService_LDADD += @XMLSECURITY_LIBS@ -VGAuthService_LDADD += @SSL_LIBS@ VGAuthService_LDADD += -lxerces-c VGAuthService_LDADD += -lxml-security-c +endif +VGAuthService_LDADD += @SSL_LIBS@ VGAuthService_LDADD += -lssl VGAuthService_LDADD += -lcrypto diff --git a/open-vm-tools/vgauth/service/Makefile.in b/open-vm-tools/vgauth/service/Makefile.in deleted file mode 100644 index 257f18b0a..000000000 --- a/open-vm-tools/vgauth/service/Makefile.in +++ /dev/null @@ -1,900 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2014-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = VGAuthService$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = vgauth/service -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(VGAuthServicedir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_VGAuthService_OBJECTS = VGAuthService-main.$(OBJEXT) \ - VGAuthService-fileLogger.$(OBJEXT) VGAuthService-gio.$(OBJEXT) \ - VGAuthService-log.$(OBJEXT) \ - VGAuthService-servicePosix.$(OBJEXT) \ - VGAuthService-signalSource.$(OBJEXT) \ - VGAuthService-alias.$(OBJEXT) VGAuthService-file.$(OBJEXT) \ - VGAuthService-filePosix.$(OBJEXT) \ - VGAuthService-netPosix.$(OBJEXT) VGAuthService-proto.$(OBJEXT) \ - VGAuthService-random.$(OBJEXT) VGAuthService-saml.$(OBJEXT) \ - VGAuthService-service.$(OBJEXT) VGAuthService-ticket.$(OBJEXT) \ - VGAuthService-verify.$(OBJEXT) -VGAuthService_OBJECTS = $(am_VGAuthService_OBJECTS) -am__DEPENDENCIES_1 = -VGAuthService_DEPENDENCIES = ../lib/libvgauth.la $(am__DEPENDENCIES_1) -VGAuthServiceSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(VGAuthService_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(VGAuthService_SOURCES) -DIST_SOURCES = $(VGAuthService_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -VGAuthService_SOURCES = main.c fileLogger.c gio.c log.c servicePosix.c \ - signalSource.c ../serviceImpl/alias.c ../serviceImpl/file.c \ - ../serviceImpl/filePosix.c ../serviceImpl/netPosix.c \ - ../serviceImpl/proto.c ../serviceImpl/random.c \ - ../serviceImpl/saml.cpp ../serviceImpl/service.c \ - ../serviceImpl/ticket.c ../serviceImpl/verify.c -VGAuthServicedir = /etc/vmware-tools/vgauth/schemas -VGAuthService_SCRIPTS = ../serviceImpl/schemas/datatypes.dtd \ - ../serviceImpl/schemas/saml-schema-assertion-2.0.xsd \ - ../serviceImpl/schemas/xenc-schema.xsd \ - ../serviceImpl/schemas/xmldsig-core-schema.xsd \ - ../serviceImpl/schemas/XMLSchema.dtd \ - ../serviceImpl/schemas/XMLSchema-hasFacetAndProperty.xsd \ - ../serviceImpl/schemas/XMLSchema-instance.xsd \ - ../serviceImpl/schemas/XMLSchema.xsd \ - ../serviceImpl/schemas/xml.xsd -VGAuthService_CPPFLAGS = -DVMTOOLS_USE_GLIB @GLIB2_CPPFLAGS@ \ - @XERCES_CPPFLAGS@ @XMLSECURITY_CPPFLAGS@ @SSL_CPPFLAGS@ \ - -I$(top_srcdir)/libvmtools -I$(top_srcdir)/vgauth/public \ - -I$(top_srcdir)/vgauth/common \ - -I$(top_srcdir)/vgauth/serviceImpl -VGAuthService_LDADD = @VMTOOLS_LIBS@ @GLIB2_LIBS@ @GTHREAD_LIBS@ \ - ../lib/libvgauth.la @XERCES_LIBS@ @XMLSECURITY_LIBS@ \ - @SSL_LIBS@ -lxerces-c -lxml-security-c -lssl -lcrypto \ - $(am__append_1) -@HAVE_ICU_FALSE@VGAuthService_LINK = $(LINK) -@HAVE_ICU_TRUE@VGAuthService_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) \ -@HAVE_ICU_TRUE@ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ -@HAVE_ICU_TRUE@ $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vgauth/service/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vgauth/service/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -VGAuthService$(EXEEXT): $(VGAuthService_OBJECTS) $(VGAuthService_DEPENDENCIES) - @rm -f VGAuthService$(EXEEXT) - $(VGAuthService_LINK) $(VGAuthService_OBJECTS) $(VGAuthService_LDADD) $(LIBS) -install-VGAuthServiceSCRIPTS: $(VGAuthService_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(VGAuthServicedir)" || $(MKDIR_P) "$(DESTDIR)$(VGAuthServicedir)" - @list='$(VGAuthService_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(VGAuthServiceSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(VGAuthServicedir)/$$f'"; \ - $(VGAuthServiceSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(VGAuthServicedir)/$$f"; \ - else :; fi; \ - done - -uninstall-VGAuthServiceSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(VGAuthService_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(VGAuthServicedir)/$$f'"; \ - rm -f "$(DESTDIR)$(VGAuthServicedir)/$$f"; \ - done - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-alias.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-fileLogger.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-filePosix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-gio.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-log.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-netPosix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-proto.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-random.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-saml.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-service.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-servicePosix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-signalSource.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-ticket.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VGAuthService-verify.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -VGAuthService-main.o: main.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-main.o -MD -MP -MF $(DEPDIR)/VGAuthService-main.Tpo -c -o VGAuthService-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-main.Tpo $(DEPDIR)/VGAuthService-main.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='VGAuthService-main.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c - -VGAuthService-main.obj: main.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-main.obj -MD -MP -MF $(DEPDIR)/VGAuthService-main.Tpo -c -o VGAuthService-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-main.Tpo $(DEPDIR)/VGAuthService-main.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='VGAuthService-main.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` - -VGAuthService-fileLogger.o: fileLogger.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-fileLogger.o -MD -MP -MF $(DEPDIR)/VGAuthService-fileLogger.Tpo -c -o VGAuthService-fileLogger.o `test -f 'fileLogger.c' || echo '$(srcdir)/'`fileLogger.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-fileLogger.Tpo $(DEPDIR)/VGAuthService-fileLogger.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fileLogger.c' object='VGAuthService-fileLogger.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-fileLogger.o `test -f 'fileLogger.c' || echo '$(srcdir)/'`fileLogger.c - -VGAuthService-fileLogger.obj: fileLogger.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-fileLogger.obj -MD -MP -MF $(DEPDIR)/VGAuthService-fileLogger.Tpo -c -o VGAuthService-fileLogger.obj `if test -f 'fileLogger.c'; then $(CYGPATH_W) 'fileLogger.c'; else $(CYGPATH_W) '$(srcdir)/fileLogger.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-fileLogger.Tpo $(DEPDIR)/VGAuthService-fileLogger.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fileLogger.c' object='VGAuthService-fileLogger.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-fileLogger.obj `if test -f 'fileLogger.c'; then $(CYGPATH_W) 'fileLogger.c'; else $(CYGPATH_W) '$(srcdir)/fileLogger.c'; fi` - -VGAuthService-gio.o: gio.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-gio.o -MD -MP -MF $(DEPDIR)/VGAuthService-gio.Tpo -c -o VGAuthService-gio.o `test -f 'gio.c' || echo '$(srcdir)/'`gio.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-gio.Tpo $(DEPDIR)/VGAuthService-gio.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gio.c' object='VGAuthService-gio.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-gio.o `test -f 'gio.c' || echo '$(srcdir)/'`gio.c - -VGAuthService-gio.obj: gio.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-gio.obj -MD -MP -MF $(DEPDIR)/VGAuthService-gio.Tpo -c -o VGAuthService-gio.obj `if test -f 'gio.c'; then $(CYGPATH_W) 'gio.c'; else $(CYGPATH_W) '$(srcdir)/gio.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-gio.Tpo $(DEPDIR)/VGAuthService-gio.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gio.c' object='VGAuthService-gio.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-gio.obj `if test -f 'gio.c'; then $(CYGPATH_W) 'gio.c'; else $(CYGPATH_W) '$(srcdir)/gio.c'; fi` - -VGAuthService-log.o: log.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-log.o -MD -MP -MF $(DEPDIR)/VGAuthService-log.Tpo -c -o VGAuthService-log.o `test -f 'log.c' || echo '$(srcdir)/'`log.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-log.Tpo $(DEPDIR)/VGAuthService-log.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log.c' object='VGAuthService-log.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-log.o `test -f 'log.c' || echo '$(srcdir)/'`log.c - -VGAuthService-log.obj: log.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-log.obj -MD -MP -MF $(DEPDIR)/VGAuthService-log.Tpo -c -o VGAuthService-log.obj `if test -f 'log.c'; then $(CYGPATH_W) 'log.c'; else $(CYGPATH_W) '$(srcdir)/log.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-log.Tpo $(DEPDIR)/VGAuthService-log.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log.c' object='VGAuthService-log.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-log.obj `if test -f 'log.c'; then $(CYGPATH_W) 'log.c'; else $(CYGPATH_W) '$(srcdir)/log.c'; fi` - -VGAuthService-servicePosix.o: servicePosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-servicePosix.o -MD -MP -MF $(DEPDIR)/VGAuthService-servicePosix.Tpo -c -o VGAuthService-servicePosix.o `test -f 'servicePosix.c' || echo '$(srcdir)/'`servicePosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-servicePosix.Tpo $(DEPDIR)/VGAuthService-servicePosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='servicePosix.c' object='VGAuthService-servicePosix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-servicePosix.o `test -f 'servicePosix.c' || echo '$(srcdir)/'`servicePosix.c - -VGAuthService-servicePosix.obj: servicePosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-servicePosix.obj -MD -MP -MF $(DEPDIR)/VGAuthService-servicePosix.Tpo -c -o VGAuthService-servicePosix.obj `if test -f 'servicePosix.c'; then $(CYGPATH_W) 'servicePosix.c'; else $(CYGPATH_W) '$(srcdir)/servicePosix.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-servicePosix.Tpo $(DEPDIR)/VGAuthService-servicePosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='servicePosix.c' object='VGAuthService-servicePosix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-servicePosix.obj `if test -f 'servicePosix.c'; then $(CYGPATH_W) 'servicePosix.c'; else $(CYGPATH_W) '$(srcdir)/servicePosix.c'; fi` - -VGAuthService-signalSource.o: signalSource.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-signalSource.o -MD -MP -MF $(DEPDIR)/VGAuthService-signalSource.Tpo -c -o VGAuthService-signalSource.o `test -f 'signalSource.c' || echo '$(srcdir)/'`signalSource.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-signalSource.Tpo $(DEPDIR)/VGAuthService-signalSource.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signalSource.c' object='VGAuthService-signalSource.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-signalSource.o `test -f 'signalSource.c' || echo '$(srcdir)/'`signalSource.c - -VGAuthService-signalSource.obj: signalSource.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-signalSource.obj -MD -MP -MF $(DEPDIR)/VGAuthService-signalSource.Tpo -c -o VGAuthService-signalSource.obj `if test -f 'signalSource.c'; then $(CYGPATH_W) 'signalSource.c'; else $(CYGPATH_W) '$(srcdir)/signalSource.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-signalSource.Tpo $(DEPDIR)/VGAuthService-signalSource.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signalSource.c' object='VGAuthService-signalSource.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-signalSource.obj `if test -f 'signalSource.c'; then $(CYGPATH_W) 'signalSource.c'; else $(CYGPATH_W) '$(srcdir)/signalSource.c'; fi` - -VGAuthService-alias.o: ../serviceImpl/alias.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-alias.o -MD -MP -MF $(DEPDIR)/VGAuthService-alias.Tpo -c -o VGAuthService-alias.o `test -f '../serviceImpl/alias.c' || echo '$(srcdir)/'`../serviceImpl/alias.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-alias.Tpo $(DEPDIR)/VGAuthService-alias.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/alias.c' object='VGAuthService-alias.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-alias.o `test -f '../serviceImpl/alias.c' || echo '$(srcdir)/'`../serviceImpl/alias.c - -VGAuthService-alias.obj: ../serviceImpl/alias.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-alias.obj -MD -MP -MF $(DEPDIR)/VGAuthService-alias.Tpo -c -o VGAuthService-alias.obj `if test -f '../serviceImpl/alias.c'; then $(CYGPATH_W) '../serviceImpl/alias.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/alias.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-alias.Tpo $(DEPDIR)/VGAuthService-alias.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/alias.c' object='VGAuthService-alias.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-alias.obj `if test -f '../serviceImpl/alias.c'; then $(CYGPATH_W) '../serviceImpl/alias.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/alias.c'; fi` - -VGAuthService-file.o: ../serviceImpl/file.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-file.o -MD -MP -MF $(DEPDIR)/VGAuthService-file.Tpo -c -o VGAuthService-file.o `test -f '../serviceImpl/file.c' || echo '$(srcdir)/'`../serviceImpl/file.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-file.Tpo $(DEPDIR)/VGAuthService-file.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/file.c' object='VGAuthService-file.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-file.o `test -f '../serviceImpl/file.c' || echo '$(srcdir)/'`../serviceImpl/file.c - -VGAuthService-file.obj: ../serviceImpl/file.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-file.obj -MD -MP -MF $(DEPDIR)/VGAuthService-file.Tpo -c -o VGAuthService-file.obj `if test -f '../serviceImpl/file.c'; then $(CYGPATH_W) '../serviceImpl/file.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/file.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-file.Tpo $(DEPDIR)/VGAuthService-file.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/file.c' object='VGAuthService-file.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-file.obj `if test -f '../serviceImpl/file.c'; then $(CYGPATH_W) '../serviceImpl/file.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/file.c'; fi` - -VGAuthService-filePosix.o: ../serviceImpl/filePosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-filePosix.o -MD -MP -MF $(DEPDIR)/VGAuthService-filePosix.Tpo -c -o VGAuthService-filePosix.o `test -f '../serviceImpl/filePosix.c' || echo '$(srcdir)/'`../serviceImpl/filePosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-filePosix.Tpo $(DEPDIR)/VGAuthService-filePosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/filePosix.c' object='VGAuthService-filePosix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-filePosix.o `test -f '../serviceImpl/filePosix.c' || echo '$(srcdir)/'`../serviceImpl/filePosix.c - -VGAuthService-filePosix.obj: ../serviceImpl/filePosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-filePosix.obj -MD -MP -MF $(DEPDIR)/VGAuthService-filePosix.Tpo -c -o VGAuthService-filePosix.obj `if test -f '../serviceImpl/filePosix.c'; then $(CYGPATH_W) '../serviceImpl/filePosix.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/filePosix.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-filePosix.Tpo $(DEPDIR)/VGAuthService-filePosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/filePosix.c' object='VGAuthService-filePosix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-filePosix.obj `if test -f '../serviceImpl/filePosix.c'; then $(CYGPATH_W) '../serviceImpl/filePosix.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/filePosix.c'; fi` - -VGAuthService-netPosix.o: ../serviceImpl/netPosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-netPosix.o -MD -MP -MF $(DEPDIR)/VGAuthService-netPosix.Tpo -c -o VGAuthService-netPosix.o `test -f '../serviceImpl/netPosix.c' || echo '$(srcdir)/'`../serviceImpl/netPosix.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-netPosix.Tpo $(DEPDIR)/VGAuthService-netPosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/netPosix.c' object='VGAuthService-netPosix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-netPosix.o `test -f '../serviceImpl/netPosix.c' || echo '$(srcdir)/'`../serviceImpl/netPosix.c - -VGAuthService-netPosix.obj: ../serviceImpl/netPosix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-netPosix.obj -MD -MP -MF $(DEPDIR)/VGAuthService-netPosix.Tpo -c -o VGAuthService-netPosix.obj `if test -f '../serviceImpl/netPosix.c'; then $(CYGPATH_W) '../serviceImpl/netPosix.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/netPosix.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-netPosix.Tpo $(DEPDIR)/VGAuthService-netPosix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/netPosix.c' object='VGAuthService-netPosix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-netPosix.obj `if test -f '../serviceImpl/netPosix.c'; then $(CYGPATH_W) '../serviceImpl/netPosix.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/netPosix.c'; fi` - -VGAuthService-proto.o: ../serviceImpl/proto.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-proto.o -MD -MP -MF $(DEPDIR)/VGAuthService-proto.Tpo -c -o VGAuthService-proto.o `test -f '../serviceImpl/proto.c' || echo '$(srcdir)/'`../serviceImpl/proto.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-proto.Tpo $(DEPDIR)/VGAuthService-proto.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/proto.c' object='VGAuthService-proto.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-proto.o `test -f '../serviceImpl/proto.c' || echo '$(srcdir)/'`../serviceImpl/proto.c - -VGAuthService-proto.obj: ../serviceImpl/proto.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-proto.obj -MD -MP -MF $(DEPDIR)/VGAuthService-proto.Tpo -c -o VGAuthService-proto.obj `if test -f '../serviceImpl/proto.c'; then $(CYGPATH_W) '../serviceImpl/proto.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/proto.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-proto.Tpo $(DEPDIR)/VGAuthService-proto.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/proto.c' object='VGAuthService-proto.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-proto.obj `if test -f '../serviceImpl/proto.c'; then $(CYGPATH_W) '../serviceImpl/proto.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/proto.c'; fi` - -VGAuthService-random.o: ../serviceImpl/random.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-random.o -MD -MP -MF $(DEPDIR)/VGAuthService-random.Tpo -c -o VGAuthService-random.o `test -f '../serviceImpl/random.c' || echo '$(srcdir)/'`../serviceImpl/random.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-random.Tpo $(DEPDIR)/VGAuthService-random.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/random.c' object='VGAuthService-random.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-random.o `test -f '../serviceImpl/random.c' || echo '$(srcdir)/'`../serviceImpl/random.c - -VGAuthService-random.obj: ../serviceImpl/random.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-random.obj -MD -MP -MF $(DEPDIR)/VGAuthService-random.Tpo -c -o VGAuthService-random.obj `if test -f '../serviceImpl/random.c'; then $(CYGPATH_W) '../serviceImpl/random.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/random.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-random.Tpo $(DEPDIR)/VGAuthService-random.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/random.c' object='VGAuthService-random.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-random.obj `if test -f '../serviceImpl/random.c'; then $(CYGPATH_W) '../serviceImpl/random.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/random.c'; fi` - -VGAuthService-service.o: ../serviceImpl/service.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-service.o -MD -MP -MF $(DEPDIR)/VGAuthService-service.Tpo -c -o VGAuthService-service.o `test -f '../serviceImpl/service.c' || echo '$(srcdir)/'`../serviceImpl/service.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-service.Tpo $(DEPDIR)/VGAuthService-service.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/service.c' object='VGAuthService-service.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-service.o `test -f '../serviceImpl/service.c' || echo '$(srcdir)/'`../serviceImpl/service.c - -VGAuthService-service.obj: ../serviceImpl/service.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-service.obj -MD -MP -MF $(DEPDIR)/VGAuthService-service.Tpo -c -o VGAuthService-service.obj `if test -f '../serviceImpl/service.c'; then $(CYGPATH_W) '../serviceImpl/service.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/service.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-service.Tpo $(DEPDIR)/VGAuthService-service.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/service.c' object='VGAuthService-service.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-service.obj `if test -f '../serviceImpl/service.c'; then $(CYGPATH_W) '../serviceImpl/service.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/service.c'; fi` - -VGAuthService-ticket.o: ../serviceImpl/ticket.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-ticket.o -MD -MP -MF $(DEPDIR)/VGAuthService-ticket.Tpo -c -o VGAuthService-ticket.o `test -f '../serviceImpl/ticket.c' || echo '$(srcdir)/'`../serviceImpl/ticket.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-ticket.Tpo $(DEPDIR)/VGAuthService-ticket.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/ticket.c' object='VGAuthService-ticket.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-ticket.o `test -f '../serviceImpl/ticket.c' || echo '$(srcdir)/'`../serviceImpl/ticket.c - -VGAuthService-ticket.obj: ../serviceImpl/ticket.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-ticket.obj -MD -MP -MF $(DEPDIR)/VGAuthService-ticket.Tpo -c -o VGAuthService-ticket.obj `if test -f '../serviceImpl/ticket.c'; then $(CYGPATH_W) '../serviceImpl/ticket.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/ticket.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-ticket.Tpo $(DEPDIR)/VGAuthService-ticket.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/ticket.c' object='VGAuthService-ticket.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-ticket.obj `if test -f '../serviceImpl/ticket.c'; then $(CYGPATH_W) '../serviceImpl/ticket.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/ticket.c'; fi` - -VGAuthService-verify.o: ../serviceImpl/verify.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-verify.o -MD -MP -MF $(DEPDIR)/VGAuthService-verify.Tpo -c -o VGAuthService-verify.o `test -f '../serviceImpl/verify.c' || echo '$(srcdir)/'`../serviceImpl/verify.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-verify.Tpo $(DEPDIR)/VGAuthService-verify.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/verify.c' object='VGAuthService-verify.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-verify.o `test -f '../serviceImpl/verify.c' || echo '$(srcdir)/'`../serviceImpl/verify.c - -VGAuthService-verify.obj: ../serviceImpl/verify.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VGAuthService-verify.obj -MD -MP -MF $(DEPDIR)/VGAuthService-verify.Tpo -c -o VGAuthService-verify.obj `if test -f '../serviceImpl/verify.c'; then $(CYGPATH_W) '../serviceImpl/verify.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/verify.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VGAuthService-verify.Tpo $(DEPDIR)/VGAuthService-verify.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../serviceImpl/verify.c' object='VGAuthService-verify.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VGAuthService-verify.obj `if test -f '../serviceImpl/verify.c'; then $(CYGPATH_W) '../serviceImpl/verify.c'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/verify.c'; fi` - -.cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -VGAuthService-saml.o: ../serviceImpl/saml.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT VGAuthService-saml.o -MD -MP -MF $(DEPDIR)/VGAuthService-saml.Tpo -c -o VGAuthService-saml.o `test -f '../serviceImpl/saml.cpp' || echo '$(srcdir)/'`../serviceImpl/saml.cpp -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/VGAuthService-saml.Tpo $(DEPDIR)/VGAuthService-saml.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../serviceImpl/saml.cpp' object='VGAuthService-saml.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o VGAuthService-saml.o `test -f '../serviceImpl/saml.cpp' || echo '$(srcdir)/'`../serviceImpl/saml.cpp - -VGAuthService-saml.obj: ../serviceImpl/saml.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT VGAuthService-saml.obj -MD -MP -MF $(DEPDIR)/VGAuthService-saml.Tpo -c -o VGAuthService-saml.obj `if test -f '../serviceImpl/saml.cpp'; then $(CYGPATH_W) '../serviceImpl/saml.cpp'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/saml.cpp'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/VGAuthService-saml.Tpo $(DEPDIR)/VGAuthService-saml.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../serviceImpl/saml.cpp' object='VGAuthService-saml.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VGAuthService_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o VGAuthService-saml.obj `if test -f '../serviceImpl/saml.cpp'; then $(CYGPATH_W) '../serviceImpl/saml.cpp'; else $(CYGPATH_W) '$(srcdir)/../serviceImpl/saml.cpp'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(VGAuthServicedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-VGAuthServiceSCRIPTS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-VGAuthServiceSCRIPTS uninstall-binPROGRAMS - -.MAKE: install-am install-data-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install \ - install-VGAuthServiceSCRIPTS install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall \ - uninstall-VGAuthServiceSCRIPTS uninstall-am \ - uninstall-binPROGRAMS - - -# Message catalogs. -install-data-hook: - @INSTVMSG@ VGAuthService $(srcdir)/l10n $(DESTDIR)$(datadir) - cat vgauth.conf | sed -e"s!@@VGAUTHSCHEMADIR@@!$(VGAuthServicedir)!" > $(DESTDIR)/etc/vmware-tools/vgauth.conf -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vgauth/service/fileLogger.c b/open-vm-tools/vgauth/service/fileLogger.c index bcbc49f40..36f33f298 100644 --- a/open-vm-tools/vgauth/service/fileLogger.c +++ b/open-vm-tools/vgauth/service/fileLogger.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -73,7 +73,12 @@ ServiceFileLoggerOpen(FileLoggerData *data) path = g_strdup_printf("%s.%d", data->path, 0); if (g_file_test(path, G_FILE_TEST_EXISTS)) { + /* GStatBuf was added in 2.26. */ +#if GLIB_CHECK_VERSION(2, 26, 0) + GStatBuf fstats; +#else struct stat fstats; +#endif if (g_stat(path, &fstats) > -1) { g_atomic_int_set(&data->logSize, (gint) fstats.st_size); diff --git a/open-vm-tools/vgauth/service/gio.c b/open-vm-tools/vgauth/service/gio.c index bb5c0c9b3..653bbcd41 100644 --- a/open-vm-tools/vgauth/service/gio.c +++ b/open-vm-tools/vgauth/service/gio.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/l10n/de.vmsg b/open-vm-tools/vgauth/service/l10n/de.vmsg index 3f23d32bb..0c9f29f9a 100644 --- a/open-vm-tools/vgauth/service/l10n/de.vmsg +++ b/open-vm-tools/vgauth/service/l10n/de.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/l10n/en.vmsg b/open-vm-tools/vgauth/service/l10n/en.vmsg index 92e9683fe..4dab16278 100644 --- a/open-vm-tools/vgauth/service/l10n/en.vmsg +++ b/open-vm-tools/vgauth/service/l10n/en.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/l10n/es.vmsg b/open-vm-tools/vgauth/service/l10n/es.vmsg index 670ae61ea..70f881d1f 100644 --- a/open-vm-tools/vgauth/service/l10n/es.vmsg +++ b/open-vm-tools/vgauth/service/l10n/es.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/l10n/fr.vmsg b/open-vm-tools/vgauth/service/l10n/fr.vmsg index a936c04bf..7733d603d 100644 --- a/open-vm-tools/vgauth/service/l10n/fr.vmsg +++ b/open-vm-tools/vgauth/service/l10n/fr.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/l10n/it.vmsg b/open-vm-tools/vgauth/service/l10n/it.vmsg index bb9e152d8..1f20b29ae 100644 --- a/open-vm-tools/vgauth/service/l10n/it.vmsg +++ b/open-vm-tools/vgauth/service/l10n/it.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/l10n/ja.vmsg b/open-vm-tools/vgauth/service/l10n/ja.vmsg index fbdc5049c..ac26438b6 100644 --- a/open-vm-tools/vgauth/service/l10n/ja.vmsg +++ b/open-vm-tools/vgauth/service/l10n/ja.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/l10n/ko.vmsg b/open-vm-tools/vgauth/service/l10n/ko.vmsg index 27d087f0b..08313a41a 100644 --- a/open-vm-tools/vgauth/service/l10n/ko.vmsg +++ b/open-vm-tools/vgauth/service/l10n/ko.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/l10n/zh_CN.vmsg b/open-vm-tools/vgauth/service/l10n/zh_CN.vmsg index 415bea4d3..a89f3742b 100644 --- a/open-vm-tools/vgauth/service/l10n/zh_CN.vmsg +++ b/open-vm-tools/vgauth/service/l10n/zh_CN.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/l10n/zh_TW.vmsg b/open-vm-tools/vgauth/service/l10n/zh_TW.vmsg index c7525b422..2483e1546 100644 --- a/open-vm-tools/vgauth/service/l10n/zh_TW.vmsg +++ b/open-vm-tools/vgauth/service/l10n/zh_TW.vmsg @@ -1,5 +1,5 @@ ########################################################## -# Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +# Copyright (C) 2011-2016 VMware, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/log.c b/open-vm-tools/vgauth/service/log.c index f99562bd8..335a6cd4b 100644 --- a/open-vm-tools/vgauth/service/log.c +++ b/open-vm-tools/vgauth/service/log.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/main.c b/open-vm-tools/vgauth/service/main.c index 3b64bc13f..0012b572f 100644 --- a/open-vm-tools/vgauth/service/main.c +++ b/open-vm-tools/vgauth/service/main.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/service.h b/open-vm-tools/vgauth/service/service.h index 5a22f89b6..00350baa7 100644 --- a/open-vm-tools/vgauth/service/service.h +++ b/open-vm-tools/vgauth/service/service.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -88,7 +88,7 @@ gboolean ServiceSuicide(const char *pidPath); #define LOGFILENAME_DEFAULT "vgauthsvclog.txt" #define LOGFILENAME_PATH_DEFAULT "c:\\temp\\" LOGFILENAME_DEFAULT #else -#define LOGFILENAME_PATH_DEFAULT "/tmp/vgauthsvclog.txt" +#define LOGFILENAME_PATH_DEFAULT "/var/log/vmware-vgauthsvc.log" #endif void Service_SetLogOnStdout(gboolean flag); diff --git a/open-vm-tools/vgauth/service/servicePosix.c b/open-vm-tools/vgauth/service/servicePosix.c index c6e4de329..202dab14f 100644 --- a/open-vm-tools/vgauth/service/servicePosix.c +++ b/open-vm-tools/vgauth/service/servicePosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/signalSource.c b/open-vm-tools/vgauth/service/signalSource.c index 59c238d60..62d936959 100644 --- a/open-vm-tools/vgauth/service/signalSource.c +++ b/open-vm-tools/vgauth/service/signalSource.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/service/vgauthService_version.h b/open-vm-tools/vgauth/service/vgauthService_version.h index 680131163..9ce67e733 100644 --- a/open-vm-tools/vgauth/service/vgauthService_version.h +++ b/open-vm-tools/vgauth/service/vgauthService_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/serviceImpl/alias.c b/open-vm-tools/vgauth/serviceImpl/alias.c index 0f4d516ad..165833fa8 100644 --- a/open-vm-tools/vgauth/serviceImpl/alias.c +++ b/open-vm-tools/vgauth/serviceImpl/alias.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -57,10 +57,8 @@ #define ALIAS_STORE_REL_DIRECTORY "VMware\\VGAuth\\aliasStore" #define DEFAULT_ALIASSTORE_ROOT_DIR "C:\\Documents and Settings\\All Users\\Application Data\\" ALIAS_STORE_REL_DIRECTORY #endif -#define DIRSEP "\\" #else #define DEFAULT_ALIASSTORE_ROOT_DIR "/var/lib/vmware/VGAuth/aliasStore" -#define DIRSEP "/" #endif #define ALIASSTORE_MAPFILE_NAME "mapping.xml" @@ -2768,6 +2766,7 @@ ServiceAliasRemoveAlias(const gchar *reqUserName, ServiceSubject *subj) { VGAuthError err; + VGAuthError savedErr = VGAUTH_E_OK; int numIds; ServiceAlias *aList = NULL; gboolean removeAll = (subj->type == SUBJECT_TYPE_UNSET); @@ -2855,13 +2854,17 @@ ServiceAliasRemoveAlias(const gchar *reqUserName, } } if (-1 == userIdIdx) { - err = VGAUTH_E_INVALID_ARGUMENT; - goto done; + /* + * No match, but continue on through the mapped code + * in case we have a orphaned mapped alias from a buggy + * earlier version. + */ + savedErr = VGAUTH_E_INVALID_ARGUMENT; } } /* - * Load mapping. + * Now clear out any mapped alias. This may fail to find a match. */ err = AliasLoadMapped(&numMapped, &maList); if (VGAUTH_E_OK != err) { @@ -2918,21 +2921,17 @@ ServiceAliasRemoveAlias(const gchar *reqUserName, memset(&(maList[userIdIdx].subjects[maList[userIdIdx].num]), '\0', sizeof(ServiceSubject)); #endif + // if all the subjects are gone, toss the whole thing + if (maList[i].num == 0) { + numMapped--; + ServiceAliasFreeMappedAliasListContents(&(maList[i])); + AliasShrinkMapList(maList, numMapped, userIdIdx); + } + updateMap = TRUE; + break; } - // if all the subjects are gone, toss the whole thing - if (maList[i].num == 0) { - numMapped--; - ServiceAliasFreeMappedAliasListContents(&(maList[i])); - AliasShrinkMapList(maList, numMapped, userIdIdx); - } - updateMap = TRUE; - break; } } - if (-1 == userIdIdx) { - err = VGAUTH_E_INVALID_ARGUMENT; - goto done; - } } update: @@ -2951,7 +2950,15 @@ ServiceAliasRemoveAlias(const gchar *reqUserName, ServiceAliasFreeAliasList(numIds, aList); ServiceAliasFreeMappedAliasList(numMapped, maList); - return err; + /* + * If we couldn't find the alias, but dropped though to the mapped + * code anyways to catch orphans, return that error. + */ + if (savedErr != VGAUTH_E_OK) { + return savedErr; + } else { + return err; + } } @@ -3042,7 +3049,7 @@ ServiceAliasQueryMappedAliases(int *num, * ServiceIDVerifyStoreContents -- */ /** * * Looks at every file in the alias store, validating ownership and permissions. - * If a file faisl the validation check, its renamed to file.bad. + * If a file fails the validation check, its renamed to file.bad. * * If we fail to rename a bad file, the function returns an error. * @@ -3137,6 +3144,101 @@ ServiceIDVerifyStoreContents(void) } +/* + ****************************************************************************** + * ServiceValidateAliases -- */ /** + * + * Looks at the alias store, and flags any orphaned mapped alias (have no + * associated per-user alias) that could have been left by bugs in + * previous releases. + * + * @return VGAUTH_E_OK on success, VGAuthError on failure + * + ****************************************************************************** + */ + +static VGAuthError +ServiceValidateAliases(void) +{ + VGAuthError err; + int numMapped = 0; + ServiceMappedAlias *maList = NULL; + int numIds; + ServiceAlias *aList = NULL; + ServiceSubject *mappedSubj; + ServiceSubject *badSubj; + ServiceAliasInfo *ai; + int i; + int j; + int k; + int l; + gboolean foundMatch; + + err = AliasLoadMapped(&numMapped, &maList); + if (VGAUTH_E_OK != err) { + goto done; + } + + if (numMapped == 0) { + err = VGAUTH_E_OK; + goto done; + } + + for (i = 0; i < numMapped; i++) { + foundMatch = FALSE; + badSubj = NULL; + err = AliasLoadAliases(maList[i].userName, &numIds, &aList); + if (err != VGAUTH_E_OK) { + Warning("%s: Failed to load alias for user '%s'\n", + __FUNCTION__, maList[i].userName); + continue; + } + + // iterate over subjects + for (j = 0; j < maList[i].num; j++) { + mappedSubj = &(maList[i].subjects[j]); + badSubj = mappedSubj; + for (k = 0; k < numIds; k++) { + if (ServiceComparePEMCerts(maList[i].pemCert, aList[k].pemCert)) { + for (l = 0; l < aList[k].num; l++) { + ai = &(aList[k].infos[l]); + if (ServiceAliasIsSubjectEqual(mappedSubj->type, ai->type, + mappedSubj->name, ai->name)) { + foundMatch = TRUE; + badSubj = NULL; + goto next; + } + } + } + } + } +next: + ServiceAliasFreeAliasList(numIds, aList); + if (!foundMatch) { + Warning("%s: orphaned mapped alias: user %s subj %s cert %s\n", + __FUNCTION__, maList[i].userName, + (badSubj->type == SUBJECT_TYPE_NAMED ? badSubj->name : "ANY"), + maList[i].pemCert); +#if 0 + /* + * This could clear the orphaned alias, but a) that could + * confuse a user and b) if its buggy, its made things worse. + */ + err = ServiceAliasRemoveAlias("SERVICE-SANITY-CHECK", + maList[i].userName, + maList[i].pemCert, + badSubj); +#endif + } + } + +done: + ServiceAliasFreeMappedAliasList(numMapped, maList); + + return err; +} + + /* ****************************************************************************** * ServiceAliasInitAliasStore -- */ /** @@ -3255,6 +3357,11 @@ ServiceAliasInitAliasStore(void) aliasStoreRootDir); saveBadDir = TRUE; } + + /* + * Sanity check the alias store. + */ + err = ServiceValidateAliases(); } if (saveBadDir) { diff --git a/open-vm-tools/vgauth/serviceImpl/file.c b/open-vm-tools/vgauth/serviceImpl/file.c index a989393ba..ebc35196e 100644 --- a/open-vm-tools/vgauth/serviceImpl/file.c +++ b/open-vm-tools/vgauth/serviceImpl/file.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/serviceImpl/filePosix.c b/open-vm-tools/vgauth/serviceImpl/filePosix.c index 0bb21c8a1..8464154b8 100644 --- a/open-vm-tools/vgauth/serviceImpl/filePosix.c +++ b/open-vm-tools/vgauth/serviceImpl/filePosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/serviceImpl/netPosix.c b/open-vm-tools/vgauth/serviceImpl/netPosix.c index 4350f449a..5efcf21aa 100644 --- a/open-vm-tools/vgauth/serviceImpl/netPosix.c +++ b/open-vm-tools/vgauth/serviceImpl/netPosix.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -113,6 +113,8 @@ ServiceNetworkListen(ServiceConnection *conn, // IN/OUT } Log("%s: Created socket directory '%s'\n", __FUNCTION__, socketDir); } + g_free(socketDir); + socketDir = NULL; sock = socket(PF_UNIX, SOCK_STREAM, 0); if (sock < 0) { diff --git a/open-vm-tools/vgauth/serviceImpl/proto.c b/open-vm-tools/vgauth/serviceImpl/proto.c index 52444fa5f..ab36dca4c 100644 --- a/open-vm-tools/vgauth/serviceImpl/proto.c +++ b/open-vm-tools/vgauth/serviceImpl/proto.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -255,64 +255,64 @@ Proto_DumpRequest(ProtoRequest *req) #endif Debug("complete: %d\n", req->complete); Debug("sequenceNumber: %d\n", req->sequenceNumber); - Debug("requestType: %d(%s REQ)\n", req->reqType, - ProtoRequestTypeText(req->reqType)); + Log("requestType: %d(%s REQ)\n", req->reqType, + ProtoRequestTypeText(req->reqType)); switch (req->reqType) { case PROTO_REQUEST_SESSION_REQ: Debug("version #: %d\n", req->reqData.sessionReq.version); - Debug("userName: '%s'\n", req->reqData.sessionReq.userName); + Log("userName: '%s'\n", req->reqData.sessionReq.userName); break; case PROTO_REQUEST_CONN: // no details break; case PROTO_REQUEST_ADDALIAS: - Debug("userName: %s\n", req->reqData.addAlias.userName); - Debug("addMapped: %d\n", req->reqData.addAlias.addMapped); + Log("userName: %s\n", req->reqData.addAlias.userName); + Log("addMapped: %d\n", req->reqData.addAlias.addMapped); Debug("pemCert: %s\n", req->reqData.addAlias.pemCert); if (req->reqData.addAlias.aliasInfo.type == SUBJECT_TYPE_NAMED) { - Debug("Subject: %s\n", req->reqData.addAlias.aliasInfo.name); + Log("Subject: %s\n", req->reqData.addAlias.aliasInfo.name); } else if (req->reqData.addAlias.aliasInfo.type == SUBJECT_TYPE_ANY) { - Debug("ANY Subject\n"); + Log("ANY Subject\n"); } else { - Debug("*** UNKNOWN Subject type ***\n"); + Warning("*** UNKNOWN Subject type ***\n"); } - Debug("comment: %s\n", req->reqData.addAlias.aliasInfo.comment); + Log("comment: %s\n", req->reqData.addAlias.aliasInfo.comment); break; case PROTO_REQUEST_REMOVEALIAS: - Debug("userName: %s\n", req->reqData.removeAlias.userName); + Log("userName: %s\n", req->reqData.removeAlias.userName); Debug("pemCert: %s\n", req->reqData.removeAlias.pemCert); if (req->reqData.removeAlias.subject.type == SUBJECT_TYPE_NAMED) { - Debug("Subject: %s\n", req->reqData.removeAlias.subject.name); + Log("Subject: %s\n", req->reqData.removeAlias.subject.name); } else if (req->reqData.removeAlias.subject.type == SUBJECT_TYPE_ANY) { - Debug("ANY Subject\n"); + Log("ANY Subject\n"); } else { - Debug("No Subject type specified (assuming removeAll case)\n"); + Log("No Subject type specified (assuming removeAll case)\n"); } break; case PROTO_REQUEST_QUERYALIASES: - Debug("userName: %s\n", req->reqData.queryAliases.userName); + Log("userName: %s\n", req->reqData.queryAliases.userName); break; case PROTO_REQUEST_QUERYMAPPEDALIASES: // no details break; case PROTO_REQUEST_CREATETICKET: - Debug("userName '%s'\n", req->reqData.createTicket.userName); + Log("userName '%s'\n", req->reqData.createTicket.userName); break; case PROTO_REQUEST_VALIDATETICKET: - Debug("ticket '%s'\n", req->reqData.validateTicket.ticket); + Log("ticket '%s'\n", req->reqData.validateTicket.ticket); break; case PROTO_REQUEST_REVOKETICKET: - Debug("ticket '%s'\n", req->reqData.revokeTicket.ticket); + Log("ticket '%s'\n", req->reqData.revokeTicket.ticket); break; case PROTO_REQUEST_VALIDATE_SAML_BEARER_TOKEN: Debug("token '%s'\n", req->reqData.validateSamlBToken.samlToken); - Debug("username '%s'\n", req->reqData.validateSamlBToken.userName); - Debug("validate Only '%s'\n", + Log("username '%s'\n", req->reqData.validateSamlBToken.userName); + Log("validate Only '%s'\n", req->reqData.validateSamlBToken.validateOnly ? "TRUE" : "FALSE"); break; default: - Debug("Unknown request type -- no request specific data\n"); + Warning("Unknown request type -- no request specific data\n"); break; } } @@ -1328,7 +1328,7 @@ ProtoMakeErrorReplyInt(ServiceConnection *conn, escapedErrMsg); g_free(escapedErrMsg); - Debug("Returning error message '%s'\n", packet); + Log("Returning error message '%s'\n", packet); return packet; } @@ -1473,8 +1473,10 @@ ServiceProtoDispatchRequest(ServiceConnection *conn, break; } - Debug("%s: processed reqType %d(%s REQ) on connection %d\n", __FUNCTION__, - req->reqType, ProtoRequestTypeText(req->reqType), conn->connId); + // 'err' is from ServiceNetworkWriteData(), not from the operation + Log("%s: processed reqType %d(%s REQ), returning " + VGAUTHERR_FMT64" on connection %d\n", __FUNCTION__, + req->reqType, ProtoRequestTypeText(req->reqType), err, conn->connId); return err; } diff --git a/open-vm-tools/vgauth/serviceImpl/random.c b/open-vm-tools/vgauth/serviceImpl/random.c index ed51e5c1a..ed9e37861 100644 --- a/open-vm-tools/vgauth/serviceImpl/random.c +++ b/open-vm-tools/vgauth/serviceImpl/random.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/serviceImpl/saml.cpp b/open-vm-tools/vgauth/serviceImpl/saml-xml-security-c.cpp similarity index 99% rename from open-vm-tools/vgauth/serviceImpl/saml.cpp rename to open-vm-tools/vgauth/serviceImpl/saml-xml-security-c.cpp index a07e673c8..4aa41da2a 100644 --- a/open-vm-tools/vgauth/serviceImpl/saml.cpp +++ b/open-vm-tools/vgauth/serviceImpl/saml-xml-security-c.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -17,7 +17,7 @@ *********************************************************/ /** - * @file saml.cpp + * @file saml-xml-security-c.cpp * * Code for authenticating users based on SAML tokens. */ @@ -360,7 +360,7 @@ SAML_Shutdown() /* ****************************************************************************** - * SAML_Reload -- */ /** + * SAML_Reload -- */ /** * * Reload any in-memory state used by the SAML module. * @@ -442,7 +442,7 @@ SAMLLoadSchema(XercesDOMParser &parser, * @param[in] userName Optional username to authenticate as. * @param[out] userNameOut The user that the token has authenticated as. * @param[out] subjNameOut The subject in the token. - * @param[out] verifySi The subjectInfo associeatd with the entry + * @param[out] verifySi The subjectInfo associated with the entry * in the ID provider store used to verify the * SAML cert. * @@ -501,7 +501,7 @@ SAML_VerifyBearerToken(const char *xmlText, * @param[in] userName Optional username to authenticate as. * @param[out] userNameOut The user that the token has authenticated as. * @param[out] subjNameOut The subject in the token. - * @param[out] verifySi The subjectInfo associeatd with the entry + * @param[out] verifySi The subjectInfo associated with the entry * in the ID provider store used to verify the * SAML cert. * @@ -1175,7 +1175,8 @@ SAMLCheckReference(const DOMDocument *doc, DSIGReference *ref = references->item(i); const XMLCh *uri = ref->getURI(); - if (XMLString::startsWith(uri, uriPrefix.getUnicodeStr()) && + if (uri != NULL && + XMLString::startsWith(uri, uriPrefix.getUnicodeStr()) && XMLString::equals(id, uri + prefixLen)) { return true; } diff --git a/open-vm-tools/vgauth/serviceImpl/saml-xmlsec1.c b/open-vm-tools/vgauth/serviceImpl/saml-xmlsec1.c new file mode 100644 index 000000000..bf8b96d70 --- /dev/null +++ b/open-vm-tools/vgauth/serviceImpl/saml-xmlsec1.c @@ -0,0 +1,1477 @@ +/********************************************************* + * Copyright (C) 2016 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + *********************************************************/ + +/** + * @file saml-xmlsec1.cpp + * + * Code for authenticating users based on SAML tokens. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "prefs.h" +#include "serviceInt.h" +#include "certverify.h" + +static int gClockSkewAdjustment = VGAUTH_PREF_DEFAULT_CLOCK_SKEW_SECS; +static xmlSchemaPtr gParsedSchemas = NULL; +static xmlSchemaValidCtxtPtr gSchemaValidateCtx = NULL; + +#define CATALOG_FILENAME "catalog.xml" +#define SAML_SCHEMA_FILENAME "saml-schema-assertion-2.0.xsd" + + +/* + ****************************************************************************** + * XmlErrorHandler -- */ /** + * + * Error handler for xml2. + * + * @param[in] ctx Context (unused). + * @param[in] msg The error message in printf format. + * @param[in] ... Any args for the msg. + * + ****************************************************************************** + */ + +static void +XmlErrorHandler(void *ctx, + const char *msg, + ...) +{ + gchar msgStr[1024]; + va_list argPtr; + va_start(argPtr, msg); + vsnprintf(msgStr, sizeof msgStr, msg, argPtr); + va_end(argPtr); + + /* + * Treat all as warning. + */ + g_warning("XML Error: %s", msgStr); +} + + +/* + ****************************************************************************** + * XmlSecErrorHandler -- */ /** + * + * Error handler for xmlsec. + * + * @param[in] file The name of the file generating the error. + * @param[in] line The line number generating the error. + * @param[in] func The function generating the error. + * @param[in] errorObject The error specific object. + * @param[in] errorSubject The error specific subject. + * @param[in] reason The error code. + * @param[in] msg The additional error message. + * + ****************************************************************************** + */ + +static void +XmlSecErrorHandler(const char *file, + int line, + const char *func, + const char *errorObject, + const char *errorSubject, + int reason, + const char *msg) +{ + /* + * Treat all as warning. + */ + g_warning("XMLSec Error: %s:%s(line %d) object %s" + " subject %s reason: %d, msg: %s", + file, func, line, + errorObject ? errorObject : "", + errorSubject ? errorSubject : "", + reason, msg); +} + + +/* + ****************************************************************************** + * LoadCatalogAndSchema -- */ /** + * + * Loads the schemas for validation. + * + * Using a catalog here ala xmllint. Another option would be an + * additional schema acting like a catalog. + * + * @param[in] catPath Path to the catalog file. + * @param[in] schemaPath Path to the SAML schema file. + * + * return TRUE on success + ****************************************************************************** + * + */ + +static gboolean +LoadCatalogAndSchema(void) +{ + int ret; + gboolean retVal = FALSE; + xmlSchemaParserCtxtPtr ctx = NULL; + gchar *catalogPath = NULL; + gchar *schemaPath = NULL; + gchar *schemaDir = NULL; + + schemaDir = Pref_GetString(gPrefs, + VGAUTH_PREF_SAML_SCHEMA_DIR, + VGAUTH_PREF_GROUP_NAME_SERVICE, + NULL); + + if (NULL == schemaDir) { +#ifdef _WIN32 + /* + * To make life easier for the Windows installer, assume + * the schema directory is next to the executable. Also + * check in ../ in case we're in a dev environment. + */ + schemaDir = g_build_filename(gInstallDir, "schemas", NULL); + if (!(g_file_test(dir, G_FILE_TEST_EXISTS) && + g_file_test(dir, G_FILE_TEST_IS_DIR))) { + + gchar *newDir = g_build_filename(gInstallDir, "..", "schemas", NULL); + + Debug("%s: schemas not found in Windows install loc '%s'," + " trying dev location of '%s'\n", __FUNCTION__, schemaDir, newDir); + + g_free(schemaDir); + schemaDir = newDir; + } +#else + /* + * TODO -- clean this up to make a better default for Linux. + */ + schemaDir = g_build_filename(gInstallDir, "..", "schemas", NULL); +#endif + } + Log("%s: Using '%s' for SAML schemas\n", __FUNCTION__, schemaDir); + catalogPath = g_build_filename(schemaDir, CATALOG_FILENAME, NULL); + schemaPath = g_build_filename(schemaDir, SAML_SCHEMA_FILENAME, NULL); + + xmlInitializeCatalog(); + + /* + * xmlLoadCatalog() just adds to the default catalog, and won't return an + * error if it doesn't exist so long as a default catalog is set. + * + * So sanity check its existence. + */ + if (!g_file_test(catalogPath, G_FILE_TEST_EXISTS)) { + g_warning("Error: catalog file not found at \"%s\"\n", catalogPath); + retVal = FALSE; + goto done; + } + ret = xmlLoadCatalog(catalogPath); + if (ret < 0) { + g_warning("Error: Failed to load catalog at \"%s\"\n", catalogPath); + retVal = FALSE; + goto done; + } + + ctx = xmlSchemaNewParserCtxt(schemaPath); + if (NULL == ctx) { + g_warning("Failed to create schema parser context\n"); + retVal = FALSE; + goto done; + } + + xmlSchemaSetParserErrors(ctx, + (xmlSchemaValidityErrorFunc) XmlErrorHandler, + (xmlSchemaValidityErrorFunc) XmlErrorHandler, + NULL); + gParsedSchemas = xmlSchemaParse(ctx); + if (NULL == gParsedSchemas) { + /* + * This shouldn't happen. Means somebody mucked with our + * schemas. + */ + g_warning("Error: Failed to parse schemas\n"); + retVal = FALSE; + goto done; + } + + /* + * Set up the validaton context for later use. + */ + gSchemaValidateCtx = xmlSchemaNewValidCtxt(gParsedSchemas); + if (NULL == gSchemaValidateCtx) { + g_warning("Failed to create schema validation context\n"); + retVal = FALSE; + goto done; + } + xmlSchemaSetValidErrors(gSchemaValidateCtx, + XmlErrorHandler, + XmlErrorHandler, + NULL); + + retVal = TRUE; +done: + if (NULL != ctx) { + xmlSchemaFreeParserCtxt(ctx); + } + g_free(catalogPath); + g_free(schemaPath); + g_free(schemaDir); + + return retVal; +} + + +/* + ****************************************************************************** + * FreeSchemas -- */ /** + * + * Frees global schema data. + ****************************************************************************** + * + */ + +static void +FreeSchemas(void) +{ + if (NULL != gSchemaValidateCtx) { + xmlSchemaFreeValidCtxt(gSchemaValidateCtx); + gSchemaValidateCtx = NULL; + } + if (NULL != gParsedSchemas) { + xmlSchemaFree(gParsedSchemas); + gParsedSchemas = NULL; + } +} + + +/* + ****************************************************************************** + * LoadPrefs -- */ /** + * + * Loads any preferences SAML cares about. + ****************************************************************************** + * + */ + +static void +LoadPrefs(void) +{ + gClockSkewAdjustment = Pref_GetInt(gPrefs, VGAUTH_PREF_CLOCK_SKEW_SECS, + VGAUTH_PREF_GROUP_NAME_SERVICE, + VGAUTH_PREF_DEFAULT_CLOCK_SKEW_SECS); + Log("%s: Allowing %d of clock skew for SAML date validation\n", + __FUNCTION__, gClockSkewAdjustment); +} + + +/* + ****************************************************************************** + * SAML_Init -- */ /** + * + * Performs any initialization needed for SAML processing. + * + * @return VGAUTH_E_OK on success, VGAuthError on failure + * + ****************************************************************************** + */ + +VGAuthError +SAML_Init(void) +{ + int ret; + + /* + * Init the xml parser + */ + xmlInitParser(); + + /* + * Verify the xml2 version -- if this is too old + * its fatal, so we may want to use a different check. + */ + LIBXML_TEST_VERSION + + /* + * Tell libxml to do ID/REF lookups + * Tell libxml to complete attributes with defaults from the DTDs + */ + xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; + xmlSubstituteEntitiesDefault(1); + + + /* set up the xml2 error handler */ + xmlSetGenericErrorFunc(NULL, XmlErrorHandler); + + /* + * Load schemas + */ + if (!LoadCatalogAndSchema()) { + g_warning("Failed to load schemas\n"); + return VGAUTH_E_FAIL; + } + + /* init xmlsec */ + ret = xmlSecInit(); + if (ret < 0) { + g_warning("xmlSecInit() failed %d\n", ret); + return VGAUTH_E_FAIL; + } + + /* + * set up the error callback + */ + xmlSecErrorsSetCallback(XmlSecErrorHandler); + + /* + * version check xmlsec1 + */ + if (xmlSecCheckVersion() != 1) { + g_warning("Error: xmlsec1 lib version mismatch\n"); + return VGAUTH_E_FAIL; + } + +#ifdef XMLSEC_CRYPTO_DYNAMIC_LOADING + /* + * Load the openssl crypto engine if we are supporting dynamic + * loading for xmlsec-crypto libraries. + */ + if(xmlSecCryptoDLLoadLibrary("openssl") < 0) { + g_warning("Error: unable to load openssl xmlsec-crypto library.\n " + "Make sure that you have xmlsec1-openssl installed and\n" + "check shared libraries path\n" + "(LD_LIBRARY_PATH) environment variable.\n"); + return VGAUTH_E_FAIL; + } +#endif /* XMLSEC_CRYPTO_DYNAMIC_LOADING */ + + /* + * init the xmlsec1 crypto app layer + */ + ret = xmlSecCryptoAppInit(NULL); + if (ret < 0) { + g_warning("xmlSecCryptoAppInit() failed %d\n", ret); + return VGAUTH_E_FAIL; + } + + /* + * Do crypto-engine specific initialization + */ + ret = xmlSecCryptoInit(); + if (ret < 0) { + g_warning("xmlSecCryptoInit() failed %d\n", ret); + return VGAUTH_E_FAIL; + } + + /* + * Load prefs + */ + LoadPrefs(); + + Log("%s: Using xmlsec1 for XML signature support\n", __FUNCTION__); + + return VGAUTH_E_OK; +} + + +/* + ****************************************************************************** + * SAML_Shutdown -- */ /** + * + * Performs any clean-up of resources allocated by SAML code. + * + ****************************************************************************** + */ + +void +SAML_Shutdown() +{ + FreeSchemas(); + xmlSecCryptoShutdown(); + xmlSecCryptoAppShutdown(); + xmlSecShutdown(); + +#if 0 + /* + * This is not thread safe: + * http://0pointer.de/blog/projects/beware-of-xmlCleanupParser + * and should only be called just before exit() + * Because of this, our symbol-checker hates it: See PR 407137 + */ + xmlCleanupParser(); +#endif +} + + +/* + ****************************************************************************** + * SAML_Reload -- */ /** + * + * Reload any in-memory state used by the SAML module. + * + ****************************************************************************** + */ + +void +SAML_Reload() +{ + FreeSchemas(); + LoadPrefs(); + LoadCatalogAndSchema(); +} + + +/* + ****************************************************************************** + * FreeCertArray -- */ /** + * + * Frees a simple array of pemCert. + * + * @param[in] num Number of certs in array. + * @param[in] certs Array of certs to free. + * + ****************************************************************************** + */ +static void +FreeCertArray(int num, + gchar **certs) +{ + int i; + + for (i = 0; i < num; i++) { + g_free(certs[i]); + } + g_free(certs); +} + + +/* + ****************************************************************************** + * FindAttrValue -- */ /** + * + * Returns the value of a attribute in an XML node. + * + * @param[in] node XML subtree node. + * @param[in] attrName Name of the attribute. + * + * @return Attribute value if exists. The caller must free this with xmlFree(). + * + ****************************************************************************** + */ + +static xmlChar * +FindAttrValue(const xmlNodePtr node, + const gchar *attrName) +{ + xmlAttrPtr attr; + xmlChar *name; + + /* + * Find the attribute + */ + attr = xmlHasProp(node, attrName); + if ((attr == NULL) || (attr->children == NULL)) { + return NULL; + } + + /* + * get the attribute value + */ + name = xmlNodeListGetString(node->doc, attr->children, 1); + + return name; +} + + +/* + ****************************************************************************** + * RegisterID -- */ /** + * + * Register the document ID with the xml parser. + * + * This needs to be done if the document ID doesn't use the standard. + * Otherwise the signing fails when setting up the reference. + * SAML likes using 'ID' intead of the default 'xml:id', so + * this is needed for both signing and verification. + * + * This is a no-op if the schemas have been loaded since they + * set it up. + * + * See xmlsec1 FAQ 3.2 + * + * Based on https://www.aleksey.com/pipermail/xmlsec/2003/001768.html + * + * @param[in] node The XML node on which to set the ID. + * @param[in] idName The name of the ID. + * + * @return TRUE on success. + ****************************************************************************** + */ + +static gboolean +RegisterID(xmlNodePtr node, + const xmlChar *idName) +{ + xmlAttrPtr attr; + xmlAttrPtr tmp; + xmlChar *name; + + /* + * find pointer to id attribute + */ + attr = xmlHasProp(node, idName); + if ((attr == NULL) || (attr->children == NULL)) { + return FALSE; + } + + /* + * get the attribute (id) value + */ + name = xmlNodeListGetString(node->doc, attr->children, 1); + if (name == NULL) { + return FALSE; + } + + /* + * check that we don't have the id already registered + */ + tmp = xmlGetID(node->doc, name); + if (tmp != NULL) { + xmlFree(name); + /* no-op if its already there */ + return TRUE; + } + + /* + * finally register id + */ + xmlAddID(NULL, node->doc, name, attr); + + xmlFree(name); + return TRUE; +} + + +/* + ****************************************************************************** + * FindNodeByName -- */ /** + * + * Searches under the specified node for one with a matching name. + * + * @param[in] root XML subtree root under which to search. + * @param[in] nodeName Name of node to find. + * + * @return matching xmlNodePtr or NULL. Caller should not free this node. + * + ****************************************************************************** + */ + +static xmlNodePtr +FindNodeByName(xmlNodePtr root, + char *nodeName) +{ + xmlNodePtr cur; + + cur = root->children; + while (cur != NULL) { + if (cur->type == XML_ELEMENT_NODE) { + if (xmlStrEqual(nodeName, cur->name)) { + break; + } + } + cur = cur->next; + } + + return cur; +} + + +/* + ****************************************************************************** + * FindAllNodesByName -- */ /** + * + * Searches under the specified node for all with a matching name. + * + * @param[in] root XML subtree root under which to search. + * @param[in] nodeName Name of node to find. + * @param[out] nodeName Array of matches. + * + * @return Number of matching nodes. Caller needs to free the array + * of Nodes, but not the nodes themselves. + * + ****************************************************************************** + */ + +static int +FindAllNodesByName(xmlNodePtr root, + char *nodeName, + xmlNodePtr **nodes) +{ + xmlNodePtr cur; + xmlNodePtr *list = NULL; + int count = 0; + + cur = root->children; + while (cur != NULL) { + if (cur->type == XML_ELEMENT_NODE) { + if (xmlStrEqual(nodeName, cur->name)) { + list = g_realloc_n(list, + sizeof(xmlNodePtr), + count + 1); + list[count++] = cur; + } + } + cur = cur->next; + } + *nodes = list; + + return count; +} + + +/* + ****************************************************************************** + * ValidateDoc -- */ /** + * + * Validates the XML document against the schema. + * + * @param[in] doc Parsed XML document. + * + ****************************************************************************** + */ + +static gboolean +ValidateDoc(xmlDocPtr doc) +{ + int ret; + + ret = xmlSchemaValidateDoc(gSchemaValidateCtx, doc); + if (ret < 0) { + g_warning("Failed to validate doc against schema\n"); + } + + return (ret == 0) ? TRUE : FALSE; +} + + +/* + ****************************************************************************** + * CheckTimeAttr -- */ /** + * + * Checks that the given attribute with the given name is a timestamp and + * compares it against the current time. + * + * @param[in] node The node containing the attribute. + * @param[in] attrName The name of the attribute. + * @param[in] notBefore Whether the condition given by the attribute + * should be in the past or 'now' (TRUE). + * + ****************************************************************************** + */ + +static gboolean +CheckTimeAttr(const xmlNodePtr node, + const gchar *attrName, + gboolean notBefore) +{ + xmlChar *timeAttr; + GTimeVal attrTime; + GTimeVal now; + glong diff; + gboolean retVal; + + timeAttr = FindAttrValue(node, attrName); + if ((NULL == timeAttr) || (0 == *timeAttr)) { + /* + * The presence of all time restrictions in SAML are optional, so if + * the attribute is not present, that is fine. + */ + retVal = TRUE; + goto done; + } + + if (!g_time_val_from_iso8601(timeAttr, &attrTime)) { + g_warning("%s: Could not parse %s value (%s).\n", __FUNCTION__, attrName, + timeAttr); + retVal = FALSE; + goto done; + } + + g_get_current_time(&now); + + /* + * Check the difference, doing the math so that a positive + * value is bad. Ignore the micros field since precision + * is unnecessary here because we see unsynced clocks in + * the real world. + */ + if (notBefore) { + // expect time <= now + diff = attrTime.tv_sec - now.tv_sec; + } else { + // expect now <= time + diff = now.tv_sec - attrTime.tv_sec; + } + + /* + * A negative value is fine, a postive value + * greater than the clock skew range is bad. + */ + if (diff > gClockSkewAdjustment) { + g_debug("%s: FAILED SAML assertion (timeStamp %s, delta %d) %s.\n", + __FUNCTION__, timeAttr, (int) diff, + notBefore ? "is not yet valid" : "has expired"); + retVal = FALSE; + goto done; + } + + retVal = TRUE; + +done: + if (timeAttr) { + xmlFree(timeAttr); + } + return retVal; +} + + +/* + ****************************************************************************** + * CheckAudience -- */ /** + * + * Checks whether the given audience URI refers to this machine. + * + * @param[in] audience An audience URI that a token is targetted for. + * + * @return TRUE if the audience URI refers to this machine, FALSE otherwise. + * + ****************************************************************************** + */ + +static gboolean +CheckAudience(const xmlChar *audience) +{ + gboolean ret; + + /* + * Our SSO server doesn't set Recipient, so this only gets used by test code + * whch uses a simple hostname check. + * + * Something like a VC UUID might be more accurate in a virtual + * machine. + */ + + ret = strstr(audience, g_get_host_name()) != NULL; + g_debug("%s: audience check: token: '%s', host: '%s' ? %d\n", + __FUNCTION__, + audience, g_get_host_name(), ret); + return ret; +} + + +/* + ****************************************************************************** + * VerifySubject -- */ /** + * + * Extracts the name of the subject and enforces any conditions in + * SubjectConfirmation elements. + * Subjects are described in section 2.4 of the SAML Core specification. + * + * Example Subject XML: + * + * + * scott@example.org + * + * + * + * + * + * + * + * @param[in] doc The parsed SAML token. + * @param[out] subjectRet The Subject NameId. Should be g_free()d by + * caller. + * + * @return TRUE if the conditions in at least one SubjectConfirmation is met, + * FALSE otherwise. + * + ****************************************************************************** + */ + +static gboolean +VerifySubject(xmlDocPtr doc, + gchar **subjectRet) +{ + xmlNodePtr subjNode; + xmlNodePtr nameIDNode; + xmlNodePtr child; + gchar *subjectVal = NULL; + gboolean retCode = FALSE; + gboolean validSubjectFound = FALSE; + xmlChar *tmp; + + if (NULL != subjectRet) { + *subjectRet = NULL; + } + + subjNode = FindNodeByName(xmlDocGetRootElement(doc), "Subject"); + if (NULL == subjNode) { + g_warning("No Subject node found\n"); + goto done; + } + + /* + * Pull out the NameID for later checks elsewhere. + */ + nameIDNode = FindNodeByName(subjNode, "NameID"); + if (NULL == nameIDNode) { + g_warning("%s: NameID not found in Subject\n", __FUNCTION__); + goto done; + } + tmp = xmlNodeGetContent(nameIDNode); + subjectVal = g_strdup(tmp); + xmlFree(tmp); + + /* + * Find all the SubjectConfirmation nodes and see if at least one + * can be validated. + */ + for (child = subjNode->children; child != NULL; child = child->next) { + xmlChar *method; + xmlNodePtr subjConfirmData; + + if (child->type == XML_ELEMENT_NODE) { + if (!xmlStrEqual(child->name, "SubjectConfirmation")) { + continue; + } + method = FindAttrValue(child, "Method"); + if ((NULL == method) || (0 == *method)) { + // should not happen since this is required + g_warning("%s: Missing SubjectConfirmation method\n", __FUNCTION__); + xmlFree(method); + goto done; + } + if (!xmlStrEqual(method, "urn:oasis:names:tc:SAML:2.0:cm:bearer")) { + g_warning("%s: method %s not bearer\n", __FUNCTION__, method); + xmlFree(method); + continue; + } + xmlFree(method); + + subjConfirmData = FindNodeByName(child, "SubjectConfirmationData"); + if (NULL != subjConfirmData) { + xmlChar *recipient; + + if (!CheckTimeAttr(subjConfirmData, "NotBefore", TRUE) || + !CheckTimeAttr(subjConfirmData, "NotOnOrAfter", FALSE)) { + g_warning("%s: subjConfirmData time check failed\n", + __FUNCTION__); + continue; + } + + /* + * Recipient isn't always there. + */ + recipient = FindAttrValue(subjConfirmData, "Recipient"); + if ((NULL != recipient) && (0 != *recipient) && + !CheckAudience(recipient)) { + g_debug("%s: failed recipient check\n", __FUNCTION__); + xmlFree(recipient); + continue; + } + xmlFree(recipient); + } + + /* + * passed all the checks, we have a match so kick out + */ + validSubjectFound = TRUE; + break; + } + } + + if (validSubjectFound && (NULL != subjectRet)) { + *subjectRet = subjectVal; + } else { + g_free(subjectVal); + } + retCode = validSubjectFound; +done: + return retCode; +} + + +/* + ****************************************************************************** + * VerifyConditions -- */ /** + * + * Enforces conditions specified by the "saml:Conditions" element + * under the root element. + * Conditions are described in section 2.5 of the SAML Core specification. + * + * Example Conditions XML: + * + * + * https://sp.example.com/SAML2 + * + * + * + * @param[in] doc The parsed SAML token. + * + * @return TRUE if the conditions are met; FALSE otherwise. + * + ****************************************************************************** + */ + +static gboolean +VerifyConditions(xmlDocPtr doc) +{ + xmlNodePtr condNode; + + /* + * There should be at most one Conditions element and the schema checking + * done by the parser should enforce that. + */ + condNode = FindNodeByName(xmlDocGetRootElement(doc), "Conditions"); + if (NULL == condNode) { + // Conditions are optional. + g_debug("%s: No Conditions found, accepting\n", __FUNCTION__); + return TRUE; + } + + if (!CheckTimeAttr(condNode, "NotBefore", TRUE) || + !CheckTimeAttr(condNode, "NotOnOrAfter", FALSE)) { + g_warning("%s: Time Conditions failed!\n", __FUNCTION__); + return FALSE; + } + + /* + * is a generic element, intended as an extension point. + * We don't know about any. According to the general processng rules, if + * we find a condition we don't know about, the result of the validation + * is "indeterminate" and we should reject the assertion. + */ + if (FindNodeByName(condNode, "Condition") != NULL) { + g_warning("%s: Unrecognized condition found!\n", __FUNCTION__); + return FALSE; + } + + /* + * defines a set a URIs that describe what + * audience the assertioned is addressed to or intended for. + * But it's very generic. From the spec (section 2.5.1.4): + * A URI reference that identifies an intended audience. The URI + * reference MAY identify a document that describes the terms and + * conditions of audience membership. It MAY also contain the unique + * identifier URI from a SAML name identifier that describes a system + * entity. + * + * Our SSO server doesn't set it, so no point in checking it. + */ + +#if 0 + // TODO nothing looks at this + /* + * element is specified to disallow caching. We don't + * cache, so it doesn't affect our validation. + * However, we need to communicate it to clients so they do not cache. + */ + oneTimeUse = (FindChildByName(condNode, "OneTimeUse") + != NULL); +#endif + + /* + * only applies if a service wants to make their own + * assertions based on a SAML assertion. That should not apply here. + */ + + return TRUE; +} + + +/* + ****************************************************************************** + * BuildCertChain -- */ /** + * + * Pulls the certs out of the parsed SAML token, adds them to the + * key manager, and returns them as a list. + * + * @param[in] x509Node x509 data node. + * @param[in] mgr KeyManager + * @param[out] numCerts Number of certs being returned. + * @param[out] certChain Array containing the certs in OpenSSL PEM + * format. Array and contents must be g_free()d + * by caller. + * + * @return TRUE on success. + * + ****************************************************************************** + */ + +static gboolean +BuildCertChain(xmlNodePtr x509Node, + xmlSecKeysMngrPtr mgr, + int *numCerts, + gchar ***certChain) +{ + gboolean bRet = FALSE; + xmlNodePtr *x509CertNodes = NULL; + int num; + int i; + int ret; + gchar **certList = NULL; + + num = FindAllNodesByName(x509Node, + (char *) xmlSecNodeX509Certificate, + &x509CertNodes); + if (num == 0) { + g_warning("Missing x509 certificate node(s)\n"); + goto done; + } + + certList = g_malloc0_n(num + 1, sizeof(gchar *)); + + for (i = 0; i < num; i++) { + gchar *pemCert = NULL; + xmlChar *base64Cert; + + base64Cert = xmlNodeGetContent(x509CertNodes[i]); + if (NULL == base64Cert) { + g_warning("Missing x509 certificate base64 data\n"); + goto done; + } + + /* + * Turn the raw base64 into PEM. Thanks for being so anal, + * OpenSSL. + */ + pemCert = CertVerify_EncodePEMForSSL(base64Cert); + xmlFree(base64Cert); + + /* + * Add cert to the keymanager. + */ + ret = xmlSecCryptoAppKeysMngrCertLoadMemory(mgr, + pemCert, + strlen(pemCert), + xmlSecKeyDataFormatPem, + xmlSecKeyDataTypeTrusted); + if (ret < 0) { + g_warning("Failed to add cert to key manager\n"); + goto done; + } + + /* + * add pemCert to the returned list + */ + certList[i] = pemCert; + } + + bRet = TRUE; + *numCerts = num; + *certChain = certList; + +done: + if (!bRet) { + FreeCertArray(num, certList); + } + g_free(x509CertNodes); + + return bRet; +} + + +/* + ****************************************************************************** + * VerifySignature -- */ /** + * + * Verifies the signature on an XML document. + * + * @param[in] doc Parsed XML document. + * @param[out] numCerts Number of certs in the token. + * @param[out] certChain Certs in the token. Caller should g_free() array and + * contents. + * + * @return TRUE on success. + * + ****************************************************************************** + */ + +static gboolean +VerifySignature(xmlDocPtr doc, + int *numCerts, + gchar ***certChain) +{ + xmlNodePtr dsigNode; + xmlNodePtr keyInfoNode; + xmlNodePtr x509Node; + xmlSecDSigCtxPtr dsigCtx = NULL; + xmlSecKeysMngrPtr mgr = NULL; + int ret; + int num = 0; + gchar **certList = NULL; + gboolean bRet; + gboolean retCode = FALSE; + + *numCerts = 0; + *certChain = NULL; + + /* + * First pull out the signature to get to the x509 cert. + */ + dsigNode = xmlSecFindNode(xmlDocGetRootElement(doc), + xmlSecNodeSignature, xmlSecDSigNs); + if (NULL == dsigNode) { + g_warning("Missing signature node\n"); + goto done; + } + + keyInfoNode = xmlSecFindNode(dsigNode, xmlSecNodeKeyInfo, + xmlSecDSigNs); + if (NULL == keyInfoNode) { + g_warning("Missing KeyInfo node\n"); + goto done; + } + + x509Node = xmlSecFindNode(keyInfoNode, xmlSecNodeX509Data, + xmlSecDSigNs); + if (NULL == x509Node) { + g_warning("Missing x509 node\n"); + goto done; + } + + /* + * Make a key manager to hold the certs. + */ + mgr = xmlSecKeysMngrCreate(); + if (mgr == NULL) { + g_warning("Failed to create key manager"); + goto done; + } + + ret = xmlSecCryptoAppDefaultKeysMngrInit(mgr); + if (ret < 0) { + g_warning("Failed to init key manager\n"); + goto done; + } + + + /* + * Get the cert chain from the token. + * + * Unlike xml-security-c, xmlsec1 wants to validate the cert + * chain in the token so it needs the full chain, not just + * the public key from the first cert. + * + * Also save it off for later use by the alias store check. + */ + bRet = BuildCertChain(x509Node, mgr, &num, &certList); + if (FALSE == bRet) { + g_warning("Failed to add cert to key manager\n"); + goto done; + } + + /* + * Create a signature context with the key manager + */ + dsigCtx = xmlSecDSigCtxCreate(mgr); + if (NULL == dsigCtx) { + g_warning("Missing signature node\n"); + goto done; + } + + /* + * The vgauth service code expects the id to be "ID". xmlSec + * won't handle the URI ref in the signature unless we + * + * a) use 'xml:id' (the default) instead of "ID" + * or + * b) register the ID + * + * We can't control what the SSO server does, so its "b". + */ + bRet = RegisterID(xmlDocGetRootElement(doc), "ID"); + if (bRet == FALSE) { + g_warning("failed to register ID\n"); + goto done; + } + + /* + * Verify signature. This just returns if the signature code worked + * or not, not if the signature is correct. + */ + ret = xmlSecDSigCtxVerify(dsigCtx, dsigNode); + if (ret < 0) { + g_warning("Signature verify failed\n"); + goto done; + } + + /* + * The xml-security-c verifies the Reference explicitly; this + * isn't needed for xmlsec1 because the library does it. + */ + + /* + * Check status to verify the signature is correct. + * + */ + if (dsigCtx->status != xmlSecDSigStatusSucceeded) { + g_warning("Signature is INVALID\n"); + goto done; + } + + retCode = TRUE; + *numCerts = num; + *certChain = certList; +done: + if (!retCode) { + FreeCertArray(num, certList); + } + if (dsigCtx) { + xmlSecDSigCtxDestroy(dsigCtx); + } + if (mgr) { + xmlSecKeysMngrDestroy(mgr); + } + + return retCode; +} + + +/* + ****************************************************************************** + * VerifySAMLToken -- */ /** + * + * Verifies a XML text as a SAML token. + * Parses the XML, then verifies Subject, Conditions and Signature. + * + * @param[in] token Text of SAML token. + * @param[out] subject Subject of SAML token, Caller must g_free(). + * @param[out] numCerts Number of certs in the token. + * @param[out] certChain Certs in the token. Caller should g_free() array and + * contents. + * + * @return matching TRUE on success. + * + ****************************************************************************** + */ + +static gboolean +VerifySAMLToken(const gchar *token, + gchar **subject, + int *numCerts, + gchar ***certChain) +{ + xmlDocPtr doc = NULL; + int retCode = FALSE; + gboolean bRet; + /* + * If we want to set extra options, use this path. + */ +#if PARSE_WITH_OPTIONS + xmlParserCtxtPtr parseCtx = NULL; + + parseCtx = xmlCreateDocParserCtxt(token); + + /* + * Don't allow extra stuff to be pulled off the net. + * The schema validation should prevent this from getting + * through, but it might still be nice to prevent network issues + * from slowing things down. + */ + xmlCtxtUseOptions(parseCtx, XML_PARSE_NONET); + doc = xmlCtxtReadMemory(parseCtx, + token, + strlen(token), + NULL, NULL, 0); +#else + doc = xmlParseMemory(token, strlen(token)); +#endif + if ((NULL == doc) || (xmlDocGetRootElement(doc) == NULL)) { + g_warning("Failed to parse document\n"); + goto done; + } + + bRet = ValidateDoc(doc); + if (FALSE == bRet) { + g_warning("Failed to validate token against schema\n"); + goto done; + } + + bRet = VerifySubject(doc, subject); + if (FALSE == bRet) { + g_warning("Failed to verify Subject node\n"); + goto done; + } + + bRet = VerifyConditions(doc); + if (FALSE == bRet) { + g_warning("Failed to verify Conditions\n"); + goto done; + } + + bRet = VerifySignature(doc, numCerts, certChain); + if (FALSE == bRet) { + g_warning("Failed to verify Signature\n"); + goto done; + } + + retCode = TRUE; +done: +#if PARSE_WITH_OPTIONS + if (NULL != parseCtx) { + xmlFreeParserCtxt(parseCtx); + } +#endif + if (!retCode && (NULL != subject)) { + g_free(*subject); + *subject = NULL; + } + if (doc) { + xmlFreeDoc(doc); + } + + return retCode; +} + + +/* + ****************************************************************************** + * SAML_VerifyBearerToken -- */ /** + * + * Determines whether the SAML bearer token can be used to authenticate. + * A token consists of a single SAML assertion. + * + * This is currently only used from the test code. + * + * @param[in] xmlText The text of the SAML assertion. + * @param[in] userName Optional username to authenticate as. + * @param[out] userNameOut The user that the token has authenticated as. + * @param[out] subjNameOut The subject in the token. Caller must g_free(). + * @param[out] verifyAi The alias info associated with the entry + * in the alias store used to verify the + * SAML cert. + * + * @return VGAUTH_E_OK on success, VGAuthError on failure + * + ****************************************************************************** + */ + +VGAuthError +SAML_VerifyBearerToken(const char *xmlText, + const char *userName, // UNUSED + char **userNameOut, // UNUSED + char **subjNameOut, + ServiceAliasInfo **verifyAi) // UNUSED +{ + gboolean ret; + gchar **certChain = NULL; + int num = 0; + + ret = VerifySAMLToken(xmlText, + subjNameOut, + &num, + &certChain); + + // clean up -- this code doesn't look at the chain + FreeCertArray(num, certChain); + + return (ret == TRUE) ? VGAUTH_E_OK : VGAUTH_E_AUTHENTICATION_DENIED; +} + + +/* + ****************************************************************************** + * SAML_VerifyBearerTokenAndChain -- */ /** + * + * Determines whether the SAML bearer token can be used to authenticate. + * A token consists of a single SAML assertion. + * The token must first be verified, then the certificate chain used + * verify it must be checked against the appropriate certificate store. + * + * @param[in] xmlText The text of the SAML assertion. + * @param[in] userName Optional username to authenticate as. + * @param[out] userNameOut The user that the token has authenticated as. + * @param[out] subjNameOut The subject in the token. Caller must g_free(). + * @param[out] verifyAi The alias info associated with the entry + * in the alias store used to verify the + * SAML cert. + * + * @return VGAUTH_E_OK on success, VGAuthError on failure + * + ****************************************************************************** + */ + +VGAuthError +SAML_VerifyBearerTokenAndChain(const char *xmlText, + const char *userName, + char **userNameOut, + char **subjNameOut, + ServiceAliasInfo **verifyAi) +{ + VGAuthError err; + gboolean bRet; + int num; + gchar **certChain = NULL; + ServiceSubject subj; + + *userNameOut = NULL; + *subjNameOut = NULL; + *verifyAi = NULL; + + bRet = VerifySAMLToken(xmlText, + subjNameOut, + &num, + &certChain); + + if (FALSE == bRet) { + return VGAUTH_E_AUTHENTICATION_DENIED; + } + + subj.type = SUBJECT_TYPE_NAMED; + subj.name = *subjNameOut; + err = ServiceVerifyAndCheckTrustCertChainForSubject(num, + (const char **) certChain, + userName, + &subj, + userNameOut, + verifyAi); + g_debug("%s: ServiceVerifyAndCheckTrustCertChainForSubject() " + "returned "VGAUTHERR_FMT64"\n", __FUNCTION__, err); + FreeCertArray(num, certChain); + + return err; +} + diff --git a/open-vm-tools/vgauth/serviceImpl/samlInt.hpp b/open-vm-tools/vgauth/serviceImpl/samlInt.hpp index 8a7cd4a1c..e59a34d4f 100644 --- a/open-vm-tools/vgauth/serviceImpl/samlInt.hpp +++ b/open-vm-tools/vgauth/serviceImpl/samlInt.hpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/serviceImpl/schemas/catalog.xml b/open-vm-tools/vgauth/serviceImpl/schemas/catalog.xml new file mode 100644 index 000000000..da7891713 --- /dev/null +++ b/open-vm-tools/vgauth/serviceImpl/schemas/catalog.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/open-vm-tools/vgauth/serviceImpl/service.c b/open-vm-tools/vgauth/serviceImpl/service.c index 605deef50..677953081 100644 --- a/open-vm-tools/vgauth/serviceImpl/service.c +++ b/open-vm-tools/vgauth/serviceImpl/service.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -250,7 +250,7 @@ ServiceDecodeUserName(const char *userName) ASSERT(ok); if (domain) { - result = g_strdup_printf("%sDIRSEP%s", domain, user); + result = g_strdup_printf("%s"DIRSEP"%s", domain, user); } else { result = g_strdup(userName); } diff --git a/open-vm-tools/vgauth/serviceImpl/serviceInt.h b/open-vm-tools/vgauth/serviceImpl/serviceInt.h index 63fbe2d7b..8bf3af3cf 100644 --- a/open-vm-tools/vgauth/serviceImpl/serviceInt.h +++ b/open-vm-tools/vgauth/serviceImpl/serviceInt.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -52,6 +52,11 @@ enum { BUFSIZE = 4096 }; #include "userAccessControl.h" #endif +#ifdef _WIN32 +#define DIRSEP "\\" +#else +#define DIRSEP "/" +#endif /* * Use this for any informational messages, eg "service started". diff --git a/open-vm-tools/vgauth/serviceImpl/ticket.c b/open-vm-tools/vgauth/serviceImpl/ticket.c index 6e868f5d5..27b482d30 100644 --- a/open-vm-tools/vgauth/serviceImpl/ticket.c +++ b/open-vm-tools/vgauth/serviceImpl/ticket.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vgauth/serviceImpl/verify.c b/open-vm-tools/vgauth/serviceImpl/verify.c index 0175a046b..a5f4951c3 100644 --- a/open-vm-tools/vgauth/serviceImpl/verify.c +++ b/open-vm-tools/vgauth/serviceImpl/verify.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmblock-fuse/Makefile.am b/open-vm-tools/vmblock-fuse/Makefile.am index 57c9223c1..9018096c4 100644 --- a/open-vm-tools/vmblock-fuse/Makefile.am +++ b/open-vm-tools/vmblock-fuse/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2008-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/vmblock-fuse/Makefile.in b/open-vm-tools/vmblock-fuse/Makefile.in deleted file mode 100644 index c77fa9c87..000000000 --- a/open-vm-tools/vmblock-fuse/Makefile.in +++ /dev/null @@ -1,609 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2008-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-vmblock-fuse$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = vmblock-fuse -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_vmblock_fuse_OBJECTS = util.$(OBJEXT) fsops.$(OBJEXT) \ - main.$(OBJEXT) block.$(OBJEXT) stubs.$(OBJEXT) -vmware_vmblock_fuse_OBJECTS = $(am_vmware_vmblock_fuse_OBJECTS) -am__DEPENDENCIES_1 = -vmware_vmblock_fuse_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_vmblock_fuse_SOURCES) -DIST_SOURCES = $(vmware_vmblock_fuse_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# _XOPEN_SOURCE needs to be defined to at least 600 when compiling -# vmblock-fuse; it's needed by os.h to get pthread_rwlock_t and by fsops.c to -# get lstat. -# -D_FILE_OFFSET_BITS=64 required for fuse. -AM_CFLAGS = -Dvmblock_fuse -U_XOPEN_SOURCE -D_XOPEN_SOURCE=600 \ - -DUSERLEVEL -D_FILE_OFFSET_BITS=64 @FUSE_CPPFLAGS@ \ - @GLIB2_CPPFLAGS@ -I$(top_srcdir)/modules/shared/vmblock \ - -I$(srcdir) -vmware_vmblock_fuse_LDADD = @FUSE_LIBS@ @GLIB2_LIBS@ $(am__append_1) -vmware_vmblock_fuse_SOURCES = util.c fsops.c main.c \ - $(top_srcdir)/modules/shared/vmblock/block.c \ - $(top_srcdir)/modules/shared/vmblock/stubs.c -@HAVE_ICU_FALSE@vmware_vmblock_fuse_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_vmblock_fuse_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) \ -@HAVE_ICU_TRUE@ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vmblock-fuse/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vmblock-fuse/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-vmblock-fuse$(EXEEXT): $(vmware_vmblock_fuse_OBJECTS) $(vmware_vmblock_fuse_DEPENDENCIES) - @rm -f vmware-vmblock-fuse$(EXEEXT) - $(vmware_vmblock_fuse_LINK) $(vmware_vmblock_fuse_OBJECTS) $(vmware_vmblock_fuse_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/block.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsops.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -block.o: $(top_srcdir)/modules/shared/vmblock/block.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT block.o -MD -MP -MF $(DEPDIR)/block.Tpo -c -o block.o `test -f '$(top_srcdir)/modules/shared/vmblock/block.c' || echo '$(srcdir)/'`$(top_srcdir)/modules/shared/vmblock/block.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/block.Tpo $(DEPDIR)/block.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/modules/shared/vmblock/block.c' object='block.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o block.o `test -f '$(top_srcdir)/modules/shared/vmblock/block.c' || echo '$(srcdir)/'`$(top_srcdir)/modules/shared/vmblock/block.c - -block.obj: $(top_srcdir)/modules/shared/vmblock/block.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT block.obj -MD -MP -MF $(DEPDIR)/block.Tpo -c -o block.obj `if test -f '$(top_srcdir)/modules/shared/vmblock/block.c'; then $(CYGPATH_W) '$(top_srcdir)/modules/shared/vmblock/block.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/modules/shared/vmblock/block.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/block.Tpo $(DEPDIR)/block.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/modules/shared/vmblock/block.c' object='block.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o block.obj `if test -f '$(top_srcdir)/modules/shared/vmblock/block.c'; then $(CYGPATH_W) '$(top_srcdir)/modules/shared/vmblock/block.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/modules/shared/vmblock/block.c'; fi` - -stubs.o: $(top_srcdir)/modules/shared/vmblock/stubs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.o -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.o `test -f '$(top_srcdir)/modules/shared/vmblock/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/modules/shared/vmblock/stubs.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/modules/shared/vmblock/stubs.c' object='stubs.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stubs.o `test -f '$(top_srcdir)/modules/shared/vmblock/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/modules/shared/vmblock/stubs.c - -stubs.obj: $(top_srcdir)/modules/shared/vmblock/stubs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.obj -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.obj `if test -f '$(top_srcdir)/modules/shared/vmblock/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/modules/shared/vmblock/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/modules/shared/vmblock/stubs.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/modules/shared/vmblock/stubs.c' object='stubs.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stubs.obj `if test -f '$(top_srcdir)/modules/shared/vmblock/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/modules/shared/vmblock/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/modules/shared/vmblock/stubs.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vmblock-fuse/fsops.c b/open-vm-tools/vmblock-fuse/fsops.c index 259aa117a..6e10b0b47 100644 --- a/open-vm-tools/vmblock-fuse/fsops.c +++ b/open-vm-tools/vmblock-fuse/fsops.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmblock-fuse/fsops.h b/open-vm-tools/vmblock-fuse/fsops.h index 87da5d8ca..73b4675ad 100644 --- a/open-vm-tools/vmblock-fuse/fsops.h +++ b/open-vm-tools/vmblock-fuse/fsops.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmblock-fuse/main.c b/open-vm-tools/vmblock-fuse/main.c index 9eef45ec7..bc07670a3 100644 --- a/open-vm-tools/vmblock-fuse/main.c +++ b/open-vm-tools/vmblock-fuse/main.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmblock-fuse/os.h b/open-vm-tools/vmblock-fuse/os.h index 2cec6fb66..0c346709c 100644 --- a/open-vm-tools/vmblock-fuse/os.h +++ b/open-vm-tools/vmblock-fuse/os.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmblock-fuse/util.c b/open-vm-tools/vmblock-fuse/util.c index 44753e3d8..0e4b18a12 100644 --- a/open-vm-tools/vmblock-fuse/util.c +++ b/open-vm-tools/vmblock-fuse/util.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmblockmounter/Makefile.am b/open-vm-tools/vmblockmounter/Makefile.am index 1bb2a4b1d..effb430a6 100644 --- a/open-vm-tools/vmblockmounter/Makefile.am +++ b/open-vm-tools/vmblockmounter/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2011-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2011-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/vmblockmounter/Makefile.in b/open-vm-tools/vmblockmounter/Makefile.in deleted file mode 100644 index 79e376e32..000000000 --- a/open-vm-tools/vmblockmounter/Makefile.in +++ /dev/null @@ -1,579 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2011-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -sbin_PROGRAMS = mount.vmblock$(EXEEXT) -subdir = vmblockmounter -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(sbin_PROGRAMS) -am_mount_vmblock_OBJECTS = vmblockmounter.$(OBJEXT) -mount_vmblock_OBJECTS = $(am_mount_vmblock_OBJECTS) -mount_vmblock_DEPENDENCIES = ../lib/stubs/libStubs.la -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(mount_vmblock_SOURCES) -DIST_SOURCES = $(mount_vmblock_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -mount_vmblock_LDADD = ../lib/stubs/libStubs.la -mount_vmblock_SOURCES = vmblockmounter.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vmblockmounter/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vmblockmounter/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-sbinPROGRAMS: $(sbin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-sbinPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done - -clean-sbinPROGRAMS: - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -mount.vmblock$(EXEEXT): $(mount_vmblock_OBJECTS) $(mount_vmblock_DEPENDENCIES) - @rm -f mount.vmblock$(EXEEXT) - $(LINK) $(mount_vmblock_OBJECTS) $(mount_vmblock_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmblockmounter.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - -.MAKE: install-am install-exec-am install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-sbinPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-sbinPROGRAMS - - -@FREEBSD_TRUE@install-exec-hook: -@FREEBSD_TRUE@ mv $(DESTDIR)$(sbindir)/mount.vmblock \ -@FREEBSD_TRUE@ $(DESTDIR)$(sbindir)/mount_vmblock -@FREEBSD_TRUE@ -$(MKDIR_P) $(DESTDIR)/sbin -@FREEBSD_TRUE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount_vmblock \ -@FREEBSD_TRUE@ $(DESTDIR)/sbin/mount_vmblock &> /dev/null -@FREEBSD_TRUE@uninstall-hook: -@FREEBSD_TRUE@ rm -f $(DESTDIR)$(sbindir)/mount_vmblock -@FREEBSD_FALSE@install-exec-hook: -@FREEBSD_FALSE@ -$(MKDIR_P) $(DESTDIR)/sbin -@FREEBSD_FALSE@ -$(LN_S) $(DESTDIR)$(sbindir)/mount.vmblock \ -@FREEBSD_FALSE@ $(DESTDIR)/sbin/mount.vmblock &> /dev/null -@FREEBSD_FALSE@uninstall-hook: -@FREEBSD_FALSE@ rm -f $(DESTDIR)/sbin/mount.vmblock -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vmblockmounter/vmblockmounter.c b/open-vm-tools/vmblockmounter/vmblockmounter.c index edc0daeab..382800c12 100644 --- a/open-vm-tools/vmblockmounter/vmblockmounter.c +++ b/open-vm-tools/vmblockmounter/vmblockmounter.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmblockmounter/vmblockmounter_version.h b/open-vm-tools/vmblockmounter/vmblockmounter_version.h index eeca476c4..3a6d1952f 100644 --- a/open-vm-tools/vmblockmounter/vmblockmounter_version.h +++ b/open-vm-tools/vmblockmounter/vmblockmounter_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmhgfs-fuse/Makefile.am b/open-vm-tools/vmhgfs-fuse/Makefile.am index 1e076f396..19089a08e 100644 --- a/open-vm-tools/vmhgfs-fuse/Makefile.am +++ b/open-vm-tools/vmhgfs-fuse/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2015 VMware, Inc. All rights reserved. +### Copyright (C) 2015-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -24,6 +24,7 @@ AM_CFLAGS += @GLIB2_CPPFLAGS@ vmhgfs_fuse_LDADD = vmhgfs_fuse_LDADD += @FUSE_LIBS@ vmhgfs_fuse_LDADD += @GLIB2_LIBS@ +vmhgfs_fuse_LDADD += @VMTOOLS_LIBS@ # The linker processes the libraries in sequence, and order matters here. vmhgfs_fuse_LDADD += ../lib/hgfs/libHgfs.la diff --git a/open-vm-tools/vmhgfs-fuse/bdhandler.c b/open-vm-tools/vmhgfs-fuse/bdhandler.c index 62c489fd7..968e52af8 100644 --- a/open-vm-tools/vmhgfs-fuse/bdhandler.c +++ b/open-vm-tools/vmhgfs-fuse/bdhandler.c @@ -45,7 +45,7 @@ static HgfsTransportChannel bdChannel; * Open the backdoor in an idempotent way. * * Results: - * TRUE on success, FALSE on failure. + * Existing or updated channel status, HGFS_CHANNEL_CONNECTED on success. * * Side effects: * None @@ -53,36 +53,35 @@ static HgfsTransportChannel bdChannel; *----------------------------------------------------------------------------- */ -static Bool +static HgfsChannelStatus HgfsBdChannelOpen(HgfsTransportChannel *channel) // IN: Channel { - Bool ret; - pthread_mutex_lock(&channel->connLock); switch (channel->status) { case HGFS_CHANNEL_UNINITIALIZED: - ret = FALSE; + LOG(8, ("Backdoor uninitialized.\n")); break; case HGFS_CHANNEL_CONNECTED: - ret = TRUE; + LOG(8, ("Backdoor already connected.\n")); break; case HGFS_CHANNEL_NOTCONNECTED: if (HgfsBd_OpenBackdoor((RpcOut **)&channel->priv)) { - LOG(8, ("Backdoor opened.\n")); - bdChannel.status = HGFS_CHANNEL_CONNECTED; - ret = TRUE; + LOG(8, ("Backdoor opened and connected.\n")); + channel->status = HGFS_CHANNEL_CONNECTED; ASSERT(channel->priv != NULL); } else { - ret = FALSE; + LOG(8, ("ERROR: Backdoor cannot connect.\n")); } break; default: ASSERT(0); /* Not reached. */ - ret = FALSE; + LOG(2, ("ERROR: Backdoor status %d is unknown resetting.\n", + channel->status)); + channel->status = HGFS_CHANNEL_UNINITIALIZED; } pthread_mutex_unlock(&channel->connLock); - return ret; + return channel->status; } diff --git a/open-vm-tools/vmhgfs-fuse/cache.c b/open-vm-tools/vmhgfs-fuse/cache.c index 9da2284fa..17acfd6ec 100644 --- a/open-vm-tools/vmhgfs-fuse/cache.c +++ b/open-vm-tools/vmhgfs-fuse/cache.c @@ -25,7 +25,13 @@ #if !defined(__FreeBSD__) && !defined(__SOLARIS__) #include #endif -#define CACHE_TIMEOUT 5 + +/* + * We make the default attribute cache timeout 1 second which is the same + * as the FUSE driver. + * This can be overridden with the mount option attr_timeout=T + */ +#define CACHE_TIMEOUT HGFS_DEFAULT_TTL #define CACHE_PURGE_TIME 10 #define CACHE_PURGE_SLEEP_TIME 30 #define HASH_THRESHOLD_SIZE (2046 * 4) @@ -126,7 +132,6 @@ HgfsGetAttrCache(const char* path, //IN: Path of file or directory } } -out: pthread_mutex_unlock(&HgfsAttrCacheLock); return res; } diff --git a/open-vm-tools/vmhgfs-fuse/config.c b/open-vm-tools/vmhgfs-fuse/config.c index 241c66c64..75a54c09f 100644 --- a/open-vm-tools/vmhgfs-fuse/config.c +++ b/open-vm-tools/vmhgfs-fuse/config.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2015 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -490,6 +490,9 @@ vmhgfsPreprocessArgs(struct fuse_args *outargs) // IN/OUT gState->basePath = NULL; gState->basePathLen = 0; + VMTools_LoadConfig(NULL, G_KEY_FILE_NONE, &gState->conf, NULL); + VMTools_ConfigLogging(G_LOG_DOMAIN, gState->conf, FALSE, FALSE); + #ifdef VMX86_DEVEL config.logLevel = LOGLEVEL_THRESHOLD; #endif diff --git a/open-vm-tools/vmhgfs-fuse/config.h b/open-vm-tools/vmhgfs-fuse/config.h index 5bc2d13c5..851f92e4f 100644 --- a/open-vm-tools/vmhgfs-fuse/config.h +++ b/open-vm-tools/vmhgfs-fuse/config.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2015 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmhgfs-fuse/file.c b/open-vm-tools/vmhgfs-fuse/file.c index 011d93b69..bb463b4d4 100644 --- a/open-vm-tools/vmhgfs-fuse/file.c +++ b/open-vm-tools/vmhgfs-fuse/file.c @@ -859,6 +859,7 @@ HgfsWrite(struct fuse_file_info *fi, // IN: File info structure const char *buffer = buf; loff_t curOffset = offset; size_t nextCount, remainingCount = count; + ssize_t bytesWritten = 0; ASSERT(NULL != buf); ASSERT(NULL != fi); @@ -875,6 +876,7 @@ HgfsWrite(struct fuse_file_info *fi, // IN: File info structure result = HgfsDoWrite(fi->fh, buffer, nextCount, curOffset); if (result < 0) { + bytesWritten = result; LOG(4, ("Error: DoWrite -> %d\n", result)); goto out; } @@ -884,9 +886,11 @@ HgfsWrite(struct fuse_file_info *fi, // IN: File info structure } while ((result > 0) && (remainingCount > 0)); + bytesWritten = count - remainingCount; + out: - LOG(6, ("Exit(0x%"FMTSZ"x)\n", count - remainingCount)); - return (count - remainingCount); + LOG(6, ("Exit(0x%"FMTSZ"x)\n", bytesWritten)); + return bytesWritten; } diff --git a/open-vm-tools/vmhgfs-fuse/filesystem.h b/open-vm-tools/vmhgfs-fuse/filesystem.h index 97fdc507b..48af9376d 100644 --- a/open-vm-tools/vmhgfs-fuse/filesystem.h +++ b/open-vm-tools/vmhgfs-fuse/filesystem.h @@ -26,8 +26,12 @@ #ifndef _HGFS_DRIVER_FILESYSTEM_H_ #define _HGFS_DRIVER_FILESYSTEM_H_ +#define G_LOG_DOMAIN "vmhgfs-fuse" + #include "vm_basic_types.h" #include +#include "vmware/tools/utils.h" +#include "vmware/tools/log.h" typedef struct HgfsFuseState { Bool sessionEnabled; @@ -41,6 +45,8 @@ typedef struct HgfsFuseState { char *basePath; size_t basePathLen; + GKeyFile *conf; + } HgfsFuseState; /* Public functions (with respect to the entire module). */ diff --git a/open-vm-tools/vmhgfs-fuse/main.c b/open-vm-tools/vmhgfs-fuse/main.c index fa7457807..1ce970b8b 100644 --- a/open-vm-tools/vmhgfs-fuse/main.c +++ b/open-vm-tools/vmhgfs-fuse/main.c @@ -333,9 +333,10 @@ hgfs_readlink(const char *path, //IN: path to a file goto exit; } - if (size >= strlen(attr->fileName)) { - Str_Strcpy(buf, attr->fileName + gState->basePathLen, - strlen(attr->fileName) + 1 - gState->basePathLen); + if (size > strlen(attr->fileName)) { + Str_Strcpy(buf, attr->fileName, + strlen(attr->fileName) + 1); + LOG(4, ("ReadLink: link target name = %s\n", buf)); } else { res = -ENOBUFS; } @@ -495,7 +496,9 @@ hgfs_unlink(const char *path) //IN: path to a file } res = HgfsDelete(abspath, HGFS_OP_DELETE_FILE); - HgfsInvalidateAttrCache(abspath); + if (res == 0) { + HgfsInvalidateAttrCache(abspath); + } exit: LOG(4, ("Exit(%d)\n", res)); @@ -533,7 +536,9 @@ hgfs_rmdir(const char *path) //IN: path to a dir } res = HgfsDelete(abspath, HGFS_OP_DELETE_DIR); - HgfsInvalidateAttrCache(abspath); + if (res == 0) { + HgfsInvalidateAttrCache(abspath); + } exit: LOG(4, ("Exit(%d)\n", res)); @@ -559,29 +564,24 @@ hgfs_rmdir(const char *path) //IN: path to a dir */ static int -hgfs_symlink(const char *from, //IN: from path - const char *to) //IN: to path +hgfs_symlink(const char *symname, //IN: symname target + const char *source) //IN: source name { - char *absfrom = NULL; - char *absto = NULL; + char *absSource = NULL; int res; - LOG(4, ("Entry(from = %s, to = %s)\n", from, to)); - res = getAbsPath(from, &absfrom); - if (res < 0) { - goto exit; - } - res = getAbsPath(to, &absto); + LOG(4, ("Entry(from = %s, to = %s)\n", symname, source)); + res = getAbsPath(source, &absSource); if (res < 0) { goto exit; } - res = HgfsSymlink(absto, absfrom); + LOG(4, ("symname = %s, abs source = %s)\n", symname, absSource)); + res = HgfsSymlink(absSource, symname); exit: LOG(4, ("Exit(%d)\n", res)); - freeAbsPath(absfrom); - freeAbsPath(absto); + freeAbsPath(absSource); return res; } @@ -621,7 +621,10 @@ hgfs_rename(const char *from, //IN: from path name } res = HgfsRename(absfrom, absto); - HgfsInvalidateAttrCache(absfrom); + if (res == 0) { + HgfsInvalidateAttrCache(absfrom); + HgfsInvalidateAttrCache(absto); + } exit: LOG(4, ("Exit(%d)\n", res)); @@ -1136,7 +1139,14 @@ hgfs_write(const char *path, //IN: path to a file } res = HgfsWrite(fi, buf, size, offset); - HgfsInvalidateAttrCache(abspath); + if (res >= 0) { + /* + * Positive result indicates the number of bytes written. + * For zero bytes and no error, we still purge the cache + * this could effect the attributes. + */ + HgfsInvalidateAttrCache(abspath); + } exit: LOG(4, ("Exit(%d)\n", res)); @@ -1292,12 +1302,19 @@ hgfs_destroy(void *data) // IN: unused LOG(4, ("Entry()\n")); res = HgfsDestroySession(); - free(gState->basePath); - if (res < 0) { LOG(4, ("Destroy session failed. error = %d\n", res)); } + HgfsTransportExit(); + + free(gState->basePath); + + if (gState->conf != NULL) { + g_key_file_free(gState->conf); + gState->conf = NULL; + } + LOG(4, ("Exit()\n")); } @@ -1368,7 +1385,7 @@ main(int argc, //IN: Argument count HgfsResetOps(); res = HgfsTransportInit(); if (res != 0) { - LOG(4, ("Main: Error in HgfsTransportInit %d\n", res)); + fprintf(stderr, "Error %d cannot open connection!\n", res); return res; } HgfsInitCache(); diff --git a/open-vm-tools/vmhgfs-fuse/module.h b/open-vm-tools/vmhgfs-fuse/module.h index 922120e08..7d0f1b01d 100644 --- a/open-vm-tools/vmhgfs-fuse/module.h +++ b/open-vm-tools/vmhgfs-fuse/module.h @@ -34,7 +34,7 @@ #include "vm_assert.h" #include "cpName.h" #include "cpNameLite.h" -#include "hgfsUtil.h" +#include "hgfsDevLinux.h" #include "request.h" #include "fsutil.h" #include "filesystem.h" diff --git a/open-vm-tools/vmhgfs-fuse/session.c b/open-vm-tools/vmhgfs-fuse/session.c index 0f4e51ed1..3fba65dbd 100644 --- a/open-vm-tools/vmhgfs-fuse/session.c +++ b/open-vm-tools/vmhgfs-fuse/session.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2015 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmhgfs-fuse/session.h b/open-vm-tools/vmhgfs-fuse/session.h index cfed2d0a3..88ef3b71a 100644 --- a/open-vm-tools/vmhgfs-fuse/session.h +++ b/open-vm-tools/vmhgfs-fuse/session.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2015 VMware, Inc. All rights reserved. + * Copyright (C) 2015-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmhgfs-fuse/transport.c b/open-vm-tools/vmhgfs-fuse/transport.c index 4878d3689..9f3f4325b 100644 --- a/open-vm-tools/vmhgfs-fuse/transport.c +++ b/open-vm-tools/vmhgfs-fuse/transport.c @@ -40,9 +40,11 @@ static HgfsTransportChannel *gHgfsActiveChannel; /* Current active channel. */ static pthread_mutex_t gHgfsActiveChannelLock; /* Current active channel lock. */ +static Bool gHgfsActiveChannelLockInited; static struct list_head gHgfsPendingRequests; /* Pending requests queue. */ static pthread_mutex_t gHgfsPendingRequestsLock; /* Pending requests queue lock. */ +static Bool gHgfsPendingRequestsLockInited; #define HgfsRequestId(req) ((HgfsRequest *)req)->id @@ -61,7 +63,7 @@ static void HgfsTransportChannelClose(HgfsTransportChannel **channel); * Open a new workable channel. * * Results: - * TRUE on success and the new channel, otherwise FALSE and NULL. + * 0 on success and the new channel, otherwise -ENOTCONN and NULL. * * Side effects: * None @@ -69,17 +71,18 @@ static void HgfsTransportChannelClose(HgfsTransportChannel **channel); *---------------------------------------------------------------------- */ -static Bool +static int HgfsTransportChannelOpen(HgfsTransportChannel **channel) // IN: active channel { - Bool result = FALSE; + int result = 0; *channel = HgfsBdChannelInit(); if (NULL != *channel) { - if ((*channel)->ops.open(*channel)) { - result = TRUE; - } else { + HgfsChannelStatus status = (*channel)->ops.open(*channel); + if (status != HGFS_CHANNEL_CONNECTED) { HgfsTransportChannelClose(channel); + result = -ENOTCONN; + *channel = NULL; } } @@ -138,9 +141,14 @@ static Bool HgfsTransportChannelReset(HgfsTransportChannel **channel) // IN: active channel { Bool ret = FALSE; + int openResult; + HgfsTransportChannelClose(channel); - ret = HgfsTransportChannelOpen(channel); - LOG(8, ("Result: %s.\n", ret ? "TRUE" : "FALSE")); + openResult = HgfsTransportChannelOpen(channel); + if (openResult == 0) { + ret = TRUE; + } + LOG(8, ("Result: %d: %s.\n",openResult, ret ? "TRUE" : "FALSE")); return ret; } @@ -321,10 +329,11 @@ HgfsTransportSendRequest(HgfsReq *req) // IN: Request to send pthread_mutex_lock(&gHgfsActiveChannelLock); /* Try opening the channel. */ - if (NULL == gHgfsActiveChannel && - !HgfsTransportChannelOpen(&gHgfsActiveChannel)) { - pthread_mutex_unlock(&gHgfsActiveChannelLock); - return -EPROTO; + if (NULL == gHgfsActiveChannel) { + ret = HgfsTransportChannelOpen(&gHgfsActiveChannel); + if (ret != 0) { + goto exit; + } } ASSERT(gHgfsActiveChannel->ops.send); @@ -335,12 +344,12 @@ HgfsTransportSendRequest(HgfsReq *req) // IN: Request to send if (ret < 0) { LOG(4, ("Send failed, status = %d. Try reopening the channel ...\n", ret)); - if (gHgfsActiveChannel->ops.open(gHgfsActiveChannel) && - HgfsTransportChannelReset(&gHgfsActiveChannel)) { + if (HgfsTransportChannelReset(&gHgfsActiveChannel)) { ret = gHgfsActiveChannel->ops.send(gHgfsActiveChannel, req); } } +exit: ASSERT(req->state == HGFS_REQ_STATE_COMPLETED || req->state == HGFS_REQ_STATE_SUBMITTED || req->state == HGFS_REQ_STATE_UNSENT); @@ -366,7 +375,7 @@ HgfsTransportSendRequest(HgfsReq *req) // IN: Request to send * connected socket. * * Results: - * Zero on success and negative one on failure. + * Zero on success and negative error on failure. * * Side effects: * None @@ -378,17 +387,33 @@ int HgfsTransportInit(void) { int res; + + gHgfsActiveChannel = NULL; + gHgfsPendingRequestsLockInited = FALSE; + gHgfsActiveChannelLockInited = FALSE; INIT_LIST_HEAD(&gHgfsPendingRequests); + res = pthread_mutex_init(&gHgfsPendingRequestsLock, NULL); - if( res != 0) { - return -1; + if (res != 0) { + res = -res; + goto exit; } + gHgfsPendingRequestsLockInited = TRUE; + res = pthread_mutex_init(&gHgfsActiveChannelLock, NULL); - if( res != 0) { - return -1; + if (res != 0) { + res = -res; + goto exit; } - gHgfsActiveChannel = NULL; - return 0; + gHgfsActiveChannelLockInited = TRUE; + + res = HgfsTransportChannelOpen(&gHgfsActiveChannel); + +exit: + if (res != 0) { + HgfsTransportExit(); + } + return res; } @@ -412,10 +437,21 @@ void HgfsTransportExit(void) { LOG(8, ("Entered.\n")); - pthread_mutex_lock(&gHgfsActiveChannelLock); - HgfsTransportChannelClose(&gHgfsActiveChannel); - pthread_mutex_unlock(&gHgfsActiveChannelLock); + + if (gHgfsActiveChannelLockInited) { + pthread_mutex_lock(&gHgfsActiveChannelLock); + HgfsTransportChannelClose(&gHgfsActiveChannel); + pthread_mutex_unlock(&gHgfsActiveChannelLock); + + pthread_mutex_destroy(&gHgfsActiveChannelLock); + gHgfsActiveChannelLockInited = FALSE; + } ASSERT(list_empty(&gHgfsPendingRequests)); + + if (gHgfsPendingRequestsLockInited) { + pthread_mutex_destroy(&gHgfsPendingRequestsLock); + gHgfsPendingRequestsLockInited = FALSE; + } LOG(8, ("Exited.\n")); } diff --git a/open-vm-tools/vmhgfs-fuse/transport.h b/open-vm-tools/vmhgfs-fuse/transport.h index f623fe18c..e8d92e05b 100644 --- a/open-vm-tools/vmhgfs-fuse/transport.h +++ b/open-vm-tools/vmhgfs-fuse/transport.h @@ -26,24 +26,24 @@ #include "request.h" #include +typedef enum { + HGFS_CHANNEL_UNINITIALIZED, + HGFS_CHANNEL_NOTCONNECTED, + HGFS_CHANNEL_CONNECTED, +} HgfsChannelStatus; + /* * There are the operations a channel should implement. */ struct HgfsTransportChannel; typedef struct HgfsTransportChannelOps { - Bool (*open)(struct HgfsTransportChannel *); + HgfsChannelStatus (*open)(struct HgfsTransportChannel *); void (*close)(struct HgfsTransportChannel *); int (*send)(struct HgfsTransportChannel *, HgfsReq *); int (*recv)(struct HgfsTransportChannel *, char **, size_t *); void (*exit)(struct HgfsTransportChannel *); } HgfsTransportChannelOps; -typedef enum { - HGFS_CHANNEL_UNINITIALIZED, - HGFS_CHANNEL_NOTCONNECTED, - HGFS_CHANNEL_CONNECTED, -} HgfsChannelStatus; - typedef struct HgfsTransportChannel { const char *name; /* Channel name. */ HgfsTransportChannelOps ops; /* Channel ops. */ diff --git a/open-vm-tools/vmhgfs-fuse/vmhgfs_version.h b/open-vm-tools/vmhgfs-fuse/vmhgfs_version.h index 84a324568..893c79247 100644 --- a/open-vm-tools/vmhgfs-fuse/vmhgfs_version.h +++ b/open-vm-tools/vmhgfs-fuse/vmhgfs_version.h @@ -25,8 +25,8 @@ #ifndef _VMHGFS_VERSION_H_ #define _VMHGFS_VERSION_H_ -#define VMHGFS_DRIVER_VERSION 1.6.2.0 -#define VMHGFS_DRIVER_VERSION_COMMAS 1,6,2,0 -#define VMHGFS_DRIVER_VERSION_STRING "1.6.2.0" +#define VMHGFS_DRIVER_VERSION 1.6.5.0 +#define VMHGFS_DRIVER_VERSION_COMMAS 1,6,5,0 +#define VMHGFS_DRIVER_VERSION_STRING "1.6.5.0" #endif /* _VMHGFS_VERSION_H_ */ diff --git a/open-vm-tools/vmware-user-suid-wrapper/Makefile.am b/open-vm-tools/vmware-user-suid-wrapper/Makefile.am index 79efbf962..882fbdfee 100644 --- a/open-vm-tools/vmware-user-suid-wrapper/Makefile.am +++ b/open-vm-tools/vmware-user-suid-wrapper/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/vmware-user-suid-wrapper/Makefile.in b/open-vm-tools/vmware-user-suid-wrapper/Makefile.in deleted file mode 100644 index 8870b3a85..000000000 --- a/open-vm-tools/vmware-user-suid-wrapper/Makefile.in +++ /dev/null @@ -1,599 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-user-suid-wrapper$(EXEEXT) -subdir = vmware-user-suid-wrapper -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(autostartdir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_user_suid_wrapper_OBJECTS = main.$(OBJEXT) \ - wrapper-@TARGET_OS@.$(OBJEXT) -vmware_user_suid_wrapper_OBJECTS = \ - $(am_vmware_user_suid_wrapper_OBJECTS) -vmware_user_suid_wrapper_DEPENDENCIES = \ - ../lib/vmSignal/libVmSignal.la -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_user_suid_wrapper_SOURCES) -DIST_SOURCES = $(vmware_user_suid_wrapper_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -autostartDATA_INSTALL = $(INSTALL_DATA) -DATA = $(autostart_DATA) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -DVMTOOLSD_PATH=\"$(bindir)/vmtoolsd\" -vmware_user_suid_wrapper_SOURCES = main.c wrapper-@TARGET_OS@.c -vmware_user_suid_wrapper_LDADD = ../lib/vmSignal/libVmSignal.la -desktopfile = vmware-user.desktop -desktopfilesrc = $(top_srcdir)/vmware-user-suid-wrapper/vmware-user.desktop.in -autostartdir = $(sysconfdir)/xdg/autostart -autostart_DATA = $(desktopfile) -CLEANFILES = $(desktopfile) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vmware-user-suid-wrapper/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu vmware-user-suid-wrapper/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-user-suid-wrapper$(EXEEXT): $(vmware_user_suid_wrapper_OBJECTS) $(vmware_user_suid_wrapper_DEPENDENCIES) - @rm -f vmware-user-suid-wrapper$(EXEEXT) - $(LINK) $(vmware_user_suid_wrapper_OBJECTS) $(vmware_user_suid_wrapper_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrapper-@TARGET_OS@.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-autostartDATA: $(autostart_DATA) - @$(NORMAL_INSTALL) - test -z "$(autostartdir)" || $(MKDIR_P) "$(DESTDIR)$(autostartdir)" - @list='$(autostart_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(autostartDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(autostartdir)/$$f'"; \ - $(autostartDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(autostartdir)/$$f"; \ - done - -uninstall-autostartDATA: - @$(NORMAL_UNINSTALL) - @list='$(autostart_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(autostartdir)/$$f'"; \ - rm -f "$(DESTDIR)$(autostartdir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) $(DATA) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(autostartdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-autostartDATA - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-autostartDATA uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-autostartDATA install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-autostartDATA \ - uninstall-binPROGRAMS - - -$(desktopfile): $(desktopfilesrc) - sed 's,_bindir_,$(bindir),' $(desktopfilesrc) > $(desktopfile) -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/vmware-user-suid-wrapper/main.c b/open-vm-tools/vmware-user-suid-wrapper/main.c index c2d75cfc3..b300611d5 100644 --- a/open-vm-tools/vmware-user-suid-wrapper/main.c +++ b/open-vm-tools/vmware-user-suid-wrapper/main.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmware-user-suid-wrapper/wrapper-freebsd.c b/open-vm-tools/vmware-user-suid-wrapper/wrapper-freebsd.c index 7e8d9c44f..6dfc69dec 100644 --- a/open-vm-tools/vmware-user-suid-wrapper/wrapper-freebsd.c +++ b/open-vm-tools/vmware-user-suid-wrapper/wrapper-freebsd.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmware-user-suid-wrapper/wrapper-linux.c b/open-vm-tools/vmware-user-suid-wrapper/wrapper-linux.c index 67fd9485c..6467cea4b 100644 --- a/open-vm-tools/vmware-user-suid-wrapper/wrapper-linux.c +++ b/open-vm-tools/vmware-user-suid-wrapper/wrapper-linux.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmware-user-suid-wrapper/wrapper-solaris.c b/open-vm-tools/vmware-user-suid-wrapper/wrapper-solaris.c index 78cc622e5..36f8d3c97 100644 --- a/open-vm-tools/vmware-user-suid-wrapper/wrapper-solaris.c +++ b/open-vm-tools/vmware-user-suid-wrapper/wrapper-solaris.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmware-user-suid-wrapper/wrapper.h b/open-vm-tools/vmware-user-suid-wrapper/wrapper.h index c021e97f1..82b4ee959 100644 --- a/open-vm-tools/vmware-user-suid-wrapper/wrapper.h +++ b/open-vm-tools/vmware-user-suid-wrapper/wrapper.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/vmware-user-suid-wrapper/wrapper_version.h b/open-vm-tools/vmware-user-suid-wrapper/wrapper_version.h index 3d51ffe53..e54b90446 100644 --- a/open-vm-tools/vmware-user-suid-wrapper/wrapper_version.h +++ b/open-vm-tools/vmware-user-suid-wrapper/wrapper_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/xferlogs/Makefile.am b/open-vm-tools/xferlogs/Makefile.am index c04df724e..cfe490851 100644 --- a/open-vm-tools/xferlogs/Makefile.am +++ b/open-vm-tools/xferlogs/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. +### Copyright (C) 2007-2016 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as diff --git a/open-vm-tools/xferlogs/Makefile.in b/open-vm-tools/xferlogs/Makefile.in deleted file mode 100644 index f23201923..000000000 --- a/open-vm-tools/xferlogs/Makefile.in +++ /dev/null @@ -1,565 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -################################################################################ -### Copyright (C) 2007-2015 VMware, Inc. All rights reserved. -### -### This program is free software; you can redistribute it and/or modify -### it under the terms of version 2 of the GNU General Public License as -### published by the Free Software Foundation. -### -### 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, write to the Free Software -### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -################################################################################ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = vmware-xferlogs$(EXEEXT) -@HAVE_ICU_TRUE@am__append_1 = @ICU_LIBS@ -subdir = xferlogs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/vmtools.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_vmware_xferlogs_OBJECTS = xferlogs.$(OBJEXT) -vmware_xferlogs_OBJECTS = $(am_vmware_xferlogs_OBJECTS) -am__DEPENDENCIES_1 = -vmware_xferlogs_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(vmware_xferlogs_SOURCES) -DIST_SOURCES = $(vmware_xferlogs_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMMON_PLUGIN_INSTALLDIR = @COMMON_PLUGIN_INSTALLDIR@ -COMMON_XLIBS = @COMMON_XLIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CUNIT_CPPFLAGS = @CUNIT_CPPFLAGS@ -CUNIT_LIBS = @CUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DNET_CPPFLAGS = @DNET_CPPFLAGS@ -DNET_LIBS = @DNET_LIBS@ -DOT = @DOT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FUSE_CPPFLAGS = @FUSE_CPPFLAGS@ -FUSE_LIBS = @FUSE_LIBS@ -GLIB2_CPPFLAGS = @GLIB2_CPPFLAGS@ -GLIB2_LIBS = @GLIB2_LIBS@ -GMODULE_CPPFLAGS = @GMODULE_CPPFLAGS@ -GMODULE_LIBS = @GMODULE_LIBS@ -GOBJECT_CPPFLAGS = @GOBJECT_CPPFLAGS@ -GOBJECT_LIBS = @GOBJECT_LIBS@ -GREP = @GREP@ -GTHREAD_CPPFLAGS = @GTHREAD_CPPFLAGS@ -GTHREAD_LIBS = @GTHREAD_LIBS@ -GTKMM_CPPFLAGS = @GTKMM_CPPFLAGS@ -GTKMM_LIBS = @GTKMM_LIBS@ -GTK_CPPFLAGS = @GTK_CPPFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVE_DOT = @HAVE_DOT@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ -HGFS_LIBS = @HGFS_LIBS@ -ICU_CPPFLAGS = @ICU_CPPFLAGS@ -ICU_LIBS = @ICU_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTVMSG = @INSTVMSG@ -KERNEL_RELEASE = @KERNEL_RELEASE@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBVMTOOLS_LIBADD = @LIBVMTOOLS_LIBADD@ -LIB_AUTH_CPPFLAGS = @LIB_AUTH_CPPFLAGS@ -LIB_IMPERSONATE_CPPFLAGS = @LIB_IMPERSONATE_CPPFLAGS@ -LIB_USER_CPPFLAGS = @LIB_USER_CPPFLAGS@ -LINUXINCLUDE = @LINUXINCLUDE@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MODULES = @MODULES@ -MODULES_DIR = @MODULES_DIR@ -MODULES_OS = @MODULES_OS@ -MSCGEN = @MSCGEN@ -MSCGEN_DIR = @MSCGEN_DIR@ -MSPACK_CPPFLAGS = @MSPACK_CPPFLAGS@ -MSPACK_LIBS = @MSPACK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_CPPFLAGS = @PAM_CPPFLAGS@ -PAM_LIBS = @PAM_LIBS@ -PAM_PREFIX = @PAM_PREFIX@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ -PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ -PROCPS_CPPFLAGS = @PROCPS_CPPFLAGS@ -PROCPS_LIBS = @PROCPS_LIBS@ -RANLIB = @RANLIB@ -RPCGEN = @RPCGEN@ -RPCGENFLAGS = @RPCGENFLAGS@ -RPCGEN_WRAPPER = @RPCGEN_WRAPPER@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -SYSDIR = @SYSDIR@ -TARGET_OS = @TARGET_OS@ -TEST_PLUGIN_INSTALLDIR = @TEST_PLUGIN_INSTALLDIR@ -TOOLS_VERSION = @TOOLS_VERSION@ -VERSION = @VERSION@ -VGAUTH_LIBADD = @VGAUTH_LIBADD@ -VIX_LIBADD = @VIX_LIBADD@ -VMSVC_PLUGIN_INSTALLDIR = @VMSVC_PLUGIN_INSTALLDIR@ -VMTOOLS_CPPFLAGS = @VMTOOLS_CPPFLAGS@ -VMTOOLS_LIBS = @VMTOOLS_LIBS@ -VMUSR_PLUGIN_INSTALLDIR = @VMUSR_PLUGIN_INSTALLDIR@ -XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ -XDR_LIBS = @XDR_LIBS@ -XERCES_CPPFLAGS = @XERCES_CPPFLAGS@ -XERCES_LIBS = @XERCES_LIBS@ -XMKMF = @XMKMF@ -XMLSECURITY_CPPFLAGS = @XMLSECURITY_CPPFLAGS@ -XMLSECURITY_LIBS = @XMLSECURITY_LIBS@ -XSM_LIBS = @XSM_LIBS@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_vmw_lib_cfg = @ac_vmw_lib_cfg@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_cxx = @have_cxx@ -have_doxygen = @have_doxygen@ -have_genmarshal = @have_genmarshal@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -vmware_xferlogs_LDADD = @VMTOOLS_LIBS@ $(am__append_1) -vmware_xferlogs_SOURCES = xferlogs.c -@HAVE_ICU_FALSE@vmware_xferlogs_LINK = $(LINK) -@HAVE_ICU_TRUE@vmware_xferlogs_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ -@HAVE_ICU_TRUE@ $(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) \ -@HAVE_ICU_TRUE@ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xferlogs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu xferlogs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -vmware-xferlogs$(EXEEXT): $(vmware_xferlogs_OBJECTS) $(vmware_xferlogs_DEPENDENCIES) - @rm -f vmware-xferlogs$(EXEEXT) - $(vmware_xferlogs_LINK) $(vmware_xferlogs_OBJECTS) $(vmware_xferlogs_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xferlogs.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/open-vm-tools/xferlogs/xferlogs.c b/open-vm-tools/xferlogs/xferlogs.c index b1f770168..0f1290bd4 100644 --- a/open-vm-tools/xferlogs/xferlogs.c +++ b/open-vm-tools/xferlogs/xferlogs.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published diff --git a/open-vm-tools/xferlogs/xferlogs_version.h b/open-vm-tools/xferlogs/xferlogs_version.h index 58576749d..21d9fcbae 100644 --- a/open-vm-tools/xferlogs/xferlogs_version.h +++ b/open-vm-tools/xferlogs/xferlogs_version.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2015 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published