2013-08-21 11:26:09 +05:30
|
|
|
#!/usr/bin/python
|
2013-08-26 00:23:59 +05:30
|
|
|
|
2013-08-21 11:26:09 +05:30
|
|
|
import argparse
|
|
|
|
|
2013-08-26 00:23:59 +05:30
|
|
|
from apparmor.tools import *
|
2013-08-21 11:26:09 +05:30
|
|
|
|
|
|
|
parser = argparse.ArgumentParser(description='Disable the profile for the given programs')
|
|
|
|
parser.add_argument('-d', type=str, help='path to profiles')
|
2013-08-26 00:23:59 +05:30
|
|
|
parser.add_argument('-r', '--revert', action='store_true', help='enable the profile for the given programs')
|
|
|
|
parser.add_argument('program', type=str, nargs='+', help='name of program')
|
2013-08-21 11:26:09 +05:30
|
|
|
args = parser.parse_args()
|
|
|
|
|
2013-08-26 00:23:59 +05:30
|
|
|
disable = aa_tools('disable', args)
|
2013-08-21 11:26:09 +05:30
|
|
|
|
2013-08-26 00:23:59 +05:30
|
|
|
disable.act()
|
2013-08-21 11:26:09 +05:30
|
|
|
|