gam@amdahl.UUCP (03/12/87)
Below are the patches for control.c and pathinit.c which restore the senduuname control message after having applied news patch #5. *** OLDcontrol.c Wed Mar 11 15:56:20 1987 --- control.c Wed Mar 11 00:11:49 1987 *************** *** 725,730 **** --- 725,779 ---- } /* + * senduuname (no arguments) + * + * Run the "uuname" command and send it back to the person who submitted + * the article. The purpose of this control message is for attempting to + * make a uucp net map. + * + * POLICY: If you view this information as not public (because you have + * a connection you consider secret, or know a site that considers itself + * secret) you can feel free to change this code in whatever way is + * appropriate, so long as it sends some response back to the sender. If + * you don't run uucp, this code does not make sense, and so an error + * message (or garbage, such as "research") will be mailed back. + * + * If you wish to add or remove sites from the output of uuname, you + * may wish to use the euuname.sh shell script here. + */ + /* ARGSUSED */ + c_senduuname(argc, argv) + char **argv; + { + char buf[256]; + FILE *fd, *u; + int c; + + #ifdef NOTIFY + fd = mailhdr((struct hbuf *)NULL, "uuname control message"); + fprintf(fd, "%s requested your uuname output\n", header.path); + (void) mclose(fd); + #endif /* NOTIFY */ + fd = mailhdr(&header, "response to your senduuname request"); + #ifdef UUPROG + if (UUPROG[0] == '/') + (void) strcpy(buf, UUPROG); + else + (void) sprintf(buf, "%s/%s", LIB, UUPROG); + #else + (void) strcpy(buf, "uuname"); + #endif + u = popen(buf, "r"); + if (fd != NULL && u != NULL) { + while ((c=getc(u)) != EOF) + putc(c, fd); + (void) pclose(u); + (void) mclose(fd); + } + return 0; + } + + /* * Send the version number to the right person. */ /* ARGSUSED */ *************** *** 990,995 **** --- 1039,1046 ---- } else if (strcmp(msg, "rmgroup") == 0) { suser(); } else if (strcmp(msg, "sendsys") == 0) { + suser(); + } else if (strcmp(msg, "senduuname") == 0) { suser(); } else if (strcmp(msg, "checkgroups") == 0) { suser(); *** OLDpathinit.c Wed Mar 11 15:56:41 1987 --- pathinit.c Wed Mar 11 00:11:49 1987 *************** *** 57,63 **** char *LOCKFILE, *SEQFILE, *ARTICLE, *INFILE, *TELLME; int c_cancel(), c_newgroup(), c_ihave(), c_sendme(), c_rmgroup(), ! c_sendsys(), c_version(), c_checkgroups(), c_unimp(); struct msgtype msgtype[] = { "cancel", NULL, c_cancel, --- 57,63 ---- char *LOCKFILE, *SEQFILE, *ARTICLE, *INFILE, *TELLME; int c_cancel(), c_newgroup(), c_ihave(), c_sendme(), c_rmgroup(), ! c_sendsys(), c_senduuname(), c_version(), c_checkgroups(), c_unimp(); struct msgtype msgtype[] = { "cancel", NULL, c_cancel, *************** *** 67,72 **** --- 67,73 ---- "sendbad", NULL, c_sendme, "rmgroup", NULL, c_rmgroup, "sendsys", NULL, c_sendsys, + "senduuname", NULL, c_senduuname, "version", NULL, c_version, "checkgroups", NULL, c_checkgroups, "delsub", NULL, c_unimp, -- Gordon A. Moffett gam@amdahl.amdahl.com Moderation in all things, including moderation. -- [ The opinions expressed, if any, do not represent Amdahl Corporation ]