[comp.unix.xenix] C-Kermit patch to use ungetty

skrenta@eecs.nwu.edu (Richard Skrenta) (12/23/88)

Some folks asked for my patch to C-Kermit (ckutio.c) which makes it talk
to ungetty to secure and drop lines.  Below is a diff -e file made on
ckutio.c.  To use, apply to your ckutio.c and add a flag to the entry in
the makefile so it defines UNGETTY.  (go to the sco286 entry and add a
-DUNGETTY somewhere in that line with the rest of the -Dxxxxx's).

I made a couple of other changes unrelated to ungetty:

	1)  In C-Kermit, I type "set line /dev/tty1a" to call out.  It always
	    hung when I tried to use /dev/tty1A.  However, logins are enabled
	    on tty1A, so my patch does a case change.  If you type
	    "set line /dev/tty1a" it will call "ungetty /dev/tty1A" and make
	    a lockfile "LCK..tty1A".

	    When you exit or switch lines, Kermit will call ungetty -r <device>
	    to re-allow logins on the line.

	2)  There was a blurb of code that said you could comment it out
	    if such-and-such.  I commented it out.  If you still need it,
	    take out the comment marks I put in.

Hope you find this useful.  Happy Holidays!

Rich Skrenta

P.S.  I've never done diff's/patches before.  This seemed to work when I
fed it into my patch program.  The "normal" diffs were slightly larger.
Should I have posted those instead?  What's the difference between doing
diff -e and just diff, in terms of patching later?


-------------------- cut here ----------------------------------------------
811a

#ifdef UNGETTY
    tmplen = strlen(flfnam) - 1;
    flfnam[tmplen] = toupper(flfnam[tmplen]);
#endif UNGETTY