Be more restrictive when finding file names for libraries that need patching. This avoids false positives if the directory name matches one of the well-known library names (e.g. ld).
Be more restrictive when finding file names for libraries that need patching.
This avoids false positives if the directory name matches one of the well-known
library names (e.g. ld).

False positives not only result in a performance hit at startup, because we
are now trying to instrument libraries that don't actually contain any system
calls; but even worse than this, we could try to instrument system calls in
the sandboxing code itself. And those system calls are deliberately coded so
that they will not get rewritten.

Fortunately, none of this is a security problem. If we accidentally rewrite
system calls that weren't supposed to be rewritten, we will just crash on
startup.

TEST=the sandbox now works on the buildbots
BUG=36133
Review URL: http://codereview.chromium.org/652188

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@39839 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser