ovaldi error: Unable to open a handle to the file... Error Code - 123

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ovaldi error: Unable to open a handle to the file... Error Code - 123

Dragos Prisaca-2

Hi,

 

OVALDI throws an error when evaluates the obj:718.  This is because variable var:234 returns the “path+file_name”: C:\Program Files\Winamp\winamp.exe.

I think this is related to OVAL 5.5 schema and believe this type of file_object can be clearly written in OVAL 6 by using the full “filepath” (please see “OVAL-DEVELOPER-LIST] Choice inside an OVAL Object” - http://oval.mitre.org/community/archives.html#nabble-td1485589).

 

    <file_object id="oval:org.mitre.oval:obj:718" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows">

      <path var_ref="oval:org.mitre.oval:var:234" var_check="all"/>

      <filename/>

    </file_object>

    <registry_object id="oval:org.mitre.oval:obj:719" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows">

      <hive>HKEY_LOCAL_MACHINE</hive>

      <key>SOFTWARE\Clients\Media\Winamp\shell\open\command</key>

      <name/>

    </registry_object>

    <local_variable id="oval:org.mitre.oval:var:234" comment="..." version="1" datatype="string">

      <object_component item_field="value" object_ref="oval:org.mitre.oval:obj:719"/>

    </local_variable>

 

OVALDI results:

- <collected_objects>

    - <object flag="error" id="oval:org.mitre.oval:obj:718" version="1">

        <oval-sc:message level="fatal">(FileProbe) Unable to open a handle to the file 'C:\Program Files\Winamp\winamp.exe\'. Error Code - 123</oval-sc:message>

    </object>

    - <object flag="complete" id="oval:org.mitre.oval:obj:719" version="1">

        <reference item_ref="1" />

    </object>

</collected_objects>

- <system_data>

    - <registry_item id="1" xmlns="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows">

        <hive>HKEY_LOCAL_MACHINE</hive>

        <key>SOFTWARE\Clients\Media\Winamp\shell\open\command</key>

        <name />

        <type>reg_sz</type>

        <value>C:\Program Files\Winamp\winamp.exe</value>

    </registry_item>

</system_data>

 

 

Regards,

Dragos Prisaca

Gideon Technologies, Inc.

Mobile: (703) 779-3554

[hidden email]

www.gideontechnologies.com

cid:image001.gif@01C9860F.2464B160

 

 

To unsubscribe, send an email message to [hidden email] with SIGNOFF OVAL-DISCUSSION-LIST in the BODY of the message. If you have difficulties, write to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: ovaldi error: Unable to open a handle to the file... Error Code - 123

Maneesh Jolly

Hi,

 

As it has already been mentioned that this error can be corrected using the “Choice” inside an OVAL object written in OVAL6. I think for this case another alternative is to change the way Ovaldi works for this scenario. OvalDi should check if filename is not available or is empty then it should use the path only without appending an extra “\” character.

Final file name (to be used in the APIs) should be calculated as:

= path + ‘\’ + filename [if both filename and path are not blank]

= path [if filename is blank and path is not blank]

= filename [if path is blank and filename is not]

 

I think it should not affect the overall behavior of file probe. Please correct me if I am wrong.

 

Regards,

Maneesh

 


From: Dragos Prisaca [mailto:[hidden email]]
Sent: Thursday, February 19, 2009 2:59 AM
To: [hidden email]
Subject: [OVAL-DISCUSSION-LIST] ovaldi error: Unable to open a handle to the file... Error Code - 123

 

Hi,

 

OVALDI throws an error when evaluates the obj:718.  This is because variable var:234 returns the “path+file_name”: C:\Program Files\Winamp\winamp.exe.

I think this is related to OVAL 5.5 schema and believe this type of file_object can be clearly written in OVAL 6 by using the full “filepath” (please see “OVAL-DEVELOPER-LIST] Choice inside an OVAL Object” - http://oval.mitre.org/community/archives.html#nabble-td1485589).

 

    <file_object id="oval:org.mitre.oval:obj:718" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows">

      <path var_ref="oval:org.mitre.oval:var:234" var_check="all"/>

      <filename/>

    </file_object>

    <registry_object id="oval:org.mitre.oval:obj:719" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows">

      <hive>HKEY_LOCAL_MACHINE</hive>

      <key>SOFTWARE\Clients\Media\Winamp\shell\open\command</key>

      <name/>

    </registry_object>

    <local_variable id="oval:org.mitre.oval:var:234" comment="..." version="1" datatype="string">

      <object_component item_field="value" object_ref="oval:org.mitre.oval:obj:719"/>

    </local_variable>

 

OVALDI results:

- <collected_objects>

    - <object flag="error" id="oval:org.mitre.oval:obj:718" version="1">

        <oval-sc:message level="fatal">(FileProbe) Unable to open a handle to the file 'C:\Program Files\Winamp\winamp.exe\'. Error Code - 123</oval-sc:message>

    </object>

    - <object flag="complete" id="oval:org.mitre.oval:obj:719" version="1">

        <reference item_ref="1" />

    </object>

</collected_objects>

- <system_data>

    - <registry_item id="1" xmlns="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows">

        <hive>HKEY_LOCAL_MACHINE</hive>

        <key>SOFTWARE\Clients\Media\Winamp\shell\open\command</key>

        <name />

        <type>reg_sz</type>

        <value>C:\Program Files\Winamp\winamp.exe</value>

    </registry_item>

</system_data>

 

 

Regards,

Dragos Prisaca

Gideon Technologies, Inc.

Mobile: (703) 779-3554

[hidden email]

www.gideontechnologies.com

cid:image001.gif@01C9860F.2464B160

 

 

To unsubscribe, send an email message to [hidden email] with SIGNOFF OVAL-DISCUSSION-LIST in the BODY of the message. If you have difficulties, write to [hidden email]. To unsubscribe, send an email message to [hidden email] with SIGNOFF OVAL-DISCUSSION-LIST in the BODY of the message. If you have difficulties, write to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: ovaldi error: Unable to open a handle to the file... Error Code - 123

Jon Baker
Administrator

You are both correct in that this is related to an open issue in OVAL 5. My personal belief is that this is something that could be fixed in a minor revision because it does not break backwards compatibility. I believe that the solution that Drew proposed for version 6 in his email (http://oval.mitre.org/community/archives.html#nabble-td1485589) is quite reasonable for version 5.6 or whatever the next minor version is. Drew did not receive any feedback on the developer list. If you are interested in seeing this change appear in a version before version 6 you should reply to drew’s message to see if there are others that would also like to see this fix implemented sooner than later.

 

Maneesh, your suggestion below is quite reasonable. My only hesitation about implementing it is that the interpreter is deliberately following the intent of the OVAL Language here. I am not sure I want to build this work around into the interpreter. I want the interpreter to be as closely aligned with the language as possible, for better or for worse... If people think this is a critical issue in the interpreter I will consider implementing the change and documenting the change a as a bug because it is a known deviation from the language spec.

 

Let me know what you think…

 

 

Jon

 

============================================

Jonathan O. Baker
G022 - IA Industry Collaboration
The MITRE Corporation
Email: [hidden email]

 

From: Maneesh Jolly [mailto:[hidden email]]
Sent: Thursday, February 19, 2009 10:44 AM
To: oval-discussion-list OVAL Discussion List/Closed Public Discussi
Subject: Re: [OVAL-DISCUSSION-LIST] ovaldi error: Unable to open a handle to the file... Error Code - 123

 

Hi,

 

As it has already been mentioned that this error can be corrected using the “Choice” inside an OVAL object written in OVAL6. I think for this case another alternative is to change the way Ovaldi works for this scenario. OvalDi should check if filename is not available or is empty then it should use the path only without appending an extra “\” character.

Final file name (to be used in the APIs) should be calculated as:

= path + ‘\’ + filename [if both filename and path are not blank]

= path [if filename is blank and path is not blank]

= filename [if path is blank and filename is not]

 

I think it should not affect the overall behavior of file probe. Please correct me if I am wrong.

 

Regards,

Maneesh

 


From: Dragos Prisaca [mailto:[hidden email]]
Sent: Thursday, February 19, 2009 2:59 AM
To: [hidden email]
Subject: [OVAL-DISCUSSION-LIST] ovaldi error: Unable to open a handle to the file... Error Code - 123

 

Hi,

 

OVALDI throws an error when evaluates the obj:718.  This is because variable var:234 returns the “path+file_name”: C:\Program Files\Winamp\winamp.exe.

I think this is related to OVAL 5.5 schema and believe this type of file_object can be clearly written in OVAL 6 by using the full “filepath” (please see “OVAL-DEVELOPER-LIST] Choice inside an OVAL Object” - http://oval.mitre.org/community/archives.html#nabble-td1485589).

 

    <file_object id="oval:org.mitre.oval:obj:718" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows">

      <path var_ref="oval:org.mitre.oval:var:234" var_check="all"/>

      <filename/>

    </file_object>

    <registry_object id="oval:org.mitre.oval:obj:719" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows">

      <hive>HKEY_LOCAL_MACHINE</hive>

      <key>SOFTWARE\Clients\Media\Winamp\shell\open\command</key>

      <name/>

    </registry_object>

    <local_variable id="oval:org.mitre.oval:var:234" comment="..." version="1" datatype="string">

      <object_component item_field="value" object_ref="oval:org.mitre.oval:obj:719"/>

    </local_variable>

 

OVALDI results:

- <collected_objects>

    - <object flag="error" id="oval:org.mitre.oval:obj:718" version="1">

        <oval-sc:message level="fatal">(FileProbe) Unable to open a handle to the file 'C:\Program Files\Winamp\winamp.exe\'. Error Code - 123</oval-sc:message>

    </object>

    - <object flag="complete" id="oval:org.mitre.oval:obj:719" version="1">

        <reference item_ref="1" />

    </object>

</collected_objects>

- <system_data>

    - <registry_item id="1" xmlns="http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#windows">

        <hive>HKEY_LOCAL_MACHINE</hive>

        <key>SOFTWARE\Clients\Media\Winamp\shell\open\command</key>

        <name />

        <type>reg_sz</type>

        <value>C:\Program Files\Winamp\winamp.exe</value>

    </registry_item>

</system_data>

 

 

Regards,

Dragos Prisaca

Gideon Technologies, Inc.

Mobile: (703) 779-3554

[hidden email]

www.gideontechnologies.com

cid:image001.gif@01C9860F.2464B160

 

 

To unsubscribe, send an email message to [hidden email] with SIGNOFF OVAL-DISCUSSION-LIST in the BODY of the message. If you have difficulties, write to [hidden email]. To unsubscribe, send an email message to [hidden email] with SIGNOFF OVAL-DISCUSSION-LIST in the BODY of the message. If you have difficulties, write to [hidden email].

To unsubscribe, send an email message to [hidden email] with SIGNOFF OVAL-DISCUSSION-LIST in the BODY of the message. If you have difficulties, write to [hidden email].