Skip to contentSkip to conversation

Move can_exec to a file that I can parse

PATCH New James Carter 2 participants 4 messages Aug 24, 2010 – Aug 25, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 2/6 Move can_exec to a file that I can parse

It is not possible for mere mortals to parse misc_macros.spt, so I move can_exec to a different file.

---
 policy/support/misc_macros.spt   |    6 ------
 policy/support/misc_patterns.spt |    6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)
policy/support/misc_macros.spt +0 -6
index 4ca5688..7068f24 100644
@@ -65,12 +65,6 @@ define(`gen_context',`$1`'ifdef(`enable_mls',`:$2')`'ifdef(`enable_mcs',`:s0`'if
 
 ########################################
 #
-# can_exec(domain,executable)
-#
-define(`can_exec',`allow $1 $2:file { mmap_file_perms ioctl lock execute_no_trans };')
-
-########################################
-#
 # gen_bool(name,default_value)
 #
 define(`gen_bool',`
policy/support/misc_patterns.spt +6 -0
index 22ca011..7e55f43 100644
@@ -62,3 +62,9 @@ define(`ps_process_pattern',`
        allow $1 $2:lnk_file read_lnk_file_perms;
        allow $1 $2:process getattr;
 ')
+
+########################################
+#
+# can_exec(domain,executable)
+#
+define(`can_exec',`allow $1 $2:file { mmap_file_perms ioctl lock execute_no_trans };')
Signature · 2 lines
James Carter <[email protected]>
National Security Agency
#1 lore raw

PATCH 2/6 Move can_exec to a file that I can parse

Quoted 2 lines · James Carter

It is not possible for mere mortals to parse misc_macros.spt, so I move can_exec to a different file.

I don't agree with the move; is your parser ignoring misc_macros.spt?

Quoted 37 lines
---
  policy/support/misc_macros.spt   |    6 ------
  policy/support/misc_patterns.spt |    6 ++++++
  2 files changed, 6 insertions(+), 6 deletions(-)
policy/support/misc_macros.spt +0 -6
index 4ca5688..7068f24 100644
@@ -65,12 +65,6 @@ define(`gen_context',`$1`'ifdef(`enable_mls',`:$2')`'ifdef(`enable_mcs',`:s0`'if
 
  ########################################
  #
-# can_exec(domain,executable)
-#
-define(`can_exec',`allow $1 $2:file { mmap_file_perms ioctl lock execute_no_trans };')
-
-########################################
-#
  # gen_bool(name,default_value)
  #
  define(`gen_bool',`
policy/support/misc_patterns.spt +6 -0
index 22ca011..7e55f43 100644
@@ -62,3 +62,9 @@ define(`ps_process_pattern',`
         allow $1 $2:lnk_file read_lnk_file_perms;
         allow $1 $2:process getattr;
  ')
+
+########################################
+#
+# can_exec(domain,executable)
+#
+define(`can_exec',`allow $1 $2:file { mmap_file_perms ioctl lock execute_no_trans };')
Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
#2 lore raw

PATCH 2/6 Move can_exec to a file that I can parse

Quoted 6 lines · Christopher J. PeBenito
Quoted 2 lines · James Carter

It is not possible for mere mortals to parse misc_macros.spt, so I move can_exec to a different file.

I don't agree with the move; is your parser ignoring misc_macros.spt?

I didn't think that you would. ;)

I don't parse misc_macros.spt and I doubt if any Refpolicy-to-CIL translator will want to either.

Quoted 39 lines
Quoted 37 lines
---
  policy/support/misc_macros.spt   |    6 ------
  policy/support/misc_patterns.spt |    6 ++++++
  2 files changed, 6 insertions(+), 6 deletions(-)
policy/support/misc_macros.spt +0 -6
index 4ca5688..7068f24 100644
@@ -65,12 +65,6 @@ define(`gen_context',`$1`'ifdef(`enable_mls',`:$2')`'ifdef(`enable_mcs',`:s0`'if
 
  ########################################
  #
-# can_exec(domain,executable)
-#
-define(`can_exec',`allow $1 $2:file { mmap_file_perms ioctl lock execute_no_trans };')
-
-########################################
-#
  # gen_bool(name,default_value)
  #
  define(`gen_bool',`
policy/support/misc_patterns.spt +6 -0
index 22ca011..7e55f43 100644
@@ -62,3 +62,9 @@ define(`ps_process_pattern',`
         allow $1 $2:lnk_file read_lnk_file_perms;
         allow $1 $2:process getattr;
  ')
+
+########################################
+#
+# can_exec(domain,executable)
+#
+define(`can_exec',`allow $1 $2:file { mmap_file_perms ioctl lock execute_no_trans };')
Signature · 2 lines
James Carter <[email protected]>
National Security Agency
#3 lore raw

PATCH 2/6 Move can_exec to a file that I can parse

Quoted 5 lines · James Carter
Quoted 4 lines · Christopher J. PeBenito
Quoted 2 lines · James Carter

It is not possible for mere mortals to parse misc_macros.spt, so I move can_exec to a different file.

Quoted 7 lines
Quoted 2 lines

I don't agree with the move; is your parser ignoring misc_macros.spt?

I didn't think that you would. ;)

I don't parse misc_macros.spt and I doubt if any Refpolicy-to-CIL translator will want to either.

I've never expected to be able to use Refpolicy unchanged when we get CIL up and running. I've always assumed that there would be tweaks. I also want to get rid of even more of the m4-isms when we work on a translator. Then, for example, the interface delcarations wouldn't look like m4 macro delcarations and we wouldn't have the crazy ` vs ' quoting annoyances of m4.

Quoted 40 lines
Quoted 39 lines
Quoted 37 lines
---
   policy/support/misc_macros.spt   |    6 ------
   policy/support/misc_patterns.spt |    6 ++++++
   2 files changed, 6 insertions(+), 6 deletions(-)
policy/support/misc_macros.spt +0 -6
index 4ca5688..7068f24 100644
@@ -65,12 +65,6 @@ define(`gen_context',`$1`'ifdef(`enable_mls',`:$2')`'ifdef(`enable_mcs',`:s0`'if
 
   ########################################
   #
-# can_exec(domain,executable)
-#
-define(`can_exec',`allow $1 $2:file { mmap_file_perms ioctl lock execute_no_trans };')
-
-########################################
-#
   # gen_bool(name,default_value)
   #
   define(`gen_bool',`
policy/support/misc_patterns.spt +6 -0
index 22ca011..7e55f43 100644
@@ -62,3 +62,9 @@ define(`ps_process_pattern',`
          allow $1 $2:lnk_file read_lnk_file_perms;
          allow $1 $2:process getattr;
   ')
+
+########################################
+#
+# can_exec(domain,executable)
+#
+define(`can_exec',`allow $1 $2:file { mmap_file_perms ioctl lock execute_no_trans };')
Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com