Help with respect to smbios

Michael_E_Brown at Dell.com Michael_E_Brown at Dell.com
Fri Apr 28 17:02:14 CDT 2006


Ok, We can document the security initialization. I'll need to find a
good spot for that.

Does CoCreateInstance() only fail if the security is initialized wrong?
Does that mean that we only need one code change (don't raise exception
if CoInitializaeSecurity() returns RPC_E_TOO_LATE)?
--
Michael

> _____________________________________________ 
> From: 	Sakkariaz, Antony  
> Sent:	Friday, April 28, 2006 10:31 AM
> To:	Brown, Michael E
> Cc:	Singh, Mutum; libsmbios-devel at lists.us.dell.com
> Subject:	RE: Help with respect to smbios
> 
> Hello Michael,
> 
> Good morning.
> 
> I believe your first way is good.
> In this approach, libsmbios will call CoInitializeSecurity(), but if
> it fails (with RPC_E_TOO_LATE), then no exception is thrown.
> In this scenario, the application had initialized the security
> already.
> 
> However, I believe libsmbios needs the particular security settings
> for the subsequent COM calls (packet encryption, client impersonation,
> and secure reference count) to succeed.
> Therefore, if the application had initialized with default COM
> security, some of the subsequent calls (like CreateInstanceEnum())
> would fail.
> 
> This necessitates at least documenting somewhere, that if the client
> application that uses libsmbios makes use of COM before calling
> SmbiosWinWMIStrategy::getSmbiosTable(), it must initialize COM
> security with appropriate levels, during startup.
> 
> If the client application does not use COM, then there are no problems
> because CoInitializeSecurity() in libsmbios would succeed.
> 
> Kindly provide your thoughts, and please suggest how shall we proceed
> with respect to the changes in libsmbios.
> 
> Thanks,
> Antony
> 
> 
> _____________________________________________ 
> From: 	Brown, Michael E  
> Sent:	Thursday, April 27, 2006 9:32 PM
> To:	Sakkariaz, Antony
> Cc:	Singh, Mutum; 'libsmbios-devel at lists.us.dell.com'
> Subject:	RE: Help with respect to smbios
> 
> Antony,
> 	Thanks for digging into this so thoroughly. What would be really
> good is if we could get a patch into base libsmbios so that anybody
> can disable this with an API call rather than having to patch the
> source. There are two ways I can think of to do this.
> 
> 	The best way would be automatic fallback. First thing would be
> to remove the exception for when security initialization fails. Next,
> can you suggest a way we can automatically recover from the instance
> where CoCreateInstance() fails?
> 
> 	Another way to do this would be to pass in a parameter to the
> factory function saying not to initialize WMI. This requires people to
> know they are going to use WMI, though, so I don't like it as much.
> --
> Michael
> 
> 	_____________________________________________ 
> 	From: 	Sakkariaz, Antony  
> 	Sent:	Thursday, April 27, 2006 10:44 AM
> 	To:	Brown, Michael E
> 	Cc:	Singh, Mutum
> 	Subject:	RE: Help with respect to smbios
> 
> 	Hi,
> 
> 	Good morning!
> 
> 	After many tests, I found the reason:
> 	CoInitializeSecurity() call in GetWMISMBIOSEntry() fails
> (SmbiosStrategy_Windows.cpp), and throws exception.
> 	The error code is 80010119, which is RPC_E_TOO_LATE.
> 	This error occurs when already someone else had initialized
> security.
> 
> 	In PowerEdge Diagnostics, many components including vendor
> provided ones use WMI.
> 	So it is quite possible that they initialize security before we
> reach this point.
> 
> 	Commenting it out did not work either, because the call
> IWbemServices::CreateInstanceEnum fails.
> 
> 	Solution:
> 	Initialize COM security with the necessary flags at the
> beginning of the application.
> 	After I did this, AND commented out the exception throw
> statement in GetWMISMBIOSEntry(), the problem is solved.
> 
> 	Thanks,
> 	Antony
> 
> 
> 	_____________________________________________ 
> 	From: 	Sakkariaz, Antony  
> 	Sent:	Wednesday, April 26, 2006 8:08 PM
> 	To:	Brown, Michael E
> 	Cc:	Singh, Mutum
> 	Subject:	RE: Help with respect to smbios
> 
> 	This is on Windows.
> 	Yes I've logged in as administrator.
> 
> 	Are there any changes in smbios for 9G platforms?
> 
> 
> 	_____________________________________________ 
> 	From: 	Brown, Michael E  
> 	Sent:	Wednesday, April 26, 2006 8:04 PM
> 	To:	Sakkariaz, Antony
> 	Cc:	Singh, Mutum
> 	Subject:	RE: Help with respect to smbios
> 
> 	Are you running on windows or linux? Are you running with
> administrative privleges?
> 
> 		_____________________________________________ 
> 		From: 	Sakkariaz, Antony  
> 		Sent:	Wednesday, April 26, 2006 9:29 AM
> 		To:	Brown, Michael E
> 		Cc:	Singh, Mutum
> 		Subject:	Help with respect to smbios
> 
> 		Hi,
> 
> 		Good morning.
> 
> 		I am from PowerEdge Diagnostics team, and handle memory
> diagnostics.
> 		Memory diagnostics uses smbios interface to get
> information about the memory DIMMs.
> 
> 		When calling the getSingleton() method of SmbiosFactory,
> exception is thrown stating "Could not instantiate SMBIOS table."
> 		As the result, memory DIMM status could not be obtained.
> 
> 		Could you please let me know what might be the reason?
> 		If you need any information like logs, please let me
> know.
> 
> 		Interestingly, this problem occurs only in the GUI mode
> of the application, and not in CLI mode (PowerEdge Diagnostics
> supports both GUI and CLI modes of operation).
> 
> 		PowerEdge Diagnostics version used: 2.7
> 		Platform: PE2900 (Montreal)
> 		SMBIOS version: 0.10.6
> 
> 		Many thanks in advance for your help!
> 
> 		Regards,
> 		Antony
> 		 << File: version.mk >> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.us.dell.com/pipermail/libsmbios-devel/attachments/20060428/87d09b03/attachment.htm 


More information about the libsmbios-devel mailing list