Bug 62195

Summary: userhelper "Password:" Infinite Loop in console
Product: [Retired] Red Hat Public Beta Reporter: Warren Togami <wtogami>
Component: pamAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: skipjack-beta1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-03-28 16:35:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 61590    

Description Warren Togami 2002-03-28 10:44:41 UTC
From Bugzilla Helper:  
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.0.0; Linux)  
  
Description of problem:  
In certain cases userhelper will go into an infinite loop.  
(without usermode-gtk package installed as was the default in Skipjack)  
  
Version-Release number of selected component (if applicable):  
  
  
How reproducible:  
Always  
  
Steps to Reproduce:  
1. Install "usermode" but not "usermode-gtk" package.  
2. As non-root user, run "usernet" in a console.  (I suspect any other program  
that users userhelper may also be effected.)  
3. Right click usernet and select "Configure Network..."  
4. Console will show "Password:" prompt.  Close the usernet program.  
5. Console will show bash prompt. Hit enter once and wait a second.  
6. Infinite Loop of "Password:" filling the screen, unkillable by CTRL-C.  
  
Expected Results: 
Shouldn't infinite loop.  
Perhaps after (for example) usernet closes, userhelper should also terminate.  
  
Additional info:  
When usermode-gtk package is installed, a GUI window always pop-ups up asking  
for password rather than within the console.  It doesn't terminate when the  
calling program is terminated.  Is this expected behavior too?

Comment 1 Nalin Dahyabhai 2002-03-28 17:12:51 UTC
This actually turns out to be a bug in libpam_misc, which will be fixed in
pam-0.75-31 and later.  Thanks!

Comment 2 Warren Togami 2002-04-08 09:25:58 UTC
Tested in Skipjack beta 2:   
   
userhelper no longer infinite loops, but it wont die when the calling program   
has been killed.  The parent process changes to 1 (init) instead, and it  
co-exists with the console prompt.  After a while it dies, but the console (at  
least in konsole) acts strangely. 
  
userhelper should be swiftly killed when the calling process has been killed  
rather than change its parent to init.  
  
Should I re-open this bug or post a new one?  
 
 
Also.... 
I've seen this strange behavior in the bash console that is the result of this 
userhelper terminating in other cases before and I suspect that THAT may be 
another seperate bug.  I know two cases that triggers it, but I don't know how 
to describe it.

Comment 3 Nalin Dahyabhai 2002-04-08 21:20:54 UTC
Hmm.  The userhelper process is setuid, so the caller can't kill it, and because
it's blocked reading from stdin, it can't notice that its parent's gone.  Not
sure how to fix this aside from making sure it doesn't happen.