-
Notifications
You must be signed in to change notification settings - Fork 190
BUG: python comment incorrectly lists the MASKED_EQ mask as "datum_b" #119
Copy link
Copy link
Closed
Labels
Milestone
Description
From here:
libseccomp/src/python/seccomp.pyx
Line 49 in 8ad3638
| MASKED_EQ - (arg & datum_b) == datum_a |
My line of thought is the following, from the manual:
libseccomp/doc/man/man3/seccomp_rule_add.3
Lines 208 to 214 in 8ad3638
| SCMP_CMP( | |
| .I arg | |
| , SCMP_CMP_MASKED_EQ , | |
| .I mask | |
| , | |
| .I datum | |
| ) |
And the arguments from SCMP_CMP fill up this struct:
libseccomp/include/seccomp.h.in
Lines 94 to 99 in 8ad3638
| struct scmp_arg_cmp { | |
| unsigned int arg; /**< argument number, starting at 0 */ | |
| enum scmp_compare op; /**< the comparison op, e.g. SCMP_CMP_* */ | |
| scmp_datum_t datum_a; | |
| scmp_datum_t datum_b; | |
| }; |
In addition:
Lines 1867 to 1869 in 8ad3638
| case SCMP_CMP_MASKED_EQ: | |
| chain[arg_num].mask = arg_data.datum_a; | |
| chain[arg_num].datum = arg_data.datum_b; |
So mask == datum_a, no? So is the Python comment invalid or am I missing something?
Reactions are currently unavailable