On Wed, 30 Aug 2023 15:58:37 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> Yes, I think using System.getProperty("user.name") is brittle as well. If >> we'd use `com.sun.security.auth.module.NTSystem`, we would introduce the >> dependency to another module - `jdk.security.auth`. Not sure, whether this >> is a good option. > > The system environment has the domainname and the username. > > String username = (System.getenv("USERDOMAIN") + "/" + > System.getenv("USERNAME")).toLowerCase(Locale.ROOT); The problem with the environment variables is, that jtreg only passes very few of them down to the testee process - USERDOMAIN and USERNAME are not part of these as far as I know. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15222#discussion_r1311176210