You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/08/20 19:17:18 UTC

[GitHub] [logging-log4j2] ppkarwasz commented on pull request #1006: LOG4J2-3579 Add privileged execution for ServiceLoading

ppkarwasz commented on PR #1006:
URL: https://github.com/apache/logging-log4j2/pull/1006#issuecomment-1221390120

   Hi @boris-unckel, thank You for noticing and solving this `SecurityManager` problem.
   
   The idea behind the `ServiceLoaderUtil` is to work around the caller sensitivity of the `ServiceLoader` methods by using the `MethodHandles.Lookup` parameter to create a lambda in the caller's domain.
   
   Since `AccessController#doPrivileged` is another caller sensitive method, I think that your PR should do the same and call it through `MethodHandles.Lookup`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org