Skip to content
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

Check for if if parameters don't match comment #26

Open
dburgener opened this issue Feb 5, 2020 · 3 comments
Open

Check for if if parameters don't match comment #26

dburgener opened this issue Feb 5, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@dburgener
Copy link
Member

No description provided.

@dburgener dburgener added the enhancement New feature or request label Feb 5, 2020
@cgzones
Copy link
Contributor

cgzones commented May 8, 2020

Parsing the interface/template header might also help inferring the kind of the parameter (type, type or type attribute (some interfaces support passing an attribute some don't), role, role or role attribute, textual prefix, ...) to improve the understanding of the policy.

Also inferring the number of parameters can help finding irregular calls (too few/many used) or unused parameters in the interface/template itself.

@dburgener
Copy link
Member Author

With the exception of "unused parameters in the interface/template itself", I think we could also infer all of those situations from the contents of the interface?

In general, the documentation comments seem to be in extremely poor shape, so I'd be inclined to treat a difference between the comment and the actual behavior of the interface as a bug in the comment rather than vice versa.

@cgzones
Copy link
Contributor

cgzones commented May 12, 2020

One major obstacle of inferring is the common usage of macros in interfaces, e.g. domtrans_pattern($1, foo_exec_t, foo_t) or read_file_pattern($1, foo_conf_t, foo_conf_t), where we currently cannot infer $1 to be type_or_attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants