[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-plugins
Subject:    Re: [SM-PLUGINS] Server Side Filter 1.5 RC1
From:       Johann Henriquez <jmhenril () gmail ! com>
Date:       2005-06-24 18:08:20
Message-ID: c8c2a89805062411082cecf41f () mail ! gmail ! com
[Download RAW message or body]

Hello,


On 6/17/05, p dont think <pdontthink@angrynerds.com> wrote:
> Feedback encouraged...

filtercmd.c does not compile when is using LDAP, I had to do this to
make it compile...
just like when 1.5-alpha came out.


--- filtercmd.c    Fri Jun 17 01:52:38 2005
+++ filtercmd.c Wed Jun 22 16:42:11 2005
@@ -804,15 +804,15 @@
  int getuserfromldap(char *user, uid_t *uid, gid_t *gid, char *home,
int buflen) {

         mdldapconfig *ldapcfg = NULL;
+        mdldaprec *mrec = NULL;

         // Read the config
         ldapcfg = (mdldapconfig*)get_ldap_config(LDAPCONFIG);
         if ( ldapcfg )
-          if ( !(ldapcfg->hostname && ldapcfg->database && ldapcfg->dbtable) )
+          if ( !(ldapcfg->hostname) )
               return ERR_LDAP_CONFIG_FILE_INCOMPLETE;

         // Find the user
-        mdldaprec *mrec = NULL;
         mrec = get_user_ldap(ldapcfg,(char*)user);
         if ( mrec ) {
             if (mrec->uidnumber == 0 || mrec->gidnumber == 0) {
@@ -822,7 +822,7 @@

             *uid = mrec->uidnumber;
             *gid = mrec->gidnumber;
-            strncpy(home, mrec->homedir, buflen);
+            strncpy(home, mrec->homedirectory, buflen);

             free_ldap_rec(&mrec);




--- Makefile.ldap  Sat May 21 15:11:04 2005
+++ Makefile.ldap    Wed Jun 22 16:29:48 2005
@@ -156,12 +157,12 @@

  # Change these as needed if you are using LDAP functionality
 #
-LDAP_FLAGS=-I/usr/include
-LDAP_LDFLAGS=-L/usr/lib
+LDAP_FLAGS=-I/usr/local/include
+LDAP_LDFLAGS=-L/usr/local/lib  -lldap -llber
@@ -198,7 +199,7 @@
        gcc -c ldap/mdldap.c $(CFLAGS) $(LDAP_FLAGS)

  mdldapconfig.o: ldap/mdldapconfig.c Makefile
-       gcc -c mysql/mdldapconfig.c $(CFLAGS)
+       gcc -c ldap/mdldapconfig.c $(CFLAGS)

  test: test.sh filtercmd
        sh test.sh


-- 
regards,
Johann Henriquez Lucero


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&opĚk
--
squirrelmail-plugins mailing list
Posting Guidelines: http://squirrelmail.org/wiki/wiki.php?MailingListPostingGuidelines
 List Address: squirrelmail-plugins@lists.sourceforge.net
List Archives: http://news.gmane.org/thread.php?groupList Archives: \
http://sourceforge.net/mailarchive/forum.php?forum_id931 List Info: \
https://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic