[PATCH] Implement a %credentials trace class

Andrey Zax andrey.zax at gmail.com
Tue Dec 17 18:33:22 UTC 2019


On Tue, 17 Dec 2019 19:31:46 +0200
Andrey Zax <andrey.zax at gmail.com> wrote:

> 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

Sorry about that. I didn't realize that gmail was broken like that.

This is want I meant to send.

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/'




More information about the Strace-devel mailing list