Your message dated Mon, 13 Nov 2006 05:02:18 -0800
with message-id <[EMAIL PROTECTED]>
and subject line Bug#365206: fixed in gq 1.2.1-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gq
Version: 1.0beta1-4
Severity: wishlist

When shadow informations are stored in ldap, the two fields
passwordLastChanged and shadowExpires are "days after 1970-01-01".

gq displays these seconds as an integer, so you need to use some
external means to to the conversion between days and a human readable
date.

The attached patch adds a hack to modify those two fields easily.

Please send upstream.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (989, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.11-walker
Locale: LANG=de_DE.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages gq depends on:
ii  libatk1.0-0              1.11.4-1        The ATK accessibility toolkit
ii  libc6                    2.3.6-7         GNU C Library: Shared libraries
ii  libglib2.0-0             2.10.2-1        The GLib library of C routines
ii  libgtk2.0-0              2.8.17-1        The GTK+ graphical user interface 
ii  libldap2                 2.1.30-13       OpenLDAP libraries
ii  libpango1.0-0            1.12.1-2        Layout and rendering of internatio
ii  libssl0.9.7              0.9.7i-1        SSL shared libraries
ii  libxml2                  2.6.23.dfsg.2-3 GNOME XML library
ii  zlib1g                   1:1.2.3-11      compression library - runtime

gq recommends no packages.

-- no debconf information
--- gq-1.0beta1.orig/src/formfill.h
+++ gq-1.0beta1/src/formfill.h
@@ -56,6 +56,7 @@
 #  define DISPLAYTYPE_TIME	10
 #  define DISPLAYTYPE_INT	11
 #  define DISPLAYTYPE_NUMSTR	12
+#  define DISPLAYTYPE_DATE	13
 
 #define FLAG_NOT_IN_SCHEMA      0x01
 #define FLAG_MUST_IN_SCHEMA	0x02
--- gq-1.0beta1.orig/src/Makefile.am
+++ gq-1.0beta1/src/Makefile.am
@@ -65,6 +65,7 @@
 	dt_cert.c \
 	dt_crl.c \
 	dt_time.c \
+	dt_date.c \
 	dt_int.c \
 	dt_numstr.c \
 	ldapops.c \
@@ -116,6 +117,7 @@
 	dt_cert.h \
 	dt_crl.h \
 	dt_time.h \
+	dt_date.h \
 	dt_int.h \
 	dt_numstr.h \
 	ldapops.h \
--- gq-1.0beta1.orig/src/Makefile.in
+++ gq-1.0beta1/src/Makefile.in
@@ -180,6 +180,7 @@
 	dt_cert.c \
 	dt_crl.c \
 	dt_time.c \
+	dt_date.c \
 	dt_int.c \
 	dt_numstr.c \
 	ldapops.c \
@@ -232,6 +233,7 @@
 	dt_cert.h \
 	dt_crl.h \
 	dt_time.h \
+	dt_date.h \
 	dt_int.h \
 	dt_numstr.h \
 	ldapops.h \
@@ -275,7 +277,8 @@
 	dt_time.$(OBJEXT) dt_int.$(OBJEXT) dt_numstr.$(OBJEXT) \
 	ldapops.$(OBJEXT) tdefault.$(OBJEXT) browse-dnd.$(OBJEXT) \
 	i18n.$(OBJEXT) gq-xml.$(OBJEXT) xmlparse.$(OBJEXT) \
-	xmlutil.$(OBJEXT) progress.$(OBJEXT) state.$(OBJEXT)
+	xmlutil.$(OBJEXT) progress.$(OBJEXT) state.$(OBJEXT) \
+	dt_date.$(OBJEXT)
 gq_OBJECTS = $(am_gq_OBJECTS)
 gq_DEPENDENCIES = COPYING.o
 gq_LDFLAGS =
@@ -310,7 +313,8 @@
 @AMDEP_TRUE@	./$(DEPDIR)/state.Po ./$(DEPDIR)/syntax.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/tdefault.Po ./$(DEPDIR)/template.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/tinput.Po ./$(DEPDIR)/util.Po \
[EMAIL PROTECTED]@	./$(DEPDIR)/xmlparse.Po ./$(DEPDIR)/xmlutil.Po
[EMAIL PROTECTED]@	./$(DEPDIR)/xmlparse.Po ./$(DEPDIR)/xmlutil.Po \
[EMAIL PROTECTED]@	./$(DEPDIR)/dt_date.Po
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
@@ -386,6 +390,7 @@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
[EMAIL PROTECTED]@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
--- gq-1.0beta1.orig/src/syntax.c
+++ gq-1.0beta1/src/syntax.c
@@ -53,6 +53,7 @@
 #include "dt_time.h"
 #include "dt_int.h"
 #include "dt_numstr.h"
+#include "dt_date.h"
 
 /* Syntaxes we recognize and may handle specially. This is a rather
    inefficient way to store oids (we search by string-comparison, but
@@ -61,6 +62,7 @@
 
 static int octetString_attr(const char *attr, const char *syntax_oid);
 static int oid_attr(const char *attr, const char *syntax_oid);
+static int int_attr(const char *attr, const char *syntax_oid);
 
 static struct syntax_handler syntaxes[] = {
      { "1.3.6.1.4.1.1466.115.121.1.1",
@@ -222,7 +224,7 @@
      { "1.3.6.1.4.1.1466.115.121.1.27",
        "INTEGER",
        DISPLAYTYPE_INT,
-       NULL,
+       int_attr,
        0,
      },
      { "1.3.6.1.4.1.1466.115.121.1.28",
@@ -444,6 +446,16 @@
      return DISPLAYTYPE_ENTRY;
 }
 
+static int int_attr(const char *attr, const char *syntax_oid) {
+     if(!strcasecmp(attr, "shadowLastChange")) {
+	  return DISPLAYTYPE_DATE;
+     }
+     if(!strcasecmp(attr, "shadowExpire")) {
+	  return DISPLAYTYPE_DATE;
+     }
+     return DISPLAYTYPE_INT;
+}
+
 /* mapping of display types to handlers */
 static GHashTable *dt_handlers = NULL;
 
@@ -520,6 +532,7 @@
     add_syntax(DISPLAYTYPE_TIME,	dt_time_get_handler());
     add_syntax(DISPLAYTYPE_INT,		dt_int_get_handler());
     add_syntax(DISPLAYTYPE_NUMSTR,	dt_numstr_get_handler());
+    add_syntax(DISPLAYTYPE_DATE,	dt_date_get_handler());
 }
 
 struct syntax_handler *get_syntax_handler_of_attr(int error_context, 
--- gq-1.0beta1.orig/src/dt_date.c
+++ gq-1.0beta1/src/dt_date.c
@@ -0,0 +1,271 @@
+/*
+    GQ -- a GTK-based LDAP client
+    Copyright (C) 2006 Philipp Hahn
+
+    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$ */
+
+#include <config.h>
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <time.h>
+
+#include <glib.h>
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
+
+#include "common.h"
+#include "util.h"
+#include "formfill.h"
+#include "dtutil.h"
+#include "dt_date.h"
+#include "i18n.h"
+
+static GtkWidget *dt_date_get_widget(int error_context,
+				     struct formfill *form, 
+				     GByteArray *data, 
+				     GtkSignalFunc *activatefunc,
+				     gpointer funcdata);
+
+static GByteArray *dt_date_get_data(struct formfill *form, 
+				    GtkWidget *widget);
+
+static void dt_date_set_data(struct formfill *form, 
+			     GByteArray *data, 
+			     GtkWidget *widget);
+
+static dt_date_handler dt_date_handler_vtab = {
+     "Generalized Date",
+     TRUE,
+     TRUE,
+
+     dt_date_get_widget,
+     dt_date_get_data,
+     dt_date_set_data,
+     bervalLDAPMod
+};
+
+typedef struct _cbdata {
+     struct formfill *form;
+     GtkWidget *hbox;
+     GtkWidget *editwindow;
+} cbdata;
+
+display_type_handler *dt_date_get_handler()
+{
+     return (display_type_handler *) &dt_date_handler_vtab;
+}
+
+static void dt_date_ok_callback(GtkWidget *button, cbdata *cbd) 
+{
+     GtkWidget *editwindow = cbd->editwindow; 
+     GtkWidget *w;
+     int y, m, d;
+     int sign;
+     char buffer[10];
+     time_t t = 0;
+     struct tm tm;
+
+     w = gtk_object_get_data(GTK_OBJECT(editwindow), "calendar");
+     if (w) {
+	  gtk_calendar_get_date(GTK_CALENDAR(w), &y, &m, &d);
+
+	  memset(&tm, 0, sizeof(struct tm));
+	  tm.tm_year = y - 1900;
+	  tm.tm_mon = m;
+	  tm.tm_mday = d;
+	  t = mktime(&tm);
+	  t /= 24*60*60;
+     }
+
+     snprintf(buffer, sizeof(buffer), "%ld", t);
+
+     w = gtk_object_get_data(GTK_OBJECT(cbd->hbox), "inputbox");
+     gtk_entry_set_text(GTK_ENTRY(w), buffer);
+     gtk_widget_destroy(editwindow);
+}
+
+static void dt_date_edit_window(GtkWidget *button, cbdata *cbd)
+{
+     GtkWidget *hbox = cbd->hbox;
+     GtkWidget *inputbox = dt_date_retrieve_inputbox(hbox); 
+     GtkWidget *editwindow, *main_vbox, *calendar, *w;
+     GtkWidget *hbox2, *button2;
+     GtkAdjustment *adj;
+     char titlebuffer[1024]; /* FIXME: fixed buffer length */
+
+     struct tm tm;
+     int y, m, d;
+     time_t t;
+     struct tm *l;
+     gchar *content;
+
+     time(&t);
+     l = localtime(&t); /* implicitly calls tzset() for us */
+     
+     y = l->tm_year;
+     m = l->tm_mon;
+     d = l->tm_mday;
+
+#ifdef GTK_WINDOW_DIALOG
+     editwindow = gtk_window_new(GTK_WINDOW_DIALOG);
+#else
+     editwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+#endif
+     cbd->editwindow = editwindow;
+
+     snprintf(titlebuffer, sizeof(titlebuffer),
+	      _("%s: choose date"), cbd->form->attrname);
+
+     gtk_window_set_title(GTK_WINDOW(editwindow), titlebuffer);
+     gtk_window_set_policy(GTK_WINDOW(editwindow), TRUE, TRUE, FALSE);
+
+     main_vbox = gtk_vbox_new(FALSE, 0);
+     gtk_container_border_width(GTK_CONTAINER(main_vbox), 5);
+     gtk_widget_show(main_vbox);
+     gtk_container_add(GTK_CONTAINER(editwindow), main_vbox);
+
+     calendar = gtk_calendar_new();
+     gtk_box_pack_start(GTK_BOX(main_vbox), calendar, TRUE, TRUE, 0);
+     gtk_widget_show(calendar);
+
+     gtk_object_set_data(GTK_OBJECT(editwindow), "calendar", calendar);
+
+     content = gtk_editable_get_chars(GTK_EDITABLE(inputbox), 0, -1);
+     if (content) {
+	  sscanf(content, "%ld", &t);
+	  t *= 24*60*60;
+	  gmtime_r(&t, &tm);
+	  y = tm.tm_year;
+	  m = tm.tm_mon;
+	  d = tm.tm_mday;
+	  g_free(content);
+     }
+
+     gtk_calendar_select_month(GTK_CALENDAR(calendar), m, y + 1900);
+     gtk_calendar_select_day(GTK_CALENDAR(calendar), d);
+
+     hbox2 = gtk_hbutton_box_new();
+     gtk_box_pack_start(GTK_BOX(main_vbox), hbox2, FALSE, TRUE, 5);
+     gtk_widget_show(hbox2);
+
+#if GTK_MAJOR >= 2
+     button2 = gtk_button_new_from_stock(GTK_STOCK_OK);
+#else
+     button2 = gq_button_new_with_label(_("_OK"));
+#endif
+     gtk_widget_show(button2);
+     gtk_signal_connect(GTK_OBJECT(button2), "clicked",
+			GTK_SIGNAL_FUNC(dt_date_ok_callback),
+			(gpointer) cbd);
+     gtk_box_pack_start(GTK_BOX(hbox2), button2, FALSE, TRUE, 0);
+     GTK_WIDGET_SET_FLAGS(button2, GTK_CAN_DEFAULT);
+     gtk_widget_grab_default(button2);
+
+#if GTK_MAJOR >= 2
+     button2 = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
+#else
+     button2 = gq_button_new_with_label(_("_Cancel"));
+#endif
+     gtk_box_pack_end(GTK_BOX(hbox2), button2, FALSE, TRUE, 0);
+     gtk_signal_connect_object(GTK_OBJECT(button2), "clicked",
+			       GTK_SIGNAL_FUNC(gtk_widget_destroy),
+			       (gpointer) editwindow);
+     gtk_widget_show(button2);
+
+     gtk_widget_show(editwindow);
+}
+
+static GtkWidget *dt_date_get_widget(int error_context,
+				     struct formfill *form, 
+				     GByteArray *data, 
+				     GtkSignalFunc *activatefunc,
+				     gpointer funcdata)
+{
+     GtkWidget *hbox, *inputbox, *button;
+     cbdata *cbd;
+
+     hbox = gtk_hbox_new(FALSE, 5);
+     
+     inputbox = gtk_entry_new();
+     if(activatefunc)
+	  gtk_signal_connect_object(GTK_OBJECT(inputbox), "activate",
+				    GTK_SIGNAL_FUNC(activatefunc),
+				    (gpointer) funcdata);
+
+     gtk_box_pack_start(GTK_BOX(hbox), inputbox, TRUE, TRUE, 0);
+     gtk_widget_show(inputbox);
+
+     button = gtk_button_new_with_label("...");
+     gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, TRUE, 0);
+
+     cbd = g_malloc(sizeof(cbdata));
+     cbd->form = form;
+     cbd->hbox = hbox;
+
+     gtk_signal_connect(GTK_OBJECT(button), "clicked",
+			GTK_SIGNAL_FUNC(dt_date_edit_window),
+			(gpointer) cbd);
+
+     gtk_object_set_data_full(GTK_OBJECT(hbox), "cbdata", cbd, g_free);
+
+     gtk_widget_show(button);
+
+     gtk_object_set_data(GTK_OBJECT(hbox), "inputbox", inputbox);
+     gtk_object_set_data(GTK_OBJECT(hbox), "button", button);
+
+     dt_date_set_data(form, data, hbox);
+
+     return hbox;
+}
+
+static GByteArray *dt_date_get_data(struct formfill *form, 
+				    GtkWidget *widget)
+{
+     return editable_get_text(GTK_EDITABLE(dt_date_retrieve_inputbox(widget)));
+}
+
+static void dt_date_set_data(struct formfill *form, 
+			     GByteArray *data, 
+			     GtkWidget *widget)
+{
+     editable_set_text(GTK_EDITABLE(dt_date_retrieve_inputbox(widget)),
+		       data, 
+		       NULL, NULL);
+}
+
+GtkWidget *dt_date_retrieve_inputbox(GtkWidget *hbox)
+{
+     return gtk_object_get_data(GTK_OBJECT(hbox), "inputbox");
+}
+
+
+/* 
+   Local Variables:
+   c-basic-offset: 5
+   End:
+ */
--- gq-1.0beta1.orig/src/dt_date.h
+++ gq-1.0beta1/src/dt_date.h
@@ -0,0 +1,49 @@
+/*
+    GQ -- a GTK-based LDAP client
+    Copyright (C) 1998-2001 Bert Vermeulen
+
+    This file (dt_date.h) is
+    Copyright (C) 2006 by Philipp Hahn
+
+    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$ */
+
+#ifndef DT_DATE_H_INCLUDED
+#define DT_DATE_H_INCLUDED
+
+#include "config.h"
+
+#include "syntax.h"
+
+typedef display_type_handler dt_date_handler;
+#define DT_DATE(objpointer) ((dt_date_handler *)(objpointer))
+
+display_type_handler *dt_date_get_handler();
+
+GtkWidget *dt_date_retrieve_inputbox(GtkWidget *widget);
+
+#endif /* DT_DATE_H_INCLUDED */
+
+/* 
+   Local Variables:
+   c-basic-offset: 5
+   End:
+ */

--- End Message ---
--- Begin Message ---
Source: gq
Source-Version: 1.2.1-1

We believe that the bug you reported is fixed in the latest version of
gq, which is due to be installed in the Debian FTP archive:

gq_1.2.1-1.diff.gz
  to pool/main/g/gq/gq_1.2.1-1.diff.gz
gq_1.2.1-1.dsc
  to pool/main/g/gq/gq_1.2.1-1.dsc
gq_1.2.1-1_i386.deb
  to pool/main/g/gq/gq_1.2.1-1_i386.deb
gq_1.2.1.orig.tar.gz
  to pool/main/g/gq/gq_1.2.1.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guido Trotter <[EMAIL PROTECTED]> (supplier of updated gq package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 13 Nov 2006 12:45:29 +0000
Source: gq
Binary: gq
Architecture: source i386
Version: 1.2.1-1
Distribution: experimental
Urgency: low
Maintainer: Guido Trotter <[EMAIL PROTECTED]>
Changed-By: Guido Trotter <[EMAIL PROTECTED]>
Description: 
 gq         - GTK-based LDAP client
Closes: 224921 236127 365206 376882
Changes: 
 gq (1.2.1-1) experimental; urgency=low
 .
   * New Upstream Release
     - can edit unix dates (closes: #365206)
     - includes freedesktop stype desktop file (closes: #376882)
     - can save new servers (closes: #236127)
     - ask for the bind dn as well as the password (closes: #224921)
   * Fix data/Makefile.am to fix wrong behaviour trying to install files
     outside of the specified $(DESTDIR)
   * Add build dependency on libxml-parser-perl, libgnome-keyring-dev,
     libgcrypt11-dev
   * Pass --disable-update-mimedb to configure and enable it via debhelper
   * Remove README.NLS and README.TLS from the shipped docs as they're not
     present upstream anymore
Files: 
 5c4af925a210e926e98d7d14aaacbba1 678 net optional gq_1.2.1-1.dsc
 e56613c81e70727c20ffe9974cdc6df0 395701 net optional gq_1.2.1.orig.tar.gz
 803799944a51731e9976f78c9ba01096 29702 net optional gq_1.2.1-1.diff.gz
 49ff7caa8f4aedd3cd1de9f7965690d1 205590 net optional gq_1.2.1-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFWGlnhImxTYgHUpsRAm6WAJ4jA6eC+2kYyb9Lnq1iq4W2JAbi+ACfa+/7
sQ/zdYNQUMMSfRoZrnGRaws=
=ACP2
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to