[Date Prev][Date Next] [Chronological] [Thread] [Top]

ITS#4987 slapo-constraint improvement

In reviewing the patch, I see several small details that need to be fixed. 
E.g., you added a config keyword but re-used an existing OID for your new 
attribute. OIDs must never be re-used, and certainly you must not use two 
different attributes with the same OID.

You use strlen/strncat, which are heavily discouraged in our code. (We never 
use strcat/strncat; we use strlen only when it's unavoidable.) (Some uses of 
strlen already existed in constraint.c; we just didn't get around to 
eliminating them.) In general we use bervals instead of flat strings, and 
there's almost never a reason to count string lengths at runtime.

I got 3 rejects when applying the patch to my source tree (current HEAD).

I think these points can all be cleaned up pretty easily. Let me know if you 
need any particular pointers.
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/