[dev] Using OpenLDAP for prefs.

Edwin Culp eculp@encontacto.net
Tue, 16 Apr 2002 11:12:00 -0700


Quoting Jon Parise <jon@horde.org>:

| On Tue, Apr 16, 2002 at 10:26:01AM -0700, Edwin Culp wrote:
| 
| > | Deleting an attribute will restore the default, but it won't fix the
| > | problem that it seems impossible to store an empty string in an LDAP
| > | directory.
| > 
| > I'm certainly not an expert on this but I've seen it discussed often 
| > on the OpenLDAP list.  I guess the bottom line is that a non-existent 
| > attribute can serve as the rough equivalent of an empty string, depending
| 
| > of course on the code.
| 
| The only problem with our implementation is that a non-existent
| attribute falls back to the default value, which may not necessarily
| be an empty string.

Jon,

I apologize for not understanding but the only possibilities that I 
can visualize are:

  1. The attribute has not been modified so it isn't dirty and is
     ignored.
  2. The attribute has been modified and has a value which will be
     dirty and happily applied by ldap_modify just as the code is.
  3. The attribute has been modified to an empty value, for what ever
     reason, default or not,  It would then deleted by using
     ldap_mod_del using the original value.

The only change to current code is in number three.  

When rereading the values from the directory, anything that does not 
exist would be the same state as before making an assignation and I 
would think be fine.

I'm sure you are thinking of a specific example that I haven't been
able to visualize.  

Again I apologize for not getting it and for being a bit stubborn,maybe
as well as slow:-).

ed


| 
| > If an empty string is really needed, it can be assigned when reading
| > non-existent attributes from the directory and I would think that in
| > most cases it should work.
|  
| That would prevent the desired "fall back to the default" behavior
| that I mention above.
| 
| -- 
| Jon Parise (jon@csh.rit.edu)  .  Information Technology (2001)
| http://www.csh.rit.edu/~jon/  :  Computer Science House Member
| 
| -- 
| Horde developers mailing list
| Frequently Asked Questions: http://horde.org/faq/
| To unsubscribe, mail: dev-unsubscribe@lists.horde.org
| 

-------------------------------------------------------------
 http://insourcery.com - Mergence of Business and Technology  
          a "Griffin Plaza Partners, LLC" Company