selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Help] how to compile te with checkpolicy.
@ 2025-08-18  8:01 BOBx
  2025-08-18  9:53 ` Dominick Grift
  0 siblings, 1 reply; 6+ messages in thread
From: BOBx @ 2025-08-18  8:01 UTC (permalink / raw)
  To: selinux

Hi all,

These days I tried to compile te with tools named checkpolicy. I have 
searched the process with google and chatgpt, and I followed the steps 
they told me but I failed.

The following is my te file,  cmd and response and other infomation.

My te file(my_policy.te):
----------------------------------------------
policy_module(my_mypolicy, 1.0)

# Define types
type my_type_t;
type my_type_exec_t, file_type;

# Allow rules
allow my_type_t my_type_exec_t:file execute;
----------------------------------------------

The command:
----------------------------------------------
sudo checkpolicy -M -o my_policy.pp my_policy.te
----------------------------------------------

The response  from command:
----------------------------------------------
my_policy.te:1:ERROR 'syntax error' at token 'policy_module' on line 1:


checkpolicy:  error(s) encountered while parsing configuration
----------------------------------------------

OS information: 6.11.0-29-generic, ubuntu 24.10.

Would you like help me to compile te with checkpolicy please? Or which 
URL should I read please?

Best regards

BOBx



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-08-18 12:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18  8:01 [Help] how to compile te with checkpolicy BOBx
2025-08-18  9:53 ` Dominick Grift
2025-08-18  9:57   ` Dominick Grift
2025-08-18 10:20     ` Fei Shao
2025-08-18 10:43       ` Dominick Grift
2025-08-18 12:44         ` BOB x

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).