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)
committerVolker Lendecke <vl@samba.org>
Thu, 10 Jul 2008 08:48:15 +0000 (10:48 +0200)
(This used to be commit 347772fc39d9c7a96fcc72c9707696cc6abd89d7)

source3/passdb/pdb_ldap.c

index 9ce659e818899d029d5ef69db58b3bdb36dd45de..63262406e57a2188988ba1a4a2fbeb98e92f8bbe 100644 (file)
@@ -5003,7 +5003,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);