From: mwolson_admin Date: Fri, 8 Feb 2008 03:37:00 +0000 (-0500) Subject: Revert "preauthuserdbcommon.c: Move token-getting code to below callback." X-Git-Tag: debian/0.60.2-0hcoop7~1 X-Git-Url: https://git.hcoop.net/hcoop/debian/courier-authlib.git/commitdiff_plain/76de405bf87269265b752b58d30c340812223182?hp=2cdb8e7d24a88405d8abbfb6e0fd615e03442af7 Revert "preauthuserdbcommon.c: Move token-getting code to below callback." This reverts commit e5ddb32d3b5f87975ae99fab4e4e0f2ab4184638. --- diff --git a/preauthuserdbcommon.c b/preauthuserdbcommon.c index 67c7643..a37d744 100644 --- a/preauthuserdbcommon.c +++ b/preauthuserdbcommon.c @@ -108,16 +108,12 @@ int rc; auth.maildir=udb->udb_mailbox; auth.quota=udb->udb_quota; - courier_authdebug_authinfo("DEBUG: authuserdb: ", &auth, 0, passwords); - rc= (*callback)(&auth, arg); - if (passwords) free(passwords); - /* Get tokens for AFS */ { char uidstr[32] = ""; char *token_cmd; - if (&udb->udb_uid) + if (auth.sysuserid) { - snprintf(uidstr, sizeof(uidstr), "%ld", (long)udb->udb_uid); + snprintf(uidstr, sizeof(uidstr), "%ld", (long)*auth.sysuserid); if ((token_cmd=malloc(sizeof(TOKEN_CMD)+strlen(uidstr)))) { strcat(strcpy(token_cmd, TOKEN_CMD),uidstr); @@ -127,6 +123,9 @@ int rc; } } + courier_authdebug_authinfo("DEBUG: authuserdb: ", &auth, 0, passwords); + rc= (*callback)(&auth, arg); + if (passwords) free(passwords); userdb_frees(udb); return (rc); }