jailid detection failed, when security.jail.set_hostname_allowed=1 and another hostname was set

This commit is contained in:
erdgeist 2006-05-03 15:40:43 +00:00
parent dd8855ee99
commit b5acbdb903

View File

@ -71,7 +71,8 @@ fetchjailinfo () {
eval ezjail_ip=\"\$jail_${ezjail_safename}_ip\" eval ezjail_ip=\"\$jail_${ezjail_safename}_ip\"
ezjail_softlink=${ezjail_jaildir}/`basename -- ${ezjail_rootdir}` ezjail_softlink=${ezjail_jaildir}/`basename -- ${ezjail_rootdir}`
ezjail_id=`jls | grep " ${ezjail_hostname} " | head -n 1 | awk '{print $1}'` [ -f /var/run/jail_${ezjail_safename}.id ] && ezjail_id=`cat /var/run/jail_${ezjail_safename}.id` || return
jls | grep -q -E "^ +${ezjail_id} " || unset ezjail_id
} }
# fill the base jail - this function is used by install and update # fill the base jail - this function is used by install and update