From d28c0569ee4336a3d633012110b5d132fc3abf2f Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep Date: Fri, 2 Feb 2018 08:57:35 -0800 Subject: [PATCH] te_macros: remove print macro aosp/605217 adds the following lines: genfscon tracefs /options/print-tgid u:object_r:debugfs_tracing:s0 genfscon debugfs /tracing/options/print-tgid u:object_r:debugfs_tracing:s0 However, the m4 pre-processing step of selinux policy compilation outputs: genfscon tracefs /options/-tgid u:object_r:debugfs_tracing:s0 genfscon debugfs /tracing/options/-tgid u:object_r:debugfs_tracing:s0 And as a result of the "print" it prints: m4: system/sepolicy/private/genfs_contexts: 177: m4: system/sepolicy/private/genfs_contexts: 203: Due to the following macro: https://android.googlesource.com/platform/system/sepolicy/+/oreo-mr1-dev/public/te_macros#580 This change removes the now-deprecated print macro to unblock aosp/605217. Bug: 72862003 Test: verify that the m4 output for aosp/605217 is correct. Change-Id: Ia4ec96e16b98e8df241cceb64e3f3b7bea9a7f3d --- public/te_macros | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/public/te_macros b/public/te_macros index 5da3389e7..0e8dcf43c 100644 --- a/public/te_macros +++ b/public/te_macros @@ -288,15 +288,6 @@ allow $2 vendor_file:file { read open getattr execute map }; # use set_prop(sourcedomain, targetproperty) # define(`unix_socket_connect', ` -ifelse($2, `property', ` - ifelse($3,`init', ` - print(`deprecated: unix_socket_connect($1, $2, $3) Please use set_prop($1, ) instead.') - ') -') -__unix_socket_connect__($1, $2, $3) -') - -define(`__unix_socket_connect__', ` allow $1 $2_socket:sock_file write; allow $1 $3:unix_stream_socket connectto; ') @@ -307,7 +298,7 @@ allow $1 $3:unix_stream_socket connectto; # targetproperty. # define(`set_prop', ` -__unix_socket_connect__($1, property, init) +unix_socket_connect($1, property, init) allow $1 $2:property_service set; get_prop($1, $2) ') @@ -607,9 +598,3 @@ define(`add_hwservice', ` allow $1 hidl_base_hwservice:hwservice_manager add; neverallow { domain -$1 } $2:hwservice_manager add; ') - -########################################## -# print a message with a trailing newline -# print(`args') -define(`print', `errprint(`m4: '__file__: __line__`: $* -')')