Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2001 22:51:09 -0800 (PST)
From:      Rich Morin <rdm@cfcl.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   docs/25405: misleading warning from catman(1), etc.
Message-ID:  <200102270651.WAA21848@cfcl.com>

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

>Number:         25405
>Category:       docs
>Synopsis:       misleading warning from catman(1), etc.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 26 23:00:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Rich Morin
>Release:        FreeBSD 4.2-RELEASE i386
>Organization:
Canta Forda Computer Laboratory
>Environment:

	FreeBSD fb42.cfcl.com 4.2-RELEASE FreeBSD 4.2-RELEASE #0:
	Mon Nov 20 13:02:55 GMT 2000
        jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC  i386

>Description:

	If catman(1) is run as root, the message:

	  Don't start this program as root, use:
	  echo /usr/bin/catman  | nice -5 su -m man

        appears.  There are really several problems here:

        1)  The program should check whether catman is actually
            being run by root before issuing the warning.

        2)  If an error has occurred, the program should exit,
            rather then going on to write root-owned files in
            /usr/share/man/cat* (or wherever...).

        3)  The program should be clever enough to _do_ the
            necessary work, rather than telling the user how to
            do it.  Basically, the programmer has gratuitously
            broken the method of operation for a command.

        4)  The programmer's instructions to the user make use
            of an undocumented feature of man(1).  What, exactly,
	    is going on when we pipe this text string into man?

        In passing, I will note that the warning messages emitted
        by this command string:

	  Unknown FreeBSD version ``),'' at line 320
	  Unknown BSD version ``'' at line 5
	  Unknown BSD version ``'' at line 5
	
	are essentially useless, as the user has no way of knowing
        which man page is being discussed.
	

>How-To-Repeat:

	% su
        # catman

>Fix:

	Recode catman, as described above.
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




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