diff options
-rw-r--r-- | sos/cleaner/mappings/hostname_map.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sos/cleaner/mappings/hostname_map.py b/sos/cleaner/mappings/hostname_map.py index d4b2c88e..e70a5530 100644 --- a/sos/cleaner/mappings/hostname_map.py +++ b/sos/cleaner/mappings/hostname_map.py @@ -184,7 +184,14 @@ class SoSHostnameMap(SoSMap): hostname = host[0] domain = host[1:] # obfuscate the short name - ob_hostname = self.sanitize_short_name(hostname) + if len(hostname) > 2: + ob_hostname = self.sanitize_short_name(hostname) + else: + # by best practice it appears the host part of the fqdn was cut + # off due to some form of truncating, as such don't obfuscate + # short strings that are likely to throw off obfuscation of + # unrelated bits and paths + ob_hostname = 'unknown' ob_domain = self.sanitize_domain(domain) self.dataset[item] = ob_domain return '.'.join([ob_hostname, ob_domain]) |