]> 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 cb836b81a7a19e7a760fbc1e77df1bf3cf077bf4..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
 
@@ -375,10 +375,10 @@ static AFPConfig *DSIConfigInit(const struct afp_options *options,
     }
 
     if (options->flags & OPTION_PROXY) {
-        LOG(log_info, logtype_afpd, "AFP/TCP proxy initialized for %s:%d (%s)",
+        LOG(log_note, logtype_afpd, "AFP/TCP proxy initialized for %s:%d (%s)",
             getip_string((struct sockaddr *)&dsi->server), getip_port((struct sockaddr *)&dsi->server), VERSION);
     } else {
-        LOG(log_info, logtype_afpd, "AFP/TCP started, advertising %s:%d (%s)",
+        LOG(log_note, logtype_afpd, "AFP/TCP started, advertising %s:%d (%s)",
             getip_string((struct sockaddr *)&dsi->server), getip_port((struct sockaddr *)&dsi->server), VERSION);
     }
 
@@ -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, "Enabling 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);