B From:	MERC::"uunet!WKUVX1.BITNET!MacroMan" 28-APR-1993 11:03:36.79 To:	MACRO32@WKUVX1.BITNET  CC:	- Subj:	RE: PRC$M_NETWORK (was Re: $creprc ...)   7 Wolfgang J. Moeller <moeller@gwdgv1.dnet.gwdg.de> wrote & a program to create a network process.  	 Thanks...   L >        .title  zlnp    create a network process with PROXY access (VMS V5) >;F >; as of VMS 5.5-1, SYS$OUTPUT for a NETWORK process looks as follows:  >;------------------------------ >;       .word   proxy_flags7 >;  .if (proxy_flags & 1)                        ;; new 8 >;       .ascic  proxy_username                  ;; with: >;  .endif                                       ;; VMS V5 >;       .ascic  username  >;       .ascic  password  >;       .ascic  account  >;------------------------------I >; Note: the trailing fields *must* be present; they may be 0, of course.  >;I >; If a proxy-login is attempted and the proxy_username is not in SYSUAF, K >; the following (standard) access info will be used; otherwise proxy-login  >; will succeed.D >; Proxy logins are allowed even for accounts with "AUTOLOGIN" flag. >;; >; Symbolic codes for proxy_flags (LGI$V_NET_*) are defined $ >; in LIB.REQ starting with VMS 5.5: >;       LGI$V_NET_PROXY = 0 >;       LGI$V_NET_PREAUTH = 1; >; New with VMS 5.5: a non-proxy login with NET_PREAUTH set < >; will not check the password (similar to a proxy request). >;B >; The above proxy handling apparently was introduced with VMS V5;> >; formerly LOGINOUT would require both username and password. >;@ >; SYS$ERROR as specified will be put into the network process'sI >; SYS$NET logname. As of VMS 5.5, some additional magic(??) will be done < >; if the SYS$ERROR string contains a '/' (slash) character! >;E >; The network process's SYS$OUTPUT and SYS$ERROR are always directed F >; to a .LOG file, with name derived from SYS$INPUT (but in the user'sC >; default directory). Traditionally, the original SYS$INPUT can be % >; found in the "TT" process logname.  >;A >; Note: PRC$M_NOPASSWORD has effect for interactive logins only.  >; >;*****  >; >        $prcdef >;H >image:  .ascid  "SYS$SYSTEM:DCL.EXE"    ; just for fun - same effect asM >                                        ; specifying SYS$SYSTEM:LOGINOUT.EXE L >input:  .ascid  "SYS$MANAGER:00.COM"    ; command procedure to be executed,O >                                        ; logfilespec will be SYS$LOGIN:00.LOG J >error:  .ascid  "cont_of_net"           ; this string goes into SYS$NET -A >                                        ; no '/' here, please!?? / >out_b:  .word   1               ;ask for proxy , >        .ascic  "MOELLER"       ;proxy userL >        .ascic  "DECNET"        ;(default user, only used in case of error)4 >        .ascic  ""              ;(default password)F >        .ascic  ""              ;(default "account" - ignored anyway) >out_l=.-out_b >output: .long   out_l >        .address out_b M >priv:   .long   -1,-1           ; /priv=ALL doesn't hurt, but isn't required / >prcnam: .ascid  "00_NET"        ; process name  >; >.entry  begin,^m<>  >        $creprc_s       - >                image=image,- >                input=input,-  >                output=output,- >                error=error,- >                prvadr=priv,-  >                prcnam=prcnam,- >                baspri=#4,-" >                uic=#^x00010004,-% >                stsflg=#prc$m_netwrk  >        ret >; >        .end    begin >   K I wondered why it changed the username of the process running this program. 2 Well, stsflg should be #PRC$M_NETWRK!PRC$M_DETACH.A Otherwise the network process becomes a subprocess of the process 8 running this program, and LOGINOUT.EXE (DCL.EXE) changes! the username which is in the JIB.   H So SET PROCESS/USER=<user> can be implemented by calling sys$creprc with* PRC$M_NETWRK if you have DETACH privilege.   /Carlo Mekenkamp <DNW@NLR.NL> 