From 2c820cf3a321c88a1ba334583dc0dbe2f930d4b8 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 15 Oct 1987 13:02:18 +0000 Subject: if there is a colon, just null it out. --- server/access.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/access.c') diff --git a/server/access.c b/server/access.c index d30659e..cdd4f90 100644 --- a/server/access.c +++ b/server/access.c @@ -38,7 +38,8 @@ static char rcsid_acl_s_c[] = "$Header$"; * routines and the support needed by the Zephyr server. */ -#include "zserver.h" /* includes */ +#include "zserver.h" /* includes , + */ #include /* @@ -89,6 +90,7 @@ access_init() FILE *registry; ZAcl_t *acl; register int len; + register char *colon_idx; (void) sprintf(buf, "%s%s", ZEPHYR_ACL_DIR, ZEPHYR_CLASS_REGISTRY); @@ -97,7 +99,9 @@ access_init() return; } while (fgets(class, 512, registry) != NULL) { - if (len = strlen(class)) + if (colon_idx = index(class, ':')) + *colon_idx = '\0'; + else if (len = strlen(class)) class[len - 1] = '\0'; acl = (ZAcl_t *) xmalloc(sizeof(ZAcl_t)); if (!acl) { -- cgit v1.2.3