|
|
dc8c34 |
From 3e9a21ae4e41f1680fc899795f272f80c2d9aef9 Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: Mark Reynolds <mreynolds@redhat.com>
|
|
|
dc8c34 |
Date: Tue, 9 Oct 2012 12:59:48 -0400
|
|
|
dc8c34 |
Subject: [PATCH 3/5] Ticket #446 - anonymous limits are being applied to
|
|
|
dc8c34 |
directory manager
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Bug Description: If you set "anonymous limits" they are incorrectly applied
|
|
|
dc8c34 |
to the root DN
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Fix Description: When a connection is first accepted we set the anonymous limits
|
|
|
dc8c34 |
before we process the bind, because there might not be a bind operation.
|
|
|
dc8c34 |
However, we fail to clear out the resouce limits if the bind DN is
|
|
|
dc8c34 |
the root dn.
|
|
|
dc8c34 |
|
|
|
dc8c34 |
https://fedorahosted.org/389/ticket/446
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Reviewed by: richm(Thanks!)
|
|
|
dc8c34 |
(cherry picked from commit 53e16eda8e2a82a45deb39129bbe839beb036c70)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
ldap/servers/slapd/pblock.c | 6 ++++--
|
|
|
dc8c34 |
1 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/ldap/servers/slapd/pblock.c b/ldap/servers/slapd/pblock.c
|
|
|
dc8c34 |
index baee7a7..33559a7 100644
|
|
|
dc8c34 |
--- a/ldap/servers/slapd/pblock.c
|
|
|
dc8c34 |
+++ b/ldap/servers/slapd/pblock.c
|
|
|
dc8c34 |
@@ -3639,7 +3639,7 @@ bind_credentials_set_nolock( Connection *conn, char *authtype, char *normdn,
|
|
|
dc8c34 |
{
|
|
|
dc8c34 |
/* clear credentials */
|
|
|
dc8c34 |
bind_credentials_clear( conn, PR_FALSE /* conn is already locked */,
|
|
|
dc8c34 |
- ( extauthtype != NULL ) /* clear external creds. if requested */ );
|
|
|
dc8c34 |
+ ( extauthtype != NULL ) /* clear external creds. if requested */ );
|
|
|
dc8c34 |
|
|
|
dc8c34 |
/* set primary credentials */
|
|
|
dc8c34 |
slapi_ch_free((void**)&conn->c_authtype);
|
|
|
dc8c34 |
@@ -3657,7 +3657,6 @@ bind_credentials_set_nolock( Connection *conn, char *authtype, char *normdn,
|
|
|
dc8c34 |
conn->c_client_cert = clientcert;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
|
|
|
dc8c34 |
-
|
|
|
dc8c34 |
/* notify binder-based resource limit subsystem about the change in DN */
|
|
|
dc8c34 |
if ( !conn->c_isroot )
|
|
|
dc8c34 |
{
|
|
|
dc8c34 |
@@ -3681,5 +3680,8 @@ bind_credentials_set_nolock( Connection *conn, char *authtype, char *normdn,
|
|
|
dc8c34 |
|
|
|
dc8c34 |
slapi_ch_free_string( &anon_dn );
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
+ } else {
|
|
|
dc8c34 |
+ /* For root dn clear about the resource limits */
|
|
|
dc8c34 |
+ reslimit_update_from_entry( conn, NULL );
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
1.7.7.6
|
|
|
dc8c34 |
|