Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Feb 1996 15:52:57 -0500 (EST)
From:      wpaul@ctr.columbia.edu (Bill Paul)
To:        adam@veda.is (Adam David)
Cc:        current@freebsd.org
Subject:   Re: ypserv: ypproc_master
Message-ID:  <199602292052.PAA08014@startide.ctr.columbia.edu>
In-Reply-To: <199602291945.TAA11702@veda.is> from "Adam David" at Feb 29, 96 07:45:40 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Adam David had
to walk into mine and say:
 
> Currently, ypserv dumps core while replying to a ypproc_master request if
> access is being denied to the remote host. This results from xdr_string()
> not being designed to handle NULL strings. There seem to be vestiges of an
> attempt to represent a NULL string by a size of -1, but this could be my
> imagination. Looks like ypserv and rpc.yppasswdd need to adjusted to the
> limitations of xdr.

Hmm. Odd: I can't seem to trip the bug on my development box. Even so,
you're probably right about the NULL (or in this case, uninitialized)
string.

If you would be so kind as to try the following patch on yp_server.c and
let me know if it cures the SEGV, I would be very greatful:

*** 1.3	1996/02/26 02:23:39
--- yp_server.c	1996/02/29 19:57:12
***************
*** 532,537 ****
--- 532,539 ----
  	static ypresp_master  result;
  	DBT key,data;
  
+ 	result.peer = "";
+ 
  	if (yp_access(NULL, (struct svc_req *)rqstp)) {
  		result.stat = YP_YPERR;
  		return(&result);


Initializing the 'peer' member of the result to an empty string should
be enough to pacify the XDR filters.

As for rpc.yppasswdd, I'm not sure the problem is the same: the
yppasswdproc_update procedure is supposed to return only a single
integer as a response code, and this integer is initialized right
at the start of the handler routine (it's set to return failure
by default -- if the routine completes without errors, it's changed
to success before returning).

Thanks for testing the new ypserv, by the way. :)

-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
License error: The license for this .sig file has expired. You must obtain
a new license key before any more witty phrases will appear in this space.
=============================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602292052.PAA08014>