NetBSD Problem Report #44077

From root@nagler-company.com  Wed Nov 10 08:52:40 2010
Return-Path: <root@nagler-company.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 80D3E63BA61
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 10 Nov 2010 08:52:40 +0000 (UTC)
Message-Id: <20101110085231.3743BAB811@s011.nagler-company.com>
Date: Wed, 10 Nov 2010 09:52:31 +0100 (CET)
From: Wolfgang.Stukenbrock@nagler-company.com
Reply-To: Wolfgang.Stukenbrock@nagler-company.com
To: gnats-bugs@gnats.NetBSD.org
Subject: redundant xdr_passwd implementation should be removed from source tree
X-Send-Pr-Version: 3.95

>Number:         44077
>Category:       bin
>Synopsis:       redundant xdr_passwd implementation should be removed from source tree
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 10 08:55:00 +0000 2010
>Closed-Date:    Wed Nov 10 19:41:32 +0000 2010
>Last-Modified:  Wed Nov 10 19:45:01 +0000 2010
>Originator:     Dr. Wolfgang Stukenbrock
>Release:        NetBSD 5.0.2
>Organization:
Dr. Nagler & Company GmbH

>Environment:


System: NetBSD test-s1 5.0.2 NetBSD 5.0.2 (NSW-S011) #11: Mon Nov 8 16:38:16 CET 2010 wgstuken@s012:/export/NetBSD-5.0.2/N+C-build/.OBJDIR_amd64/export/NetBSD-5.0.2/src/sys/arch/amd64/compile/NSW-S011 amd64
Architecture: x86_64
Machine: amd64
>Description:
	There two source implementations for the same routines in /usr/src/lib/librcpsvc and /usr/src/usr.sbin/rpc.yppasswdd.
	In order to avoid code replication, the version in /usr/src/usr.sbin/rpc.yppasswdd should be eliminated and
	the version from /usr/src/lib/librcpsvc should be used for the yppasswdd too.
	At the moment, yppasswdd has no dynamic reference to /usr/lib/librpcsvc.so, but it uses two other shared libs.
	So there are two way to pull in the required routines:
	 - staticaly link in /usr/lib/librpcsvc.a so only this source file gets retrieved from it
	 - reference a third shared lib /usr/lib/librpcsvc.so.???
	From my point of view it makes no real difference, because yppasswdd already uses shared libs.
	The maintainer should select one of the two methods.

>How-To-Repeat:
	not relevant
>Fix:
	remove /usr/src/usr.sbin/rpc.yppasswdd/yppasswdd_xdr.c and link (either static or dynamic) librpcsvc instead.
	For dynamic linking add
DPADD+= ${LIBRPCSVC}
LDADD+= -lrpcsvc
	to the makefile (as done in /usr/src/usr.bin/passwd/Makefile) and remove yppasswdd_xdr.c from SRCS.
	I do not know the correct way for linking librpcsvc statically, so no fix description here - sorry.

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44077 CVS commit: src/usr.sbin/rpc.yppasswdd
Date: Wed, 10 Nov 2010 13:56:20 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Wed Nov 10 18:56:19 UTC 2010

 Modified Files:
 	src/usr.sbin/rpc.yppasswdd: Makefile
 Removed Files:
 	src/usr.sbin/rpc.yppasswdd: yppasswdd_xdr.c

 Log Message:
 PR/44077: Dr. Wolfgang Stukenbrock: redundant xdr_passwd implementation should
 be removed, and the one from -lrpcsvc should be used.


 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/rpc.yppasswdd/Makefile
 cvs rdiff -u -r1.3 -r0 src/usr.sbin/rpc.yppasswdd/yppasswdd_xdr.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 10 Nov 2010 19:41:32 +0000
State-Changed-Why:
christos fixed it, just as I was about to commit the fix myself :-)


From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
	dholland@NetBSD.org, Wolfgang.Stukenbrock@nagler-company.com
Cc: 
Subject: Re: bin/44077 (redundant xdr_passwd implementation should be removed from source tree)
Date: Wed, 10 Nov 2010 14:43:25 -0500

 On Nov 10,  7:41pm, dholland@NetBSD.org (dholland@NetBSD.org) wrote:
 -- Subject: Re: bin/44077 (redundant xdr_passwd implementation should be remo

 | Synopsis: redundant xdr_passwd implementation should be removed from source tree
 | 
 | State-Changed-From-To: open->closed
 | State-Changed-By: dholland@NetBSD.org
 | State-Changed-When: Wed, 10 Nov 2010 19:41:32 +0000
 | State-Changed-Why:
 | christos fixed it, just as I was about to commit the fix myself :-)

 I know how to steal the easy ones :-)

 christos

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.