[apparmor] [patch] More strict profile_storage()
Christian Boltz
apparmor at cboltz.de
Tue Jun 6 11:52:27 UTC 2017
Hello,
Am Montag, 5. Juni 2017, 23:50:24 CEST schrieb Seth Arnold:
> On Mon, Jun 05, 2017 at 11:20:33PM +0200, Christian Boltz wrote:
> > this patch makes the profile_storage() data structure more strict.
> > It
> > - initializes everything inside a profile with proper values
> > - makes the profile storage a dict() instead of a hasher(), which
> > means>
> > it will complain loudly when trying to access non-existing
> > elements
> > (hasher() was more forgiving, but this also meant hiding bugs)
> Oh yeah! :D
>
> I'd still rather see this using a class with fields, something where
> you stand a chance of having python tell you "hey that field doesn't
> exist" when you typo something, but removing the vast magic of
> hasher() is already a fantastic step.
Even if the profile storage is "just" a dict instead of a class, most of
its elements are classes - and I can guarantee you that they have some
methods that will let a plain dict explode ;-)
That said - the next step is to get rid of all the safety nets I added
at various places (and that helped to avoid lots of crashes) so that we
can find out where they would still be needed ;-)
Regards,
Christian Boltz
--
>>>> ??? You cannot remove the package without resolving dependencies.
>>> Of course you can >:-)
>> No, you cannot.
> --nodeps
You don't need rpm to shoot yourself in the foot.
[>(>>) Carlos E. R. and (>>)(>>) Andreas Schwab in opensuse-factory]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20170606/2f8a4c82/attachment.pgp>
More information about the AppArmor
mailing list