Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!sri-spam!mordor!lll-tis!elxsi!marduk!gww From: gww@marduk.UUCP (Gary Winiger) Newsgroups: comp.bugs.4bsd Subject: UUCP only accepts ' ' (space) as the separator after a system name in L.sys +Fix Message-ID: <522@elxsi.UUCP> Date: Fri, 4-Sep-87 18:17:40 EDT Article-I.D.: elxsi.522 Posted: Fri Sep 4 18:17:40 1987 Date-Received: Sat, 5-Sep-87 21:27:22 EDT Sender: nobody@elxsi.UUCP Reply-To: gww@marduk.UUCP (Gary Winiger) Organization: ELXSI Super Computers, San Jose Lines: 78 Subject: UUCP only accepts ' ' (space) as a separator following the system name in L.sys. +Fix Index: usr.bin/uucp/gnsys.c 4.3BSD +Fix Description: When scanning L.sys for a system name, the only acceptable separator between the system name and the rest of the line is ' ' (space). It would be nice to use any white space as well. Ie. a '\t'. Repeat-By: Use a character other than ' ' for the separator. Fix: Use isspace(). The attached code solves this problem at Elxsi. Gary.. {ucbvax!sun,lll-lcc!lll-tis,amdahl!altos86,bridge2}!elxsi!gww --------- cut --------- snip --------- :.,$w diff ------------- *** /tmp/,RCSt1001006 Wed Jul 1 16:44:58 1987 --- gnsys.c Wed Jul 1 16:25:28 1987 *************** *** 1,15 **** /* * $Log: gnsys.c,v $ * Revision 1.1 87/06/23 16:58:13 gww * Initial revision * */ #ifndef lint ! static char *ERcsId = "$Header: gnsys.c,v 1.1 87/06/23 16:58:13 gww Exp $ ENIX BSD"; static char sccsid[] = "@(#)gnsys.c 5.4 (Berkeley) 6/20/85"; #endif #include "uucp.h" #ifdef NDIR #include "ndir.h" #else --- 1,19 ---- /* * $Log: gnsys.c,v $ + * Revision 1.2 87/07/01 16:25:05 gww + * Permit any white space in L.sys line as a separator. + * * Revision 1.1 87/06/23 16:58:13 gww * Initial revision * */ #ifndef lint ! static char *ERcsId = "$Header: gnsys.c,v 1.2 87/07/01 16:25:05 gww Exp $ ENIX BSD"; static char sccsid[] = "@(#)gnsys.c 5.4 (Berkeley) 6/20/85"; #endif #include "uucp.h" + #include #ifdef NDIR #include "ndir.h" #else *************** *** 94,102 **** fp = fopen(SYSFILE, "r"); ASSERT(fp != NULL, CANTOPEN, SYSFILE, 0); while (cfgets(line, sizeof(line), fp) != NULL) { ! p = index(line, ' '); ! if (p) ! *p = '\0'; if (strncmp(sname, line, SYSNSIZE) == SAME) { strncpy(sname, line, MAXBASENAME); break; --- 98,107 ---- fp = fopen(SYSFILE, "r"); ASSERT(fp != NULL, CANTOPEN, SYSFILE, 0); while (cfgets(line, sizeof(line), fp) != NULL) { ! p=line; ! while (!isspace(*p)) ! p++; ! *p = '\0'; if (strncmp(sname, line, SYSNSIZE) == SAME) { strncpy(sname, line, MAXBASENAME); break;