RFC: path display and path filtering features.

Grant Edwards grant.b.edwards at gmail.com
Thu Feb 24 22:50:48 UTC 2011

On 2011-02-24, Dmitry V. Levin <ldv at altlinux.org> wrote:

>>> I'm still not quite comfortable with applying realpath(3) to user
>>> data, from security PoV.  Maybe this kind of canonicalization should
>>> be enabled only when requested explicitly, e.g. via special option.
>> That wouldn't be difficult.  Is it something we want to do now?
> Let's cleanup and merge already written code first.


>>>> --- a/desc.c
>>>> +++ b/desc.c
>>>> @@ -309,7 +309,8 @@ int
>>>>  sys_fcntl(struct tcb *tcp)
>>>>  {
>>>>  	if (entering(tcp)) {
>>>> -		tprintf("%ld, ", tcp->u_arg[0]);
>>>> +		printfd(tcp,tcp->u_arg[0]);
>>>> +		tprintf(", ");
>>>>  		printxval(fcntlcmds, tcp->u_arg[1], "F_???");
>>>>  		switch (tcp->u_arg[1]) {
>>>>  		case F_SETFD:
>>> In this and other similar cases, a comma between function arguments
>>> is necessary.
>> While I understand that sentence, I don't undestand how it is meant as
>> a comment on the diff above it.  Can you explain?
> -		printfd(tcp,tcp->u_arg[0]);
> +		printfd(tcp, tcp->u_arg[0]);

Ah!  You want a _space_after_ the comma between args.

I'll fix those.

>>>> diff --git a/pathtrace.c b/pathtrace.c
>>>> new file mode 100644
>>>> index 0000000..70babff
>>>> --- /dev/null
>>>> +++ b/pathtrace.c
>>>> @@ -0,0 +1,304 @@
>>> I suggest to apply code indentation of quota.c for new files.
>>> This file is indented very different from quota.c
>> I planned on re-indenting it after I was done working on it.  Since I
>> haven't found any tools/settings that produce the indentation you
>> desire, it's pretty difficult for me to maintain your desired
>> indentation while working on files.  After we've decided on the
>> actual code I'll fix the indentation.  Is there a set of options for
>> ident or astyle or some other tool that will produce the indentation
>> you want?
> For new files, I use GNU indent with attached config, the result it
> produces is very close to my preferred coding style.

Excellent, thanks.

>> I don't know about others, but it I would find it a lot easier to
>> work on the source files if they all had a consistent, standard
>> indentation style that could be produced by a tool like indent or
>> astyle (I don't particulary care what standard or what tool).
> Yes, adding new code would be easier.  Fortunately, git blame has -w
> option, so one can hope that history tracking won't suffer very much
> from total code re-indentation.

It can be a little painful when you decide to make the jump and
re-indent a whole project.

Grant Edwards               grant.b.edwards        Yow! I guess it was all a
                                  at               DREAM ... or an episode of
                              gmail.com            HAWAII FIVE-O ...

More information about the Strace-devel mailing list