Bug 97930

Summary: tripwire cannot parse report with utf-8 characters
Product: [Retired] Red Hat Linux Reporter: Patrice Dumas <dumas>
Component: tripwireAssignee: Florian La Roche <laroche>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-22 00:49:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Patrice Dumas 2003-06-24 08:07:01 UTC
Description of problem:

My locale is fr_FR.UTF-8.
When there is an utf-8 non ascii character in a report, 
tripwire --update fails with
Interactive Update failed.
### Error: Report file could not be parsed.  Report may be corrupt.
### Exiting...

The following line appears in the report and that seems to be the culprit 
to me:

15.  File system error.
     Filename: /var/lock/subsys/smb
     Aucun fichier ou répertoire de ce type

Version-Release number of selected component (if applicable):

I believe this is applicable to all the tripwire releases

How reproducible:

Always

Steps to Reproduce:
1. set the locale such that an accented letter appear in an error message
from the glibc, and make a tripwire policy file such that that message
appears in the report. 
It is quite easy to do that for french, a fresh install of tripwire should be
enough.
2. run tripwire --check to generate a report
3. run tripwire --update -r /var/lib/tripwire/report/report_file_name
Accept the changes (:wq if vi is your editor).
    
Actual results:

[root@zeus root]# tripwire --update -r
/var/lib/tripwire/report/zeus-20030623-194456.twr
Interactive Update failed.
### Error: Report file could not be parsed.  Report may be corrupt.
### Exiting...

Expected results:

Please enter your local passphrase:
Wrote database file: /var/lib/tripwire/zeus.twd

Additional info:

If I revert to a C locale, it works well:

[root@zeus root]# export LANG=C;  tripwire --update -r /var/lib/tripwire/report/
zeus-20030623-194456.twr
Please enter your local passphrase:
Wrote database file: /var/lib/tripwire/zeus.twd

In that case, in the report there is:
15.  File system error.
     Filename: /var/lock/subsys/smb
     Aucun fichier ou r\xc3\xa9pertoire de ce type

i.e. the hexadecimal representation of an e acute (\xc3\xa9) instead of the e
acute itself (é).

Comment 1 John Thacker 2006-04-22 00:49:26 UTC
Closing bug, since tripwire hasn't been shipped for so long, only in Legacy
releases.