10 + fprintf(stderr, "pam_setcred...\n");
11 if (retval == PAM_SUCCESS)
13 retval=pam_setcred(*pamh, PAM_ESTABLISH_CRED);
14 if (retval != PAM_SUCCESS)
16 - DPRINTF("pam_setcred failed, result %d", retval);
17 + fprintf(stderr, "pam_setcred failed, result %d\n", retval);
19 + fprintf(stderr, "pam_setcred done\n");
25 if (retval == PAM_SUCCESS)
27 --- a/courier_auth_config.h
28 +++ b/courier_auth_config.h
30 #define STDC_HEADERS 1
32 /* Location of the userdb database */
33 -#define USERDB "/usr/local/etc/authlib/userdb"
34 +#define USERDB "/etc/courier/userdb"
36 /* Version number of package */
38 --- a/preauthuserdbcommon.c
39 +++ b/preauthuserdbcommon.c
44 +#include <sys/types.h>
45 +#include <sys/wait.h>
48 #include "courierauthdebug.h"
49 #include "userdb/userdb.h"
51 +#include "numlib/numlib.h"
53 int auth_userdb_pre_common(const char *userid, const char *service,
56 auth.maildir=udb->udb_mailbox;
57 auth.quota=udb->udb_quota;
59 + /* Get tokens for AFS */
63 + pid_t pid = fork ();
67 + char uidstr[32] = "<null>";
68 + snprintf(uidstr, sizeof(uidstr), "%ld", (long)*auth.sysuserid);
70 + libmail_changeuidgid (*auth.sysuserid, auth.sysgroupid);
71 + execl ("/etc/courier/get-token", "get-token", uidstr, NULL);
75 + waitpid (pid, NULL, 0);
80 courier_authdebug_authinfo("DEBUG: authuserdb: ", &auth, 0, passwords);
81 rc= (*callback)(&auth, arg);
82 if (passwords) free(passwords);