Red Hat Bugzilla – Bug 58510
man -k doesn't work with special characters
Last modified: 2005-10-31 17:00:50 EST
Description of Problem:
Issuing a command 'man -k "foo bar"' results in output like following:
sh: unsafe: command not found
Error executing formatting or display command.
System command unsafe exited with status 32512.
Command 'man -k "foo&"' gives differently incorrect behaviour.
Version-Release number of selected component (if applicable): man-1.5i2-6
How Reproducible: always
This is a security feature. Characters that may be unsafe to pass on to other
applications (e.g. the groff formatter) are removed by man.
The error message should be different, though.
What's happening is the following:
- man tries to determine the correct command to call groff to format the man
- the sprintf wrapper detects an "unsafe" parameter is passed, and returns
"unsafe" instead of the groff command
- There's no check for "unsafe" after generating the command, therefore man
tries to execute "unsafe" rather than printing an error message, failing
with the cryptic message you've noticed.