]> saetta.ns0.it Git - zakauthe/plugins/smbldap/commitdiff
First compilation.
authorAndrea Zagli <azagli@libero.it>
Sun, 8 Aug 2010 13:15:49 +0000 (15:15 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 8 Aug 2010 13:15:49 +0000 (15:15 +0200)
configure.ac
src/Makefile.am
src/aute_smbldap.c
src/user.c

index 21178316df3d095e8c3a4507ae34d99f2e96f4dd..3cd1783df924f72c73419533c10e35f232dc8a0e 100644 (file)
@@ -18,13 +18,21 @@ AC_PROG_CC
 AC_PROG_LIBTOOL
 
 # Checks for libraries.
-PKG_CHECK_MODULES(LIBAUTEDB, [gtk+-2.0 >= 2.16.0
+PKG_CHECK_MODULES(LIBAUTESMBLDAP, [gtk+-2.0 >= 2.16.0
                               libaute >= 0.1.0
                               libgtkform >= 0.1.4])
 
 AC_SUBST(LIBAUTESMBLDAP_CFLAGS)
 AC_SUBST(LIBAUTESMBLDAP_LIBS)
 
+with_ldap=no
+AC_CHECK_LIB([ldap], [ldap_initialize], with_ldap=yes)
+
+if test "$with_ldap" = "yes"
+then
+       AC_SUBST(LIBLDAP_LIBS, [" -lldap"])
+fi
+
 PKG_CHECK_MODULES(LIBCONFI, [libconfi >= 0.0.2], [AC_DEFINE(HAVE_LIBCONFI, [1], [libconfi is present]), have_libconfi=yes], have_libconfi=no)
 
 AM_CONDITIONAL(HAVE_LIBCONFI, test x"$have_libconfi" = "xyes")
index 3a07774c4ff5e72486361a163540d727a7660f68..f69e3e7c5c918b916552ac37058371983362e9b4 100644 (file)
@@ -1,22 +1,22 @@
-guidir = $(datadir)/libaute-db/gui
-formdir = $(datadir)/libaute-db/form
+guidir = $(datadir)/libaute-smbldap/gui
+formdir = $(datadir)/libaute-smbldap/form
 
-AM_CPPFLAGS = $(LIBAUTEDB_CFLAGS) \
-              $(LIBGCRYPT_CFLAGS) \
+AM_CPPFLAGS = $(LIBAUTESMBLDAP_CFLAGS) \
+              $(LIBLDAP_CFLAGS) \
               $(LIBCONFI_CFLAGS) \
               -DGUIDIR=\""$(guidir)"\" \
               -DFORMDIR=\""$(formdir)"\"
 
-LIBS = $(LIBAUTEDB_LIBS) \
-       $(LIBGCRYPT_LIBS) \
+LIBS = $(LIBAUTESMBLDAP_LIBS) \
+       $(LIBLDAP_LIBS) \
        $(LIBCONFI_LIBS)
 
 libaute_pluginsdir = $(libdir)/libaute/plugins
-libaute_plugins_LTLIBRARIES = libaute-db.la
+libaute_plugins_LTLIBRARIES = libaute-smbldap.la
 
-libaute_db_la_SOURCES = aute_db.c \
-                        aute_db.h \
+libaute_smbldap_la_SOURCES = aute_smbldap.c \
+                        aute_smbldap.h \
                         user.c \
                         user.h
 
-libaute_db_la_LDFLAGS = -no-undefined
+libaute_smbldap_la_LDFLAGS = -no-undefined
index 0eaa04634bc3c83251b2eda49079330417e5840e..c63d2b87f6ef4432d50012cae4729ae1fa89dd9c 100644 (file)
@@ -108,7 +108,7 @@ static GtkWindow
 }
 
 static gchar
-*controllo ()
+*controllo (GSList *parameters)
 {
        gchar *user_dn;
        gchar *utente;
@@ -392,12 +392,6 @@ gchar
 
        error = NULL;
 
-       get_gdaex (parameters);
-       if (gdaex == NULL)
-               {
-                       return NULL;
-               }
-
        gtkbuilder = gtk_builder_new ();
 
 #ifdef G_OS_WIN32
@@ -444,7 +438,7 @@ gchar
                {
                        case GTK_RESPONSE_OK:
                                /* controllo dell'utente e della password */
-                               ret = controllo ();
+                               ret = controllo (parameters);
                                break;
 
                        case GTK_RESPONSE_CANCEL:
index 251c9d3014942362e0eef508241fdc9429ba0645..12e1648d1202bb47489a901d80d11a7ed89a424d 100644 (file)
@@ -20,7 +20,7 @@
 #include <libgtkform/form.h>
 
 #include "user.h"
-#include "aute_db.h"
+#include "aute_smbldap.h"
 
 static void user_class_init (UserClass *klass);
 static void user_init (User *user);
@@ -229,8 +229,6 @@ user_salva (User *user)
 
        if (priv->code == NULL || g_strcmp0 (priv->code, "") == 0)
                {
-                       gtk_label_set_text (GTK_LABEL (priv->objects[LBL_PASSWORD]),
-                                           autedb_cifra_password (gtk_entry_get_text (GTK_ENTRY (priv->objects[TXT_CODE]))));
                        sql = gtk_form_get_sql (priv->form, GTK_FORM_SQL_INSERT);
                }
        else