[0001] [0002] [0003] [0004] [0005] [0006] [0007] [0008] [0009] [0010] [0011] [0012] [0013] [0014] [0015] [0016] [0017] [0018] [0019] [0020] [0021] [0022] [0023] [0024] [0025] [0026] [0027] [0028] [0029] [0030] [0031] [0032] [0033] [0034] [0035] [0036] [0037] [0038] [0039] [0040] [0041] [0042] [0043] [0044] [0045] [0046] [0047] [0048] [0049] [0050] [0051] [0052] [0053] [0054] [0055] [0056] [0057] [0058] [0059] [0060] [0061] [0062] [0063] [0064] [0065] [0066] [0067] [0068] [0069] [0070] [0071] [0072] [0073] [0074] [0075] [0076] [0077] [0078] [0079] [0080] [0081] [0082] [0083]
;------------------------------------------------------------------------------ .TITLE PERSONA_MAR .IDENT /1.0.1/ ;------------------------------------------------------------------------------ ; ; This package is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; version 2 of the License, or any later ; version. ; This package is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ; This module has been plagiarized from MACRO that supports(ed?) ; the BECOME program (WEW). Culled to merely set the PCB username(s). ; This is only intended for pre-VMS 6.2 VAX where $PERSONA is not supported. ; See PERSONA.C for the environment from which this is called. ; It assumes the username parameter will be 12 characters blank filled. ; I am not a VMS internals specialist! ; I have absolutely little idea what I'm doing here!! ; Use at your own risk!!! ; YOU HAVE BEEN WARNED!!!! ; VERSION HISTORY ; --------------- ; 01-NOV-2001 MGD v1.0.1, refinements suggested by J.Begg ; 28-OCT-2001 MGD v1.0.0, initial ; ;------------------------------------------------------------------------------ ; ; Include files: ; .LIBRARY /SYS$LIBRARY:LIB/ ; Executive macro library .LINK 'SYS$SYSTEM:SYS.STB'/SELECTIVE_SEARCH $PCBDEF ; Process Control Block offsets $JIBDEF ; Job Information Block offsets $PHDDEF ; Process Header Block offsets $PRDEF ;------------------------------------------------------------------------------- .PSECT DATA,RD,NOWRT,NOEXE,PIC,LONG ;------------------------------------------------------------------------------- .ENTRY MACRO_SET_USERNAME, 0 ; Routine entry point $CMKRNL_S ROUTIN=MACRO_SETUSR, - ; Kick into kernel ARGLST=(AP) ; & pass along the argument list RET ; back to the calling function .ENTRY MACRO_SETUSR, ^M<R2,R3,R4,R5> ; Kernel entry point MOVAL HANDLER, (FP) ; Establish anti-crashing handler MOVL PCB$L_JIB(R4),R0 ; Get JIB address MOVC3 #JIB$S_USERNAME,@4(AP),- ; Copy the username JIB$T_USERNAME(R0) ; into the JIB MOVC3 #JIB$S_USERNAME,@4(AP),- ; Copy the username G^CTL$T_USERNAME ; into the CTL region MOVZBL #SS$_NORMAL, R0 ; Set success RET ; from kernel ;------------------------------------------------------------------------------- .PSECT COND_HANDLER RD,NOWRT,PIC,EXE,LONG ;------------------------------------------------------------------------------- .ENTRY HANDLER ^M<> ; 10$: $EXIT_S ; Cause process to exit ;------------------------------------------------------------------------------- .END ;-------------------------------------------------------------------------------