command not found handler logs user out in some cases

Bug #1082376 reported by StephanBeal
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
command-not-found (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hiho,

Ubuntu 12.04, up to date as of mid-day on Nov 23rd 2012...

Summary: when running an unknown command in the background while one is "su'd" to another user, the current user is logged out. This is best shown with an example:

[stephan@host:~]$ sudo su -
[sudo] password for stephan:
root@host:~ # cd /etc/openvpn/clients/xyz/
root@host:/etc/openvpn/clients/xyz # emasc sbeal.conf & # NOTE THE MIS-TYPED emasc AND THE &
[1] 24330
root@host:/etc/openvpn/clients/xyz # logout
# ^^^^ THIS LOGOUT IS EXECUTED BY THE COMMAND-NOT-FOUND HANDLER.
[stephan@host:~]$ No command 'emasc' found, did you mean:
 Command 'emacs' from package 'emacs23-lucid' (universe)
 Command 'emacs' from package 'e3' (universe)
 Command 'emacs' from package 'emacs23-nox' (main)
 Command 'emacs' from package 'jove' (universe)
 Command 'emacs' from package 'emacs23' (main)
emasc: command not found
[stephan@host:~]$

Curiously, this does NOT happen if the command is run in the foreground:

[stephan@host:~]$ sudo su -
[sudo] password for stephan:
root@host:~ # cd /etc/openvpn/clients/xyz/
root@host:/etc/openvpn/clients/xyz # emasc sbeal.conf
No command 'emasc' found, did you mean:
 Command 'emacs' from package 'emacs23-lucid' (universe)
 Command 'emacs' from package 'e3' (universe)
 Command 'emacs' from package 'emacs23-nox' (main)
 Command 'emacs' from package 'jove' (universe)
 Command 'emacs' from package 'emacs23' (main)
emasc: command not found
root@host:/etc/openvpn/clients/xyz #

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1082376/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Logan Rosen (logan)
affects: ubuntu → command-not-found (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.