Scenario:
gq1.0-beta1 compiled against OpenLDAP > 2.1.
Right-clicking on an object causes a segfault in
gq_ldap_explode_dn.
Find attached the simple fix (file util.c.patch)
I just tested this patch with current CVS head and I have to
tell you that the current implementation works for me and
that your patch just makes it crash here. Testcase attached.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It can be. I didn't test HEAD code so other changes could
have obsoleted my patch. It was made against released code
and there, it worked nicely. Feel free to put it aside.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> 2. Do you get any warnings from compiling src/util.c?
util.c: In function 'do_ldap_connect':
util.c:126: warning: implicit declaration of function
'ldap_init'
util.c:126: warning: assignment makes pointer from integer
without a cast util.c:182: warning: implicit declaration of
function 'ldap_unbind' util.c:263: warning: implicit
declaration of function 'ldap_simple_bind_s' util.c: In
function 'delete_entry_full':
util.c:714: warning: implicit declaration of function
'ldap_search_s'
util.c:747: warning: implicit declaration of function
'ldap_delete_s'
util.c: In function 'is_leaf_entry':
util.c:1096: warning: implicit declaration of function
'ldap_abandon'
util.c: In function 'get_suffixes':
util.c:1827: warning: implicit declaration of function
'ldap_get_values'
util.c:1827: warning: assignment makes pointer from integer
without a cast util.c:1834: warning: implicit declaration of
function 'ldap_value_free' util.c:1855: warning: assignment
makes pointer from integer without a cast util.c: In
function 'gq_ldap_explode_dn':
util.c:1925: warning: passing argument 2 of 'ldap_str2dn'
from incompatible pointer type
util.c:1940: warning: passing argument 1 of 'ldap_rdn2str'
from incompatible pointer type
> 3. Does the application work for you? (Switch to the
Browse Tab;
> Connect to a server; expand the server node; right
click on any
> DN-Node)
works for me :)
during left click on one DN-node following output on the
terminal for each click
Adding a new patch. OpenLDAP > 2.1 users, please check with
this one again and tell me whether you can find warnings (I
checked this for OpenLDAP 2.1 from Debian).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=369199
Verfied this patch on cygwin on windows XP, works for me!
Logged In: NO
It works right for me too, under Gentoo Linux
Logged In: YES
user_id=76622
Thanks for filing and fixing this particular bug. We're
going to review and apply the patch once the CVS servers get
back into action.
Logged In: YES
user_id=76622
I just tested this patch with current CVS head and I have to
tell you that the current implementation works for me and
that your patch just makes it crash here. Testcase attached.
Logged In: YES
user_id=991379
It can be. I didn't test HEAD code so other changes could
have obsoleted my patch. It was made against released code
and there, it worked nicely. Feel free to put it aside.
Logged In: YES
user_id=76622
Re-opening, as this still appears on some computers.
Logged In: YES
user_id=76622
Renaming the bug to be more obvious.
Proposed patch
Logged In: YES
user_id=76622
Proposed patch.
Logged In: YES
user_id=533692
> 1. Which distribution do you use?
Fedora Core 5
package versions
* openldap-2.3.19-4
* gtk2-2.8.15-1
* glib2-2.10.1-1
> 2. Do you get any warnings from compiling src/util.c?
util.c: In function 'do_ldap_connect':
util.c:126: warning: implicit declaration of function
'ldap_init'
util.c:126: warning: assignment makes pointer from integer
without a cast util.c:182: warning: implicit declaration of
function 'ldap_unbind' util.c:263: warning: implicit
declaration of function 'ldap_simple_bind_s' util.c: In
function 'delete_entry_full':
util.c:714: warning: implicit declaration of function
'ldap_search_s'
util.c:747: warning: implicit declaration of function
'ldap_delete_s'
util.c: In function 'is_leaf_entry':
util.c:1096: warning: implicit declaration of function
'ldap_abandon'
util.c: In function 'get_suffixes':
util.c:1827: warning: implicit declaration of function
'ldap_get_values'
util.c:1827: warning: assignment makes pointer from integer
without a cast util.c:1834: warning: implicit declaration of
function 'ldap_value_free' util.c:1855: warning: assignment
makes pointer from integer without a cast util.c: In
function 'gq_ldap_explode_dn':
util.c:1925: warning: passing argument 2 of 'ldap_str2dn'
from incompatible pointer type
util.c:1940: warning: passing argument 1 of 'ldap_rdn2str'
from incompatible pointer type
> 3. Does the application work for you? (Switch to the
Browse Tab;
> Connect to a server; expand the server node; right
click on any
> DN-Node)
works for me :)
during left click on one DN-node following output on the
terminal for each click
(gq:14697): Gdk-CRITICAL **: gdk_drawable_get_depth:
assertion `GDK_IS_DRAWABLE (drawable)' failed
(gq:14697): Gtk-CRITICAL **: gtk_pixmap_set: assertion
`gdk_colormap_get_visual (gtk_widget_get_colormap
(GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth
(GDK_DRAWABLE (val))' failed
(gq:14697): Gdk-CRITICAL **: gdk_drawable_get_depth:
assertion `GDK_IS_DRAWABLE (drawable)' failed
(gq:14697): Gtk-CRITICAL **: gtk_pixmap_set: assertion
`gdk_colormap_get_visual (gtk_widget_get_colormap
(GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth
(GDK_DRAWABLE (val))' failed
(gq:14697): Gdk-CRITICAL **: gdk_drawable_get_depth:
assertion `GDK_IS_DRAWABLE (drawable)' failed
(gq:14697): Gtk-CRITICAL **: gtk_pixmap_set: assertion
`gdk_colormap_get_visual (gtk_widget_get_colormap
(GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth
(GDK_DRAWABLE (val))' failed
(gq:14697): Gdk-CRITICAL **: gdk_drawable_get_depth:
assertion `GDK_IS_DRAWABLE (drawable)' failed
(gq:14697): Gtk-CRITICAL **: gtk_pixmap_set: assertion
`gdk_colormap_get_visual (gtk_widget_get_colormap
(GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth
(GDK_DRAWABLE (val))' failed
btw: new servers are not saved to the config file. i must
add all server
by hand
/stephan
Proposed patch (second attempt)
Logged In: YES
user_id=76622
Adding a new patch. OpenLDAP > 2.1 users, please check with
this one again and tell me whether you can find warnings (I
checked this for OpenLDAP 2.1 from Debian).
Logged In: YES
user_id=533692
works for me...
no more warnings in src/util.c
Logged In: YES
user_id=76622
Fixed in CVS HEAD:
2006-04-08 Sven Herzberg <herzi@gnome-de.org>
* src/Makefile.am: allow deprecated functions for now
* src/util.c: fix gq_ldap_explode_dn() for both
OpenLDAP 2.1 and 2.2