--- dante-1.1.12/sockd/auth_pam.c.orig Tue Feb 5 11:40:52 2002 +++ dante-1.1.12/sockd/auth_pam.c Fri Mar 8 23:15:31 2002 @@ -58,6 +58,10 @@ static int _pam_conversation(int num_msg, const struct pam_message **msgs, struct pam_response **rsps, void *priv_data); +static int +_real_pam_passwordcheck( int s, const struct sockaddr *src, +const struct sockaddr *dst, const struct authmethod_pam_t *auth, +char *emsg, size_t emsgsize); typedef struct { @@ -72,8 +76,28 @@ __END_DECLS +/* + * At least one known PAM implementation reopens syslog internally + * that messes up logging inside of dante + * Very simple workaround is to reopen syslog after calling PAM + */ int pam_passwordcheck(s, src, dst, auth, emsg, emsgsize) + int s; + const struct sockaddr *src, *dst; + const struct authmethod_pam_t *auth; + char *emsg; + size_t emsgsize; +{ + int ret; + + ret = _real_pam_passwordcheck(s,src,dst,auth,emsg,emsgsize); + newprocinit(); + return ret; +} + +static int +_real_pam_passwordcheck(s, src, dst, auth, emsg, emsgsize) int s; const struct sockaddr *src, *dst; const struct authmethod_pam_t *auth;