X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libatalk%2Facl%2Fuuid.c;h=3bf591e5c07148bb00f2b8a6dde15c1df2d36f5a;hb=c53c14bcbe2f2af12fba7c693eb5f4862f6f2b40;hp=fc64c0455f486f8004be22bea32ba12346c4a6b1;hpb=7991e8b9ee61143996c75ce235a7940d399569a6;p=netatalk.git diff --git a/libatalk/acl/uuid.c b/libatalk/acl/uuid.c index fc64c045..3bf591e5 100644 --- a/libatalk/acl/uuid.c +++ b/libatalk/acl/uuid.c @@ -215,7 +215,7 @@ cleanup: * Caller must free name appropiately. */ int getnamefromuuid(const uuidp_t uuidp, char **name, uuidtype_t *type) { - int ret = 0; + int ret; uid_t uid; gid_t gid; struct passwd *pwd; @@ -270,13 +270,16 @@ int getnamefromuuid(const uuidp_t uuidp, char **name, uuidtype_t *type) { #ifdef HAVE_LDAP ret = ldap_getnamefromuuid(uuid_bin2string(uuidp), name, type); +#else + ret = -1; +#endif + if (ret != 0) { - LOG(log_warning, logtype_afpd, "getnamefromuuid(%s): no result from ldap_getnamefromuuid", + LOG(log_debug, logtype_afpd, "getnamefromuuid(%s): not found", uuid_bin2string(uuidp)); add_cachebyuuid(uuidp, "UUID_ENOENT", UUID_ENOENT, 0); return -1; } -#endif add_cachebyuuid(uuidp, *name, *type, 0);