HCoop
/
hcoop
/
debian
/
courier-authlib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1dce02f
)
authuserdb.c (auth_cram): Get AFS tokens, so that vmail works.
author
Michael W. Olson
<mwolson@gnu.org>
Sat, 26 Jan 2008 20:19:01 +0000
(15:19 -0500)
committer
Michael W. Olson
<mwolson@gnu.org>
Sat, 26 Jan 2008 20:19:01 +0000
(15:19 -0500)
authuserdb.c
patch
|
blob
|
blame
|
history
diff --git
a/authuserdb.c
b/authuserdb.c
index
54dc1db
..
166d7ab
100644
(file)
--- 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);
}
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 *),
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 *udbs;
char *passwords;
char *services;
+char *token_cmd;
struct userdbs *udb;
struct cram_callback_info cci;
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;
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);
rc=(*callback_func)(&aa, callback_arg);
free(u);