[X2Go-Commits] x2goserver.git - release/4.0.1.x (branch) updated: 4.0.1.9-35-g8347d3f
X2Go dev team
git-admin at x2go.org
Fri Jan 3 18:00:39 CET 2014
The branch, release/4.0.1.x has been updated
via 8347d3fef0e5cbabe4aa48f503612fa7b9d078f8 (commit)
from b03665513ab1969b069c1351fe17cbb8b5fca256 (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:
debian/changelog | 1 +
x2goserver-printing/bin/x2goprint | 9 ++++----
.../bin/x2gofm => x2goserver/lib/x2goutils.pm | 24 +++++++++++++-------
3 files changed, 22 insertions(+), 12 deletions(-)
copy x2goserver-fmbindings/bin/x2gofm => x2goserver/lib/x2goutils.pm (60%)
mode change 100755 => 100644
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index fd4f452..2776c32 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -174,6 +174,7 @@ x2goserver (4.0.0.8-0x2go1) UNRELEASED; urgency=low
- Avoid one argument system calls and backticks in x2gocleansessions and
x2golistsessions_root.
- Avoid one argument system calls and backticks in x2golistsessions.
+ - Avoid one argument system calls and backticks in x2goprint.
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Thu, 28 Nov 2013 16:14:32 +0100
diff --git a/x2goserver-printing/bin/x2goprint b/x2goserver-printing/bin/x2goprint
index b5739c8..79890a4 100755
--- a/x2goserver-printing/bin/x2goprint
+++ b/x2goserver-printing/bin/x2goprint
@@ -29,6 +29,7 @@ use Sys::Syslog qw( :standard :macros );
use lib `x2gopath lib`;
use x2godbwrapper;
use x2gologlevel;
+use x2goutils;
openlog($0,'cons,pid','user');
setlogmask( LOG_UPTO(x2gologlevel()) );
@@ -52,7 +53,7 @@ sub check_usage
if (scalar(@ARGV) == 1)
{
syslog('info', "x2goprint was called with only one cmd line arg, running in x2golistsessions wrapper mode");
- system ("su @ARGV[0] -c \"x2golistsessions --all-servers\"");
+ system ("su", "@ARGV[0]", "-c", "x2golistsessions --all-servers");
exit 0;
}
elsif (scalar(@ARGV) != 4)
@@ -100,7 +101,7 @@ chown $uid, $gid, "$spooltmp";
chmod 0700, "$spooltmp";
# this last part mainly uses the session user's privileges
-my $mounts=`su $user -c "x2golistmounts $session"`;
+my $mounts=x2goutils::system_capture_merged_output("su", "$user", "-c", "x2golistmounts $session");
if ( $mounts=~m/$spooldir/)
{
@@ -117,7 +118,7 @@ if ( $mounts=~m/$spooldir/)
}
chown $uid, $gid, "$spooltmp/$pdfFile";
- system("su $user -c \"mv $spooltmp/$pdfFile $spooldir\"");
+ system("su", "$user", "-c", "mv $spooltmp/$pdfFile $spooldir");
syslog('debug', "x2goprint moved file $pdfFile to X2Go client's spool dir");
open (RFILE,">$spooltmp/$pdfFile.ready");
@@ -125,7 +126,7 @@ if ( $mounts=~m/$spooldir/)
close (RFILE);
chown $uid, $gid, "$spooltmp/$pdfFile.ready";
- system ("su $user -c \"mv $spooltmp/$pdfFile.ready $spooldir\"");
+ system ("su", "$user", "-c", "mv $spooltmp/$pdfFile.ready $spooldir");
syslog('debug', "x2goprint moved file $pdfFile.ready to X2Go client's spool dir, X2Go client should start the print dialog very soon");
} else {
diff --git a/x2goserver-fmbindings/bin/x2gofm b/x2goserver/lib/x2goutils.pm
old mode 100755
new mode 100644
similarity index 60%
copy from x2goserver-fmbindings/bin/x2gofm
copy to x2goserver/lib/x2goutils.pm
index 9070055..649241a
--- a/x2goserver-fmbindings/bin/x2gofm
+++ b/x2goserver/lib/x2goutils.pm
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# Copyright (C) 2007-2012 X2Go Project - http://wiki.x2go.org
+# Copyright (C) 2013 X2Go Project - http://wiki.x2go.org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,13 +17,21 @@
# Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
-# Copyright (C) 2012 Milan Knížek <knizek.confy at gmail.com>
-# Copyright (C) 2012 Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
+# Copyright (C) 2013 Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
+# Copyright (C) 2013 Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
+# Copyright (C) 2013 Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+package x2goutils;
use strict;
+use base 'Exporter';
+our @EXPORT = ( 'system_capture_merged_output' );
+
+
+sub system_capture_merged_output {
+ my $cmd = shift;
+ my @args = @_;
+ return capture_merged { system( $cmd, @args ); };
+}
-my $fname=shift;
-open(F,"<$fname") or die "can't open $fname";
-my $dir=<F>;
-close(F);
-system( "xdg-open $dir" );
+1;
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