aboutsummaryrefslogtreecommitdiffstats
path: root/unix/vncserver/vncsession.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve error messages for base directory creationPierre Ossman2024-08-291-1/+1
|
* vncsession: Move existing log to log.old if presentPat Riehecky2024-08-131-11/+36
|
* vncsession: use /bin/sh if the user shell is not setCarlos Santos2024-07-261-1/+1
| | | | | | | | | | An empty shell field in the password file is valid, although not common. Use /bin/sh in this case, as documented in the passwd(5) man page, since the vncserver script requires a non-empty SHELL environment variable. Fixes issue #1786. Signed-off-by: Carlos Santos <casantos@redhat.com>
* Create common recursive mkdir()Pierre Ossman2024-05-301-22/+27
| | | | | | | Avoid duplicating this complexity in too many places. At the same time make the interface more identical to regular mkdir(), for familiarity.
* Only do restorecon() for legacy directoryPierre Ossman2024-05-301-12/+12
| | | | | This is only needed because of an historical type change of the legacy directory, so avoid doing it anywhere else.
* Fix late vncsession loggingPierre Ossman2024-05-301-0/+7
| | | | | | | | | 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.
* Respect PAM modules for $XDG_STATE_HOMEPierre Ossman2024-05-301-3/+16
| | | | | 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.
* Implement XDG Base Directory paths, deprecate ~/.vnc902024-04-261-20/+57
|
* Add option to run vncsession without forking and detachingChuck Zmudzinski2023-11-201-9/+29
| | | | | | | | | | | | Option is -D, which is what sshd uses for the same option. Also add description of the new option to the vncsession man page. Tested on Void Linux using the new option, also tested on Fedora without using the new option. Resolves #1649
* Fix incorrect typesPierre Ossman2023-01-051-1/+1
| | | | | These types caused an incorrect signed/unsigned behaviour, so let's make sure we use the appropriate type.
* Fix order of qualifiersPierre Ossman2023-01-051-1/+1
| | | | gcc can get upset if they aren't in this order.
* Explicitly mark unused parametersPierre Ossman2023-01-041-0/+5
| | | | | This allows us to separate accidentally unused, from explicitly unused parameters, which allows us to turn on such checks in the compiler.
* Change vncsession startup error messagePierre Ossman2022-03-111-1/+1
| | | | | | | We need to get to the point of starting the session script before we consider things a success. So this can fail in many different ways, not just the daemonization. Adjust the error message to something more generic to reflect this.
* SELinux: restore SELinux context in case of different policiesJan Grulich2022-01-131-0/+16
|
* Fix build on systems without HOST_NAME_MAXAlex Richardson2021-07-151-2/+11
| | | | | | Some operating systems such as FreeBSD don't define a HOST_NAME_MAX macro. The portable approach to determine the real host name limit is calling sysconf(_SC_HOST_NAME_MAX) so do that instead.
* Fix logging in daemonized tl-sessionPierre Ossman2021-03-111-17/+17
| | | | | stderr has been redirected to /dev/null so all logging needs to go to syslog.
* Change to user's home directory before starting sessionPierre Ossman2020-12-041-0/+3
| | | | | This is what display managers do, so it is expected by many environments.
* Fix incorrect daemonization by vncsessionPierre Ossman2020-11-251-1/+1
| | | | | | We terminated the child instead of the parent after fork(). Reported by Jan Grulich from Red Hat.
* Use /run instead of /var/run which is just a symlinkJan Grulich2020-09-291-1/+1
|
* Remove incorrect umask changePierre Ossman2020-09-071-3/+0
| | | | | Not sure why this got in there, but it is incorrect as it results in creating files with too liberal permissions.
* Use standard install dir variable namesPierre Ossman2020-03-121-1/+1
| | | | | This makes our builds directly compatible with most distributions without packagers/users having to specify extra flags.
* Start sessions via PAMPierre Ossman2020-03-121-0/+592
This sets up a more correct session as there are key tasks that need to be performed by PAM. E.g. systemd will allocate cgroups and start base services. In order to easily handle this as a system service the mapping of displays is now done via a configuration file.