Bug 43678

Summary: [PATCH] Updates for the pciconf(8) manual page
Product: Documentation Reporter: Hiten Pandya <hiten>
Component: Books & ArticlesAssignee: Tom Rhodes <trhodes>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
pciconf.8.patch none

Description Hiten Pandya 2002-10-05 02:00:11 UTC
	
	The pciconf(8) manual page, presents the '-l' option as usable a
	non-root user; which, is not true.  I have tried this on a two
	FreeBSD systems, one with FreeBSD 5.0-CURRENT (20020818-JPSNAP), 
	and a FreeBSD 4.6-STABLE system.

	In the patch provided, it corrects the mistake.  Secondly, the
	man page describes, under the BUGS section about, providing
	non-root access to the '-a' and '-r' options.  I do not think
	this is possible, because of the kldload command, and other
	reason(s) outlined in the paragraph.

	The patch removes the statements described above.  I have made
	two versions of the patch.  The first one:

	http://www.unixdaemons.com/~hiten/work/diffs/pciconf.8.first

	^^^ Removes the (false) information regarding the '-l' command
	line parameter to pciconf(8).  NOTE, it does not contain a fix
	to the _second_ problem I outlined.  If there is interest in
	the second problem, then, please fetch the patch provided from
	the location below, (NOTE: it fixes both the problems):

	http://www.unixdaemons.com/~hiten/work/diffs/pciconf.8.second

	Thanking in Advance.
	
	  -- Hiten Pandya
	  -- hiten@uk.FreeBSD.org, hiten@softweyr.com

Fix: Apply the patch provided, to fix both of the problems that
	are described above (patch same as second URL). 
	
	NOTE, this patch _SHOULD_ be MFC'ed, because it applies to 
	-current, and -stable.
How-To-Repeat: 
	Execute the pciconf(8) utility as non-root, and it will
	result in: "pciconf: /dev/pci: Permission denied".  This
	error can be noticed, both, on -current, and -stable.
Comment 1 Tom Rhodes freebsd_committer freebsd_triage 2002-11-15 04:36:41 UTC
Hiten,

This isn't bad, but we have a slight problem :(

This really isn't the a problem with pciconf(8) and non-root users,
its actually the fact that non-root users do not (and should not)
have write access to /dev/pci.  Something like (without mdoc(7)):

pciconf(8) is limited to users with write access to /dev/pci, usually
root.

We get that taken care of, I see no reason why NOT to commit this
patch and close this PR.  What do you think?

--
Tom Rhodes
Comment 2 Hiten Pandya 2002-11-24 01:48:55 UTC
On Thu, Nov 14, 2002 at 11:36:41PM -0500, Tom Rhodes wrote the words in effect of:
> Hiten,
> 
> This isn't bad, but we have a slight problem :(
> 
> This really isn't the a problem with pciconf(8) and non-root users,
> its actually the fact that non-root users do not (and should not)
> have write access to /dev/pci.  Something like (without mdoc(7)):
> 
> pciconf(8) is limited to users with write access to /dev/pci, usually
> root.
> 
> We get that taken care of, I see no reason why NOT to commit this
> patch and close this PR.  What do you think?
> 

Tom,

Thanks for your feedback, I apologize for taking such a long time in
replying.  Anyway, I am attaching a patch, to resolve this issue, and
while I was at that, I added some more things.

Please review it, and let me know.
Cheers.

-- 
Hiten (hiten@unixdaemons.com, hiten@uk.FreeBSD.org)
http://www.unixdaemons.com/~hiten/
Comment 3 Tom Rhodes freebsd_committer freebsd_triage 2002-12-10 20:02:54 UTC
Responsible Changed
From-To: freebsd-doc->trhodes

This should have been assigned to me, so do it now.
Comment 4 Tom Rhodes freebsd_committer freebsd_triage 2002-12-14 18:30:16 UTC
State Changed
From-To: open->patched

Patched in HEAD.  Will MFC soon.
Comment 5 Tom Rhodes freebsd_committer freebsd_triage 2002-12-16 16:59:25 UTC
State Changed
From-To: patched->closed

MFC Completed this morning.  Thanks!