Subject: x2golistdesktops - ss options

From: Orion Poplawski <[email-masked]>
Date: Wed, 21 Sep 2016 21:43:51 -0600

So, it appears to be well known that 'ss -lxu' has been broken on some 
systems and returns nothing.  This is currently true on EL 7.2 though 
appears fixed in 7.3 beta.

However, why is -u being passed to ss in the first place?  We're doing:

my $lines=system_capture_stdout_output("ss", "-lxu");
my @lines=split("\n", "$lines");
my @outp = grep ( /(@| )\/tmp\/.X11-unix\/X.*/, @lines);
for(my $i=0;$i<@outp;$i++)
{
...

so we're filtering the output of ss for lines that look like unix 
sockets (/tmp/.X11-unix/X*), so -lx is appropriate.  But why use '-u' to 
show UDP sockets?  No X server that I know of listens on UDP and we 
certainly would filter it out anyway.

diff --git a/x2goserver/bin/x2golistdesktops 
b/x2goserver/bin/x2golistdesktops
index 386ed17..1cbc7ef 100755
--- a/x2goserver/bin/x2golistdesktops
+++ b/x2goserver/bin/x2golistdesktops
@@ -66,7 +66,7 @@ my $uname=$ENV{'USER'};
  # -> so we need to tweak the PATH env var a little here...
  my $old_PATH=$ENV{'PATH'};
  $ENV{'PATH'}="$ENV{'PATH'}:/usr/sbin:/sbin";
-my $lines=system_capture_stdout_output("ss", "-lxu");
+my $lines=system_capture_stdout_output("ss", "-lx");
  $ENV{'PATH'}=$old_PATH;
  undef $old_PATH;

See also https://bugzilla.redhat.com/show_bug.cgi?id=1371690

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  [email-masked]
Boulder, CO 80301              http://www.cora.nwra.com

---

From: Mihai Moldovan <[email-masked]>
Date: Thu, 10 Nov 2016 16:41:29 +0100

On 22.09.2016 05:43 AM, Orion Poplawski wrote:
> show UDP sockets?  No X server that I know of listens on UDP

The only thing that comes to my mind would be XMDCP, but ...

> and we certainly would filter it out anyway.

given this, it doesn't even make sense to keep this option.

Mihai