[dovecot-cvs] dovecot/src/auth passdb-pam.c,1.37,1.38
cras at dovecot.org
cras at dovecot.org
Fri Jun 16 12:45:19 EEST 2006
- Previous message: [dovecot-cvs] dovecot/src/imap cmd-subscribe.c,1.14,1.15
- Next message: [dovecot-cvs]
dovecot/src/lib-index mail-index-view-private.h, 1.22,
1.23 mail-index-view-sync.c, 1.52, 1.53 mail-index-view.c,
1.44, 1.45 mail-transaction-log-append.c, 1.17, 1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv27170/src/auth
Modified Files:
passdb-pam.c
Log Message:
Don't call pam_setcred() unless setcred=yes PAM passdb argument was given.
Index: passdb-pam.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-pam.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- passdb-pam.c 7 Feb 2006 16:41:44 -0000 1.37
+++ passdb-pam.c 16 Jun 2006 09:45:16 -0000 1.38
@@ -61,7 +61,7 @@
struct pam_passdb_module {
struct passdb_module module;
- bool pam_session;
+ bool pam_setcred, pam_session;
const char *service_name, *pam_cache_key;
struct timeout *to_wait;
};
@@ -187,10 +187,13 @@
}
#ifdef HAVE_PAM_SETCRED
- if ((status = pam_setcred(pamh, PAM_ESTABLISH_CRED)) != PAM_SUCCESS) {
- *error = t_strdup_printf("pam_setcred() failed: %s",
- pam_strerror(pamh, status));
- return status;
+ if (module->pam_setcred) {
+ if ((status = pam_setcred(pamh, PAM_ESTABLISH_CRED)) !=
+ PAM_SUCCESS) {
+ *error = t_strdup_printf("pam_setcred() failed: %s",
+ pam_strerror(pamh, status));
+ return status;
+ }
}
#endif
@@ -433,6 +436,8 @@
if (strcmp(t_args[i], "-session") == 0 ||
strcmp(t_args[i], "session=yes") == 0)
module->pam_session = TRUE;
+ else if (strcmp(t_args[i], "setcred=yes") == 0)
+ module->pam_setcred = TRUE;
else if (strncmp(t_args[i], "cache_key=", 10) == 0) {
module->module.cache_key =
p_strdup(auth_passdb->auth->pool,
- Previous message: [dovecot-cvs] dovecot/src/imap cmd-subscribe.c,1.14,1.15
- Next message: [dovecot-cvs]
dovecot/src/lib-index mail-index-view-private.h, 1.22,
1.23 mail-index-view-sync.c, 1.52, 1.53 mail-index-view.c,
1.44, 1.45 mail-transaction-log-append.c, 1.17, 1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list