tigervnc/with-vnc-key.sh
Joan Torres 543e26d9be - Update to tigervnc 1.14.1
* Default installation of native viewer can once again handle VncAuth
  * Graphic acceleration now can now be disabled through the vncserver config file the same way as other features
  * Command vncpasswd can again correctly update passwords
  * Native viewer once again consider passwd file that contain more than one password valid
  * Native viewer can once again connect to RealVNC servers
  * Users of x0vncserver should no longer experience the mouse cursor moving to the upper left corner
  * H264 encoding no longer causes crashing
- Removed patches (no longer needed):
  * u_tigervnc-Change-button-layout-in-ServerDialog.patch
- Refreshed patches:
  * n_tigervnc-Date-time.patch
  * n_tigervnc-Dont-sign-java-client.patch
  * n_tigervnc-reproducible-jar-mtime.patch
  * u_tigervnc-Add-autoaccept-parameter.patch
  * u_tigervnc-Build-libXvnc-as-separate-library.patch
  * u_tigervnc-Ignore-epipe-on-write.patch
- Fix path on vncviewer desktop file. Use %use_update_alternative

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=268
2024-11-04 12:29:12 +00:00

36 lines
968 B
Bash

#!/bin/bash
# Wrapper that makes sure /etc/vnc/tls.{key,cert} exist before executing given command.
TLSKEY=/etc/vnc/tls.key
TLSCERT=/etc/vnc/tls.cert
if test -s $TLSKEY -a -s $TLSCERT; then
# Execute the command we were given.
exec "$@"
fi
(
# Wait for lock on the key file. We must not proceed while someone else is creating it.
flock 200
# If the key file doesn't exist or has zero size (because it doubles as lock), generate it.
if ! test -s $TLSKEY ; then
(umask 077 && openssl genrsa -out $TLSKEY 2048) >&200
fi
# If the cert file doesn't exist, generate it.
if ! test -e $TLSCERT ; then
# Keeping it short, because hostname could be long and max CN is 64 characters
CN="`hostname`"
CN=${CN:0:64}
openssl req -new -x509 -extensions usr_cert -key $TLSKEY -out $TLSCERT -days 7305 -subj "/CN=$CN/"
fi
) 200>>$TLSKEY 2>/dev/null
# Execute the command we were given.
exec "$@"