[apparmor] missing-eval.diff (was Re: [patch] try to make subdomain.pm a little less smelly.)
Steve Beattie
steve at nxnw.org
Wed Oct 6 20:23:14 BST 2010
On Tue, Oct 05, 2010 at 11:51:56PM -0700, Jesse Michael wrote:
> missing-eval-check.diff
> - one of the uses of eval { } wasn't checking $@ for errors, so
> if something bad happened, it'd be silently ignored. this just
> adds in an extra check to die if we hit a failure.
> Index: utils/SubDomain.pm
> ===================================================================
> --- utils.orig/SubDomain.pm 2010-09-30 20:50:06.276378001 -0700
> +++ utils/SubDomain.pm 2010-09-30 20:50:24.086378001 -0700
> @@ -946,6 +946,8 @@
> readinactiveprofiles(); # need to read the profiles to see if an
> # inactive local profile is present
> $profile_data = eval { get_profile($pname) };
> + # propagate any errors we hit inside the get_profile call
> + if ($@) { die $@; }
>
> unless ($profile_data) {
> $profile_data = create_new_profile($pname);
Looks good, applied.
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/apparmor/attachments/20101006/dab7d980/attachment.pgp
More information about the AppArmor
mailing list