Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory
cvs-int.fedora.redhat.com:/tmp/cvs-serv3904/ldapserver/ldap/servers/plugins/acl
Modified Files:
acllas.c
Log Message:
Resolves: bug 297221
Bug Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server
Crash
Reviewed by: nhosoi (Thanks!)
Fix Description: The problem was that we were not checking the return value of
slapi_str2filter(). I added a check at the crash site, and it will not print out a
helpful error message. I did a search through the code looking for other similar places
and found a couple. I added similar code in those places.
I added an initialization of a buffer to null, as suggested by nhosoi.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Index: acllas.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acllas.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- acllas.c 18 Oct 2007 00:08:27 -0000 1.8
+++ acllas.c 18 Oct 2007 22:25:13 -0000 1.9
@@ -3027,6 +3027,14 @@
/* Convert the filter string */
f = slapi_str2filter ( ludp->lud_filter );
+ if (f == NULL) { /* bogus filter */
+ slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ "DS_LASUserAttrEval: The member URL search filter in entry [%s] is not valid:
[%s]\n",
+ n_clientdn, ludp->lud_filter);
+ ldap_free_urldesc( ludp );
+ return ACL_FALSE;
+ }
+
rc = ACL_TRUE;
if (0 != slapi_vattr_filter_test ( aclpb->aclpb_pblock,
aclpb->aclpb_client_entry, f, 0 /* no acces chk */ ))
Show replies by date