[csw-devel] SF.net SVN: gar:[7346] csw/mgar/pkg/tightvnc/trunk
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Wed Nov 18 23:03:37 CET 2009
Revision: 7346
http://gar.svn.sourceforge.net/gar/?rev=7346&view=rev
Author: wahwah
Date: 2009-11-18 22:03:37 +0000 (Wed, 18 Nov 2009)
Log Message:
-----------
tightvnc: wrapping the vncserver script to provide a useful error message http://www.opencsw.org/mantis/view.php?id=942
Modified Paths:
--------------
csw/mgar/pkg/tightvnc/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/tightvnc/trunk/files/vncserver-wrapper.sh
Modified: csw/mgar/pkg/tightvnc/trunk/Makefile
===================================================================
--- csw/mgar/pkg/tightvnc/trunk/Makefile 2009-11-18 21:47:29 UTC (rev 7345)
+++ csw/mgar/pkg/tightvnc/trunk/Makefile 2009-11-18 22:03:37 UTC (rev 7346)
@@ -102,4 +102,9 @@
ginstall -m 644 $(WORKDIR)/vncservers $(DESTDIR)$(sysconfdir)/vncservers
ginstall -m 755 -d $(DESTDIR)/etc/opt/csw/init.d
ginstall -m 644 $(FILEDIR)/cswvncserver $(DESTDIR)/etc/opt/csw/init.d
+ ginstall -d -m 755 $(DESTDIR)$(libexecdir)
+ mv $(DESTDIR)$(bindir)/vncserver $(DESTDIR)$(libexecdir)
+ ginstall -m 755 \
+ $(FILEDIR)/vncserver-wrapper.sh \
+ $(DESTDIR)$(bindir)/vncserver
@$(MAKECOOKIE)
Added: csw/mgar/pkg/tightvnc/trunk/files/vncserver-wrapper.sh
===================================================================
--- csw/mgar/pkg/tightvnc/trunk/files/vncserver-wrapper.sh (rev 0)
+++ csw/mgar/pkg/tightvnc/trunk/files/vncserver-wrapper.sh 2009-11-18 22:03:37 UTC (rev 7346)
@@ -0,0 +1,50 @@
+#!/opt/csw/bin/bash
+# vim:set sw=2 ts=2 sts=2 expandtab:
+#
+# $Id$
+#
+# This file is a workaround for the bug number 942[1].
+#
+# The /tmp/.X11-unix directory has following permissions:
+#
+# maciej at build8st [build8st]:~ > ls -ld /tmp/.X11-unix
+# drwxrwxr-x 2 root root 176 Jul 13 23:31 /tmp/.X11-unix
+#
+# As a result, non-root users cannot run vnc servers. The purpose of
+# this file is to provide a useful error message to the user when
+# appropriate.
+#
+# [1] http://www.opencsw.org/mantis/view.php?id=942
+
+test_dir="/tmp/.X11-unix"
+
+# Test whether the directory in question is world writable, or writable by the
+# current user.
+writable() {
+ find "$1" -prune -type d \
+ -a \
+ \( \
+ -perm -o+w \
+ -o \
+ \( \
+ -user "${UID}" \
+ -a \
+ -perm -u+w \
+ \) \
+ \) | grep "$1"
+}
+
+if writable "${test_dir}"; then
+ exec /opt/csw/libexec/vncserver "$@"
+else
+ cat <<EOF
+The ${test_dir} directory is not world-writable. This is a known issue on
+Solaris 8. If you need to run vncserver as a regular user, you need to make
+this file writable by your user (e.g. world-writable).
+
+sudo chmod o+w ${test_dir}
+
+For more information, see:
+http://www.opencsw.org/mantis/view.php?id=942
+EOF
+fi
Property changes on: csw/mgar/pkg/tightvnc/trunk/files/vncserver-wrapper.sh
___________________________________________________________________
Added: svn:keywords
+ Id
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list