#80 configuration parser fails on filenames w. UTF-8 characters

0.13
open
nobody
5
2009-11-16
2009-11-16
Thomas Dorner
No

With Ubuntu 9.10 (Karmic Koala) I got the version 0.13.1-10ubuntu5 and of course a lot of the system configuration changed. As I tried to reinitialise the database with aideinit (which is a wrapper that through another wrapper finally calls aide --init), I got the following message:

Running aide --init...
896:syntax error:Â
896:Error while reading configuration:Â
Configuration error
AIDE --init return code 17; see /var/lib/aide/aide.db.new for details

In the configuration file (automatically generated from a big set of small config files on Ubuntu) in line 896 I find two problematic entries:
/@@{ROOTPREFIX}dev/input/by-id/usb-Microsoft_Microsoft_Wireless_Optical_Mouse®_1.0A-event-mouse$ RamdiskData
/@@{ROOTPREFIX}dev/input/by-id/usb-Microsoft_Microsoft_Wireless_Optical_Mouse®_1.0A-mouse$ RamdiskData

While this is surely a questionable filename, it is system generated and aide should be able to understand it (especially as my locale while doing this is en_GB.UTF-8).

To maybe ease analysing the problem, here both outputs again as hexdumps (the byte with the value c2 is the critical one):
aideinit 2>&1 | hexdump
00000000: 5275 6e6e 696e 6720 6169 6465 202d 2d69 |Running aide --i|
00000010: 6e69 742e 2e2e 0a38 3936 3a73 796e 7461 |nit....896:synta|
00000020: 7820 6572 726f 723a c20a 3839 363a 4572 |x error:..896:Er|
00000030: 726f 7220 7768 696c 6520 7265 6164 696e |ror while readin|
00000040: 6720 636f 6e66 6967 7572 6174 696f 6e3a |g configuration:|
00000050: c20a 436f 6e66 6967 7572 6174 696f 6e20 |..Configuration |
00000060: 6572 726f 720a 4149 4445 202d 2d69 6e69 |error.AIDE --ini|
00000070: 7420 7265 7475 726e 2063 6f64 6520 3137 |t return code 17|
00000080: 3b20 7365 6520 2f76 6172 2f6c 6962 2f61 |; see /var/lib/a|
00000090: 6964 652f 6169 6465 2e64 622e 6e65 7720 |ide/aide.db.new |
000000a0: 666f 7220 6465 7461 696c 730a |for details.|
000000ac 0123456789abcdef

ls /dev/input/by-id/usb-Microsoft_* | hexdump
00000000: 2f64 6576 2f69 6e70 7574 2f62 792d 6964 |/dev/input/by-id|
00000010: 2f75 7362 2d4d 6963 726f 736f 6674 5f4d |/usb-Microsoft_M|
00000020: 6963 726f 736f 6674 5f57 6972 656c 6573 |icrosoft_Wireles|
00000030: 735f 4f70 7469 6361 6c5f 4d6f 7573 65c2 |s_Optical_Mouse.|
00000040: ae5f 312e 3041 2d65 7665 6e74 2d6d 6f75 |._1.0A-event-mou|
00000050: 7365 0a2f 6465 762f 696e 7075 742f 6279 |se./dev/input/by|
00000060: 2d69 642f 7573 622d 4d69 6372 6f73 6f66 |-id/usb-Microsof|
00000070: 745f 4d69 6372 6f73 6f66 745f 5769 7265 |t_Microsoft_Wire|
00000080: 6c65 7373 5f4f 7074 6963 616c 5f4d 6f75 |less_Optical_Mou|
00000090: 7365 c2ae 5f31 2e30 412d 6d6f 7573 650a |se.._1.0A-mouse.|
000000a0 0123456789abcdef

Discussion