> Something like 'apropos /bin/bash' doesn't do anything useful anyway.

Right, but 'cd /bin; apropos *' does - and still has exactly the same
problem as I originally reported. As to 'whatis', I had tested it before
writing up this bug; it produces a totally different set of results,
including throwing a dozen 'nothing appropriate' warnings when run in a
similar manner (which also seems wrong, to me: e.g., 'apropos
nc.openbsd' has no problem telling me what it is, but 'whatis' does):

ben@feynman:/bin$ apropos * > /tmp/apr.out
ben@feynman:/bin$ whatis * > /tmp/what.out
nc.openbsd: nothing appropriate.
ntfsck: nothing appropriate.
ntfsdecrypt: nothing appropriate.
ntfsdump_logfile: nothing appropriate.
ntfsmftalloc: nothing appropriate.
ntfsmove: nothing appropriate.
ntfstruncate: nothing appropriate.
ntfswipe: nothing appropriate.
plymouth: nothing appropriate.
plymouth-upstart-bridge: nothing appropriate.
static-sh: nothing appropriate.
ulockmgr_server: nothing appropriate.
ben@feynman:/bin$ wc -l /tmp/{apr,what}.out
  6214 /tmp/apr.out
   161 /tmp/what.out
  6375 total

One possible (brute-force) answer to all of this might be to have
'apropos' only accept a single argument. It wouldn't stop anyone from
trying the above with, say, a 'for' loop, but at least they'd be aware
that they're running a largish number of processes. Also, given that
'whatis' isn't SUID, having both it and apropos resolve paths shouldn't
affect security.

Thank you for both your advice and your time and effort in resolving
this.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/927028

Title:
  'apropos' maxes out CPU when run with '/bin/*' as argument

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/man-db/+bug/927028/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to