[apparmor] [patch] handle_binfmt: resolve symlinks in library paths
Kshitij Gupta
kgupta8592 at gmail.com
Sun Feb 21 18:32:09 UTC 2016
Hello,
On Sun, Feb 21, 2016 at 10:03 PM, Christian Boltz <apparmor at cboltz.de>
wrote:
> Hello,
>
> $subject.
>
> This should happen rarely, but nevertheless it can happen - and since
> AppArmor needs the symlink target in the profile, we have to resolve any
> symlink.
>
>
> [ 76-handle_binfmt-resolve-symlinks.diff ]
>
> === modified file ./utils/apparmor/aa.py
> --- utils/apparmor/aa.py 2016-02-21 17:14:28.444520585 +0100
> +++ utils/apparmor/aa.py 2016-02-21 16:06:41.744595751 +0100
> @@ -386,6 +388,7 @@
> reqs = get_reqs(path)
> while reqs:
> library = reqs.pop()
> + library = get_full_path(library) # resolve symlinks
>
How about inlining the get_full_path with the pop?
Also, is the comment above adding any value and worth it?
Acked-by: Kshitij Gupta <kgupta8592 at gmail.com>
if not reqs_processed.get(library, False):
> if get_reqs(library):
> reqs += get_reqs(library)
>
>
>
> Regards,
>
> Christian Boltz
> --
> The "Well" was referring to my role: as a product
> manager, I am not even entitled to review the "validity
> of implementation details", ... I sometime cannot resist
> and do nevertheless, ...;-)
> [Matthias G. Eckermann in opensuse-factory]
>
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/apparmor
>
>
--
Regards,
Kshitij Gupta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160222/d491ad11/attachment.html>
More information about the AppArmor
mailing list