gqclient-commit Mailing List for GQ LDAP client (Page 5)
Status: Beta
Brought to you by:
sur5r
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
(14) |
Jul
(38) |
Aug
(5) |
Sep
(29) |
Oct
(30) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(30) |
Oct
(217) |
Nov
(24) |
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
(53) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sta...@us...> - 2003-10-24 00:29:01
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv18050 Modified Files: util.c Log Message: * Dead code removed Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** util.c 23 Oct 2003 05:46:23 -0000 1.81 --- util.c 23 Oct 2003 05:54:15 -0000 1.82 *************** *** 788,821 **** } - #if 0 - void make_message(char *buffer, int bufsize, - const char *none, const char *one, const char *many, - ...) - { - int cnt; - va_list ap; - - va_start (ap, many); - cnt = va_arg(ap, int); - va_end (ap); - - va_start (ap, many); - - switch(cnt) { - case 0: - vsnprintf(buffer, bufsize, none, ap); - break; - case 1: - vsnprintf(buffer, bufsize, one, ap); - break; - default: - vsnprintf(buffer, bufsize, many, ap); - break; - } - - va_end (ap); - } - #endif - /* * callback for key_press_event on a widget, destroys obj if key was esc --- 788,791 ---- |
From: <sta...@us...> - 2003-10-23 17:44:33
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv15341 Modified Files: prefs.c search.c Log Message: * Obsoleted the "Sort search result" preference setting. Superseeded by the sort-support in the search result itself (via the column headers) Index: prefs.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/prefs.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** prefs.c 23 Oct 2003 05:26:37 -0000 1.49 --- prefs.c 23 Oct 2003 05:31:34 -0000 1.50 *************** *** 1199,1204 **** --- 1199,1206 ---- CONFIG_TOGGLE_BUTTON(config, pw, show_rdn_only); + #if 0 /* Sorting: search mode */ CONFIG_TOGGLE_BUTTON(config, pw, sort_search); + #endif /* Sorting: browse mode */ *************** *** 1645,1649 **** GtkWidget *stframe, *vbox_st, *viewframe, *vbox_view; GtkWidget *stradiobutton, *dnbutton; /* , *ocbutton; */ ! GtkWidget *hbox_options, *sort_search_button; GSList *stgroup; --- 1647,1652 ---- GtkWidget *stframe, *vbox_st, *viewframe, *vbox_view; GtkWidget *stradiobutton, *dnbutton; /* , *ocbutton; */ ! GtkWidget *hbox_options; ! /* , *sort_search_button; */ GSList *stgroup; *************** *** 1763,1766 **** --- 1766,1770 ---- #endif + #if 0 /* Sort in search mode button */ sort_search_button = gq_check_button_new_with_label(_("Sort _results")); *************** *** 1773,1776 **** --- 1777,1781 ---- gtk_widget_show(sort_search_button); gtk_box_pack_start(GTK_BOX(vbox_view), sort_search_button, FALSE, TRUE, 5); + #endif } Index: search.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.c,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** search.c 21 Oct 2003 04:59:18 -0000 1.57 --- search.c 23 Oct 2003 05:31:34 -0000 1.58 *************** *** 1621,1627 **** #if 0 /* too many performance problems */ if (row % 16 == 0) { ! if(config->sort_search) { ! gtk_clist_sort(GTK_CLIST(new_main_clist)); ! } gtk_clist_thaw(GTK_CLIST(new_main_clist)); gtk_clist_freeze(GTK_CLIST(new_main_clist)); --- 1621,1627 ---- #if 0 /* too many performance problems */ if (row % 16 == 0) { ! /* if(config->sort_search) { */ ! /* gtk_clist_sort(GTK_CLIST(new_main_clist)); */ ! /* } */ gtk_clist_thaw(GTK_CLIST(new_main_clist)); gtk_clist_freeze(GTK_CLIST(new_main_clist)); *************** *** 1670,1674 **** free(filter); ! if(config->sort_search) { gtk_clist_set_sort_column(GTK_CLIST(new_main_clist), 0); --- 1670,1675 ---- free(filter); ! #if 0 ! /* obsolete */ if(config->sort_search) { gtk_clist_set_sort_column(GTK_CLIST(new_main_clist), 0); *************** *** 1677,1681 **** gtk_clist_sort(GTK_CLIST(new_main_clist)); } ! for(i = 0; i < MAX_NUM_ATTRIBUTES; i++) { g_string_free(tolist[i], TRUE); --- 1678,1682 ---- gtk_clist_sort(GTK_CLIST(new_main_clist)); } ! #endif for(i = 0; i < MAX_NUM_ATTRIBUTES; i++) { g_string_free(tolist[i], TRUE); |
From: <sta...@us...> - 2003-10-23 14:08:37
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv4571 Modified Files: TODO Log Message: * Updated TODOs, only two 1.0 issues are still open, but new items may still appear. Index: TODO =================================================================== RCS file: /cvsroot/gqclient/gq/TODO,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** TODO 21 Oct 2003 06:34:33 -0000 1.41 --- TODO 23 Oct 2003 11:24:46 -0000 1.42 *************** *** 10,17 **** ---------------- ! * [1.0] SECURITY: Think about the extended referred-to server authentication ! tests in get_referral_server and the security implications (configurable?) ! * [1.0] Search-Mode: Get rid of sortdn - implement through search options * [1.x] Allow to use a "master password" for passwords stored in the --- 10,20 ---- ---------------- ! * [1.0] Make ALL LDAP operations referral-safe (that is, change all ldap_* to ! ldap_*_ext and set ManageDSAit iff necessary) ! - Done for ldap_search ! * [1.0] SASL / GSSAPI support is badly broken right now (it seems) - ! there are several bug reports pending. If this cannot be done for ! 1.0 it will be marked as BROKEN in the GUI * [1.x] Allow to use a "master password" for passwords stored in the *************** *** 20,29 **** once it becomes available in mainstream distros. - * [1.0] Re-introduce the Export to LDIF functionality for servers - - * [1.0] SASL / GSSAPI support is badly broken right now (it seems) - - there are several bug reports pending. If this cannot be done for - 1.0 it will be marked as BROKEN in the GUI - * update schemabrowse tree on serverlist update (browsetree already done) --- 23,26 ---- *************** *** 79,84 **** an extensibleObject - * [1.x] Split browse.c into several files - it is > 2500 lines long now - ------------ ENHANCEMENTS --- 76,79 ---- *************** *** 145,148 **** --- 140,157 ---- FIXED BUGS / IMPLEMENTED ENHANCEMENTS ------------------------------------- + + * [1.0] Re-introduce the Export to LDIF functionality for servers + - done for servers and referrals alike + + * [1.x] Split browse.c into several files - it is > 2500 lines long now + + * [1.0] SECURITY: Think about the extended referred-to server authentication + tests in get_referral_server and the security implications (configurable?) + - Implemented through the addition of yet another preferences tab + + * [1.0] Search-Mode: Get rid of sortdn - implement through search options + + * [1.0] Drag'n'Drop: Avoid unnecessary refreshes of temporary objects + in the right pane. * [1.x] improve gtk2 support - Quite impressive by now. |
From: <sta...@us...> - 2003-10-23 07:18:46
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv14562 Modified Files: configfile.c configfile.h gq-xml.c prefs.c util.c Log Message: * SECURITY: The clever guessing of binddn and password when following referrals can now be turned off (Had to introduce another preferences tab: Security) Index: configfile.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/configfile.c,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** configfile.c 18 Oct 2003 08:26:59 -0000 1.46 --- configfile.c 23 Oct 2003 05:26:37 -0000 1.47 *************** *** 591,594 **** --- 591,596 ---- config_write_bool(wc, cfg->restore_tabs, "restore-tabs", NULL); + config_write_bool(wc, cfg->never_leak_credentials, + "never-leak-credentials", NULL); config_write_string(wc, detokenize(token_ldifformat, cfg->ldifformat), *************** *** 770,773 **** --- 772,777 ---- cfg->restore_search_history = DEFAULT_RESTORE_SEARCHES; cfg->restore_tabs = DEFAULT_RESTORE_TABS; + + cfg->never_leak_credentials = DEFAULT_NEVER_LEAK_CREDENTIALS; return cfg; Index: configfile.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/configfile.h,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** configfile.h 20 Oct 2003 08:22:49 -0000 1.33 --- configfile.h 23 Oct 2003 05:26:37 -0000 1.34 *************** *** 68,71 **** --- 68,75 ---- #define DEFAULT_RESTORE_TABS 0 + /* SECURITY: The default is to NOT blindly reuse LDAP credentials for + referrals */ + #define DEFAULT_NEVER_LEAK_CREDENTIALS 1 + /* The following do not _really_ belong in here right now... */ /* LDAP Timeout in seconds */ *************** *** 107,110 **** --- 111,116 ---- int restore_search_history; int restore_tabs; + + int never_leak_credentials; GHashTable *defaultDT; Index: gq-xml.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/gq-xml.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gq-xml.c 18 Oct 2003 08:26:59 -0000 1.8 --- gq-xml.c 23 Oct 2003 05:26:37 -0000 1.9 *************** *** 229,232 **** --- 229,241 ---- } + static void never_leak_credentialsE(struct parser_context *ctx, + struct tagstack_entry *e) + { + struct gq_config *c = peek_tag(ctx->stack, 1)->data; + + int b = booleanCDATA(ctx, e); + if (b >= 0) c->never_leak_credentials = b; + } + static void ldif_formatE(struct parser_context *ctx, struct tagstack_entry *e) *************** *** 652,655 **** --- 661,669 ---- "restore-tabs", 0, NULL, restore_tabsE, + { "gq-config", NULL }, + }, + { + "never-leak-credentials", 0, + NULL, never_leak_credentialsE, { "gq-config", NULL }, }, Index: prefs.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/prefs.c,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** prefs.c 21 Oct 2003 04:51:06 -0000 1.48 --- prefs.c 23 Oct 2003 05:26:37 -0000 1.49 *************** *** 85,88 **** --- 85,91 ---- /* servers tab */ GtkWidget *serverstab_server_clist; + + /* security */ + GtkWidget *never_leak_credentials; }; *************** *** 119,122 **** --- 122,126 ---- struct server_windata *sw); static void create_guitab(GtkWidget *target, struct prefs_windata *); + static void create_security_tab(GtkWidget *target, struct prefs_windata *); static void template_new_callback(GtkWidget *widget, struct prefs_windata *); *************** *** 1214,1217 **** --- 1218,1224 ---- CONFIG_TOGGLE_BUTTON(config, pw, restore_tabs); + /* never_leak_credentials */ + CONFIG_TOGGLE_BUTTON(config, pw, never_leak_credentials); + /* LDIF: format */ for(type = 0; type < sizeof(pw->ldif_format)/sizeof(pw->ldif_format[0]); *************** *** 1248,1251 **** --- 1255,1259 ---- GtkWidget *vbox_search_options, *vbox_browse_options; GtkWidget *vbox_servers, *vbox_templates, *vbox_ldif, *vbox_gui; + GtkWidget *vbox_sec; GtkWidget *hbox_buttons, *okbutton, *cancelbutton; *************** *** 1362,1365 **** --- 1370,1382 ---- gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_gui, label); + /* Security tab */ + vbox_sec = gtk_vbox_new(FALSE, 0); + gtk_container_border_width(GTK_CONTAINER(vbox_sec), + CONTAINER_BORDER_WIDTH); + create_security_tab(vbox_sec, pw); + gtk_widget_show(vbox_sec); + label = gq_label_new(_("Securit_y")); + gtk_widget_show(label); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_sec, label); /* OK and Cancel buttons outside notebook */ *************** *** 1952,1955 **** --- 1969,2010 ---- } + + static void create_security_tab(GtkWidget *target, struct prefs_windata *pw) + { + GtkWidget *frame; + GtkWidget *vbox1, *button; + GtkTooltips *tips; + + tips = gtk_tooltips_new(); + + /* Persistency frame */ + frame = gtk_frame_new(_("Security")); + gtk_widget_show(frame); + gtk_box_pack_start(GTK_BOX(target), frame, FALSE, TRUE, 5); + + vbox1 = gtk_vbox_new(FALSE, 0); + gtk_container_border_width(GTK_CONTAINER(vbox1), + CONTAINER_BORDER_WIDTH); + gtk_container_add(GTK_CONTAINER(frame), vbox1); + gtk_widget_show(vbox1); + + /* Restore Window Sizes checkbox */ + button = gq_check_button_new_with_label(_("_Never leak credentials")); + pw->never_leak_credentials = button; + + if(config->never_leak_credentials) + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), TRUE); + #ifdef OLD_FOCUS_HANDLING + GTK_WIDGET_UNSET_FLAGS(GTK_CHECK_BUTTON(button), GTK_CAN_FOCUS); + #endif + gtk_widget_show(button); + gtk_box_pack_start(GTK_BOX(vbox1), button, FALSE, TRUE, 5); + + gtk_tooltips_set_tip(tips, button, + _("Turn off if you want to use heuristics to find the credentials needed to follow referrals. The problems with these heuristics is that they may leak credential information: If you follow a referral to some untrusted server, then your currently used credentials might get sent to this untrusted server. This might allow an attacker to sniff credentials during transit to or on the untrusted server. If turned on, a referral will always use an anonymous bind."), + S_("tooltip|") + ); + + } Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** util.c 21 Oct 2003 21:01:02 -0000 1.79 --- util.c 23 Oct 2003 05:26:37 -0000 1.80 *************** *** 374,405 **** newserver = new_ldapserver(); ! copy_ldapserver(newserver, parent); ! ! g_free_and_dup(newserver->name, new_uri->str); ! g_free_and_dup(newserver->ldaphost, new_uri->str); ! g_free_and_dup(newserver->basedn, desc->lud_dn); ! ! /* some sensible settings for the "usual" case: ! Anonymous bind. Also show referrals */ ! newserver->ask_pw = 0; ! newserver->show_ref = 1; ! newserver->quiet = 1; ! ! if (open_connection_ex(newserver, &ld_err)) { ! close_connection(newserver, FALSE); ! ! statusbar_msg(_("Initialized temporary server-definition '%1$s' from existing server '%2$s'"), new_uri->str, parent->name); ! ! goto done; ! } ! if (ld_err == LDAP_SERVER_DOWN) { ! goto done; ! } ! ! /* check: do we have this server around already??? */ ! s = server_by_canon_name(new_uri->str, TRUE); ! ! if (s) { ! copy_ldapserver(newserver, s); g_free_and_dup(newserver->name, new_uri->str); --- 374,379 ---- newserver = new_ldapserver(); ! if (! config->never_leak_credentials) { ! copy_ldapserver(newserver, parent); g_free_and_dup(newserver->name, new_uri->str); *************** *** 415,423 **** if (open_connection_ex(newserver, &ld_err)) { close_connection(newserver, FALSE); ! statusbar_msg(_("Initialized temporary server-definition '%1$s' from existing server '%2$s'"), new_uri->str, s->name); goto done; } if (ld_err == LDAP_SERVER_DOWN) { goto done; } } --- 389,425 ---- if (open_connection_ex(newserver, &ld_err)) { close_connection(newserver, FALSE); ! ! statusbar_msg(_("Initialized temporary server-definition '%1$s' from existing server '%2$s'"), new_uri->str, parent->name); ! goto done; } if (ld_err == LDAP_SERVER_DOWN) { goto done; + } + + /* check: do we have this server around already??? */ + s = server_by_canon_name(new_uri->str, TRUE); + + if (s) { + copy_ldapserver(newserver, s); + + g_free_and_dup(newserver->name, new_uri->str); + g_free_and_dup(newserver->ldaphost, new_uri->str); + g_free_and_dup(newserver->basedn, desc->lud_dn); + + /* some sensible settings for the "usual" case: + Anonymous bind. Also show referrals */ + newserver->ask_pw = 0; + newserver->show_ref = 1; + newserver->quiet = 1; + + if (open_connection_ex(newserver, &ld_err)) { + close_connection(newserver, FALSE); + statusbar_msg(_("Initialized temporary server-definition '%1$s' from existing server '%2$s'"), new_uri->str, s->name); + goto done; + } + if (ld_err == LDAP_SERVER_DOWN) { + goto done; + } } } |
From: <sta...@us...> - 2003-10-23 06:34:52
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv17961 Modified Files: input.c Log Message: * Usability: the attribute popup-menu in the entry-browser now pops up on a larger area Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** input.c 23 Oct 2003 05:46:23 -0000 1.74 --- input.c 23 Oct 2003 05:53:24 -0000 1.75 *************** *** 760,764 **** gtk_table_attach(GTK_TABLE(iform->table), ff->event_box, 0, 1, row, row + 1, ! /* GTK_FILL| */ GTK_SHRINK, GTK_FILL|GTK_EXPAND, 0, 0); --- 760,764 ---- gtk_table_attach(GTK_TABLE(iform->table), ff->event_box, 0, 1, row, row + 1, ! /* GTK_FILL| */ GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0); |
From: <sta...@us...> - 2003-10-23 06:03:16
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv13522 Modified Files: Makefile.am dn-browse.c ref-browse.c server-browse.c Added Files: browse-export.c browse-export.h Log Message: * TODO item implemented: Re-introduce Export to LDIF functionality for servers --- NEW FILE: browse-export.c --- /* GQ -- a GTK-based LDAP client Copyright (C) 1998-2003 Bert Vermeulen Parts: Copyright (C) 2002-2003 Peter Stamfest <pe...@st...> This program is released under the Gnu General Public License with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: browse-export.c,v 1.1 2003/10/23 05:18:36 stamfest Exp $ */ #include <glib.h> #include <gtk/gtk.h> #include <string.h> #include <errno.h> /* errno */ #include <stdio.h> /* FILE */ #include <stdlib.h> /* free - MUST get rid of malloc/free */ #include "config.h" #include "common.h" #include "dn-browse.h" #include "ref-browse.h" #include "input.h" /* new_from_entry */ #include "search.h" /* fill_out_search */ #include "template.h" /* struct gq_template */ #include "formfill.h" /* formlist_from_entry */ #include "tinput.h" /* formfill_from_template */ #include "browse-dnd.h" /* copy_entry et al */ #include "configfile.h" /* config */ #include "errorchain.h" #include "util.h" #include "encode.h" #include "i18n.h" #include "utf8-compat.h" #include "ldif.h" struct export { struct ldapserver *server; GList *bases; GtkWidget *filesel; }; static struct export *new_export() { struct export *ex = g_malloc0(sizeof(struct export)); return ex; } static void free_export(struct export *ex) { if (ex) { g_list_foreach(ex->bases, (GFunc) g_free, NULL); g_list_free(ex->bases); ex->bases = NULL; ldapserver_unref(ex->server); ex->server = NULL; g_free(ex); } } static void dump_subtree_ok_callback(struct export *ex) { LDAPMessage *res = NULL, *e; LDAP *ld = NULL; GList *I; int num_entries; const char *filename; FILE *outfile = NULL; GString *out = NULL; GString *gmessage = NULL; /* GString *bigmessage = NULL; */ int written; int ctx; out = g_string_sized_new(2048); /* if (IS_SERVER_ENTRY(entry)) { */ /* bases = get_suffixes(((server_browse_entry *)entry)->server); */ /* } else { */ /* bases = g_list_append(bases, */ /* strdup(((dn_browse_entry *)entry)->dn)); */ /* } */ ctx = error_new_context(_("Dump subtree")); if(g_list_length(ex->bases) == 0) { error_push(ctx, _("Nothing to dump!")); goto fail; } set_busycursor(); /* obtain filename and open file for reading */ filename = gtk_file_selection_get_filename(GTK_FILE_SELECTION(ex->filesel)); if( (outfile = fopen(filename, "w")) == NULL) { error_push(ctx, _("Could not open output file '%1$s': %2$s"), filename, strerror(errno)); goto fail; /* error_popup(_("Save failed"), strerror(errno)); */ } else { /* AFAIK, the UMich LDIF format doesn't take comments or a version string */ if (config->ldifformat != LDIF_UMICH) { g_string_truncate(out, 0); prepend_ldif_header(out, ex->server, ex->bases); written = fwrite(out->str, 1, out->len, outfile); if(written != out->len) { error_push(ctx, _("Save to '%3$s' failed: Only %1$d of %2$d bytes written"), written, out->len, filename); goto fail; /* sometimes goto is useful */ } } if( (ld = open_connection(ex->server)) == NULL) { /* no extra error, open_connection does error reporting itself... */ goto fail; } num_entries = 0; gmessage = g_string_sized_new(256); for (I = g_list_first(ex->bases) ; I ; I = g_list_next(I)) { LDAPControl ct; LDAPControl *ctrls[2] = { NULL, NULL } ; char *attrs[] = { LDAP_ALL_USER_ATTRIBUTES, "ref", NULL }; int rc; ct.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; ct.ldctl_value.bv_val = NULL; ct.ldctl_value.bv_len = 0; ct.ldctl_iscritical = 1; ctrls[0] = &ct; statusbar_msg(_("Subtree search on %s"), (char *) I->data); rc = ldap_search_ext_s(ld, (char *) I->data, LDAP_SCOPE_SUBTREE, "(objectClass=*)", attrs, 0, ctrls, /* serverctrls */ NULL, /* clientctrls */ NULL, /* timeout */ LDAP_NO_LIMIT, /* sizelimit */ &res); if (rc == LDAP_SUCCESS) { for(e = ldap_first_entry(ld, res); e; e = ldap_next_entry(ld, e)) { g_string_truncate(out, 0); ldif_entry_out(out, ld, e, ctx); num_entries++; written = fwrite(out->str, 1, out->len, outfile); if(written != out->len) { g_string_sprintf(gmessage, _("%1$d of %2$d bytes written"), written, out->len); error_popup(_("Save failed"), gmessage->str); ldap_msgfree(res); close_connection(ex->server, FALSE); goto fail; } } ldap_msgfree(res); } else if (rc == LDAP_SERVER_DOWN) { ex->server->server_down++; error_push(ctx, _("Server '%s' down. Export may be incomplete!"), ex->server->name); push_ldap_addl_error(ld, ctx); goto fail; } else { /* report error */ error_push(ctx, _("LDAP error while searching below '%s'." " Export may be incomplete!"), (char *) I->data); push_ldap_addl_error(ld, ctx); goto fail; } } statusbar_msg(ngettext("One entry exported to %2$s", "%1$d entries exported to %2$s", num_entries), num_entries, filename); } fail: /* labels are only good for cleaning up, really */ if (outfile) fclose(outfile); set_normalcursor(); if (out) g_string_free(out, TRUE); if (gmessage) g_string_free(gmessage, TRUE); if (ld) close_connection(ex->server, FALSE); gtk_widget_destroy(ex->filesel); error_flush(ctx); } void export_many(GtkWidget *transient_for, GList *bases, struct ldapserver *server) { GtkWidget *filesel; struct export *ex = new_export(); filesel = gtk_file_selection_new(_("Save LDIF")); ex->server = server; ldapserver_ref(server); ex->bases = bases; ex->filesel = filesel; gtk_object_set_data_full(GTK_OBJECT(filesel), "export", ex, (GtkDestroyNotify) free_export); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), "clicked", (GtkSignalFunc) dump_subtree_ok_callback, ex); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), "clicked", (GtkSignalFunc) gtk_widget_destroy, GTK_OBJECT(filesel)); gtk_signal_connect_object(GTK_OBJECT(filesel), "key_press_event", (GtkSignalFunc) close_on_esc, (gpointer) filesel); gtk_widget_show(filesel); } /* Local Variables: c-basic-offset: 5 End: */ --- NEW FILE: browse-export.h --- /* GQ -- a GTK-based LDAP client Copyright (C) 1998-2003 Bert Vermeulen Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: browse-export.h,v 1.1 2003/10/23 05:18:36 stamfest Exp $ */ #ifndef GQ_BROWSE_EXPORT_H_INCLUDED #define GQ_BROWSE_EXPORT_H_INCLUDED #include <glib.h> /* GList */ #include <gtk/gtk.h> /* GtkWidget */ #include "config.h" #include "common.h" /* struct ldapserver */ void export_many(GtkWidget *widget, GList *bases, struct ldapserver *server); #endif /* Local Variables: c-basic-offset: 5 End: */ Index: Makefile.am =================================================================== RCS file: /cvsroot/gqclient/gq/src/Makefile.am,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Makefile.am 21 Oct 2003 04:46:41 -0000 1.31 --- Makefile.am 23 Oct 2003 05:18:36 -0000 1.32 *************** *** 36,39 **** --- 36,40 ---- server-browse.c \ ref-browse.c \ + browse-export.c \ schema.c \ schemabrowse.c \ *************** *** 85,88 **** --- 86,90 ---- server-browse.h \ ref-browse.h \ + browse-export.h \ schema.h \ schemabrowse.h \ Index: dn-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dn-browse.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dn-browse.c 19 Oct 2003 12:08:58 -0000 1.4 --- dn-browse.c 23 Oct 2003 05:18:36 -0000 1.5 *************** *** 2,6 **** GQ -- a GTK-based LDAP client Copyright (C) 1998-2003 Bert Vermeulen ! Parts: Copyright (C) 2002-2003 Peter Stamfest <pe...@st...> This program is released under the Gnu General Public License with --- 2,6 ---- GQ -- a GTK-based LDAP client Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest <pe...@st...> This program is released under the Gnu General Public License with *************** *** 55,59 **** #include "utf8-compat.h" ! #include "ldif.h" static void tree_row_search_below(GtkMenuItem *menuitem, struct tab *tab) --- 55,59 ---- #include "utf8-compat.h" ! #include "browse-export.h" static void tree_row_search_below(GtkMenuItem *menuitem, struct tab *tab) *************** *** 186,404 **** } - static void dump_subtree_ok_callback(GtkWidget *button, GtkWidget *filesel) - { - - LDAPMessage *res = NULL, *e; - LDAP *ld = NULL; - GList *bases, *I; - struct ldapserver *server; - browse_entry *entry; - int msg, num_entries; - const char *filename; - FILE *outfile = NULL; - GString *out = NULL; - GString *gmessage = NULL; - /* GString *bigmessage = NULL; */ - int written; - int ctx; - - entry = gtk_object_get_data(GTK_OBJECT(filesel), "entry"); - server = gtk_object_get_data(GTK_OBJECT(filesel), "server"); - - out = g_string_sized_new(2048); - - bases = NULL; - - /* if (IS_SERVER_ENTRY(entry)) { */ - /* bases = get_suffixes(((server_browse_entry *)entry)->server); */ - /* } else { */ - bases = g_list_append(bases, - strdup(((dn_browse_entry *)entry)->dn)); - /* } */ - - ctx = error_new_context(_("Dump subtree")); - - if(g_list_length(bases) == 0) { - error_push(ctx, _("Nothing to dump!")); - goto fail; - } - - set_busycursor(); - - /* obtain filename and open file for reading */ - filename = gtk_file_selection_get_filename(GTK_FILE_SELECTION(filesel)); - - if( (outfile = fopen(filename, "w")) == NULL) { - error_push(ctx, _("Could not open output file '%1$s': %2$s"), - filename, strerror(errno)); - - goto fail; - /* error_popup(_("Save failed"), strerror(errno)); */ - } else { - /* AFAIK, the UMich LDIF format doesn't take comments or a - version string */ - if (config->ldifformat != LDIF_UMICH) { - g_string_truncate(out, 0); - - prepend_ldif_header(out, server, bases); - - written = fwrite(out->str, 1, out->len, outfile); - if(written != out->len) { - error_push(ctx, - _("Save to '%3$s' failed: Only %1$d of %2$d bytes written"), - written, out->len, filename); - goto fail; /* sometimes goto is useful */ - } - } - - if( (ld = open_connection(server)) == NULL) { - /* no extra error, open_connection does error reporting - itself... */ - goto fail; - } - - num_entries = 0; - gmessage = g_string_sized_new(256); - for (I = g_list_first(bases) ; I ; I = g_list_next(I)) { - LDAPControl ct; - LDAPControl *ctrls[2] = { NULL, NULL } ; - int rc; - - statusbar_msg(_("Subtree search on %s"), (char *) I->data); - - msg = ldap_search_s(ld, (char *) I->data, LDAP_SCOPE_SUBTREE, - "(objectclass=*)", NULL, 0, &res); - - ct.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; - ct.ldctl_value.bv_val = NULL; - ct.ldctl_value.bv_len = 0; - ct.ldctl_iscritical = 1; - - ctrls[0] = &ct; - - rc = ldap_search_ext(ld, (char *) I->data, - LDAP_SCOPE_SUBTREE, - "(objectClass=*)", NULL, 0, - ctrls, /* serverctrls */ - NULL, /* clientctrls */ - NULL, /* timeout */ - LDAP_NO_LIMIT, /* sizelimit */ - &msg); - - - if (rc != -1) { - rc = ldap_result(ld, msg, 1, NULL, &res); - } - - if (rc != -1) { - for(e = ldap_first_entry(ld, res); e; e = ldap_next_entry(ld, e)) { - g_string_truncate(out, 0); - ldif_entry_out(out, ld, e, ctx); - num_entries++; - - written = fwrite(out->str, 1, out->len, outfile); - if(written != out->len) { - g_string_sprintf(gmessage, - _("%1$d of %2$d bytes written"), - written, out->len); - error_popup(_("Save failed"), gmessage->str); - - ldap_msgfree(res); - close_connection(server, FALSE); - goto fail; - } - - } - ldap_msgfree(res); - rc = LDAP_SUCCESS; - } else { - rc = ldap_result2error(ld, res, TRUE); - if (msg == LDAP_SERVER_DOWN) { - server->server_down++; - - error_push(ctx, - _("Server '%s' down. Export may be incomplete!"), - server->name); - push_ldap_addl_error(ld, ctx); - goto fail; - } else { - /* report error */ - error_push(ctx, - _("LDAP error while searching below '%s'." - " Export may be incomplete!"), - (char *) I->data); - push_ldap_addl_error(ld, ctx); - goto fail; - } - } - } - - statusbar_msg(ngettext("One entry exported to %2$s", - "%1$d entries exported to %2$s", num_entries), - num_entries, filename); - } - - fail: /* labels are only good for cleaning up, really */ - if (outfile) fclose(outfile); - - if (bases) { - for (I = g_list_first(bases) ; I ; I = g_list_next(I)) { - free(I->data); - } - g_list_free(bases); - } - - set_normalcursor(); - if (out) g_string_free(out, TRUE); - if (gmessage) g_string_free(gmessage, TRUE); - if (ld) close_connection(server, FALSE); - - gtk_widget_destroy(filesel); - - error_flush(ctx); - } - static void dump_subtree(GtkWidget *widget, struct tab *tab) { - GtkWidget *filesel; - GtkCTree *ctree; ! GtkCTreeNode *ctree_node; ! ! browse_entry *entry; struct ldapserver *server; ctree = BROWSETAB(tab)->ctreeroot; ! ctree_node = BROWSETAB(tab)->selected_ctree_node; ! ! entry = (browse_entry *) gtk_ctree_node_get_row_data(ctree, ctree_node); ! if (entry == NULL) ! return; ! ! if ((server = server_from_node(ctree, ctree_node)) == NULL) ! return; ! filesel = gtk_file_selection_new(_("Save LDIF")); ! gtk_object_set_data_full(GTK_OBJECT(filesel), "server", ! server, (GtkDestroyNotify) ldapserver_unref); ! ldapserver_ref(server); ! gtk_object_set_data(GTK_OBJECT(filesel), "entry", entry); ! gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->ok_button), ! "clicked", ! (GtkSignalFunc) dump_subtree_ok_callback, ! filesel); ! gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), ! "clicked", ! (GtkSignalFunc) gtk_widget_destroy, ! GTK_OBJECT(filesel)); ! gtk_signal_connect_object(GTK_OBJECT(filesel), "key_press_event", ! (GtkSignalFunc) close_on_esc, ! (gpointer) filesel); ! gtk_widget_show(filesel); } - static void delete_browse_entry(GtkWidget *widget, struct tab *tab) --- 186,213 ---- } static void dump_subtree(GtkWidget *widget, struct tab *tab) { GtkCTree *ctree; ! GtkCTreeNode *node; ! browse_entry *e; struct ldapserver *server; + GList *bases = NULL; ctree = BROWSETAB(tab)->ctreeroot; ! node = BROWSETAB(tab)->tree_row_popped_up; ! e = (browse_entry *) gtk_ctree_node_get_row_data(ctree, node); ! assert(IS_DN_ENTRY(e)); ! server = server_from_node(ctree, node); ! if (e == NULL || server == NULL) ! return; + bases = g_list_append(bases, + g_strdup(((dn_browse_entry *)e)->dn)); + + export_many(tab->win->mainwin, bases, server); } static void delete_browse_entry(GtkWidget *widget, struct tab *tab) Index: ref-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/ref-browse.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ref-browse.c 20 Oct 2003 08:26:55 -0000 1.5 --- ref-browse.c 23 Oct 2003 05:18:36 -0000 1.6 *************** *** 48,51 **** --- 48,52 ---- #include "errorchain.h" #include "encode.h" + #include "browse-export.h" /**************************************************************************/ *************** *** 370,374 **** } ! /* popup method for BOTH server AND ref entries (the same for now...) */ static void ref_browse_entry_popup(dn_browse_entry *entry, GtkWidget *menu, --- 371,399 ---- } ! static void dump_ref(GtkWidget *widget, struct tab *tab) ! { ! GtkCTree *ctree; ! GtkCTreeNode *node; ! browse_entry *e; ! struct ldapserver *server; ! GList *bases = NULL; ! ! ctree = BROWSETAB(tab)->ctreeroot; ! node = BROWSETAB(tab)->tree_row_popped_up; ! e = (browse_entry *) gtk_ctree_node_get_row_data(ctree, node); ! ! assert(IS_REF_ENTRY(e)); ! ! server = server_from_node(ctree, node); ! ! if (e == NULL || server == NULL) ! return; ! ! bases = get_suffixes(((ref_browse_entry *)e)->server); ! ! export_many(tab->win->mainwin, bases, server); ! } ! ! static void ref_browse_entry_popup(dn_browse_entry *entry, GtkWidget *menu, *************** *** 426,438 **** } /* Close connection */ menu_item = gtk_menu_item_new_with_label(_("Close Connection")); gtk_menu_append(GTK_MENU(menu), menu_item); - gtk_widget_show(menu_item); - gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(tree_row_close_connection), (gpointer) tab); - gtk_widget_show(menu_item); --- 451,468 ---- } + /* Export to LDIF */ + menu_item = gtk_menu_item_new_with_label(_("Export to LDIF")); + gtk_menu_append(GTK_MENU(menu), menu_item); + gtk_signal_connect(GTK_OBJECT(menu_item), "activate", + GTK_SIGNAL_FUNC(dump_ref), + (gpointer) tab); + gtk_widget_show(menu_item); + /* Close connection */ menu_item = gtk_menu_item_new_with_label(_("Close Connection")); gtk_menu_append(GTK_MENU(menu), menu_item); gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(tree_row_close_connection), (gpointer) tab); gtk_widget_show(menu_item); Index: server-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/server-browse.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** server-browse.c 19 Oct 2003 12:01:32 -0000 1.3 --- server-browse.c 23 Oct 2003 05:18:36 -0000 1.4 *************** *** 40,43 **** --- 40,44 ---- #include "util.h" /* get_suffixes */ + #include "browse-export.h" #include "i18n.h" *************** *** 511,515 **** } ! /* popup method for BOTH server AND ref entries (the same for now...) */ static void server_browse_entry_popup(dn_browse_entry *entry, GtkWidget *menu, --- 512,539 ---- } ! static void dump_server(GtkWidget *widget, struct tab *tab) ! { ! GtkCTree *ctree; ! GtkCTreeNode *node; ! browse_entry *e; ! struct ldapserver *server; ! GList *bases = NULL; ! ! ctree = BROWSETAB(tab)->ctreeroot; ! node = BROWSETAB(tab)->tree_row_popped_up; ! e = (browse_entry *) gtk_ctree_node_get_row_data(ctree, node); ! ! assert(IS_SERVER_ENTRY(e)); ! ! server = server_from_node(ctree, node); ! ! if (e == NULL || server == NULL) ! return; ! ! bases = get_suffixes(((server_browse_entry *)e)->server); ! ! export_many(tab->win->mainwin, bases, server); ! } ! static void server_browse_entry_popup(dn_browse_entry *entry, GtkWidget *menu, *************** *** 552,564 **** } /* Close connection */ menu_item = gtk_menu_item_new_with_label(_("Close Connection")); gtk_menu_append(GTK_MENU(menu), menu_item); - gtk_widget_show(menu_item); - gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(tree_row_close_connection), (gpointer) tab); - gtk_widget_show(menu_item); --- 576,593 ---- } + /* Export to LDIF */ + menu_item = gtk_menu_item_new_with_label(_("Export to LDIF")); + gtk_menu_append(GTK_MENU(menu), menu_item); + gtk_signal_connect(GTK_OBJECT(menu_item), "activate", + GTK_SIGNAL_FUNC(dump_server), + (gpointer) tab); + gtk_widget_show(menu_item); + /* Close connection */ menu_item = gtk_menu_item_new_with_label(_("Close Connection")); gtk_menu_append(GTK_MENU(menu), menu_item); gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(tree_row_close_connection), (gpointer) tab); gtk_widget_show(menu_item); |
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv17072 Modified Files: browse-dnd.c browse.c common.h dn-browse.c formfill.c input.c ldapops.c ldif.c schema.c server-browse.c tinput.c util.c Log Message: * Fixed many (not all) areas that were not yet fully referral-aware (Also fixed the explicit ldapops warning) * Fixed some LDAP related memory leaks (+ possibly obsolete portability problems in this area) * Fixed some wrong error-handling with respect to ldap_search_ext * Introduced ldap_search_ext in some places where it would not have been strictly necessary Index: browse-dnd.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-dnd.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** browse-dnd.c 21 Oct 2003 20:58:27 -0000 1.18 --- browse-dnd.c 23 Oct 2003 05:46:23 -0000 1.19 *************** *** 862,873 **** server_by_name(g_hash_table_lookup(selhash, "nickname")); char *dn = g_hash_table_lookup(selhash, "dn"); ! LDAP *ld; int rc; ! LDAPMessage *msg = NULL, *e; GString *out = NULL; gboolean ok = FALSE; int ctx = error_new_context(_("Getting selection string")); --- 862,880 ---- server_by_name(g_hash_table_lookup(selhash, "nickname")); char *dn = g_hash_table_lookup(selhash, "dn"); ! LDAPControl c, *ctrls[2] = { NULL, NULL } ; ! int scope; LDAP *ld; int rc; ! LDAPMessage *e, *res = NULL; GString *out = NULL; gboolean ok = FALSE; + char *attrs[] = { + LDAP_ALL_USER_ATTRIBUTES, + "ref", + NULL + }; + int ctx = error_new_context(_("Getting selection string")); *************** *** 881,885 **** error_push(ctx, _("Cannot find server by its nickname ('%s')"), ! g_hash_table_lookup(selhash, "nickname")); goto done; } --- 888,892 ---- error_push(ctx, _("Cannot find server by its nickname ('%s')"), ! (char*) g_hash_table_lookup(selhash, "nickname")); goto done; } *************** *** 888,929 **** if( (ld = open_connection(server)) == NULL) goto fail; ! rc = ldap_search_s(ld, dn, ! g_hash_table_lookup(selhash, "recursively") ? LDAP_SCOPE_SUBTREE : LDAP_SCOPE_BASE, ! "objectClass=*", NULL, 0, &msg); ! if (rc == LDAP_SERVER_DOWN) { ! server->server_down = 1; ! error_push(ctx, ! _("Server '%s' down. Export may be incomplete!"), ! server->name); ! push_ldap_addl_error(ld, ctx); ! ! goto fail; ! } ! if (rc != LDAP_SUCCESS) { ! error_push(ctx, ! _("LDAP error while searching below '%s'. Export may be incomplete!"), ! dn); ! push_ldap_addl_error(ld, ctx); ! ! goto fail; ! } ! out = g_string_new(""); ! for(e = ldap_first_entry(ld, msg); e ; e = ldap_next_entry(ld, e)) { ! ldif_entry_out(out, ld, e, ctx); } - - gtk_selection_data_set(data, - GDK_SELECTION_TYPE_STRING, - 8, /* character data */ - out->str, - out->len - ); - ok = TRUE; - /* I hate to do it like this, but sometimes labels are such - helpful beasts */ - fail: if (!ok) { gtk_selection_data_set(data, --- 895,949 ---- if( (ld = open_connection(server)) == NULL) goto fail; ! /* use ManageDSAit: we want to move/copy refs intact */ ! c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; ! c.ldctl_value.bv_val = NULL; ! c.ldctl_value.bv_len = 0; ! c.ldctl_iscritical = 1; ! ! ctrls[0] = &c; ! scope = g_hash_table_lookup(selhash, "recursively") ? ! LDAP_SCOPE_SUBTREE : LDAP_SCOPE_BASE; ! rc = ldap_search_ext_s(ld, ! dn, /* base */ ! scope, /* search scope */ ! "objectClass=*", /* filter */ ! attrs, /* attrs */ ! 0, /* attrsonly */ ! ctrls, /* serverctrls */ ! NULL, /* clientctrls */ ! NULL, /* timeout */ ! LDAP_NO_LIMIT, /* sizelimit */ ! &res); ! ! if (rc == LDAP_SUCCESS) { ! out = g_string_new(""); ! ! for( e = ldap_first_entry(ld, res) ; e != NULL ; ! e = ldap_next_entry(ld, e) ) { ! ldif_entry_out(out, ld, e, ctx); ! } ! ! gtk_selection_data_set(data, ! GDK_SELECTION_TYPE_STRING, ! 8, /* character data */ ! out->str, ! out->len ! ); ! ok = TRUE; ! } else if (rc == LDAP_SERVER_DOWN) { ! server->server_down++; ! error_push(ctx, ! _("Error searching below '%1$s': %2$s"), ! dn, ldap_err2string(rc)); ! push_ldap_addl_error(ld, ctx); ! } else { ! error_push(ctx, ! _("Error searching below '%1$s': %2$s"), ! dn, ldap_err2string(rc)); ! push_ldap_addl_error(ld, ctx); } if (!ok) { gtk_selection_data_set(data, *************** *** 935,941 **** } if (out) g_string_free(out, TRUE); ! if (msg) ldap_msgfree(msg); ! close_connection(server, FALSE); done: error_flush(ctx); --- 955,963 ---- } + fail: if (out) g_string_free(out, TRUE); ! if (res) ldap_msgfree(res); ! if (ld) close_connection(server, FALSE); ! done: error_flush(ctx); Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** browse.c 21 Oct 2003 20:58:27 -0000 1.87 --- browse.c 23 Oct 2003 05:46:23 -0000 1.88 *************** *** 925,953 **** LDAPControl c; LDAPControl *ctrls[2] = { NULL, NULL } ; ! int rc, msg; ! /* int rc = ldap_search_s(ld, s->str, LDAP_SCOPE_BASE, */ ! /* "(objectClass=*)", attrs, 0, &res); */ ! ! c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; c.ldctl_value.bv_val = NULL; c.ldctl_value.bv_len = 0; ! c.ldctl_iscritical = 1; ctrls[0] = &c; ! rc = ldap_search_ext(ld, s->str, ! LDAP_SCOPE_BASE, ! "(objectClass=*)", attrs, 0, ! ctrls, /* serverctrls */ ! NULL, /* clientctrls */ ! NULL, /* timeout */ ! LDAP_NO_LIMIT, /* sizelimit */ ! &msg); ! ! ! if (rc == LDAP_SUCCESS) { ! rc = ldap_result(ld, msg, 1, NULL, &res); ! } if (rc == LDAP_SUCCESS) { --- 925,947 ---- LDAPControl c; LDAPControl *ctrls[2] = { NULL, NULL } ; ! int rc; ! c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; c.ldctl_value.bv_val = NULL; c.ldctl_value.bv_len = 0; ! c.ldctl_iscritical = 1; ctrls[0] = &c; ! rc = ldap_search_ext_s(ld, s->str, ! LDAP_SCOPE_BASE, ! "(objectClass=*)", ! attrs, ! 0, ! ctrls, /* serverctrls */ ! NULL, /* clientctrls */ ! NULL, /* timeout */ ! LDAP_NO_LIMIT, /* sizelimit */ ! &res); if (rc == LDAP_SUCCESS) { *************** *** 957,969 **** char *dn = ldap_get_dn(ld, e); found = dn_browse_single_add(dn, tree, node); ! free(dn); node = found; } - ldap_msgfree(res); } else { /* FIXME report error */ } ! close_connection(server, FALSE); } else { --- 951,965 ---- char *dn = ldap_get_dn(ld, e); found = dn_browse_single_add(dn, tree, node); ! if (dn) ldap_memfree(dn); node = found; } } else { /* FIXME report error */ } ! ! if (res) ldap_msgfree(res); ! res = NULL; ! close_connection(server, FALSE); } else { Index: common.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/common.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** common.h 20 Oct 2003 08:22:49 -0000 1.31 --- common.h 23 Oct 2003 05:46:23 -0000 1.32 *************** *** 168,171 **** --- 168,176 ---- #endif + #ifndef HAVE_LDAP_MEMFREE + # define ldap_memfree(x) free(x) + #endif + + #endif Index: dn-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dn-browse.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dn-browse.c 23 Oct 2003 05:18:36 -0000 1.5 --- dn-browse.c 23 Oct 2003 05:46:23 -0000 1.6 *************** *** 372,386 **** &msg); ! if (rc != LDAP_SUCCESS) { ! statusbar_msg(_("Searching for '%1$s': %2$s"), ! entry->dn, ! ldap_err2string(msg)); ! close_connection(server, FALSE); ! gtk_clist_thaw(GTK_CLIST(ctree)); ! error_flush(context); ! return; ! } while((rc = ldap_result(ld, msg, 0, --- 372,387 ---- &msg); ! /* FIXME: THIS IS NOT CORRECT */ ! /* if (rc == -1) { */ ! /* statusbar_msg(_("Searching for '%1$s': %2$s"), */ ! /* entry->dn, */ ! /* ldap_err2string(msg)); */ ! /* close_connection(server, FALSE); */ ! /* gtk_clist_thaw(GTK_CLIST(ctree)); */ ! /* error_flush(context); */ ! /* return; */ ! /* } */ while((rc = ldap_result(ld, msg, 0, *************** *** 397,403 **** ref_browse_single_add(vals[i], ctree, node); } } ! ldap_msgfree(res); } if (entry->is_ref) { --- 398,411 ---- ref_browse_single_add(vals[i], ctree, node); } + + if (vals) /* redundant, but... */ + ldap_value_free(vals); } ! if (res) ldap_msgfree(res); ! res = NULL; } + + if (res) ldap_msgfree(res); + res = NULL; if (entry->is_ref) { *************** *** 422,435 **** &msg); ! if(rc != LDAP_SUCCESS) { ! statusbar_msg(_("Error while searching below '%1$s': %2$s"), ! entry->dn, ! ldap_err2string(msg)); ! close_connection(server, FALSE); ! gtk_clist_thaw(GTK_CLIST(ctree)); ! error_flush(context); ! return; ! } num_children = update_counter = 0; --- 430,444 ---- &msg); ! /* FIXME */ ! /* if(rc != LDAP_SUCCESS) { */ ! /* statusbar_msg(_("Error while searching below '%1$s': %2$s"), */ ! /* entry->dn, */ ! /* ldap_err2string(msg)); */ ! /* close_connection(server, FALSE); */ ! /* gtk_clist_thaw(GTK_CLIST(ctree)); */ ! /* error_flush(context); */ ! /* return; */ ! /* } */ num_children = update_counter = 0; *************** *** 442,446 **** char *dn = ldap_get_dn(ld, e); dn_browse_single_add(dn, ctree, node); ! free(dn); num_children++; --- 451,455 ---- char *dn = ldap_get_dn(ld, e); dn_browse_single_add(dn, ctree, node); ! if (dn) ldap_memfree(dn); num_children++; Index: formfill.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/formfill.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** formfill.c 18 Oct 2003 08:26:59 -0000 1.40 --- formfill.c 23 Oct 2003 05:46:23 -0000 1.41 *************** *** 166,226 **** } ! GList *formlist_from_entry(struct ldapserver *server, const char *dn, int ocvalues_only) { ! GList *formlist; ! LDAP *ld; LDAPMessage *res, *entry; ! BerElement *ber; ! struct formfill *form; ! int msg, i; char *attr; /* , **vals; */ struct berval **bervals; ! char *attrs[] = { LDAP_ALL_USER_ATTRIBUTES, ! LDAP_ALL_OPERATIONAL_ATTRIBUTES, ! NULL }; ! ! formlist = NULL; ! ! set_busycursor(); ! ! #if GTK_MAJOR >= 2 ! statusbar_msg(_("Fetching %1$s from %2$s"), dn, server->name); ! #else ! { ! char *c = NULL; ! statusbar_msg(_("Fetching %1$s from %2$s"), ! c = decoded_string(dn), server->name); ! if (c) free(c); ! } ! #endif - if( (ld = open_connection(server)) == NULL) { - set_normalcursor(); - return(NULL); - } ! msg = ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "(objectclass=*)", ! server->hide_internal ? NULL : attrs, 0, &res); ! ! if (msg == LDAP_SERVER_DOWN) { server->server_down++; ! } ! ! if(msg != LDAP_SUCCESS) { ! statusbar_msg("%s", ldap_err2string(msg)); ! set_normalcursor(); ! close_connection(server, FALSE); ! 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... */ - c = attr_strip(attr); if (server->hide_internal) { --- 166,224 ---- } ! static GList *formlist_from_entry_iteration(LDAP *ld, ! struct ldapserver *server, ! const char *dn, ! int ocvalues_only, ! char **attrs, ! GList *formlist) { ! LDAPControl c; ! LDAPControl *ctrls[2] = { NULL, NULL } ; LDAPMessage *res, *entry; ! int rc, i; char *attr; /* , **vals; */ + struct formfill *form; + BerElement *ber; struct berval **bervals; ! ! c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; ! c.ldctl_value.bv_val = NULL; ! c.ldctl_value.bv_len = 0; ! c.ldctl_iscritical = 1; ! ! ctrls[0] = &c; ! rc = ldap_search_ext_s(ld, ! dn, /* search base */ ! LDAP_SCOPE_BASE, /* scope */ ! "objectClass=*", /* filter */ ! attrs, /* attrs */ ! 0, /* attrsonly */ ! ctrls, /* serverctrls */ ! NULL, /* clientctrls */ ! NULL, /* timeout */ ! LDAP_NO_LIMIT, /* sizelimit */ ! &res); ! ! ! if (rc == LDAP_SERVER_DOWN) { server->server_down++; ! } else if (rc != LDAP_SUCCESS) { ! statusbar_msg("Searching for '%1$s' on '%2$s': %3$s", ! dn, server->name, ! ldap_err2string(rc)); ! return(formlist); ! } ! if (rc == LDAP_SUCCESS) { 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)) { + gboolean oc; /* filter out some internal attributes... */ c = attr_strip(attr); if (server->hide_internal) { *************** *** 231,235 **** } } ! if( (form = new_formfill()) == NULL) { ldap_memfree(attr); --- 229,233 ---- } } ! if( (form = new_formfill()) == NULL) { ldap_memfree(attr); *************** *** 237,249 **** break; } ! form->server = server; ldapserver_ref(server); ! strncpy(form->attrname, c, MAX_ATTR_LEN); if (c) g_free(c); ! if(ocvalues_only == 0 || ! !strcasecmp(attr, "objectClass")) { bervals = ldap_get_values_len(ld, res, attr); if(bervals) { --- 235,248 ---- break; } ! form->server = server; ldapserver_ref(server); ! strncpy(form->attrname, c, MAX_ATTR_LEN); if (c) g_free(c); + + oc = strcasecmp(attr, "objectClass") == 0; ! if(ocvalues_only == 0 || oc) { bervals = ldap_get_values_len(ld, res, attr); if(bervals) { *************** *** 256,260 **** gb); } ! form->num_inputfields = i; ldap_value_free_len(bervals); --- 255,259 ---- gb); } ! form->num_inputfields = i; ldap_value_free_len(bervals); *************** *** 274,279 **** #endif } ! ldap_msgfree(res); } close_connection(server, FALSE); --- 273,325 ---- #endif } ! ! if (res) ldap_msgfree(res); ! res = NULL; ! } ! return formlist; ! } ! ! GList *formlist_from_entry(struct ldapserver *server, const char *dn, ! int ocvalues_only) ! { ! GList *formlist; ! LDAP *ld; ! char *attrs[] = { LDAP_ALL_USER_ATTRIBUTES, ! LDAP_ALL_OPERATIONAL_ATTRIBUTES, ! "ref", ! NULL, ! }; ! char *ref_attrs[] = { LDAP_ALL_USER_ATTRIBUTES, ! "ref", ! NULL ! }; ! ! formlist = NULL; ! ! set_busycursor(); ! ! #if GTK_MAJOR >= 2 ! statusbar_msg(_("Fetching %1$s from %2$s"), dn, server->name); ! #else ! { ! char *c = NULL; ! statusbar_msg(_("Fetching %1$s from %2$s"), ! c = decoded_string(dn), server->name); ! if (c) free(c); ! } ! #endif ! ! if( (ld = open_connection(server)) == NULL) { ! set_normalcursor(); ! return(NULL); } + + formlist = + formlist_from_entry_iteration(ld, + server, + dn, + ocvalues_only, + server->hide_internal ? ref_attrs : attrs, + NULL); close_connection(server, FALSE); Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** input.c 18 Oct 2003 08:26:59 -0000 1.73 --- input.c 23 Oct 2003 05:46:23 -0000 1.74 *************** *** 1221,1224 **** --- 1221,1232 ---- char *dn; char *parentdn, **rdn; + LDAPControl c, *ctrls[2] = { NULL, NULL } ; + + c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; + c.ldctl_value.bv_val = NULL; + c.ldctl_value.bv_len = 0; + c.ldctl_iscritical = 1; + + ctrls[0] = &c; formlist = iform->formlist; *************** *** 1282,1286 **** mods[cmod] = NULL; ! res = ldap_add_s(ld, dn, mods); ldap_mods_free(mods, 1); --- 1290,1294 ---- mods[cmod] = NULL; ! res = ldap_add_ext_s(ld, dn, mods, ctrls, NULL); ldap_mods_free(mods, 1); *************** *** 1288,1291 **** --- 1296,1302 ---- server->server_down++; } + if (res == LDAP_REFERRAL) { + /* FIXME */ + } if(res != LDAP_SUCCESS) { error_push(add_context, _("Error adding new entry '%1$s': '%2$s'"), *************** *** 1415,1424 **** mods = formdiff_to_ldapmod(oldlist, newlist); if(mods != NULL && mods[0] != NULL) { ! /* close_connection(server, FALSE); */ ! /* g_string_free(message, TRUE); */ ! /* return; */ ! /* } */ /* dump_mods(mods); */ ! res = ldap_modify_s(ld, dn, mods); if (res == LDAP_SERVER_DOWN) { server->server_down++; --- 1426,1440 ---- mods = formdiff_to_ldapmod(oldlist, newlist); if(mods != NULL && mods[0] != NULL) { ! LDAPControl c, *ctrls[2] = { NULL, NULL } ; ! c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; ! c.ldctl_value.bv_val = NULL; ! c.ldctl_value.bv_len = 0; ! c.ldctl_iscritical = 1; ! ! ctrls[0] = &c; ! /* dump_mods(mods); */ ! ! res = ldap_modify_ext_s(ld, dn, mods, ctrls, NULL); if (res == LDAP_SERVER_DOWN) { server->server_down++; *************** *** 1483,1487 **** #endif char *noattrs[] = { LDAP_NO_ATTRS, NULL }; ! LDAPMessage *res; server = iform->server; --- 1499,1503 ---- #endif char *noattrs[] = { LDAP_NO_ATTRS, NULL }; ! LDAPMessage *res = NULL; server = iform->server; *************** *** 1545,1550 **** remove_flag = 1; } - ldap_msgfree(res); } /* printf("oldrdn[0]=%s, remove=%d\n", oldrdn[0], remove_flag); */ --- 1561,1566 ---- remove_flag = 1; } } + if (res) ldap_msgfree(res); /* printf("oldrdn[0]=%s, remove=%d\n", oldrdn[0], remove_flag); */ Index: ldapops.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/ldapops.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ldapops.c 21 Oct 2003 21:02:34 -0000 1.18 --- ldapops.c 23 Oct 2003 05:46:23 -0000 1.19 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (ldapops.h) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 62,65 **** --- 60,70 ---- int rc; int err_ctx = -1; + LDAPControl c; + LDAPControl *ctrls[2] = { NULL, NULL } ; + char *attrs[] = { + LDAP_ALL_USER_ATTRIBUTES, + "ref", + NULL + }; if ((source_server != target_server) && *************** *** 75,100 **** err_ctx = error_new_context(_("Moving/copying LDAP objects")); ! rc = ldap_search_s(sld, source_dn, LDAP_SCOPE_BASE, ! "objectClass=*", NULL, 0, ! &res); ! ! if (rc == LDAP_SUCCESS) { ! e = ldap_first_entry(sld, res); ! if (e == NULL) { ! error_push(err_ctx, ! _("Error during base search for '%1$s': %2$s"), ! source_dn, ! ldap_err2string(ldap_result2error(sld, res, 0))); ! push_ldap_addl_error(sld, err_ctx); ! /* ldap_perror(sld, "ldap_first_entry"); */ ! goto fail; /* only sometimes goto makes sense */ ! } ! newdn = move_entry_internal(e, ! source_dn, source_server, sld, ! target_dn, target_server, tld, ! flags, err_ctx, ! progress); ! } else { if (rc == LDAP_SERVER_DOWN) { source_server->server_down++; --- 80,104 ---- err_ctx = error_new_context(_("Moving/copying LDAP objects")); ! /* prepare ManageDSAit: we move referrals, not the referred-to data */ ! c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; ! c.ldctl_value.bv_val = NULL; ! c.ldctl_value.bv_len = 0; ! c.ldctl_iscritical = 1; ! ! ctrls[0] = &c; ! rc = ldap_search_ext_s(sld, ! source_dn, /* search base */ ! LDAP_SCOPE_BASE, /* scope */ ! "objectClass=*", /* filter */ ! attrs, /* attrs */ ! 0, /* attrsonly */ ! ctrls, /* serverctrls */ ! NULL, /* clientctrls */ ! NULL, /* timeout */ ! LDAP_NO_LIMIT, /* sizelimit */ ! &res); ! ! if (rc != LDAP_SUCCESS) { if (rc == LDAP_SERVER_DOWN) { source_server->server_down++; *************** *** 109,112 **** --- 113,133 ---- } + e = ldap_first_entry(sld, res); + if (e == NULL) { + error_push(err_ctx, + _("Error during base search for '%1$s': %2$s"), + source_dn, + ldap_err2string(ldap_result2error(sld, res, 0))); + push_ldap_addl_error(sld, err_ctx); + /* ldap_perror(sld, "ldap_first_entry"); */ + goto fail; /* only sometimes goto makes sense */ + } + + newdn = move_entry_internal(e, + source_dn, source_server, sld, + target_dn, target_server, tld, + flags, err_ctx, + progress); + fail: if (res) ldap_msgfree(res); *************** *** 210,214 **** struct berval **bervals = ldap_get_values_len(sld, e, a); - #warning "FIXME: deal with ref when moving entries" mods[i] = calloc(sizeof(LDAPMod), 1); mods[i]->mod_op = LDAP_MOD_ADD | LDAP_MOD_BVALUES; --- 231,234 ---- *************** *** 248,251 **** --- 268,279 ---- if (flags & MOVE_RECURSIVELY) { gboolean recheck = TRUE; + /* prepare ManageDSAit: we move referrals, not the + referred-to data */ + char *attrs[] = { + LDAP_ALL_USER_ATTRIBUTES, + "ref", + NULL + }; + if (sdn) gq_exploded_free(sdn); *************** *** 262,283 **** entries ... and copying may continue */ do { recheck = FALSE; /* check for entries below ... */ ! rc = ldap_search_s(sld, source_dn, LDAP_SCOPE_ONELEVEL, ! "objectClass=*", dn_only, 0, ! &res); if (rc == LDAP_SUCCESS) { ! /* have subtree */ ! for (e = ldap_first_entry(sld, res) ; e ; ! e = ldap_next_entry(sld, e) ) { char *dn = ldap_get_dn(sld, e); ! char *ndn = ! move_entry_internal(e, dn, ! source_server, sld, ! newdn, ! target_server, tld, ! flags, error_context, ! progress); if (ndn) { free(ndn); --- 290,328 ---- entries ... and copying may continue */ do { + LDAPMessage *res; + recheck = FALSE; /* check for entries below ... */ ! rc = ldap_search_ext_s(sld, ! source_dn, /* search base */ ! LDAP_SCOPE_ONELEVEL, /* scope */ ! "objectClass=*", /* filter */ ! attrs, /* attrs */ ! 0, /* attrsonly */ ! ctrls, /* serverctrls */ ! NULL, /* clientctrls */ ! NULL, /* timeout */ ! LDAP_NO_LIMIT, /* sizelimit */ ! &res); ! if (rc == LDAP_SUCCESS) { ! for(e = ldap_first_entry(sld, res) ; ! e ; ! e = ldap_next_entry(sld, e)) { char *dn = ldap_get_dn(sld, e); ! char *ndn; ! ! ndn = move_entry_internal(e, ! dn, ! source_server, ! sld, ! newdn, ! target_server, ! tld, ! flags, ! error_context, ! progress); ! if (ndn) { free(ndn); *************** *** 288,294 **** if (dn) ldap_memfree(dn); ! } } else if (rc == LDAP_SERVER_DOWN) { source_server->server_down++; } else { error_push(error_context, --- 333,343 ---- if (dn) ldap_memfree(dn); ! } } else if (rc == LDAP_SERVER_DOWN) { source_server->server_down++; + error_push(error_context, + _("Error searching below '%1$s': %2$s"), + source_dn, + ldap_err2string(rc)); } else { error_push(error_context, *************** *** 297,301 **** push_ldap_addl_error(sld, error_context); } - if (res) { ldap_msgfree(res); --- 346,349 ---- Index: ldif.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/ldif.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ldif.c 17 Oct 2003 10:20:38 -0000 1.16 --- ldif.c 23 Oct 2003 05:46:23 -0000 1.17 *************** *** 91,95 **** ldif_line_out(out, "dn", dn, strlen(dn), error_context); g_string_append(out, "\n"); ! free(dn); for(attr = ldap_first_attribute(ld, msg, &berptr); attr != NULL; --- 91,95 ---- ldif_line_out(out, "dn", dn, strlen(dn), error_context); g_string_append(out, "\n"); ! ldap_memfree(dn); for(attr = ldap_first_attribute(ld, msg, &berptr); attr != NULL; Index: schema.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/schema.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** schema.c 20 Oct 2003 08:01:11 -0000 1.24 --- schema.c 23 Oct 2003 05:46:23 -0000 1.25 *************** *** 131,136 **** statusbar_msg(_("subschemaSubentry search on root DSE on server '%s'"), server->name); ! msg = ldap_search_s(ld, "", LDAP_SCOPE_BASE, "(objectclass=*)", ! subschemasubentry, 0, &res); if(msg != LDAP_SUCCESS) { --- 131,138 ---- statusbar_msg(_("subschemaSubentry search on root DSE on server '%s'"), server->name); ! msg = ldap_search_ext_s(ld, "", LDAP_SCOPE_BASE, "(objectclass=*)", ! subschemasubentry, 0, ! NULL, NULL, NULL, LDAP_NO_LIMIT, ! &res); if(msg != LDAP_SUCCESS) { *************** *** 175,180 **** subschema, server->name); ! msg = ldap_search_s(ld, subschema, LDAP_SCOPE_BASE, ! "(objectclass=*)", schema_attrs, 0, &res); g_free_if(subschema); --- 177,184 ---- subschema, server->name); ! msg = ldap_search_ext_s(ld, subschema, LDAP_SCOPE_BASE, ! "(objectclass=*)", schema_attrs, 0, ! NULL, NULL, NULL, LDAP_NO_LIMIT, ! &res); g_free_if(subschema); Index: server-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/server-browse.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** server-browse.c 23 Oct 2003 05:18:36 -0000 1.4 --- server-browse.c 23 Oct 2003 05:46:23 -0000 1.5 *************** *** 387,392 **** char *attrs[2] = { rootDSEattr[i], NULL }; ! msg = ldap_search_s(ld, "", LDAP_SCOPE_BASE, "(objectclass=*)", ! attrs, 0, &res); if(msg != LDAP_SUCCESS) { if (msg == LDAP_SERVER_DOWN) { --- 387,401 ---- char *attrs[2] = { rootDSEattr[i], NULL }; ! msg = ldap_search_ext_s(ld, "", ! LDAP_SCOPE_BASE, /* scope */ ! "(objectclass=*)", /* filter */ ! attrs, /* attrs */ ! 0, /* attrsonly */ ! NULL, /* serverctrls */ ! NULL, /* clientctrls */ ! NULL, /* timeout */ ! LDAP_NO_LIMIT, /* sizelimit */ ! &res); ! if(msg != LDAP_SUCCESS) { if (msg == LDAP_SERVER_DOWN) { Index: tinput.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/tinput.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** tinput.c 18 Oct 2003 08:27:00 -0000 1.42 --- tinput.c 23 Oct 2003 05:46:23 -0000 1.43 *************** *** 93,97 **** * fetch objectclasses in entry from server and build GList of formfill with it */ ! GList *formfill_from_entry_objectclass(struct ldapserver *server, const char *dn) { GList *formlist, *oclist, *tmplist; --- 93,98 ---- * fetch objectclasses in entry from server and build GList of formfill with it */ ! GList *formfill_from_entry_objectclass(struct ldapserver *server, ! const char *dn) { GList *formlist, *oclist, *tmplist; *************** *** 103,106 **** --- 104,117 ---- char **vals; char *oc_only[] = { "objectClass", NULL }; + LDAPControl c; + LDAPControl *ctrls[2] = { NULL, NULL } ; + + /* ManageDSAit */ + c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; + c.ldctl_value.bv_val = NULL; + c.ldctl_value.bv_len = 0; + c.ldctl_iscritical = 1; + + ctrls[0] = &c; formlist = NULL; *************** *** 113,118 **** } ! msg = ldap_search_s(ld, dn, LDAP_SCOPE_BASE, ! "(objectclass=*)", oc_only, 0, &res); if(msg != LDAP_SUCCESS) { --- 124,137 ---- } ! msg = ldap_search_ext_s(ld, dn, ! LDAP_SCOPE_BASE, ! "(objectclass=*)", ! oc_only, /* attrs */ ! 0, /* attrsonly */ ! ctrls, /* serverctrls */ ! NULL, /* clientctrls */ ! NULL, /* timeout */ ! LDAP_NO_LIMIT, /* sizelimit */ ! &res); if(msg != LDAP_SUCCESS) { Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** util.c 23 Oct 2003 05:26:37 -0000 1.80 --- util.c 23 Oct 2003 05:46:23 -0000 1.81 *************** *** 666,669 **** --- 666,670 ---- LDAPControl c; LDAPControl *ctrls[2] = { NULL, NULL } ; + LDAPMessage *res = NULL, *e; c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; *************** *** 685,700 **** if (recursive) { int something_to_do = 1; - LDAPMessage *res, *e; static char* attrs [] = {"dn", NULL}; while (something_to_do) { something_to_do = 0; ! msg = ldap_search_s (ld, dn, LDAP_SCOPE_ONELEVEL, ! "(objectclass=*)", attrs, 1, &res); if(msg == LDAP_SUCCESS) { for (e = ldap_first_entry(ld, res); e ; e = ldap_next_entry(ld, e)) { ! if (delete_entry_full(server, ldap_get_dn(ld, e), ! TRUE)) { something_to_do = 1; } else { --- 686,712 ---- if (recursive) { int something_to_do = 1; static char* attrs [] = {"dn", NULL}; while (something_to_do) { something_to_do = 0; ! msg = ldap_search_ext_s(ld, dn, ! LDAP_SCOPE_ONELEVEL, ! "(objectclass=*)", ! (char **)attrs, /* attrs */ ! 1, /* attrsonly */ ! ctrls, /* serverctrls */ ! NULL, /* clientctrls */ ! NULL, /* timeout */ ! LDAP_NO_LIMIT, /* sizelimit */ ! &res); ! if(msg == LDAP_SUCCESS) { for (e = ldap_first_entry(ld, res); e ; e = ldap_next_entry(ld, e)) { ! char *dn = ldap_get_dn(ld, e); ! gboolean delok = delete_entry_full(server, dn, TRUE); ! if (dn) ldap_memfree(dn); ! ! if (delok) { something_to_do = 1; } else { *************** *** 702,710 **** } } - ldap_msgfree(res); } else if (msg == LDAP_SERVER_DOWN) { server->server_down++; goto done; } } } --- 714,723 ---- } } } else if (msg == LDAP_SERVER_DOWN) { server->server_down++; goto done; } + if (res) ldap_msgfree(res); + res = NULL; } } *************** *** 714,718 **** msg = ldap_delete_ext_s(ld, dn, ctrls, NULL); ! /* msg = ldap_delete_s(ld, dn); /\* FIXME: allow to delete referrals *\/ */ #if HAVE_LDAP_CLIENT_CACHE ldap_uncache_entry(ld, dn); --- 727,731 ---- msg = ldap_delete_ext_s(ld, dn, ctrls, NULL); ! /* msg = ldap_delete_s(ld, dn); */ #if HAVE_LDAP_CLIENT_CACHE ldap_uncache_entry(ld, dn); *************** *** 733,736 **** --- 746,750 ---- done: + if (res) ldap_msgfree(res); set_normalcursor(); close_connection(server, FALSE); *************** *** 1050,1054 **** LDAP *ld; LDAPMessage *res; ! int msg, is_leaf; is_leaf = 0; --- 1064,1082 ---- LDAP *ld; LDAPMessage *res; ! int msg, is_leaf, rc; ! char *attrs[] = { ! LDAP_NO_ATTRS, ! NULL ! }; ! LDAPControl c; ! LDAPControl *ctrls[2] = { NULL, NULL } ; ! ! /* ManageDSAit */ ! c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; ! c.ldctl_value.bv_val = NULL; ! c.ldctl_value.bv_len = 0; ! c.ldctl_iscritical = 1; ! ! ctrls[0] = &c; is_leaf = 0; *************** *** 1063,1069 **** statusbar_msg(_("Checking subtree for %s"), dn); ! msg = ldap_search(ld, dn, LDAP_SCOPE_ONELEVEL, "(objectclass=*)", ! NULL, 0); ! if(msg != -1) { if( (ldap_result(ld, msg, 0, NULL, &res) != LDAP_RES_SEARCH_ENTRY)) is_leaf = 1; --- 1091,1104 ---- statusbar_msg(_("Checking subtree for %s"), dn); ! rc = ldap_search_ext(ld, dn, LDAP_SCOPE_ONELEVEL, "(objectclass=*)", ! attrs, /* attrs */ ! 0, /* attrsonly */ ! ctrls, /* serverctrls */ ! NULL, /* clientctrls */ ! NULL, /* timeout */ ! LDAP_NO_LIMIT, /* sizelimit */ ! &msg); ! ! if(rc != -1) { if( (ldap_result(ld, msg, 0, NULL, &res) != LDAP_RES_SEARCH_ENTRY)) is_leaf = 1; |
From: <sta...@us...> - 2003-10-23 04:55:57
|
Update of /cvsroot/gqclient/gq/po In directory sc8-pr-cvs1:/tmp/cvs-serv10213 Modified Files: ja.po Log Message: * Must have mixed up something: This is the last ja translation by Nezumi Index: ja.po =================================================================== RCS file: /cvsroot/gqclient/gq/po/ja.po,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ja.po 22 Oct 2003 22:27:59 -0000 1.12 --- ja.po 23 Oct 2003 04:51:45 -0000 1.13 *************** *** 5,11 **** msgid "" msgstr "" ! "Project-Id-Version: gq 1.0alpha1_pre1\n" ! "POT-Creation-Date: 2003-10-21 09:00+0200\n" ! "PO-Revision-Date: 2003-10-01 12:06+0900\n" "Last-Translator: Hatuka*nezumi <ne...@jc...>\n" "Language-Team: Japanese - common <LL...@li...>\n" --- 5,11 ---- msgid "" msgstr "" [...1500 lines suppressed...] - #~ msgid " View " - #~ msgstr " ɽ¼¨ " #~ msgid "You must select 'filter', not 'search'" --- 1673,1687 ---- #~ msgstr "ÀßÄê¥Õ¥¡¥¤¥ë²òÀÏÃæ¤Î¥¨¥é¡¼" ! #~ msgid "line %d: unmarked data '%s'" #~ msgstr "%d ¹ÔÌÜ: ¥Ç¡¼¥¿ '%s' ¤Ï¥Þ¡¼¥¯¥¢¥Ã¥×¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" ! #~ msgid "line %d: can't close %s here\n" #~ msgstr "%d ¹ÔÌÜ: %s ¤Ï, ¤³¤³¤Ç¤ÏÊĤ¸¤é¤ì¤Þ¤»¤ó\n" ! #~ msgid " View " ! #~ msgstr " ɽ¼¨ " #~ msgid "Oops! errorchain free error. Exiting...\n" #~ msgstr "¤¦¤ï¤Ã! errorchain ¤Î²òÊü¤Ç¥¨¥é¡¼¤Ç¤¹. ½ªÎ»¤·¤Þ¤¹...\n" #~ msgid "You must select 'filter', not 'search'" |
From: <sta...@us...> - 2003-10-23 00:54:33
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv4568 Modified Files: debug.h Log Message: * Should fix a compile-problem reported by Jean-Baptiste Quenot <jb.quenot at caraldi.com> (forgotten glib.h inclusion) Index: debug.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/debug.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** debug.h 17 Oct 2003 06:31:16 -0000 1.7 --- debug.h 22 Oct 2003 05:39:46 -0000 1.8 *************** *** 29,32 **** --- 29,33 ---- #include <stdlib.h> + #include <glib.h> #include "config.h" |
From: <sta...@us...> - 2003-10-23 00:09:06
|
Update of /cvsroot/gqclient/gq/po In directory sc8-pr-cvs1:/tmp/cvs-serv18305 Modified Files: cs.po de.po ja.po zh_CN.po Log Message: * New ja translation by Nezumi * The usual changes to all po-files due to automatic updates Index: cs.po =================================================================== RCS file: /cvsroot/gqclient/gq/po/cs.po,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** cs.po 21 Oct 2003 06:35:05 -0000 1.8 --- cs.po 22 Oct 2003 22:27:59 -0000 1.9 *************** *** 6,10 **** msgstr "" "Project-Id-Version: gq 0.6.0\n" ! "POT-Creation-Date: 2003-10-21 07:06+0200\n" "PO-Revision-Date: 2002-10-09 14:40+0200\n" "Last-Translator: Tomas Dobrovolny <tom...@at...>\n" --- 6,10 ---- msgstr "" "Project-Id-Version: gq 0.6.0\n" ! "POT-Creation-Date: 2003-10-21 09:00+0200\n" "PO-Revision-Date: 2002-10-09 14:40+0200\n" "Last-Translator: Tomas Dobrovolny <tom...@at...>\n" Index: de.po =================================================================== RCS file: /cvsroot/gqclient/gq/po/de.po,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** de.po 21 Oct 2003 05:29:12 -0000 1.24 --- de.po 22 Oct 2003 22:27:59 -0000 1.25 *************** *** 6,10 **** msgstr "" "Project-Id-Version: gq 1.0\n" ! "POT-Creation-Date: 2003-10-21 07:06+0200\n" "PO-Revision-Date: 2003-10-21 07:28+0200\n" "Last-Translator: Peter Stamfest <pe...@st...>\n" --- 6,10 ---- msgstr "" "Project-Id-Version: gq 1.0\n" ! "POT-Creation-Date: 2003-10-21 09:00+0200\n" "PO-Revision-Date: 2003-10-21 07:28+0200\n" "Last-Translator: Peter Stamfest <pe...@st...>\n" *************** *** 24,28 **** "Cannot explode DN '%s'. Maybe problems with quoting or special characters. " "See RFC 2253 for details of DN syntax." ! msgstr "Problem bei der Analyse des DN '%s'. Möglicherweise bestehen Probleme mit dem Quoting oder Sonderzeichen. Siehe RFC 2253 bezüglich der Syntax eines DN." #, c-format --- 24,30 ---- "Cannot explode DN '%s'. Maybe problems with quoting or special characters. " "See RFC 2253 for details of DN syntax." ! msgstr "" ! "Problem bei der Analyse des DN '%s'. Möglicherweise bestehen Probleme mit " ! "dem Quoting oder Sonderzeichen. Siehe RFC 2253 bezüglich der Syntax eines DN." #, c-format *************** *** 520,524 **** "NOTE: This is a transient server definition. It has been added dynamically " "and it will not be saved to the permanent configuration." ! msgstr "BEACHTEN SIE: Dies ist eine vorrübergehende Serverdefinition. Sie wurde dynamisch hinzugefügt und wird nicht in der permanenten Konfiguration gesichert werden." msgid "_Details" --- 522,529 ---- "NOTE: This is a transient server definition. It has been added dynamically " "and it will not be saved to the permanent configuration." ! msgstr "" ! "BEACHTEN SIE: Dies ist eine vorrübergehende Serverdefinition. Sie wurde " ! "dynamisch hinzugefügt und wird nicht in der permanenten Konfiguration " ! "gesichert werden." msgid "_Details" *************** *** 993,997 **** "The attributes to show in the search result. Selecting NO attributs will " "show ALL." ! msgstr "Die anzuzeigenden Attribute im Suchergebnis. Werden KEINE Attribute gewählt, so werden ALLE angezeigt." #. find button --- 998,1004 ---- "The attributes to show in the search result. Selecting NO attributs will " "show ALL." ! msgstr "" ! "Die anzuzeigenden Attribute im Suchergebnis. Werden KEINE Attribute gewählt, " ! "so werden ALLE angezeigt." #. find button *************** *** 1063,1067 **** #, c-format msgid "Failed to initialize LDAP structure for server '%1$s': %2$s." ! msgstr "Fehler bei der Initialisierung der LDAP Datenstruktur für Server '%1$s': %2$s" #, c-format --- 1070,1075 ---- #, c-format msgid "Failed to initialize LDAP structure for server '%1$s': %2$s." ! msgstr "" ! "Fehler bei der Initialisierung der LDAP Datenstruktur für Server '%1$s': %2$s" #, c-format *************** *** 1069,1077 **** "Cannot connect to '%s'. No URI support available. Your LDAP toolkit does not " "support LDAP URIs." ! msgstr "Kann Verbindung zu '%s' nicht herstellen. Keine URI Unterstützung vorhanden. Das benutzte LDAP Toolkit unterstützt keine LDAP URIs." #, c-format msgid "Failed to initialize LDAP structure for server %1$s: %2$s." ! msgstr "Fehler bei der Initialisierung der LDAP Datenstruktur für Server '%1$s': %2$s" #, c-format --- 1077,1088 ---- "Cannot connect to '%s'. No URI support available. Your LDAP toolkit does not " "support LDAP URIs." ! msgstr "" ! "Kann Verbindung zu '%s' nicht herstellen. Keine URI Unterstützung vorhanden. " ! "Das benutzte LDAP Toolkit unterstützt keine LDAP URIs." #, c-format msgid "Failed to initialize LDAP structure for server %1$s: %2$s." ! msgstr "" ! "Fehler bei der Initialisierung der LDAP Datenstruktur für Server '%1$s': %2$s" #, c-format *************** *** 1089,1093 **** "See README.TLS for more information.\n" msgstr "" ! "Kann TLS für Verbindung zu '%s' nicht nutzen. TLS wird von den verwendeten LDAP Programmbibliotheken nicht unterstützt.\n" "Lesen Sie README.TLS für weitere Informationen.\n" --- 1100,1105 ---- "See README.TLS for more information.\n" msgstr "" ! "Kann TLS für Verbindung zu '%s' nicht nutzen. TLS wird von den verwendeten " ! "LDAP Programmbibliotheken nicht unterstützt.\n" "Lesen Sie README.TLS für weitere Informationen.\n" *************** *** 1129,1142 **** msgid "" "Could not set critical ManageDSAit control on connection to server '%s'." ! msgstr "Konnte notwendige ManageDSAit Control für Verbindung mit Server '%s' nicht setzten" #, c-format msgid "Could not disable following referrals on connection to server '%s'." ! msgstr "Konnte die Verfolgung von Verweisen für die Verbindung mit Server '%s' nicht deaktivieren." #, c-format msgid "" "Initialized temporary server-definition '%1$s' from existing server '%2$s'" ! msgstr "Initialisiere temporäre Serverdefinition '%1$s' von existierendem Server '%2$s'" #, c-format --- 1141,1160 ---- msgid "" "Could not set critical ManageDSAit control on connection to server '%s'." ! msgstr "" ! "Konnte notwendige ManageDSAit Control für Verbindung mit Server '%s' nicht " ! "setzten" #, c-format msgid "Could not disable following referrals on connection to server '%s'." ! msgstr "" ! "Konnte die Verfolgung von Verweisen für die Verbindung mit Server '%s' nicht " ! "deaktivieren." #, c-format msgid "" "Initialized temporary server-definition '%1$s' from existing server '%2$s'" ! msgstr "" ! "Initialisiere temporäre Serverdefinition '%1$s' von existierendem Server '%2" ! "$s'" #, c-format *************** *** 1261,1265 **** #, c-format msgid "Could not find source server by its nickname ('%s')!" ! msgstr "Konnte Ursprungsserver für die benutzte Bezeichnung ('%s') nicht finden!" msgid "Cannot move/copy entry onto itself!" --- 1279,1284 ---- #, c-format msgid "Could not find source server by its nickname ('%s')!" ! msgstr "" ! "Konnte Ursprungsserver für die benutzte Bezeichnung ('%s') nicht finden!" msgid "Cannot move/copy entry onto itself!" *************** *** 1297,1301 **** #, c-format msgid "Cannot find server by its nickname ('%s')" ! msgstr "Konnte Ursprungsserver für die benutzte Bezeichnung ('%s') nicht finden!" #, c-format --- 1316,1321 ---- #, c-format msgid "Cannot find server by its nickname ('%s')" ! msgstr "" ! "Konnte Ursprungsserver für die benutzte Bezeichnung ('%s') nicht finden!" #, c-format *************** *** 1305,1309 **** #, c-format msgid "LDAP error while searching below '%s'. Export may be incomplete!" ! msgstr "LDAP Fehler während Suche unter '%s'. Export mögilcherweise nicht komplett!" msgid "" --- 1325,1330 ---- #, c-format msgid "LDAP error while searching below '%s'. Export may be incomplete!" ! msgstr "" ! "LDAP Fehler während Suche unter '%s'. Export mögilcherweise nicht komplett!" msgid "" Index: ja.po =================================================================== RCS file: /cvsroot/gqclient/gq/po/ja.po,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ja.po 21 Oct 2003 06:35:05 -0000 1.11 --- ja.po 22 Oct 2003 22:27:59 -0000 1.12 *************** *** 6,10 **** msgstr "" "Project-Id-Version: gq 1.0alpha1_pre1\n" ! "POT-Creation-Date: 2003-10-21 07:06+0200\n" "PO-Revision-Date: 2003-10-01 12:06+0900\n" "Last-Translator: Hatuka*nezumi <ne...@jc...>\n" --- 6,10 ---- msgstr "" "Project-Id-Version: gq 1.0alpha1_pre1\n" ! "POT-Creation-Date: 2003-10-21 09:00+0200\n" "PO-Revision-Date: 2003-10-01 12:06+0900\n" "Last-Translator: Hatuka*nezumi <ne...@jc...>\n" Index: zh_CN.po =================================================================== RCS file: /cvsroot/gqclient/gq/po/zh_CN.po,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** zh_CN.po 21 Oct 2003 06:35:05 -0000 1.6 --- zh_CN.po 22 Oct 2003 22:27:59 -0000 1.7 *************** *** 6,10 **** msgstr "" "Project-Id-Version: 0.7.0beta2\n" ! "POT-Creation-Date: 2003-10-21 07:06+0200\n" "PO-Revision-Date: 2003-01-04 02:58+0800\n" "Last-Translator: hleil liu <hl...@ya...>\n" --- 6,10 ---- msgstr "" "Project-Id-Version: 0.7.0beta2\n" ! "POT-Creation-Date: 2003-10-21 09:00+0200\n" "PO-Revision-Date: 2003-01-04 02:58+0800\n" "Last-Translator: hleil liu <hl...@ya...>\n" |
From: <sta...@us...> - 2003-10-22 04:16:42
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv18416 Modified Files: browse-dnd.c browse.c browse.h Log Message: * HACK: suppress extensive flickering with drag and drop Index: browse-dnd.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-dnd.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** browse-dnd.c 17 Oct 2003 10:20:34 -0000 1.17 --- browse-dnd.c 21 Oct 2003 20:58:27 -0000 1.18 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client is ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (browse-dnd.c) is ! Copyright (C) 2002 by Peter Stamfest <pe...@st...> This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client is ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 349,353 **** ! static void do_refresh() { GList *l; dnd_refresh *at_end = NULL; --- 347,351 ---- ! static void do_refresh(struct tab *tab) { GList *l; dnd_refresh *at_end = NULL; *************** *** 360,363 **** --- 358,363 ---- (GCompareFunc) dnd_refresh_sort_func); + set_update_lock(tab); + for (l = g_list_first(dnd_refresh_list) ; l ; l = g_list_next(l)) { dnd_refresh *dr = l->data; *************** *** 375,378 **** --- 375,380 ---- } + release_update_lock(tab); + if (at_end) { GtkCTreeNode *node = tree_node_from_server_dn(at_end->tree, *************** *** 397,401 **** static void drag_end(GtkWidget *ctreeroot, GdkDragContext *drag_context, ! gpointer user_data) { #ifdef DEBUG --- 399,403 ---- static void drag_end(GtkWidget *ctreeroot, GdkDragContext *drag_context, ! struct tab *tab) { #ifdef DEBUG *************** *** 415,419 **** "drag-and-selection-data"); ! do_refresh(); } --- 417,421 ---- "drag-and-selection-data"); ! do_refresh(tab); } *************** *** 1010,1014 **** gdk_atom_intern("gq-browse-ctree", FALSE), GDK_CURRENT_TIME); ! do_refresh(); } --- 1012,1016 ---- gdk_atom_intern("gq-browse-ctree", FALSE), GDK_CURRENT_TIME); ! do_refresh(tab); } *************** *** 1154,1158 **** gtk_signal_connect(GTK_OBJECT(ctreeroot), "drag-end", GTK_SIGNAL_FUNC(drag_end), ! (gpointer) NULL); #if 0 gtk_signal_connect(GTK_OBJECT(ctreeroot), "drag-drop", --- 1156,1161 ---- gtk_signal_connect(GTK_OBJECT(ctreeroot), "drag-end", GTK_SIGNAL_FUNC(drag_end), ! (gpointer) tab); ! #if 0 gtk_signal_connect(GTK_OBJECT(ctreeroot), "drag-drop", Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** browse.c 18 Oct 2003 08:26:59 -0000 1.86 --- browse.c 21 Oct 2003 20:58:27 -0000 1.87 *************** *** 325,329 **** assert(entry->base_methods); if (entry->base_methods->select) { ! entry->base_methods->select(entry, ctree, node, tab); } BROWSETAB(tab)->tree_row_selected = node; --- 325,333 ---- assert(entry->base_methods); if (entry->base_methods->select) { ! ! /* do not update right-hand pane if update-lock is set */ ! if (! BROWSETAB(tab)->update_lock) { ! entry->base_methods->select(entry, ctree, node, tab); ! } } BROWSETAB(tab)->tree_row_selected = node; *************** *** 478,482 **** --- 482,496 ---- } + void set_update_lock(struct tab *tab) + { + assert(tab); + BROWSETAB(tab)->update_lock++; + } + void release_update_lock(struct tab *tab) + { + assert(tab); + BROWSETAB(tab)->update_lock--; + } static struct tab_vtab browse_vtab = { browse_save_snapshot, Index: browse.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** browse.h 18 Oct 2003 08:26:59 -0000 1.34 --- browse.h 21 Oct 2003 20:58:28 -0000 1.35 *************** *** 47,50 **** --- 47,52 ---- GtkCTreeNode *selected_ctree_node; + /* lock used to suppress flickering during d'n'd */ + int update_lock; }; *************** *** 172,175 **** --- 174,181 ---- void update_browse_serverlist(struct tab *tab); void tree_row_close_connection(GtkMenuItem *menuitem, struct tab *tab); + + void set_update_lock(struct tab *tab); + void release_update_lock(struct tab *tab); + #endif |
From: <sta...@us...> - 2003-10-22 00:15:22
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv17392 Modified Files: dt_int.c Log Message: * Make dt_int work for negative numbers Index: dt_int.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_int.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dt_int.c 21 Oct 2003 04:46:41 -0000 1.1 --- dt_int.c 21 Oct 2003 20:53:42 -0000 1.2 *************** *** 82,95 **** { char *txt = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); ! gunichar c; if (txt) { - GString *s = g_string_sized_new(strlen(txt)); - int nope = 0; char *t; ! /* allow only digits, no leading zeroes */ for(t = txt, c = g_utf8_get_char(t) ; c ; t = g_utf8_next_char(t), c = g_utf8_get_char(t)) { --- 82,108 ---- { char *txt = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); ! gunichar c = 0; if (txt) { char *t; + GString *s = g_string_sized_new(strlen(txt)); + int nope = 0; ! /* strip leading whitespace */ for(t = txt, c = g_utf8_get_char(t) ; + g_unichar_isspace(c) ; + t = g_utf8_next_char(t), c = g_utf8_get_char(t)) { + } + + /* one leading minus is OK */ + if (c == g_utf8_get_char("-")) { + g_string_append_unichar(s, c); + t = g_utf8_next_char(t); + c = g_utf8_get_char(t); + } + + /* allow only digits, no leading zeroes */ + for(c = g_utf8_get_char(t) ; c ; t = g_utf8_next_char(t), c = g_utf8_get_char(t)) { |
From: <sta...@us...> - 2003-10-21 23:58:59
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv19657 Modified Files: ldapops.c Log Message: * Now it is possible to delete referral objects Index: ldapops.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/ldapops.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ldapops.c 17 Oct 2003 10:20:38 -0000 1.17 --- ldapops.c 21 Oct 2003 21:02:34 -0000 1.18 *************** *** 140,144 **** LDAPMod **mods; gboolean ok = TRUE; ! char *dn_only[] = { "dn", NULL }; sdn = gq_ldap_explode_dn(source_dn, 0); --- 140,153 ---- LDAPMod **mods; gboolean ok = TRUE; ! /* char *dn_only[] = { "dn", NULL }; */ ! LDAPControl c; ! LDAPControl *ctrls[2] = { NULL, NULL } ; ! ! c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; ! c.ldctl_value.bv_val = NULL; ! c.ldctl_value.bv_len = 0; ! c.ldctl_iscritical = 1; ! ! ctrls[0] = &c; sdn = gq_ldap_explode_dn(source_dn, 0); *************** *** 304,308 **** if (flags & MOVE_DELETE_MOVED && ok) { ! rc = ldap_delete_s(sld, source_dn); #if HAVE_LDAP_CLIENT_CACHE ldap_uncache_entry(sld, source_dn); --- 313,317 ---- if (flags & MOVE_DELETE_MOVED && ok) { ! rc = ldap_delete_ext_s(sld, source_dn, ctrls, NULL); #if HAVE_LDAP_CLIENT_CACHE ldap_uncache_entry(sld, source_dn); |
From: <sta...@us...> - 2003-10-21 21:20:34
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv19222 Modified Files: util.c Log Message: * Now it is possible to delete referral objects Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** util.c 21 Oct 2003 04:57:34 -0000 1.78 --- util.c 21 Oct 2003 21:01:02 -0000 1.79 *************** *** 127,130 **** --- 127,131 ---- error_push(open_context, _("Failed to initialize LDAP structure for server %1$s: %2$s."), + server->name, strerror(errno)); } *************** *** 661,664 **** --- 662,674 ---- int msg; gboolean rc = TRUE; + LDAPControl c; + LDAPControl *ctrls[2] = { NULL, NULL } ; + + c.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; + c.ldctl_value.bv_val = NULL; + c.ldctl_value.bv_len = 0; + c.ldctl_iscritical = 1; + + ctrls[0] = &c; /* FIXME confirm-mod check here */ *************** *** 700,704 **** statusbar_msg(_("Deleting: %s"), dn); ! msg = ldap_delete_s(ld, dn); #if HAVE_LDAP_CLIENT_CACHE ldap_uncache_entry(ld, dn); --- 710,716 ---- statusbar_msg(_("Deleting: %s"), dn); ! msg = ldap_delete_ext_s(ld, dn, ctrls, NULL); ! ! /* msg = ldap_delete_s(ld, dn); /\* FIXME: allow to delete referrals *\/ */ #if HAVE_LDAP_CLIENT_CACHE ldap_uncache_entry(ld, dn); |
From: <sta...@us...> - 2003-10-21 08:20:09
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv10199 Modified Files: util.c Log Message: * Avoid some redundant, time-consuming connection attempts when an LDAP server is reportedly down. Cuts down dead-time in certain situations Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** util.c 20 Oct 2003 08:33:38 -0000 1.77 --- util.c 21 Oct 2003 04:57:34 -0000 1.78 *************** *** 72,75 **** --- 72,77 ---- #define TRY_VERSION3 1 + LDAP *open_connection_ex(struct ldapserver *server, int *ldap_errno); + #ifdef HAVE_SASL static int util_ldap_sasl_interact(LDAP *ld, unsigned flags, void *defaults, void *in) *************** *** 358,361 **** --- 360,364 ---- LDAPURLDesc *desc = NULL; struct ldapserver *newserver = NULL, *s; + int ld_err; assert(parent); *************** *** 382,386 **** newserver->quiet = 1; ! if (open_connection(newserver)) { close_connection(newserver, FALSE); --- 385,389 ---- newserver->quiet = 1; ! if (open_connection_ex(newserver, &ld_err)) { close_connection(newserver, FALSE); *************** *** 389,392 **** --- 392,398 ---- goto done; } + if (ld_err == LDAP_SERVER_DOWN) { + goto done; + } /* check: do we have this server around already??? */ *************** *** 406,414 **** newserver->quiet = 1; ! if (open_connection(newserver)) { close_connection(newserver, FALSE); statusbar_msg(_("Initialized temporary server-definition '%1$s' from existing server '%2$s'"), new_uri->str, s->name); goto done; } } --- 412,423 ---- newserver->quiet = 1; ! if (open_connection_ex(newserver, &ld_err)) { close_connection(newserver, FALSE); statusbar_msg(_("Initialized temporary server-definition '%1$s' from existing server '%2$s'"), new_uri->str, s->name); goto done; } + if (ld_err == LDAP_SERVER_DOWN) { + goto done; + } } *************** *** 426,434 **** newserver->bindtype = BINDTYPE_SIMPLE; ! if (open_connection(newserver)) { close_connection(newserver, FALSE); statusbar_msg(_("Initialized temporary server-definition '%1$s' from existing server '%2$s'"), new_uri->str, parent->name); goto done; } /* nothing usable found - retry */ } --- 435,446 ---- newserver->bindtype = BINDTYPE_SIMPLE; ! if (open_connection_ex(newserver, &ld_err)) { close_connection(newserver, FALSE); statusbar_msg(_("Initialized temporary server-definition '%1$s' from existing server '%2$s'"), new_uri->str, parent->name); goto done; } + if (ld_err == LDAP_SERVER_DOWN) { + goto done; + } /* nothing usable found - retry */ } *************** *** 449,453 **** * open connection to LDAP server, and store connection for caching */ ! LDAP *open_connection(struct ldapserver *server) { LDAP *ld; --- 461,465 ---- * open connection to LDAP server, and store connection for caching */ ! LDAP *open_connection_ex(struct ldapserver *server, int *ldap_errno) { LDAP *ld; *************** *** 457,460 **** --- 469,473 ---- int newpw = 0; + if (ldap_errno) *ldap_errno = LDAP_SUCCESS; if(!server) return NULL; *************** *** 529,535 **** --- 542,554 ---- } + if (ldap_errno) *ldap_errno = rc; + return(ld); } + LDAP *open_connection(struct ldapserver *server) + { + return open_connection_ex(server, NULL); + } /* |
From: <sta...@us...> - 2003-10-21 07:34:50
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv25297 Modified Files: ChangeLog Log Message: * Get ready for 1.0alpha3 release Index: ChangeLog =================================================================== RCS file: /cvsroot/gqclient/gq/ChangeLog,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** ChangeLog 20 Oct 2003 06:40:35 -0000 1.47 --- ChangeLog 21 Oct 2003 06:36:00 -0000 1.48 *************** *** 1,2 **** --- 1,11 ---- + 2003-10-21 Peter Stamfest <pe...@st...> + * Fixed minor bugs found while testing for release + * Released 1.0alpha3 + 2003-10-20 Peter Stamfest <pe...@st...> + * New display types - integer and numeric string + * Some gtk 1.x fixes + * Added title to the search-result popup menu & took care of disabling + non-applicable menu-items + * Moved version to 1.0alpha3 2003-10-19 Peter Stamfest <pe...@st...> * Added statusbar and error-message history - very convenient to |
From: <sta...@us...> - 2003-10-21 07:29:35
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv24686 Modified Files: mainwin.c Log Message: * Fixed a gtk 1 related compilation problem Index: mainwin.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/mainwin.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** mainwin.c 21 Oct 2003 04:53:50 -0000 1.50 --- mainwin.c 21 Oct 2003 06:31:10 -0000 1.51 *************** *** 307,311 **** --- 307,313 ---- win->ml_window = NULL; win->ml_text = NULL; + #if GTK_MAJOR >= 2 win->ml_buffer = NULL; + #endif } |
From: <sta...@us...> - 2003-10-21 06:57:50
|
Update of /cvsroot/gqclient/gq/po In directory sc8-pr-cvs1:/tmp/cvs-serv25117 Modified Files: cs.po ja.po zh_CN.po Log Message: * poor translators: Changed dozens of messages Index: cs.po =================================================================== RCS file: /cvsroot/gqclient/gq/po/cs.po,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** cs.po 10 Oct 2003 08:22:25 -0000 1.7 --- cs.po 21 Oct 2003 06:35:05 -0000 1.8 *************** *** 6,10 **** msgstr "" "Project-Id-Version: gq 0.6.0\n" ! "POT-Creation-Date: 2003-10-10 09:03+0200\n" "PO-Revision-Date: 2002-10-09 14:40+0200\n" "Last-Translator: Tomas Dobrovolny <tom...@at...>\n" --- 6,10 ---- msgstr "" "Project-Id-Version: gq 0.6.0\n" ! "POT-Creation-Date: 2003-10-21 07:06+0200\n" "PO-Revision-Date: 2002-10-09 14:40+0200\n" "Last-Translator: Tomas Dobrovolny <tom...@at...>\n" *************** *** 19,117 **** #. problem with DN #. printf("problem dn: %s\n", dn); - msgid "" - "Cannot explode DN. Maybe problems with quoting or special characters. See " - "RFC 2253 for details of DN syntax." - msgstr "" - - #, fuzzy - msgid "Expand entry" - msgstr "Rozbalit v¹e" - - #, c-format - msgid "onelevel search on %s" - msgstr "jednoúrovòové hledání na %s" - - #, fuzzy, c-format - msgid "One entry found (running)" - msgid_plural "%d entries found (running)" - msgstr[0] "hledání (bì¾í)" - - #, fuzzy, c-format - msgid "One entry found (finished)" - msgid_plural "%d entries found (finished)" - msgstr[0] "hledání (dokonèeno)" - - msgid "size limit exceeded" - msgstr "" - - msgid "time limit exceeded" - msgstr "" - #, c-format ! msgid "Matched DN: %s" ! msgstr "" ! ! #, c-format ! msgid "Referral to: %s" ! msgstr "" ! ! #. Nickname ! #, fuzzy ! msgid "Nickname" ! msgstr "Název" ! ! #. Host name ! msgid "Hostname" ! msgstr "" ! ! #. Port ! #, fuzzy ! msgid "Port" ! msgstr "LDAP port" ! ! #. Connection caching ! msgid "Connection caching" ! msgstr "" ! ! msgid "on" ! msgstr "" ! ! msgid "off" ! msgstr "" ! ! #. TLS ! msgid "TLS" ! msgstr "" ! ! msgid "Client-side caching" ! msgstr "" ! ! #. Connections so far ! #, fuzzy ! msgid "Connections so far" ! msgstr "pøipojování k %s" ! ! msgid "Vendor Name" ! msgstr "" ! ! #. RFC 3045 ! #, fuzzy ! msgid "Vendor Version" ! msgstr "Verze" ! ! #. RFC 3045 ! msgid "Alternative Server(s)" ! msgstr "" ! ! #. RFC 2251 ! msgid "Supported LDAP Version" ! msgstr "" ! ! #. RFC 2251 ! msgid "Supported SASL Mechanisms" ! msgstr "" ! ! #. LDAP protocol version ! msgid "LDAP protocol version" msgstr "" --- 19,26 ---- #. problem with DN #. printf("problem dn: %s\n", dn); #, c-format ! msgid "" ! "Cannot explode DN '%s'. Maybe problems with quoting or special characters. " ! "See RFC 2253 for details of DN syntax." msgstr "" *************** *** 125,223 **** msgstr "Chyba pøipojení k serveru" - msgid "Dump subtree" - msgstr "" - - msgid "Nothing to dump!" - msgstr "" - - #, c-format - msgid "Could not open output file: %s" - msgstr "" - - #, fuzzy, c-format - msgid "Save failed: Only %1$d of %2$d bytes written" - msgstr "%d z %d bajtù zapsáno" - - #, c-format - msgid "subtree search on %s" - msgstr "hledání v podstromu na %s" - #, fuzzy, c-format ! msgid "%1$d of %2$d bytes written" ! msgstr "%d z %d bajtù zapsáno" ! ! #. shouldn't happen ! msgid "Save failed" ! msgstr "Ulo¾ení selhalo" ! ! msgid "Server down. Export may be incomplete!" ! msgstr "" ! ! msgid "LDAP error. Export may be incomplete!" ! msgstr "" ! ! msgid "One entry exported to %2$s" ! msgid_plural "%1$d entries exported to %2$s" ! msgstr[0] "" ! msgstr[1] "" ! ! msgid "Save LDIF" ! msgstr "Ulo¾it LDIF" ! ! msgid "Warning" ! msgstr "Varování" ! ! msgid "" ! "This entry has a subtree!\n" ! "Do you want to delete every entry under it as well?" ! msgstr "" ! "Tato polo¾ka má podstrom!\n" ! "Chcete také smazat ka¾dou podpolo¾ku?" ! ! #. New submenu ! msgid "New" ! msgstr "Nový" ! ! msgid "Use current entry" ! msgstr "Pou¾ít aktuální polo¾ku" ! #. Refresh msgid "Refresh" msgstr "Obrnovit" - #. Expand all - msgid "Expand all" - msgstr "Rozbalit v¹e" - - #. Close connection - msgid "Close Connection" - msgstr "" - - #. Export to LDIF - msgid "Export to LDIF" - msgstr "Exportovat do LDIF" - - #. Search below #, fuzzy ! msgid "Search below" ! msgstr "Vyhledávací re¾im" ! ! #. Copy ! msgid "Copy" ! msgstr "Kopírovat" ! ! #. Copy all ! msgid "Copy all" ! msgstr "Kopírovat v¹e" ! ! #. Paste ! msgid "Paste" ! msgstr "Vlo¾it" ! ! #. Delete ! msgid "Delete" ! msgstr "Smazat" ! ! msgid "you have no home directory!" msgstr "nemáte domovský adresáø!" --- 34,47 ---- msgstr "Chyba pøipojení k serveru" #, fuzzy, c-format ! msgid "Opening %s" ! msgstr "odstraòuji: %s" ! #. The common Refresh item msgid "Refresh" msgstr "Obrnovit" #, fuzzy ! msgid "You have no home directory!" msgstr "nemáte domovský adresáø!" *************** *** 353,361 **** msgstr "Jméno filtru musí být zadáno" msgid "Unknown error" msgstr "Neznámá chyba" #, fuzzy, c-format ! msgid "fetching %1$s from %2$s" msgstr "naèítám %s z %s" --- 177,189 ---- msgstr "Jméno filtru musí být zadáno" + #. shouldn't happen + msgid "Save failed" + msgstr "Ulo¾ení selhalo" + msgid "Unknown error" msgstr "Neznámá chyba" #, fuzzy, c-format ! msgid "Fetching %1$s from %2$s" msgstr "naèítám %s z %s" *************** *** 447,455 **** msgstr "Musíte zadata DN pro novou polo¾ku" msgid "Problem modifying entry" msgstr "Problém pøi zmìnì polo¾ky" ! #, c-format ! msgid "modified %s" msgstr "zmìnìno %s" --- 275,291 ---- msgstr "Musíte zadata DN pro novou polo¾ku" + #, fuzzy, c-format + msgid "Error adding new entry '%1$s': '%2$s'" + msgstr "Chyba pøi pøidávání polo¾ky" + msgid "Problem modifying entry" msgstr "Problém pøi zmìnì polo¾ky" ! #, fuzzy, c-format ! msgid "Error modifying entry '%1$s': %2$s" ! msgstr "Problém pøi zmìnì polo¾ky" ! ! #, fuzzy, c-format ! msgid "Modified %s" msgstr "zmìnìno %s" *************** *** 458,465 **** msgstr "Mù¾ete mìnit pouze RDN pro DN (%s)" ! #, c-format ! msgid "modifying RDN to %s" msgstr "upravuji RDN na %s" msgid "Oops!" msgstr "Tì pic!" --- 294,305 ---- msgstr "Mù¾ete mìnit pouze RDN pro DN (%s)" ! #, fuzzy, c-format ! msgid "Modifying RDN to %s" msgstr "upravuji RDN na %s" + #, fuzzy, c-format + msgid "Error renaming entry '%1$s': %2$s" + msgstr "Chyba pøi pøidávání polo¾ky" + msgid "Oops!" msgstr "Tì pic!" *************** *** 478,482 **** #. an error occurred ! msgid "Cannot retrieve DN of entry.\n" msgstr "" --- 318,322 ---- #. an error occurred ! msgid "Cannot retrieve DN of entry." msgstr "" *************** *** 484,487 **** --- 324,341 ---- msgstr "" + msgid "Restoring last GUI state" + msgstr "" + + msgid "Restoring tabs" + msgstr "" + + #. current_search_options_window = window; + msgid "Message Log" + msgstr "" + + #, fuzzy + msgid "_Clear" + msgstr "Zavøít" + msgid "GQ" msgstr "GQ" *************** *** 522,525 **** --- 376,383 ---- msgstr "Zavøít" + #. File | Show Message + msgid "Show _Message Log" + msgstr "" + #. File | Quit #, fuzzy *************** *** 621,624 **** --- 479,486 ---- msgstr "Server %s" + #, c-format + msgid "Transient server %s" + msgstr "" + #, fuzzy msgid "_General" *************** *** 673,676 **** --- 535,543 ---- msgstr "" + msgid "" + "NOTE: This is a transient server definition. It has been added dynamically " + "and it will not be saved to the permanent configuration." + msgstr "" + #, fuzzy msgid "_Details" *************** *** 968,979 **** msgstr "" ! msgid "subschemaSubentry search on root DSE" msgstr "subschemaSubentry hledání v koøeni DSE" ! msgid "no schema information found" msgstr "¾ádné informace o schématu nebyly nalezeny" ! #, c-format ! msgid "Schema search on %s" msgstr "Vyhledávání schématu na %s" --- 835,873 ---- msgstr "" ! #. Restore Tabs ! msgid "Restore Ta_bs" ! msgstr "" ! ! msgid "If set then save and restore the state of the main window tabs." ! msgstr "" ! ! #. server didn't publish a schema, try the last resort ! #. schemaserver ! #, fuzzy ! msgid "Using schema from last-resort schemaserver" ! msgstr "Nouzový schema server" ! ! #, fuzzy, c-format ! msgid "Cannot find last-resort schema server '%s'" ! msgstr "Nouzový schema server" ! ! #, fuzzy, c-format ! msgid "Cannot obtain schema from last-resort schema server '%s'" ! msgstr "Nouzový schema server" ! ! #, fuzzy, c-format ! msgid "Using schema from last-resort schema server '%s'" ! msgstr "Nouzový schema server" ! ! #, fuzzy, c-format ! msgid "subschemaSubentry search on root DSE on server '%s'" msgstr "subschemaSubentry hledání v koøeni DSE" ! #, fuzzy, c-format ! msgid "No schema information found on server '%s'" msgstr "¾ádné informace o schématu nebyly nalezeny" ! #, fuzzy, c-format ! msgid "Schema search on '%1$s' on server '%2$s'" msgstr "Vyhledávání schématu na %s" *************** *** 1077,1096 **** msgstr "Pou¾ito v porovnávacích pravidlech" #. find button ! msgid "Find" msgstr "Hledat" #, fuzzy msgid "Please enter a valid search filter" msgstr "Musíte zadata DN pro novou polo¾ku" ! #, fuzzy ! msgid "Oops! No server found!" msgstr "Nový server" #, fuzzy, c-format ! msgid "searching for %s" msgstr "naèítám %s z %s" #, c-format msgid "One entry found" --- 971,1073 ---- msgstr "Pou¾ito v porovnávacích pravidlech" + #, fuzzy + msgid "Attributes" + msgstr "Typy atributù" + + #. /\* The common Refresh item *\/ + #. menu_item = gtk_menu_item_new_with_label(_("Refresh")); + #. gtk_menu_append(GTK_MENU(menu), menu_item); + #. gtk_widget_show(menu_item); + #. gtk_signal_connect(GTK_OBJECT(menu_item), "activate", + #. GTK_SIGNAL_FUNC(tree_row_refresh), + #. (gpointer) tab); + #. Clear + msgid "Clear" + msgstr "" + + #. "Select by objectClass" submenu + #, fuzzy + msgid "Select by objectclass" + msgstr "Pou¾ité v objectclass" + + #, fuzzy + msgid "Search Options" + msgstr "Volby hledání" + + #. Referrals Frame + #, fuzzy + msgid "Referrals" + msgstr "Obrnovit" + + msgid "C_hase" + msgstr "" + + msgid "_Show" + msgstr "" + + #. Max. Depth label & spin button + msgid "Max. _Depth" + msgstr "" + + #. Search Scope Frame + #, fuzzy + msgid "Search scope" + msgstr " Typ hledání " + + msgid "_1 level" + msgstr "" + + msgid "Sub_tree" + msgstr "" + + #, fuzzy + msgid "_Attributes" + msgstr "Typy atributù" + + msgid "" + "The attributes to show in the search result. Selecting NO attributs will " + "show ALL." + msgstr "" + #. find button ! #, fuzzy ! msgid "_Find" msgstr "Hledat" + #. Options button + #, fuzzy + msgid "_Options" + msgstr "Volby hledání" + #, fuzzy msgid "Please enter a valid search filter" msgstr "Musíte zadata DN pro novou polo¾ku" ! #, fuzzy, c-format ! msgid "Oops! Server '%s' not found!" msgstr "Nový server" #, fuzzy, c-format ! msgid "Searching for %s" msgstr "naèítám %s z %s" + msgid "Reached maximum recursion depth" + msgstr "" + + #, c-format + msgid "Searching on server '%1$s' below '%2$s'" + msgstr "" + + #, c-format + msgid "Error searching below '%1$s': %2$s" + msgstr "" + + #. error + #, c-format + msgid "Unspecified error searching below '%1$s'" + msgstr "" + + #. statusbar_msg("%s", ldap_err2string(msg)); + #. else { #, c-format msgid "One entry found" *************** *** 1115,1139 **** msgstr "" #, fuzzy msgid "No browser available" msgstr "®ádná vybraná data nejsou k dispozici" msgid "" ! "Sorry. No URI support available. Your LDAP toolkit does not support LDAP " ! "URIs." msgstr "" ! msgid "Failed to initialize LDAP structure." msgstr "Selhala inicializace LDAP struktury." ! msgid "Couldn't set protocol version to LDAPv3." msgstr "Nemohu nastavit verzi protokolu na LDAPv3" ! #, c-format ! msgid "Couldn't enable TLS on the LDAP connection: %s" msgstr "Nemohu povolit TLS na LDAP pøipojení: %s" msgid "" ! "TLS was not found to be supported by your LDAP libraries.\n" "See README.TLS for more information.\n" msgstr "" --- 1092,1129 ---- msgstr "" + #. Delete + msgid "Delete" + msgstr "Smazat" + #, fuzzy msgid "No browser available" msgstr "®ádná vybraná data nejsou k dispozici" + #, fuzzy, c-format + msgid "Failed to initialize LDAP structure for server '%1$s': %2$s." + msgstr "Selhala inicializace LDAP struktury." + + #, c-format msgid "" ! "Cannot connect to '%s'. No URI support available. Your LDAP toolkit does not " ! "support LDAP URIs." msgstr "" ! #, fuzzy, c-format ! msgid "Failed to initialize LDAP structure for server %1$s: %2$s." msgstr "Selhala inicializace LDAP struktury." ! #, fuzzy, c-format ! msgid "Server '%s': Couldn't set protocol version to LDAPv3." msgstr "Nemohu nastavit verzi protokolu na LDAPv3" ! #, fuzzy, c-format ! msgid "Couldn't enable TLS on the LDAP connection to '%1$s': %2$s" msgstr "Nemohu povolit TLS na LDAP pøipojení: %s" + #, fuzzy, c-format msgid "" ! "Cannot use TLS with server '%s'. TLS was not found to be supported by your " ! "LDAP libraries.\n" "See README.TLS for more information.\n" msgstr "" *************** *** 1141,1145 **** --- 1131,1137 ---- "Pro více informací se podívejte do souboru README.TLS.\n" + #, fuzzy, c-format msgid "" + "Cannot cache LDAP objects for server '%s'.\n" "OpenLDAP client-side caching was not enabled.\n" "See configure --help for more information.\n" *************** *** 1148,1152 **** --- 1140,1146 ---- "Pro více informací spus»te 'configure --help'.\n" + #, fuzzy, c-format msgid "" + "Cannot use Kerberos bind with '%s'.\n" "GQ was compiled without Kerberos support.\n" "Run 'configure --help' for more information\n" *************** *** 1155,1159 **** --- 1149,1155 ---- "Pro více informacací spus»e 'configure --help'.\n" + #, fuzzy, c-format msgid "" + "Cannot use SASL bind with '%s'.\n" "GQ was compiled without SASL support.\n" "Run 'configure --help' for more information\n" *************** *** 1162,1170 **** "Pro více informacací spus»e 'configure --help'.\n" ! #, c-format ! msgid "Couldn't bind LDAP connection: %s" msgstr "Nelze se pøipojit k LDAP pøipojení %s" ! msgid "Could not set critical ManageDSAit control" msgstr "" --- 1158,1177 ---- "Pro více informacací spus»e 'configure --help'.\n" ! #, fuzzy, c-format ! msgid "Couldn't bind LDAP connection to '%1$s': %2$s" msgstr "Nelze se pøipojit k LDAP pøipojení %s" ! #, c-format ! msgid "" ! "Could not set critical ManageDSAit control on connection to server '%s'." ! msgstr "" ! ! #, c-format ! msgid "Could not disable following referrals on connection to server '%s'." ! msgstr "" ! ! #, c-format ! msgid "" ! "Initialized temporary server-definition '%1$s' from existing server '%2$s'" msgstr "" *************** *** 1173,1182 **** msgstr "Heslo pro server %s" ! #, c-format ! msgid "connecting to %s" msgstr "pøipojování k %s" #, fuzzy, c-format ! msgid "connecting to %1$s port %2$d" msgstr "pøipojování k %s port %d" --- 1180,1189 ---- msgstr "Heslo pro server %s" ! #, fuzzy, c-format ! msgid "Connecting to %s" msgstr "pøipojování k %s" #, fuzzy, c-format ! msgid "Connecting to %1$s port %2$d" msgstr "pøipojování k %s port %d" *************** *** 1184,1189 **** msgstr "Chyba pøipojení k serveru" ! #, c-format ! msgid "deleting: %s" msgstr "odstraòuji: %s" --- 1191,1196 ---- msgstr "Chyba pøipojení k serveru" ! #, fuzzy, c-format ! msgid "Deleting: %s" msgstr "odstraòuji: %s" *************** *** 1191,1212 **** msgstr "Chyba odstranìní polo¾ky" ! #, c-format ! msgid "deleted %s" msgstr "odstranìno %s" ! #. XXX - This needs to be gotten rid of, and instead have the appropriate ! #. errors generated in the code that depends on server_by_name. ! #. -- a7r ! #. ! msgid "Error finding server" ! msgstr "Chyba nalezení serveru" ! ! msgid "Server not configured." ! msgstr "Server není konfigurován." ! ! #, c-format ! msgid "checking subtree for %s" msgstr "kontroluji podstrom pro %s" #, fuzzy msgid "_Yes" --- 1198,1212 ---- msgstr "Chyba odstranìní polo¾ky" ! #, fuzzy, c-format ! msgid "Deleted %s" msgstr "odstranìno %s" ! #, fuzzy, c-format ! msgid "Checking subtree for %s" msgstr "kontroluji podstrom pro %s" + msgid "Warning" + msgstr "Varování" + #, fuzzy msgid "_Yes" *************** *** 1218,1226 **** #. try LDAP V3 style config ! msgid "base search on NULL DN" msgstr "základ hledání je NULL DN" #. try Umich style config ! msgid "base search on cn=config" msgstr "základ hledání je cn=config" --- 1218,1228 ---- #. try LDAP V3 style config ! #, fuzzy, c-format ! msgid "Base search on NULL DN on server '%s'" msgstr "základ hledání je NULL DN" #. try Umich style config ! #, fuzzy ! msgid "Base search on cn=config" msgstr "základ hledání je cn=config" *************** *** 1272,1275 **** --- 1274,1289 ---- msgstr "Pøesouvání/kopírování LDAP objektù" + #, c-format + msgid "Error during base search for '%1$s': %2$s" + msgstr "" + + #, fuzzy, c-format + msgid "Error adding new entry '%1$s': %2$s" + msgstr "Chyba pøi pøidávání polo¾ky" + + #, fuzzy, c-format + msgid "Error deleting '%1$s': %2$s" + msgstr "Chyba odstranìní polo¾ky" + msgid "Do you really want to move this entry?" msgstr "Opravdu chcete pøesunout tuto polo¾ku?" *************** *** 1282,1286 **** msgstr "Vytvoøeno %s" ! msgid "Could not find source server by its nickname!" msgstr "Nemohu nalézt zdrojový server podle jeho pøezdívky!" --- 1296,1301 ---- msgstr "Vytvoøeno %s" ! #, fuzzy, c-format ! msgid "Could not find source server by its nickname ('%s')!" msgstr "Nemohu nalézt zdrojový server podle jeho pøezdívky!" *************** *** 1315,1318 **** --- 1330,1345 ---- msgstr "" + #, fuzzy, c-format + msgid "Cannot find server by its nickname ('%s')" + msgstr "Nemohu nalézt zdrojový server podle jeho pøezdívky!" + + #, c-format + msgid "Server '%s' down. Export may be incomplete!" + msgstr "" + + #, c-format + msgid "LDAP error while searching below '%s'. Export may be incomplete!" + msgstr "" + msgid "" "Do you really want to paste this entry recursively?\n" *************** *** 1380,1383 **** --- 1407,1495 ---- msgid "Number of revoked certificates" msgstr "Poèet revokovaných certifikátù" + + #, fuzzy + #~ msgid "Expand entry" + #~ msgstr "Rozbalit v¹e" + + #~ msgid "onelevel search on %s" + #~ msgstr "jednoúrovòové hledání na %s" + + #, fuzzy + #~ msgid "One entry found (running)" + #~ msgid_plural "%d entries found (running)" + #~ msgstr[0] "hledání (bì¾í)" + + #, fuzzy + #~ msgid "One entry found (finished)" + #~ msgid_plural "%d entries found (finished)" + #~ msgstr[0] "hledání (dokonèeno)" + + #, fuzzy + #~ msgid "Nickname" + #~ msgstr "Název" + + #, fuzzy + #~ msgid "Port" + #~ msgstr "LDAP port" + + #, fuzzy + #~ msgid "Connections so far" + #~ msgstr "pøipojování k %s" + + #, fuzzy + #~ msgid "Vendor Version" + #~ msgstr "Verze" + + #, fuzzy + #~ msgid "Save failed: Only %1$d of %2$d bytes written" + #~ msgstr "%d z %d bajtù zapsáno" + + #~ msgid "subtree search on %s" + #~ msgstr "hledání v podstromu na %s" + + #, fuzzy + #~ msgid "%1$d of %2$d bytes written" + #~ msgstr "%d z %d bajtù zapsáno" + + #~ msgid "Save LDIF" + #~ msgstr "Ulo¾it LDIF" + + #~ msgid "" + #~ "This entry has a subtree!\n" + #~ "Do you want to delete every entry under it as well?" + #~ msgstr "" + #~ "Tato polo¾ka má podstrom!\n" + #~ "Chcete také smazat ka¾dou podpolo¾ku?" + + #~ msgid "New" + #~ msgstr "Nový" + + #~ msgid "Use current entry" + #~ msgstr "Pou¾ít aktuální polo¾ku" + + #~ msgid "Expand all" + #~ msgstr "Rozbalit v¹e" + + #~ msgid "Export to LDIF" + #~ msgstr "Exportovat do LDIF" + + #, fuzzy + #~ msgid "Search below" + #~ msgstr "Vyhledávací re¾im" + + #~ msgid "Copy" + #~ msgstr "Kopírovat" + + #~ msgid "Copy all" + #~ msgstr "Kopírovat v¹e" + + #~ msgid "Paste" + #~ msgstr "Vlo¾it" + + #~ msgid "Error finding server" + #~ msgstr "Chyba nalezení serveru" + + #~ msgid "Server not configured." + #~ msgstr "Server není konfigurován." #, fuzzy Index: ja.po =================================================================== RCS file: /cvsroot/gqclient/gq/po/ja.po,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ja.po 10 Oct 2003 08:22:25 -0000 1.10 --- ja.po 21 Oct 2003 06:35:05 -0000 1.11 *************** *** 6,10 **** msgstr "" "Project-Id-Version: gq 1.0alpha1_pre1\n" ! "POT-Creation-Date: 2003-10-10 09:03+0200\n" "PO-Revision-Date: 2003-10-01 12:06+0900\n" "Last-Translator: Hatuka*nezumi <ne...@jc...>\n" --- 6,10 ---- msgstr "" "Project-Id-Version: gq 1.0alpha1_pre1\n" ! "POT-Creation-Date: 2003-10-21 07:06+0200\n" "PO-Revision-Date: 2003-10-01 12:06+0900\n" [...968 lines suppressed...] + + #~ msgid "Search below" + #~ msgstr "¤³¤ÎÃæ¤ò¸¡º÷" + + #~ msgid "Copy" + #~ msgstr "¥³¥Ô¡¼" + + #~ msgid "Copy all" + #~ msgstr "¤¹¤Ù¤Æ¥³¥Ô¡¼" + + #~ msgid "Paste" + #~ msgstr "ޤê¤Ä¤±" + + #~ msgid "Error finding server" + #~ msgstr "¥µ¡¼¥Ð¸¡º÷Ãæ¤Î¥¨¥é¡¼" + + #~ msgid "Server not configured." + #~ msgstr "¥µ¡¼¥Ð¤ÎÀßÄ꤬¤·¤Æ¤¢¤ê¤Þ¤»¤ó." #, fuzzy Index: zh_CN.po =================================================================== RCS file: /cvsroot/gqclient/gq/po/zh_CN.po,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** zh_CN.po 10 Oct 2003 08:22:25 -0000 1.5 --- zh_CN.po 21 Oct 2003 06:35:05 -0000 1.6 *************** *** 6,10 **** msgstr "" "Project-Id-Version: 0.7.0beta2\n" ! "POT-Creation-Date: 2003-10-10 09:03+0200\n" "PO-Revision-Date: 2003-01-04 02:58+0800\n" "Last-Translator: hleil liu <hl...@ya...>\n" --- 6,10 ---- msgstr "" "Project-Id-Version: 0.7.0beta2\n" ! "POT-Creation-Date: 2003-10-21 07:06+0200\n" "PO-Revision-Date: 2003-01-04 02:58+0800\n" [...971 lines suppressed...] + + #~ msgid "Search below" + #~ msgstr "ËÑË÷ÏÂÒ»¸ö" + + #~ msgid "Copy" + #~ msgstr "¸´ÖÆ" + + #~ msgid "Copy all" + #~ msgstr "È«²¿¸´ÖÆ" + + #~ msgid "Paste" + #~ msgstr "Õ³Ìù" + + #~ msgid "Error finding server" + #~ msgstr "ѰÕÒ·þÎñÆ÷´íÎó" + + #~ msgid "Server not configured." + #~ msgstr "·þÎñÆ÷δ×÷ÅäÖÃ" #, fuzzy |
From: <sta...@us...> - 2003-10-21 06:38:58
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv25090 Modified Files: TODO Log Message: * Updates Index: TODO =================================================================== RCS file: /cvsroot/gqclient/gq/TODO,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** TODO 20 Oct 2003 06:40:57 -0000 1.40 --- TODO 21 Oct 2003 06:34:33 -0000 1.41 *************** *** 10,20 **** ---------------- ! * [1.0] Search-Mode: Avoid circular reference when chasing referrals, use ! maximum recursion depth for chasing. * [1.0] Search-Mode: Get rid of sortdn - implement through search options ! * [1.0] Allow to use a "master password" for passwords stored in the .gq ! Shouldn't be too hard - implement through the encoding XML element. * [1.0] Re-introduce the Export to LDIF functionality for servers --- 10,22 ---- ---------------- ! * [1.0] SECURITY: Think about the extended referred-to server authentication ! tests in get_referral_server and the security implications (configurable?) * [1.0] Search-Mode: Get rid of sortdn - implement through search options ! * [1.x] Allow to use a "master password" for passwords stored in the ! .gq config file. Shouldn't be too hard - either implement through ! the encoding XML element, or do this through the xmlsec library ! once it becomes available in mainstream distros. * [1.0] Re-introduce the Export to LDIF functionality for servers *************** *** 88,94 **** * Make the tabs (Search/Browse/Schema) object oriented. Partly done. - * [1.0] Referral support - - Make search mode referral-aware - * templates: allow defaults? --- 90,93 ---- *************** *** 120,125 **** browser must remain working. - * [1.x] improve gtk2 support - * [1.x] never do ldap_add when moving trees. (Use triangulation like with the towers of hanoi?) Only change DNs to make sure NO --- 119,122 ---- *************** *** 148,151 **** --- 145,157 ---- FIXED BUGS / IMPLEMENTED ENHANCEMENTS ------------------------------------- + + * [1.x] improve gtk2 support - Quite impressive by now. + + * [1.0] Search-Mode: Avoid circular reference when chasing referrals, use + maximum recursion depth for chasing. - partly done, but OK: the + max. recursion depths allows to avoid infinit recursion. + + * [1.0] Referral support + - Make search mode referral-aware * [1.x] Make struct ldapserver a reference counting GObject to make |
From: <sta...@us...> - 2003-10-21 06:38:45
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv10408 Modified Files: search.c Log Message: * Added a proper title to the search-result popup menu, disable menu items if they cannot be used (Cannot locate a found object in a browser if the object was found when following a referral). Index: search.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.c,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** search.c 20 Oct 2003 08:37:18 -0000 1.56 --- search.c 21 Oct 2003 04:59:18 -0000 1.57 *************** *** 1717,1721 **** struct resultset *set) { ! GtkWidget *root_menu, *menu, *menu_item; /* this is a hack to pass the selected set under the menu to the callbacks. --- 1717,1723 ---- struct resultset *set) { ! GtkWidget *root_menu, *menu, *menu_item, *label; ! int transient = is_transient_server(set->server); ! char **exploded_dn = NULL, *name; /* this is a hack to pass the selected set under the menu to the callbacks. *************** *** 1728,1731 **** --- 1730,1751 ---- menu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(root_menu), menu); + + exploded_dn = gq_ldap_explode_dn(set->dn, FALSE); + + if (exploded_dn) { + name = exploded_dn[0]; + } else { + name = set->dn; + } + + label = gtk_menu_item_new_with_label(name); + gtk_widget_set_sensitive(label, FALSE); + gtk_widget_show(label); + + gtk_menu_append(GTK_MENU(menu), label); + gtk_menu_set_title(GTK_MENU(menu), name); + + if (exploded_dn) gq_exploded_free(exploded_dn); + #if GTK_MAJOR >= 2 menu_item = gtk_separator_menu_item_new(); *************** *** 1760,1763 **** --- 1780,1784 ---- (gpointer) tab); gtk_widget_show(menu_item); + gtk_widget_set_sensitive(GTK_WIDGET(menu_item), !transient); /* Add all to Browser */ *************** *** 1768,1771 **** --- 1789,1793 ---- (gpointer) tab); gtk_widget_show(menu_item); + gtk_widget_set_sensitive(GTK_WIDGET(menu_item), !transient); /* separator */ |
From: <sta...@us...> - 2003-10-21 06:34:04
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv24993 Modified Files: COPYING Log Message: * Streamlined copyright notices, I hope it is OK for Bert Index: COPYING =================================================================== RCS file: /cvsroot/gqclient/gq/COPYING,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** COPYING 30 Sep 2003 17:20:24 -0000 1.2 --- COPYING 21 Oct 2003 06:33:41 -0000 1.3 *************** *** 1,5 **** GQ -- a GTK-based LDAP client Copyright (C) 1998-2003 Bert Vermeulen ! Parts: Copyright (C) 2002-2003 Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,5 ---- GQ -- a GTK-based LDAP client Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with |
From: <sta...@us...> - 2003-10-21 06:06:07
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv8691 Modified Files: Makefile.am formfill.h syntax.c Added Files: dt_int.c dt_int.h dt_numstr.c dt_numstr.h Log Message: * Added two new display-types for integers and numeric strings - Straight forward --- NEW FILE: dt_int.c --- /* GQ -- a GTK-based LDAP client Copyright (C) 1998-2001 Bert Vermeulen This file (dt_entry.c) is Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: dt_int.c,v 1.1 2003/10/21 04:46:41 stamfest Exp $ */ #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <glib.h> #include <gdk/gdk.h> #include <gtk/gtk.h> #include <config.h> #include "dt_int.h" #include "common.h" #include "util.h" #include "errorchain.h" #include "input.h" #include "tinput.h" #include "browse.h" #include "encode.h" #include "ldif.h" /* for b64_decode */ #include "syntax.h" #include "dtutil.h" #include "utf8-compat.h" static dt_int_handler dt_int_handler_vtab = { { "Integer", TRUE, TRUE, dt_int_get_widget, dt_int_get_data, dt_int_set_data, bervalLDAPMod }, #if GTK_MAJOR < 2 decode_utf8, /* encode method */ encode_utf8, /* decode method */ #else /* gtk2 uses UTF-8 natively! Yipieeh */ NULL, NULL, #endif }; display_type_handler *dt_int_get_handler() { return (display_type_handler *) &dt_int_handler_vtab; } static void dt_int_verify(GtkWidget *entry) { char *txt = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); gunichar c; if (txt) { GString *s = g_string_sized_new(strlen(txt)); int nope = 0; char *t; /* allow only digits, no leading zeroes */ for(t = txt, c = g_utf8_get_char(t) ; c ; t = g_utf8_next_char(t), c = g_utf8_get_char(t)) { if (g_unichar_isdigit(c)) { g_string_append_unichar(s, c); } else { nope = 1; } } g_free(txt); txt = g_strcompress(s->str); /* one-byte chars only */ if (strcmp(txt, "0") != 0) { for(t = txt ; *t == '0' ; t++) nope = 1; if (*t == 0 && txt != t) t--; /* must have zeros-only string */ } if (nope) { gtk_entry_set_text(GTK_ENTRY(entry), t); } g_string_free(s, TRUE); } return; } GtkWidget *dt_int_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) { GtkWidget *hbox, *inputbox, *label; hbox = gtk_hbox_new(FALSE, 0); gtk_widget_show(hbox); inputbox = gtk_entry_new(); gtk_widget_show(inputbox); if(activatefunc) gtk_signal_connect_object(GTK_OBJECT(inputbox), "activate", GTK_SIGNAL_FUNC(activatefunc), (gpointer) funcdata); gtk_signal_connect(GTK_OBJECT(inputbox), "changed", GTK_SIGNAL_FUNC(dt_int_verify), (gpointer) NULL); gtk_box_pack_start(GTK_BOX(hbox), inputbox, TRUE, TRUE, 0); label = gtk_label_new(_("(int)")); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_object_set_data(GTK_OBJECT(hbox), "inputbox", inputbox); dt_int_set_data(form, data, hbox); return hbox; } GByteArray *dt_int_get_data(struct formfill *form, GtkWidget *widget) { return editable_get_text(GTK_EDITABLE(dt_int_retrieve_inputbox(widget))); } void dt_int_set_data(struct formfill *form, GByteArray *data, GtkWidget *widget) { editable_set_text(GTK_EDITABLE(dt_int_retrieve_inputbox(widget)), data, DT_INT(form->dt_handler)->encode, DT_INT(form->dt_handler)->decode); } GtkWidget *dt_int_retrieve_inputbox(GtkWidget *hbox) { return gtk_object_get_data(GTK_OBJECT(hbox), "inputbox"); } /* Local Variables: c-basic-offset: 5 End: */ --- NEW FILE: dt_int.h --- /* GQ -- a GTK-based LDAP client Copyright (C) 1998-2003 Bert Vermeulen Copyright (C) 2002-2003 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: dt_int.h,v 1.1 2003/10/21 04:46:41 stamfest Exp $ */ #ifndef DT_INT_H_INCLUDED #define DT_INT_H_INCLUDED #include "formfill.h" #include "syntax.h" #include "dt_entry.h" #include "i18n.h" typedef dt_entry_handler dt_int_handler; #define DT_INT(objpointer) ((dt_int_handler*)(objpointer)) display_type_handler *dt_int_get_handler(); /* Methods, only to be used by subclasses */ GtkWidget *dt_int_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); GByteArray *dt_int_get_data(struct formfill *form, GtkWidget *widget); void dt_int_set_data(struct formfill *form, GByteArray *data, GtkWidget *widget); GtkWidget *dt_int_retrieve_inputbox(GtkWidget *hbox); #endif /* Local Variables: c-basic-offset: 5 End: */ --- NEW FILE: dt_numstr.c --- /* GQ -- a GTK-based LDAP client Copyright (C) 1998-2001 Bert Vermeulen This file (dt_entry.c) is Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: dt_numstr.c,v 1.1 2003/10/21 04:46:41 stamfest Exp $ */ #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <glib.h> #include <gdk/gdk.h> #include <gtk/gtk.h> #include <config.h> #include "dt_numstr.h" #include "common.h" #include "util.h" #include "errorchain.h" #include "input.h" #include "tinput.h" #include "browse.h" #include "encode.h" #include "ldif.h" /* for b64_decode */ #include "syntax.h" #include "dtutil.h" #include "utf8-compat.h" static dt_numstr_handler dt_numstr_handler_vtab = { { "Numeric String", TRUE, TRUE, dt_numstr_get_widget, dt_numstr_get_data, dt_numstr_set_data, bervalLDAPMod }, #if GTK_MAJOR < 2 decode_utf8, /* encode method */ encode_utf8, /* decode method */ #else /* gtk2 uses UTF-8 natively! Yipieeh */ NULL, NULL, #endif }; display_type_handler *dt_numstr_get_handler() { return (display_type_handler *) &dt_numstr_handler_vtab; } static void dt_numstr_verify(GtkWidget *entry) { char *txt = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); gunichar c; if (txt) { GString *s = g_string_sized_new(strlen(txt)); int nope = 0; char *t; gunichar space = g_utf8_get_char(" "); /* allow only digits and spaces */ for(t = txt, c = g_utf8_get_char(t) ; c ; t = g_utf8_next_char(t), c = g_utf8_get_char(t)) { if (g_unichar_isdigit(c) || c == space) { g_string_append_unichar(s, c); } else { nope = 1; } } if (nope) { gtk_entry_set_text(GTK_ENTRY(entry), s->str); } g_string_free(s, TRUE); g_free(txt); } return; } GtkWidget *dt_numstr_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) { GtkWidget *hbox, *inputbox, *label; hbox = gtk_hbox_new(FALSE, 0); gtk_widget_show(hbox); inputbox = gtk_entry_new(); gtk_widget_show(inputbox); if(activatefunc) gtk_signal_connect_object(GTK_OBJECT(inputbox), "activate", GTK_SIGNAL_FUNC(activatefunc), (gpointer) funcdata); gtk_signal_connect(GTK_OBJECT(inputbox), "changed", GTK_SIGNAL_FUNC(dt_numstr_verify), (gpointer) NULL); gtk_box_pack_start(GTK_BOX(hbox), inputbox, TRUE, TRUE, 0); label = gtk_label_new(_("(ns)")); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_object_set_data(GTK_OBJECT(hbox), "inputbox", inputbox); dt_numstr_set_data(form, data, hbox); return hbox; } GByteArray *dt_numstr_get_data(struct formfill *form, GtkWidget *widget) { return editable_get_text(GTK_EDITABLE(dt_numstr_retrieve_inputbox(widget))); } void dt_numstr_set_data(struct formfill *form, GByteArray *data, GtkWidget *widget) { editable_set_text(GTK_EDITABLE(dt_numstr_retrieve_inputbox(widget)), data, DT_NUMSTR(form->dt_handler)->encode, DT_NUMSTR(form->dt_handler)->decode); } GtkWidget *dt_numstr_retrieve_inputbox(GtkWidget *hbox) { return gtk_object_get_data(GTK_OBJECT(hbox), "inputbox"); } /* Local Variables: c-basic-offset: 5 End: */ --- NEW FILE: dt_numstr.h --- /* GQ -- a GTK-based LDAP client Copyright (C) 1998-2003 Bert Vermeulen Copyright (C) 2002-2003 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: dt_numstr.h,v 1.1 2003/10/21 04:46:41 stamfest Exp $ */ #ifndef DT_NUMSTR_H_INCLUDED #define DT_NUMSTR_H_INCLUDED #include "formfill.h" #include "syntax.h" #include "dt_entry.h" #include "i18n.h" typedef dt_entry_handler dt_numstr_handler; #define DT_NUMSTR(objpointer) ((dt_numstr_handler*)(objpointer)) display_type_handler *dt_numstr_get_handler(); /* Methods, only to be used by subclasses */ GtkWidget *dt_numstr_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); GByteArray *dt_numstr_get_data(struct formfill *form, GtkWidget *widget); void dt_numstr_set_data(struct formfill *form, GByteArray *data, GtkWidget *widget); GtkWidget *dt_numstr_retrieve_inputbox(GtkWidget *hbox); #endif /* Local Variables: c-basic-offset: 5 End: */ Index: Makefile.am =================================================================== RCS file: /cvsroot/gqclient/gq/src/Makefile.am,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Makefile.am 17 Oct 2003 07:26:25 -0000 1.30 --- Makefile.am 21 Oct 2003 04:46:41 -0000 1.31 *************** *** 65,68 **** --- 65,70 ---- dt_crl.c \ dt_time.c \ + dt_int.c \ + dt_numstr.c \ ldapops.c \ tdefault.c \ *************** *** 113,116 **** --- 115,120 ---- dt_crl.h \ dt_time.h \ + dt_int.h \ + dt_numstr.h \ ldapops.h \ tdefault.h \ Index: formfill.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/formfill.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** formfill.h 2 Oct 2003 16:16:26 -0000 1.26 --- formfill.h 21 Oct 2003 04:46:41 -0000 1.27 *************** *** 54,57 **** --- 54,59 ---- # define DISPLAYTYPE_TIME 10 + # define DISPLAYTYPE_INT 11 + # define DISPLAYTYPE_NUMSTR 12 #define FLAG_NOT_IN_SCHEMA 0x01 Index: syntax.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/syntax.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** syntax.c 12 Oct 2003 06:14:18 -0000 1.17 --- syntax.c 21 Oct 2003 04:46:41 -0000 1.18 *************** *** 54,57 **** --- 54,59 ---- #include "dt_crl.h" #include "dt_time.h" + #include "dt_int.h" + #include "dt_numstr.h" /* Syntaxes we recognize and may handle specially. This is a rather *************** *** 222,226 **** { "1.3.6.1.4.1.1466.115.121.1.27", "INTEGER", ! DISPLAYTYPE_ENTRY, NULL, 0, --- 224,228 ---- { "1.3.6.1.4.1.1466.115.121.1.27", "INTEGER", ! DISPLAYTYPE_INT, NULL, 0, *************** *** 276,280 **** { "1.3.6.1.4.1.1466.115.121.1.36", "Numeric String", ! DISPLAYTYPE_ENTRY, NULL, 0, --- 278,282 ---- { "1.3.6.1.4.1.1466.115.121.1.36", "Numeric String", ! DISPLAYTYPE_NUMSTR, NULL, 0, *************** *** 519,522 **** --- 521,526 ---- #endif add_syntax(DISPLAYTYPE_TIME, dt_time_get_handler()); + add_syntax(DISPLAYTYPE_INT, dt_int_get_handler()); + add_syntax(DISPLAYTYPE_NUMSTR, dt_numstr_get_handler()); } |
From: <sta...@us...> - 2003-10-21 05:55:27
|
Update of /cvsroot/gqclient/gq/po In directory sc8-pr-cvs1:/tmp/cvs-serv14701 Modified Files: de.po Log Message: * Updated german translations Index: de.po =================================================================== RCS file: /cvsroot/gqclient/gq/po/de.po,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** de.po 13 Oct 2003 07:49:16 -0000 1.23 --- de.po 21 Oct 2003 05:29:12 -0000 1.24 *************** *** 6,11 **** msgstr "" "Project-Id-Version: gq 1.0\n" ! "POT-Creation-Date: 2003-10-13 09:41+0200\n" ! "PO-Revision-Date: 2003-10-13 09:47+0200\n" "Last-Translator: Peter Stamfest <pe...@st...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" --- 6,11 ---- msgstr "" "Project-Id-Version: gq 1.0\n" ! "POT-Creation-Date: 2003-10-21 07:06+0200\n" [...969 lines suppressed...] + + #~ msgid "Search below" + #~ msgstr "Suche darunter" + + #~ msgid "Copy" + #~ msgstr "Kopieren" + + #~ msgid "Copy all" + #~ msgstr "Alle kopieren" + + #~ msgid "Paste" + #~ msgstr "Einfügen" + + #~ msgid "Error finding server" + #~ msgstr "Server nicht gefunden" + + #~ msgid "Server not configured." + #~ msgstr "Server nicht konfiguriert" #~ msgid "line %1$d: boolean value '%2$s' should be 'True' or 'False'" |
From: <sta...@us...> - 2003-10-21 05:43:00
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv9323 Modified Files: prefs.c Log Message: * Get rid of a compile-time warning Index: prefs.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/prefs.c,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** prefs.c 20 Oct 2003 08:22:49 -0000 1.47 --- prefs.c 21 Oct 2003 04:51:06 -0000 1.48 *************** *** 1627,1631 **** { GtkWidget *stframe, *vbox_st, *viewframe, *vbox_view; ! GtkWidget *stradiobutton, *dnbutton, *ocbutton; GtkWidget *hbox_options, *sort_search_button; GSList *stgroup; --- 1627,1631 ---- { GtkWidget *stframe, *vbox_st, *viewframe, *vbox_view; ! GtkWidget *stradiobutton, *dnbutton; /* , *ocbutton; */ GtkWidget *hbox_options, *sort_search_button; GSList *stgroup; |
From: <sta...@us...> - 2003-10-21 05:38:04
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv9663 Modified Files: mainwin.c utf8-compat.h Log Message: * gtk 1.x fixes Index: mainwin.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/mainwin.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** mainwin.c 20 Oct 2003 08:10:29 -0000 1.49 --- mainwin.c 21 Oct 2003 04:53:50 -0000 1.50 *************** *** 291,295 **** gtk_editable_insert_text(GTK_EDITABLE(mainwin.ml_text), buf, strlen(buf), &pos); ! gtk_editable_insert_text(GTK_EDITABLE(mainwin.ml_text), "\n", 1, &pos) #endif } --- 291,296 ---- gtk_editable_insert_text(GTK_EDITABLE(mainwin.ml_text), buf, strlen(buf), &pos); ! gtk_editable_insert_text(GTK_EDITABLE(mainwin.ml_text), "\n", ! 1, &pos); #endif } *************** *** 371,376 **** --- 372,379 ---- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + #if GTK_MAJOR >= 2 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrwin), GTK_SHADOW_IN); + #endif gtk_box_pack_start(GTK_BOX(vbox0), scrwin, TRUE, TRUE, 0); *************** *** 384,388 **** #else text = gtk_text_new(NULL, NULL); ! gtk_text_set_editable(GTK_TEXT(inputbox), FALSE); #endif --- 387,391 ---- #else text = gtk_text_new(NULL, NULL); ! gtk_text_set_editable(GTK_TEXT(text), FALSE); #endif *************** *** 400,404 **** gtk_editable_insert_text(GTK_EDITABLE(text), I->data, strlen(I->data), &pos); ! gtk_editable_insert_text(GTK_EDITABLE(text), "\n", 1, &pos) #endif } --- 403,407 ---- gtk_editable_insert_text(GTK_EDITABLE(text), I->data, strlen(I->data), &pos); ! gtk_editable_insert_text(GTK_EDITABLE(text), "\n", 1, &pos); #endif } *************** *** 918,922 **** #if GTK_MAJOR < 2 hbox = gtk_hbox_new(FALSE, 0); ! gtk_container_border_width(GTK_CONTAINER(hbox), CONTAINER_BORDER_WIDTH); gtk_widget_show(hbox); gtk_box_pack_start(GTK_BOX(vbox1), hbox, TRUE, TRUE, 0); --- 921,925 ---- #if GTK_MAJOR < 2 hbox = gtk_hbox_new(FALSE, 0); ! /* gtk_container_border_width(GTK_CONTAINER(hbox), CONTAINER_BORDER_WIDTH); */ gtk_widget_show(hbox); gtk_box_pack_start(GTK_BOX(vbox1), hbox, TRUE, TRUE, 0); Index: utf8-compat.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/utf8-compat.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** utf8-compat.h 16 Oct 2003 21:30:05 -0000 1.3 --- utf8-compat.h 21 Oct 2003 04:53:50 -0000 1.4 *************** *** 36,39 **** --- 36,42 ---- # define g_utf8_get_char(p) (*(p)) # define g_utf8_next_char(p) (((char*)(p))+1) + # define g_unichar_isdigit(c) isdigit(c) + # define g_string_append_unichar(s,c) g_string_append_c((s),(c)) + # define g_strcompress(x) g_strdup(x) #else # include <glib/gunicode.h> |