Activity log for bug #1828208

Date Who What changed Old value New value Message
2019-05-08 10:15:58 Dan Streetman bug added bug
2019-05-09 21:46:44 Dan Streetman launchpadlib: assignee Dan Streetman (ddstreet)
2019-05-09 21:46:47 Dan Streetman launchpadlib: status New In Progress
2019-05-10 15:31:38 Launchpad Janitor merge proposal linked https://code.launchpad.net/~ddstreet/ubuntu/+source/software-properties/+git/software-properties/+merge/367272
2019-05-10 16:10:57 Launchpad Janitor merge proposal linked https://code.launchpad.net/~ddstreet/software-properties/+git/software-properties/+merge/367276
2019-05-14 16:51:47 Dan Streetman description [impact] and application that uses launchpadlib to login to LP, and is run as root (with sudo), will cause launchpadlib to also be run as root. It will then create the $HOME/.launchpadlib directory and cache files with root ownership, but in the non-root user's $HOME directory, since sudo does not do a full login and change the env. The root-owned ~/.launchpadlib and/or root-owned files under that directory will then cause later failures with other applications that also use launchpadlib, but are not run as root, since launchpadlib will try to update the files, but can't since it is not root. [test case] ubuntu@test:~$ ls -lad .launchpadlib ls: cannot access '.launchpadlib': No such file or directory ubuntu@test:~$ sudo python3 Python 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from launchpadlib.launchpad import Launchpad >>> lp = Launchpad.login_with('sudo-test', service_root='production', version='devel') The authorization page: (https://launchpad.net/+authorize-token?oauth_token=mB9NB4ndzLVswfRHPjHZ&allow_permission=DESKTOP_INTEGRATION) should be opening in your browser. Use your browser to authorize this program to access Launchpad on your behalf. Waiting to hear from Launchpad about your decision... >>> ubuntu@test:~$ ls -lad .launchpadlib drwx------ 3 root root 4096 May 8 10:13 .launchpadlib [regression potential] TBD [other info] I am updating software-properties to use launchpadlib in bug 645404, and the primary use case there is the 'add-apt-repository' script which must be run as root. [impact] and application that uses launchpadlib to login to LP, and is run as root (with sudo), will cause launchpadlib to also be run as root. It will then create the $HOME/.launchpadlib directory and cache files with root ownership, but in the non-root user's $HOME directory, since sudo does not do a full login and change the env. The root-owned ~/.launchpadlib and/or root-owned files under that directory will then cause later failures with other applications that also use launchpadlib, but are not run as root, since launchpadlib will try to update the files, but can't since it is not root. [test case] ubuntu@test:~$ ls -lad .launchpadlib ls: cannot access '.launchpadlib': No such file or directory ubuntu@test:~$ sudo python3 Python 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from launchpadlib.launchpad import Launchpad >>> lp = Launchpad.login_with('sudo-test', service_root='production', version='devel') The authorization page:  (https://launchpad.net/+authorize-token?oauth_token=mB9NB4ndzLVswfRHPjHZ&allow_permission=DESKTOP_INTEGRATION) should be opening in your browser. Use your browser to authorize this program to access Launchpad on your behalf. Waiting to hear from Launchpad about your decision... >>> ubuntu@test:~$ ls -lad .launchpadlib drwx------ 3 root root 4096 May 8 10:13 .launchpadlib [regression potential] TBD [other info] I am updating software-properties to use launchpadlib in bug 645404, and the primary use case there is the 'add-apt-repository' script which must be run as root. NOTE: I think this would be better fixed by bug 1556302, so depending on that bug, this could be marked as a duplicate (if it's fixed). If that bug is not fixed, this very likely will need some workaround, if/when add-apt-repository is updated to use launchpadlib, since add-apt-repository is always run as root.
2019-05-16 00:42:54 Dan Streetman merge proposal unlinked https://code.launchpad.net/~ddstreet/software-properties/+git/software-properties/+merge/367276
2019-05-17 19:49:03 Launchpad Janitor merge proposal linked https://code.launchpad.net/~ddstreet/software-properties/+git/software-properties/+merge/367276
2019-06-11 09:10:16 Dan Streetman marked as duplicate 1556302
2019-06-11 09:25:36 Launchpad Janitor merge proposal unlinked https://code.launchpad.net/~ddstreet/software-properties/+git/software-properties/+merge/367276