Bug 58510 - man -k doesn't work with special characters
man -k doesn't work with special characters
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: man (Show other bugs)
7.2
i386 Linux
low Severity low
: ---
: ---
Assigned To: Eido Inoue
Ben Levenson
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2004-08-23 16:42:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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
  page.
- 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.