]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_config.c
Merge from branch-2-1
[netatalk.git] / etc / afpd / afp_config.c
index c737023dab251a1b27b848ad834ac541ca6a0482..5bd87f906aa4d349f3630f3cd38159a2c70d6192 100644 (file)
@@ -48,7 +48,7 @@ char *strchr (), *strrchr ();
 #ifdef USE_SRVLOC
 #include <slp.h>
 #endif /* USE_SRVLOC */
-#ifdef HAVE_ACLS
+#ifdef HAVE_LDAP
 #include <atalk/ldapconfig.h>
 #endif
 
@@ -547,11 +547,6 @@ AFPConfig *configinit(struct afp_options *cmdline)
     struct afp_options options;
     AFPConfig *config=NULL, *first = NULL; 
 
-#ifdef HAVE_ACLS
-    /* Parse afp_ldap.conf first so we can set the uuid option */
-    acl_ldap_readconfig(_PATH_ACL_LDAPCONF);
-#endif /* HAVE_ACLS */
-
     /* if config file doesn't exist, load defaults */
     if ((fp = fopen(cmdline->configfile, "r")) == NULL)
     {
@@ -585,14 +580,6 @@ AFPConfig *configinit(struct afp_options *cmdline)
         if (!afp_options_parseline(p, &options))
             continue;
 
-#ifdef HAVE_ACLS
-       /* Enable UUID support if LDAP config is complete */
-        if (!ldap_config_valid) {
-            LOG(log_info, logtype_afpd, "Disabling UUID support");
-            options.flags &= ~OPTION_UUID;
-        }
-#endif /* HAVE_ACLS */
-
         /* AFPConfigInit can return two linked configs due to DSI and ASP */
         if (!first) {
             if ((first = AFPConfigInit(&options, cmdline)))
@@ -602,6 +589,11 @@ AFPConfig *configinit(struct afp_options *cmdline)
         }
     }
 
+#ifdef HAVE_LDAP
+    /* Parse afp_ldap.conf */
+    acl_ldap_readconfig(_PATH_ACL_LDAPCONF);
+#endif /* HAVE_LDAP */
+
     LOG(log_debug, logtype_afpd, "Finished parsing Config File");
     fclose(fp);