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

Allow a path to be specified for the chansrv log file #3345

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

matt335672
Copy link
Member

Forward port of #3344

Fixes #3337

A parameter LogFilePath is added to the [ChansrvLogging] section in sesman.ini. Manpage excerpt:-

       LogFilePath=string
              Directory  for  storing  the chansrv log file. This setting only
              applies to chansrv. The sesman log file  is  always  created  in
              /var/log.

              Created  if  it doesn't exist.  If first character is not a '/',
              this is relative to $HOME, where chansrv is normally started.

              The following substitutions are made in this string:-
                  %U - Username
                  %u - Numeric UID
                  %% - Percent character

              This is most useful if you are using NFS-mounted  home  directo‐
              ries, and wish to move the chansrv log file to the local disk.

              If this parameter isn't specified, the log file is stored in one
              of the following locations :-
                  -   $CHANSRV_LOG_PATH
                  -   $XDG_DATA_HOME/xrdp
                  -   $HOME/.local/share/xrdp

This is useful for NFS-mounted home directories, where hosts
may otherwise produce colliding chansrv log file names

(cherry picked from commit cfc2e36)
This seems a better fit than having it in the [Chansrv] section.

Also fixed a minor logging error relating to the parameter in
chansrv_config.c

(cherry picked from commit 6d2fd1b)
@matt335672 matt335672 merged commit 54a6bf1 into neutrinolabs:devel Dec 16, 2024
14 checks passed
@matt335672 matt335672 deleted the chansrv_log_file_path branch December 16, 2024 13:52
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.

enable dynamic CHANSRV_LOG_PATH or/and possibility to change log name "xrdp-chansrv.%d.log"
1 participant