Subject: Second patch for imapd under Panther

From: Tom Brown <[email-masked]>
Date: Thu, 30 Oct 2003 21:52:46 -0500 (EST)

Hello again -

Here is a new patch that enables pam authentication by default under OS X,
and fixes the nonstandard directory problem.

I have verified that this works under OS X, if a proper pam configuration
file is created in /etc/pam.d.

Hopefully this can be included in the distribution. I recommend adding a
note to the install file indicating that OS X users should 'sudo cp
/etc/pam.d/chkpasswd /etc/pam.d/imap' in order to get it working.

Tom
diff -Nrup src/osdep/unix/Makefile /usr/local/src/imap-2002e/src/osdep/unix/Makefile
--- src/osdep/unix/Makefile	Mon Jul 14 21:24:24 2003
+++ /usr/local/src/imap-2002e/src/osdep/unix/Makefile	Thu Oct 30 20:47:05 2003
@@ -525,9 +525,10 @@ os4:	# OSF/1 (Digital UNIX) 4
 
 osx:	# Mac OS X
 	$(BUILD) `$(CAT) SPECIALS` OS=$@ \
-	 CRXTYPE=nfs \
+	 CHECKPW=pam CRXTYPE=nfs \
 	 SPOOLDIR=/var/spool MAILSPOOL=/var/mail \
-	 BASECFLAGS="-g -O"
+	 BASECFLAGS="-g -O -I/usr/include/pam -DPAMINCLUDED" \
+	 EXTRALDFLAGS="-lpam -ldl"
 
 ptx:	# PTX
 	$(BUILD) `$(CAT) SPECIALS` OS=$@ \
diff -Nrup src/osdep/unix/ckp_pam.c /usr/local/src/imap-2002e/src/osdep/unix/ckp_pam.c
--- src/osdep/unix/ckp_pam.c	Mon Apr 29 22:32:27 2002
+++ /usr/local/src/imap-2002e/src/osdep/unix/ckp_pam.c	Thu Oct 30 20:47:17 2003
@@ -18,7 +18,11 @@
  * CPYRIGHT, included with this Distribution.
  */
 
+#ifndef PAMINCLUDED
 #include <security/pam_appl.h>
+#else
+#include <pam_appl.h>
+#endif
 
 struct checkpw_cred {
   char *uname;			/* user name */

---

From: Mark Crispin <[email-masked]>
Date: Thu, 30 Oct 2003 19:04:15 -0800 (Pacific Standard Time)

Hi Tom -

I've already done something similar in the latest imap-2003 development
tarball.  Could you make sure that
	ftp://ftp.cac.washington.edu/mail/imap-2003.DEV.tar.Z
builds properly for you using the new "oxp" port ("OSX with PAM")?

The reason why I spawned a new port is that I am concerned that the PAM
version might not build under the previous version.

Thanks,

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.