🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #817

Re: core dump after interrupted username completion

#817
From: News system owner ID
Date: Thu, 07 Dec 1989 22:10
40 lines
1978 bytes
In article <913@cwjcc.CWRU.Edu> chet@cwns1.INS.CWRU.Edu (Chet Ramey) writes:
< In article <8911251056.AA19997@slembe.uio.no> hhe@IFI.UIO.NO writes:
< >	First, I type part of an username and press TAB for completion.
< >	The completion takes a while (our system has >2000 users), so
< >	I press ^C and interrupt the completion.
< >
< >	Then, I write the username in full with a trailing slash and press
< >	M-? (filename completion) to see the user's files. Core dump....
< 
< As reported by Paul Placeway here some time ago, this is a bug in YP,
< not bash.  The Sun getpw* routines close and re-open a socket to the YP
< server when they think they need to, which is not always correct.  Based
< on this assumption, they inappropriately free resources, which is why bash
< dumps core.

Correct.  Here is the latest version of how tcsh side-steps the issue
(calls to fix_yp_bugs() should be placed at the end of each group of
getpw* calls):

   #ifdef YPBUGS

   fix_yp_bugs()
   {
       char *mydomain;

       /*
	* PWP: The previous version assumed that yp domain was the same as the
	* internet name domain.  This isn't allways true.
	* (Thanks to Mat Landau <mlandau@bbn.com> for the original version
	* of this.)
	*/
       if (yp_get_default_domain(&mydomain) == 0) { /* if we got a name */
	   yp_unbind(mydomain);
       }	
   }

   #endif /* YPBUGS */

		-- Paul Placeway
		   (new address: <pplaceway@bbn.com>)
Technical Details
Message-ID: <49391@bbn.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!rochester!bbn!news
References: <8911251056.AA19997@slembe.uio.no> <913@cwjcc.CWRU.Edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!rochester!bbn!news
From: news@bbn.COM (News system owner ID)
Newsgroups: gnu.bash.bug
Subject: Re: core dump after interrupted username completion
Message-ID: <49391@bbn.COM>
Date: 7 Dec 89 22:10:07 GMT
References: <8911251056.AA19997@slembe.uio.no> <913@cwjcc.CWRU.Edu>
Reply-To: pplacewa@antares.bbn.com (Paul W Placeway)
Distribution: gnu
Organization: Bolt Beranek and Newman Inc., Cambridge MA
Lines: 40