I have just installed 3.0.7 so that I can use "write list" and "force user" together and it panics! I have diagnosed the problem to the line at which it fails, but not yet back to the root cause. The first call to append_attr() in ldapsam_getsampwnam() is being made with new_attr having a value of NULL. This causes strdup(new_attr) to fail. The NULL is being generated by get_auserattr_key2string() which is being called with schema_ver = 1 and key = 41 (LDAP_ATTR_MOD_TIMESTAMP). Before spending time tracking this further I would appreciate it if someone who is familiar with this code could quickly identify the root cause. I am running on Solaris 9. Phil. --------------------------------------- Phil Chambers (postmaster@exeter.ac.uk) University of Exeter
I have now identified the cause and it appears that mods applied pdb_ldap.c did not take ldapsam_compat mode into account. ldapsam_getsampwnam() is trying to get the LDAP_ATTR_MOD_TIMESTAMP attribute from attrib_map_v22 when it is only present in attrib_map_v30. Is ther a quick fix to this bug? Phil. --------------------------------------- Phil Chambers (postmaster@exeter.ac.uk) University of Exeter On Fri, 17 Sep 2004 10:25:11 +0100 (GMT Daylight Time) Philip Chambers <P.A.Chambers@exeter.ac.uk> wrote:> I have just installed 3.0.7 so that I can use "write list" and "force user" together > and it panics! > > I have diagnosed the problem to the line at which it fails, but not yet back to the > root cause. > > The first call to append_attr() in ldapsam_getsampwnam() is being made with new_attr > having a value of NULL. This causes strdup(new_attr) to fail. > > The NULL is being generated by get_auserattr_key2string() which is being called with > schema_ver = 1 and key = 41 (LDAP_ATTR_MOD_TIMESTAMP). > > Before spending time tracking this further I would appreciate it if someone who is > familiar with this code could quickly identify the root cause. > > I am running on Solaris 9. > > Phil.
I have applied a patch which seems to fix this problem, but I do not know the code well enough to know if other areas need dealing with too. The patch is very simple, I put the following line at the start of append_attr(): if(new_attr == NULL) return; Phil. --------------------------------------- Phil Chambers (postmaster@exeter.ac.uk) University of Exeter On Fri, 17 Sep 2004 12:20:06 +0100 (GMT Daylight Time) Philip Chambers <P.A.Chambers@exeter.ac.uk> wrote:> > I have now identified the cause and it appears that mods applied pdb_ldap.c did not > take ldapsam_compat mode into account. ldapsam_getsampwnam() is trying to get the > LDAP_ATTR_MOD_TIMESTAMP attribute from attrib_map_v22 when it is only present in > attrib_map_v30. > > Is ther a quick fix to this bug? > > Phil. > > On Fri, 17 Sep 2004 10:25:11 +0100 (GMT Daylight Time) Philip Chambers > <P.A.Chambers@exeter.ac.uk> wrote: > > > I have just installed 3.0.7 so that I can use "write list" and "force user" together > > and it panics! > > > > I have diagnosed the problem to the line at which it fails, but not yet back to the > > root cause. > > > > The first call to append_attr() in ldapsam_getsampwnam() is being made with new_attr > > having a value of NULL. This causes strdup(new_attr) to fail. > > > > The NULL is being generated by get_auserattr_key2string() which is being called with > > schema_ver = 1 and key = 41 (LDAP_ATTR_MOD_TIMESTAMP). > > > > Before spending time tracking this further I would appreciate it if someone who is > > familiar with this code could quickly identify the root cause. > > > > I am running on Solaris 9. > > > > Phil. > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
On Fri, Sep 17, 2004 at 06:07:50PM +0100, Philip Chambers wrote:> I have applied a patch which seems to fix this problem, but I do not know the code > well enough to know if other areas need dealing with too. > > The patch is very simple, I put the following line at the start of append_attr(): > > if(new_attr == NULL) return;Yes, this is what I already committed into the SVN code. Sorry for the bug, Jeremy.