Give a nice error message if trying to join with a non-privileged user
authorVolker Lendecke <vl@samba.org>
Thu, 10 Jul 2008 08:47:46 +0000 (10:47 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 10 Jul 2008 16:48:08 +0000 (09:48 -0700)
source/passdb/pdb_ldap.c

index cf5b72bc7c5f949d5839e0128e086f8d7eab3d26..deed2cebc6a371aa79c34e3036554206a04e852e 100644 (file)
@@ -4973,7 +4973,7 @@ static NTSTATUS ldapsam_create_user(struct pdb_methods *my_methods,
        rc = smbldap_search_suffix(ldap_state->smbldap_state, filter, NULL, &result);
        if (rc != LDAP_SUCCESS) {
                DEBUG(0,("ldapsam_create_user: ldap search failed!\n"));
-               return NT_STATUS_UNSUCCESSFUL;
+               return NT_STATUS_ACCESS_DENIED;
        }
        talloc_autofree_ldapmsg(tmp_ctx, result);