s3-winbindd: make sure we obey the -n switch also for samlogon cache access.
[samba.git] / source3 / winbindd / winbindd_creds.c
index 6bbd0ffd9d134bd7dc6206d6d3bea2d97ad13a13..a160f7a6b5bb3080759a126d058d82448bc9dc8f 100644 (file)
@@ -38,6 +38,10 @@ NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
        struct netr_SamInfo3 *info;
        NTSTATUS status;
 
+       if (!winbindd_use_cache()) {
+               return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+       }
+
        status = wcache_get_creds(domain, mem_ctx, sid, cached_nt_pass, cred_salt);
        if (!NT_STATUS_IS_OK(status)) {
                return status;