Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 1997 19:28:58 -0700 (PDT)
From:      gene@nttlabs.com
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/4828: ypxfr makes false assumption about RPC callback
Message-ID:  <199710230228.TAA05480@redion.nttlabs.com>
Resent-Message-ID: <199710230240.TAA21990@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         4828
>Category:       bin
>Synopsis:       ypxfr makes false assumption about RPC callback
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 22 19:40:01 PDT 1997
>Last-Modified:
>Originator:     Gene Minsung Kim
>Organization:
NTT America, Inc.
>Release:        FreeBSD 3.0-971022-SNAP i386
>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();
>Audit-Trail:
>Unformatted:



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