* Created by: John T. Kohl
*
* $Source: /afs/dev.mit.edu/source/repository/athena/lib/zephyr/server/subscr.c,v $
- * $Author: zacheiss $
+ * $Author$
*
* Copyright (c) 1987,1988 by the Massachusetts Institute of Technology.
* For copying and distribution information, see the file
#ifndef lint
#ifndef SABER
-static const char rcsid_subscr_c[] = "$Id: subscr.c,v 1.58 2001/03/01 00:47:05 zacheiss Exp $";
+static const char rcsid_subscr_c[] = "$Id$";
#endif
#endif
}
}
}
- if (realm && !bdumping && server && server == me_server) {
- retval = subscr_realm_sendit(who, subs, notice, realm);
- if (retval != ZERR_NONE) {
- free_subscriptions(subs);
- free_string(sender);
- return(retval);
+ if (realm && !bdumping) {
+ if (server && server == me_server) {
+ retval = subscr_realm_sendit(who, subs, notice, realm);
+ if (retval != ZERR_NONE) {
+ free_subscriptions(subs);
+ free_string(sender);
+ return(retval);
+ } else {
+ /* free this one, will get from ADD */
+ free_subscription(subs);
+ }
} else {
- free_subscription(subs); /* free this one, will get from ADD */
+ /* Indicates we leaked traffic back to our realm */
}
} else {
retval = triplet_register(who, &subs->dest, NULL);
found = 0;
for (subs = newsubs; subs; subs = next) {
+ Realm *rlm;
next=subs->next;
+ if (subs->dest.recip->string[0] != '\0') {
+ rlm = realm_which_realm(who);
+ syslog(LOG_WARNING, "subscr bad recip %s by %s (%s)",
+ subs->dest.recip->string,
+ sender->string, rlm->name);
+ continue;
+ }
acl = class_get_acl(subs->dest.classname);
if (acl) {
- Realm *rlm;
rlm = realm_which_realm(who);
if (rlm && server == me_server) {
if (!realm_sender_in_realm(rlm->name, sender->string)) {
syslog(LOG_WARNING, "subscr auth not verifiable %s (%s) class %s",
sender->string, rlm->name,
subs->dest.classname->string);
- continue;
+ free_subscriptions(newsubs);
+ free_string(sender);
+ free(text);
+ return ZSRV_CLASSRESTRICTED;
}
}
if (!access_check(sender->string, acl, SUBSCRIBE)) {