Go to main content

手册页部分 1:用户命令

退出打印视图

更新时间: 2022年7月27日 星期三
 
 

plabel(1)

名称

plabel - 获取或设置进程的标签

用法概要

/usr/bin/plabel [-sS] [pid...]
/usr/bin/plabel [-sS] -l clearance pid...

描述

The plabel command gets or sets the label of a process.如果未指定 pid,则显示的标签是 plabel 命令的标签。未指定这些选项时,标签的输出格式会以缺省格式显示。

启用 Trusted Extensions 时,标签对应当前区域的标签,而且不能更改。否则标签代表进程安全许可。

选项

–l

将指定安全许可应用于 pid 列表中的每个进程。当前 plabel 进程的安全许可必须支配指定安全许可以及每个目标进程的安全许可。当前进程的有效特权集必须是每个目标进程的许可特权集的超集。还需要特权 proc_owner 来设置任何不属于当前进程的进程的安全许可。

This option is not supported when Trusted Extensions are enabled.

–s

以短格式显示与 pid 关联的标签。

–S

以长格式显示与 pid 关联的标签。

退出状态

plabel 退出时返回下列值之一:

0

成功完成。

1

由于用法错误或特权不足,未成功完成。

2

无法转换标签。

3

无法分配内存。

属性

有关下列属性的说明,请参见 attributes(7)

属性类型
属性值
可用性
system/file_labeling
接口稳定性
请参见下文。

plabel 实用程序是 "Committed"(已确定)。输出为 "Not-an-Interface"(不是接口)。

另请参见

proc(1), getplabel(3TSOL), getclearance(3TSOL), attributes(7), labels(7)

History

The –l option, and support for process clearances on systems not running Trusted Extensions, was added in Oracle Solaris 11.4.0.

The plabel command was added to Solaris in Solaris 10 4/08 (Update 5).Prior to that it was included in the Trusted Extensions add-on for Solaris.