misc/167840: man(1) empty zcat argument when is used plain old manpath

Oleg Ginzburg olevole at olevole.ru
Sun May 13 14:30:05 UTC 2012


>Number:         167840
>Category:       misc
>Synopsis:       man(1) empty zcat argument when is used plain old manpath
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 13 14:30:04 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Oleg Ginzburg
>Release:        10-CURRENT
>Organization:
>Environment:
check on emptiness and support of catpages of a variable is necessary if it is
>Description:
if plain text man file are used, path to file stored in $catpage variables and $manpage remains empty. It breaks man_check_for_so from man(1) utility which tries to execute the "zcat -f" which will expect stdin. Check on emptiness and support for $catpage variable is necessary if this set.
>How-To-Repeat:
/usr/ports/archivers/rar ports, for example, used old style man:

% make -C /usr/ports/archivers/rar install
% rehash
% whereis rar
% man rar

it will hang to ctrl+d/ctrl+c 
>Fix:


Patch attached with submission follows:

--- usr.bin/man/man.sh-orig	2012-05-13 17:53:13.000000000 +0400
+++ usr.bin/man/man.sh	2012-05-13 17:53:49.000000000 +0400
@@ -255,6 +255,8 @@
 	local IFS line tstr
 
 	unset IFS
+        [ -z "${manpage}" -a -z "${catpage}" ] && return 0
+        [ -z "${manpage}" -a -n "${catpage}" ] && manpage=${catpage}
 
 	# We need to loop to accommodate multiple .so directives.
 	while true


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list