*** 1.5	1994/06/03 17:44:40
--- 1.7	1996/09/05 18:01:55
***************
*** 58,64 ****
  	struct configs conf;
  	int i;
  
! 	bzero(&conf, sizeof(conf));
  
  	if((f = fopen(name, "r")) == NULL) {
  		fprintf(stderr, "Unable to open %s for configuration changes\n", name);
--- 58,64 ----
  	struct configs conf;
  	int i;
  
! 	memset(&conf, 0, sizeof(conf));
  
  	if((f = fopen(name, "r")) == NULL) {
  		fprintf(stderr, "Unable to open %s for configuration changes\n", name);
***************
*** 81,87 ****
  				fprintf(stderr, "Out of memory in config_services\n");
  				return -1;
  			}
! 			bzero(l, sizeof(struct line));
  			l->data = strdup(buf);
  			if(!l->data) {
  				fprintf(stderr, "Out of memory in config_services\n");
--- 81,87 ----
  				fprintf(stderr, "Out of memory in config_services\n");
  				return -1;
  			}
! 			memset(l, 0, sizeof(struct line));
  			l->data = strdup(buf);
  			if(!l->data) {
  				fprintf(stderr, "Out of memory in config_services\n");
***************
*** 88,94 ****
  				return -1;
  			}
  			/* Process primary and secondary info */
! 			p = index(buf, ' ');
  			if(p) {
  				*p = '\0';
  				p++;
--- 88,94 ----
  				return -1;
  			}
  			/* Process primary and secondary info */
! 			p = strchr(buf, ' ');
  			if(p) {
  				*p = '\0';
  				p++;
***************
*** 99,105 ****
  			}
  			if(p) {
  				/* Get secondary */
! 				p1 = index(p, ' ');
  				if(p1) {
  					p = ++p1;
  					while(*p && !isspace(*p)) p++;
--- 99,105 ----
  			}
  			if(p) {
  				/* Get secondary */
! 				p1 = strchr(p, ' ');
  				if(p1) {
  					p = ++p1;
  					while(*p && !isspace(*p)) p++;
***************
*** 163,169 ****
  {
  	char *p;
  	char buf[1024];
! 	if((p = index(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in deluser\n");
  		return -1;
  	}
--- 163,169 ----
  {
  	char *p;
  	char buf[1024];
! 	if((p = strchr(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in deluser\n");
  		return -1;
  	}
***************
*** 181,192 ****
  	struct passwd *pwd;
  
  	/* We need to know if hesiod or not */
! 	if((p = index(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in adduser\n");
  		return -1;
  	}
  	strcpy(buf, ++p);
! 	if((p = index(buf, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in adduser\n");
  		return -1;
  	}
--- 181,192 ----
  	struct passwd *pwd;
  
  	/* We need to know if hesiod or not */
! 	if((p = strchr(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in adduser\n");
  		return -1;
  	}
  	strcpy(buf, ++p);
! 	if((p = strchr(buf, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in adduser\n");
  		return -1;
  	}
***************
*** 232,243 ****
  	}
  
  	/* We need the service name */
! 	if((p = index(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in delervice\n");
  		return -1;
  	}
  	strcpy(buf, ++p);
! 	if((p = index(buf, ' ')) != NULL) {
  	  *p = '\0';
  	}
  
--- 232,243 ----
  	}
  
  	/* We need the service name */
! 	if((p = strchr(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in delervice\n");
  		return -1;
  	}
  	strcpy(buf, ++p);
! 	if((p = strchr(buf, ' ')) != NULL) {
  	  *p = '\0';
  	}
  
***************
*** 282,294 ****
  	}
  
  	/* We need the service name */
! 	if((p = index(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in addservice\n");
  		return -1;
  	}
  	strcpy(buf, ++p);
  	p1 = p;
! 	if(((p = index(buf, ' ')) == NULL) && ((p = index(buf, '\t')) == NULL)) {
  		fprintf(stderr, "Error in parsing line in addservice\n");
  		return -1;
  	}
--- 282,294 ----
  	}
  
  	/* We need the service name */
! 	if((p = strchr(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in addservice\n");
  		return -1;
  	}
  	strcpy(buf, ++p);
  	p1 = p;
! 	if(((p = strchr(buf, ' ')) == NULL) && ((p = strchr(buf, '\t')) == NULL)) {
  		fprintf(stderr, "Error in parsing line in addservice\n");
  		return -1;
  	}
***************
*** 357,368 ****
  			return -1;
  	}
  	/* We need the service name */
! 	if((p = index(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in switchservice\n");
  		return -1;
  	}
  	strcpy(buf, ++p);
! 	if((p = index(buf, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in switchservice\n");
  		return -1;
  	}
--- 357,368 ----
  			return -1;
  	}
  	/* We need the service name */
! 	if((p = strchr(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in switchservice\n");
  		return -1;
  	}
  	strcpy(buf, ++p);
! 	if((p = strchr(buf, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in switchservice\n");
  		return -1;
  	}
***************
*** 406,417 ****
  	}
  
  	/* We need the variable name */
! 	if((p = index(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in conf\n");
  		return -1;
  	}
  	strcpy(buf, ++p);
! 	if((p = index(buf, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in conf\n");
  		return -1;
  	}
--- 406,417 ----
  	}
  
  	/* We need the variable name */
! 	if((p = strchr(lin->data, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in conf\n");
  		return -1;
  	}
  	strcpy(buf, ++p);
! 	if((p = strchr(buf, ' ')) == NULL) {
  		fprintf(stderr, "Error in parsing line in conf\n");
  		return -1;
  	}
***************
*** 439,451 ****
  		 * After = replace text up to ;
  		 */
  		strcpy(buf, l->data);
! 		if((p = index(buf, '=')) == NULL) {
  			fprintf(stderr, "Error in parsing line in rc.conf\n");
  			return -1;
  		}
  		p++; /* p points to beggining of data for buf */
  		*p = '\0';
! 		if((p1 = index(l->data+ (p-buf), ';')) == NULL) {
  			fprintf(stderr, "Error in parsing line in rc.conf\n");
  			return -1;
  		}
--- 439,451 ----
  		 * After = replace text up to ;
  		 */
  		strcpy(buf, l->data);
! 		if((p = strchr(buf, '=')) == NULL) {
  			fprintf(stderr, "Error in parsing line in rc.conf\n");
  			return -1;
  		}
  		p++; /* p points to beggining of data for buf */
  		*p = '\0';
! 		if((p1 = strchr(l->data+ (p-buf), ';')) == NULL) {
  			fprintf(stderr, "Error in parsing line in rc.conf\n");
  			return -1;
  		}
