Vasanth Bhat
2011-02-16 14:17:49 UTC
Hi,
Is there way to regex based comparision in Predicates.
For example, if I want to look for only those processes which
open the file "myapp*.conf.*", how would this be done in predicate?
syscall::open:entry
/(arg0 != NULL)&& (copyinstr(arg0) == "myapp*.conf.*"/
{
printf("File %s, opened by process %s[%d]\n",copyinstr(arg0), execname, pid);
}
I guess the above code will not work? What is the correct way to do this.
I would like to avoid using system() to run another shell script or d-script.
Thanks
Vasanth
Is there way to regex based comparision in Predicates.
For example, if I want to look for only those processes which
open the file "myapp*.conf.*", how would this be done in predicate?
syscall::open:entry
/(arg0 != NULL)&& (copyinstr(arg0) == "myapp*.conf.*"/
{
printf("File %s, opened by process %s[%d]\n",copyinstr(arg0), execname, pid);
}
I guess the above code will not work? What is the correct way to do this.
I would like to avoid using system() to run another shell script or d-script.
Thanks
Vasanth