summaryrefslogtreecommitdiff
path: root/server/dispatch.c
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@1ts.org>2012-01-25 11:53:50 -0500
committerGravatar Karl Ramm <kcr@1ts.org>2012-01-25 11:53:50 -0500
commit14dc304f749cbbfece99600b0b95cc597c5d9087 (patch)
tree3b9f623ddfde696d9dc4c72caeaef72ccd39ec8f /server/dispatch.c
parentd9bba46a8828334850b1c42d41e6f38d02423129 (diff)
Try and log more on authentication failures.
Diffstat (limited to 'server/dispatch.c')
-rw-r--r--server/dispatch.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/dispatch.c b/server/dispatch.c
index 106686b..7851135 100644
--- a/server/dispatch.c
+++ b/server/dispatch.c
@@ -1019,6 +1019,8 @@ control_dispatch(ZNotice_t *notice,
subscr_sendlist(notice, auth, who);
return ZERR_NONE;
} else if (!auth) {
+ syslog(LOG_INFO, "unauthenticated %s message purportedly from %s",
+ opcode, notice->z_sender);
if (server == me_server)
clt_ack(notice, who, AUTH_FAILED);
return ZERR_NONE;
@@ -1042,6 +1044,10 @@ control_dispatch(ZNotice_t *notice,
}
if (strcmp(client->principal->string, notice->z_sender) != 0) {
/* you may only subscribe for your own clients */
+ syslog(LOG_NOTICE,
+ "subscr request from %s on port used by %s (%s.%d)",
+ notice->z_sender, client->principal->string,
+ inet_ntoa(who->sin_addr), ntohs(notice->z_port)); /* XXX */
if (server == me_server)
clt_ack(notice, who, AUTH_FAILED);
return ZERR_NONE;
@@ -1080,6 +1086,10 @@ control_dispatch(ZNotice_t *notice,
if (client != NULL) {
if (strcmp(client->principal->string, notice->z_sender) != 0) {
/* you may only cancel for your own clients */
+ syslog(LOG_NOTICE,
+ "unsubscr request from %s on port used by %s (%s.%d)",
+ notice->z_sender, client->principal->string,
+ inet_ntoa(who->sin_addr), ntohs(notice->z_port)); /*XXX*/
if (server == me_server)
clt_ack(notice, who, AUTH_FAILED);
return ZERR_NONE;
@@ -1099,6 +1109,10 @@ control_dispatch(ZNotice_t *notice,
}
if (strcmp(client->principal->string, notice->z_sender) != 0) {
/* you may only cancel for your own clients */
+ syslog(LOG_NOTICE,
+ "cancel request from %s on port used by %s (%s.%d)",
+ notice->z_sender, client->principal->string,
+ inet_ntoa(who->sin_addr), ntohs(notice->z_port)); /* XXX */
if (server == me_server)
clt_ack(notice, who, AUTH_FAILED);
return ZERR_NONE;