From root@redion.nttlabs.com  Wed Oct 22 19:37:16 1997
Received: from redion.nttlabs.com (redion.nttlabs.com [204.162.36.80])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id TAA21846
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 22 Oct 1997 19:37:15 -0700 (PDT)
          (envelope-from root@redion.nttlabs.com)
Received: (from root@localhost)
	by redion.nttlabs.com (8.8.7/8.8.7) id TAA05480;
	Wed, 22 Oct 1997 19:28:58 -0700 (PDT)
	(envelope-from root)
Message-Id: <199710230228.TAA05480@redion.nttlabs.com>
Date: Wed, 22 Oct 1997 19:28:58 -0700 (PDT)
From: gene@nttlabs.com
Reply-To: gene@nttlabs.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: ypxfr makes false assumption about RPC callback
X-Send-Pr-Version: 3.2

>Number:         4828
>Category:       bin
>Synopsis:       ypxfr makes false assumption about RPC callback
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 22 19:40:01 PDT 1997
>Closed-Date:    Wed Jun 13 18:37:48 PDT 2001
>Last-Modified:  Wed Jun 13 18:38:54 PDT 2001
>Originator:     Gene Minsung Kim
>Release:        FreeBSD 3.0-971022-SNAP i386
>Organization:
NTT America, Inc.
>Environment:

	FreeBSD NIS slave server

>Description:

	If ypxfr is invoked with non-terminal standard input, it assumes that
	it is invoked via remote yppush.  This is generally not the case
	because yppush can also be invoked from cron or some other background
	process which has no terminal device associated with standard input.
	This false assumption causes ypxfr to attempt a boguc RPC callback
	connection and dump out an error through syslog.

>How-To-Repeat:

	Issue "ypxfr -h <master_server> passwd > /dev/null" and examine
	/var/log/messages.

>Fix:
	
	Apply the following patch to the ypxfr_main.c (revision 1.10)

*** ypxfr_main.c	Tue Sep 30 11:08:11 1997
--- ypxfr_main.c.new	Wed Oct 22 19:26:51 1997
***************
*** 184,194 ****
  
  	debug = 1;
  
- 	if (!isatty(fileno(stderr))) {
- 		openlog(progname, LOG_PID, LOG_DAEMON);
- 		_rpcpmstart = 1;
- 	}
- 
  	if (argc < 2)
  		usage();
  
--- 184,189 ----
***************
*** 253,258 ****
--- 248,254 ----
  			}
  			ypxfr_callback_addr.sin_port = htons((u_short)atoi(argv[my_optind]));
  			ypxfr_args += 5;
+ 			_rpcpmstart = 1;
  			break;
  		default:
  			usage();
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mikeh 
State-Changed-When: Wed Jun 13 18:37:48 PDT 2001 
State-Changed-Why:  
This was fixed with rev 1.13 of ypxfr_main.c. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=4828 
>Unformatted:
