Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Problem with authdaemon 0.60.0 and 0.60.1 on
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
"Johnny C. Lam"  
View profile  
 More options Oct 9 2007, 4:50 pm
Newsgroups: mailing.unix.courier-imap
From: jlam-cour...@buildlink.org ("Johnny C. Lam")
Date: Wed, 10 Oct 2007 04:50:23 +0800 (CST)
Local: Tues, Oct 9 2007 4:50 pm
Subject: Re: [courier-users] Problem with authdaemon 0.60.0 and 0.60.1 on
This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_phoenix.buildlink.org-31105-1191962680-0001-2
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

OPEN_MAX is the value used in ll_daemon_start() to figure out an
available file descriptor.  I've heard that Mac OS X may have some
absurdly high value which may actually be larger than the actual file
descriptor table size.  Can you try the attached patch?

        Cheers,

        -- Johnny C. Lam

--=_phoenix.buildlink.org-31105-1191962680-0001-2
Content-Type: text/plain; name="lockdaemon.c.diff"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="lockdaemon.c.diff"

$NetBSD$

--- liblock/lockdaemon.c.orig   Wed Sep 26 02:44:34 2007
+++ liblock/lockdaemon.c
@@ -31,10 +31,21 @@
 #include       <sys/ioctl.h>
 #endif

-#ifndef OPEN_MAX
-#ifdef HAVE_SYSCONF
-#ifdef _SC_OPEN_MAX
-#define OPEN_MAX       (my_open_max())
+/*
+** XXX This should be replaced by an autoconf test, e.g.
+** XXX AC_FUNCS([getdtablesize]).
+*/
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
+    defined(__APPLE__)
+#define HAVE_GETDTABLESIZE 1
+#endif
+
+#if HAVE_GETDTABLESIZE
+#define MAX_FD         (getdtablesize()-1)
+#elif defined(OPEN_MAX)
+#define MAX_FD         (OPEN_MAX-1)
+#elif HAVE_SYSCONF && defined(_SC_OPEN_MAX)
+#define MAX_FD         (my_open_max()-1)

 static int my_open_max()
 {
@@ -45,12 +56,8 @@ static int my_open_max()
        return n;
 }

-#endif
-#endif
-#endif
-
-#ifndef OPEN_MAX
-#define OPEN_MAX       64
+#else
+#define MAX_FD         63
 #endif

 #define exit(_a_) _exit(_a_)
@@ -168,14 +175,14 @@ int       lockfd;
                lockfd=open(lockfile, O_RDWR|O_CREAT, 0600);
        }

-       if (lockfd < 0 || dup2(lockfd, OPEN_MAX-1) != OPEN_MAX-1)
+       if (lockfd < 0 || dup2(lockfd, MAX_FD) != MAX_FD)
        {
                perror(lockfile);
                exit(1);
        }

        close(lockfd);
-       lockfd=OPEN_MAX-1;
+       lockfd=MAX_FD;

 #ifdef FD_CLOEXEC
        if (fcntl(lockfd, F_SETFD, FD_CLOEXEC) < 0)

--=_phoenix.buildlink.org-31105-1191962680-0001-2
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
--=_phoenix.buildlink.org-31105-1191962680-0001-2
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
courier-users mailing list
courier-us...@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

--=_phoenix.buildlink.org-31105-1191962680-0001-2--


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Varshavchik  
View profile  
 More options Oct 9 2007, 6:36 pm
Newsgroups: mailing.unix.courier-imap
From: mr...@courier-mta.com (Sam Varshavchik)
Date: Wed, 10 Oct 2007 06:36:39 +0800 (CST)
Local: Tues, Oct 9 2007 6:36 pm
Subject: Re: [courier-users] Problem with authdaemon 0.60.0 and 0.60.1 on
This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--===============0006118771==
Content-Type: multipart/signed;
        boundary="=_mimegpg-commodore.email-scan.com-518-1191969078-0004";
        micalg=pgp-sha1; protocol="application/pgp-signature"

This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--=_mimegpg-commodore.email-scan.com-518-1191969078-0004
Content-Type: text/plain; format=flowed; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

That would probably be this:

2007-09-25  "Johnny C. Lam" <jlam-cour...@buildlink.org>

       =E2=80=A2liblock/lockdaemon.c (OPEN_MAX): Use OPEN_MAX, instead of =
hardcoded
        99

This code may not be working correctly on OS X. Someone with OS X will ne=
ed=20
to figure out what's not working right. As a random guess, try passing
CPPFLAGS=3D"-DOPEN_MAX=3D64" to configure.

--=_mimegpg-commodore.email-scan.com-518-1191969078-0004
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

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

iD8DBQBHDAE2x9p3GYHlUOIRArouAJ45zm/a4QuGOJ+OGVtMiRtkq34QTACdECtP
9/9SKWAEzNRjASTLaZGZd64=
=BLY8
-----END PGP SIGNATURE-----

--=_mimegpg-commodore.email-scan.com-518-1191969078-0004--

--===============0006118771==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
--===============0006118771==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
courier-users mailing list
courier-us...@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

--===============0006118771==--


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Johnny C. Lam"  
View profile  
 More options Oct 9 2007, 6:39 pm
Newsgroups: mailing.unix.courier-imap
From: jlam-cour...@buildlink.org ("Johnny C. Lam")
Date: Wed, 10 Oct 2007 06:39:36 +0800 (CST)
Local: Tues, Oct 9 2007 6:39 pm
Subject: Re: [courier-users] Problem with authdaemon 0.60.0 and 0.60.1 on
This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_phoenix.buildlink.org-32277-1191969254-0001-2
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I've cleaned up the patch so that it's more appropriate for inclusion
into the Courier sources.  It adds a check to configure.in (config.h.in
needs to be regenerated), and patches lockdaemon.c in a more direct way.

        Cheers,

        -- Johnny C. Lam

--=_phoenix.buildlink.org-32277-1191969254-0001-2
Content-Type: text/plain; name="liblock.diff"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="liblock.diff"

--- liblock/configure.in.orig   Wed Sep 26 02:44:34 2007
+++ liblock/configure.in
@@ -80,7 +80,7 @@ fi

 dnl Checks for library functions.

-AC_CHECK_FUNCS(setpgrp sysconf)
+AC_CHECK_FUNCS(getdtablesize setpgrp sysconf)
 AC_CHECK_FUNC(setpgrp,
        [
        AC_FUNC_SETPGRP
--- liblock/lockdaemon.c.orig   Wed Sep 26 02:44:34 2007
+++ liblock/lockdaemon.c
@@ -32,26 +32,4 @@
 #endif

-#ifndef OPEN_MAX
-#ifdef HAVE_SYSCONF
-#ifdef _SC_OPEN_MAX
-#define OPEN_MAX       (my_open_max())
-
-static int my_open_max()
-{
-       long n=sysconf(_SC_OPEN_MAX);
-
-       if (n == -1)
-               n=64;
-       return n;
-}
-
-#endif
-#endif
-#endif
-
-#ifndef OPEN_MAX
-#define OPEN_MAX       64
-#endif
-
 #define exit(_a_) _exit(_a_)

@@ -134,5 +112,5 @@ int i;
 static int start1(const char *lockfile, int fd)
 {
-int    lockfd;
+int    lockfd, maxfd;

 #if     HAVE_SETPGRP
@@ -169,5 +147,18 @@ int        lockfd;
        }

-       if (lockfd < 0 || dup2(lockfd, OPEN_MAX-1) != OPEN_MAX-1)
+#if HAVE_GETDTABLESIZE
+       maxfd=getdtablesize()-1;
+#elif defined(OPEN_MAX)
+       maxfd=OPEN_MAX-1;
+#elif HAVE_SYSCONF && defined(_SC_OPEN_MAX)
+       if ((maxfd=sysconf(_SC_OPEN_MAX)) < 0)
+               maxfd=63;
+       else if (maxfd > 0)
+               maxfd--;
+#else
+       maxfd=63;
+#endif
+
+       if (lockfd < 0 || dup2(lockfd, maxfd) != maxfd)
        {
                perror(lockfile);
@@ -176,5 +167,5 @@ int lockfd;

        close(lockfd);
-       lockfd=OPEN_MAX-1;
+       lockfd=maxfd;

 #ifdef FD_CLOEXEC

--=_phoenix.buildlink.org-32277-1191969254-0001-2
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
--=_phoenix.buildlink.org-32277-1191969254-0001-2
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
courier-users mailing list
courier-us...@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

--=_phoenix.buildlink.org-32277-1191969254-0001-2--


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Valk  
View profile  
 More options Oct 10 2007, 1:55 am
Newsgroups: mailing.unix.courier-imap
From: i...@richard5.net (Richard Valk)
Date: Wed, 10 Oct 2007 13:55:02 +0800 (CST)
Local: Wed, Oct 10 2007 1:55 am
Subject: Re: [courier-users] Problem with authdaemon 0.60.0 and 0.60.1 on

Johnny, I'll give it a try later today and will let you know what happens.

Richard

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
courier-users mailing list
courier-us...@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Valk  
View profile  
 More options Oct 10 2007, 3:58 pm
Newsgroups: mailing.unix.courier-imap
From: i...@richard5.net (Richard Valk)
Date: Thu, 11 Oct 2007 03:58:22 +0800 (CST)
Local: Wed, Oct 10 2007 3:58 pm
Subject: Re: [courier-users] Problem with authdaemon 0.60.0 and 0.60.1 on

Johnny,

The patch worked wonderfully. All issues solved and I've got a patched
version of 0.6.0.1 running on my mailserver.

I would like to thank you and Sam for the quick response and solution!

Regards,

Richard

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
courier-users mailing list
courier-us...@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google