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
This commit is contained in:
Jeff Vander Stoep 2018-02-02 08:57:35 -08:00
parent be6489d1bf
commit d28c0569ee

View file

@ -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, <property name>) 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__`: $*
')')