X2Go Bug report logs - #1507
pyhoca-cli exits with success (status code 0) if the remote user does not exist

version graph

Package: pyhoca-cli; Maintainer for pyhoca-cli is X2Go Developers <x2go-dev@lists.x2go.org>; Source for pyhoca-cli is src:pyhoca-cli.

Reported by: "R. Diez" <rdiezmail-2006@yahoo.de>

Date: Mon, 23 Nov 2020 19:20:03 UTC

Severity: normal

Found in version 0.6.1.2

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 23 Nov 2020 19:18:27 +0000
From ruben10post@yahoo.de  Mon Nov 23 20:18:17 2020
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-0.1 required=3.0 tests=BAYES_40,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,
	URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2
Received: from sonic314-20.consmr.mail.ir2.yahoo.com (sonic314-20.consmr.mail.ir2.yahoo.com [77.238.177.146])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 74F635DCEF
	for <submit@bugs.x2go.org>; Mon, 23 Nov 2020 20:18:14 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1606159093; bh=VjdB6n9IxRfO94ZCmyP/pf8OIwuMl7E347WAmJojPGY=; h=From:Subject:To:Date:References:From:Subject; b=Tzl3ghRxtYmukZq2/0mgu6ouU/ZUBUscQLqDVNgKCUaLgAj7hrzEegdng+pzxHzOvOy0GaN12VxKZmGin1OCDUdUci+/OJ3j1etdnCgZV6REsTqIeUs3PGn7Bwh5I/w6MZ/TIM+F22tm7VnIcNRIiWnIHA1IQofb/PNzh+J7SMYIgvWdB4Cyn2liSh9lv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TTP; Mon, 23 Nov 2020 19:18:13 +0000
Received: by smtp423.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID d310a69a521c25d0012238e1b4e4437b;
          Mon, 23 Nov 2020 19:18:08 +0000 (UTC)
From: "R. Diez" <rdiezmail-2006@yahoo.de>
Subject: pyhoca-cli exits with success (status code 0) if the remote user does
 not exist
To: submit@bugs.x2go.org
Message-ID: <f6cc1df9-da78-bc9d-54cf-9bb71eda01a8@yahoo.de>
Date: Mon, 23 Nov 2020 20:18:04 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-GB
Content-Transfer-Encoding: 7bit
References: <f6cc1df9-da78-bc9d-54cf-9bb71eda01a8.ref@yahoo.de>
X-Mailer: WebService/1.1.17111 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.8)
Package: pyhoca-cli
Version: 0.6.1.2

If the remote user does not exist, then pyhoca-cli exits with success (exit code 0). The calling script does not know then that the connection has failed.

For scripting purposes, it is important that errors are always signalled with a non-zero exit code.

Example:

$ pyhoca-cli  --server localhost  --username=does-not-exist

pyhoca-cli[97275] NOTICE: preparing requested X2Go session
pyhoca-cli[97275] (PyHocaCLI) NOTICE: preparing requested X2Go session
pyhoca-cli[97275] (x2gosessregistry-pylib) NOTICE: registering X2Go session Pyhoca-Client_Session...
pyhoca-cli[97275] (x2goclient-pylib) NOTICE: initializing X2Go session...
pyhoca-cli[97275] (x2gocontrolsession-pylib) NOTICE: connecting to [localhost]:22
pyhoca-cli[97275] (PyHocaCLI) WARN: passwordless login for ,,does-not-exist'' failed [SSHException]
pyhoca-cli: error: No existing session

$ echo "Exit status code: $?"
Exit status code: 0

Thanks in advance,
  rdiez


Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Thu Nov 21 21:18:12 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.