On Thu, Mar 06, 2014 at 01:29:41PM +0100, Christian Boltz wrote: > Am Mittwoch, 5. März 2014 schrieb Steve Beattie: > > This patch splits out the genprof tool functionality into a separate > > command function, merging with the use_autodep function that already > > existed. > > > > Signed-off-by: Steve Beattie <[email protected]> > ... > > Index: b/utils/apparmor/tools.py > > =================================================================== > > --- a/utils/apparmor/tools.py > > +++ b/utils/apparmor/tools.py > ... > > @@ -209,6 +206,23 @@ class aa_tools: > > if cmd_info[0] != 0: > > raise apparmor.AppArmorException(cmd_info[1]) > > > > + def cmd_autodep(self): > > + for (program, profile) in self.get_next_to_profile(): > > + if not program: > > + aaui.UI_Info('Profile %s already exists - skipping.' > > % profile) > > + continue > > NAK - this breaks the --force option (assuming the error message is > correct - I didn't test it)
Not quite. When program is None but profile is not, it indicates that the user passed the profile on the command line and not the program. So --force will still work if you give the program name on the command line. I agree that the error message should be different/better. I hadn't looked to see if we have a function for digging the program name out of an existing profile, but I suppose that could happen for this situation, and --force would be required in any event. But it's a little weird to pass aa-autodep a profile name rather than a program name/path to begin with. > Also, as Seth already noticed, _() is missing. Yeah, that was me moving the messages around without realizing it was missing. I'll fix. -- Steve Beattie <[email protected]> http://NxNW.org/~steve/
signature.asc
Description: Digital signature
-- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
