SELinux--找不到seinfo、sesearch指令


今天在學習SELinux時,想查詢policy規則,於是在Command輸入:

[root@oel62 ~]# seinfo
-bash: seinfo: command not found

[root@oel62 ~]# sesearch
-bash: seinfo: command not found

找不到相關指令,是因為缺少安裝SELinux Tools,利用yum來安裝

[root@oel62 ~]# yum install setools-console.x86_64
Loaded plugins: refresh-packagekit, security
Setting up Install Process
...(略)
Running Transaction
  Installing : setools-libs-3.3.7-4.el6.x86_64                    1/2
  Installing : setools-console-3.3.7-4.el6.x86_64                 2/2
Installed:
  setools-console.x86_64 0:3.3.7-4.el6

一共安裝了兩個套件,接著輸入指令試試看。
 
[root@oel62 ~]# seinfo --help
Usage: seinfo [OPTIONS] [EXPRESSION] [POLICY ...]
Print information about the components of a SELinux policy.
EXPRESSIONS:
  -c[NAME], --class[=NAME]         print object classes
  --sensitivity[=NAME]             print sensitivities
...(略)

[root@oel62 ~]# sesearch --help
Usage: sesearch [OPTIONS] RULE_TYPE [RULE_TYPE ...] [EXPESSION] [POLICY ...]
Search the rules in a SELinux policy.
RULE_TYPES:
  -A, --allow               allow rules
  --neverallow              neverallow rules
...(略)

Windows 11安裝時跳過網路連線