diff -Nru x2goserver-3.0.99/debian/bzr-builder.manifest x2goserver-3.0.99/debian/bzr-builder.manifest --- x2goserver-3.0.99/debian/bzr-builder.manifest 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/bzr-builder.manifest 2011-02-16 09:45:09.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}-0~10 -lp:~siretart/x2go/x2goserver-FAU-trunk revid:git-v1:338f0aa1d636420cc2fa6f6aa309b2c8cf149609 +# bzr-builder format 0.3 deb-version {debupstream}-0~22 +lp:~siretart/x2go/x2goserver-FAU-trunk revid:git-v1:45d2d35a6ccd8929a921db945233c4818c1ba500 diff -Nru x2goserver-3.0.99/debian/changelog x2goserver-3.0.99/debian/changelog --- x2goserver-3.0.99/debian/changelog 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/changelog 2011-02-16 09:45:09.000000000 +0000 @@ -1,8 +1,14 @@ -x2goserver (3.0.99-0~10~lucid1) unstable; urgency=low +x2goserver (3.0.99-0~22~lucid1) unstable; urgency=low * Auto build. - -- Reinhard Tartler Wed, 26 Jan 2011 14:20:04 +0000 + -- Reinhard Tartler Wed, 16 Feb 2011 09:45:09 +0000 + +x2goserver (3.0.99-2) unstable; urgency=low + + * menu=0 option in x2gostartagent, to avoid crash in single app mode + + -- Oleksandr Shneyder Thu, 27 Jan 2011 18:38:17 +0100 x2goserver (3.0.99-1) unstable; urgency=low diff -Nru x2goserver-3.0.99/debian/control x2goserver-3.0.99/debian/control --- x2goserver-3.0.99/debian/control 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/control 2011-02-16 09:45:09.000000000 +0000 @@ -7,8 +7,9 @@ Package: x2goserver Architecture: all -Depends: x2goagent, sudo, lsof, openssh-client, openssh-server, libconfig-simple-perl, makepasswd, libdbd-pg-perl, libdbd-sqlite3-perl +Depends: x2goagent, perl-suid, lsof, openssh-client, openssh-server, libconfig-simple-perl, makepasswd, libdbd-pg-perl, libdbd-sqlite3-perl, adduser Recommends: sshfs +Breaks: x2goserver-one Description: x2goserver (daemon and tools) x2go is a serverbased computing environment with - session resuming @@ -16,9 +17,9 @@ - LDAP support - client side mass storage mounting support - audio/arts support - - authentification by smartcard and usb-stick - - kde control-center modules for administration - - kde based tools for just in time messaging and client surveillance + - authentication by smartcard and usb-stick + - KDE control-center modules for administration + - KDE based tools for just in time messaging and client surveillance . x2goserver contains the main daemon and tools for - session administrations (scripts). \ No newline at end of file + session administrations (scripts). diff -Nru x2goserver-3.0.99/debian/cron.d.ex x2goserver-3.0.99/debian/cron.d.ex --- x2goserver-3.0.99/debian/cron.d.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/cron.d.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# -# Regular cron jobs for the x2goserver package -# -0 4 * * * root x2goserver_maintenance diff -Nru x2goserver-3.0.99/debian/dirs x2goserver-3.0.99/debian/dirs --- x2goserver-3.0.99/debian/dirs 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -usr/bin -usr/sbin -etc/x2go -etc/x2go/x2gosql -etc/x2go/x2gosql/passwords -usr/lib/x2go/script -var/db/x2go \ No newline at end of file diff -Nru x2goserver-3.0.99/debian/emacsen-install.ex x2goserver-3.0.99/debian/emacsen-install.ex --- x2goserver-3.0.99/debian/emacsen-install.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/emacsen-install.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#! /bin/sh -e -# /usr/lib/emacsen-common/packages/install/x2goserver - -# Written by Jim Van Zandt , borrowing heavily -# from the install scripts for gettext by Santiago Vila -# and octave by Dirk Eddelbuettel . - -FLAVOR=$1 -PACKAGE=x2goserver - -if [ ${FLAVOR} = emacs ]; then exit 0; fi - -echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} - -#FLAVORTEST=`echo $FLAVOR | cut -c-6` -#if [ ${FLAVORTEST} = xemacs ] ; then -# SITEFLAG="-no-site-file" -#else -# SITEFLAG="--no-site-file" -#fi -FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" - -ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} -ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} - -# Install-info-altdir does not actually exist. -# Maybe somebody will write it. -if test -x /usr/sbin/install-info-altdir; then - echo install/${PACKAGE}: install Info links for ${FLAVOR} - install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz -fi - -install -m 755 -d ${ELCDIR} -cd ${ELDIR} -FILES=`echo *.el` -cp ${FILES} ${ELCDIR} -cd ${ELCDIR} - -cat << EOF > path.el -(setq load-path (cons "." load-path) byte-compile-warnings nil) -EOF -${FLAVOR} ${FLAGS} ${FILES} -rm -f *.el path.el - -exit 0 diff -Nru x2goserver-3.0.99/debian/emacsen-remove.ex x2goserver-3.0.99/debian/emacsen-remove.ex --- x2goserver-3.0.99/debian/emacsen-remove.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/emacsen-remove.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/sh -e -# /usr/lib/emacsen-common/packages/remove/x2goserver - -FLAVOR=$1 -PACKAGE=x2goserver - -if [ ${FLAVOR} != emacs ]; then - if test -x /usr/sbin/install-info-altdir; then - echo remove/${PACKAGE}: removing Info links for ${FLAVOR} - install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/x2goserver.info.gz - fi - - echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} - rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} -fi diff -Nru x2goserver-3.0.99/debian/emacsen-startup.ex x2goserver-3.0.99/debian/emacsen-startup.ex --- x2goserver-3.0.99/debian/emacsen-startup.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/emacsen-startup.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -;; -*-emacs-lisp-*- -;; -;; Emacs startup file, e.g. /etc/emacs/site-start.d/50x2goserver.el -;; for the Debian x2goserver package -;; -;; Originally contributed by Nils Naumann -;; Modified by Dirk Eddelbuettel -;; Adapted for dh-make by Jim Van Zandt - -;; The x2goserver package follows the Debian/GNU Linux 'emacsen' policy and -;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, -;; xemacs19, emacs20, xemacs20...). The compiled code is then -;; installed in a subdirectory of the respective site-lisp directory. -;; We have to add this to the load-path: -(let ((package-dir (concat "/usr/share/" - (symbol-name flavor) - "/site-lisp/x2goserver"))) -;; If package-dir does not exist, the x2goserver package must have -;; removed but not purged, and we should skip the setup. - (when (file-directory-p package-dir) - (setq load-path (cons package-dir load-path)) - (autoload 'x2goserver-mode "x2goserver-mode" - "Major mode for editing x2goserver files." t) - (add-to-list 'auto-mode-alist '("\\.x2goserver$" . x2goserver-mode)))) - diff -Nru x2goserver-3.0.99/debian/init.d x2goserver-3.0.99/debian/init.d --- x2goserver-3.0.99/debian/init.d 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/init.d 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -#! /bin/sh -# -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg . -# Modified for Debian -# by Ian Murdock . -# -# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl -# - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -export HOSTNAME -DAEMON=/usr/sbin/x2gocleansessions -NAME=x2goserver -DESC=x2goserver - -test -x $DAEMON || exit 0 - -# Include x2goserver defaults if available -if [ -f /etc/default/x2goserver ] ; then - . /etc/default/x2goserver -fi - -set -e - -case "$1" in - start) - echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON -- $DAEMON_OPTS - echo "$NAME." - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid - - echo "$NAME." - ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo "Reloading $DESC configuration files." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # /var/run/$NAME.pid --exec $DAEMON - #;; - force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart" except that it does nothing if the - # daemon isn't already running. - # check wether $DAEMON is running. If so, restart - start-stop-daemon --stop --test --quiet --pidfile \ - /var/run/$NAME.pid \ - && $0 restart \ - || exit 0 - ;; - restart) - echo -n "Restarting $DESC: " - start-stop-daemon --stop --oknodo --quiet --pidfile \ - /var/run/$NAME.pid - sleep 1 - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS - echo "$NAME." - ;; - *) - N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff -Nru x2goserver-3.0.99/debian/init.d.ex x2goserver-3.0.99/debian/init.d.ex --- x2goserver-3.0.99/debian/init.d.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/init.d.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -#! /bin/sh -# -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg . -# Modified for Debian -# by Ian Murdock . -# -# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl -# - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/x2goserver -NAME=x2goserver -DESC=x2goserver - -test -x $DAEMON || exit 0 - -# Include x2goserver defaults if available -if [ -f /etc/default/x2goserver ] ; then - . /etc/default/x2goserver -fi - -set -e - -case "$1" in - start) - echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON -- $DAEMON_OPTS - echo "$NAME." - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON - echo "$NAME." - ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo "Reloading $DESC configuration files." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # /var/run/$NAME.pid --exec $DAEMON - #;; - force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart" except that it does nothing if the - # daemon isn't already running. - # check wether $DAEMON is running. If so, restart - start-stop-daemon --stop --test --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON \ - && $0 restart \ - || exit 0 - ;; - restart) - echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON - sleep 1 - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS - echo "$NAME." - ;; - *) - N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff -Nru x2goserver-3.0.99/debian/manpage.1.ex x2goserver-3.0.99/debian/manpage.1.ex --- x2goserver-3.0.99/debian/manpage.1.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/manpage.1.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH X2GOSERVER SECTION "Februar 8, 2007" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -x2goserver \- program to do something -.SH SYNOPSIS -.B x2goserver -.RI [ options ] " files" ... -.br -.B bar -.RI [ options ] " files" ... -.SH DESCRIPTION -This manual page documents briefly the -.B x2goserver -and -.B bar -commands. -.PP -.\" TeX users may be more comfortable with the \fB\fP and -.\" \fI\fP escape sequences to invode bold face and italics, -.\" respectively. -\fBx2goserver\fP is a program that... -.SH OPTIONS -These programs follow the usual GNU command line syntax, with long -options starting with two dashes (`-'). -A summary of options is included below. -For a complete description, see the Info files. -.TP -.B \-h, \-\-help -Show summary of options. -.TP -.B \-v, \-\-version -Show version of program. -.SH SEE ALSO -.BR bar (1), -.BR baz (1). -.br -The programs are documented fully by -.IR "The Rise and Fall of a Fooish Bar" , -available via the Info system. -.SH AUTHOR -x2goserver was written by . -.PP -This manual page was written by Oleksandr Shneyder , -for the Debian project (but may be used by others). diff -Nru x2goserver-3.0.99/debian/manpage.sgml.ex x2goserver-3.0.99/debian/manpage.sgml.ex --- x2goserver-3.0.99/debian/manpage.sgml.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/manpage.sgml.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,156 +0,0 @@ - manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -manpage.1: manpage.sgml - docbook-to-man $< > $@ - - - The docbook-to-man binary is found in the docbook-to-man package. - Please remember that if you create the nroff version in one of the - debian/rules file targets (such as build), you will need to include - docbook-to-man in your Build-Depends control field. - - --> - - - FIRSTNAME"> - SURNAME"> - - Februar 8, 2007"> - - SECTION"> - oleksandr.shneyder@obviously-nice.de"> - - X2GOSERVER"> - - - Debian"> - GNU"> - GPL"> -]> - - - -
- &dhemail; -
- - &dhfirstname; - &dhsurname; - - - 2003 - &dhusername; - - &dhdate; -
- - &dhucpackage; - - &dhsection; - - - &dhpackage; - - program to do something - - - - &dhpackage; - - - - - - - - DESCRIPTION - - This manual page documents briefly the - &dhpackage; and bar - commands. - - This manual page was written for the &debian; distribution - because the original program does not have a manual page. - Instead, it has documentation in the &gnu; - Info format; see below. - - &dhpackage; is a program that... - - - - OPTIONS - - These programs follow the usual &gnu; command line syntax, - with long options starting with two dashes (`-'). A summary of - options is included below. For a complete description, see the - Info files. - - - - - - - - Show summary of options. - - - - - - - - Show version of program. - - - - - - SEE ALSO - - bar (1), baz (1). - - The programs are documented fully by The Rise and - Fall of a Fooish Bar available via the - Info system. - - - AUTHOR - - This manual page was written by &dhusername; &dhemail; for - the &debian; system (but may be used by others). Permission is - granted to copy, distribute and/or modify this document under - the terms of the &gnu; General Public License, Version 2 any - later version published by the Free Software Foundation. - - - On Debian systems, the complete text of the GNU General Public - License can be found in /usr/share/common-licenses/GPL. - - - -
- - - - diff -Nru x2goserver-3.0.99/debian/manpage.xml.ex x2goserver-3.0.99/debian/manpage.xml.ex --- x2goserver-3.0.99/debian/manpage.xml.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/manpage.xml.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,148 +0,0 @@ - -.
will be generated. You may view the -manual page with: nroff -man .
| less'. A -typical entry in a Makefile or Makefile.am is: - -DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\ -manpages/docbook.xsl -XP=xsltproc -''-nonet - -manpage.1: manpage.dbk - $(XP) $(DB2MAN) $< - -The xsltproc binary is found in the xsltproc package. The -XSL files are in docbook-xsl. Please remember that if you -create the nroff version in one of the debian/rules file -targets (such as build), you will need to include xsltproc -and docbook-xsl in your Build-Depends control field. - ---> - - - FIRSTNAME"> - SURNAME"> - - Februar 8, 2007"> - - SECTION"> - oleksandr.shneyder@obviously-nice.de"> - - X2GOSERVER"> - - - Debian"> - GNU"> - GPL"> -]> - - - -
- &dhemail; -
- - &dhfirstname; - &dhsurname; - - - 2003 - &dhusername; - - &dhdate; -
- - &dhucpackage; - - &dhsection; - - - &dhpackage; - - program to do something - - - - &dhpackage; - - - - - - - - DESCRIPTION - - This manual page documents briefly the - &dhpackage; and bar - commands. - - This manual page was written for the &debian; distribution - because the original program does not have a manual page. - Instead, it has documentation in the &gnu; - Info format; see below. - - &dhpackage; is a program that... - - - - OPTIONS - - These programs follow the usual &gnu; command line syntax, - with long options starting with two dashes (`-'). A summary of - options is included below. For a complete description, see the - Info files. - - - - - - - - Show summary of options. - - - - - - - - Show version of program. - - - - - - SEE ALSO - - bar (1), baz (1). - - The programs are documented fully by The Rise and - Fall of a Fooish Bar available via the - Info system. - - - AUTHOR - - This manual page was written by &dhusername; &dhemail; for - the &debian; system (but may be used by others). Permission is - granted to copy, distribute and/or modify this document under - the terms of the &gnu; General Public License, Version 2 any - later version published by the Free Software Foundation. - - - On Debian systems, the complete text of the GNU General Public - License can be found in /usr/share/common-licenses/GPL. - - - -
- diff -Nru x2goserver-3.0.99/debian/menu.ex x2goserver-3.0.99/debian/menu.ex --- x2goserver-3.0.99/debian/menu.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/menu.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -?package(x2goserver):needs="X11|text|vc|wm" section="Apps/see-menu-manual"\ - title="x2goserver" command="/usr/bin/x2goserver" diff -Nru x2goserver-3.0.99/debian/postinst x2goserver-3.0.99/debian/postinst --- x2goserver-3.0.99/debian/postinst 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/postinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -#!/bin/sh -# postinst script for x2goserver -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - chmod 700 /etc/x2go/x2gosql/passwords - touch /etc/x2go/x2gosql/passwords/pgadmin - chmod 600 /etc/x2go/x2gosql/passwords/pgadmin - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff -Nru x2goserver-3.0.99/debian/postinst.ex x2goserver-3.0.99/debian/postinst.ex --- x2goserver-3.0.99/debian/postinst.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/postinst.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#!/bin/sh -# postinst script for x2goserver -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff -Nru x2goserver-3.0.99/debian/postrm.ex x2goserver-3.0.99/debian/postrm.ex --- x2goserver-3.0.99/debian/postrm.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/postrm.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#!/bin/sh -# postrm script for x2goserver -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff -Nru x2goserver-3.0.99/debian/preinst.bc x2goserver-3.0.99/debian/preinst.bc --- x2goserver-3.0.99/debian/preinst.bc 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/preinst.bc 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -#!/bin/bash -# preinst script for x2goserver -# -# see: dh_installdeb(1) - -#set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -case "$1" in - install|upgrade) - VERSION=$2 - V1=`echo $VERSION|awk '{split($0,a,"."); print a[1]}'` - V2=`echo $VERSION|awk '{split($0,a,"."); print a[2]}'` - DV=`echo $VERSION|awk '{split($0,a,"."); print a[3]}'` - V3=`echo $DV|awk '{split($0,a,"-"); print a[1]}'` - V4=`echo $DV|awk '{split($0,a,"-"); print a[2]}'` - if [ "$V1" == "" ] - then - V1=0 - fi - - if [ "$V2" == "" ] - then - V2=0 - fi - - if [ "$V3" == "" ] - then - V3=0 - fi - - if [ "$V4" == "" ] - then - V4=0 - fi - - VSUM=$(($V1*100000 + $V2*10000 + $V3*100 +$V4)) - if [ $(( $VSUM < 200117 && $VSUM != 0)) != 0 ] - then - echo " - - - ----------------- -Attention: - -you are upgrading to a newer version of x2goserver. Please close all running x2go sessions and make sure that nobody will login during the installation procedure. You'll need to import a new database layout for this version, so please start the import script /usr/lib/x2go/script/x2gocreatebase.sh on your data base server after the packages have been installed. ----------------- - -Press Enter to continue - -" - read - fi - X2GOGRP=`getent group | grep x2gousers` - - if [ "$X2GOGRP" == "" ] - then - addgroup --system x2gousers - fi - - X2GOUSR=`getent passwd | grep x2gouser` - - if [ "$X2GOUSR" == "" ] - then - useradd -r -d /var/db/x2go/ x2gouser - fi - - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff -Nru x2goserver-3.0.99/debian/preinst.ex x2goserver-3.0.99/debian/preinst.ex --- x2goserver-3.0.99/debian/preinst.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/preinst.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#!/bin/sh -# preinst script for x2goserver -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - install|upgrade) - echo "prev version is $2" - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff -Nru x2goserver-3.0.99/debian/prerm.ex x2goserver-3.0.99/debian/prerm.ex --- x2goserver-3.0.99/debian/prerm.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/prerm.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#!/bin/sh -# prerm script for x2goserver -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|upgrade|deconfigure) - ;; - - failed-upgrade) - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff -Nru x2goserver-3.0.99/debian/README.Debian x2goserver-3.0.99/debian/README.Debian --- x2goserver-3.0.99/debian/README.Debian 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/README.Debian 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -x2goserver for Debian ---------------------- - - - - -- Oleksandr Shneyder Thu, 8 Feb 2007 15:21:30 +0100 diff -Nru x2goserver-3.0.99/debian/rules x2goserver-3.0.99/debian/rules --- x2goserver-3.0.99/debian/rules 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/rules 2011-02-16 09:45:09.000000000 +0000 @@ -1,128 +1,24 @@ #!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - - - -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - touch configure-stamp - - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - - # Add here commands to compile the package. - #docbook-to-man debian/x2goserver.sgml > x2goserver.1 - - touch $@ clean: dh_testdir dh_testroot - rm -f build-stamp configure-stamp - - # Add here commands to clean up after the build process. - dh_clean -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/x2goserver. - install x2gochangestatus $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gocmdexitmessage $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gocreatesession $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gogetagent $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gogetdisplays $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gogetports $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gogetservers $(CURDIR)/debian/x2goserver/usr/bin/ - install x2goinsertport $(CURDIR)/debian/x2goserver/usr/bin/ - install x2goinsertsession $(CURDIR)/debian/x2goserver/usr/bin/ - install x2golistsessions $(CURDIR)/debian/x2goserver/usr/bin/ - install x2golistdesktops $(CURDIR)/debian/x2goserver/usr/bin/ - install x2golistsessions_root $(CURDIR)/debian/x2goserver/usr/bin/ - install x2golistsessions_sql $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gomountdirs $(CURDIR)/debian/x2goserver/usr/bin/ - install x2goresume $(CURDIR)/debian/x2goserver/usr/bin/ - install x2goresume-session $(CURDIR)/debian/x2goserver/usr/bin/ - install x2goruncommand $(CURDIR)/debian/x2goserver/usr/bin/ - install x2goshowblocks $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gosqlitewrapper $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gostartagent $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gosuspend-session $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gosuspend-agent $(CURDIR)/debian/x2goserver/usr/bin/ - install x2goterminate $(CURDIR)/debian/x2goserver/usr/bin/ - install x2goterminate-session $(CURDIR)/debian/x2goserver/usr/bin/ - install x2goumount $(CURDIR)/debian/x2goserver/usr/bin/ - install x2goumount_session $(CURDIR)/debian/x2goserver/usr/bin/ - install x2gosessionlimit $(CURDIR)/debian/x2goserver/usr/bin/ - - +build: + dh_prep - - cp sql $(CURDIR)/debian/x2goserver/etc/x2go/x2gosql/ - cp x2goserver.conf $(CURDIR)/debian/x2goserver/etc/x2go/ - cp x2godbwrapper.pm $(CURDIR)/debian/x2goserver/usr/lib/x2go/ - install x2gocleansessions $(CURDIR)/debian/x2goserver/usr/sbin/ - install x2godbadmin $(CURDIR)/debian/x2goserver/usr/lib/x2go/script - - - - -# Build architecture-independent files here. -binary-indep: build install # We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install +binary-indep: build +binary-arch: build dh_testdir dh_testroot + dh_installdirs + dh_install dh_installchangelogs dh_installdocs - dh_installexamples -# dh_install -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_python - dh_installinit -R -# dh_installcron -# dh_installinfo - dh_installman - dh_link - dh_strip dh_compress dh_fixperms -# dh_perl -# dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol @@ -130,4 +26,3 @@ dh_builddeb binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff -Nru x2goserver-3.0.99/debian/watch.ex x2goserver-3.0.99/debian/watch.ex --- x2goserver-3.0.99/debian/watch.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/watch.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# Example watch control file for uscan -# Rename this file to "watch" and then you can run the "uscan" command -# to check for upstream updates and more. -# See uscan(1) for format - -# Compulsory line, this is a version 3 file -version=3 - -# Uncomment to examine a Webpage -# -#http://www.example.com/downloads.php x2goserver-(.*)\.tar\.gz - -# Uncomment to examine a Webserver directory -#http://www.example.com/pub/x2goserver-(.*)\.tar\.gz - -# Uncommment to examine a FTP server -#ftp://ftp.example.com/pub/x2goserver-(.*)\.tar\.gz debian uupdate - -# Uncomment to find new files on sourceforge, for debscripts >= 2.9 -# http://sf.net/x2goserver/x2goserver-(.*)\.tar\.gz - - diff -Nru x2goserver-3.0.99/debian/x2goserver-default.ex x2goserver-3.0.99/debian/x2goserver-default.ex --- x2goserver-3.0.99/debian/x2goserver-default.ex 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/x2goserver-default.ex 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# Defaults for x2goserver initscript -# sourced by /etc/init.d/x2goserver -# installed at /etc/default/x2goserver by the maintainer scripts - -# -# This is a POSIX shell fragment -# - -# Additional options that are passed to the Daemon. -DAEMON_OPTS="" diff -Nru x2goserver-3.0.99/debian/x2goserver.dirs x2goserver-3.0.99/debian/x2goserver.dirs --- x2goserver-3.0.99/debian/x2goserver.dirs 1970-01-01 00:00:00.000000000 +0000 +++ x2goserver-3.0.99/debian/x2goserver.dirs 2011-02-16 09:45:09.000000000 +0000 @@ -0,0 +1,5 @@ +etc/x2go +etc/x2go/x2gosql +etc/x2go/x2gosql/passwords +usr/lib/x2go/script +var/lib/x2go diff -Nru x2goserver-3.0.99/debian/x2goserver.doc-base.EX x2goserver-3.0.99/debian/x2goserver.doc-base.EX --- x2goserver-3.0.99/debian/x2goserver.doc-base.EX 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/debian/x2goserver.doc-base.EX 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -Document: x2goserver -Title: Debian x2goserver Manual -Author: -Abstract: This manual describes what x2goserver is - and how it can be used to - manage online manuals on Debian systems. -Section: unknown - -Format: debiandoc-sgml -Files: /usr/share/doc/x2goserver/x2goserver.sgml.gz - -Format: postscript -Files: /usr/share/doc/x2goserver/x2goserver.ps.gz - -Format: text -Files: /usr/share/doc/x2goserver/x2goserver.text.gz - -Format: HTML -Index: /usr/share/doc/x2goserver/html/index.html -Files: /usr/share/doc/x2goserver/html/*.html - - diff -Nru x2goserver-3.0.99/debian/x2goserver.init x2goserver-3.0.99/debian/x2goserver.init --- x2goserver-3.0.99/debian/x2goserver.init 1970-01-01 00:00:00.000000000 +0000 +++ x2goserver-3.0.99/debian/x2goserver.init 2011-02-16 09:45:09.000000000 +0000 @@ -0,0 +1,82 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +export HOSTNAME +DAEMON=/usr/sbin/x2gocleansessions +NAME=x2goserver +DESC=x2goserver + +test -x $DAEMON || exit 0 + +# Include x2goserver defaults if available +if [ -f /etc/default/x2goserver ] ; then + . /etc/default/x2goserver +fi + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid + + echo "$NAME." + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart" except that it does nothing if the + # daemon isn't already running. + # check wether $DAEMON is running. If so, restart + start-stop-daemon --stop --test --quiet --pidfile \ + /var/run/$NAME.pid \ + && $0 restart \ + || exit 0 + ;; + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --oknodo --quiet --pidfile \ + /var/run/$NAME.pid + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff -Nru x2goserver-3.0.99/debian/x2goserver.install x2goserver-3.0.99/debian/x2goserver.install --- x2goserver-3.0.99/debian/x2goserver.install 1970-01-01 00:00:00.000000000 +0000 +++ x2goserver-3.0.99/debian/x2goserver.install 2011-02-16 09:45:09.000000000 +0000 @@ -0,0 +1,32 @@ +x2gochangestatus /usr/bin/ +x2gocmdexitmessage /usr/bin/ +x2gocreatesession /usr/bin/ +x2gogetagent /usr/bin/ +x2gogetdisplays /usr/bin/ +x2gogetports /usr/bin/ +x2gogetservers /usr/bin/ +x2goinsertport /usr/bin/ +x2goinsertsession /usr/bin/ +x2golistsessions /usr/bin/ +x2golistdesktops /usr/bin/ +x2golistsessions_root /usr/bin/ +x2golistsessions_sql /usr/bin/ +x2gomountdirs /usr/bin/ +x2goresume /usr/bin/ +x2goresume-session /usr/bin/ +x2goruncommand /usr/bin/ +x2goshowblocks /usr/bin/ +x2gosqlitewrapper /usr/bin/ +x2gostartagent /usr/bin/ +x2gosuspend-session /usr/bin/ +x2gosuspend-agent /usr/bin/ +x2goterminate /usr/bin/ +x2goterminate-session /usr/bin/ +x2goumount /usr/bin/ +x2goumount_session /usr/bin/ +x2gosessionlimit /usr/bin/ +sql /etc/x2go/x2gosql/ +x2goserver.conf /etc/x2go/ +x2godbwrapper.pm /usr/lib/x2go/ +x2gocleansessions /usr/sbin/ +x2godbadmin /usr/lib/x2go/script diff -Nru x2goserver-3.0.99/debian/x2goserver.postinst x2goserver-3.0.99/debian/x2goserver.postinst --- x2goserver-3.0.99/debian/x2goserver.postinst 1970-01-01 00:00:00.000000000 +0000 +++ x2goserver-3.0.99/debian/x2goserver.postinst 2011-02-16 09:45:09.000000000 +0000 @@ -0,0 +1,66 @@ +#!/bin/sh +# postinst script for x2goserver +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + chmod 700 /etc/x2go/x2gosql/passwords + touch /etc/x2go/x2gosql/passwords/pgadmin + chmod 600 /etc/x2go/x2gosql/passwords/pgadmin + + # setup x2gouser and group + if ! getent group x2gousers >/dev/null; then + echo "Creating x2gouser user." >&2 + addgroup --system x2gousers + else + echo "User x2gouser already exists." >&2 + fi + if ! getent passwd x2gouser >/dev/null; then + echo "Creating x2gouser user." >&2 + adduser --system --no-create-home \ + --disabled-password --disabled-login \ + --shell /bin/false --group --home /var/lib/x2go x2gouser + else + echo "User x2gouser already exists." >&2 + fi + + if [ ! -f /var/lib/x2go/x2go_sessions ]; then + /usr/lib/x2go/script/x2godbadmin --createdb + fi + + dpkg-statoverride --add --update x2gouser x2gousers 6755 /usr/bin/x2gosqlitewrapper || true + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff -Nru x2goserver-3.0.99/debian/x2goserver.postrm x2goserver-3.0.99/debian/x2goserver.postrm --- x2goserver-3.0.99/debian/x2goserver.postrm 1970-01-01 00:00:00.000000000 +0000 +++ x2goserver-3.0.99/debian/x2goserver.postrm 2011-02-16 09:45:09.000000000 +0000 @@ -0,0 +1,38 @@ +#! /bin/sh +# postrm script for x2goserver +# +# see: dh_installdeb(1) +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +set -e + + +case "$1" in + purge) + dpkg-statoverride --remove /usr/bin/x2gosqlitewrapper || true + echo "Removing x2go session database" >&2 + rm -vf /var/lib/x2go/x2go_sessions + rm -vf /etc/x2go/x2gosql/passwords/pgadmin + getent passwd x2gouser >/dev/null && deluser x2gouser + getent group x2gousers >/dev/null && delgroup x2gousers + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# diff -Nru x2goserver-3.0.99/sql x2goserver-3.0.99/sql --- x2goserver-3.0.99/sql 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/sql 2011-02-16 09:45:09.000000000 +0000 @@ -1,5 +1,5 @@ #postgres or sqlite -backend=postgres +backend=sqlite [postgres] host=localhost diff -Nru x2goserver-3.0.99/x2godbwrapper.pm x2goserver-3.0.99/x2godbwrapper.pm --- x2goserver-3.0.99/x2godbwrapper.pm 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/x2godbwrapper.pm 2011-02-16 09:45:09.000000000 +0000 @@ -80,7 +80,7 @@ } if($backend eq 'sqlite') { - `sudo -u x2gouser x2gosqlitewrapper rmsessionsroot $sid`; + `x2gosqlitewrapper rmsessionsroot $sid`; } } @@ -110,7 +110,7 @@ } if($backend eq 'sqlite') { - return split("\n",`sudo -u x2gouser x2gosqlitewrapper listsessionsroot $server`); + return split("\n",`x2gosqlitewrapper listsessionsroot $server`); } } @@ -139,7 +139,7 @@ } if($backend eq 'sqlite') { - return split("\n",`sudo -u x2gouser x2gosqlitewrapper listsessionsroot_all`); + return split("\n",`x2gosqlitewrapper listsessionsroot_all`); } } @@ -165,7 +165,7 @@ } if($backend eq 'sqlite') { - return split("\n",`sudo -u x2gouser x2gosqlitewrapper getmounts $sid`); + return split("\n",`x2gosqlitewrapper getmounts $sid`); } } @@ -191,7 +191,7 @@ } if($backend eq 'sqlite') { - return split("\n",`sudo -u x2gouser x2gosqlitewrapper getmounts $sid`); + return split("\n",`x2gosqlitewrapper getmounts $sid`); } } @@ -209,7 +209,7 @@ } if($backend eq 'sqlite') { - `sudo -u x2gouser x2gosqlitewrapper deletemount $sid \"$path\"`; + `x2gosqlitewrapper deletemount $sid \"$path\"`; } } @@ -234,7 +234,7 @@ } if($backend eq 'sqlite') { - if( `sudo -u x2gouser x2gosqlitewrapper insertmount $sid \"$path\" $client` eq "ok") + if( `x2gosqlitewrapper insertmount $sid \"$path\" $client` eq "ok") { $res_ok=1; } @@ -258,7 +258,7 @@ } if($backend eq 'sqlite') { - my $err=`sudo -u x2gouser x2gosqlitewrapper insertsession $display $server $sid`; + my $err=`x2gosqlitewrapper insertsession $display $server $sid`; if($err ne "ok") { die "$err: x2gosqlitewrapper insertsession $display $server $sid"; @@ -288,7 +288,7 @@ } if($backend eq 'sqlite') { - my $err= `sudo -u x2gouser x2gosqlitewrapper createsession $cookie $pid $client $gr_port $snd_port $fs_port $sid`; + my $err= `x2gosqlitewrapper createsession $cookie $pid $client $gr_port $snd_port $fs_port $sid`; if($err ne "ok") { die $err; @@ -312,7 +312,7 @@ } if($backend eq 'sqlite') { - `sudo -u x2gouser x2gosqlitewrapper insertport $server $sid $sshport`; + `x2gosqlitewrapper insertport $server $sid $sshport`; } } @@ -332,7 +332,7 @@ } if($backend eq 'sqlite') { - `sudo -u x2gouser x2gosqlitewrapper resume $client $sid`; + `x2gosqlitewrapper resume $client $sid`; } } @@ -351,7 +351,7 @@ } if($backend eq 'sqlite') { - `sudo -u x2gouser x2gosqlitewrapper changestatus $status $sid`; + `x2gosqlitewrapper changestatus $status $sid`; } } @@ -378,7 +378,7 @@ } if($backend eq 'sqlite') { - return split("\n",`sudo -u x2gouser x2gosqlitewrapper getdisplays $server`); + return split("\n",`x2gosqlitewrapper getdisplays $server`); } } @@ -405,7 +405,7 @@ } if($backend eq 'sqlite') { - return split("\n",`sudo -u x2gouser x2gosqlitewrapper getports $server`); + return split("\n",`x2gosqlitewrapper getports $server`); } } @@ -431,7 +431,7 @@ } if($backend eq 'sqlite') { - return split("\n",`sudo -u x2gouser x2gosqlitewrapper getservers`); + return split("\n",`x2gosqlitewrapper getservers`); } } @@ -458,7 +458,7 @@ } if($backend eq 'sqlite') { - $agent=`sudo -u x2gouser x2gosqlitewrapper getagent $sid`; + $agent=`x2gosqlitewrapper getagent $sid`; } return $agent; } @@ -485,7 +485,7 @@ } if($backend eq 'sqlite') { - $display=`sudo -u x2gouser x2gosqlitewrapper getdisplay $sid`; + $display=`x2gosqlitewrapper getdisplay $sid`; } return $display; } @@ -516,7 +516,7 @@ } if($backend eq 'sqlite') { - return split("\n",`sudo -u x2gouser x2gosqlitewrapper listsessions $server`); + return split("\n",`x2gosqlitewrapper listsessions $server`); } } @@ -547,7 +547,7 @@ } if($backend eq 'sqlite') { - return split("\n",`sudo -u x2gouser x2gosqlitewrapper listsessions_all`); + return split("\n",`x2gosqlitewrapper listsessions_all`); } } diff -Nru x2goserver-3.0.99/x2gosqlitewrapper x2goserver-3.0.99/x2gosqlitewrapper --- x2goserver-3.0.99/x2gosqlitewrapper 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/x2gosqlitewrapper 2011-02-16 09:45:09.000000000 +0000 @@ -1,149 +1,120 @@ #!/usr/bin/perl -use strict; -use DBI; -use POSIX; +use strict; -my $realuser=$ENV{SUDO_USER}; -my ($uname, $pass, $uid, $pgid, $quota, $comment, $gcos, $homedir, $shell, $expire) = getpwuid(getuid()); +use DBI; +use POSIX; -if($uname ne "x2gouser") +if ($< eq $>) { - die "Use \"sudo -u x2gouser\" to run this programm"; + die "Please install this program as SUID x2gouser!\n"; } -my $cmd=shift or die "command not specified"; - - -my $user="x2gouser"; -my ($name, $pass, $uid, $pgid, $quota, $comment, $gcos, $dir, $shell, $expire) = getpwnam($user); -my $dbfile="$dir/x2go_sessions"; -my $dbfile="/var/db/x2go/x2go_sessions"; - +my $realuser=$<; +my ($uname, $pass, $uid, $pgid, $quota, $comment, $gcos, $homedir, $shell, $expire) = getpwuid(getuid()); +my $dbfile="/var/lib/x2go/x2go_sessions"; my $dbh=DBI->connect("dbi:SQLite:dbname=$dbfile","","",{AutoCommit => 1}) or die $_; +my $cmd=shift or die "command not specified"; if($cmd eq "rmsessionsroot") { - checkroot(); - my $sid=shift or die "argument \"session_id\" missed"; - my $sth=$dbh->prepare("delete from sessions where session_id='$sid'"); - $sth->execute()or die; - $sth->finish(); + checkroot(); + my $sid=shift or die "argument \"session_id\" missed"; + my $sth=$dbh->prepare("delete from sessions where session_id=?"); + $sth->execute($sid)or die; + $sth->finish(); } elsif($cmd eq "listsessionsroot") { - checkroot(); - my $server=shift or die "argument \"server\" missed"; - my @strings; - my $sth=$dbh->prepare("select agent_pid, session_id, display, server, status, - substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),9,11), - cookie,client,gr_port,sound_port, - substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),9,11), - uname, - strftime('%s','now','localtime') - strftime('%s',init_time),fs_port from sessions - where server='$server' order by status desc"); - $sth->execute()or die; - my @data; - my $i=0; - while (@data = $sth->fetchrow_array) - { - @strings[$i++]=join('|',@data); - } - $sth->finish(); - print join("\n",@strings); + checkroot(); + my $server=shift or die "argument \"server\" missed"; + my @strings; + my $sth=$dbh->prepare("select agent_pid, session_id, display, server, status, + substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),9,11), + cookie,client,gr_port,sound_port, + substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),9,11), + uname, + strftime('%s','now','localtime') - strftime('%s',init_time),fs_port from sessions + where server=? order by status desc"); + $sth->execute($server) or die; + fetchrow_printall_array($sth); } elsif($cmd eq "listsessionsroot_all") { - checkroot(); - my @strings; - my $sth=$dbh->prepare("select agent_pid, session_id, display, server, status, - substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),9,11), - cookie,client,gr_port,sound_port, - substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),9,11), - uname, - strftime('%s','now','localtime') - strftime('%s',init_time),fs_port from sessions - order by status desc"); - $sth->execute()or die; - my @data; - my $i=0; - while (@data = $sth->fetchrow_array) - { - @strings[$i++]=join('|',@data); - } - $sth->finish(); - print join("\n",@strings); + checkroot(); + my @strings; + my $sth=$dbh->prepare("select agent_pid, session_id, display, server, status, + substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),9,11), + cookie,client,gr_port,sound_port, + substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),9,11), + uname, + strftime('%s','now','localtime') - strftime('%s',init_time),fs_port from sessions + order by status desc"); + $sth->execute()or die; + fetchrow_printall_array($sth); } - elsif($cmd eq "getmounts") { - my $sid=shift or die "argument \"session_id\" missed"; - my @strings; - my $sth=$dbh->prepare("select client, path from mounts where session_id='$sid'"); - $sth->execute()or die; - my @data; - my $i=0; - while (@data = $sth->fetchrow_array) - { - @strings[$i++]=join("|",@data); - } - $sth->finish(); - $dbh->disconnect(); - print join("\n",@strings); + my $sid=shift or die "argument \"session_id\" missed"; + my @strings; + my $sth=$dbh->prepare("select client, path from mounts where session_id=?"); + $sth->execute($sid)or die; + fetchrow_printall_array($sth); } elsif($cmd eq "deletemount") { - my $sid=shift or die "argument \"session_id\" missed"; - my $path=shift or die "argument \"path\" missed"; - my $sth=$dbh->prepare("delete from mounts where session_id='$sid' and path='$path'"); - $sth->execute(); - $sth->finish(); + my $sid=shift or die "argument \"session_id\" missed"; + my $path=shift or die "argument \"path\" missed"; + my $sth=$dbh->prepare("delete from mounts where session_id=? and path=?"); + $sth->execute($sid, $path); + $sth->finish(); } elsif($cmd eq "insertmount") { - my $sid=shift or die "argument \"session_id\" missed"; - my $path=shift or die "argument \"path\" missed"; - my $client=shift or die "argument \"client\" missed"; - my $sth=$dbh->prepare("insert into mounts (session_id,path,client) values ('$sid','$path','$client')"); - $sth->execute(); - if(!$sth->err()) - { - print "ok"; - } - $sth->finish(); + my $sid=shift or die "argument \"session_id\" missed"; + my $path=shift or die "argument \"path\" missed"; + my $client=shift or die "argument \"client\" missed"; + my $sth=$dbh->prepare("insert into mounts (session_id,path,client) values (?, ?, ?)"); + $sth->execute($sid, $path, $client); + if(!$sth->err()) + { + print "ok"; + } + $sth->finish(); } elsif($cmd eq "insertsession") { my $display=shift or die "argument \"display\" missed"; my $server=shift or die "argument \"server\" missed"; - my $sid=shift or die "argument \"session_id\" missed"; - my $sth=$dbh->prepare("insert into sessions (display,server,uname,session_id, init_time, last_time) values - ('$display','$server','$realuser','$sid', datetime('now','localtime'), datetime('now','localtime'))"); - $sth->execute()or die $_; - $sth->finish(); - print "ok"; + my $sid=shift or die "argument \"session_id\" missed"; + my $sth=$dbh->prepare("insert into sessions (display,server,uname,session_id, init_time, last_time) values + (?, ?, ?, ?, datetime('now','localtime'), datetime('now','localtime'))"); + $sth->execute($display, $server, $realuser, $sid) or die $_; + $sth->finish(); + print "ok"; } elsif($cmd eq "createsession") { - my $cookie=shift or die"argument \"cookie\" missed"; - my $pid=shift or die"argument \"pid\" missed"; - my $client=shift or die"argument \"client\" missed"; - my $gr_port=shift or die"argument \"gr_port\" missed"; - my $snd_port=shift or die"argument \"snd_port\" missed"; - my $fs_port=shift or die"argument \"fs_port\" missed"; - my $sid=shift or die "argument \"session_id\" missed"; - my $sth=$dbh->prepare("update sessions set status='R',last_time=datetime('now','localtime'),cookie='$cookie',agent_pid='$pid', - client='$client',gr_port='$gr_port',sound_port='$snd_port',fs_port='$fs_port' where session_id='$sid' and uname='$realuser'"); - $sth->execute()or die; - $sth->finish(); - print "ok"; + my $cookie=shift or die"argument \"cookie\" missed"; + my $pid=shift or die"argument \"pid\" missed"; + my $client=shift or die"argument \"client\" missed"; + my $gr_port=shift or die"argument \"gr_port\" missed"; + my $snd_port=shift or die"argument \"snd_port\" missed"; + my $fs_port=shift or die"argument \"fs_port\" missed"; + my $sid=shift or die "argument \"session_id\" missed"; + my $sth=$dbh->prepare("update sessions set status='R',last_time=datetime('now','localtime'),cookie=?,agent_pid=?, + client=?,gr_port=?,sound_port=?,fs_port=? where session_id=? and uname=?"); + $sth->execute($cookie, $pid, $client, $gr_port, $snd_port, $fs_port, $sid, $realuser)or die; + $sth->finish(); + print "ok"; } elsif($cmd eq "insertport") @@ -151,171 +122,169 @@ my $server=shift or die "argument \"server\" missed"; my $sid=shift or die "argument \"session_id\" missed"; my $sshport=shift or die "argument \"port\" missed"; - my $sth=$dbh->prepare("insert into used_ports (server,session_id,port) values ('$server','$sid','$sshport')"); - $sth->execute()or die; - $sth->finish(); - + my $sth=$dbh->prepare("insert into used_ports (server,session_id,port) values (?, ?, ?)"); + $sth->execute($server, $sid, $sshport) or die; + $sth->finish(); } - elsif($cmd eq "resume") { - my $client=shift or die "argument \"client\" missed"; - my $sid=shift or die "argument \"session_id\" missed"; - my $sth=$dbh->prepare("update sessions set last_time=datetime('now','localtime'),status='R', - client='$client' where session_id = '$sid' and uname='$realuser'"); - $sth->execute()or die; - $sth->finish(); + my $client=shift or die "argument \"client\" missed"; + my $sid=shift or die "argument \"session_id\" missed"; + my $sth=$dbh->prepare("update sessions set last_time=datetime('now','localtime'),status='R', + client=? where session_id = ? and uname=?"); + $sth->execute($client, $sid, $realuser) or die; + $sth->finish(); } elsif($cmd eq "changestatus") { - my $status=shift or die "argument \"status\" missed"; - my $sid=shift or die "argument \"session_id\" missed"; - my $sth=$dbh->prepare("update sessions set last_time=datetime('now','localtime'), - status='$status' where session_id = '$sid' and uname='$realuser'"); - $sth->execute()or die; - $sth->finish(); + my $status=shift or die "argument \"status\" missed"; + my $sid=shift or die "argument \"session_id\" missed"; + my $sth=$dbh->prepare("update sessions set last_time=datetime('now','localtime'), + status=? where session_id = ? and uname=?"); + $sth->execute($status, $sid, $realuser)or die; + $sth->finish(); } elsif($cmd eq "getdisplays") { - #ignore $server - my @strings; - my $sth=$dbh->prepare("select display from sessions"); - $sth->execute()or die; - my @data; - my $i=0; - while (@data = $sth->fetchrow_array) - { - @strings[$i++]='|'.@data[0].'|'; - } - $sth->finish(); - print join("\n",@strings); + + #ignore $server + my @strings; + my $sth=$dbh->prepare("select display from sessions"); + $sth->execute()or die; + my @data; + my $i=0; + while (@data = $sth->fetchrow_array) + { + @strings[$i++]='|'.@data[0].'|'; + } + $sth->finish(); + print join("\n",@strings); } elsif($cmd eq "getports") { - #ignore $server - my $server=shift or die "argument \"server\" missed"; - my @strings; - my $sth=$dbh->prepare("select port from used_ports"); - $sth->execute()or die; - my @data; - my $i=0; - while (@data = $sth->fetchrow_array) - { - @strings[$i++]='|'.@data[0].'|'; - } - $sth->finish(); - print join("\n",@strings); + + #ignore $server + my $server=shift or die "argument \"server\" missed"; + my @strings; + my $sth=$dbh->prepare("select port from used_ports"); + $sth->execute()or die; + my @data; + my $i=0; + while (@data = $sth->fetchrow_array) + { + @strings[$i++]='|'.@data[0].'|'; + } + $sth->finish(); + print join("\n",@strings); } elsif($cmd eq "getservers") { - my @strings; - my $sth=$dbh->prepare("select server,count(*) from sessions where status != 'F' group by server"); - $sth->execute()or die; - my @data; - my $i=0; - while (@data = $sth->fetchrow_array) - { - @strings[$i++]=@data[0]; - } - $sth->finish(); - print join("\n",@strings); + my @strings; + my $sth=$dbh->prepare("select server,count(*) from sessions where status != 'F' group by server"); + $sth->execute()or die; + my @data; + my $i=0; + while (@data = $sth->fetchrow_array) + { + @strings[$i++]=@data[0]; + } + $sth->finish(); + print join("\n",@strings); } elsif($cmd eq "getagent") { - my $sid=shift or die "argument \"session_id\" missed"; - my $agent; - my $sth=$dbh->prepare("select agent_pid from sessions - where session_id ='$sid'"); - $sth->execute()or die; - my @data; - my $i=0; - if(@data = $sth->fetchrow_array) - { - $agent=@data[0]; - } - $sth->finish(); - print $agent; + my $sid=shift or die "argument \"session_id\" missed"; + my $agent; + my $sth=$dbh->prepare("select agent_pid from sessions + where session_id=?"); + $sth->execute($sid)or die; + my @data; + my $i=0; + if(@data = $sth->fetchrow_array) + { + $agent=@data[0]; + } + $sth->finish(); + print $agent; } elsif($cmd eq "getdisplay") { - my $sid=shift or die "argument \"session_id\" missed"; - my $display; - my $sth=$dbh->prepare("select display from sessions - where session_id ='$sid'"); - $sth->execute()or die; - my @data; - my $i=0; - if(@data = $sth->fetchrow_array) - { - $display=@data[0]; - } - $sth->finish(); - print $display; + my $sid=shift or die "argument \"session_id\" missed"; + my $display; + my $sth=$dbh->prepare("select display from sessions + where session_id =?"); + $sth->execute($sid)or die; + my @data; + my $i=0; + if(@data = $sth->fetchrow_array) + { + $display=@data[0]; + } + $sth->finish(); + print $display; } elsif($cmd eq "listsessions") { - my $server=shift or die "argument \"server\" missed"; - my @strings; - my $sth=$dbh->prepare("select agent_pid, session_id, display, server, status, - substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),9,11), - cookie,client,gr_port,sound_port, - substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),9,11), - uname, - strftime('%s','now','localtime') - strftime('%s',init_time),fs_port from sessions - where status !='F' and server='$server' and uname='$realuser' - and ( session_id not like '%XSHAD%') order by status desc"); - $sth->execute()or die; - my @data; - my $i=0; - while (@data = $sth->fetchrow_array) - { - @strings[$i++]=join('|',@data); - } - $sth->finish(); - print join("\n",@strings); + my $server=shift or die "argument \"server\" missed"; + my @strings; + my $sth=$dbh->prepare("select agent_pid, session_id, display, server, status, + substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),9,11), + cookie,client,gr_port,sound_port, + substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),9,11), + uname, + strftime('%s','now','localtime') - strftime('%s',init_time),fs_port from sessions + where status !='F' and server=? and uname=? + and ( session_id not like '%XSHAD%') order by status desc"); + $sth->execute($server, $realuser)or die; + fetchrow_printall_array($sth); } elsif($cmd eq "listsessions_all") { - my @strings; - my $sth=$dbh->prepare("select agent_pid, session_id, display, server, status, - substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),9,11), - cookie,client,gr_port,sound_port, - substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),9,11), - uname, - strftime('%s','now','localtime') - strftime('%s',init_time),fs_port from sessions - where status !='F' and uname='$realuser' and ( session_id not like '%XSHAD%') order by status desc"); - $sth->execute()or die; - my @data; - my $i=0; - while (@data = $sth->fetchrow_array) - { - @strings[$i++]=join('|',@data); - } - $sth->finish(); - print join("\n",@strings); + my @strings; + my $sth=$dbh->prepare("select agent_pid, session_id, display, server, status, + substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',init_time),9,11), + cookie,client,gr_port,sound_port, + substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),0,6)||substr(strftime('%d.%m.%Y*%H:%M:%S',last_time),9,11), + uname, + strftime('%s','now','localtime') - strftime('%s',init_time),fs_port from sessions + where status !='F' and uname=? and ( session_id not like '%XSHAD%') order by status desc"); + $sth->execute($realuser)or die; + fetchrow_printall_array($sth); } else { - print "unknown command $cmd\n"; + print "unknown command $cmd\n"; } $dbh->disconnect(); - - sub checkroot { - if ($realuser ne "root") - { - die "$realuser, you can not do this job"; - } -} \ No newline at end of file + if ($realuser ne "root") + { + die "$realuser, you can not do this job"; + } +} + +sub fetchrow_printall_array +{ + # print all arrays separated by the pipe symbol + local $, = '|'; + + my $sth = shift; + my @data; + while (@data = $sth->fetchrow_array()) + { + print @data, "\n"; + } + $sth->finish(); +} diff -Nru x2goserver-3.0.99/x2gostartagent x2goserver-3.0.99/x2gostartagent --- x2goserver-3.0.99/x2gostartagent 2011-01-26 14:20:04.000000000 +0000 +++ x2goserver-3.0.99/x2gostartagent 2011-02-16 09:45:09.000000000 +0000 @@ -196,12 +196,12 @@ X2GO_HOST=nx/nx,link=${X2GO_LINK},pack=${X2GO_PACK},limit=0,root=${SESSION_DIR},cache=8M,images=32M,type=${X2GO_TYPE},\ id=${SESSION_NAME},\ cookie=$X2GO_COOKIE,errors=${SESSION_DIR}/session.log,kbtype=null/null,\ -geometry=${X2GO_GEOMETRY},resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT},client=linux +geometry=${X2GO_GEOMETRY},resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT},client=linux,menu=0 else X2GO_HOST=nx/nx,link=${X2GO_LINK},pack=${X2GO_PACK},limit=0,root=${SESSION_DIR},cache=8M,images=32M,type=${X2GO_TYPE},\ id=${SESSION_NAME},\ cookie=$X2GO_COOKIE,errors=${SESSION_DIR}/session.log,kbtype=${X2GO_KBD_TYPE},\ -geometry=${X2GO_GEOMETRY},resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT},client=linux +geometry=${X2GO_GEOMETRY},resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT},client=linux,menu=0 fi