mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
In #25496 we introduced the ability to have `task.user` set for on Windows, so long as the user ID fits a particular shape. But this uncovered a 7 year old bug in the `java` driver introduced in #5143, where we set the `task.user` to the non-existent Unix user `nobody`, even if we're running on Windows. Prior to the change in #25496 we always ignored the `task.user`, so this was not a problem. We don't set the `task.user` in the `raw_exec` driver, and the otherwise very similar `exec` driver is Linux-only, so we never see the problem there. Fix the bug in the `java` driver by gating the change to the `task.user` on not being Windows. Also add a check to the new code path that the user is non-empty before parsing it, so that any third party drivers that might be borrowing the executor code don't hit the same probem on Windows. Ref: https://github.com/hashicorp/nomad/pull/5143 Ref: https://github.com/hashicorp/nomad/pull/25496 Fixes: https://github.com/hashicorp/nomad/issues/25638
4 lines
101 B
Plaintext
4 lines
101 B
Plaintext
```release-note:bug
|
|
java: Fixed a bug where the default task user was set to 'nobody' on Windows
|
|
```
|