|
|
c65c35 |
From 40f104ffe1e36df9613f8d316f616fb2b089cc86 Mon Sep 17 00:00:00 2001
|
|
|
c65c35 |
From: Jan Grulich <jgrulich@redhat.com>
|
|
|
c65c35 |
Date: Tue, 29 Sep 2020 13:37:16 +0200
|
|
|
c65c35 |
Subject: [PATCH] Use /run instead of /var/run which is just a symlink
|
|
|
c65c35 |
|
|
|
c65c35 |
---
|
|
|
c65c35 |
unix/vncserver/selinux/vncsession.fc | 2 +-
|
|
|
c65c35 |
unix/vncserver/vncserver@.service.in | 2 +-
|
|
|
c65c35 |
unix/vncserver/vncsession.c | 2 +-
|
|
|
c65c35 |
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
c65c35 |
|
|
|
c65c35 |
diff --git a/unix/vncserver/selinux/vncsession.fc b/unix/vncserver/selinux/vncsession.fc
|
|
|
c65c35 |
index 121cdd237..ae768baa4 100644
|
|
|
c65c35 |
--- a/unix/vncserver/selinux/vncsession.fc
|
|
|
c65c35 |
+++ b/unix/vncserver/selinux/vncsession.fc
|
|
|
c65c35 |
@@ -23,4 +23,4 @@ HOME_ROOT/\.vnc(/.*)? gen_context(system_u:object_r:xdm_home_t,s0)
|
|
|
c65c35 |
/usr/sbin/vncsession -- gen_context(system_u:object_r:vnc_session_exec_t,s0)
|
|
|
c65c35 |
/usr/libexec/vncsession-start -- gen_context(system_u:object_r:vnc_session_exec_t,s0)
|
|
|
c65c35 |
|
|
|
c65c35 |
-/var/run/vncsession-:[0-9]*\.pid -- gen_context(system_u:object_r:vnc_session_var_run_t,s0)
|
|
|
c65c35 |
+/run/vncsession-:[0-9]*\.pid -- gen_context(system_u:object_r:vnc_session_var_run_t,s0)
|
|
|
c65c35 |
diff --git a/unix/vncserver/vncserver@.service.in b/unix/vncserver/vncserver@.service.in
|
|
|
c65c35 |
index 584ecf4b1..5624dff76 100644
|
|
|
c65c35 |
--- a/unix/vncserver/vncserver@.service.in
|
|
|
c65c35 |
+++ b/unix/vncserver/vncserver@.service.in
|
|
|
c65c35 |
@@ -36,7 +36,7 @@ After=syslog.target network.target
|
|
|
c65c35 |
[Service]
|
|
|
c65c35 |
Type=forking
|
|
|
c65c35 |
ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/vncsession-start %i
|
|
|
c65c35 |
-PIDFile=/var/run/vncsession-%i.pid
|
|
|
c65c35 |
+PIDFile=/run/vncsession-%i.pid
|
|
|
c65c35 |
SELinuxContext=system_u:system_r:vnc_session_t:s0
|
|
|
c65c35 |
|
|
|
c65c35 |
[Install]
|
|
|
c65c35 |
diff --git a/unix/vncserver/vncsession.c b/unix/vncserver/vncsession.c
|
|
|
c65c35 |
index 3e0c98f0f..2b47f5f55 100644
|
|
|
c65c35 |
--- a/unix/vncserver/vncsession.c
|
|
|
c65c35 |
+++ b/unix/vncserver/vncsession.c
|
|
|
c65c35 |
@@ -543,7 +543,7 @@ main(int argc, char **argv)
|
|
|
c65c35 |
}
|
|
|
c65c35 |
|
|
|
c65c35 |
snprintf(pid_file, sizeof(pid_file),
|
|
|
c65c35 |
- "/var/run/vncsession-%s.pid", display);
|
|
|
c65c35 |
+ "/run/vncsession-%s.pid", display);
|
|
|
c65c35 |
f = fopen(pid_file, "w");
|
|
|
c65c35 |
if (f == NULL) {
|
|
|
c65c35 |
syslog(LOG_ERR, "Failure creating pid file \"%s\": %s",
|