From twtoal@ucdavis.edu Wed Jan 11 18:52:21 2017 Received: (at 1133) by bugs.x2go.org; 11 Jan 2017 17:52:27 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on ymir.das-netzwerkteam.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,URIBL_BLOCKED autolearn=ham version=3.3.2 Received: from localhost (localhost [127.0.0.1]) by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 5897B3CDDD for <1133@bugs.x2go.org>; Wed, 11 Jan 2017 18:52:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de Received: from ymir.das-netzwerkteam.de ([127.0.0.1]) by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wdl2nlvRYzS0 for <1133@bugs.x2go.org>; Wed, 11 Jan 2017 18:52:14 +0100 (CET) Received: from mail-pf0-f179.google.com (mail-pf0-f179.google.com [209.85.192.179]) by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id C84485DA91 for <1133@bugs.x2go.org>; Wed, 11 Jan 2017 18:52:13 +0100 (CET) Received: by mail-pf0-f179.google.com with SMTP id 189so51568575pfu.3 for <1133@bugs.x2go.org>; Wed, 11 Jan 2017 09:52:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucdavis-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gR1jFkfc4WpxF+VbBZomRqwzbuNT0QyiOoh4JRabnQY=; b=HT05Lh8Cf2YeIWHpMAnRFLvTcyuZbNgYA71cMKJKFQYOq2anKtGcPk60MGAGqtlwRa 8GgPtq+hQzEF5OdvyCnn9X24upjCDEx/vHFA4Zpt6vYfbfPTfz4h079FYNh7wH3+Qcyr f4wKmeWYZ1rLKnCcIPhqPx/m37n80ssyRM56b89bNDk//NGPKKPr4oYlmgVWVmR16UXw wLcejZ5oUAhMfoA4gwyL81dwrdRENOsCjlRUt3T7T6qbl/8eOSBZaa1dvjCQvrz+su4Y AhtWTB9PilbMbyGC3ek5nbctn9SfVerX3eJdLqLJ4lxBUPSNvqeRZwUcu2b8/+hwXTdu SW3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gR1jFkfc4WpxF+VbBZomRqwzbuNT0QyiOoh4JRabnQY=; b=PjNlaBVsvd8EW9nOilJFX2okFzZPFaqcnb0vVR9GKFxmFyv3tYtPkJSPPOxmSWW6z8 UIkNJeAeW6DE9f6NtFdthyJaDaDWy/a25sSmQSCXdoXsaOn3YTNKL/oKZGKKObu1HEaD 7fAvdMUlKcA7W3cIgfeJ74DDB0+IKhQHPxomC989SBBKiwdwkn7UfznFguukLoCX2oKC dJyeAJRbQTAHCCE/vVFazP5NUSWm36xrkzN/yN10fbcjiMaEoVMYE3MQCzciu7jVM62i uYsR5SKViSikSa+3QCzjvhjOSzYVHbXQj4ftWsiQUMOj2QDuJjDaa73QvQz2QzazpYku 9Tog== X-Gm-Message-State: AIkVDXKAGSOLdhDl0qUKGRp774PqXHc2X1BssO88hOf8wlOmLlQ9KgiLO2hPNQHc0ICDHw== X-Received: by 10.84.232.133 with SMTP id i5mr11567386plk.79.1484157132331; Wed, 11 Jan 2017 09:52:12 -0800 (PST) Received: from dhcp22-gc1.genomecenter.ucdavis.edu (dhcp22-gc1.genomecenter.ucdavis.edu. [128.120.136.85]) by smtp.gmail.com with ESMTPSA id q7sm15456124pgn.20.2017.01.11.09.52.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 09:52:11 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: [X2Go-Dev] Inconsistent Perl used by server or its agent on connect From: Ted Toal In-Reply-To: <8a78c5fb-56db-a260-705f-6b2b0671d9c6@ionic.de> Date: Wed, 11 Jan 2017 09:52:10 -0800 Cc: 1133@bugs.x2go.org Content-Transfer-Encoding: quoted-printable Message-Id: <4C5C5AD5-158A-457D-A3BC-C1A5ADF1B461@ucdavis.edu> References: <7a1f025f-6a4f-9c6a-ffe6-4d18a712da86@baur-itcs.de> <836dd91e-6bc3-35e1-3759-e66b55715b1b@baur-itcs.de> <35BC44E5-C0D7-4B77-A09E-FBD00AD5193E@ucdavis.edu> <8a78c5fb-56db-a260-705f-6b2b0671d9c6@ionic.de> To: Mihai Moldovan X-Mailer: Apple Mail (2.3259) > If you explicitly break your setup by defining random variables in = shell startup > scripts, you'll have to handle the outcome. >=20 I did not break perl, I replaced perl with a different perl, which = involved adding a PATH and changing Perl env. vars. In a sense, the = real problem is that Perl finds its libraries in a stupid way. But = given that it is this way, I don=E2=80=99t know what the best way to = deal with this situation is. Fixing it with =E2=80=98if=E2=80=99 = statements in .bashrc is a lousy solution, an annoyance to a lot of = people. >=20 > If anything, we could explicitly unset PERL5LIB in the client = application for > additional sanitation. Would that make sense? Yes it would. But then I don=E2=80=99t know if Perl will still find the = libraries it needs. It might, because it may have the default library = paths hard-coded. I seem to remember reading that Perl puts some paths = in place when it is compiled. Maybe the Active Perl I use was not = compiled correctly to get the correct default paths, and if it had been = maybe I wouldn=E2=80=99t need to set PERL5LIB. ted >=20 >=20 > Mihai > On Jan 11, 2017, at 12:58 AM, Mihai Moldovan wrote: >=20 > Control: reassign -1 x2goserver 4.0.1.20 >=20 > On 11.01.2017 02:48 AM, Ted Toal wrote: >> perl has the -l option for specifying the PERL5LIB path. That option = can, and I think should, be used on the shebang of the x2go perl = scripts: >>=20 >> #!/usr/bin/perl -l /usr/lib/perl5 >>=20 >> or something like that. I know the shebang line allows args. >=20 > If you explicitly break your setup by defining random variables in = shell startup > scripts, you'll have to handle the outcome. >=20 > Following the same line of original reasoning, users COULD potentially = replace > /usr/bin/perl with /bin/false. It's unreasonable to expect stuff to = check > whether /usr/bin/perl actually is a Perl interpreter. >=20 >=20 > In your case, the proper workaround would be to change the perl = hashbangs to > "#!/usr/bin/env perl" instead, so that the first matching perl binary = in $PATH > is used. I won't change that in x2goserver, though, as we have = literally no idea > what users do to their PATH variable (and shouldn't assume.) Note, = that this may > still not work, as I vaguely remember at least X2Go Client to export a = sane PATH > value before executing any command remotely, though. >=20 > If anything, we could explicitly unset PERL5LIB in the client = application for > additional sanitation. Would that make sense? >=20 >=20 >=20 > Mihai >=20