diff --git a/SOURCES/rhbz1902696.patch b/SOURCES/rhbz1902696.patch index dfe2812..71d3c0f 100644 --- a/SOURCES/rhbz1902696.patch +++ b/SOURCES/rhbz1902696.patch @@ -182,3 +182,36 @@ Author: Frank Ch. Eigler Date: Sun Dec 13 21:19:15 2020 -0500 PR27067 <<< corrected bug# for previous commit +commit cd5b72a538a404011d27d86ff958355ac2c45b8d +Author: Frank Ch. Eigler +Date: Sun Jan 24 14:45:54 2021 -0500 + + PR27067: set procfs traceNN files' uid/gid too + + commit e3d03db828 neglected to include the proper calls to set the + procfs traceNN files to the correct uid/gid ownership. With those + files left as uid/gid=0/0, stapio running with a user with + stapusr/stapdev privileges couldn't fopenat() those files. Now they + can again. This problem became obvious after commit 4706ab3ca5c0, + which makes STAP_TRANS_PROCFS the default. + +diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c +index 97a6e123a..69591a235 100644 +--- a/runtime/transport/procfs.c ++++ b/runtime/transport/procfs.c +@@ -336,12 +336,14 @@ __stp_procfs_relay_create_buf_file_callback(const char *filename, + if (parent != _stp_procfs_module_dir_path.dentry) + goto out; + +- pde = proc_create (filename, 0600, ++ pde = proc_create (filename, 0400, + _stp_procfs_module_dir, + & relay_procfs_operations); + if (pde == NULL) + goto out; + ++ proc_set_user(pde, KUIDT_INIT(_stp_uid), KGIDT_INIT(_stp_gid)); ++ + rc = snprintf(fullpath, sizeof(fullpath), "/proc/systemtap/%s/%s", + THIS_MODULE->name, filename); + diff --git a/SPECS/systemtap.spec b/SPECS/systemtap.spec index f685cdd..637005f 100644 --- a/SPECS/systemtap.spec +++ b/SPECS/systemtap.spec @@ -89,7 +89,7 @@ Name: systemtap Version: 4.4 -Release: 7%{?release_override}%{?dist} +Release: 8%{?release_override}%{?dist} # for version, see also configure.ac @@ -1242,6 +1242,9 @@ done # PRERELEASE %changelog +* Tue Jan 26 2021 Frank Ch. Eigler - 4.4-8 +- rhbz1902696 fix invocation as stapusr with procfs/lockdown + * Wed Jan 20 2021 Martin Cermak - 4.4-7 - rhbz1650594 fix boot time probing feature