On Tue, Dec 15, 2015 at 06:41:48PM -0600, Tyler Hicks wrote:
> > + if (!quiet) {
> > + switch(err) {
> > + case ENOSYS:
> > + printf(_("No - not available on this system.\n"));
> > + break;
> > + case ECANCELED:
> > + printf(_("No - disabled at boot.\n"));
> > + break;
> > + case ENOENT:
> > + printf(_("Maybe - policy interface not available.\n"));
> > + break;
> > + case EPERM:
> > + case EACCES:
> > + printf(_("Maybe - insufficient permissions to determine
> > availability.\n"));
> > + break;
> > + default:
> > + printf(_("Error - '%s'\n"), strerror(err));
> > + }
> > + }
> > +
> > + return err;
>
> Do we really want to return an errno value here? Why not just
> EXIT_FAILURE?Sigh, I looked right at this, made suggestions, and missed the point entirely -- we have to exit with different exit codes because the exit code from aa-status(8) is documented with these descriptions. But we can't just return with EPERM, we actually need to map all these to 1--4. Thanks
signature.asc
Description: Digital signature
-- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
