SELinuxポリシータイプ適用(.te)ファイルの「権限」ステートメントとはどういう意味ですか?

SELinuxポリシータイプ適用(.te)ファイルの「権限」ステートメントとはどういう意味ですか?

新しいタイプを定義していますmynewtype_t。キーワードを使用して自動的に生成される行がありますpermissive

$ sepolicy generate --init /bin/sh
Failed to retrieve rpm info for selinux-policy
Created the following files:
/tmp/policy/bash.te # Type Enforcement file
/tmp/policy/bash.if # Interface file
/tmp/policy/bash.fc # File Contexts file
/tmp/policy/bash_selinux.spec # Spec file
/tmp/policy/bash.sh # Setup Script

bash.teの内容:

policy_module(bash, 1.0.0)

########################################
#
# Declarations
#

type bash_t;
type bash_exec_t;
init_daemon_domain(bash_t, bash_exec_t)

permissive bash_t;

########################################
#
# bash local policy
#
allow bash_t self:capability { chown setgid setuid };
allow bash_t self:process { fork setpgid setrlimit signal_perms };
allow bash_t self:fifo_file rw_fifo_file_perms;
allow bash_t self:unix_stream_socket create_stream_socket_perms;

domain_use_interactive_fds(bash_t)

files_read_etc_files(bash_t)

auth_use_nsswitch(bash_t)

miscfiles_read_localization(bash_t)

sysnet_dns_name_resolve(bash_t)

行から:

permissive bash_t;

キーワードとはどういう意味ですかpermissive

ベストアンサー1

permissive氏名タイプがbash_t許可モードで実行されることを許可します(許可モードでシステム全体を実行する代わりに)。許可モードが次に設定されています。semanage

おすすめ記事