#
# Policy rules for hostd daemon
#
# Any new policy changes/updates that grant access
# to the hostd daemon should also be added to
# hostd-simulator-tools/uwSimDom, or else the
# hostd-simulators will not have the same access
# as hostd and would break the hostd simulator functionality.
#

-s adminSys grant
-s cloneSys grant
-s crossfdSys grant
-s execSys grant
-s forkExecSys grant
-s forkSys grant
-s genericSys grant
-s getpgidSys grant
-s getsidSys grant
-s ioctlSys grant
-s iofilterExitSys grant
-s iofilterSys grant
-s ioplSys grant
-s keyCacheAdminSys grant
-s keyCacheGenSys grant
-s killSys grant
-s moduleSys grant
-s mountSys grant
-s mprotectSys grant
-s openSys grant
-s pmemDirectSys grant
-s pmemGenSys grant
-s pmemVolSys grant
-s ptraceSys grant
-s rpcSys grant
-s schedulerSys grant
-s setpgidSys grant
-s storageSys grant
-s syncSys grant
-s sysctlSys grant
-s timeSys grant
-s umountSys grant
-s vmfsAdminSys grant
-s vmfsGenSys grant
-s vmkacSys grant
-s vmxSys grant
-s vobSys grant
-s vsiReadSys grant
-s vsiWriteSys grant

-c inet_raw_socket_create grant
-c inet_dgram_socket_create grant
-c inet_stream_socket_create grant
-c unix_socket_create grant
-c unix_stream_socket_bind grant
-c unix_stream_socket_connect grant
-c unix_vmklink_socket_connect grant
-c stream_vsocket_trusted grant
-c vsocket_provide_service grant
-c dgram_vsocket_create grant
-c dgram_vsocket_bind grant
-c dgram_vsocket_send grant
-c dgram_vsocket_trusted grant
-c opaque_net_connect grant
-c stream_vsocket_bind grant
-c stream_vsocket_connect grant
-c stream_vsocket_create grant
-c unix_dgram_socket_bind grant
-c unix_dgram_socket_connect grant

-p inet_socket_bind all grant
-p inet_socket_connect loopback grant
-p inet_socket_connect nonloopback grant

# Deny everything
-r /
# except ...
-r /bin rx
-r /coverage w
-r /dev rw
-r /etc rwx
-r /lib rx
-r /lib64 rx
-r /locker rw
-r /proc/cpuinfo r
-r /proc/self/status r
-r /productLocker rw
-r /productLocker.old rw
-r /productLocker.new rw
-r /productLocker.rec rw
-r /productLocker.tmp rw
-r /scratch rw
-r /store rw
-r /tmp rw
-r /upgrade_scratch rwx
-r /usr/lib rx
-r /usr/lib/hostprofiles rwx
-r /usr/lib/vmware rwx
-r /usr/lib64 rx
-r /usr/libexec rx
-r /usr/share r
-r /var rw
-r /vmfs/volumes rw
-r /vmimages/ rw

-d default genericDom file_exec grant
