Subject: bin/12758: rpc.pcnfsd and man page differ w.r.t. loading configuration file
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sborrill@precedence.co.uk>
List: netbsd-bugs
Date: 04/26/2001 03:04:08
>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: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Apr 26 03:04:01 PDT 2001
>Closed-Date:
>Last-Modified:
>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:
>Unformatted: