From a2b29799af194531f8c90145be2f44d002d425c4 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 15 Feb 2006 14:36:55 +0000 Subject: Dont install a jail to an existing location --- ezjail-admin | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ezjail-admin b/ezjail-admin index 9423d9c..b2f56e8 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -79,6 +79,10 @@ create) # inside our jail directory [ ${newjail_root%%[!/]*} ] || newjail_root=${ezjail_jaildir}/${newjail_root} + # if a directory at the specified jail root already exists, refuse to + # install + [ -e ${newjail_root} ] && exerr "Error: the specified jail root ${newjail_root} alread exists." + # if jail root specified on command line does not lie within our jail # directory, we need to create a softlink if [ "${newjail_root##${ezjail_jaildir}}" = "${newjail_root}" ]; then -- cgit v1.2.3