from .ldap_app import PpLdapAppError, PpLdapApplication
-__version__ = '0.3.4'
+__version__ = '0.3.5'
LOG = logging.getLogger(__name__)
"""
default_initial_uid = 999999999
+ # /mnt/nfs
default_chroot_homedir = os.sep + os.path.join('mnt', 'nfs')
+ # /home
default_home_root = os.sep + 'home'
# -------------------------------------------------------------------------
self.initial_uid = self.default_initial_uid
self.chroot_homedir = self.default_chroot_homedir
- self.home_root_abs = default_chroot_homedir
+ self.home_root_abs = self.default_home_root
self.home_root_rel = os.path.relpath(self.home_root_abs, os.sep)
self.simulate = False
self.user_entries = []
- self.home_root_real = os.path.join(self.chroot_homedir, self.home_root)
+ self.home_root_real = os.path.join(self.chroot_homedir, self.home_root_rel)
description = textwrap.dedent('''\
Home Directory and UIDNumber generation - this script will search for
self.home_root_abs = v
self.home_root_rel = os.path.relpath(self.home_root_abs, os.sep)
- self.home_root_real = os.path.join(self.chroot_homedir, self.home_root)
+ self.home_root_real = os.path.join(self.chroot_homedir, self.home_root_rel)
# -------------------------------------------------------------------------
def pre_run(self):
home_relative = os.path.relpath(home, self.home_root_abs)
if home_relative.startswith(upper_dir):
if self.verbose:
- LOG.warn("Home directory {h!r} outside {r!r} is not considered.".format(
- h=home, r=self.home_root_abs))
+ LOG.warn("Home directory {h!r} ({rel!r}) outside {r!r} is not considered.".format(
+ h=home, rel=home_relative, r=self.home_root_abs))
continue
chroot_dir = os.path.join(