Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Create job user's local profile on win32 #409

Open
ddneilson opened this issue Sep 4, 2024 · 0 comments
Open

Feature request: Create job user's local profile on win32 #409

ddneilson opened this issue Sep 4, 2024 · 0 comments
Labels
enhancement New feature or request needs triage A new issue that needs a first look

Comments

@ddneilson
Copy link
Contributor

Use Case

If a user is running Windows with active directory and the user that jobs are run as is a domain user, then the local profile (e.g. %LOCALAPPDATA% directory) does not seem to exist for that user until the user has done an interactive logon. So, if a job that is run by the worker agent makes use of the user's local profile (e.g. putting fonts in %LOCALAPPDATA%) then that job will fail and the root cause is unlikely to be obvious.

Proposed Solution

There does seem to be a workaround, but it would be nice if users didn't have to employ the workaround.

In the worker agent, before creating the logon token (or when creating the openjd.sessions.SessionUser for a username/password combo outside of the service context) do a call to the Win32 CreateProfile API.

Alternative solution to investigate may involve loading the domain user's roaming profile in the LoadProfileW API call; that appears to require setting the lpProfilePath property of the lpProfileInfo structure.

@ddneilson ddneilson added needs triage A new issue that needs a first look enhancement New feature or request labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage A new issue that needs a first look
Projects
None yet
Development

No branches or pull requests

1 participant