[gq-commit] gq/src formfill.c,1.30,1.31
Status: Beta
Brought to you by:
sur5r
From: <sta...@us...> - 2002-09-26 19:05:24
|
Update of /cvsroot/gqclient/gq/src In directory usw-pr-cvs1:/tmp/cvs-serv14393 Modified Files: formfill.c Log Message: * Fix a bug with Novell eDirectory servers reported by Stephan Duehr <du...@b4...>. That server does not understand the question for the "+" attributes (OpenLDAP's LDAP_ALL_OPERATIONAL_ATTRIBUTES). This totally broke the displaying of entries from such servers. * cosmetic changes Index: formfill.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/formfill.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** formfill.c 13 Jul 2002 16:47:38 -0000 1.30 --- formfill.c 26 Sep 2002 19:05:20 -0000 1.31 *************** *** 174,178 **** struct berval **bervals; char *c = NULL; ! char *attrs[] = { "+", "*", NULL }; formlist = NULL; --- 174,180 ---- struct berval **bervals; char *c = NULL; ! char *attrs[] = { LDAP_ALL_USER_ATTRIBUTES, ! LDAP_ALL_OPERATIONAL_ATTRIBUTES, ! NULL }; formlist = NULL; *************** *** 193,202 **** msg = ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "(objectclass=*)", ! attrs, 0, &res); ! if (msg == LDAP_SERVER_DOWN) { server->server_down++; } ! if(msg != LDAP_SUCCESS) { statusbar_msg(ldap_err2string(msg)); --- 195,204 ---- msg = ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "(objectclass=*)", ! server->hide_internal ? attrs : NULL, 0, &res); ! if (msg == LDAP_SERVER_DOWN) { server->server_down++; } ! if(msg != LDAP_SUCCESS) { statusbar_msg(ldap_err2string(msg)); *************** *** 205,216 **** return(NULL); } ! if (res) { entry = ldap_first_entry(ld, res); if(entry) { char *c; for(attr = ldap_first_attribute(ld, entry, &ber); attr ; attr = ldap_next_attribute(ld, entry, ber)) { - /* filter out some internal attributes... */ --- 207,218 ---- return(NULL); } ! if (res) { entry = ldap_first_entry(ld, res); if(entry) { char *c; + for(attr = ldap_first_attribute(ld, entry, &ber); attr ; attr = ldap_next_attribute(ld, entry, ber)) { /* filter out some internal attributes... */ |