-
Notifications
You must be signed in to change notification settings - Fork 733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fillers for chmod syscalls #1472
Conversation
a448008
to
3c36cd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo some nits (and I'm not sure we need to bump the scap file version for this change).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests would be my only nag - but unsure how we handle tests yet - still learning the code base
Corrected the requirements: We don't want mode to be reported in hex like |
Expected json output: {
"evt.cpu": 1,
"evt.dir": ">",
"evt.info": "",
"evt.num": 72162,
"evt.outputtime": 1565606887658010000,
"evt.type": "chmod",
"proc.name": "a.out",
"thread.tid": 17912
}
{
"evt.cpu": 1,
"evt.dir": "<",
"evt.info": "res=0 filename=/tmp/ciao mode=04000(S_ISUID) ",
"evt.num": 72163,
"evt.outputtime": 1565606887658017500,
"evt.type": "chmod",
"proc.name": "a.out",
"thread.tid": 17912
} |
For the format change, I'd do this in a separate PR, adding PF_MODE (PF_FILEMODE? let's bikeshed) and possibly updating other users of PF_OCT to use it (off the top of my head, |
14d1ac5
to
96de564
Compare
Signed-off-by: Lorenzo Fontana <[email protected]>
Signed-off-by: Lorenzo Fontana <[email protected]>
Signed-off-by: Lorenzo Fontana <[email protected]>
Signed-off-by: Lorenzo Fontana <[email protected]>
Signed-off-by: Lorenzo Fontana <[email protected]>
Signed-off-by: Lorenzo Fontana <[email protected]>
Signed-off-by: Lorenzo Fontana <[email protected]>
Signed-off-by: Lorenzo Fontana <[email protected]>
PT_MODES is a type of option The way the additional information are handled is not based on the format but on the option type, as it is for PT_FLAGS32 and others, so I just added a PT_MODES for the file modes. I agree that we can use it in other places where mode is used but let's leave that for another PR. At the same moment I don't want to add PT_MODES in another PR because I need it to finish this one and it wouldn't make sense to me to close this one without PT_MODES because it's the center of it. |
96de564
to
72586a9
Compare
72586a9
to
ffb8e74
Compare
Signed-off-by: Lorenzo Fontana <[email protected]>
ffb8e74
to
aea95f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully you knew about https://github.com/draios/sysdig/wiki/Adding-an-event-to-sysdig. But never worry, it looks you followed all the right steps!
Couple of small-ish comments about the event flag and management of the string representation of the event.
Signed-off-by: Lorenzo Fontana <[email protected]>
56fda9c
to
4a14a35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more iteration on the resizing and then I think it's ready!
…lue instead of doubling it Signed-off-by: Lorenzo Fontana <[email protected]>
4a14a35
to
445bcbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
I'm doing the fillers for chmod syscalls
Todo checks before merge:
To be able to turn this:
To this:
To this:
Signed-off-by: Lorenzo Fontana [email protected]