log poppers
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3126 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -128,15 +128,26 @@ pop_pass (POP *p)
|
|||||||
return(pop_msg(p,POP_FAILURE,
|
return(pop_msg(p,POP_FAILURE,
|
||||||
"Popping not authorized"));
|
"Popping not authorized"));
|
||||||
}
|
}
|
||||||
|
pop_log(p, POP_INFO, "%s: %s.%s@%s -> %s",
|
||||||
|
p->ipaddr,
|
||||||
|
p->kdata.pname, p->kdata.pinst, p->kdata.prealm,
|
||||||
|
p->user);
|
||||||
} else
|
} else
|
||||||
#endif /* KRB4 */
|
#endif /* KRB4 */
|
||||||
if (p->version == 5) {
|
if (p->version == 5) {
|
||||||
|
char *name;
|
||||||
|
|
||||||
if (!krb5_kuserok (p->context, p->principal, p->user)) {
|
if (!krb5_kuserok (p->context, p->principal, p->user)) {
|
||||||
pop_log (p, POP_FAILURE,
|
pop_log (p, POP_FAILURE,
|
||||||
"krb5 permission denied");
|
"krb5 permission denied");
|
||||||
return pop_msg(p, POP_FAILURE,
|
return pop_msg(p, POP_FAILURE,
|
||||||
"Popping not authorized");
|
"Popping not authorized");
|
||||||
}
|
}
|
||||||
|
if(krb5_unparse_name (p->context, p->principal, &name) == 0) {
|
||||||
|
pop_log(p, POP_INFO, "%s: %s -> %s",
|
||||||
|
p->ipaddr, name, p->user);
|
||||||
|
free (name);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
pop_log (p, POP_FAILURE, "kerberos authentication failed");
|
pop_log (p, POP_FAILURE, "kerberos authentication failed");
|
||||||
return pop_msg (p, POP_FAILURE,
|
return pop_msg (p, POP_FAILURE,
|
||||||
@@ -168,6 +179,8 @@ pop_pass (POP *p)
|
|||||||
return pop_msg(p, POP_FAILURE,
|
return pop_msg(p, POP_FAILURE,
|
||||||
"Password incorrect");
|
"Password incorrect");
|
||||||
}
|
}
|
||||||
|
pop_log(p, POP_INFO, "login from %s as %s",
|
||||||
|
p->ipaddr, p->user);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build the name of the user's maildrop */
|
/* Build the name of the user's maildrop */
|
||||||
|
Reference in New Issue
Block a user