1
0
mirror of https://github.com/PDP-10/its.git synced 2026-04-16 00:31:13 +00:00

Added LOOKUP to look up INQUIR entries.

Added INQUPD to process INQUIR database updates.
Added DMUNCH to produce INQUIR;DIRS BIN file.
This commit is contained in:
Eric Swenson
2016-12-03 14:42:37 -08:00
parent ec2b7579d7
commit 947d786951
5 changed files with 2276 additions and 0 deletions

View File

@@ -106,6 +106,8 @@ from scratch.
- PWORD, replacement for sys;atsign hactrn that requires registered logins
- PANDA, user account management program
- SEND, REPLY, replacements for DDT :SEND
- INQUPD, processes INQUIR change requests
- LOOKUP, looks up user info in INQUIR database
6. A brand new host table is built from the host table source and
installed into SYSBIN; HOSTS3 > using H3MAKE.

View File

@@ -585,6 +585,19 @@ respond "*" ":lisp inquir;inquir (dump)\r"
respond "*" ":link inquir;ts inquir,inquir;inqbin >\r"
respond "*" ":link sys;ts inquir,inquir;ts inquir\r"
respond "*" ":midas inquir;dirs bin_inquir;dmunch\r"
expect ":KILL"
respond "*" ":midas inquir;inqupd bin_inquir;inqupd\r"
expect ":KILL"
respond "*" ":link inquir;lsrtns 1,syseng;lsrtns >\r"
respond "*" ":midas inquir;ts lookup_inquir;lookup\r"
expect ":KILL"
respond "*" ":link sys1;ts lookup,inquir;ts lookup\r"
# pword/panda
respond "*" ":midas sysbin;pword bin_sysen1;pword\r"
respond "Is this to be a PANDA?" "yes\r"

160
src/inquir/dmunch.29 Executable file
View File

@@ -0,0 +1,160 @@
; -*- Midas -*-
;
; To create new binary file after munging text definitions (see
; last 2 pages of this file) just assemble into desired filename.
; e.g. :MIDAS INQUIR;DIRS BIN_DMUNCH
ife .fnam1-.ifnm1,[ ; Conditional true if file not being .INSRT'd.
title DMUNCH
.decsav ; to avoid cretinous sblk loader etc.
nosyms
insrtd==0
]
.else [
.begin hsname
insrtd==1
]
comment |
HSNAME TABLE:
0: -<# entries>,,# wds/entry
1-n: MACH entries
=================================================================
Sub-tables
mach wd 0: <machine name> ; 6bit returned by SSTATU
mach wd 1: <site #> ; Arpanet site #.
mach wd 2: <addr of sub-table> ; Addr is rel to start of HSNAME-table.
mach wd 3: <addr of tourist subtable>
Each sub-table is simply:
0: -<# entries>,,# wds per entry ; RH is currently 2.
1-n: NAME entries
entry wd 0: UNAME ; For all unames => this but < next entry,
entry wd 1: HSNAME ; this is the HSNAME.
|
; HSNAME table indices
hx$mch==:0 ; wd 0 of mach-table entry is mach name, as per SSTATU call.
hx$hst==:1 ; wd 1 is arpanet host #.
hx$nrm==:2 ; wd 2 is sub-table ptr for normal unames.
hx$tur==:3 ; wd 3 is sub-table ptr for tourists.
hx$ail==:4
hx$len==:5 ; # wds per mach-table entry
; Sub-table indices
hs$unm==:0 ; wd 0 of sub-table entry is UNAME
hs$hsn==:1 ; wd 1 is HSNAME for range.
hs$len==:2 ; # wds per sub-table entry
ife insrtd,[
if2 word -<%nmach>,,hx$len
%loc==1
%nmach==0
define mach abr,mname,host,list
%sav==%loc
word sixbit /mname/ ; store name of mach
word host ; and site #
%loc==%loc+2
irp d,,[0,1,2,3,4,5,6] ; then various args for mach.
ifle <hx$len-hx$nrm>-d, .istop
ifdef s%!d!!abr, word s%!d!!abr
.else word 0
%loc==%loc+1
termin
%sav==hx$len-<%loc-%sav>
ifg %sav, repeat %sav,[ word 0 ? %loc==%loc+1 ? ]
%nmach==%nmach+1
termin
define subtab abr,idx,list
s%!idx!abr==%loc ; note loc of subtable
word -<c%!idx!abr>,,hs$len ; set <# entries>,,<# wds per entry>
%loc==%loc+1
%ecnt==0
irp pair,,[list]
irp uname,hsname,[pair]
ife %ecnt,[ifnb [uname][ ; Make sure 1st entry has zero uname.
word setz
word sixbit |hsname|
%ecnt==%ecnt+1
%loc==%loc+hs$len
]]
word <sixbit |uname|>#setz
word sixbit |hsname|
%ecnt==%ecnt+1
%loc==%loc+hs$len
.istop
termin
termin
c%!idx!abr==%ecnt ; set # entries.
termin
] ; ife insrtd,
; MACHINE definitions - Syntax is
; MACH <abbrev>,<sixbit sitename>,<host>,<list>
; where <abbrev> must be 3 letters or less, and <sitename> must be what
; a SSTATU call returns, and <host> is the arpanet site #.
MACH AI,AI,206,[[3,USERS1]]
MACH MC,MC,354,[[4,USERS1],[3,GUEST1]]
MACH MX,MX,-1,[[4,USERS1],[3,GUEST1]]
MACH MD,MD,-1,[[2,USERS1]]
MACH ML,ML,-1,[[3,USERS1]]
;MACH ML,ML,306,[[3,USERS1]]
;MACH DM,DM,106,[[2,USERS1]]
;;; This is not the most flexible kludge in the world.
;;; Users are divided into directory groups, each of which has a subtable.
;;; #0 is for normal users (who don't have their own dir).
;;; #1 is for tourists.
;;; #2 is defined on MC and ML for AI lab users.
;;;
;;; User group mapping information is procedurally embedded in the LSRTNS"LSRSNN routine.
; DIRECTORY SUBTABLE definitions - syntax is:
; SUBTAB <abbrev>,<table #>,<directory list>
; <abbrev> is one of those defined by MACH,
; <table #> is 0 for normal, 1 for tourist.
; <dir list> is a list of paired names; the first
; name is the start of a UNAME range extending up to
; but not including the next pair, and the second
; name is the HSNAME for that range.
; NOTE: the first name of the first pair should be null.
; e.g.
; SUBTAB AI,0,[[,GUEST0],[K,GUEST1],[P,GUEST2]]
; which defines the "normal" (0) subtable for AI to have 3 directories,
; GUEST0 for UNAMES from null to "L_____" inclusive,
; GUEST1 for UNAMES from "K" to "O_____" inclusive, and
; GUEST2 for UNAMES from "P" to "______" inclusive.
;
SUBTAB AI,0,[[,USERS1],[GS,USERS2],[MP,USERS3]]
SUBTAB MC,0,[[,USERS0],[DA,USERS1],[F,USERS2],[J,USERS3],[JO,USERS4],[KJ,USERS5],[NR,USERS6],[R,USERS7],[RL,USERS8],[SR,USERS9]]
SUBTAB MC,1,[[,GUEST0],[D,GUEST1],[I,GUEST2],[LJ,GUEST3],[PD,GUEST4],[T,GUEST5]]
SUBTAB MC,2,[[,AI0]]
SUBTAB MX,0,[[,USERS0],[DA,USERS1],[F,USERS2],[J,USERS3],[JO,USERS4],[KJ,USERS5],[NR,USERS6],[R,USERS7],[RL,USERS8],[SR,USERS9]]
SUBTAB MX,1,[[,GUEST0],[D,GUEST1],[I,GUEST2],[LJ,GUEST3],[PD,GUEST4],[T,GUEST5]]
SUBTAB MX,2,[[,AI0]]
SUBTAB MD,0,[[,USERS1],[KK,USERS2]]
SUBTAB ML,0,[[,USERS1],[GS,USERS2],[MP,USERS3]]
SUBTAB ML,2,[[,AIRAN]]
;SUBTAB DM,0,[[,USERS1],[KK,USERS2]]
ifn insrtd, .end hsname
ife insrtd, end

1827
src/inquir/inqupd.128 Normal file

File diff suppressed because it is too large Load Diff

274
src/inquir/lookup.4 Normal file
View File

@@ -0,0 +1,274 @@
;-*- Mode: Midas -*-
TITLE LOOKUP an Inquire entry
;CStacy, 4/26/83
SUBTTL Basic definitions
;;; Registers.
X=0 ;Super temporary register.
A=1 ;General registers.
B=2
C=3
D=4
E=5
BP=6 ;Byte pointer.
CHAR=7 ;Character being manipulated.
T=10 ;Temporary
TT=11 ;Temporary+1.
OC==12 ;OUT register.
U1==13 ;4 UUO Registers.
U2==14
U3==15
U4==16
P=17 ;Stack pointer.
;;; I/O Channels
DSKI=14 ;Disk input.
TTYO=15 ;TTY typeout.
TTYI=16 ;TTY typein.
;;; Macros and output routines.
$$OUT==1
.INSRT KSC;MACROS >
.INSRT KSC;IVORY >
.INSRT KSC;OUT >
;;; LSR1 database routines.
$$OVLY==1
.INSRT LSRTNS >
SUBTTL Interrupt Handler and various returns
POPJ1: AOS (P) ;Skip
CPOPJ: RET ;Return
SYSLOS::
AUTPSY: 0 ;Fatal error JSR here.
DEATH: SKIPE DEBUG ;Come here to log out.
.VALUE [0]
.LOGOUT 1,
TMPLOC 42,{-TSINTL,,TSINT} ;New style interrupts.
INTACS==T_6+7 ;T,TT, and OUT registers preserved.
TSINT: INTACS,,P
0 ? 1_TTYI ? 0 ? <1_TTYO>\<1_TTYI> ? CHRINT
0 ? 1_TTYO ? 0 ? 0 ? MORINT
TSINTL==:.-TSINT
;;; Interrupt dismissal
INTRET: SYSCAL DISMIS,[%CLBIT,,INTACS ? P]
JSR SYSLOS
;;; Console interrupts.
CHRINT: MOVEI T,TTYI ;INTERRUPT CHAR.
.ITYIC T,
JRST INTRET
CAIE T,^S
CAIN T,^G
JRST [.RESET TTYO,
SYSCAL TTYFLS,[ %CLBIT,,1 ? %CLIMM,,TTYI]
.LOSE %LSSYS
JRST FLSIT1]
JRST INTRET
MORINT: OUT(TTYO,("--More--")) ;MORE BREAK.
SYSCAL IOT,[%CLBIT,,%TIPEK ? %CLIMM,,TTYI ? %CLOUT,,T]
.LOSE %LSFIL
CAIE T,40
CAIN T,177
.IOT TTYI,T
CAIE T,40
JRST FLSIT
OUT(TTYO,("A"))
JRST INTRET
FLSIT: OUT(TTYO,("Flushed"))
FLSIT1: JRST DEATH ;means we are done.
SUBTTL Main program
GO: MOVE P,[-PDLLEN,,PDL] ;Init the stack.
SYSCAL OPEN,[%CLBIT,,<.UAO\%TJDIS> ? %CLIMM,,TTYO ? [SIXBIT /TTY/]]
.LOSE %LSFIL
SYSCAL OPEN,[%CLBIT,,.UAI ? %CLIMM,,TTYI ? [SIXBIT /TTY/]]
.LOSE %LSFIL
SYSCAL CNSGET,[%CLIMM,,TTYO ? %CLOUT,,X ? %CLOUT,,TCMXH]
.LOSE %LSFIL
SYSCAL TTYSET,[%CLIMM,,TTYI ? [222222,,222222] ? [230222,,220222]]
.LOSE %LSFIL
.SUSET [.ROPTION,,A] ;Read job option bits.
TLO A,%OPINT\%OPOPC ;Turn on winning-PC and new interrupts.
.SUSET [.SOPTION,,A] ;Set option bits.
.SUSET [.SMSK2,,[<1_TTYI>\<1_TTYO>]] ;Enable TTY interrupts.
OUT(TTYO,OPEN(UC$IOT))
OUT(,CH(TTYO)) ;Open typeout display as default device.
TLNN A,OPTCMD ;If user forgot JCL
JRST [ SKIPN DEBUG ; and we are not debugging
JRST NOJCL ; we can't do much.
MOVE A,[SIXBIT /TEST/]
MOVEM A,UNAME ; Use TEST name for debugging.
JRST MAPLSR ]
.BREAK 12,[..RJCL,,JCLBUF] ;Read JCL into buffer.
MOVE BP,[440700,,JCLBUF]
MOVE B,[440600,,UNAME]
MOVEI C,6
GETJCL: ILDB CHAR,BP
JUMPE CHAR, ENDJCL ;A ^@ ends JCL.
CAIN CHAR,^M ;So does a ^M.
JRST ENDJCL
CAIN CHAR,37 ;So does a ^_.
JRST ENDJCL
CAIN CHAR,3 ;So does a ^C.
JRST ENDJCL
CAIGE CHAR,140 ;Convert to Sixbit.
SUBI CHAR,40
IDPB CHAR,B ;Store as uname.
SOJN C,GETJCL
ENDJCL: CAIE C,6
JRST MAPLSR
NOJCL: OUT(,("AUsage is :LOOKUP <user>"))
JRST DEATH
MAPLSR: MOVEI A,DSKI ;Try to map in Inquire database.
MOVE B,[-LSRPGS,,LSRPAG]
CALL LSRTNS"LSRMAP
JRST [ OUT(,("AUnable to map Inquire database."),CRLF)
JRST DEATH ]
GETLSR: MOVEI A,DSKI
MOVE B,UNAME ;Look up luser in database.
CALL LSRTNS"LSRUNM ;Get core addr of entry in B.
JRST [ OUT(,("ANot found"),CRLF)
JRST DEATH ]
SHOWIT:
SKIPN DEBUG
OUTCAL(,("C")) ;Clear screen.
MOVSI D,-NITMS ;AOBJN pointer to Items.
GETITM: HRRZ A,LSTTAB(D) ;Get next item description string.
HRLI A,440700 ;Make Bp to it.
OUT(,TZ$(A),(" "),LPAR) ;Print long name of item.
HLRZ E,LSTTAB(D) ;Get item number.
CALL NAMOUT ;Print short name of item.
OUT(,RPAR,(":"),CALL(PTAB))
MOVE A,E ;Get item number.
CALL LSRTNS"LSRITM ;Look up item in database.
JRST [ OUT(,CRLF) ; If not there skip it.
JRST NXTITM ]
CALL ITMOUT ;Type out the item's value.
NXTITM: AOBJN D,GETITM ;Get another item.
JRST DEATH ;All done.
SUBTTL Additional Output routines
;;; CLEOL and move to column #o50.
PTAB: MOVE T,[ASCIZ /LH(/]
OUT(,TZ(T))
RET
;;; ITMOUT types out the Inquire item pointed at by the Bp in A.
;;; Newlines get handled properly. The Bp is updated.
ITMOUT: ILDB CHAR,A
CAIN CHAR,^M ;If this is a CR
JRST [ ILDB CHAR,A ; Gobble the LF.
OUT(,CRLF,CALL(PTAB)) ; Do a prettier CRLF.
JRST ITMOUT ] ; Continue.
SKIPN CHAR
JRST [ OUT(,CRLF)
RET ]
.IOT TTYO,CHAR
JRST ITMOUT
;;; NAMOUT takes a LSR1 item number in E, and types out its name.
NAMOUT: HRRZI T,ITMNAM+1(E) ;Get addr of item short name.
HRLI T,440700 ;Make Bp to it.
MOVEI TT,5. ;Max five chars.
NAMOU1: ILDB CHAR,T ;Get character.
JUMPE CHAR,NAMOU2 ;If zero, done.
.IOT TTYO,CHAR ;Type it.
SOJN TT,NAMOU1 ;Go back for more characters.
NAMOU2: RET ;Done.
SUBTTL Storage
;;; Macro to create a table of item descriptions.
NITMS==0
DEFINE ITEM NUM,&DESC
NITMS==NITMS+1
NUM,,[ASCIZ DESC]
TERMIN
;;; This table is in the order we want the items listed.
LSTTAB: ITEM LSRTNS"I$UNAM,"User-name"
ITEM LSRTNS"I$AUTH,"Authorization"
ITEM LSRTNS"I$NAME,"Name"
ITEM LSRTNS"I$NICK,"Nick-name"
ITEM LSRTNS"I$GRP,"Group"
ITEM LSRTNS"I$REL,"Relation"
ITEM LSRTNS"I$MITA,"MIT address"
ITEM LSRTNS"I$MITT,"MIT phone"
ITEM LSRTNS"I$HOMA,"Home address"
ITEM LSRTNS"I$HOMT,"Home phone"
ITEM LSRTNS"I$NETA,"Network mailbox"
ITEM LSRTNS"I$BRTH,"Birthday"
ITEM LSRTNS"I$PROJ,"Project"
ITEM LSRTNS"I$SUPR,"Supervisor"
ITEM LSRTNS"I$REM,"Remarks"
ITEM LSRTNS"I$DIR,"File directories"
ITEM LSRTNS"I$LOCL,"Local fields"
ITEM LSRTNS"I$MACH,"Machines"
ITEM LSRTNS"I$ALTR,"Last Alteration"
;ITEMN+N has name of n'th item, as 5 chars of ascii.
ITMNAM: LSRTNS"ITMIRP [.1STWD ASCII/ITEM/]
PDLLEN==64. ;Stack length.
LSRPGS==220. ;Number of pages reserved for LSR1.
JCLBFL==10. ;Number of words for JCL buffer.
PDL: BLOCK PDLLEN ;The stack.
DEBUG: 0 ;-1 iff debugging.
JCLBUF: BLOCK JCLBFL ;JCL buffer.
TCMXH: 0 ;Console parameters.
UNAME: 0 ;UNAME of loser to look up.
CONSTANTS
VARIABLES
VARCHK
LSRPAG==<.+1777>/2000 ;Starting page of Inquire database.
LSR1=LSRPAG*2000 ;Address of database header.
END GO