X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=bin%2Fmisc%2Fuuidtest.c;h=81d117361aa4105c576876d1f5dea587ce2b7504;hb=260c314546ffcfdbef47f2c7de82d5310b26df0a;hp=b12585ee9b7e57a2a7e57fdff81330d7e3de218f;hpb=fa3903158f401ef06aaa524059c64f4412c39c7e;p=netatalk.git diff --git a/bin/misc/uuidtest.c b/bin/misc/uuidtest.c index b12585ee..81d11736 100644 --- a/bin/misc/uuidtest.c +++ b/bin/misc/uuidtest.c @@ -41,12 +41,14 @@ static void usage() static void parse_ldapconf() { static int inited = 0; + dictionary *iniconfig; if (! inited) { #ifdef HAVE_LDAP /* Parse afp_ldap.conf */ printf("Start parsing afp_ldap.conf\n"); - acl_ldap_readconfig(_PATH_ACL_LDAPCONF); + iniconfig = iniparser_load(_PATH_CONFDIR "afp.conf"); + acl_ldap_readconfig(iniconfig); printf("Finished parsing afp_ldap.conf\n"); if (ldap_config_valid) { if (ldap_auth_method == LDAP_AUTH_NONE) @@ -83,14 +85,14 @@ int main( int argc, char **argv) case 'v': if (! verbose) { verbose = 1; - setuplog("default log_maxdebug /dev/tty"); + setuplog("default:maxdebug", "/dev/tty"); logsetup = 1; } break; case 'u': if (! logsetup) - setuplog("default log_info /dev/tty"); + setuplog("default:info", "/dev/tty"); parse_ldapconf(); printf("Searching user: %s\n", optarg); ret = getuuidfromname( optarg, UUID_USER, uuid); @@ -103,7 +105,7 @@ int main( int argc, char **argv) case 'g': if (! logsetup) - setuplog("default log_info /dev/tty"); + setuplog("default:info", "/dev/tty"); parse_ldapconf(); printf("Searching group: %s\n", optarg); ret = getuuidfromname( optarg, UUID_GROUP, uuid); @@ -116,22 +118,22 @@ int main( int argc, char **argv) case 'i': if (! logsetup) - setuplog("default log_info /dev/tty"); + setuplog("default:info", "/dev/tty"); parse_ldapconf(); printf("Searching uuid: %s\n", optarg); uuid_string2bin(optarg, uuid); 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 {