.title AUDIT Send a security audit to OPCOM .ident /V1.00/ .sbttl Documentation ; ; This procedure will send a message to all operators ; enabled as SECURITY. The parameters are an error ; message code, and two parameters to the error message. ; The message is formatted and sent to the OPCOM. This ; is used for the AUTH_ID package. ; ; Eric F. Richards ; 28-May-86 ; Gould OSD VAXcluster VMS V4.3 ; .sbttl Macros, constants, and other rot .default displacement, word ; ...not really needed here .enable suppression ; clean up the listing files .disable traceback, debug ; hands off with the debugger $ssdef ; define system service codes $opcdef ; define opcom codes fudge = 8 ; fudge factor for sndopr minargs = 3 ; accept only this many args fao1 = 4 ; first argument to it fao2 = 8 ; and the second arg to it msgid = 12 ; error message code bufsiz = 128 ; define buffer size .sbttl Main Code .page .psect $code, long, exe, nowrt, pic, shr .entry audit, ^m ; entry point cmpb #minargs, (ap) ; enough arguments? bleq 10$ ; if so, continue movzwl #ss$_insfarg, r0 ; else, set error text ret ; and get out 10$: subl #bufsiz, sp ; make buffer for message movl sp, r2 ; save a pointer to it clrw -(sp) ; buffer prefix for opcom clrb -(sp) ; ...messages: return info pushl #opc$m_nm_security ; message is a SECURITY one movb #opc$_rq_rqst, -(sp) ; message is a REQUEST pushl sp ; build a descr for this buf pushl #bufsiz+fudge ; this is the opcom buf size movl sp, r3 ; save a pointer to the descr pushl r2 ; build descriptor for pushl #bufsiz ; ...original buffer movl sp, r5 ; r5 points to this descr subl #bufsiz, sp ; make buffer for unformatted pushl sp ; ...message -- make descr pushl #bufsiz ; ...for it movl sp, r2 ; save a pointer to it all! $getmsg_s msgid=msgid(ap), - ; get the message to format msglen=(r2), - ; write the length here bufadr=(r2) ; write the message here blbc r0, 20$ ; on error fubar out $fao_s ctrstr=(r2), - ; format the output string outlen=(r5), - ; write its length here outbuf=(r5), - ; write the out string here p1=fao1(ap), - ; first arg here p2=fao2(ap) ; second one here blbc r0, 20$ ; on error fubar out addl3 #fudge, (r5), (r3) ; set length for sndopr buf $sndopr_s msgbuf=(r3) ; send the output message 20$: ret ; all done, go home now... .end ; that's all, folks!