Acbosgd.2094
net.news.b
utcsrgv!utzoo!decvax!ucbvax!ihnss!cbosg!cbosgd!mark
Mon Mar  1 20:41:37 1982
Re: Jay Lepreau's fix to inews
From: mark (Mark Horton)
The bug was that if you tried to create a nonlocal newsgroup, inews would
complain that the newsgroup already exists and not create it anywhere else
except on your local system.  It worked fine for local groups.

Jay's fix fixed the nonlocal case but broke the local case.  It would depend
on a control message to create the group, but for local newsgroups there is
no control message, and the command did nothing.

Here is a fix that will handle both cases correctly.

*** newsdist/src/inews.c        Mon Mar  1 09:59:35 1982
--- news/inews.c        Mon Mar  1 20:30:03 1982
***************
*** 303,309
               xerror("No such newsgroup - aborted");
       if (uid != ROOTID && uid != geteuid() && uid)
               xerror("Get a network guru to create it for you");
-       mknewsg(dir);

       /* Broadcast the new newsgroup */
       strcpy(class, ngname);

--- 303,308 -----
               xerror("No such newsgroup - aborted");
       if (uid != ROOTID && uid != geteuid() && uid)
               xerror("Get a network guru to create it for you");

       /* Broadcast the new newsgroup */
       strcpy(class, ngname);
***************
*** 311,317
               ;
       if (*cp)
               *cp = 0;
!       else
               exit(0);        /* Local newsgroup */
       sprintf(bfr, "inews -n %s.msg.ctl -t newgroup %s", class, ngname);
       printf("Please type in a paragraph describing the new newsgroup.\n");

--- 310,317 -----
               ;
       if (*cp)
               *cp = 0;
!       else {
!               mknewsg(dir);
               exit(0);        /* Local newsgroup */
       }
       sprintf(bfr, "inews -n %s.msg.ctl -t newgroup %s", class, ngname);
***************
*** 313,318
               *cp = 0;
       else
               exit(0);        /* Local newsgroup */
       sprintf(bfr, "inews -n %s.msg.ctl -t newgroup %s", class, ngname);
       printf("Please type in a paragraph describing the new newsgroup.\n");
       printf("End with control D as usual.\n");

--- 313,319 -----
       else {
               mknewsg(dir);
               exit(0);        /* Local newsgroup */
+       }
       sprintf(bfr, "inews -n %s.msg.ctl -t newgroup %s", class, ngname);
       printf("Please type in a paragraph describing the new newsgroup.\n");
       printf("End with control D as usual.\n");

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.