#include "config.h"
#endif /* HAVE_CONFIG_H */
-#ifdef HAVE_ACLS
-
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
+
+#ifdef HAVE_LDAP
+#define LDAP_DEPRECATED 1
#include <ldap.h>
+#endif
#include <atalk/ldapconfig.h>
#include <atalk/uuid.h>
static int inited = 0;
if (! inited) {
+#ifdef HAVE_LDAP
/* Parse afp_ldap.conf */
printf("Start parsing afp_ldap.conf\n");
acl_ldap_readconfig(_PATH_ACL_LDAPCONF);
} else {
printf("afp_ldap.conf is not ok, not using LDAP. Only local UUID testing available.\n");
}
+#else
+ printf("Built without LDAP support, only local UUID testing available.\n");
+#endif
inited = 1;
}
}
ret = getnamefromuuid( uuid, &name, &type);
if (ret == 0) {
switch (type) {
- case UUID_LOCAL:
- printf("local UUID: %s\n", optarg);
- break;
case UUID_USER:
printf("UUID: %s ==> User: %s\n", optarg, name);
break;
case UUID_GROUP:
printf("UUID: %s ==> Group: %s\n", optarg, name);
break;
+ default:
+ printf("???: %s\n", optarg);
+ break;
}
free(name);
} else {
return 0;
}
-#endif /* HAVE_ACLS */