parser: misleading file and line number in error report

Bug #588014 reported by Arkadiusz Miśkiewicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
Fix Released
Medium
Kees Cook
2.5
Fix Released
High
Unassigned

Bug Description

I got "AppArmor parser error in /etc/apparmor.d/usr.sbin.httpd.prefork at line 93616: Could not open '(null)'" once (this is lp bug 588012 but that's not important).

The problem is with reported file name and line number in this message.

/etc/apparmor.d/usr.sbin.httpd.prefork contains only 101 lines(!) but it uses #include a lot and it includes quite big file with over 11000 lines. Still, no idea where 93616 came from. Likely because that huge file also does over 1300 #includes which in total, if concatenate all that includes files could be so big as almost 100 000 lines.

Anyway apparmo parser should be smarter and report correct file name and correct line number.

Related branches

Revision history for this message
Arkadiusz Miśkiewicz (arekm) wrote :

That was Apparmor parser 2.5 of course aka latest "mature".

Revision history for this message
Kees Cook (kees) wrote :

Thanks for the reminder! Yes, this has been a problem since the parser was refactored to handle includes internally. Commit 1413 should fix this in future releases.

Changed in apparmor:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Kees Cook (kees)
milestone: none → 2.5.1
Revision history for this message
Steve Beattie (sbeattie) wrote :

Fix has been applied to trunk, closing on trunk task. Kees has nominated it for the 2.5.1 release; his fix still needs reviewing there.

Changed in apparmor:
milestone: 2.5.1 → none
status: Fix Committed → Fix Released
Revision history for this message
Steve Beattie (sbeattie) wrote :

AppArmor 2.5.1 has been released: https://launchpad.net/apparmor/2.5/2.5.1

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.