[Touch-packages] [Bug 1564625] Re: aa-complain exits 0 when path not found

2016-07-22 Thread Chris Holcombe
So I dug into this with pydb and figured out what's going on.
utils/apparmor/tools.py lines 79 and 81 need to be changed to
fatal_error(message).  I tried both fatal_error and also sys.exit(1) and
aa-complain seems to ignore it and still exit 0.  I'm not exactly sure
why though.  It seems there's a custom sys exit handler in place that is
messing with it.  Does anyone know what I should change it to?  I'll put
in the change and the merge request :)

-- 
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/1564625

Title:
  aa-complain exits 0 when path not found

Status in AppArmor:
  Confirmed
Status in One Hundred Papercuts:
  Confirmed
Status in apparmor package in Ubuntu:
  Confirmed

Bug description:
  I'm using juju to deploy apparmor profiles and I've found that when
  the apparmor path isn't found the command still exists 0.  If this
  exited with a non zero status I could detect I had a problem in my
  code and take action :)

  root@ip-172-31-29-100:/etc/apparmor.d/local# aa-complain foo
  Can't find foo in the system path list. If the name of the application
  is correct, please run 'which foo' as a user with correct PATH
  environment set up in order to find the fully-qualified path and
  use the full path as parameter.
  root@ip-172-31-29-100:/etc/apparmor.d/local# echo $?
  0

  Some context on the environment:
  root@ip-172-31-29-100:/etc/apparmor.d/local# cat /etc/issue
  Ubuntu 14.04.4 LTS \n \l

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1564625] [NEW] aa-complain exits 0 when path not found

2016-03-31 Thread Chris Holcombe
Public bug reported:

I'm using juju to deploy apparmor profiles and I've found that when the
apparmor path isn't found the command still exists 0.  If this exited
with a non zero status I could detect I had a problem in my code and
take action :)

root@ip-172-31-29-100:/etc/apparmor.d/local# aa-complain foo
Can't find foo in the system path list. If the name of the application
is correct, please run 'which foo' as a user with correct PATH
environment set up in order to find the fully-qualified path and
use the full path as parameter.
root@ip-172-31-29-100:/etc/apparmor.d/local# echo $?
0

Some context on the environment:
root@ip-172-31-29-100:/etc/apparmor.d/local# cat /etc/issue
Ubuntu 14.04.4 LTS \n \l

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


** Tags: trusty

** Tags added: trusty

** Description changed:

  I'm using juju to deploy apparmor profiles and I've found that when the
  apparmor path isn't found the command still exists 0.  If this exited
  with a non zero status I could detect I had a problem in my code and
  take action :)
  
  root@ip-172-31-29-100:/etc/apparmor.d/local# aa-complain foo
  Can't find foo in the system path list. If the name of the application
  is correct, please run 'which foo' as a user with correct PATH
  environment set up in order to find the fully-qualified path and
  use the full path as parameter.
  root@ip-172-31-29-100:/etc/apparmor.d/local# echo $?
  0
+ 
+ Some context on the environment:
+ root@ip-172-31-29-100:/etc/apparmor.d/local# cat /etc/issue
+ Ubuntu 14.04.4 LTS \n \l

-- 
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/1564625

Title:
  aa-complain exits 0 when path not found

Status in apparmor package in Ubuntu:
  New

Bug description:
  I'm using juju to deploy apparmor profiles and I've found that when
  the apparmor path isn't found the command still exists 0.  If this
  exited with a non zero status I could detect I had a problem in my
  code and take action :)

  root@ip-172-31-29-100:/etc/apparmor.d/local# aa-complain foo
  Can't find foo in the system path list. If the name of the application
  is correct, please run 'which foo' as a user with correct PATH
  environment set up in order to find the fully-qualified path and
  use the full path as parameter.
  root@ip-172-31-29-100:/etc/apparmor.d/local# echo $?
  0

  Some context on the environment:
  root@ip-172-31-29-100:/etc/apparmor.d/local# cat /etc/issue
  Ubuntu 14.04.4 LTS \n \l

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp