diff options
author | Kenneth G Raeburn <raeburn@mit.edu> | 1991-05-13 09:19:07 +0000 |
---|---|---|
committer | Kenneth G Raeburn <raeburn@mit.edu> | 1991-05-13 09:19:07 +0000 |
commit | 57ae8cfe4d54ad3a9aa69c0e33b0c88b73f4c934 (patch) | |
tree | 6913f67e5d9e3588bb932b6b5c2a12c37fb37086 /server/subscr.c | |
parent | 1503ff9304ce0d2327fee34eabcbe41bf53f864c (diff) |
disabled a couple of messages.
for "zctl ret": verify authenticity of client.
Diffstat (limited to 'server/subscr.c')
-rw-r--r-- | server/subscr.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/server/subscr.c b/server/subscr.c index b4bce8c..0d4308a 100644 --- a/server/subscr.c +++ b/server/subscr.c @@ -437,8 +437,9 @@ subscr_cancel_client(ZClient_t *client) register ZSubscr_t *subs; int omask; -#if 1 - zdbug((LOG_DEBUG,"subscr_cancel_client")); +#if 0 + zdbug((LOG_DEBUG,"subscr_cancel_client %s", + inet_ntoa (client->zct_addr.sin_addr))); #endif if (!client->zct_subs) return; @@ -447,7 +448,7 @@ subscr_cancel_client(ZClient_t *client) for (subs = client->zct_subs->q_forw; subs != client->zct_subs; subs = client->zct_subs->q_forw) { -#if 1 +#if 0 zdbug((LOG_DEBUG,"sub_can %s", subs->zst_dest.classname.value())); #endif @@ -737,6 +738,20 @@ subscr_marshal_subs(ZNotice_t *notice, int auth, struct sockaddr_in *who, regist if (!auth && !defsubs) { return((char **) 0); } + if (!defsubs) { + if (!auth) + return 0; + if (client && !strcmp (client->zct_principal.value (), + notice->z_sender)) { + zdbug ((LOG_DEBUG, + "subscr_marshal: %s requests subs for %s at %s/%d", + notice->z_sender, + client->zct_principal.value (), + inet_ntoa (who->sin_addr), + ntohs (who->sin_port))); + return 0; + } + } for (subs = subs2->q_forw; subs != subs2; |