Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site rochester.UUCP Path: utzoo!linus!philabs!seismo!rochester!bukys From: bukys@rochester.UUCP (Liudvikas Bukys) Newsgroups: net.news.b Subject: 2.10 and 2.10.1 expire bugs Message-ID: <3401@rochester.UUCP> Date: Fri, 14-Oct-83 11:47:31 EDT Article-I.D.: rocheste.3401 Posted: Fri Oct 14 11:47:31 1983 Date-Received: Sun, 16-Oct-83 09:15:56 EDT Organization: U. of Rochester, CS Dept. Lines: 47 mkparents() in expire.c should return a value. Since the garbage value it ends up returning is usually or always non-zero, the first article expired after a mkdir is lost. So change the first "return" to a "return (0)", and put a "return (rc);" at the end. Or replace mkparents in expire.c with the following fixed version... NOTE 1: Do not confuse this with mkparents in inews.c, which is not expected to return a value, and works better on USG systems, I'll bet. NOTE 2: I fixed the 2.10 version before I looked at the 2.10.1 version, so I ended up fixing a previous bug slightly differently: The code was confused about what was in "buf" and "sysbuf". The 2.10.1 code fixed it by inserting a "strcpy(sysbuf,buf);" in a handy place (ugh). I fixed it by having the printf, chmod and chown use "buf" as they should have. ------- int mkparents(dirname) char *dirname; { char buf[200], sysbuf[200]; register char *p; int rc; struct passwd *pw; strcpy(buf, dirname); p = rindex(buf, '/'); if (p) *p = '\0'; if (exists(buf)) return (0); mkparents(buf); sprintf(sysbuf, "mkdir %s", buf); rc = system(sysbuf); if (verbose) printf("mkdir %s, rc %d\n", buf, rc); chmod(buf, 0755); if ((pw = getpwnam(NEWSU)) != NULL) chown(buf, pw->pw_uid, pw->pw_gid); return rc; } ------- Liudvikas Bukys rochester!bukys (uucp) bukys@rochester (arpa)