Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding mlock, sysvshm, sysvsem, sysvmsg attributes #263

Merged
merged 4 commits into from Jun 25, 2023

Conversation

zilti
Copy link
Contributor

@zilti zilti commented Mar 10, 2023

No description provided.

share/pot/common.sh Show resolved Hide resolved
@grembo
Copy link
Collaborator

grembo commented Mar 20, 2023

Also: How does this interact with the logic in _js_start

pot/share/pot/start.sh

Lines 451 to 471 in 28b302d

local _pname _confdir _epaira _epairb _ipv6_epaira _ipv6_epairb
local _ifaces _hostname _osrelease _param _ip _cmd _persist
local _stack _value _name _type _wait_pid _exit_code _tmp
_pname="$1"
_confdir="${POT_FS_ROOT}/jails/$_pname/conf"
_param="allow.set_hostname=false allow.raw_sockets allow.socket_af allow.sysvipc"
_param="$_param allow.chflags exec.clean mount.devfs"
_param="$_param sysvmsg=new sysvsem=new sysvshm=new"
for _attr in ${_POT_JAIL_RW_ATTRIBUTES} ; do
# shellcheck disable=SC1083,2086
eval _name=\"\${_POT_DEFAULT_${_attr}_N}\"
# shellcheck disable=SC1083,2086
eval _type=\"\${_POT_DEFAULT_${_attr}_T}\"
_value="$(_get_conf_var "$_pname" "pot.attr.${_attr}")"
if [ "${_value}" = "YES" ]; then
_param="$_param ${_name}"
elif [ "${_type}" != "bool" ] && [ -n "${_value}" ]; then
_param="$_param ${_name}=${_value}"
fi
done

Especially sysvmsg=new sysvsem=new sysvshm=new?

@grembo
Copy link
Collaborator

grembo commented Jun 25, 2023

Reading the current start-up code it seems like our current logic always sets allow.sysvipc sysvmsg=new sysvsem=new sysvshm=new.

Given that allow.sysvipc is deprecated anyway, this makes fixing this quite easy:

  1. Remove the sysvip attribute
  2. Add sysvmsg=new, sysvsem=new, sysvshm=new as default attributes

These now have "new" as the default value, as this is what happened
before. Retire sysvipc attribute, which never made a difference anyway.
@grembo grembo merged commit 6231896 into bsdpot:master Jun 25, 2023
2 checks passed
@grembo
Copy link
Collaborator

grembo commented Jun 25, 2023

@zilti Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants