[X2Go-Commits] x2goserver.git - build-main (branch) updated: 3.0.99-2-18-ge7f055b

X2Go dev team git-admin at x2go.org
Wed Dec 4 06:17:21 CET 2013


The branch, build-main has been updated
       via  e7f055b59ccdb72a6de702ea58cd2c8f45a3a441 (commit)
      from  636c5395686aae0a28dfac0edc551846c0121ed0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 x2goprint |   25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

The diff of changes is:
diff --git a/x2goprint b/x2goprint
index e808d46..f314329 100755
--- a/x2goprint
+++ b/x2goprint
@@ -2,8 +2,12 @@
 
 use File::Basename;
 use File::Copy;
+use File::Path;
 use strict;
 
+use lib "/usr/lib/x2go";
+use x2godbwrapper;
+
 if (scalar(@ARGV) ==1)
 {
      system ("su @ARGV[0] -c \"x2golistsessions --all-servers\" ");
@@ -31,21 +35,26 @@ if( -e "$printdir/$titleFile")
 
 ($tm,$tm,$uid,$gid,$tm,$tm,$tm,$homedir)=getpwnam($user);
 
-my $spooldir="/tmp/spool_$user/$session";
+my $spoolbase="/tmp/spool_$user";
+my $spooldir="$spoolbase/$session";
+my $spooltmp="$spoolbase/tmp";
+mkpath($spooltmp);
+chown $uid, $gid, "$spooltmp";
+chmod 0700, "$spooltmp";
 
-my $mounts=`sudo x2gopgwrapper getmounts $session`;
+my ($mounts)=db_getmounts($session);
 if( $mounts=~m/$spooldir/)
 {
-     move ("$printdir/$file", "$homedir/.x2go/C-$session/$file") or die "$!: Can't rename $file to $homedir/.x2go/C-$session/$file";
-     chown $uid, $gid, "$homedir/.x2go/C-$session/$file";
-     system ("su $user -c \"mv $homedir/.x2go/C-$session/$file $spooldir\"");
+     move("$printdir/$file", "$spooltmp") or die "$!: Can't move $file to $spooltmp/";
+     chown $uid, $gid, "$spooltmp/$file";
+     system("su $user -c \"mv $spooltmp/$file $spooldir\"");
 
-     open (RFILE,">$homedir/.x2go/C-$session/$file.ready");
+     open (RFILE,">$spooltmp/$file.ready");
      print RFILE "$file\n$title";
      close (RFILE);
 
-     chown $uid, $gid, "$homedir/.x2go/C-$session/$file.ready";
-     system ("su $user -c \"mv $homedir/.x2go/C-$session/$file.ready $spooldir\"");
+     chown $uid, $gid, "$spooltmp/$file.ready";
+     system ("su $user -c \"mv $spooltmp/$file.ready $spooldir\"");
 }
 else
 {


hooks/post-receive
-- 
x2goserver.git (X2Go Server)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goserver.git" (X2Go Server).




More information about the x2go-commits mailing list