← Back to team overview

touch-packages team mailing list archive

[Bug 1370228] [NEW] init script returns 0 even after parsing failure

 

Public bug reported:

The apparmor init script (and likely the upstart job, but haven't
checked) returns exit code 0 even when a profile can't be loaded.

In /lib/apparmor/functions foreach_configured_profile first loads profiles from /etc/apparmor.d and then from /var/lib/apparmor/profiles.
Parsing errors in the first dir are ignored.

The attached patch returns the first non-zero return code or zero if
there are no errors.

** Affects: apparmor (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "apparmor_init_exit_code.diff"
   https://bugs.launchpad.net/bugs/1370228/+attachment/4205841/+files/apparmor_init_exit_code.diff

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apparmor in Ubuntu.
https://bugs.launchpad.net/bugs/1370228

Title:
  init script returns 0 even after parsing failure

Status in “apparmor” package in Ubuntu:
  New

Bug description:
  The apparmor init script (and likely the upstart job, but haven't
  checked) returns exit code 0 even when a profile can't be loaded.

  In /lib/apparmor/functions foreach_configured_profile first loads profiles from /etc/apparmor.d and then from /var/lib/apparmor/profiles.
  Parsing errors in the first dir are ignored.

  The attached patch returns the first non-zero return code or zero if
  there are no errors.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1370228/+subscriptions


Follow ups

References