/*
- * $Id: acl.cc,v 1.275 2002/06/13 17:08:01 hno Exp $
+ * $Id: acl.cc,v 1.276 2002/06/14 16:27:13 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
return;
}
*acldata = cbdataAlloc(acl_user_ip_data);
- if ((t = strtokFile())) {
- debug(28, 5) ("aclParseUserMaxIP: First token is %s\n", t);
- if (strcmp("-s", t) == 0) {
- debug(28, 5) ("aclParseUserMaxIP: Going strict\n");
- (*acldata)->flags.strict = 1;
- } else {
- (*acldata)->max = atoi(t);
- debug(28, 5) ("aclParseUserMaxIP: Max IP address's %d\n", (int) (*acldata)->max);
- }
- } else
- fatal("aclParseUserMaxIP: Malformed ACL %d\n");
+ t = strtokFile();
+ if (!t)
+ goto error;
+ debug(28, 5) ("aclParseUserMaxIP: First token is %s\n", t);
+ if (strcmp("-s", t) == 0) {
+ debug(28, 5) ("aclParseUserMaxIP: Going strict\n");
+ (*acldata)->flags.strict = 1;
+ t = strtokFile();
+ if (!t)
+ goto error;
+ }
+ (*acldata)->max = atoi(t);
+ debug(28, 5) ("aclParseUserMaxIP: Max IP address's %d\n", (int) (*acldata)->max);
+ return;
+error:
+ fatal("aclParseUserMaxIP: Malformed ACL %d\n");
}
void