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

More XDG directory fixes #1760

Merged
merged 6 commits into from
May 30, 2024
Merged

More XDG directory fixes #1760

merged 6 commits into from
May 30, 2024

Conversation

CendioOssman
Copy link
Member

Mainly, make sure that pam_env can be used to influence where the log file ends up.

There is too much variation between distributions for us to have a good
PAM configuration that works everywhere. Try to make this more obvious
by having a comment at the top of the file.
E.g. pam_env.so might modify this variable, so we should see what we get
out of PAM when building a log file path.
The syslog file descriptor will be closed when we are cleaning up in
preparation for running the vncserver script, so we need to explicitly
reopen things in case we need to log errors.

At the same time, try to be polite and explicitly close the log when
appropriate.
This is only needed because of an historical type change of the legacy
directory, so avoid doing it anywhere else.
This is an often changed database, so it is better suited for
$XDG_STATE_HOME rather than the more static $XDG_DATA_HOME.
Avoid duplicating this complexity in too many places.

At the same time make the interface more identical to regular mkdir(),
for familiarity.
@CendioOssman
Copy link
Member Author

This is a continuation of #1737.

@CendioOssman CendioOssman merged commit fb7b956 into TigerVNC:master May 30, 2024
12 checks passed
@CendioOssman CendioOssman deleted the pam_env branch May 30, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant