** Description changed: + [Impact] + + * An error message is included in when rendering landscape-sysinfo + statistics through pam_motd if there are processes with a non-ascii + command. This is due to the fact that environment is not passed + by pam-motd. + + * As landscape-sysinfo is present on cloud-images, this bug affects + all images since bionic. + + * This change sets locale variables in the landscape-sysinfo wrapper, + so the python interpreter can know which locale to load. + + [Test Case] + + * Make sure the system default locale is configured with a valid + charset (e.g. /etc/default/locale contains "LANG=C.UTF-8"). + + * Spawn a process with non-ascii parameters (which are part of the + configured charset): sh -c 'sleep 60; echo holà mundo' & sudo login + + * Check the output of the motd + + [Regression Potential] + + * Since this changes only alters the landscape-sysinfo wrapper script, + its effects shouldn't alter other functionalities. + + * Although it is still possible to have a misconfigured locale file, + and run commands, the effect would be limited to an error message + similar to the one which is currently displayed. + + [Original Description] + + Exception after login: --------------------- Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-24-generic x86_64) - * Documentation: https://help.ubuntu.com - * Management: https://landscape.canonical.com - * Support: https://ubuntu.com/advantage + * Documentation: https://help.ubuntu.com + * Management: https://landscape.canonical.com + * Support: https://ubuntu.com/advantage - System information as of Wed Jul 4 10:41:09 CEST 2018 + System information as of Wed Jul 4 10:41:09 CEST 2018 - System load: 0.0 Swap usage: 5% - Usage of /home: unknown Users logged in: 0 - Memory usage: 16% IP address for enp3s0: 192.168.20.12 + System load: 0.0 Swap usage: 5% + Usage of /home: unknown Users logged in: 0 + Memory usage: 16% IP address for enp3s0: 192.168.20.12 - => There were exceptions while processing one or more plugins. See - /var/log/landscape/sysinfo.log for more information. + => There were exceptions while processing one or more plugins. See + /var/log/landscape/sysinfo.log for more information. - * Meltdown, Spectre and Ubuntu: What are the attack vectors, - how the fixes work, and everything else you need to know - - https://ubu.one/u2Know + * Meltdown, Spectre and Ubuntu: What are the attack vectors, + how the fixes work, and everything else you need to know + - https://ubu.one/u2Know - * Canonical Livepatch is available for installation. - - Reduce system reboots and improve kernel security. Activate at: - https://ubuntu.com/livepatch + * Canonical Livepatch is available for installation. + - Reduce system reboots and improve kernel security. Activate at: + https://ubuntu.com/livepatch 0 pakietów może zostać zaktualizowanych. 0 aktualizacji jest aktualizacjami zabezpieczeń. -------------------- sysinfo.log: 2018-06-19 23:19:34,877 ERROR Processes plugin raised an exception. Traceback (most recent call last): - File "/usr/lib/python3/dist-packages/landscape/sysinfo/sysinfo.py", line 99, in run - result = plugin.run() - File "/usr/lib/python3/dist-packages/landscape/sysinfo/processes.py", line 18, in run - for process_info in info.get_all_process_info(): - File "/usr/lib/python3/dist-packages/landscape/lib/process.py", line 39, in get_all_process_info - process_info = self.get_process_info(process_id) - File "/usr/lib/python3/dist-packages/landscape/lib/process.py", line 61, in get_process_info - cmd_line = file.readline() - File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode - return codecs.ascii_decode(input, self.errors)[0] + File "/usr/lib/python3/dist-packages/landscape/sysinfo/sysinfo.py", line 99, in run + result = plugin.run() + File "/usr/lib/python3/dist-packages/landscape/sysinfo/processes.py", line 18, in run + for process_info in info.get_all_process_info(): + File "/usr/lib/python3/dist-packages/landscape/lib/process.py", line 39, in get_all_process_info + process_info = self.get_process_info(process_id) + File "/usr/lib/python3/dist-packages/landscape/lib/process.py", line 61, in get_process_info + cmd_line = file.readline() + File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode + return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 152: ordinal not in range(128) ----------------- the problem concerned the decoding of utf8 forms, attached patch resolve my problem, after patch my login screen looks normal: ----------------- Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-24-generic x86_64) - * Documentation: https://help.ubuntu.com - * Management: https://landscape.canonical.com - * Support: https://ubuntu.com/advantage + * Documentation: https://help.ubuntu.com + * Management: https://landscape.canonical.com + * Support: https://ubuntu.com/advantage - System information as of Wed Jul 4 11:10:20 CEST 2018 + System information as of Wed Jul 4 11:10:20 CEST 2018 - System load: 0.2 Processes: 187 - Usage of /home: unknown Users logged in: 1 - Memory usage: 18% IP address for enp3s0: 192.168.20.12 - Swap usage: 5% + System load: 0.2 Processes: 187 + Usage of /home: unknown Users logged in: 1 + Memory usage: 18% IP address for enp3s0: 192.168.20.12 + Swap usage: 5% - * Meltdown, Spectre and Ubuntu: What are the attack vectors, - how the fixes work, and everything else you need to know - - https://ubu.one/u2Know + * Meltdown, Spectre and Ubuntu: What are the attack vectors, + how the fixes work, and everything else you need to know + - https://ubu.one/u2Know - * Canonical Livepatch is available for installation. - - Reduce system reboots and improve kernel security. Activate at: - https://ubuntu.com/livepatch + * Canonical Livepatch is available for installation. + - Reduce system reboots and improve kernel security. Activate at: + https://ubuntu.com/livepatch 0 pakietów może zostać zaktualizowanych. 0 aktualizacji jest aktualizacjami zabezpieczeń.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1780071 Title: Error in system information after logging in to your account To manage notifications about this bug go to: https://bugs.launchpad.net/landscape-client/+bug/1780071/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
