Converting the filetrans_pattern interface into a CIL macro

"Daniel Skip" <[email protected]>
Newsgroups gmane.linux.redhat.fedora.selinux
Message-ID <[email protected]>
Hello all. I have been playing with CIL on Selinux and have ran into a problem trying to convert the filetrans_pattern interface into a CIL macro.

The filetrans_pattern is as follows:

define(`filetrans_pattern',`
	allow $1 $2:dir rw_dir_perms;
	type_transition $1 $2:$4 $3 $5;
')




I converted that into a CIL macro like so:

(macro filetrans_pattern ((type ARG1)(type ARG2)(type ARG3)(class
    ARG4)(name ARG5))
    (allow ARG1 ARG2 (dirs (rw)))
    (typetransition ARG1 ARG2 ARG4 ARG3 ARG5))





So far so good. The issue is when I try to call the Macro it says I am missing an argument and the .cil policy won't build. Here is my call statement:

(call filetrans_pattern (example_t example_tmp_t dir))




I want it so that whenever I run my process type of example_t it will transition into the example_tmp_t and store any tmp files inside of my newly created example_tmp_t directory. I know I'm missing something but can't figure out what. Let me know what you think. Thanks!
_______________________________________________
selinux mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.