[X2Go-Commits] x2goserver.git - build-baikal (branch) updated: 3.1.1.3-318-ged0b887

X2Go dev team git-admin at x2go.org
Fri Jan 3 20:51:59 CET 2014


The branch, build-baikal has been updated
       via  ed0b8873afac1c468bc0be17cc1b18501547ff7d (commit)
      from  ca0660229884f3615ac7d03bd515043f603acff7 (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 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index fc2fd45..5f84fea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -260,6 +260,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 cdbf8fa..779bc6d 100755
--- a/x2goserver-printing/bin/x2goprint
+++ b/x2goserver-printing/bin/x2goprint
@@ -28,6 +28,7 @@ use Sys::Syslog qw( :standard :macros );
 
 use X2Go::Server::DB;
 use X2Go::Log qw(loglevel);
+use X2Go::Utils qw(system_capture_merged_output);
 
 openlog($0,'cons,pid','user');
 setlogmask( LOG_UPTO(loglevel()) );
@@ -51,7 +52,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)
@@ -99,7 +100,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=system_capture_merged_output("su", "$user", "-c", "x2golistmounts $session");
 if ( $mounts=~m/$spooldir/)
 {
 
@@ -116,7 +117,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");
@@ -124,7 +125,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 {


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