Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc.subr
| Show First 20 Lines • Show All 1,250 Lines • ▼ Show 20 Lines | else | ||||
| if [ -n "$_svcj_ip6_addrs" ]; then | if [ -n "$_svcj_ip6_addrs" ]; then | ||||
| warn "$rc_service: ${name}_svcj_ipaddrs contains at least one IPv6 address, but IPv6 is not enabled in the kernel; IPv6 addresses will be ignored." | warn "$rc_service: ${name}_svcj_ipaddrs contains at least one IPv6 address, but IPv6 is not enabled in the kernel; IPv6 addresses will be ignored." | ||||
| fi | fi | ||||
| fi | fi | ||||
| if [ -n "$_svcj_options" ]; then # translate service jail options | if [ -n "$_svcj_options" ]; then # translate service jail options | ||||
| _svcj_sysvipc_x=0 | _svcj_sysvipc_x=0 | ||||
| for _svcj_option in $_svcj_options; do | for _svcj_option in $_svcj_options; do | ||||
| _opts= | |||||
| case "$_svcj_option" in | case "$_svcj_option" in | ||||
| mlock) | mlock) | ||||
| _svcj_cmd_options="allow.mlock ${_svcj_cmd_options}" | _opts="allow.mlock" | ||||
| ;; | ;; | ||||
| netv4) | netv4) | ||||
| _svcj_cmd_options="${_svcj_ip4} allow.reserved_ports ${_svcj_cmd_options}" | _opts="${_svcj_ip4} allow.reserved_ports" | ||||
| ;; | ;; | ||||
| netv6) | netv6) | ||||
| _svcj_cmd_options="${_svcj_ip6} allow.reserved_ports ${_svcj_cmd_options}" | _opts="${_svcj_ip6} allow.reserved_ports" | ||||
| ;; | ;; | ||||
| net_basic) | net_basic) | ||||
| _svcj_cmd_options="${_svcj_ip4} ${_svcj_ip6} allow.reserved_ports ${_svcj_cmd_options}" | _opts="${_svcj_ip4} ${_svcj_ip6}" | ||||
| _opts="${_opts} allow.reserved_ports" | |||||
| ;; | ;; | ||||
| net_raw) | net_raw) | ||||
| _svcj_cmd_options="allow.raw_sockets ${_svcj_cmd_options}" | _opts="allow.raw_sockets" | ||||
| ;; | ;; | ||||
| net_all) | net_all) | ||||
| _svcj_cmd_options="allow.socket_af allow.raw_sockets allow.reserved_ports ${_svcj_ip4} ${_svcj_ip6} ${_svcj_cmd_options}" | _opts="allow.socket_af" | ||||
| _opts="${_opts} allow.raw_sockets" | |||||
| _opts="${_opts} allow.reserved_ports" | |||||
| _opts="${_opts} ${_svcj_ip4} ${_svcj_ip6}" | |||||
| ;; | ;; | ||||
| nfsd) | nfsd) | ||||
| _svcj_cmd_options="allow.nfsd enforce_statfs=1 ${_svcj_cmd_options}" | _opts="allow.nfsd enforce_statfs=1" | ||||
| ;; | ;; | ||||
| routing) | routing) | ||||
| _svcj_cmd_options="allow.routing ${_svcj_cmd_options}" | _opts="allow.routing" | ||||
| ;; | ;; | ||||
| settime) | settime) | ||||
| _svcj_cmd_options="allow.settime ${_svcj_cmd_options}" | _opts="allow.settime" | ||||
| ;; | ;; | ||||
| sysvipc) | sysvipc) | ||||
| _svcj_sysvipc_x=$((${_svcj_sysvipc_x} + 1)) | _svcj_sysvipc_x=$((${_svcj_sysvipc_x} + 1)) | ||||
| _svcj_cmd_options="sysvmsg=inherit sysvsem=inherit sysvshm=inherit ${_svcj_cmd_options}" | _opts="sysvmsg=inherit sysvsem=inherit sysvshm=inherit" | ||||
| ;; | ;; | ||||
| sysvipcnew) | sysvipcnew) | ||||
| _svcj_sysvipc_x=$((${_svcj_sysvipc_x} + 1)) | _svcj_sysvipc_x=$((${_svcj_sysvipc_x} + 1)) | ||||
| _svcj_cmd_options="sysvmsg=new sysvsem=new sysvshm=new ${_svcj_cmd_options}" | _opts="sysvmsg=new sysvsem=new sysvshm=new" | ||||
| ;; | ;; | ||||
| vmm) | vmm) | ||||
| _svcj_cmd_options="allow.vmm ${_svcj_cmd_options}" | _opts="allow.vmm" | ||||
| ;; | ;; | ||||
| *) | *) | ||||
| echo ${name}: unknown service jail option: $_svcj_option | echo ${name}: unknown service jail option: $_svcj_option | ||||
| ;; | ;; | ||||
| esac | esac | ||||
| _svcj_cmd_options="${_opts} ${_svcj_cmd_options}" | |||||
| done | done | ||||
| if [ ${_svcj_sysvipc_x} -gt 1 ]; then | if [ ${_svcj_sysvipc_x} -gt 1 ]; then | ||||
| echo -n "ERROR: more than one sysvipc option is " | echo -n "ERROR: more than one sysvipc option is " | ||||
| echo "specified in ${name}_svcj_options: $_svcj_options" | echo "specified in ${name}_svcj_options: $_svcj_options" | ||||
| return 1 | return 1 | ||||
| fi | fi | ||||
| fi | fi | ||||
| ▲ Show 20 Lines • Show All 1,571 Lines • Show Last 20 Lines | |||||