RFR: 8280357: user.home = "?" when running with systemd DynamicUser=true

Alan Bateman alanb at openjdk.java.net
Fri Feb 18 18:03:52 UTC 2022


On Fri, 18 Feb 2022 16:15:18 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> I'm uncertain whether the fallback should only be done on Linux to cover the `systemd` case and Docker.
> The need for a fallback seems less applicable on macOs, but since $HOME is usually set to the same value, may be harmless.

I think what you have is okay because it is only used when getpwent doesn't return something useful. It would add complexity if you tried to limit it systemd or containers. I can't think of scenarios on macOS that might trigger the fallback, but it's not a bad fallback to have there too.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7534


More information about the core-libs-dev mailing list