From 76de405bf87269265b752b58d30c340812223182 Mon Sep 17 00:00:00 2001 From: mwolson_admin Date: Thu, 7 Feb 2008 22:37:00 -0500 Subject: [PATCH] Revert "preauthuserdbcommon.c: Move token-getting code to below callback." This reverts commit e5ddb32d3b5f87975ae99fab4e4e0f2ab4184638. --- preauthuserdbcommon.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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); } -- 2.20.1