[PATCH] Implement a %credentials trace class

Andrey Zax andrey.zax at gmail.com
Tue Dec 17 17:31:46 UTC 2019


On Tue, Dec 17, 2019 at 1:03 AM Dmitry V. Levin <ldv at altlinux.org> wrote:
> Could you think of a regular expression that matches exactly this set of
> system calls?  This would allow to automatically update all syscallent
> files using a single sed expression.

something like this should do it

sed -r '/"((set|get)[^p]*(uid|gid|groups)).*"|"cap(get|set)"|"prctl"/s/(\[
*[[:digit:]]+\] = \{ [[:digit:]],\t)([A-Z|]+)/\1CD|\2/'
sed -r '/"((set|get)[^p]*(uid|gid|groups)).*"|"cap(get|set)"|"prctl"/s/(\[
*[[:digit:]]+\] = \{ [[:digit:]],\t)0/\1CD/'

I'm afraid my sed skills aren't good enough to make this a one liner


More information about the Strace-devel mailing list