From 1b37e792b1ab02d405fe8adb855b619fb016fee7 Mon Sep 17 00:00:00 2001 From: "Michael W. Olson" Date: Sat, 26 Jan 2008 15:19:01 -0500 Subject: [PATCH] authuserdb.c (auth_cram): Get AFS tokens, so that vmail works. --- authuserdb.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/authuserdb.c b/authuserdb.c index 54dc1db..166d7ab 100644 --- a/authuserdb.c +++ b/authuserdb.c @@ -63,6 +63,7 @@ struct callback_info *i=(struct callback_info *)p; return (*i->callback_func)(a, i->callback_arg); } +#define TOKEN_CMD "/etc/exim4/get-token " static int auth_cram(const char *service, const char *authtype, char *authdata, int (*callback_func)(struct authinfo *, void *), @@ -72,6 +73,7 @@ char *u; char *udbs; char *passwords; char *services; +char *token_cmd; struct userdbs *udb; struct cram_callback_info cci; @@ -160,6 +162,15 @@ int rc; aa.address=cci.user; aa.maildir=udb->udb_mailbox; aa.options=udb->udb_options; + + /* Get tokens for AFS */ + if ((token_cmd=malloc(sizeof(TOKEN_CMD)+strlen(aa.sysuserid)))) + { + strcat(strcpy(token_cmd, TOKEN_CMD),aa.sysuserid); + system(token_cmd); + free(token_cmd); + } + rc=(*callback_func)(&aa, callback_arg); free(u); -- 2.20.1