This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH 1/2] Match non-executable shared libraries in glob patterns
- From: David Smith <dsmith at redhat dot com>
- To: Timo Juhani Lindfors <timo dot lindfors at iki dot fi>
- Cc: systemtap at sourceware dot org
- Date: Mon, 30 Oct 2017 15:39:48 -0500
- Subject: Re: [PATCH 1/2] Match non-executable shared libraries in glob patterns
- Authentication-results: sourceware.org; auth=none
- References: <20171030160906.1846-1-timo.lindfors@iki.fi>
Checked in as commit c539cb3d7.
Thanks!
On Mon, Oct 30, 2017 at 11:09 AM, Timo Juhani Lindfors
<timo.lindfors@iki.fi> wrote:
> Shared libraries in Debian do not have executable permissions. This
> patch makes glob patterns work for those. Debian policy 8.1:
>
> "Shared libraries should not be installed executable, since the dynamic
> linker does not require this and trying to execute a shared library
> usually results in a core dump."
> ---
> tapsets.cxx | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tapsets.cxx b/tapsets.cxx
> index 36eb73c08..f571b8825 100644
> --- a/tapsets.cxx
> +++ b/tapsets.cxx
> @@ -8054,8 +8054,7 @@ glob_executable(const string& pattern)
> const char* globbed = the_blob.gl_pathv[i];
> struct stat st;
>
> - if (access (globbed, X_OK) == 0
> - && stat (globbed, &st) == 0
> + if (stat (globbed, &st) == 0
> && S_ISREG (st.st_mode)) // see find_executable()
> {
> // Need to call resolve_path here, in order to path-expand
> --
> 2.11.0
>
--
David Smith
Principal Software Engineer
Red Hat