
  Somewhere in a terminal device's UCB is a bit known as the "multisession
bit". This bit is set for workstation pseudo-terminals, etc. and clear for
"real" terminals like LAT devices. This is the bit that LOGINOUT uses to
determine if this interactive job should be checked against the licensed
number of users. That's all it's used for.

  If you set the bit, you've created an unlimited VMS license. And of course,
user-written/modified drivers might unknowingly set this bit, since it isn't
documented 8-}.

Here is a piece of code that demonstrates this problem ...
(Don't blame for this code -- I didn't write it!)


	.ident	/1.0-00/

	.library /SYS$LIBRARY:LIB/
	$dvidef
	$ucbdef
	$ttyucbdef
	$ttyvecdef
	$ssdef

; .psects? We don't need no stinkin' .psects!

	.entry	foo,^m<>

	$getdvi_s	devnam=devnam,itmlst=itmlst
	blbs		r0,10$			; if it looks ok
	ret
10$:	cmpl		#dc$_term,devcls	; is it a terminal?
	beql		20$
	ret
20$:	$cmkrnl_s	routin=zapucb,arglst=arglst
	ret


	.entry	zapucb,^m<r2,r4>

	movl		g^ctl$gl_pcb,r4
	jsb		g^sch$iolockw		; lock I/O database
	movl		4(ap),r1
	jsb		g^ioc$searchdev 	; UCB to R1
	blbs		r0,30$
	brw		40$

30$:	bisw		#tty$m_pc_multisession,ucb$w_tt_prtctl(r1)
	movl		#ss$_normal,r0
40$:	pushl		r0
	jsb		g^sch$iounlock
	popl		r0
	ret

devnam: .ascid	/_LTA0:/			; name of the device

itmlst: .word		4
	.word		dvi$_devclass
	.address	devcls
	.long		0
	.long		0

devcls: .long		0

arglst: .long		1
	.address	devnam

	.end	foo
