www.a00.de > tcpgroup > 1991 > msg00106
 

TCP-group 1991


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Current process in NOS??



Can anyone fill me in on how to determine when the code in "cmdparse.c"
is running in the "console command state"?  What I need to do, is add a
conditional that is only true when the command has come from the "net>"
prompt.  My first attempt was to do a check using:
     if (Current == Command)
but that doesn't seem to do it.  This ends up being true, even when the
command is coming thru cmdparse from the MBOX.

For those that are curious, I was trying to patch in the mods made by
the JA folks for running netnews, and this modification enables NOS to
spawn an unknown command to MS-Dos for execution (so you can run the
news processing software periodically).  Addition of the "timer" command
and "commandfile" command went smoothly, and the "extsearch" works, but
I'm getting "trash" commands coming from the MBOX, that are being tossed
to MS-Dos for execution.  I've found that if someone connects to the
MBOX (via AX.25), and they haven't successfully received the MBOX prompt
yet, they can start sending command text that passes right thru the
MBOX cmdparse and out to Dos.  Kind of scary if someone knows about this
"hole".  They can delete all your files!  So I'd really like to fix
this one.  Any suggestions would be appreciated.  Here's a segment of what
I've done to the code so far:

        /* Look up command in table; prefix matches are OK */
        for(cmdp = cmds;cmdp->name != NULLCHAR;cmdp++){
                if(strncmp(argv[0],cmdp->name,strlen(argv[0])) == 0)
                        break;
        }
        if(cmdp->name == NULLCHAR) {
==>             if ((Current == Command) && extsearch) {
                        rslt = doexec(cpp);
                        free(cpp);
                        return(rslt);
                } else {
                        if(cmdp->argc_errmsg != NULLCHAR)
                                tprintf("%s\n",cmdp->argc_errmsg);
                        free(cpp);
                        return -1;
                }

73 . . . Dave Fritsche (wb8zxu)
dlf@phx.mcd.mot.com (Tempe, AZ)





Document URL : http://www.a00.de/tcpgroup/1991/msg00106.php
Ralf D. Kloth, Ludwigsburg, DE (QRQ.software). < hostmaster at a00.de > [don't send spam]
Created 2004-12-21. Last modified 2004-12-21. Your visit 2024-11-24 01:40.13. Page created in 0.0264 sec.
 
[Go to the top of this page]   [... to the index page]