From: Clinton Ebadi Date: Wed, 30 Apr 2014 03:07:48 +0000 (-0400) Subject: Merge branch 'debian' X-Git-Tag: debian/0.66.1-1_bpo70+hcoop1~1 X-Git-Url: https://git.hcoop.net/hcoop/debian/courier-authlib.git/commitdiff_plain/f77892e671e1261ec26e5133f86b8a52635f3dd2?hp=01037b081eab5fb3f208489dc3e052ec3a2c8ba1 Merge branch 'debian' Conflicts: debian/changelog --- diff --git a/authpam.c b/authpam.c index 9d40e69..2f2152b 100644 --- a/authpam.c +++ b/authpam.c @@ -128,19 +128,20 @@ static int dopam(pam_handle_t **pamh, int *started) } } -#if 0 #if HAVE_PAM_SETCRED + fprintf(stderr, "pam_setcred...\n"); if (retval == PAM_SUCCESS) { retval=pam_setcred(*pamh, PAM_ESTABLISH_CRED); if (retval != PAM_SUCCESS) { - DPRINTF("pam_setcred failed, result %d", retval); + fprintf(stderr, "pam_setcred failed, result %d\n", retval); } + fprintf(stderr, "pam_setcred done\n"); } #endif -#endif + if (retval == PAM_SUCCESS) { diff --git a/courier_auth_config.h b/courier_auth_config.h index 29f019e..21906a6 100644 --- a/courier_auth_config.h +++ b/courier_auth_config.h @@ -254,7 +254,7 @@ #define STDC_HEADERS 1 /* Location of the userdb database */ -#define USERDB "/usr/local/etc/authlib/userdb" +#define USERDB "/etc/courier/userdb" /* Version number of package */ /* #undef VERSION */ diff --git a/debian/changelog b/debian/changelog index 00b3c65..4dd64b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,12 @@ courier-authlib (0.66.1-1) unstable; urgency=low -- Stefan Hornburg (Racke) Mon, 28 Oct 2013 11:38:37 +0100 +courier-authlib (0.63.0-6+hcoop1) unstable; urgency=medium + + * Merged HCoop changes + + -- Clinton Ebadi Tue, 29 Apr 2014 20:17:45 -0400 + courier-authlib (0.63.0-6) unstable; urgency=low [Martin Orr ] @@ -100,6 +106,18 @@ courier-authlib (0.62.2-1) unstable; urgency=low -- Stefan Hornburg (Racke) Mon, 02 Mar 2009 16:09:05 +0100 +courier-authlib (0.61.0-1+lenny1hcoop1) lenny; urgency=low + + * Merge from Debian. Remaining changes: + + authpam.c: + - Revert the disabling of pam_setcred so that IMAP works on AFS. + + courier_auth_config.h: + - Set the userdb path to be /etc/courier/userdb. + + preauthuserdbcommon.c: + - Get AFS tokens. + + -- Michael Olson (HCoop) Thu, 09 Apr 2009 23:43:21 -0400 + courier-authlib (0.61.0-1+lenny1) testing-security; urgency=high * Non-maintainer upload by the security team @@ -128,6 +146,50 @@ courier-authlib (0.60.1-2.1) unstable; urgency=high -- Steffen Joeris Mon, 09 Jun 2008 15:29:23 +0000 +courier-authlib (0.60.2-0hcoop7) unstable; urgency=low + + * Revert last change. Now the AFS token code is before the callback. + + -- Michael Olson (HCoop) Thu, 07 Feb 2008 22:37:30 -0500 + +courier-authlib (0.60.2-0hcoop6) unstable; urgency=low + + * Move acquiting of AFS vmail tokens to just after callback. + + -- Michael Olson (HCoop) Sat, 02 Feb 2008 20:29:01 -0500 + +courier-authlib (0.60.2-0hcoop5) unstable; urgency=low + + * Move acquiring of AFS vmail tokens to preauthuserdbcommon.c. + + -- Michael Olson (HCoop) Fri, 01 Feb 2008 21:55:37 -0500 + +courier-authlib (0.60.2-0hcoop4) unstable; urgency=low + + * authuserdb: Try using a separate get-token script. + + -- Michael Olson (HCoop) Wed, 30 Jan 2008 13:17:14 -0500 + +courier-authlib (0.60.2-0hcoop3) unstable; urgency=low + + * Fix bug in previous patch. + + -- Michael Olson (HCoop) Sun, 27 Jan 2008 16:19:18 -0500 + +courier-authlib (0.60.2-0hcoop2) unstable; urgency=low + + * Get token after authenticating a vmail user. + + -- Michael Olson (HCoop) Sat, 26 Jan 2008 15:28:19 -0500 + +courier-authlib (0.60.2-0hcoop1) unstable; urgency=low + + * New upstream release. Remaining changes: + - Revert the disabling of pam_setcred so that IMAP works as expected. + - Set the userdb path to be /etc/courier/userdb. + + -- Michael Olson (HCoop) Fri, 25 Jan 2008 19:24:41 -0500 + courier-authlib (0.60.1-2) unstable; urgency=low * added LSB dependency info to init scripts (Closes: #460221, thanks to @@ -135,6 +197,14 @@ courier-authlib (0.60.1-2) unstable; urgency=low -- Stefan Hornburg (Racke) Mon, 7 Apr 2008 13:21:37 +0200 +courier-authlib (0.60.1-1hcoop1) unstable; urgency=low + + * Sync from Debian. Remaining changes: + - Revert the disabling of pam_setcred so that IMAP works as expected. + - Set the userdb path to be /etc/courier/userdb. + + -- Michael Olson (HCoop) Fri, 25 Jan 2008 18:28:11 -0500 + courier-authlib (0.60.1-1) unstable; urgency=low * new upstream release @@ -154,6 +224,15 @@ courier-authlib (0.59.3-2) unstable; urgency=low -- Stefan Hornburg (Racke) Thu, 21 Jun 2007 20:26:38 +0200 +courier-authlib (0.59.3-1hcoop1) unstable; urgency=low + + [Adam Megacz] + * Revert the disabling of pam_setcred so that IMAP works as expected. + * Set the userdb path to be /etc/courier/userdb. + * userdb: Allow "+", ":", and "_" in usernames. + + -- Michael Olson (HCoop) Fri, 25 Jan 2008 17:46:10 -0500 + courier-authlib (0.59.3-1) unstable; urgency=low * new upstream release diff --git a/debian/courier_perms b/debian/courier_perms old mode 100644 new mode 100755 diff --git a/preauthuserdbcommon.c b/preauthuserdbcommon.c index e39decb..6c29778 100644 --- a/preauthuserdbcommon.c +++ b/preauthuserdbcommon.c @@ -20,6 +20,8 @@ #include "userdb/userdb.h" +#define TOKEN_CMD "/etc/courier/get-token " + int auth_userdb_pre_common(const char *userid, const char *service, int needpass, int (*callback)(struct authinfo *, void *), @@ -105,6 +107,21 @@ int rc; auth.maildir=udb->udb_mailbox; auth.quota=udb->udb_quota; + /* Get tokens for AFS */ + { char uidstr[32] = ""; + char *token_cmd; + if (auth.sysuserid) + { + snprintf(uidstr, sizeof(uidstr), "%ld", (long)*auth.sysuserid); + if ((token_cmd=malloc(sizeof(TOKEN_CMD)+strlen(uidstr)))) + { + strcat(strcpy(token_cmd, TOKEN_CMD),uidstr); + system(token_cmd); + free(token_cmd); + } + } + } + courier_authdebug_authinfo("DEBUG: authuserdb: ", &auth, 0, passwords); rc= (*callback)(&auth, arg); if (passwords) free(passwords);