logprof/genprof: glob generates wrong result in some cases

Bug #1181812 reported by Christian Boltz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
Fix Released
Undecided
Unassigned

Bug Description

From a logprof run:

I used "glob with (e)xt" until I had
  4 - /home/**.jpg
 [5 - /**.jpg]

After that, I pressed "(g)lob", which resulted in
  4 - /home/**.jpg
  5 - /**.jpg
 [6 - /*]

Option 6 should be /**, not /*

Revision history for this message
Kshitij Gupta (kgupta8592) wrote :

Yes, this issue is mentioned as comments in the code in AppArmor.pm (line 3876) .

The programmer left a comment: # do we collapse to /* or /**

So apparently making this choice isn't a part of the code. Additional code has to be devised to identify this situation.

Revision history for this message
Kshitij Gupta (kgupta8592) wrote :

Sorry, that's line 3867.

Revision history for this message
Christian Boltz (cboltz) wrote :

The comment explains what the code does (which is a good thing because the regexes aren't easily readable).

Nevertheless, the code is slightly buggy. I'd _guess_ that we need to replace "/\*{1,2}" with "/\*{1,2}[^/]*" multiple times in lines 3866 to 3880.

Revision history for this message
Christian Boltz (cboltz) wrote :

Thy python utils have the correct behaviour - therefore fixed in >= 2.8.95 (aka 2.9 beta1).

I doubt someone will fix this minor issue in the old perl code, which makes it a wontfix for the 2.8 branch.

Changed in apparmor:
status: New → Fix Released
milestone: none → 2.9.beta1
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.