NetBSD Problem Report #12758

Received: (qmail 17171 invoked from network); 26 Apr 2001 10:03:38 -0000
Message-Id: <20010426100408.C859D1110F@www.netbsd.org>
Date: Thu, 26 Apr 2001 03:04:08 -0700 (PDT)
From: sborrill@precedence.co.uk
Sender: nobody@netbsd.org
Reply-To: sborrill@precedence.co.uk
To: gnats-bugs@gnats.netbsd.org
Subject: rpc.pcnfsd and man page differ w.r.t. loading configuration file
X-Send-Pr-Version: www-1.0

>Number:         12758
>Category:       bin
>Synopsis:       rpc.pcnfsd and man page differ w.r.t. loading configuration file
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 26 10:04:01 +0000 2001
>Closed-Date:    Tue Sep 30 05:28:10 +0000 2008
>Last-Modified:  Tue Sep 30 05:28:10 +0000 2008
>Originator:     Stephen Borrill
>Release:        1.5 and -current
>Organization:
Precedence Technologies Ltd
>Environment:
All environments since 1.2 (at least)
>Description:
	man rpc.pcnfsd refers to the configuration file /etc/pcnfsd.conf.

	However, this functionality is commented out in the source code
	(see usr.sbin/rpc.pcnfsd/pcnfsd_misc.c (line 501). I suppose this
	is because the function must be called from main() which in our
	case is generated by rpcgen from pcnfsd.x. In other pcnfsd sources,
	the pcnfsd_svc.c (derived from pcnfsd.x) has the call to the function
	manually added and thus it isn't derived at build time from pcnfsd.x.

	I have been using the following distribution:
	ftp://bcm.tmc.edu/pcnfs/pcnfsd.93.02.16.tar.Z

	This has some extra functionality over the version currently in
	the NetBSD tree (which has remained static for a long time). Namely,
	the configuration file is read and access can be restricted ranges
	of userids (the NetBSD one will allow root access).

	Reading the configuration file is very useful. For example, the
	print spool path is currently hardwired at compile-time to
	/export/pcnfs which is non-existent. This can be overridden from
	the configuration file.

>How-To-Repeat:
	Create a file /etc/pcnfsd.conf with the following line as
	documented in the man page:

	spooldir /tmp

	Try to print over NFS, the configuration file will have
	been ignored and "Unable to allocate spooling directory"
	will be reported.

>Fix:
	Two possible solutions:

	1) Fix the man page to be consistent with the restricted
	functionality of the pcnfsd daemon in NetBSD (I can do this
	if required).

	2) Import a later version of pcnfsd such as that given
	above and don't generate files from pcnfsd.x. Instead use
	the pre-processed values.


>Release-Note:
>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/12758 CVS commit: src/usr.sbin/rpc.pcnfsd
Date: Tue, 30 Sep 2008 05:20:43 +0000 (UTC)

 Module Name:	src
 Committed By:	dholland
 Date:		Tue Sep 30 05:20:43 UTC 2008

 Modified Files:
 	src/usr.sbin/rpc.pcnfsd: Makefile pcnfsd_misc.c

 Log Message:
 Enable the code that reads /etc/pcnfsd.conf. It was disabled because
 rpcgen offers no mechanism to call it from the rpcgen-created main().
 So, use the preprocessor to rename that mymain() and provide another
 main() that loads the config file first.

 PR bin/12758.


 To generate a diff of this commit:
 cvs rdiff -r1.19 -r1.20 src/usr.sbin/rpc.pcnfsd/Makefile
 cvs rdiff -r1.10 -r1.11 src/usr.sbin/rpc.pcnfsd/pcnfsd_misc.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: Tue, 30 Sep 2008 05:28:10 +0000
State-Changed-Why:
Fixed. (Does anyone use this thing any more?)

If you or anyone else still wants a new version imported, please track down
where to find it nowadays (or the diff) and file a new PR.


>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.