Use GlobalDir instead of GenerateDir in one place
[mirror/userdir-ldap.git] / ud-generate
index 76d8179..02b2887 100755 (executable)
@@ -137,7 +137,7 @@ def IsInGroup(account):
   if str(account['gidNumber']) in Allowed: return True
 
   # Check the host based ACL
-  if 'allowedHost' in account and CurrentHost in account['allowedHost']: return True
+  if account.is_allowed_by_hostacl(CurrentHost): return True
 
   # See if there are supplementary groups
   if not 'supplementaryGid' in account: return False
@@ -1062,7 +1062,7 @@ for host in HostAttrs:
       continue
 
    CurrentHost = host[1]['hostname'][0]
-   OutDir = GenerateDir + '/' + CurrentHost + '/'
+   OutDir = GlobalDir + CurrentHost + '/'
    try:
       os.mkdir(OutDir)
    except: