[X2go-dev] BUG-RERPORT: x2goprint will not work on NFS4/Kerberos HOMES

Mike Gabriel m.gabriel at das-netzwerkteam.de
Fri Jun 25 23:52:30 CEST 2010


Hi there again,

2 issues with CUPS/X2GO printing...

1st issue:
==========
when mounting home directories via NFS (NFS3 with root_squash, NFS4  
with any kind of Kerberos security feature) you cannot copy a file as  
superuser ,,root'' to a user's HOME (x2goprint is called via  
sudo(NOPASSWD) in the cups-x2go backend).

The logical error is in the last stanza of the x2goprint file...  
(quoted and marked below).

Maybe there is already a solution for this. If not, let me know and I  
propose a suggestion (and test it with krb5p security enabled servers).

<quote>
my $mounts=`sudo x2gopgwrapper getmounts $session`;
if( $mounts=~m/$spooldir/)
{

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
      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\"");

      open (RFILE,">$homedir/.x2go/C-$session/$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\"");
}
</quote>

2nd issue:
==========
There is als some inconsistency between cups-x2go and x2goprint:

cups-x2go:
----------
<quote src="/usr/lib/cups/backend/cups-x2go">
$tempFile = "$ENV{TMPDIR}/$jid-$uid-cupsjob$$";
</quote>

BUT: $TMPDIR is not set, that's why first instances of CUPS's spool  
jobs appear in the server's root directory "/".

Most important: by design $tempFile is a full path!!!

x2goprint:
----------
$tempFile is picked up in x2goprint as $file

<quote src="/usr/bin/x2goprint">
my ($user, $session, $file, $titleFile)=@ARGV;
</quote>

However, in x2goprint $file is interpreted as a filename without path...

But maybe this problem als has been already addressed...

I also get loads of stray job files on my x2goserver, especially if  
the print mechanism is not working by some reason (e.g. broken reverse  
ssh, because i was not able to configure my client properly... ;-) )

Greets,
Mike



-- 

DAS-NETZWERKTEAM
mike gabriel, dorfstr. 27, 24245 barmissen
fon: +49 (4302) 281418, fax: +49 (4302) 281419

eMail-LeseSchreibStunde: wochentags 8h-10h
mail: m.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb



More information about the x2go-dev mailing list