Added 'Where problems could occur' section.

** Description changed:

  [Impact]
  
  Running ubuntu-bug as normal user has the correct theme (see screenshots
  attached to bug #1881640), but running "sudo ubuntu-bug" has a
  different, non-matching theme (see attached screenshot). This applies to
  all Qt applications.
  
  [Test Plan]
  
  This problem can be reproduce by running a KDE application on Ubuntu
  Desktop (GNOME):
  
  1. Launch ubuntu-22.04-desktop-amd64.iso
  2. Install apport-kde
  3. Run: /usr/share/apport/apport-kde -f
  4. Run: sudo /usr/share/apport/apport-kde -f
  5. Compare both windows. They have different icons and font size.
  
  Same result with KDE:
  
  1. Use kubuntu-22.04-desktop-amd64.iso
  2. Run ubuntu-bug -f
  3. Run: sudo ubuntu-bug -f
+ 
+ [Where problems could occur]
+ Passing through an additional environment variable could lead to an undesired 
side effect (if an application expect it not be be set when run as root). Since 
this environment variable changes the code paths, it could reveal Qt bugs 
related to running as root. 
  
  [Analysis]
  
  Qt needs XDG_CURRENT_DESKTOP to be set to determine the correct theme,
  but XDG_CURRENT_DESKTOP is not in the list of environment variables to
  preserve (and not in env_keep in /etc/sudoers).
  
  On other other hand, sudo preserves the DISPLAY environment variable:
  
  $ sudo env | grep -Ev '^(LC|LS|SUDO|LANG|COLOR|TERM|PATH)'
  XAUTHORITY=/run/user/1000/gdm/Xauthority
  DISPLAY=:0
  MAIL=/var/mail/root
  LOGNAME=root
  USER=root
  HOME=/root
  SHELL=/bin/bash
  
  [Workaround]
  
  Prevent sudo from dropping XDG_CURRENT_DESKTOP by running: sudo
  XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP /usr/share/apport/apport-kde -f
  
  [Other Info]
  
  This changes was accepted upstream: https://github.com/sudo-
  project/sudo/pull/165
  
  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: apport 2.20.9-0ubuntu7.27
  ProcVersionSignature: Ubuntu 5.4.0-94.106~18.04.1-generic 5.4.157
  Uname: Linux 5.4.0-94-generic i686
  ApportVersion: 2.20.9-0ubuntu7.27
  Architecture: i386
  CurrentDesktop: KDE
  Date: Sun Jan 16 05:04:24 2022
  InstallationDate: Installed on 2022-01-15 (0 days ago)
  InstallationMedia: Kubuntu 18.04.5 LTS "Bionic Beaver" - Release i386 
(20200806.1)
  PackageArchitecture: all
  SourcePackage: apport
  UpgradeStatus: No upgrade log present (probably fresh install)

** Changed in: sudo (Ubuntu Jammy)
       Status: Incomplete => New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to sudo in Ubuntu.
https://bugs.launchpad.net/bugs/1958055

Title:
  sudo apport-kde is in a different design (stripped
  XDG_CURRENT_DESKTOP)

Status in sudo package in Ubuntu:
  Fix Released
Status in sudo source package in Jammy:
  New

Bug description:
  [Impact]

  Running ubuntu-bug as normal user has the correct theme (see
  screenshots attached to bug #1881640), but running "sudo ubuntu-bug"
  has a different, non-matching theme (see attached screenshot). This
  applies to all Qt applications.

  [Test Plan]

  This problem can be reproduce by running a KDE application on Ubuntu
  Desktop (GNOME):

  1. Launch ubuntu-22.04-desktop-amd64.iso
  2. Install apport-kde
  3. Run: /usr/share/apport/apport-kde -f
  4. Run: sudo /usr/share/apport/apport-kde -f
  5. Compare both windows. They have different icons and font size.

  Same result with KDE:

  1. Use kubuntu-22.04-desktop-amd64.iso
  2. Run ubuntu-bug -f
  3. Run: sudo ubuntu-bug -f

  [Where problems could occur]
  Passing through an additional environment variable could lead to an undesired 
side effect (if an application expect it not be be set when run as root). Since 
this environment variable changes the code paths, it could reveal Qt bugs 
related to running as root. 

  [Analysis]

  Qt needs XDG_CURRENT_DESKTOP to be set to determine the correct theme,
  but XDG_CURRENT_DESKTOP is not in the list of environment variables to
  preserve (and not in env_keep in /etc/sudoers).

  On other other hand, sudo preserves the DISPLAY environment variable:

  $ sudo env | grep -Ev '^(LC|LS|SUDO|LANG|COLOR|TERM|PATH)'
  XAUTHORITY=/run/user/1000/gdm/Xauthority
  DISPLAY=:0
  MAIL=/var/mail/root
  LOGNAME=root
  USER=root
  HOME=/root
  SHELL=/bin/bash

  [Workaround]

  Prevent sudo from dropping XDG_CURRENT_DESKTOP by running: sudo
  XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP /usr/share/apport/apport-kde
  -f

  [Other Info]

  This changes was accepted upstream: https://github.com/sudo-
  project/sudo/pull/165

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: apport 2.20.9-0ubuntu7.27
  ProcVersionSignature: Ubuntu 5.4.0-94.106~18.04.1-generic 5.4.157
  Uname: Linux 5.4.0-94-generic i686
  ApportVersion: 2.20.9-0ubuntu7.27
  Architecture: i386
  CurrentDesktop: KDE
  Date: Sun Jan 16 05:04:24 2022
  InstallationDate: Installed on 2022-01-15 (0 days ago)
  InstallationMedia: Kubuntu 18.04.5 LTS "Bionic Beaver" - Release i386 
(20200806.1)
  PackageArchitecture: all
  SourcePackage: apport
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1958055/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to