2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 18:17:09 +00:00
apparmor/Tools/aa-enforce.py

18 lines
487 B
Python
Raw Normal View History

#!/usr/bin/python
import argparse
from apparmor.tools import *
parser = argparse.ArgumentParser(description='Switch the given program to enforce mode')
parser.add_argument('-d', type=str, help='path to profiles')
parser.add_argument('-r', '--remove', action='store_true', help='remove enforce mode')
parser.add_argument('program', type=str, nargs='+', help='name of program')
args = parser.parse_args()
enforce = aa_tools('enforce', args)
enforce.check_profile_dir()
enforce.act()