새로운 유형을 정의하고 있습니다 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
.