man privileges – 개발자가 사용하는 권한 정의 및 해당 이름을 나열합니다.
ppriv -vl – 관리자가 사용하는 권한 정의 및 해당 이름을 나열합니다.
ppriv -vl basic – 기본 권한 세트에 포함된 권한의 이름 및 정의를 나열합니다.
ppriv $$ – 현재 셸($$)의 권한을 나열합니다.
getent exec_attr – 보안 속성(setuid 또는 권한(privilege))이 포함된 모든 명령을 권한(right) 프로파일 이름으로 나열합니다.
$ 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 옵션을 사용합니다.
이 권한(privilege) 형식은 useradd, roleadd, usermod, rolemod 명령을 사용하여 사용자 및 역할에 권한(privilege)을 지정하고 profiles 명령을 사용하여 권한(right) 프로파일에 권한을 지정합니다.
$ 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 현재 셸의 권한 목록
모든 사용자는 기본적으로 기본 권한 세트에 지정됩니다. 기본 제한 세트는 모든 권한입니다.
출력의 단문자는 다음 권한 세트를 가리킵니다.
유효 권한 세트
상속 가능한 권한 세트
허가된 권한 세트
제한 권한 세트
$ 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
이중 달러 기호($$)는 부모 셸의 프로세스 번호를 명령에 전달합니다. 지정된 권한(right) 프로파일의 명령으로 제한된 권한(privilege)은 이 목록에 포함되지 않습니다.
예 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 *