X2Go dev team | 24 Oct 09:00 2013

x2goserver.git - release/4.0.1.x (branch) updated: 4.0.1.6-11-gc3be1cd

The branch, release/4.0.1.x has been updated
       via  c3be1cdb1145b0d6ebdc27f0aa1c2b8564f0000b (commit)
      from  a7d331d0fc0e2e1814a081d434fad5d5d1d6511a (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 -----------------------------------------------------------------
commit c3be1cdb1145b0d6ebdc27f0aa1c2b8564f0000b
Author: Helmer Teles <helmer.teles <at> mykolab.com>
Date:   Thu Oct 24 08:59:26 2013 +0200

    Make umask that is used when mounting client-side folders via SSHFS configurable in x2goserver.conf.
(Fixes: #331).

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog               |    5 +++++
 x2goserver/bin/x2gomountdirs   |   17 +++++++++++++++--
 x2goserver/etc/x2goserver.conf |    4 ++++
 3 files changed, 24 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 46354a8..d40a494 100644
--- a/debian/changelog
+++ b/debian/changelog
 <at>  <at>  -24,6 +24,11  <at>  <at>  x2goserver (4.0.1.7-0~x2go1) UNRELEASED; urgency=low
     - Move xfonts-base from Recommends: field to Depends: field (bin:package
       x2goserver).

+  [ Helmer Teles ]
+  * New upstream version (4.0.1.7):
+    - Make umask that is used when mounting client-side folders via SSHFS
+      configurable in x2goserver.conf. (Fixes: #331).
+
   [ Jürgen Hötzel ]
   * New upstream version (4.0.1.7):
     - Use bash-builtin 'type' instead of to be avoided 'which'. (Fixes: #305).
diff --git a/x2goserver/bin/x2gomountdirs b/x2goserver/bin/x2gomountdirs
index 10c40e2..8905672 100755
--- a/x2goserver/bin/x2gomountdirs
+++ b/x2goserver/bin/x2gomountdirs
 <at>  <at>  -267,15 +267,28  <at>  <at>  for (my $i=0;$i< <at> dirs;$i++)

 	if (db_insertmount( $session, $mntpath, $host))
 	{
+
+		my $Config = new Config::Simple(syntax=>'ini');
+		$Config->read('/etc/x2go/x2goserver.conf' );
+		my $umask=$Config->param("security.umask");
+		my $umaskstr="";
+
+		if ($umask ne "")
+		{
+			$umaskstr="umask=$umask";
+		} else {
+			$umaskstr="default_permissions";
+		}
 		my $code_conv=$ENV{'X2GO_ICONV'};
+
 		if ($code_conv ne "")
 		{
 			$code_conv="-o $code_conv";
 		}
-		$msg = "sshfs $code_conv -o idmap=user,uid=`id -u`,gid=`id
-g`,ServerAliveInterval=300,Cipher=blowfish,IdentityFile=$key,UserKnownHostsFile=$key.ident
\"$user\"\ <at> $host:\" <at> dirs[$i]\" \"$mntpath\" -p $port";
+		$msg = "sshfs $code_conv -o idmap=user,uid=`id -u`,gid=`id
-g`,$umaskstr,ServerAliveInterval=300,Cipher=blowfish,IdentityFile=$key,UserKnownHostsFile=$key.ident
\"$user\"\ <at> $host:\" <at> dirs[$i]\" \"$mntpath\" -p $port";
 		syslog('debug', "executing: $msg");
 		print "inserted, $msg\n";
-		if (system("sshfs  $code_conv -o idmap=user,uid=`id -u`,gid=`id
-g`,ServerAliveInterval=300,Cipher=blowfish,IdentityFile=$key,UserKnownHostsFile=$key.ident
\"$user\"\ <at> $host:\" <at> dirs[$i]\" \"$mntpath\" -p $port 2>>~/mounts.log")==0)
+		if (system("sshfs  $code_conv -o idmap=user,uid=`id -u`,gid=`id
-g`,$umaskstr,ServerAliveInterval=300,Cipher=blowfish,IdentityFile=$key,UserKnownHostsFile=$key.ident
\"$user\"\ <at> $host:\" <at> dirs[$i]\" \"$mntpath\" -p $port 2>>~/mounts.log")==0)
 		{
 			print "mount  <at> dirs[$i] ok\n";
 			syslog('notice', "successfully mounted $user\ <at> $host:$port <at> dirs[$i] to $mntpath");
diff --git a/x2goserver/etc/x2goserver.conf b/x2goserver/etc/x2goserver.conf
index 5fa6baf..c9fe270 100644
--- a/x2goserver/etc/x2goserver.conf
+++ b/x2goserver/etc/x2goserver.conf
 <at>  <at>  -4,6 +4,10  <at>  <at> 
 [limit groups]
 #bar-group=1

+[security]
+# SSHFS umask for client-side folder sharing. Leave uncommented to keep the server's default umask
+#umask="0117"
+
 [log]
 # possible levels are: emerg, alert, crit, err, warning, notice, info, debug
 loglevel=notice

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).

_______________________________________________
X2Go-commits mailing list
X2Go-commits <at> lists.berlios.de
https://lists.berlios.de/mailman/listinfo/x2go-commits

Gmane