]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/acl/ldap_config.c
Convert uuid_bin2string to not allocate but return pointer to static string
[netatalk.git] / libatalk / acl / ldap_config.c
index 8d17823c266a1e68cbb342cb4ac965a98712f41c..9bac9f3bfc7bfb22d95f714bcfc0bbc8400ae78d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  $Id: ldap_config.c,v 1.3 2009-11-27 22:57:27 franklahm Exp $
+  $Id: ldap_config.c,v 1.4 2009-11-28 11:10:37 franklahm Exp $
   Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
 
   This program is free software; you can redistribute it and/or modify
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
-#ifdef HAVE_NFSv4_ACLS
+#ifdef HAVE_ACLS
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <errno.h>
 #include <string.h>
 #include <ctype.h>
@@ -109,10 +110,13 @@ int acl_ldap_readconfig(char *name)
                         }
                         j++;
                     } /* while j*/
-                } /* else */
-            }
+                } /* if else 0 == ldap_prefs*/
+                break;
+            } /* if strcmp */
             i++;
         } /* while i */
+        if (ldap_prefs[i].pref == NULL)
+            LOG(log_error, logtype_afpd,"afp_ldap.conf: Unknown option: \"%s\"", pref);
     }  /*  EOF */
 
     /* check if the config is sane and complete */
@@ -121,6 +125,7 @@ int acl_ldap_readconfig(char *name)
 
     while(ldap_prefs[i].pref != NULL) {
         if ( ldap_prefs[i].valid != 0) {
+            LOG(log_error, logtype_afpd,"afp_ldap.conf: Missing option: \"%s\"", ldap_prefs[i].name);
             ldap_config_valid = 0;
             break;
         }
@@ -141,4 +146,4 @@ int acl_ldap_readconfig(char *name)
     fclose(f);
     return 0;
 }
-#endif
+#endif /* HAVE_ACLS */