| show_uaf.com |
|
steve sparrow, Wednesday October 07 2009 @ 03:19PM EDT
|
$! SHOW_UAF.COM -- demonstrate UAF fields with DCL SDS 02-Feb-2005
$! Demonstrate how to get all the information that MCR AUTHORIZE SHOW *
$! can display by reading SYSUAF: and RIGHTSLISTS:. Also show information
$! from each user's VMSMAIL_PROFILE: record.
$!_____________________________________________________________________________
$!
$ pgm = f$parse(f$environment("procedure"),,,"name")
$ quiet = %X10000000
$ rmseeof = %X1001827A
$ rmsieof = %X1001827B
$ on control_y then interrupt\'pgm'
$ on warning then exit $status .or. quiet
$ say = "Write Sys$Output"
$
$ Gosub Filename_Setup
$ Gosub Offset_Setup
$ Call Open_Files
$ on warning then goto exit
$
$ Key = P1
$ If Key .nes. "" then READ/NOLOCK/END=EXIT/KEY=&KEY UIF UIR
$ Loop: If Key .eqs. "" then READ/NOLOCK/END=EXIT UIF UIR
$ usr = f$extract(uaf$t_username,uaf$s_username,uir)
$ holder = f$extract(uaf$l_uic,quad,uir)
$ call dump uir
$ If Key .eqs. "" then goto Loop
$
$ exit: status = $status .or. quiet
$ if status .eq. rmseeof then status = rmsieof
$ Call Close_Files
$ exit status
$!_____________________________________________________________________________
$ print_uaf:
$ subroutine
$
$ ON CONTROL_Y then interrupt\'pgm'_print_uaf
$ ON WARNING then exit $status .or. quiet
$
$ Gosub Tweak_format
$
$ say ""
$ say f$fao("Username: !32AS Owner: !AS", usr, own)
$ say f$fao("Account: !32AS UIC: !AS (!AS)", acc, uic_u, uic_i)
$ say f$fao("CLI: !32AS Tables: !AS", cli, tbl)
$ say f$fao("Default: !AS", default)
$ say f$fao("LGICMD: !AS", cmd)
$ say f$fao("Flags: %x!XL", flags)
$ show symbol flag_text
$ say f$fao("Primary days: !AS", primary)
$ say f$fao("Secondary days: !AS", secondary)
$
$ if full_access
$ then say f$fao("No access restrictions")
$ else say f$fao("Primary !24AS Secondary !24AS", tens, tens)
$ say f$fao("Day Hours !24AS Day Hours !24AS", ones, ones)
$ say f$fao("Network: !24AS !24AS", network_p, network_s)
$ say f$fao("Batch: !24AS !24AS", batch_p, batch_s)
$ say f$fao("Local: !24AS !24AS", local_p, local_s)
$ say f$fao("Dialup: !24AS !24AS", dialup_p, dialup_s)
$ say f$fao("Remote: !24AS !24AS", remote_p, remote_s)
$ endif
$
$ say f$fao("Expiration: !17AS Pwdminimum: !2UL Login Fails: !5UL", exp, pwdmin, logf)
$ say f$fao("Pwdlifetime:!17AS Pwdchange: !17AS !AS", pwdlif,pwdchg,pwdchg2)
$ say f$fao("Last Login: !17AS (interactive), !17AS (non-interactive)", logini,loginn)
$ say f$fao("Maxjobs: !6UL Fillm: !7UL Bytlm: !10UL", maxjob,fillm,bytlm)
$ say f$fao("Maxacctjobs:!6UL Shrfillm:!7UL Pbytlm: !10UL", maxacc,sfillm,pbytlm)
$ say f$fao("Maxdetach: !6UL BIOlm: !7UL JTquota: !10UL", maxdet,biolm,jtquo)
$ say f$fao("Prclm: !6UL DIOlm: !7UL WSdef: !10UL", prclm,diolm,wsdef)
$ say f$fao("Prio: !6UL ASTlm: !7UL WSquo: !10UL", prio,astlm,wsquo)
$ say f$fao("Queprio: !6UL TQElm: !7UL WSextent:!10UL", qprio,tqelm,wsext)
$ say f$fao("CPU: !6AS Enqlm: !7UL Pgflquo: !10UL", cpu,enqlm,pgflq)
$ priv1 = f$cvui( 0,32,auth_priv)
$ priv2 = f$cvui(32,32,auth_priv)
$ say f$fao("Authorized Privileges: %x!8XL !8XL", priv2, priv1)
$ show symbol auth_priv_text
$ priv1 = f$cvui( 0,32,default_priv)
$ priv2 = f$cvui(32,32,default_priv)
$ say f$fao("Default Privileges: %x!8XL !8XL", priv2, priv1)
$ show symbol default_priv_text
$ Cnt = 0
$ say f$fao("Identifier !24* Value !10* Attributes")
$ GetId:Cnt = Cnt + 1
$ If Cnt .gt. IdCnt then goto IdDone
$ show symbol ID'Cnt'
$ Goto GetId
$ IdDone:
$
$ show symbol userdata
$ Exit
$!_____________________________________________________________________________
$ Tweak_format:
$ VMS_EPOCH = "17-NOV-1858 00:00:00.00"
$ DELTA_ZERO= " 0 00:00:00.00"
$ NONE = "(none)"
$ PREEXP = "(pre-expired)"
$ PREEXP_RJ = f$fao("!#* !#AS", 17 - f$length(PREEXP), f$length(PREEXP), PREEXP)
$ NONE_RJ17 = f$fao("!#* !#AS", 17 - f$length(NONE), f$length(NONE), NONE)
$ NONE_RJ6 = f$fao("!#* !#AS", 6 - f$length(NONE), f$length(NONE), NONE)
$
$ if exp .eqs. VMS_EPOCH then exp = NONE_RJ17
$ if pwdchg .eqs. VMS_EPOCH then pwdchg = NONE_RJ17
$ if pwdchg .eqs. DELTA_ZERO then pwdchg = PREEXP_RJ
$ if pwdchg2 .eqs. VMS_EPOCH then pwdchg2 :=
$ if pwdchg2 .eqs. DELTA_ZERO then pwdchg2 = PREEXP_RJ
$ pwdchg2 = f$fao("!17AS", pwdchg2)
$ if pwdchg2 .eqs. f$fao("17* ") then pwdchg2 :=
$ if logini .eqs. VMS_EPOCH then logini = NONE_RJ17
$ if loginn .eqs. VMS_EPOCH then loginn = NONE_RJ17
$
$ if cpu .eq. 0
$ then cpu = NONE_RJ6
$ else cpu = f$fao("!6AS", f$fao("!6UL",cpu))
$ endif
$
$ if pwdlif .eqs. VMS_EPOCH
$ then pwdlif = NONE_RJ17
$ else pwdlif = f$fao("!10AS", pwdlif)
$ pwdlif = f$fao("!#* !#AS", 17 - f$length(pwdlif), f$length(pwdlif), pwdlif)
$ endif
$
$ Return
$
$ endsubroutine
$!_____________________________________________________________________________
$ Dump:
$ subroutine
$ on control_y then interrupt\'pgm'_dump
$ on warning then exit $status .or. quiet
$!
$ uar = 'p1'
$ usr = f$edit(f$extract(uaf$t_username,uaf$s_username,uar),"trim")
$ len = f$cvui(0,8,f$extract(uaf$t_owner-1,1,uar))
$ own = f$extract(uaf$t_owner,len,uar)
$! own = f$edit(f$extract(uaf$t_owner,uaf$s_owner,uar),"trim")
$
$ acc = f$edit(f$extract(uaf$t_account,uaf$s_account,uar),"trim")
$ if f$cvui(0,8,f$extract(uaf$t_account,1,uar)) .eq. 0 then acc :=
$
$ gosub get_uic_info
$
$ len = f$cvui(0,8,f$extract(uaf$t_defcli-1,1,uar))
$ cli = f$extract(uaf$t_defcli,len,uar)
$! cli = f$edit(f$extract(uaf$t_defcli,uaf$s_defcli,uar),"trim")
$ len = f$cvui(0,8,f$extract(uaf$t_clitables-1,1,uar))
$ tbl = f$extract(uaf$t_clitables,len,uar)
$! tbl = f$edit(f$extract(uaf$t_clitables,uaf$s_clitables,uar),"trim")
$
$ len = f$cvui(0,8,f$extract(uaf$t_defdev-1,1,uar))
$ dev = f$extract(uaf$t_defdev,len,uar)
$! dev = f$edit(f$extract(uaf$t_defdev,uaf$s_defdev,uar),"trim")
$ len = f$cvui(0,8,f$extract(uaf$t_defdir-1,1,uar))
$ dir = f$extract(uaf$t_defdir,len,uar)
$! dir = f$edit(f$extract(uaf$t_defdir,uaf$s_defdir,uar),"trim")
$ default = f$fao("!2(AS)",dev,dir)
$
$ usroff = f$cvui(0,16,f$extract(uaf$w_usrdatoff,2,uar))
$ if usroff .eq. 0
$ then userdata :=
$ else usrdatl = f$cvui(0, 8,f$extract(usroff,1,uar))
$ userdata= f$extract(usroff+1,usrdatl,uar)
$ endif
$
$ len = f$cvui(0,8,f$extract(uaf$t_lgicmd-1,1,uar))
$ cmd = f$extract(uaf$t_lgicmd,len,uar)
$! cmd = f$edit(f$extract(uaf$t_lgicmd,uaf$s_lgicmd,uar),"trim")
$
$ gosub get_flags
$ gosub get_primedays
$ gosub get_login_times
$
$ tmp = f$extract(uaf$q_expiration,quad,uar)
$ exp = f$fao("!%D", f$cvui(32,32,f$fao("!AD",8,tmp)))
$ pwdmin = f$cvui(0,8,f$extract(uaf$b_pwd_length,byte,uar))
$ logf = f$cvui(0,16,f$extract(uaf$w_logfails,word,uar))
$
$ tmp = f$extract(uaf$q_pwd_lifetime,quad,uar)
$ pwdlif = f$fao("!%D", f$cvui(32,32,f$fao("!AD",8,tmp)))
$ tmp = f$extract(uaf$q_pwd_date,quad,uar)
$ pwdchg = f$fao("!%D", f$cvui(32,32,f$fao("!AD",8,tmp)))
$ tmp = f$extract(uaf$q_pwd2_date,quad,uar)
$ pwdchg2 = f$fao("!%D", f$cvui(32,32,f$fao("!AD",8,tmp)))
$
$ tmp = f$extract(uaf$q_lastlogin_i,quad,uar)
$ logini = f$fao("!%D", f$cvui(32,32,f$fao("!AD",8,tmp)))
$ tmp = f$extract(uaf$q_lastlogin_n,quad,uar)
$ loginn = f$fao("!%D", f$cvui(32,32,f$fao("!AD",8,tmp)))
$
$ maxjob = f$cvui(0,16,f$extract(uaf$w_maxjobs,word,uar))
$ fillm = f$cvui(0,16,f$extract(uaf$w_fillm,word,uar))
$ bytlm = f$cvui(0,32,f$extract(uaf$l_bytlm,long,uar))
$
$ maxacc = f$cvui(0,16,f$extract(uaf$w_maxacctjobs,word,uar))
$ sfillm = f$cvui(0,16,f$extract(uaf$w_shrfillm,word,uar))
$ pbytlm = f$cvui(0,32,f$extract(uaf$l_pbytlm,long,uar))
$
$ maxdet = f$cvui(0,16,f$extract(uaf$w_maxdetach,word,uar))
$ biolm = f$cvui(0,16,f$extract(uaf$w_biolm,word,uar))
$ jtquo = f$cvui(0,32,f$extract(uaf$l_jtquota,long,uar))
$
$ prclm = f$cvui(0,16,f$extract(uaf$w_prccnt,word,uar))
$ diolm = f$cvui(0,16,f$extract(uaf$w_diolm,word,uar))
$ wsdef = f$cvui(0,32,f$extract(uaf$l_dfwscnt,long,uar))
$
$ prio = f$cvui(0, 8,f$extract(uaf$b_pri,byte,uar))
$ astlm = f$cvui(0,16,f$extract(uaf$w_astlm,word,uar))
$ wsquo = f$cvui(0,32,f$extract(uaf$l_wsquota,long,uar))
$
$ qprio = f$cvui(0, 8,f$extract(uaf$b_quepri,byte,uar))
$ tqelm = f$cvui(0,16,f$extract(uaf$w_tqcnt,word,uar))
$ wsext = f$cvui(0,32,f$extract(uaf$l_wsextent,long,uar))
$
$ cpu = f$cvui(0,32,f$extract(uaf$l_cputim,long,uar))
$ enqlm = f$cvui(0,16,f$extract(uaf$w_enqlm,word,uar))
$ pgflq = f$cvui(0,32,f$extract(uaf$l_pgflquota,long,uar))
$
$ offset = uaf$q_priv
$ gosub get_priv
$ auth_priv = priv
$ auth_priv_text = priv_text
$
$ offset = uaf$q_def_priv
$ gosub get_priv
$ default_priv = priv
$ default_priv_text = priv_text
$
$ gosub get_rights
$
$ call print_uaf
$ gosub get_mail_profile
$ exit $status .or. quiet
$!_____________________________________________________________________________
$ Get_Uic_Info: !int uic,grp,mem; string uic_u,uic_i;
$!
$ uic = f$cvui(0,32,f$extract(uaf$l_uic,long,uar))
$ grp = f$cvui(0,16,f$extract(uaf$w_grp,word,uar))
$ mem = f$cvui(0,16,f$extract(uaf$w_mem,word,uar))
$!
$! Instead of using uic_u = f$fao("!%U",f$identifier(usr,"name_to_number"))
$! put uic_u into the [grp,mem] format ourself. Alternate rightlist can be used.
$!
$ uic_u = f$fao("[!UW,!UW]", -
f$integer(f$fao("!OW",grp)),f$int(f$fao("!OW",mem)))
$ tmpg = 'f$fao("!OW", grp)'
$ tmpm = 'f$fao("!OW", mem)'
$ uic_u = f$fao("[!UL,!UL]", tmpg,tmpm)
$!
$! Instead of using uic_i = f$fao("!%I",f$identifier(usr,"name_to_number"))
$! use the UIC to key off of rightslist into [group,*],[group,member],[member]
$!
$ 10$: rir :=
$ member :=
$ idkey = f$extract(uaf$l_uic,long,uar)
$ read/nolock/error=11$/index=0/key=&idkey rif rir
$ member = f$edit(f$extract(kgb$t_name,kgb$s_name,rir),"Trim")
$!
$! Get UIC Group name
$!
$ 11$: rir :=
$ group :=
$ idkey[0,8*word] = -1
$ read/nolock/error=12$/index=0/key=&idkey rif rir
$ group = f$edit(f$extract(kgb$t_name,kgb$s_name,rir),"trim")
$
$ 12$: uic_i = uic_u
$ if member .nes. "" .and. group .nes. "" then -
$ uic_i = f$fao("[!AS,!AS]", group, member)
$ if member .nes. "" .and. group .eqs. "" then -
$ uic_i = f$fao("[!AS]", member)
$ if member .eqs. "" .and. group .nes. "" .and. mem .eq. %Xffff then -
$ uic_i = f$fao("[!AS,*]", group)
$
$ return $status .or. quiet !get_uic_info: uic,grp,mem,uic_u,uic_i
$!_____________________________________________________________________________
$ Get_Flags: !int flags; string flag_text
$
$ flags = f$cvui(0,32,f$extract(uaf$l_flags,long,uar))
$ flag_text :=
$
$ f = f$extract(uaf$l_flags,long,uar)
$ t = flag_text
$ if f$cvui(uaf$v_disctly, 1, f) then t = t + " DisCtlY"
$ if f$cvui(uaf$v_defcli, 1, f) then t = t + " DefCLI"
$ if f$cvui(uaf$v_lockpwd, 1, f) then t = t + " LockPwd"
$ if f$cvui(uaf$v_restricted, 1, f) then t = t + " Restricted"
$ if f$cvui(uaf$v_disacnt, 1, f) then t = t + " DisUser"
$ if f$cvui(uaf$v_diswelcom, 1, f) then t = t + " DisWelcome"
$ if f$cvui(uaf$v_dismail, 1, f) then t = t + " DisNewMail"
$ if f$cvui(uaf$v_nomail, 1, f) then t = t + " DisMail"
$ if f$cvui(uaf$v_genpwd, 1, f) then t = t + " GenPwd"
$ if f$cvui(uaf$v_pwd_expired, 1, f) then t = t + " Pwd_Expired"
$ if f$cvui(uaf$v_pwd2_expired, 1, f) then t = t + " Pwd2_Expired"
$ if f$cvui(uaf$v_audit, 1, f) then t = t + " Audit"
$ if f$cvui(uaf$v_disreport, 1, f) then t = t + " DisReport"
$ if f$cvui(uaf$v_disreconnect, 1, f) then t = t + " DisReconnect"
$ if f$cvui(uaf$v_autologin, 1, f) then t = t + " AutoLogin"
$ if f$cvui(uaf$v_disforce_pwd_change, 1, f) then t = t + " DisForce_Pwd_Change"
$ if f$cvui(uaf$v_captive, 1, f) then t = t + " Captive"
$ if f$cvui(uaf$v_disimage, 1, f) then t = t + " DisImage"
$ if f$cvui(uaf$v_dispwddic, 1, f) then t = t + " DisPwdDic"
$ if f$cvui(uaf$v_dispwdhis, 1, f) then t = t + " DisPwdHis"
$ if f$cvui(uaf$v_defclsval, 1, f) then t = t + " defclsval"
$ if f$cvui(uaf$v_extauth, 1, f) then t = t + " ExtAuth"
$ if f$cvui(uaf$v_migratepwd, 1, f) then t = t + " MigratePwd"
$ if f$cvui(uaf$v_vmsauth, 1, f) then t = t + " VMSAuth"
$ if f$cvui(uaf$v_dispwdsynch, 1, f) then t = t + " DisPwdSynch"
$ if f$cvui(uaf$v_bit_25, 1, f) then t = t + " bit_25"
$ if f$cvui(uaf$v_bit_26, 1, f) then t = t + " bit_26"
$ if f$cvui(uaf$v_bit_27, 1, f) then t = t + " bit_27"
$ if f$cvui(uaf$v_bit_28, 1, f) then t = t + " bit_28"
$ if f$cvui(uaf$v_bit_29, 1, f) then t = t + " bit_29"
$ if f$cvui(uaf$v_bit_30, 1, f) then t = t + " bit_30"
$ if f$cvui(uaf$v_bit_31, 1, f) then t = t + " bit_31"
$ flag_text = f$extract(1,9999,t)
$ delete/symbol f
$ delete/symbol t
$ return $status .or. quiet !Get_Flags: flags,binflags,flag_text
$!_____________________________________________________________________________
$ Get_Priv: !quad-string priv
$ priv = f$extract(offset,quad,uar)
$ t :=
$ if f$cvui(prv$v_noacnt, 1, priv) then t = t + " ACNT"
$ if f$cvui(prv$v_allspool, 1, priv) then t = t + " ALLSPOOL"
$ if f$cvui(prv$v_setpri, 1, priv) then t = t + " ALTPRI"
$ if f$cvui(prv$v_audit, 1, priv) then t = t + " AUDIT"
$ if f$cvui(prv$v_bugchk, 1, priv) then t = t + " BUGCHK"
$ if f$cvui(prv$v_bypass, 1, priv) then t = t + " BYPASS"
$ if f$cvui(prv$v_cmexec, 1, priv) then t = t + " CMEXEC"
$ if f$cvui(prv$v_cmkrnl, 1, priv) then t = t + " CMKRNL"
$ if f$cvui(prv$v_impersonate, 1, priv) then t = t + " IMPERSONATE"
$ if f$cvui(prv$v_diagnose, 1, priv) then t = t + " DIAGNOSE"
$ if f$cvui(prv$v_downgrade, 1, priv) then t = t + " DOWNGRADE"
$ if f$cvui(prv$v_exquota, 1, priv) then t = t + " EXQUOTA"
$ if f$cvui(prv$v_group, 1, priv) then t = t + " GROUP"
$ if f$cvui(prv$v_grpnam, 1, priv) then t = t + " GRPNAM"
$ if f$cvui(prv$v_grpprv, 1, priv) then t = t + " GRPPRV"
$ if f$cvui(prv$v_import, 1, priv) then t = t + " IMPORT"
$ if f$cvui(prv$v_log_io, 1, priv) then t = t + " LOG_IO"
$ if f$cvui(prv$v_mount, 1, priv) then t = t + " MOUNT"
$ if f$cvui(prv$v_netmbx, 1, priv) then t = t + " NETMBX"
$ if f$cvui(prv$v_oper, 1, priv) then t = t + " OPER"
$ if f$cvui(prv$v_pfnmap, 1, priv) then t = t + " PFNMAP"
$ if f$cvui(prv$v_phy_io, 1, priv) then t = t + " PHY_IO"
$ if f$cvui(prv$v_prmceb, 1, priv) then t = t + " PRMCEB"
$ if f$cvui(prv$v_prmgbl, 1, priv) then t = t + " PRMGBL"
$ if f$cvui(prv$v_prmmbx, 1, priv) then t = t + " PRMMBX"
$ if f$cvui(prv$v_pswapm, 1, priv) then t = t + " PSWAPM"
$ if f$cvui(prv$v_readall, 1, priv) then t = t + " READALL"
$ if f$cvui(prv$v_security, 1, priv) then t = t + " SECURITY"
$ if f$cvui(prv$v_setprv, 1, priv) then t = t + " SETPRV"
$ if f$cvui(prv$v_share, 1, priv) then t = t + " SHARE"
$ if f$cvui(prv$v_shmem, 1, priv) then t = t + " SHMEM"
$ if f$cvui(prv$v_sysgbl, 1, priv) then t = t + " SYSGBL"
$ if f$cvui(prv$v_syslck, 1, priv) then t = t + " SYSLCK"
$ if f$cvui(prv$v_sysnam, 1, priv) then t = t + " SYSNAM"
$ if f$cvui(prv$v_sysprv, 1, priv) then t = t + " SYSPRV"
$ if f$cvui(prv$v_tmpmbx, 1, priv) then t = t + " TMPMBX"
$ if f$cvui(prv$v_upgrade, 1, priv) then t = t + " UPGRADE"
$ if f$cvui(prv$v_volpro, 1, priv) then t = t + " VOLPRO"
$ if f$cvui(prv$v_world, 1, priv) then t = t + " WORLD"
$ if f$cvui(prv$v_bit_39, 1, priv) then t = t + " bit_39"
$ if f$cvui(prv$v_bit_40, 1, priv) then t = t + " bit_40"
$ if f$cvui(prv$v_bit_41, 1, priv) then t = t + " bit_41"
$ if f$cvui(prv$v_bit_42, 1, priv) then t = t + " bit_42"
$ if f$cvui(prv$v_bit_43, 1, priv) then t = t + " bit_43"
$ if f$cvui(prv$v_bit_44, 1, priv) then t = t + " bit_44"
$ if f$cvui(prv$v_bit_45, 1, priv) then t = t + " bit_45"
$ if f$cvui(prv$v_bit_46, 1, priv) then t = t + " bit_46"
$ if f$cvui(prv$v_bit_47, 1, priv) then t = t + " bit_47"
$ if f$cvui(prv$v_bit_48, 1, priv) then t = t + " bit_48"
$ if f$cvui(prv$v_bit_49, 1, priv) then t = t + " bit_49"
$ if f$cvui(prv$v_bit_50, 1, priv) then t = t + " bit_50"
$ if f$cvui(prv$v_bit_51, 1, priv) then t = t + " bit_51"
$ if f$cvui(prv$v_bit_52, 1, priv) then t = t + " bit_52"
$ if f$cvui(prv$v_bit_53, 1, priv) then t = t + " bit_53"
$ if f$cvui(prv$v_bit_54, 1, priv) then t = t + " bit_54"
$ if f$cvui(prv$v_bit_55, 1, priv) then t = t + " bit_55"
$ if f$cvui(prv$v_bit_56, 1, priv) then t = t + " bit_56"
$ if f$cvui(prv$v_bit_57, 1, priv) then t = t + " bit_58"
$ if f$cvui(prv$v_bit_59, 1, priv) then t = t + " bit_50"
$ if f$cvui(prv$v_bit_60, 1, priv) then t = t + " bit_60"
$ if f$cvui(prv$v_bit_61, 1, priv) then t = t + " bit_61"
$ if f$cvui(prv$v_bit_62, 1, priv) then t = t + " bit_62"
$ if f$cvui(prv$v_bit_63, 1, priv) then t = t + " bit_63"
$ priv_text = f$extract(1,9999,t)
$ delete/symbol t
$ return $status .or. quiet !Get_Priv: priv
$!_____________________________________________________________________________
$ Get_Primedays: !string days,primary,secondary
$
$ days = f$extract(uaf$b_primedays,byte,uar)
$ primary :=
$ secondary :=
$
$ if f$cvui(uaf$v_monday, 1, days)
$ then primary = primary + " "
$ secondary = secondary + " Mon"
$ else primary = primary + " Mon"
$ secondary = secondary + " "
$ endif
$ if f$cvui(uaf$v_tuesday, 1, days)
$ then primary = primary + " "
$ secondary = secondary + " Tue"
$ else primary = primary + " Tue"
$ secondary = secondary + " "
$ endif
$ if f$cvui(uaf$v_wednesday, 1, days)
$ then primary = primary + " "
$ secondary = secondary + " Wed"
$ else primary = primary + " Wed"
$ secondary = secondary + " "
$ endif
$ if f$cvui(uaf$v_thursday, 1, days)
$ then primary = primary + " "
$ secondary = secondary + " Thu"
$ else primary = primary + " Thu"
$ secondary = secondary + " "
$ endif
$ if f$cvui(uaf$v_friday, 1, days)
$ then primary = primary + " "
$ secondary = secondary + " Fri"
$ else primary = primary + " Fri"
$ secondary = secondary + " "
$ endif
$ if f$cvui(uaf$v_saturday, 1, days)
$ then primary = primary + " "
$ secondary = secondary + " Sat"
$ else primary = primary + " Sat"
$ secondary = secondary + " "
$ endif
$ if f$cvui(uaf$v_sunday, 1, days)
$ then primary = primary + " "
$ secondary = secondary + " Sun"
$ else primary = primary + " Sun"
$ secondary = secondary + " "
$ endif
$! if f$cvui(uaf$v_bit_7, 1, days)
$! then primary = primary + " "
$! secondary = secondary + " bit_7"
$! else primary = primary + " bit_7"
$! secondary = secondary + " "
$! endif
$
$ primary = f$extract(1,999,primary)
$ secondary = f$extract(1,999,secondary)
$
$ return $status .or. quiet !Get_Primedays: days,primary,secondary
$!_____________________________________________________________________________
$ Get_Login_Times:
$
$ HIGH[0,32] = -1 ! %XFFFFFFFF
$ HIGHS = F$FAO("!7(4AS)!2AS", HIGH,HIGH,HIGH,HIGH,HIGH,HIGH,HIGH,HIGH)
$ LOW[0,32] = 0 ! %X00000000
$ LOWS = F$FAO("!7(4AS)!2AS", LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW)
$ No_Access = (f$extract(uaf$b_network_access_p,30,uar) .eqs. HIGHS)
$ Full_access= (f$extract(uaf$b_network_access_p,30,uar) .eqs. LOWS)
$
$ if full_access then return $status .or. quiet
$
$ tens := "000000000011111111112222"
$ ones := "012345678901234567890123"
$ no_access1 := "------------------------"
$ no_access2 := "----- No access ------"
$ full_access1 := "########################"
$ full_access2 := "##### Full access ######"
$
$
$ network_p := "012345678901234567890123"
$ network_s := "012345678901234567890123"
$ batch_p := "012345678901234567890123"
$ batch_s := "012345678901234567890123"
$ local_p := "012345678901234567890123"
$ local_s := "012345678901234567890123"
$ dialup_p := "012345678901234567890123"
$ dialup_s := "012345678901234567890123"
$ remote_p := "012345678901234567890123"
$ remote_s := "012345678901234567890123"
$
$ network_p_tmp = f$extract(uaf$b_network_access_p,3,uar)
$ network_s_tmp = f$extract(uaf$b_network_access_s,3,uar)
$ batch_p_tmp = f$extract(uaf$b_batch_access_p, 3,uar)
$ batch_s_tmp = f$extract(uaf$b_batch_access_s, 3,uar)
$ local_p_tmp = f$extract(uaf$b_local_access_p, 3,uar)
$ local_s_tmp = f$extract(uaf$b_local_access_s, 3,uar)
$ dialup_p_tmp = f$extract(uaf$b_dialup_access_p, 3,uar)
$ dialup_s_tmp = f$extract(uaf$b_dialup_access_s, 3,uar)
$ remote_p_tmp = f$extract(uaf$b_remote_access_p, 3,uar)
$ remote_s_tmp = f$extract(uaf$b_remote_access_s, 3,uar)
$
$ hour = -1
$ 50$: hour = hour + 1
$ if f$cvui(hour,1,network_p_tmp)
$ then network_p[hour,1] := "-"
$ else network_p[hour,1] := "#"
$ endif
$ if f$cvui(hour,1,network_s_tmp)
$ then network_s[hour,1] := "-"
$ else network_s[hour,1] := "#"
$ endif
$
$ if f$cvui(hour,1,batch_p_tmp)
$ then batch_p[hour,1] := "-"
$ else batch_p[hour,1] := "#"
$ endif
$ if f$cvui(hour,1,batch_s_tmp)
$ then batch_s[hour,1] := "-"
$ else batch_s[hour,1] := "#"
$ endif
$
$ if f$cvui(hour,1,local_p_tmp)
$ then local_p[hour,1] := "-"
$ else local_p[hour,1] := "#"
$ endif
$ if f$cvui(hour,1,local_s_tmp)
$ then local_s[hour,1] := "-"
$ else local_s[hour,1] := "#"
$ endif
$
$ if f$cvui(hour,1,dialup_p_tmp)
$ then dialup_p[hour,1] := "-"
$ else dialup_p[hour,1] := "#"
$ endif
$ if f$cvui(hour,1,dialup_s_tmp)
$ then dialup_s[hour,1] := "-"
$ else dialup_s[hour,1] := "#"
$ endif
$
$ if f$cvui(hour,1,remote_p_tmp)
$ then remote_p[hour,1] := "-"
$ else remote_p[hour,1] := "#"
$ endif
$ if f$cvui(hour,1,remote_s_tmp)
$ then remote_s[hour,1] := "-"
$ else remote_s[hour,1] := "#"
$ endif
$
$ if hour .lt. 23 then goto 50$
$
$ if network_p .eqs. no_access1 then network_p = no_access2
$ if network_p .eqs. full_access1 then network_p = full_access2
$ if network_s .eqs. no_access1 then network_s = no_access2
$ if network_s .eqs. full_access1 then network_s = full_access2
$ if batch_p .eqs. no_access1 then batch_p = no_access2
$ if batch_p .eqs. full_access1 then batch_p = full_access2
$ if batch_s .eqs. no_access1 then batch_s = no_access2
$ if batch_s .eqs. full_access1 then batch_s = full_access2
$ if local_p .eqs. no_access1 then local_p = no_access2
$ if local_p .eqs. full_access1 then local_p = full_access2
$ if local_s .eqs. no_access1 then local_s = no_access2
$ if local_s .eqs. full_access1 then local_s = full_access2
$ if dialup_p .eqs. no_access1 then dialup_p = no_access2
$ if dialup_p .eqs. full_access1 then dialup_p = full_access2
$ if dialup_s .eqs. no_access1 then dialup_s = no_access2
$ if dialup_s .eqs. full_access1 then dialup_s = full_access2
$ if remote_p .eqs. no_access1 then remote_p = no_access2
$ if remote_p .eqs. full_access1 then remote_p = full_access2
$ if remote_s .eqs. no_access1 then remote_s = no_access2
$ if remote_s .eqs. full_access1 then remote_s = full_access2
$
$ return $status .or. quiet !Get_Login_Times:
$!_____________________________________________________________________________
$ Get_Rights:
$ IdCnt = 0
$ Read/nolock/error=NoIdHeld/index=1/key=&Holder rif rir
$
$ GetMoreIds:
$ IdKey :=
$ Hold = f$extract(kgb$q_holder,quad,rir)
$ If Hold .nes. Holder then goto NoMoreIds
$
$ IdKey = f$extract(kgb$l_identifier,long,rir)
$ IdStr = f$fao("%X!XL", f$cvui(0,32,IdKey))
$ IdCnt = IdCnt + 1
$ Id'IdCnt'= f$fao("!35* !10AS!5* ", IdStr)
$
$ Read/nolock/error=NoMoreIds/end=NoMoreIds rif rir
$ Goto GetMoreIds
$
$ NoMoreIds:
$ If IdCnt .eq. 0 then goto NoIdHeld
$ Cnt = 0
$
$ GetMoreNames:
$ Cnt = Cnt + 1
$ IdKey :=
$ If Cnt .gt. IdCnt then goto NoMoreNames
$ IdStr = f$extract(35,10,Id'Cnt')
$ IdKey[0,32] = 'IdStr'
$
$ Read/nolock/error=NoMoreNames/index=0/key=&idkey rif rir
$ If f$extract(kgb$l_identifier,long,rir) .nes. IdKey then goto NoMoreNames
$ Name = f$extract(Kgb$t_name,32,rir)
$ Attrib = f$extract(Kgb$l_attributes,4,rir)
$ Str :=
$
$ If f$cvui(kgb$v_resource, 1,Attrib) then Str=Str+" RESOURCE"
$ If f$cvui(kgb$v_dynamic, 1,Attrib) then Str=Str+" DYNAMIC"
$ If f$cvui(kgb$v_noaccess, 1,Attrib) then Str=Str+" NOACCESS"
$ If f$cvui(kgb$v_subsystem, 1,Attrib) then Str=Str+" SUBSYSTEM"
$ If f$cvui(kgb$v_impersonate, 1,Attrib) then Str=Str+" IMPERSONATE"
$ If f$cvui(kgb$v_holder_hidden,1,Attrib) then Str=Str+" HOLDER_HIDDEN"
$ If f$cvui(kgb$v_name_hidden, 1,Attrib) then Str=Str+" NAME_HIDDEN"
$ If f$cvui(7, 1,Attrib) then Str=Str+" Bit_7"
$
$ Id'Cnt' = f$fao(" !32AS !10AS!5* !AS", Name,IdStr,Str)
$ Goto GetMoreNames
$
$ NoMoreNames:
$ NoIdHeld:
$ Return
$!_____________________________________________________________________________
$ Get_Mail_Profile:
$ Key[0,31] := 'Usr'
$
$ Mai0 :=
$ MaiCount:=
$ MaiFlags:=
$ MaiStr :=
$ MaiDir :=
$ MaiForw :=
$ MaiPers :=
$ MaiPlus :=
$ MaiTran :=
$ MaiEdit :=
$ MaiQue :=
$ Mai10 :=
$ Mai11 :=
$ Mai12 :=
$ MaiForm :=
$ MaiSign :=
$ Mai15 :=
$
$ Read/nolock/error=NoProfile/End=MailDone/key=&Key mif mir
$ MaiUsr = f$extract(0,31,mir)
$ If Key .nes. MaiUsr then goto NoProfile
$
$ Pos = 31
$ 10$: If Pos .gt. f$length(Mir)-4 then goto MailDone
$ Mir = f$extract(Pos,999,mir)
$ MaiCode = f$cvsi( 0,16,Mir)
$ MaiLen = f$cvsi(16,16,Mir)
$ MaiItem = f$extract(4,MaiLen,Mir)
$ If MaiCode .eq. 0 then Mai0 = MaiItem
$ If MaiCode .eq. 1 then MaiCount = f$str(f$cvui(0,MaiLen*8,MaiItem))
$ If MaiCode .eq. 2 then MaiFlags = MaiItem
$ If MaiCode .eq. 3 Then MaiDir = MaiItem
$ If MaiCode .eq. 4 then MaiForw = MaiItem
$ If MaiCode .eq. 5 then MaiPers = MaiItem
$ If MaiCode .eq. 6 then MaiPlus = MaiItem
$ If MaiCode .eq. 7 then MaiTran = MaiItem
$ If MaiCode .eq. 8 then MaiEdit = MaiItem
$ If MaiCode .eq. 9 then MaiQue = MaiItem
$ If MaiCode .eq. 10 then Mai10 = MaiItem
$ If MaiCode .eq. 11 then Mai11 = MaiItem
$ If MaiCode .eq. 12 then Mai12 = MaiItem
$ If MaiCode .eq. 13 then MaiForm = MaiItem
$ If MaiCode .eq. 14 then MaiSign = MaiItem
$ If MaiCode .eq. 15 then Mai15 = MaiItem
$ Pos = 4 + MaiLen
$ Goto 10$
$ NoProfile:
$ MailDone:
$ If MaiFlags .nes. ""
$ then
$ If f$cvui(0,1,MaiFlags)
$ then MaiStr = f$fao("!AS,CC_Self", MaiStr)
$ else MaiStr = f$fao("!AS,NoCC_Self", MaiStr)
$ endif
$ If f$cvui(1,1,MaiFlags)
$ then MaiStr = f$fao("!AS,CC_Reply", MaiStr)
$ else MaiStr = f$fao("!AS,NoCC_Reply", MaiStr)
$ endif
$ If f$cvui(2,1,MaiFlags)
$ then MaiStr = f$fao("!AS,NoAutoPurge", MaiStr)
$ else MaiStr = f$fao("!AS,AutoPurge", MaiStr)
$ endif
$ If f$cvui(3,1,MaiFlags)
$ then MaiStr = f$fao("!AS,CC_Forward", MaiStr)
$ else MaiStr = f$fao("!AS,NoCC_Forward", MaiStr)
$ endif
$ If f$cvui(4,1,MaiFlags)
$ then MaiStr = f$fao("!AS,CC_Prompt", MaiStr)
$ else MaiStr = f$fao("!AS,NoCC_Prompt", MaiStr)
$ endif
$ If f$cvui(5,1,MaiFlags)
$ then MaiStr = f$fao("!AS,05", MaiStr)
$ else MaiStr = f$fao("!AS,No05", MaiStr)
$ endif
$ If f$cvui(6,1,MaiFlags)
$ then MaiStr = f$fao("!AS,06", MaiStr)
$ else MaiStr = f$fao("!AS,No06", MaiStr)
$ endif
$ If f$cvui(7,1,MaiFlags)
$ then MaiStr = f$fao("!AS,07", MaiStr)
$ else MaiStr = f$fao("!AS,No07", MaiStr)
$ endif
$ endif
$ MaiStr = f$fao("!AS !AS !AS !AS !AS !AS !AS !AS !AS", -
Mai0,MaiCount,MaiStr,MaiDir,MaiForw,MaiPers,MaiPlus,MaiTran,MaiEdit)
$ MaiStr = f$fao("!AS !AS !AS !AS !AS !AS !AS !AS", -
MaiStr,MaiQue,Mai10,Mai11,Mai12,MaiForm,MaiSign,Mai15)
$ Write Sys$output ""
$ Write Sys$output "VMSMail_Profile data:"
$ Show sym MaiStr
$ return
$!_____________________________________________________________________________
$ Endsubroutine
$!_____________________________________________________________________________
$ Filename_Setup:
$ system_dir := sys$system:.dat;
$ c = ",,,"
$ uafin = f$parse(f$element(0,",",P2+c),"sysuaf",system_dir)
$ rightin = f$parse(f$element(1,",",P2+c),"rightslist",system_dir)
$ mailin = f$parse(f$element(2,",",P2+c),"vmsmail_profile",system_dir)
$ return
$!_____________________________________________________________________________
$ Open_Files:
$ subroutine
$ on control_y then interrupt\'pgm'_Open_Files
$ on warning then goto close
$!
$ say ""
$ say f$fao("Opening in !AS",uafin)
$ open/read/share uif &uafin
$ say f$fao("Opening in !AS",rightin)
$ open/read/share rif &rightin
$ say f$fao("Opening in !AS",mailin)
$ open/read/share mif &mailin
$ exit $status
$!
$ close:status = $status .or. quiet
$ exit status
$ endsubroutine
$!_____________________________________________________________________________
$ close_Files:
$ subroutine
$!
$ ON WARNING then continue
$ say ""
$ say f$fao("Closing !AS",uafin)
$ close uif
$ say f$fao("Closing !AS",rightin)
$ close rif
$ say f$fao("Closing !AS",mailin)
$ close mif
$ endsubroutine
$!_____________________________________________________________________________
$ Offset_setup:
$!
$! Definitions from VMS 4.1 - SYS$LIBRARY:LIB.MLB($UAFDEF)
$!
$! Format
$! Facility: UAF SYSUAF.DAT
$! Data type: S - String or Length for non-string
$! T - Beginning Offset for string
$! B - Byte (1)
$! W - Word (2)
$! L - Long (4)
$! Q - Quad (8)
$! V - Bit (1/8)
$! M - BitMask
$! R - What is this?
$!
$ QUAD = 8
$ LONG = 4
$ WORD = 2
$ BYTE = 1
$!
$ UAF$B_RTYPE = 0
$ UAF$B_VERSION = 1
$ UAF$W_USRDATOFF = 2
$ UAF$S_USERNAME = 32 !Length
$ UAF$T_USERNAME = 4 !Offset
$ UAF$L_UIC = 36
$ UAF$W_MEM = 36
$ UAF$W_GRP = 38
$ UAF$L_SUB_ID = 40
$ UAF$Q_PARENT_ID = 44
$ UAF$S_ACCOUNT = 32
$ UAF$T_ACCOUNT = 52
$ UAF$S_OWNER = 32 - 1 !These point to Ascic
$ UAF$T_OWNER = 84 + 1 !counted strings
$ UAF$S_DEFDEV = 32 - 1 !The strings end with
$ UAF$T_DEFDEV = 116 + 1 !trailing blanks
$ UAF$S_DEFDIR = 64 - 1 !so it is easier just
$ UAF$T_DEFDIR = 148 + 1 !to trim the string and
$ UAF$S_LGICMD = 64 - 1 !ignore the 1 byte count
$ UAF$T_LGICMD = 212 + 1
$ UAF$S_DEFCLI = 32 - 1
$ UAF$T_DEFCLI = 276 + 1
$ UAF$S_CLITABLES = 32 - 1
$ UAF$T_CLITABLES = 308 + 1
$ UAF$S_PWD = 8 !Not needed; Q = 8
$ UAF$Q_PWD = 340
$ UAF$L_PWD = 340
$ UAF$S_PWD2 = 8
$ UAF$Q_PWD2 = 348
$ UAF$W_LOGFAILS = 356
$ UAF$W_SALT = 358
$ UAF$B_ENCRYPT = 360
$ UAF$B_ENCRYPT2 = 361
$ UAF$B_PWD_LENGTH = 362
$! UAF$B_filler = 363
$ UAF$S_EXPIRATION = 8
$ UAF$Q_EXPIRATION = 364
$ UAF$S_PWD_LIFETIME = 8
$ UAF$Q_PWD_LIFETIME = 372
$ UAF$S_PWD_DATE = 8
$ UAF$Q_PWD_DATE = 380
$ UAF$S_PWD2_DATE = 8
$ UAF$Q_PWD2_DATE = 388
$ UAF$S_LASTLOGIN_I = 8
$ UAF$Q_LASTLOGIN_I = 396
$ UAF$S_LASTLOGIN_N = 8
$ UAF$Q_LASTLOGIN_N = 404
$ UAF$S_PRIV = 8
$ UAF$Q_PRIV = 412
$ UAF$S_DEF_PRIV = 8
$ UAF$Q_DEF_PRIV = 420
$ UAF$S_MIN_CLASS = 20
$ UAF$R_MIN_CLASS = 428
$ UAF$S_MAX_CLASS = 20
$ UAF$R_MAX_CLASS = 448
$ UAF$L_FLAGS = 468
$ UAF$V_DISCTLY = 0
$ UAF$V_DEFCLI = 1
$ UAF$V_LOCKPWD = 2
$ UAF$V_RESTRICTED = 3
$ UAF$V_DISACNT = 4 !/Flags=DisUser
$ UAF$V_DISWELCOM = 5
$ UAF$V_DISMAIL = 6 !/Flags=DisNewMail
$ UAF$V_NOMAIL = 7 !/Flags=DisMail
$ UAF$V_GENPWD = 8
$ UAF$V_PWD_EXPIRED = 9
$ UAF$V_PWD2_EXPIRED = 10
$ UAF$V_AUDIT = 11
$ UAF$V_DISREPORT = 12
$ UAF$V_DISRECONNECT = 13
$ UAF$V_AUTOLOGIN = 14
$ UAF$V_DISFORCE_PWD_CHANGE=15
$ UAF$V_CAPTIVE = 16
$ UAF$V_DISIMAGE = 17
$ UAF$V_DISPWDDIC = 18
$ UAF$V_DISPWDHIS = 19
$ UAF$V_DEFCLSVAL = 20 !/Flags="what is this"
$ UAF$V_EXTAUTH = 21
$ UAF$V_MIGRATEPWD = 22
$ UAF$V_VMSAUTH = 23
$ UAF$V_DISPWDSYNCH = 24
$! added the bit fillers
$ UAF$V_bit_25 = 25
$ UAF$V_bit_26 = 26
$ UAF$V_bit_27 = 27
$ UAF$V_bit_28 = 28
$ UAF$V_bit_29 = 29
$ UAF$V_bit_30 = 30
$ UAF$V_bit_31 = 31
$ UAF$S_NETWORK_ACCESS_P = 3 !/network=(primary,x-y,second,x-y)
$ UAF$B_NETWORK_ACCESS_P = 472
$ UAF$S_NETWORK_ACCESS_S = 3
$ UAF$B_NETWORK_ACCESS_S = 475
$ UAF$S_BATCH_ACCESS_P = 3
$ UAF$B_BATCH_ACCESS_P = 478
$ UAF$S_BATCH_ACCESS_S = 3
$ UAF$B_BATCH_ACCESS_S = 481
$ UAF$S_LOCAL_ACCESS_P = 3
$ UAF$B_LOCAL_ACCESS_P = 484
$ UAF$S_LOCAL_ACCESS_S = 3
$ UAF$B_LOCAL_ACCESS_S = 487
$ UAF$S_DIALUP_ACCESS_P = 3
$ UAF$B_DIALUP_ACCESS_P = 490
$ UAF$S_DIALUP_ACCESS_S = 3
$ UAF$B_DIALUP_ACCESS_S = 493
$ UAF$S_REMOTE_ACCESS_P = 3
$ UAF$B_REMOTE_ACCESS_P = 496
$ UAF$S_REMOTE_ACCESS_S = 3
$ UAF$B_REMOTE_ACCESS_S = 499
$! UAF$S_filler = 12
$! UAF$T_filler = 502
$ UAF$B_PRIMEDAYS = 514
$ UAF$V_MONDAY = 0
$ UAF$V_TUESDAY = 1
$ UAF$V_WEDNESDAY = 2
$ UAF$V_THURSDAY = 3
$ UAF$V_FRIDAY = 4
$ UAF$V_SATURDAY = 5
$ UAF$V_SUNDAY = 6
$ UAF$V_bit_7 = 7
$! UAF$B_filler = 515
$ UAF$B_PRI = 516
$ UAF$B_QUEPRI = 517
$ UAF$W_MAXJOBS = 518
$ UAF$W_MAXACCTJOBS = 520
$ UAF$W_MAXDETACH = 522
$ UAF$W_PRCCNT = 524
$ UAF$W_BIOLM = 526
$ UAF$W_DIOLM = 528
$ UAF$W_TQCNT = 530
$ UAF$W_ASTLM = 532
$ UAF$W_ENQLM = 534
$ UAF$W_FILLM = 536
$ UAF$W_SHRFILLM = 538
$ UAF$L_WSQUOTA = 540
$ UAF$L_DFWSCNT = 544
$ UAF$L_WSEXTENT = 548
$ UAF$L_PGFLQUOTA = 552
$ UAF$L_CPUTIM = 556
$ UAF$L_BYTLM = 560
$ UAF$L_PBYTLM = 564
$ UAF$L_JTQUOTA = 568
$ UAF$W_PROXY_LIM = 572
$ UAF$W_PROXIES = 574
$ UAF$W_ACCOUNT_LIM = 576
$ UAF$W_ACCOUNTS = 578
$ UAF$S_DEF_CLASS = 20
$ UAF$R_DEF_CLASS = 580
$!
$!
$! Definitions from VMS 7.2 - SYS$LIBRARY:STARLET.MLB($PRVDEF)
$!
$! Format
$! Facility: PRV SYSUAF.DAT
$! Data type: S - String or Length for non-string
$! T - Beginning Offset for string
$! B - Byte (1)
$! W - Word (2)
$! L - Long (4)
$! Q - Quad (8)
$! V - Bit (1/8)
$! M - BitMask
$! R - What is this?
$!
$ PRV$V_CMKRNL = 0
$ PRV$V_CMEXEC = 1
$ PRV$V_SYSNAM = 2
$ PRV$V_GRPNAM = 3
$ PRV$V_ALLSPOOL = 4
$ PRV$V_IMPERSONATE = 5
$ PRV$V_DIAGNOSE = 6
$ PRV$V_LOG_IO = 7
$ PRV$V_GROUP = 8
$ PRV$V_NOACNT = 9
$ PRV$V_PRMCEB = 10
$ PRV$V_PRMMBX = 11
$ PRV$V_PSWAPM = 12
$ PRV$V_SETPRI = 13
$ PRV$V_SETPRV = 14
$ PRV$V_TMPMBX = 15
$ PRV$V_WORLD = 16
$ PRV$V_MOUNT = 17
$ PRV$V_OPER = 18
$ PRV$V_EXQUOTA = 19
$ PRV$V_NETMBX = 20
$ PRV$V_VOLPRO = 21
$ PRV$V_PHY_IO = 22
$ PRV$V_BUGCHK = 23
$ PRV$V_PRMGBL = 24
$ PRV$V_SYSGBL = 25
$ PRV$V_PFNMAP = 26
$ PRV$V_SHMEM = 27
$ PRV$V_SYSPRV = 28
$ PRV$V_BYPASS = 29
$ PRV$V_SYSLCK = 30
$ PRV$V_SHARE = 31
$ PRV$V_UPGRADE = 32
$ PRV$V_DOWNGRADE = 33
$ PRV$V_GRPPRV = 34
$ PRV$V_READALL = 35
$ PRV$V_IMPORT = 36
$ PRV$V_AUDIT = 37
$ PRV$V_SECURITY = 38
$ prv$v_bit_39 = 39
$ prv$v_bit_40 = 40
$ prv$v_bit_41 = 41
$ prv$v_bit_42 = 42
$ prv$v_bit_43 = 43
$ prv$v_bit_44 = 44
$ prv$v_bit_45 = 45
$ prv$v_bit_46 = 46
$ prv$v_bit_47 = 47
$ prv$v_bit_48 = 48
$ prv$v_bit_49 = 49
$ prv$v_bit_50 = 50
$ prv$v_bit_51 = 51
$ prv$v_bit_52 = 52
$ prv$v_bit_53 = 53
$ prv$v_bit_54 = 54
$ prv$v_bit_55 = 55
$ prv$v_bit_56 = 56
$ prv$v_bit_57 = 57
$ prv$v_bit_58 = 58
$ prv$v_bit_59 = 59
$ prv$v_bit_60 = 60
$ prv$v_bit_61 = 61
$ prv$v_bit_62 = 62
$ prv$v_bit_63 = 63
$
$! Definitions from VMS 7.2 - SYS$LIBRARY:STARLET.MLB($KGBDEF)
$!
$! Format
$! Facility: KGB RIGHTSLIST.DAT
$!
$! RIGHTSLIST.DAT has two formats.
$! The ident record is 48 bytes (holder field is zero)
$! The holder record is 16 bytes (name field is truncated and zero)
$! 31 0 31 0
$! +-------------+------------+ +-------------+------------+
$! + Identifier + + Identifier +
$! +-------------+------------+ +-------------+------------+
$! + Attributes + + Attributes +
$! +-------------+------------+ +-------------+------------+
$! + Holder = 0 + + Holder +
$! +-------------+------------+ +-------------+------------+
$! + Name + + Name = 0 +
$! + + +-------------+------------+
$! + +
$! + +
$! + +
$! +-------------+------------+
$!
$ KGB$K_HOLD_RECORD = 16 !Length of holder record
$ KGB$K_IDENT_RECORD = 48 !Length of identifier record
$ KGB$K_MAINT_RECORD = 64 !Length of maintenance record
$ KGB$L_IDENTIFIER = 0 !Offset of identifier (both records)
$ KGB$L_ATTRIBUTES = 4 !Offset of Attributes (both records)
$ KGB$V_RESOURCE = 0 !Bit 0
$ KGB$V_DYNAMIC = 1
$ KGB$V_NOACCESS = 2
$ KGB$V_SUBSYSTEM = 3
$ KGB$V_IMPERSONATE = 4
$ KGB$V_HOLDER_HIDDEN = 5
$ KGB$V_NAME_HIDDEN = 6
$! KGB$V_filler = 7
$ KGB$M_RESOURCE = 1
$ KGB$M_DYNAMIC = 2
$ KGB$M_NOACCESS = 4
$ KGB$M_SUBSYSTEM = 8
$ KGB$M_IMPERSONATE = 16
$ KGB$M_HOLDER_HIDDEN = 32
$ KGB$M_NAME_HIDDEN = 64
$ KGB$Q_HOLDER = 8 !uic identifier
$ KGB$S_NAME = 32
$ KGB$T_NAME = 16
$ KGB$W_LEVEL = 48
$! KGB$W_filler = 50
$ KGB$Q_SYS_ID = 52
$ KGB$L_NEXT_ID = 60
$!
$! VMSMAIL_PROFILE
$!
$ return
|
|