Oracle® Solaris 11.2 でのユーザーとプロセスのセキュリティー保護

印刷ビューの終了

更新: 2014 年 7 月
 
 

特権の一覧表示

  • man privileges – 開発者により使用される特権の定義と特権の名前を一覧表示します

  • ppriv -vl – 開発者により使用される特権の定義と特権の名前を一覧表示します

  • ppriv -vl basic – 特権の基本セット内の特権の名前と定義を一覧表示します

  • ppriv $$ – 現在のシェル ($$) 内の特権を一覧表示します

  • getent exec_attr – 権利プロファイル名別にセキュリティー属性 (setuid または特権) を持つすべてのコマンドを一覧表示します

$ getent exec_attr | more
All:solaris:cmd:::*:
Audit Configuration:solaris:cmd:::/usr/sbin/auditconfig:privs=sys_audit
...
Zone Security:solaris:cmd:::/usr/sbin/txzonemgr:uid=0
Zone Security:solaris:cmd:::/usr/sbin/zonecfg:uid=0 ...
使用例 6-12  すべての特権とその定義の一覧表示

privileges(5) のマニュアルページで説明する特権フォーマットは開発者によって使用されます。

$ man privileges
Standards, Environments, and Macros                 privileges(5)

NAME
     privileges - process privilege model
...
     The defined privileges are:

     PRIV_CONTRACT_EVENT

         Allow a process to request reliable delivery  of  events
         to an event endpoint.

         Allow a process to include events in the critical  event
         set  term  of  a  template  which  could be generated in
         volume by the user.
...
使用例 6-13  特権割り当てで使用される特権の一覧表示

ppriv コマンドは、すべての特権の名前を一覧表示します。定義を表示するには –v オプションを使用します。

この特権フォーマットは、useradd, roleaddusermod、および rolemod コマンドを使用してユーザーと役割に特権を割り当てる場合、および profiles コマンドを使用して権利プロファイルに特権を割り当てる場合に使用されます。

$ ppriv -lv | more
contract_event
	Allows a process to request critical events without limitation.
	Allows a process to request reliable delivery of all events on
	any event queue.
...
win_upgrade_sl
        Allows a process to set the sensitivity label of a window
        resource to a sensitivity label that dominates the existing
        sensitivity label.
        This privilege is interpreted only if the system is configured
        with Trusted Extensions.
使用例 6-14  現在のシェル内の特権の一覧表示

デフォルトでは、どのユーザーにも基本特権セットが割り当てられます。デフォルトの制限セットはすべての特権です。

出力の最初の文字は、次の特権セットを指しています。

E

有効特権セット

I

継承可能な特権セット

P

許可された特権セット

L

制限特権セット

$ ppriv $$
1200:   -bash
flags = <none>
        E: basic
        I: basic
        P: basic
        L: all
$ ppriv -v $$
1200:   -bash
flags = <none>
	E: file_link_any,file_read,file_write,net_access,proc_exec,proc_fork,
           proc_info,proc_session,sys_ib_info
	I: file_link_any,file_read,...,sys_ib_info
	P: file_link_any,file_read,...,sys_ib_info
	L: contract_event,contract_identity,...,sys_time

2 つのドル記号 ($$) により、親シェルのプロセス番号がコマンドに渡されます。この一覧表示には、割り当てられている権利プロファイル内のコマンドに制限されている特権は含まれません。

使用例 6-15  基本特権とその定義の一覧表示
$ ppriv -vl basic
file_link_any
	Allows a process to create hardlinks to files owned by a uid
	different from the process' effective uid.
file_read
	Allows a process to read objects in the filesystem.
file_write
	Allows a process to modify objects in the filesystem.
net_access
	Allows a process to open a TCP, UDP, SDP or SCTP network endpoint.
proc_exec
	Allows a process to call execve().
proc_fork
	Allows a process to call fork1()/forkall()/vfork()
proc_info
	Allows a process to examine the status of processes other
	than those it can send signals to.  Processes which cannot
	be examined cannot be seen in /proc and appear not to exist.
proc_session
	Allows a process to send signals or trace processes outside its
	session.
sys_ib_info
	Allows a process to perform read InfiniBand MAD (Management Datagram)
	operations.
使用例 6-16  ユーザーの権利プロファイル内のセキュリティー属性を持つコマンドの一覧表示

Basic Solaris User プロファイルには、ユーザーが CD-ROM への読み取りと書き込みを行えるコマンドが含まれています。

$ profiles -l
  Basic Solaris User
...
   /usr/bin/cdrecord.bin   privs=file_dac_read,sys_devices,
     proc_lock_memory,proc_priocntl,net_privaddr
   /usr/bin/readcd.bin     privs=file_dac_read,sys_devices,net_privaddr
   /usr/bin/cdda2wav.bin   privs=file_dac_read,sys_devices,
     proc_priocntl,net_privaddr
  All
   *