Skip to content

Commit

Permalink
Use correct interface or template declaration
Browse files Browse the repository at this point in the history
Following the guideline of interfaces not allowed to declare anything
and not use prefix parameters, declare interfaces doing so as templates.

Also declare templates not using those features and not calling
templates themselves as interfaces.

These changes originate from the discussion in
SELinuxProject/selint#205 and are found by
new proposed SELint checks at
SELinuxProject/selint#206.

Signed-off-by: Christian Göttsche <[email protected]>
  • Loading branch information
cgzones authored and 0xC0ncord committed Jul 21, 2021
1 parent b022cef commit ea254af
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion policy/modules/admin/kismet.if
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
## </summary>
## </param>
#
template(`kismet_role',`
interface(`kismet_role',`
gen_require(`
type kismet_home_t, kismet_tmp_t, kismet_tmpfs_t;
type kismet_t;
Expand Down
4 changes: 2 additions & 2 deletions policy/modules/apps/gnome.if
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ interface(`gnome_dbus_chat_gconfd',`
## </summary>
## </param>
#
interface(`gnome_dbus_chat_gkeyringd',`
template(`gnome_dbus_chat_gkeyringd',`
gen_require(`
type $1_gkeyringd_t;
class dbus send_msg;
Expand Down Expand Up @@ -738,7 +738,7 @@ interface(`gnome_spec_domtrans_all_gkeyringd',`
## </summary>
## </param>
#
interface(`gnome_stream_connect_gkeyringd',`
template(`gnome_stream_connect_gkeyringd',`
gen_require(`
type $1_gkeyringd_t, gnome_keyring_tmp_t;
')
Expand Down
2 changes: 1 addition & 1 deletion policy/modules/apps/qemu.if
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ template(`qemu_domain_template',`
## </summary>
## </param>
#
template(`qemu_role',`
interface(`qemu_role',`
gen_require(`
type qemu_t;
')
Expand Down
4 changes: 2 additions & 2 deletions policy/modules/apps/wm.if
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ interface(`wm_exec',`
## </summary>
## </param>
#
interface(`wm_dbus_chat',`
template(`wm_dbus_chat',`
gen_require(`
type $1_wm_t;
class dbus send_msg;
Expand Down Expand Up @@ -247,7 +247,7 @@ interface(`wm_application_domain',`
## </summary>
## </param>
#
interface(`wm_write_pipes',`
template(`wm_write_pipes',`
gen_require(`
type $1_wm_t;
')
Expand Down
8 changes: 4 additions & 4 deletions policy/modules/services/dbus.if
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ interface(`dbus_connect_all_session_bus',`
## </summary>
## </param>
#
interface(`dbus_connect_spec_session_bus',`
template(`dbus_connect_spec_session_bus',`
gen_require(`
type $1_dbusd_t;
class dbus acquire_svc;
Expand Down Expand Up @@ -253,7 +253,7 @@ interface(`dbus_all_session_bus_client',`
## </summary>
## </param>
#
interface(`dbus_spec_session_bus_client',`
template(`dbus_spec_session_bus_client',`
gen_require(`
attribute dbusd_session_bus_client;
type $1_dbusd_t;
Expand Down Expand Up @@ -306,7 +306,7 @@ interface(`dbus_send_all_session_bus',`
## </summary>
## </param>
#
interface(`dbus_send_spec_session_bus',`
template(`dbus_send_spec_session_bus',`
gen_require(`
type $1_dbusd_t;
class dbus send_msg;
Expand Down Expand Up @@ -444,7 +444,7 @@ interface(`dbus_all_session_domain',`
## </summary>
## </param>
#
interface(`dbus_spec_session_domain',`
template(`dbus_spec_session_domain',`
gen_require(`
type $1_dbusd_t;
')
Expand Down
2 changes: 1 addition & 1 deletion policy/modules/services/git.if
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
## </summary>
## </param>
#
template(`git_role',`
interface(`git_role',`
gen_require(`
attribute_role git_session_roles;
type git_session_t, gitd_exec_t, git_user_content_t;
Expand Down
2 changes: 1 addition & 1 deletion policy/modules/services/rlogin.if
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface(`rlogin_domtrans',`
## </summary>
## </param>
#
template(`rlogin_read_home_content',`
interface(`rlogin_read_home_content',`
gen_require(`
type rlogind_home_t;
')
Expand Down
2 changes: 1 addition & 1 deletion policy/modules/system/userdomain.if
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ template(`userdom_admin_user_template',`
## </summary>
## </param>
#
template(`userdom_security_admin_template',`
interface(`userdom_security_admin_template',`
allow $1 self:capability { dac_override dac_read_search };

corecmd_exec_shell($1)
Expand Down

0 comments on commit ea254af

Please sign in to comment.