Bug 58510 - man -k doesn't work with special characters
man -k doesn't work with special characters
Product: Red Hat Linux
Classification: Retired
Component: man (Show other bugs)
i386 Linux
low Severity low
: ---
: ---
Assigned To: Eido Inoue
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2002-01-18 07:40 EST by Samuli Kärkkäinen
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-23 16:42:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Samuli Kärkkäinen 2002-01-18 07:40:21 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
Comment 1 Bernhard Rosenkraenzer 2002-01-18 13:52:16 EST
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.

Note You need to log in before you can comment on or make changes to this bug.