import traceback
import textwrap
import copy
+import shutil
# Third party modules
import six
from .ldap_app import PpLdapAppError, PpLdapApplication
-__version__ = '0.3.2'
+__version__ = '0.3.3'
LOG = logging.getLogger(__name__)
home = entry['homeDirectory'][0]
LOG.debug("Checking home directory {!r} ...".format(home))
+ chroot_dir = os.path.join(
+ self.chroot_homedir, os.path.relpath(home, os.sep))
+ if self.verbose > 1:
+ LOG.debug("Checking existence of {!r} ...".format(chroot_dir))
+
+ if os.path.exists(chroot_dir):
+ if os.path.isdir(chroot_dir):
+ if self.verbose > 2:
+ LOG.debug("Directory {!r} is already existing.".format(chroot_dir))
+ else:
+ LOG.error("Directory {!r} exists, but is NOT a directory.".format(chroot_dir))
+ continue
+
+ LOG.info("Creating home directory {!r} ....".format(chroot_dir))
+
if i >= 5:
break