From: Frank Brehm Date: Mon, 20 Mar 2017 13:08:08 +0000 (+0100) Subject: Bugfixing X-Git-Tag: 0.1.2~244 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=02b4556889a7470099b17d6f64b95dbebc21521b;p=pixelpark%2Fadmin-tools.git Bugfixing --- diff --git a/pp_lib/mk_home_app.py b/pp_lib/mk_home_app.py index 05f4c62..cd9d846 100644 --- a/pp_lib/mk_home_app.py +++ b/pp_lib/mk_home_app.py @@ -39,7 +39,7 @@ from .merge import merge_structure from .ldap_app import PpLdapAppError, PpLdapApplication -__version__ = '0.3.4' +__version__ = '0.3.5' LOG = logging.getLogger(__name__) @@ -56,7 +56,9 @@ class PpMkHomeApp(PpLdapApplication): """ default_initial_uid = 999999999 + # /mnt/nfs default_chroot_homedir = os.sep + os.path.join('mnt', 'nfs') + # /home default_home_root = os.sep + 'home' # ------------------------------------------------------------------------- @@ -64,11 +66,11 @@ class PpMkHomeApp(PpLdapApplication): 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 @@ -171,7 +173,7 @@ class PpMkHomeApp(PpLdapApplication): 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): @@ -258,8 +260,8 @@ class PpMkHomeApp(PpLdapApplication): 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(