ACL_SCRUB.BCK ACL_SCRUB.BCK;BACK *.* [DECUS]ACL_SCRUB.BCK/BLOCK=8192/NOCRC/GROUP:0/SAVE AWPSYS ӒV5.1 _VAXC::  _$1$DUS51: V5.0 &*[DPMSYS.ACL_FIND.BUILD]AAAREADME.TXT;2+, ./ 4K-:0123KPWO56nӒ7୲Ӓ89GHJ  ACL_SCRUB/ - Finds and removes ACEs not "attached" to an2 identifier. (i.e a deleted user). It will not9 affect any valid aces on the same file.= - Finds and reports only any files belonging to a UIC thatB does not have an identifier assocated with them.% - List ACEs on all files with ACLs.; Disclaimer: Although we make frequent use of this program; to maintain our disks with no problems, This programD does modify the file header of of any file withF dangling ACEs. All file header modifications areF done using standard, documented and supported VMSH system services. Rochester Institute of TechnologuH cannot be held responsible for any loss related to I the use of this program. Users should always take J a full disk backup of the disk before performing any I substantual file system maintenance on it including 1 the running of this program. ? Installation note: This program uses a CLD file. You should) edit the "image" line in this file, to reflect where you place the image.KThis program is based heavily on a previous DECUS submission by Joe MeadowsEcalled INDEX. The INDEX program provided me with fast scan for file attributes.GIn our academic environment we deal with a large turnover of authorizedFaccounts on the order of 3000 users every three months. This can leadJto files owned by 'stray' UICs and file ACL's granted to identifiers whichFno longer exist. When the UIC's are reused for new accounts the ACL'sDthen provide access to accounts other than those for which they wereFintended, and files suddenly show up on the disk quota for accounts towhich they don't belong.GACL_SCRUB uses the INDEX program to locate files with these attributes.HIt will notify you of files belonging to UIC's which do not translate toHvalid rights identifiers. It will list all files with ACLS and it willGremove ACL's whose identifiers do not translate in the RIGHTS database.<Please report any bugs to: Dave Mulvihill - Sys. Programmer( Rochester Institute of Technology 1 Lomb Memorial Dr. Rochester, NY 14623 dpmsys@ultb.isc.rit.edu dpmsys@ritvax.bitnet!*[DPMSYS.ACL_FIND.BUILD]ACEDEF.H;2+,=. / 4I -:0123KPWO 56`ҟ7@GӒ89GHJF/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */#define ACE$C_KEYID 1#define ACE$C_RMSJNL_BI 2#define ACE$C_RMSJNL_AI 3#define ACE$C_RMSJNL_AT 4#define ACE$C_AUDIT 5#define ACE$C_ALARM 6#define ACE$C_INFO 7!#define ACE$C_RMSJNL_RU_DEFAULT 8#define ACE$C_DIRDEF 9#define ACE$C_RMSJNL_RU 10#define ACE$C_RESERVED 255#define ACE$C_CUST 1#define ACE$C_CSS 2#define ACE$C_VMS 3#define ACE$M_SUCCESS 1#define ACE$M_FAILURE 2#define ACE$M_DEFAULT 256#define ACE$M_PROTECTED 512#define ACE$M_HIDDEN 1024$#define ACE$M_NOPROPAGATE 2048#define ACE$M_READ 1#define ACE$M_WRITE 2#define ACE$M_EXECUTE 4#define ACE$M_DELETE 8#define ACE$M_CONTROL 16#define ACE$K_LENGTH 8#define ACE$C_LENGTH 8"#define ACE$S_RMSJNL_RU_DEFAULT 17!#define ACE$M_JOURNAL_DISABLED 1!#define ACE$M_BACKUP_DONE 2#define ACE$S_RMSJNL_RU 38#define ACE$S_RMSJNL 50#define ACE$S_ACEDEF 50#define ACE$S_INFO_TYPE 4#define ACE$S_RESERVED 4#define ACE$S_AUDITNAME 16#define ACE$S_VOLNAM 12#define ACE$S_FID 6#define ACE$S_CDATE 8!#define ACE$S_MODIFICATION_TIME 8,#define DATE {unsigned : 32; unsigned : 32;}struct acedef { unsigned char ace$b_size; unsigned char ace$b_type; variant_union {' unsigned short int ace$w_flags; variant_struct { unsigned : 8;& unsigned ace$v_default : 1;( unsigned ace$v_protected : 1;% unsigned ace$v_hidden : 1;* unsigned ace$v_nopropagate : 1;C } ace$dummy_common_flags; /* common to all ace's */ variant_struct {' unsigned ace$v_success : 1;& unsigned ace$v_failure : 1;C } ace$dummy_alarm_flags; /* for alarm ace */I unsigned ace$v_info_type : 4; /* for application ace */H unsigned ace$v_reserved : 4; /* for identifier ace */ } ace$dummy_flags_union;5 variant_union { /* alarm and identifier ace */ variant_struct { variant_union {/ unsigned long int ace$l_access; variant_struct {, unsigned ace$v_read : 1;- unsigned ace$v_write : 1;/ unsigned ace$v_execute : 1;. unsigned ace$v_delete : 1;/ unsigned ace$v_control : 1;( } ace$dummy_access_bits;% } ace$dummy_access_union; variant_union {, unsigned long int ace$l_key;6 char ace$t_auditname[ACE$S_AUDITNAME];' } ace$dummy_alarm_id_union;! } ace$dummy_alarm_id_ace;> variant_struct { /* application ace *// unsigned long int ace$l_info_flags;" char ace$t_info_start;$ } ace$dummy_application_ace;E variant_struct { /* default protection ace */+ unsigned long int ace$l_spare1;- unsigned long int ace$l_sys_prot;- unsigned long int ace$l_own_prot;- unsigned long int ace$l_grp_prot;- unsigned long int ace$l_wor_prot;$ } ace$dummy_protectionc_ace; variant_struct {, char ace$t_volnam[ACE$S_VOLNAM];+ unsigned char ace$b_volnam_len;' unsigned char ace$b_rjrver; variant_union {; unsigned char ace$r_fid_overlay[ACE$S_FID];: unsigned short int ace$w_fid[ACE$S_FID/2]; variant_struct {5 unsigned short int ace$w_fid_num;5 unsigned short int ace$w_fid_seq;# variant_union {? unsigned char ace$r_fid_rvn_overlay[  ACL_SCRUB.BCK=:![DPMSYS.ACL_FIND.BUILD]ACEDEF.H;2I  2];9 unsigned short int ace$w_fid_rvn;( variant_struct {8 unsigned char ace$b_fid_rvn;8 unsigned char ace$b_fid_nmx;/ } ace$r_fid_rvn_fields;/ } ace$dummy_fid_rvn_fields;# } ace$r_fid_fields;# } ace$dummy_fid_fields; variant_union {6 unsigned short int ace$w_rmsjnl_flags; variant_struct {8 unsigned ace$v_journal_disabled : 1;3 unsigned ace$v_backup_done : 1;. } ace$dummy_rmsjnl_flags_bits;+ } ace$dummy_rmsjnl_flags_union;+ unsigned long int ace$l_jnlidx;$ struct DATE ace$q_cdate;1 unsigned long int ace$l_backup_seqno;0 struct DATE ace$q_modification_time;% } ace$dummy_undocumented_ace; } ace$dummy_ace_fields;};$*[DPMSYS.ACL_FIND.BUILD]ACL_SCRUB.C;3+,J<5. / 4~ -:0123KPWO 56@79Ӓ89GHJG/* INDEX, written by Joe Meadows, released to the world Sep. 8th, 1987.@ This is a public domain utility. No parts of this utility are@ copyrighted in any way. It may be used in any way, by anyone.= There are no restrictions on this code. You may include it' in a commercial package if you wish. Joe Meadows Jr.+ VAX/VMS System Manager / guru in training( Fred Hutchinson Cancer Research Center 1124 Columbia St. Seattle Wa. 98104 bitnet - JOE@FHCRCVAX1 arpa - JOE%FHCRCVAX.BITNET@WISCVM.WISC.EDU voice - (206) 467-4970*//* Modification History --------------------8 Sep. 8, 1987 JEM - Conversion from BETA to Release */#include stdio#include "hm2def.h"#include "fh2def.h"#include "fm2def.h"#include "fi2def.h"7#include "FileInfo.h" /* includes FAB, NAM, and XAB */-#include "searchdef.h" /* includes DESCRIP */#include "displaydef.h"main(){O static struct dsc$descriptor device = {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0};P static struct dsc$descriptor devdesc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};' static $DESCRIPTOR(defaultname,"");" static $DESCRIPTOR(null,"\0");- static short int indexf_fid[3] = {1,1,0};& static short int fid[3] = {0,0,0};Q static struct dsc$descriptor filename = {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0};O static struct dsc$descriptor dynstr = {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0};- static long int pagecount=0,opagecount=0; static long int offset=1; static long int flag=0;- static long lastfid=0,currfid=0,endfid=0;$ static struct FileInfo *context; static struct FAB *fabptr; static struct NAM *namptr;' static struct display_info display;% static struct search_info search; static struct hm2def *hm2; static struct fh2def *fh2; static struct fm2def *fm2; static long int fm2offset; static long int count,lbn; static struct fi2def *fi2; static long int status=1; static char *block=0; static long int blocknum;& static short int chan=0,tmpchan=0;) static long int i=0,j=0,k=0,volume=0;$ if (cli_present("OUTPUT") & 1) {1 status = cli_get_value("OUTPUT",&dynstr); if (status & 1) {& str$append(&dynstr,&null);H freopen(dynstr.dsc$a_pointer,"w",stdout,"rfm=var","rat=cr"); }; };' status=cli_get_value("P1",&device);& if (!(status & 1)) return(status);$ if (cli_present("VOLUME") & 1) {C /* Oh boy, we need to loop through all of the index files! */ volume = 1;. status = get_root_name(&device,&device);( if (!(status & 1)) return(status); };Z while (status & 1) { /* to get_next_device at the end of the while loop */$ /* (only if /VOLUME set) */h status=sys$assign(&device,&chan,0,0); /* assign a channel to the device */* if (!(status & 1)) return(status);n status = fid_to_name(&chan,indexf_fid,&filename); /* get complete name of INDEXF.SYS */~ if (!(status & 1)) return(status); /* (this is to be sure and get the device name right*/z /* even if you're sitting in a rooted directory */z pagecount = freptecnt() - 1000; /* don't ask for more pages than we can handle, */s /* in fact, lets leave a mild safety net */ offset = 1;i status=map_section(&filename,&defaultname,&pagecount, /* map in part of the file now */3 &offset,&flag,&context);* if (!(status & 1)) return(status);r hm2 = (struct hm2def *)(context->fi_l_begadr+512); /* home block is usually block number 2 */' if (hm2->hm2$b_struclev != 2) {M printf("Sorry, INDEX only works for structure level 2 disks.\n"); return; };< offset = hm2->hm2$w_ibmapvbn + hm2->hm2$w_ibmapsize;j context->fi_l_recoff = offset - 1; /* Store the indexf offset here */ opagecount = pagecount;" pagecount -= (offset - 1); endfid = pagecount;4 lastfid = context->fi_l_filsiz - offset + 1;4 fh2 = context->fi_l_begadr + 512*(offset-1);} for (currfid=1;currfid<=lastfid;currfid++) { /* okay, that should be last one in this segment.. */w if (currfid>endfid) { /* lets read in the next section of the file */, offset = offset + pagecount;' pagecount = opagecount;: status=map_section(&filename,&defaultname,F &pagecount,&offset,&flag,&context);2 if (!(status & 1)) return(status);, endfid = endfid + pagecount;+ fh2 = context->fi_l_begadr; };? (void)display_header(&display,currfid,fh2,context,0,chan);q ++fh2; /* okay, point to the next file header */ };u status=delete_section(&context); /* call it a day, clean up and go home.... */* if (!(status & 1)) return(status); if (volume) {6 status = get_next_device(&device,&device); } else { status = 0; } }; /* while (status & 1) */}&*[DPMSYS.ACL_FIND.BUILD]ACL_SCRUB.CLD;2+,@3./ 40:-:0123KPWO56 H7G2Ӓ89GHJ  ACL_SCRUB.BCK@3:&[DPMSYS.ACL_FIND.BUILD]ACL_SCRUB.CLD;20Didefine verb ACL_SCRUB! image sys$disk:[]acl_scrub.exe parameter P1 default- value (default="SYS$DISK",type=$infile) qualifier OUTPUT0 value (default="INDEXF.LIS",type=$outfile) qualifier ACL qualifier ACE% value (required,list,type=$uic) qualifier VOLUME&*[DPMSYS.ACL_FIND.BUILD]ACL_SCRUB.EXE;2+,K?./ 4-:0123 KPWO56@-SӒ7 SӒ89GHJ0DX0205(+QS0h ACL_SCRUBV1.0+QӒ05-02    ? ! VAXCRTL_001B!d FORRTL_001! LIBRTL_001! MTHRTL_001!f SMGSHR_001"! SECURESHR_001OUTPUTOUTPUTwrfm=varrat=crP1VOLUMESorry, INDEX only works for structure level 2 disks. TypeUndefinedFixedVariableVFCStreamLFStreamCRStreamOrganizationSequentialRelativeIndexedDirectAttributesFortranCCImpliedCCPrintCCSpanCharacteristicsACL_CorruptBackupBest_Try_ContiguousChargeContiguousDirectoryErase_On_DeleteFile_CorruptLockedMarked_For_DeleteSpoolRead_VerifyWrite_BackWrite_VerifyJournalJournalAIJnlATJnlBIJnlRUJnlNever_RUOnly_RUAccess_ModeUSERSUPERVISOREXECUTIVEKERNELPlacementExactOn_CylinderRelative_Volume_NumberLBN_SpecifiedProtectionProtection.setProtection.clearSYSTEMOWNERGROUPWORLDRWEDWEDREDEDRWDWDRDDRWEWEREERWWRCreation_DateRevision_DateExpiration_DateBackup_DateNumber_Of_RevisionsVFC_SizeRecord_SizeMaximum_Record_SizeUsedFirst_Free_ByteAllocatedDefault_Extend_QuantityBucket_SizeGlobal_Buffer_CountVersion_LimitExtentsHeadersLBNOwner_UICFile_IDDirectory_File_IDHighwater_MarkActive_Recovery_UnitsWasted_BlocksNameFullnameDisplayACLACEInvalid Identifer/UIC %.*s TypeUndefinedFixedVariableVFCStreamLFStreamCRStreamOrganizationSequentialRelativeIndexedDirectAttributesFortranCCImpliedCCPrintCCSpanCharacteristicsACL_CorruptBackupBest_Try_ContiguousChargeContiguousDirectoryErase_On_DeleteFile_CorruptLockedMarked_For_DeleteSpoolRead_VerifyWrite_BackWrite_VerifyJournalJournalAIJnlATJnlBIJnlRUJnlNever_RUOnly_RUAccess_ModeUSERSUPERVISOREXECUTIVEKERNELPlacementExactOn_CylinderRelative_Volume_NumberLBN_SpecifiedProtectionProtection.setProtection.clearSYSTEMOWNERGROUPWORLDRWEDWEDREDEDRWDWDRDDRWEWEREERWWRCreation_DateRevision_DateExpiration_DateBackup_DateNumber_Of_RevisionsVFC_SizeRecord_SizeMaximum_Record_SizeUsedFirst_Free_ByteAllocatedDefault_Extend_QuantityBucket_SizeGlobal_Buffer_CountVersion_LimitExtentsHeadersLBNOwner_UICFile_IDDirectory_File_IDHighwater_MarkActive_Recovery_UnitsWasted_BlocksNameFullnameDisplayACLACE No %.*s %s = [%o,%o] = [%s] %.*s Identifier ace: Default protect ace: Reserved ace: Application ace: Unknown ace: %.*s Deleted ace. ACL: [%d] Status=[%d] Error %d in format_acl call  P..   LA\AA  6 d k q w MW]fjqz   B Y   A ( " 2 ' }  e 7  O V     +   9 S D n  H h y z   ACL_SCRUB.BCKK?:&[DPMSYS.ACL_FIND.BUILD]ACL_SCRUB.EXE;2K<^AURߥ5P;4ߥ PŒP&4`ߥߥhߥݢ8bߥ"PŒPŒPߥ%P¨bb PŒPŒPŒ1S4 TP|~?˜bPPŒPŒP,ߢ ?˜PŒPŒP]P<DߢXߢHߢDߢ<,cPŒPŒPXpp\ \\ߥ,Pp\<P< \P\DТX\DТ<@D\\<ТfRЬSУTfRc\fRЬSУXfRc]fRxPfRLfS$>fR(PЬScR cS<Rף ЏWЬUeeЬ VefTTмST $ e RRfЬTdS$W|~ݼݼ ݣ4|~W߭c xPUdRѢdRТ|~߭PЬRЭbRЭíSSƏSЬ RSbbSbЬTdSм dSмUP^|~޼P߰PQPQPмPݠ4PQPQPЬRR<߭7b ^Ь P`PPQPQP|~ݼݼ |~߭1мPݠ4 PQPЭQQP ^SЬRbH|~@|~߭22~ PQPQP2RRRPJ?Hݬ |^qRݬPbЬݬd ^ERݬ PЬ <^RЬSЬ T S PST P T$ݮ )ݮ ݮ PQЬUQUQUUP ^Rݬ& PЬݬ P Ь$Ь SSJ )SN SB ^iUPլ ЬRb ЬR18eeߥ PPeTS޼R>bQ> Pa`QPSߥP|~H|~߭22~ P eT1P|S޼R>bQ> Pa`QPSЏ0|~|~H|~߭r~2~ PHDS޼R>bQ> Pa`QPSߥP|~H|~߭22~ PeTS޼R>bQ> Pa`QPSЏ |~|~H|~߭42~ TPެY12SЬ RSЭPЬ VЦQTPQTQ RRSPRSTTTSTBQPx PPfPTWXiV>fR>S2bQQ> Pa`QPRߥP|~H|~߭22~ P eSPSSPΌ^KT8SܐސЬ U<R< ReRR RRЬ R(Т~Ь W1:10Z<V@DRRRWRUeYRRRWRUR1<R1UP?jM߭߭?XPXP12[1,Yfݣ` P `Pм `P`P`P@`P`PЏ`P>Q`P`P`P`P`P`P`2,4@P$PRR R\X6P`PP2PRP2`d`RP<`^,n䐏Pݬ^|VX^,n䐏Qݬf^PRݬl$լ ݬf  RP|CVD^,nȐSȞC؞7ܕlլݬfЬ̑lլ  lլ,n䞭l լ Ь l լЬlլ ݬf^<`^,n䐏Tl լЬ^<`^,n䐏UXLݬ&^E<,$ЬP<`Р͟%7Я̼@@$"  `0HPpH8 . @VAXCRTLFORRTLLIBRTLMTHRTLSMGSHR SECURESHR. ACL_SCRUB main] d FREPTECNT` freptecnt(`   GETDVI get_root_nameOget_next_deviceO # SEARCHX init_search search_header%0present) XV SECTION\ map_section!delete_sectionPh!read_section_block[  \ FID! fid_to_namee a! CLI," cli_get_value,X" cli_present, "change #append_with_point[ V,"9  ACL_SCRUB.BCKK?:&[DPMSYS.ACL_FIND.BUILD]ACL_SCRUB.EXE;2 GET_HEADERh# get_header h#g .MAIN.0. PARSE_UIC. . BLANK .cr- _LIB$STATE$ r- _LIB$KEY0$r- _LIB$KEY1$DISPLAY%display_header) format_uic7$* chk_owner(L*chk_aclB *% + DELETE_ACE* DELETE_ACE*&*[DPMSYS.ACL_FIND.BUILD]ACL_SCRUB.OBJ;2+,X?'./ 4 -:0123KPWO56@0Ӓ7@+:Ӓ89GHJ6 ACL_SCRUBV1.0 3-NOV-1989 15:19VAX C V3.0-031P PP.P6PDPPPOUTPUT POUTPUTPwPrfm=varPrat=cr"PP1%PVOLUME,PSorry, INDEX only works for structure level 2 disks. P<^C$MAINURߥ CLI_PRESENTP;4ߥ  CLI_GET_VALUEPŒP&4 STR$APPENDߥߥߥݢ8FREOPENbߥ" CLI_GET_VALUEPŒPŒPߥ% CLI_PRESENTP¨bb GET_ROOT_NAMEPŒPŒPŒ1 MAP_SECTIONSDISPLAY_HEADERTP|~?˜bR ACL_SCRUB main] d CC$RMS_FAB CC$RMS_NAM CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRMPRINTFFREOPENGET_NEXT_DEVICEDELETE_SECTIONDISPLAY_HEADER MAP_SECTION FREPTECNT FID_TO_NAME SYS$ASSIGN GET_ROOT_NAME STR$APPEND CLI_GET_VALUE CLI_PRESENT <MAINC$MAIN]$CODE$DATAERRNOSTDINSTDOUTSTDERR b$CHAR_STRING_CONSTANTS SYS$ASSIGNPŒPŒP,ߢ ?˜ FID_TO_NAMEPŒPŒP FREPTECNTP<DߢXߢHߢDߢ<,cPŒPŒPXpp\ \\ߥ,PRINTFPp\<P< \P\DТX\DТ<@D\\<Т./ 4G-:0123KPWO56[X<7`Ӓ89GHJ F/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */#define ATR$C_UCHAR 3#define ATR$S_UCHAR 4#define ATR$C_RECATTR 4#define ATR$S_RECATTR 32#define ATR$C_FILNAM 5#define ATR$S_FILNAM 6#define ATR$C_FILTYP 6#define ATR$S_FILTYP 2#define ATR$C_FILVER 7#define ATR$S_FILVER 2#define ATR$C_EXPDAT 8#define ATR$S_EXPDAT 7#define ATR$C_STATBLK 9#define ATR$S_STATBLK 32#define ATR$C_HEADER 10#define ATR$S_HEADER 512#define ATR$C_BLOCKSIZE 11#define ATR$S_BLOCKSIZE 2#define ATR$C_USERLABEL 12#define ATR$S_USERLABEL 80#define ATR$C_ASCDATES 13#define ATR$S_ASCDATES 35#define ATR$C_ALCONTROL 14#define ATR$S_ALCONTROL 14#define ATR$C_ENDLBLAST 15#define ATR$S_ENDLBLAST 4#define ATR$C_ASCNAME 16#define ATR$S_ASCNAME 86#define ATR$C_CREDATE 17#define ATR$S_CREDATE 8#define ATR$C_REVDATE 18#define ATR$S_REVDATE 8#define ATR$C_EXPDATE 19#define ATR$S_EXPDATE 8#define ATR$C_BAKDATE 20#define ATR$S_BAKDATE 8#define ATR$C_UIC 21#define ATR$S_UIC 4#define ATR$C_FPRO 22#define ATR$S_FPRO 2#define ATR$C_RPRO 23#define ATR$S_RPRO 2#define ATR$C_ACLEVEL 24#define ATR$S_ACLEVEL 1#define ATR$C_SEMASK 25#define ATR$S_SEMASK 8#define ATR$C_UIC_RO 26#define ATR$S_UIC_RO 4#define ATR$C_DIRSEQ 27#define ATR$S_DIRSEQ 2#define ATR$C_BACKLINK 28#define ATR$S_BACKLINK 6#define ATR$C_JOURNAL 29#define ATR$S_JOURNAL 1#define ATR$C_HDR1_ACC 30#define ATR$S_HDR1_ACC 1#define ATR$C_ADDACLENT 31#define ATR$S_ADDACLENT 255#define ATR$C_DELACLENT 32#define ATR$S_DELACLENT 255#define ATR$C_MODACLENT 33#define ATR$S_MODACLENT 255#define ATR$C_FNDACLENT 34#define ATR$S_FNDACLENT 255#define ATR$C_FNDACLTYP 35#define ATR$S_FNDACLTYP 255#define ATR$C_FNDACETYP 35#define ATR$S_FNDACETYP 255#define ATR$C_DELETEACL 36#define ATR$S_DELETEACL 255#define ATR$C_READACL 37#define ATR$S_READACL 512#define ATR$C_ACLLENGTH 38#define ATR$S_ACLLENGTH 4#define ATR$C_READACE 39#define ATR$S_READACE 255#define ATR$C_RESERVED 40#define ATR$S_RESERVED 380#define ATR$C_HIGHWATER 41#define ATR$S_HIGHWATER 4#define ATR$C_DUMMY_0 42#define ATR$S_DUMMY_0 4#define ATR$C_PRIVS_USED 43#define ATR$S_PRIVS_USED 4#define ATR$C_MATCHING_ACE 44#define ATR$S_MATCHING_ACE 255#define ATR$C_ACCESS_MODE 45#define ATR$S_ACCESS_MODE 1#define ATR$C_FILE_SPEC 46#define ATR$S_FILE_SPEC 512#define ATR$C_CLASS_MASK 47#define ATR$S_CLASS_MASK 20#define ATR$C_BUFFER_OFFSET 48#define ATR$S_BUFFER_OFFSET 2#define ATR$C_RU_ACTIVE 49#define ATR$S_RU_ACTIVE 1#define ATR$C_MAX_CODE 49#define ATR$C_MAX_PLUS1 50 #define ATR$S_ATRDEF 8 struct ATRDEF{ unsigned short int atr$w_size; unsigned short int atr$w_type; char *atr$l_addr;};,*[DPMSYS.ACL_FIND.BUILD]BUILD_ACL_SCRUB.COM;2+,V?!./ 4>-:0123KPWO56 IӒ7! JӒ89GHJ$$! Creating acl_scrub.exe$$ p1 = "''p1'"!$ if p1.eqs."LINK" then goto link$ cc acl_scrub.c$ cc section.c$ cc freptecnt.c $ cc search $ cc getdvi $ cc cli $ cc fid$ cc get_header$ mac parse_uic $ cc display$ for delete_acl.for$link:$ link /exec=acl_scrub.exe -1 acl_scrub,freptecnt,getdvi,search,section,fid, -> cli,get_header,parse_uic,display,delete_acl,sys$input:/optionsys$share:vaxcrtl/share$!*[DPMSYS.ACL_FIND.BUILD]CLD.H;1+,> . / 4K -:0123KPWO56`wY<7ҹӒ89GHJ  ACL_SCRUB.BCK> :[DPMSYS.ACL_FIND.BUILD]CLD.H;1UB.CLD;2K F/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */G/* this file will contain the text names for the CLD qualifiers etc. */K/* this include file contains the strings that describe the command line */char *t_rtype = "Type";char *ta_rtype[] = { "Undefined", "Fixed", "Variable", "VFC", "Stream", "LFStream", "CRStream"};!char *t_fileorg = "Organization";char *ta_fileorg[] = { "Sequential", "Relative", "Indexed", "Direct"};char *t_attr = "Attributes";" char *t_fortrancc = "FortranCC";" char *t_impliedcc = "ImpliedCC"; char *t_printcc = "PrintCC"; char *t_nospan = "Span";!char *t_char = "Characteristics";! char *t_badacl = "ACL_Corrupt"; char *t_nobackup = "Backup";* char *t_contigb = "Best_Try_Contiguous"; char *t_nocharge = "Charge"; char *t_contig = "Contiguous";" char *t_directory = "Directory";$ char *t_erase = "Erase_On_Delete";$ char *t_badblock = "File_Corrupt"; char *t_locked = "Locked";( char *t_markdel = "Marked_For_Delete"; char *t_spool = "Spool";$ char *t_readcheck = "Read_Verify";# char *t_writeback = "Write_Back";% char *t_writcheck = "Write_Verify";char *t_journal = "Journal";# char *t_journal_file = "Journal"; char *t_aijnl = "AIJnl"; char *t_atjnl = "ATJnl"; char *t_bijnl = "BIJnl"; char *t_rujnl = "RUJnl"; char *t_never_ru = "Never_RU"; char *t_only_ru = "Only_RU";char *t_access = "Access_Mode";char *ta_access[] = { "USER", "SUPERVISOR", "EXECUTIVE", "KERNEL"}; char *t_placement = "Placement"; char *t_place_exact = "Exact";& char *t_place_oncyl = "On_Cylinder";/ char *t_place_rvn = "Relative_Volume_Number";& char *t_place_lbn = "LBN_Specified"; char *t_prot = "Protection";#char *t_protset = "Protection.set";%char *t_protclr = "Protection.clear";8char *ta_prot[] = {"SYSTEM", "OWNER", "GROUP", "WORLD"};char *t_fileprot[] = {0 "RWED", "WED", "RED", "ED", "RWD", "WD", "RD",1 "D", "RWE", "WE", "RE", "E", "RW", "W", "R", ""};"char *t_credate = "Creation_Date";"char *t_revdate = "Revision_Date";$char *t_expdate = "Expiration_Date"; char *t_bakdate = "Backup_Date";*char *t_revisions = "Number_Of_Revisions";char *t_vfcsize = "VFC_Size";char *t_rsize = "Record_Size";'char *t_maxrec = "Maximum_Record_Size";char *t_efblk = "Used";#char *t_ffbyte = "First_Free_Byte";char *t_hiblk = "Allocated";+char *t_defext = "Default_Extend_Quantity"; char *t_bktsize = "Bucket_Size";$char *t_gbc = "Global_Buffer_Count";#char *t_versions = "Version_Limit";char *t_extents = "Extents";char *t_header = "Headers";char *t_lbn = "LBN";char *t_owner = "Owner_UIC";char *t_fid = "File_ID";'char *t_backlink = "Directory_File_ID";%char *t_highwater = "Highwater_Mark";,char *t_ru_active = "Active_Recovery_Units";!char *t_wasted = "Wasted_Blocks";char *t_filename = "Name";char *t_fullname = "Fullname"; char *t_display = "Display";char *t_aclexists = "ACL";char *t_aclcontains = "ACE";*[DPMSYS.ACL_FIND.BUILD]CLI.C;1+,:'[DPMSYS.ACL_FIND.BUILD]DELETE_ACL.FOR;1WZ'*[DPMSYS.ACL_FIND.BUILD]DELETE_ACL.FOR;1+,>./ 4W-:0123KPWO56`/f?7Ӓ89GHJ N******************************************************************************N* *N******************************************************************************/ integer function delete_ace(disk_chan,fid,ace) implicit none include '($ATRDEF)' include '($FIBDEF)' include '($FABDEF)' include '($NAMDEF)' include '($IODEF)' integer*2 disk_chan integer*2 fid(3) integer ace integer stat,stat1 record /atrdef/ atrblk(5) record /fibdef/ fibblk structure/descriptor/ integer length integer address end structure record /descriptor/ fibblk_descN******************************************************************************N* I/O status block structure for system service calls *N****************************************************************************** structure /iosb/% integer*2 cond_val& integer*2 trans_cnt% integer*4 dev_spec end structure record /iosb/ iostat character*180 filename integer sys$qiow delete_ace = 1W Call Lib$MovC3( 1, %Val(Ace), atrblk(1).atr$w_size ) ! Copy in size - 1st byte. atrblk(1).atr$w_type = ATR$C_DELACLENT" atrblk(1).atr$l_addr = ace atrblk(2).atr$w_size = 0 atrblk(2).atr$w_type = 0" fibblk_desc.length = FIB$K_LENGTH* fibblk_desc.address = %loc(fibblk), fibblk.fib$l_acctl = FIB$M_WRITETHRU$ fibblk.fib$w_fid(1) = fid(1)$ fibblk.fib$w_fid(2) = fid(2)$ fibblk.fib$w_fid(3) = fid(3)) fibblk.fib$w_nmctl = FIB$M_ALLVER fibblk.fib$l_wcc = 0 fibblk.fib$l_aclctx = 0! fibblk.fib$w_verlimit = 0" stat = sys$qiow(,%val(disk_chan),) @ %val(IO$_MODIFY),! @ iostat,,,' @ fibblk_desc,,,,& @ %ref(atrblk),), if (.not. stat) call lib$signal(%val(stat)) if (.not. iostat.cond_val) then stat = iostat.cond_val+ call lib$signal(%val(iostat.cond_val)) endif delete_ace = stat return end'*[DPMSYS.ACL_FIND.BUILD]DELETE_ACL.OBJ;1+,?3./ 4-:0123KPWO56`OӒ7Ӓ89GHJ5 DELETE_ACE01 3-Nov-1989 15:22 3-Nov-1989 15:22VAX FORTRAN V5.2-33 DELETE_ACE P DELETE_ACE|P  6PH|[Ьм P>`  LIB$MOVC3P `Pм `P`P`P@`P`PЏ`P>Q`P`P`P`P`P`P`2,4@P$SYS$QIOWPRRR\X LIB$SIGNAL螫P`PP2PRP2`d` LIB$SIGNALRPu H DELETE_ACESYS$QIOW LIB$MOVC3 LIB$SIGNAL$CODE$PDATA$LOCALP P6*#*[DPMSYS.ACL_FIND.BUILD]DISPLAY.C;96+,<*./ 4~-:0123KPWO56R?7ԫӒ89GHJ /* Modification History --------------------5 Sep. 8, 1987 JEM - Conversion from BETA to Release*/#include descrip#include climsgdef#include acedef#include "fh2def.h"#include "fi2def.h"#include "fm2def.h"#include "FileInfo.h"#include "displaydef.h"#include "cld.h"#define TRUE 1#define FALSE 0char *cvt_time();char *format_uic();char *get_header();unsigned int change();0display_header(disp,fid,fh2,context,cached,chan) struct display_info *disp; long int fid; struct fh2def *fh2; struct FileInfo *context; int cached; short int chan;{ struct fh2def *exthdr; struct fi2def *fi2; struct fm2def *fm2,*fm2adr;> long int fm2offset=0,lbn=0,count=0,totextents=0,tothdrs=0;O static struct dsc$descriptor filename={0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0}; $DESCRIPTOR(newline,"\n"); short int nxtfid[3];- long int used,alloc,wasted,blocknum,addr; long *loc_acl; long status; long good; long normal; long cnt; short size; short offset; union { struct { unsigned short member; unsigned short group; }uic; long id_value; } acl; long int i,j; static char *blockaddr=0; static char *No = "No"; static char ace_buff[512];* static struct dsc$descriptor ace_txt =/ {0,DSC$K_DTYPE_T,DSC$K_CLASS_S,ace_buff};* static struct dsc$descriptor ace_bin =( {0,DSC$K_DTYPE_T,DSC$K_CLASS_S,0}; char *aclptr; struct binary_acl { unsigned char length; unsigned char type; unsigned short int flags; } *acaddr; char ack[512]; short mov_len;m if ((fh2->fh2$w_fid[0] == 0) /* if this is a completely unused header, don't bother displaying it */# && (fh2->fh2$w_fid[1] == 0)% && (fh2->fh2$b_idoffset == 0)% && (fh2->fh2$b_mpoffset == 0)% && (fh2->fh2$b_acoffset == 0)( && (fh2->fh2$b_rsoffset == 0)) { return; }6 if ((fh2->fh2$b_acoffset < fh2->fh2$b_rsoffset) ||, (~chk_owner(fh2->fh2$l_fileowner)&1)) {6 fi2 = (long int)fh2 + fh2->fh2$b_idoffset * 2; normal = TRUE;? status = fid_to_name(&chan,(*fh2).fh2$w_fid,&filename);0 if ((status & 1) && fh2->fh2$w_fid[0]) {N/* printf("%.*s\n",filename.dsc$w_length,filename.dsc$a_pointer);*/ }else{ normal = FALSE;H status = fid_to_name(&chan,(*fh2).fh2$w_backlink,&filename);, for (i=0;(i < FI2$S_FILENAME) &&A ((*fi2).fi2$t_filename[i] != ' ');i++); j = 0;D if ((fh2->fh2$b_mpoffset - fh2->fh2$b_idoffset) >= 60) {2 for (j=0;(j < FI2$S_FILENAMEXT) &&E ((*fi2).fi2$t_filenamext[j] != ' ');j++); }=/* printf("[?]%.*s%.*s\n",i,(*fi2).fi2$t_filename,> j,(*fi2).fi2$t_filenamext); if (st  ACL_SCRUB.BCK<*:#[DPMSYS.ACL_FIND.BUILD]DISPLAY.C;96E;2~ atus & 1)W printf("(in %.*s%)\n",filename.dsc$w_length,filename.dsc$a_pointer); */ };* if (~chk_owner(fh2->fh2$l_fileowner)&1) { if (normal&1) {J printf("\n"); /* separate the buggers with a blank line */G printf("%.*s ",filename.dsc$w_length,filename.dsc$a_pointer);( printf("%s = [%o,%o] = [%s]\n", t_owner,5 fh2->fh2$w_uicgroup,fh2->fh2$w_uicmember,C format_uic(fh2->fh2$l_fileowner)); } } exthdr = fh2;M while (exthdr && (exthdr->fh2$b_acoffset < exthdr->fh2$b_rsoffset)) {A acaddr = (char *)exthdr + exthdr->fh2$b_acoffset * 2;2 ace_bin.dsc$w_length = acaddr->length; cnt = 1;K while ((acaddr < ((char *)exthdr + (exthdr->fh2$b_rsoffset*2)))4 && (ace_bin.dsc$w_length != 0)) {\ ace_bin.dsc$a_pointer = acaddr; /* format the ace */+ ace_txt.dsc$w_length = 512; if (1) { size = 4;2 offset = *(short *)&acaddr[1];H lib$movc3(&size,&ace_bin.dsc$a_pointer[8],&acl.uic);l i = 3; /* number of chars to indent */_ j = 77; /* width of acl */K status = sys$format_acl(&ace_bin,&ace_txt.dsc$w_length,? &ace_txt,&j,&newline,&i,0);7 if ((status & 1) && (normal & 1)) {' if (cnt == 1) {V printf("\n"); /* separate the buggers with a blank line */Z printf("%.*s\n",filename.dsc$w_length,filename.dsc$a_pointer); }/ switch (acaddr->type) {\ case ACE$C_KEYID: printf(" Identifier ace: ");> break;\ case ACE$C_DIRDEF: printf(" Default protect ace: ");> break;\ case ACE$C_RESERVED: printf(" Reserved ace: ");> break;\ case ACE$C_APPLICATION: printf(" Application ace: ");> break;\ default: printf(" Unknown ace: ");> break; }T printf("%.*s\n",ace_txt.dsc$w_length,ace_txt.dsc$a_pointer);: if (acaddr->type == ACE$C_KEYID) {4 good = chk_acl(acl.uic);* if (~good&1) {~ mov_len = (short) acaddr->length; /* Extract the ACE and Null terminate it (word) */N lib$movc3( &mov_len, &(acaddr->length), ack );= ack[acaddr->length+1] = '\0';/ loc_acl = &ack;W status = delete_ace(&chan,&fh2->fh2$w_fid[0],&loc_acl);k printf(" Deleted ace. ACL: [%d] Status=[%d]\n",acl.id_value,status); } } }else{W if (normal & 1) printf("Error %d in format_acl call\n",status); } } cnt = cnt + 1;a acaddr = (char *)acaddr + ace_bin.dsc$w_length; /* move on to next ace */6 ace_bin.dsc$w_length = acaddr->length; };H exthdr = get_header(exthdr->fh2$w_ext_fid,exthdr->fh2$w_fid,3 context,cached,chan); }; } return;}char *format_uic(uic) long int uic;{ static char id[66];L static struct dsc$descriptor id_str={65,DSC$K_DTYPE_T,DSC$K_CLASS_S,id}; unsigned short int idlen; long int status; id[0] = '\0';3 status = sys$idtoasc(uic,&idlen,&id_str,0,0,0);% if (status & 1) id[idlen] = '\0'; return(id);}int chk_owner(uic) long int uic;{ static char id[66];L static struct dsc$descriptor id_str={65,DSC$K_DTYPE_T,DSC$K_CLASS_S,id}; unsigned short int idlen; long int status; id[0] = '\0';3 status = sys$idtoasc(uic,&idlen,&id_str,0,0,0); return(status);}int chk_acl(acl) long int acl;{ static char id[66];L static struct dsc$descriptor id_str={65,DSC$K_DTYPE_T,DSC$K_CLASS_S,id}; unsigned short int idlen; long int status; if (acl == -1) return(1);% if (acl == 1073741823) return(1); id[0] = '\0';3 status = sys$idtoasc(acl,&idlen,&id_str,0,0,0); return(status);}$*[DPMSYS.ACL_FIND.BUILD]DISPLAY.OBJ;1+,?/./ 4  -:0123KPWO56@5Ӓ73Ӓ89GHJ4DISPLAYV1.0 3-NOV-1989 15:22VAX C V3.0-031PTypePPUndefinedPPFixedPPVariablePPVFC P"PStreamP")PLFStreamP)2PCRStreamP2;POrganizationP;HPSequentialPHSPRelativePS\PIndexedP\dPDirect PdkPAttributesPkvPFortranCCPvPImpliedCC PPPrintCC PPSpan PPCharacteristics PPACL_Corrupt PPBackupPPBest_Try_ContiguousPPChargePPContiguousPPDirectoryPPErase_On_DeletePPFile_CorruptPPLockedPPMarked_For_DeleteP PSpoolP &PRead_VerifyP&2PWrite_BackP2=PWrite_VerifyP=JPJournalPJRPJournalPRZPAIJnlPZ`PATJnlP`fPBIJnlPflPRUJnl PlrPNever_RU!Pr{POnly_RU"P{PAccess_Mode#PPUSER$PPSUPERVISOR$PPEXECUTIVE$PPKERNEL$ PPPlacement%PPExact&PPOn_Cylinder'PPRelative_Volume_Number(PPLBN_Specified)PPProtection*PPProtection.set+P PProtection.clear,P PSYSTEM-P#POWNER-P#)PGROUP-P)/PWORLD- P/5PRWED.P5:PWED.P:>PRED.P>BPED. PBEPRWD.PEIPWD.PI   ACL_SCRUB.BCK?/:$[DPMSYS.ACL_FIND.BUILD]DISPLAY.OBJ;1;2LPRD.PLOPD.POQPRWE. PQUPWE.$PUXPRE.(PX[PE.,P[]PRW.0P]`PW.4P`bPR.8PbdePCreation_Date/PesPRevision_Date0PsPExpiration_Date1PPBackup_Date2PPNumber_Of_Revisions3PPVFC_Size4PPRecord_Size5PPMaximum_Record_Size6PPUsed7PPFirst_Free_Byte8PPAllocated9PPDefault_Extend_Quantity:PPBucket_Size;PPGlobal_Buffer_Count<P1PVersion_Limit=P1?PExtents>P?GPHeaders?PGOPLBN@POSPOwner_UICAPS]PFile_IDBP]ePDirectory_File_IDCPewPHighwater_MarkDPwPActive_Recovery_UnitsEPPWasted_BlocksFPPNameGPPFullnameHPPDisplayIPPACLJPPACEKPPP PNo PPPP P%.*s P%s = [%o,%o] = [%s] P P%.*s P Identifier ace:  P Default protect ace: 'P Reserved ace: AP Application ace: [P Unknown ace: uP%.*s {P Deleted ace. ACL: [%d] Status=[%d] PError %d in format_acl call bPA PAjPAPΌ^TSܐސЬ U<R< ReRR RRЬ R(Т~APRINTFЬ W1:10 LIB$MOVC3ZSYS$FORMAT_ACL<PRINTFV SYS$IDTOASC@ DELETE_ACEDRRRWRUeYRRRWRUR1<R1UP?jM߭߭?XPXP12[1,Yfݣ´|~?ݬ SYS$IDTOASCP*ZZZZZNZ6%*[DPMSYS.ACL_FIND.BUILD]DISPLAYDEF.H;1+,>./ 4G:-:0123KPWO56@BBa<7Ӓ89GHJF/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */struct display_info { variant_union { variant_struct { long int di_l_dsplybits0; long int di_l_dsplybits1; } si_dummy_dsplybits_struct; variant_struct { unsigned di_v_credat : 1; unsigned di_v_revdat : 1; unsigned di_v_expdat : 1; unsigned di_v_bakdat : 1;! unsigned di_v_revision : 1; unsigned di_v_extents : 1; unsigned di_v_headers : 1; unsigned di_v_lbn : 1; unsigned di_v_owner : 1; unsigned di_v_char : 1; unsigned di_v_journal : 1; unsigned di_v_prot : 1; unsigned di_v_fid : 1;! unsigned di_v_backlink : 1; unsigned di_v_access : 1;" unsigned di_v_highwater : 1;" unsigned di_v_ru_active : 1; unsigned di_v_rectype : 1; unsigned di_v_fileorg : 1; unsigned di_v_attrib : 1; unsigned di_v_rsize : 1; unsigned di_v_alloc : 1; unsigned di_v_used : 1; unsigned di_v_wasted : 1; unsigned di_v_bktsize : 1; unsigned di_v_vfcsize : 1; unsigned di_v_maxrec : 1; unsigned di_v_defext : 1; unsigned di_v_gbc : 1;& unsigned di_v_version_limit : 1;! unsigned di_v_filename : 1;! unsigned di_v_fullname : 1; unsigned di_v_acl : 1; } di_dummy_dsplybits; } di_dummy_dsply_union;};!*[DPMSYS.ACL_FIND.BUILD]FATDEF.H;1+,>%./ 4G-:0123KPWO56a<7RӒ89GHJ   ACL_SCRUB.BCK>%:![DPMSYS.ACL_FIND.BUILD]FATDEF.H;1.FOR;1GMK F/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */#define FAT$K_LENGTH 32#define FAT$C_LENGTH 32#define FAT$S_FATDEF 32 struct FATDEF { variant_union { unsigned char fat$b_rtype; variant_struct { unsigned fat$v_rtype : 4;! unsigned fat$v_fileorg : 4; } fat$r_rtype_bits; } fat$r_rtype_overlay;# define FAT$S_RTYPE 4# define FAT$V_RTYPE 0# define FAT$C_UNDEFINED 0# define FAT$C_FIXED 1# define FAT$C_VARIABLE 2# define FAT$C_VFC 3# define FAT$C_STREAM 4# define FAT$C_STREAMLF 5# define FAT$C_STREAMCR 6# define FAT$S_FILEORG 4# define FAT$V_FILEORG 4# define FAT$C_SEQUENTIAL 0# define FAT$C_RELATIVE 1# define FAT$C_INDEXED 2# define FAT$C_DIRECT 3 variant_union { unsigned char fat$b_rattrib; variant_struct {# unsigned fat$v_fortrancc : 1;# unsigned fat$v_impliedcc : 1;! unsigned fat$v_printcc : 1; unsigned fat$v_nospan : 1; } fat$r_rattrib_bits; } fat$r_rattrib_overlay;# define FAT$V_FORTRANCC 0# define FAT$M_FORTRANCC 1# define FAT$V_IMPLIEDCC 1# define FAT$M_IMPLIEDCC 2# define FAT$V_PRINTCC 2# define FAT$M_PRINTCC 4# define FAT$V_NOSPAN 3# define FAT$M_NOSPAN 8! unsigned short int fat$w_rsize; variant_union {" unsigned long int fat$l_hiblk; variant_struct {& unsigned short int fat$w_hiblkh;& unsigned short int fat$w_hiblkl; } FATDEF$DUMMY_0; } FATDEF$DUMMY_1; variant_union {" unsigned long int fat$l_efblk; variant_struct {& unsigned short int fat$w_efblkh;& unsigned short int fat$w_efblkl; } FATDEF$DUMMY_2; } FATDEF$DUMMY_3;" unsigned short int fat$w_ffbyte; unsigned char fat$b_bktsize; unsigned char fat$b_vfcsize;" unsigned short int fat$w_maxrec;" unsigned short int fat$w_defext; unsigned short int fat$w_gbc; char fat$fill[8];$ unsigned short int fat$w_versions;};!*[DPMSYS.ACL_FIND.BUILD]FCHDEF.H;1+,>'./ 4G4-:0123KPWO56 #]<7`Ӓ89GHJF/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */#define FCH$V_BADACL 0x00B(#define FCH$M_BADACL (1 << FCH$V_ACL)#define FCH$V_BADBLOCK 0x00E-#define FCH$M_BADBLOCK (1 << FCH$V_BADBLOCK)#define FCH$V_CONTIG 0x007+#define FCH$M_CONTIG (1 << FCH$V_CONTIG)#define FCH$V_CONTIGB 0x005,#define FCH$M_CONTIGB (1 << FCH$V_CONTIGB)#define FCH$V_DIRECTORY 0x00D.#define FCH$M_DIRECTORY (1 << FCH$V_DIRECTORY)#define FCH$V_ERASE 0x011*#define FCH$M_ERASE (1 << FCH$V_ERASE)#define FCH$V_LOCKED 0x006+#define FCH$M_LOCKED (1 << FCH$V_LOCKED)#define FCH$V_MARKDEL 0x00F,#define FCH$M_MARKDEL (1 << FCH$V_MARKDEL)#define FCH$V_NOBACKUP 0x001-#define FCH$M_NOBACKUP (1 << FCH$V_NOBACKUP)#define FCH$V_NOCHARGE 0x010-#define FCH$M_NOCHARGE (1 << FCH$V_NOCHARGE)#define FCH$V_READCHECK 0x003.#define FCH$M_READCHECK (1 << FCH$V_READCHECK)#define FCH$V_SPOOL 0x00C*#define FCH$M_SPOOL (1 << FCH$V_SPOOL)#define FCH$V_WRITCHECK 0x004.#define FCH$M_WRITCHECK (1 << FCH$V_WRITCHECK)#define FCH$V_WRITEBACK 0x002.#define FCH$M_WRITEBACK (1 << FCH$V_WRITEBACK) struct fchdef { unsigned : 1; unsigned fch$v_nobackup : 1 ; unsigned fch$v_writeback : 1; unsigned fch$v_readcheck : 1; unsigned fch$v_writcheck : 1; unsigned fch$v_contigb : 1; unsigned fch$v_locked : 1; unsigned fch$v_contig : 1; unsigned : 3; unsigned fch$v_badacl : 1; unsigned fch$v_spool : 1; unsigned fch$v_directory : 1; unsigned fch$v_badblock : 1; unsigned fch$v_markdel : 1; unsigned fch$v_nocharge : 1; unsigned fch$v_erase : 1;};!*[DPMSYS.ACL_FIND.BUILD]FH2DEF.H;1+,>". / 4G -:0123KPWO 56 9^<7Ӓ89GHJ F/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */#include "fatdef.h" #define FH2$C_LEVEL1 257#define FH2$C_LEVEL2 512#define FH2$M_NOBACKUP 2#define FH2$M_WRITEBACK 4#define FH2$M_READCHECK 8#define FH2$M_WRITCHECK 16#define FH2$M_CONTIGB 32#define FH2$M_LOCKED 64#define FH2$M_CONTIG 128#define FH2$M_BADACL 2048#define FH2$M_SPOOL 4096#define FH2$M_DIRECTORY 8192#define FH2$M_BADBLOCK 16384#define FH2$M_MARKDEL 32768#define FH2$M_NOCHARGE 65536#define FH2$M_ERASE 131072#define FH2$M_ONLY_RU 1#define FH2$M_RUJNL 2#define FH2$M_BIJNL 4#define FH2$M_AIJNL 8#define FH2$M_ATJNL 16#define FH2$M_NEVER_RU 32"#define FH2$M_JOURNAL_FILE 64!#define FH2$C_RU_FACILITY_RMS 1!#define FH2$C_RU_FACILITY_DBMS 2!#define FH2$C_RU_FACILITY_RDB 3)#define FH2$C_RU_FACILITY_CHKPNT 4#define FH2$K_LENGTH 80#define FH2$C_LENGTH 80"#define FH2$K_SUBSET0_LENGTH 88"#define FH2$C_SUBSET0_LENGTH 88##define FH2$K_FULL_LENGTH 108##define FH2$C_FULL_LENGTH 108#define FH2$S_FH2DEF 512 #define FH2$S_FID 6#define FH2$S_EXT_FID 6#define FH2$S_RECATTR 32#define FH2$S_BACKLINK 6"#define FH2$S_CLASS_PROT 20 struct fh2def { unsigned char fh2$b_idoffset; unsigned char fh2$b_mpoffset; unsigned char fh2$b_acoffset; unsigned char fh2$b_rsoffset;# unsigned short int fh2$w_seg_num; variant_union {& unsigned short int fh2$w_struclev; variant_struct {# unsigned char fh2$b_strucver;# unsigned char fh2$b_struclev; } fh2$dummy_struclev_fields; } fh2$dummy_struclev; variant_union {. unsigned short int fh2$w_fid[FH2$S_FID/2]; variant_struct {' unsigned short int fh2$w_fid_num;' unsigned short int fh2$w_fid_seq; variant_union {) unsigned short int fh2$w_fid_rvn; variant_struct {& unsigned char fh2$b_fid_rvn;& unsigned char fh2$b_fid_nmx;% } fh2$dummy_w_fid_rvn_struct;" } fh2$dummy_w_fid_rvn_union; } fh2$dummy_w_fid_struct; } fh2$dummy_w_fid_union; variant_union {6 unsigned short int fh2$w_ext_fid[FH2$S_EXT_FID/2]; variant_struct {) unsigned short int fh2$w_ex_fidnum;) unsigned short int fh2$w   ACL_SCRUB.BCK>":![DPMSYS.ACL_FIND.BUILD]FH2DEF.H;196E;2G  _ex_fidseq; variant_union {+ unsigned short int fh2$w_ex_fidrvn; variant_struct {( unsigned char fh2$b_ex_fidrvn;( unsigned char fh2$b_ex_fidnmx;' } fh2$dummy_w_ex_fidrvn_struct;$ } fh2$dummy_w_ex_fidrvn_union;! } fh2$dummy_w_ext_fid_struct; } fh2$dummy_w_ext_fid_union; variant_union {6 unsigned short int fh2$w_recattr[FH2$S_RECATTR/2]; struct FATDEF fat; } fh2$dummy_recattr_union; variant_union {% unsigned long int fh2$l_filechar; variant_struct { unsigned : 1;" unsigned fh2$v_nobackup : 1;# unsigned fh2$v_writeback : 1;# unsigned fh2$v_readcheck : 1;# unsigned fh2$v_writcheck : 1;! unsigned fh2$v_contigb : 1; unsigned fh2$v_locked : 1; unsigned fh2$v_contig : 1; unsigned : 3; unsigned fh2$v_badacl : 1; unsigned fh2$v_spool : 1;# unsigned fh2$v_directory : 1;" unsigned fh2$v_badblock : 1;! unsigned fh2$v_markdel : 1;" unsigned fh2$v_nocharge : 1; unsigned fh2$v_erase : 1;" } fh2$dummy_l_filechar_struct; } fh2$dummy_l_filechar_union;# unsigned short int fh2$w_recprot; unsigned char fh2$b_map_inuse; unsigned char fh2$b_acc_mode; variant_union {& unsigned long int fh2$l_fileowner; variant_struct {) unsigned short int fh2$w_uicmember;( unsigned short int fh2$w_uicgroup;# } fh2$dummy_l_fileowner_struct; } fh2$dummy_l_fileowner_union; variant_union {& unsigned short int fh2$w_fileprot; variant_struct {' unsigned fh2$v_fileprot_system : 4;& unsigned fh2$v_fileprot_owner : 4;& unsigned fh2$v_fileprot_group : 4;& unsigned fh2$v_fileprot_world : 4;" } fh2$dummy_w_fileprot_struct; } fh2$dummy_w_fileprot_union; variant_union {8 unsigned short int fh2$w_backlink[FH2$S_BACKLINK/2]; variant_struct {) unsigned short int fh2$w_bk_fidnum;) unsigned short int fh2$w_bk_fidseq; variant_union {+ unsigned short int fh2$w_bk_fidrvn; variant_struct {( unsigned char fh2$b_bk_fidrvn;( unsigned char fh2$b_bk_fidnmx;' } fh2$dummy_w_bk_fidrvn_struct;$ } fh2$dummy_w_bk_fidrvn_union;" } fh2$dummy_w_backlink_struct; } fh2$dummy_w_backlink_union; variant_union { unsigned char fh2$b_journal; variant_struct {! unsigned fh2$v_only_ru : 1; unsigned fh2$v_rujnl : 1; unsigned fh2$v_bijnl : 1; unsigned fh2$v_aijnl : 1; unsigned fh2$v_atjnl : 1;" unsigned fh2$v_never_ru : 1;& unsigned fh2$v_journal_file : 1;! } fh2$dummy_b_journal_struct; } fh2$dummy_b_journal_union; unsigned char fh2$b_ru_active; unsigned char fh2$fill_1[2];$ unsigned long int fh2$l_highwater; unsigned char fh2$fill_2[8];3 unsigned char fh2$r_class_prot[FH2$S_CLASS_PROT]; unsigned char fh2$fill_3[402];$ unsigned short int fh2$w_checksum;};!*[DPMSYS.ACL_FIND.BUILD]FI2DEF.H;1+,?'./ 4G-:0123KPWO56^<7`PӒ89GHJF/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */#define FI2$K_LENGTH 120#define FI2$C_LENGTH 120#define FI2$S_FI2DEF 200#define FI2$S_FILENAME 20#define FI2$S_CREDATE 8#define FI2$S_REVDATE 8#define FI2$S_EXPDATE 8#define FI2$S_BAKDATE 8"#define FI2$S_FILENAMEXT 66#define FI2$S_USERLABEL 80,#define DATE {unsigned : 32; unsigned : 32;} struct fi2def {/ unsigned char fi2$t_filename[FI2$S_FILENAME];$ unsigned short int fi2$w_revision; struct DATE fi2$q_credate; struct DATE fi2$q_revdate; struct DATE fi2$q_expdate; struct DATE fi2$q_bakdate;3 unsigned char fi2$t_filenamext[FI2$S_FILENAMEXT];1 unsigned char fi2$t_userlabel[FI2$S_USERLABEL];};!*[DPMSYS.ACL_FIND.BUILD]FIBDEF.H;1+,?,./ 4G0-:0123KPWO56^<7 gӒ89GHJ F/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */#define FIB$M_NOWRITE 1#define FIB$M_DLOCK 2#define FIB$M_BLK_LOCK 4#define FIB$M_SPOOL 16#define FIB$M_WRITECK 32#define FIB$M_SEQONLY 64#define FIB$M_WRITE 256#define FIB$M_READCK 512#define FIB$M_NOREAD 1024#define FIB$M_NOTRUNC 2048#define FIB$M_CONTROL 4096#define FIB$M_EXECUTE 65536#define FIB$M_PRSRV_ATR 131072#define FIB$M_RMSLOCK 262144#define FIB$M_WRITETHRU 524288#define FIB$M_NOLOCK 1048576#define FIB$M_NORECORD 2097152#define FIB$M_REWIND 8#define FIB$M_CURPOS 16#define FIB$M_UPDATE 64#define FIB$K_ACCDATA 10#define FIB$C_ACCDATA 10#define FIB$K_DIRDATA 22#define FIB$C_DIRDATA 22#define FIB$M_ALLVER 8#define FIB$M_ALLTYP 16#define FIB$M_ALLNAM 32#define FIB$M_WILD 256#define FIB$M_NEWVER 512#define FIB$M_SUPERSEDE 1024#define FIB$M_FINDFID 2048#define FIB$M_LOWVER 16384#define FIB$M_HIGHVER 32768#define FIB$M_ALCON 1#define FIB$M_ALCONB 2#define FIB$M_FILCON 4#define FIB$M_ALDEF 8#define FIB$M_ALLOCATR 16#define FIB$M_EXTEND 128#define FIB$M_TRUNC 256#define FIB$M_NOHDREXT 512#define FIB$M_MARKBAD 1024#define FIB$M_NOCHARGE 32768#define FIB$K_EXTDATA 32#define FIB$C_EXTDATA 32#define FIB$M_EXACT 1#define FIB$M_ONCYL 2#define FIB$C_CYL 1#define FIB$C_LBN 2#define FIB$C_VBN 3#define FIB$C_RFI 4#define FIB$K_ALCDATA 44#define FIB$C_ALCDATA 44#define FIB$M_ALT_REQ 1#define FIB$M_ALT_GRANTED 2#define FIB$M_DIRACL 4#define FIB$M_PROPAGATE 8#define FIB$K_LENGTH 64#define FIB$C_LENGTH 64struct fibdef { variant_union {& unsigned long int fib$l_acctl; variant_struct {' unsigned fib$v_nowrite : 1;% unsigned fib$v_dlock : 1;( unsigned fib$v_blk_lock : 1;) unsigned fibdef$$_fill_1 : 1;% unsigned fib$v_spool : 1;' unsigned fib$v_writeck : 1;' unsigned fib$v_seqonly : 1;) unsigned fibdef$$_fill_2 : 1;% unsigned fib$v_write : 1;& unsigned fib$v_readck : 1;& unsigned fib$v_noread : 1;' unsigned fib$v_notrunc : 1;' unsigned fib$v_control : 1;) unsigned fibdef$$_fill_3 : 3;  ' unsigned fib$v_execute : 1;) unsigned fib$v_prsrv_atr : 1;' unsigned fib$v_rmslock : 1;) unsigned fib$v_writethru : 1;& unsigned fib$v_nolock : 1;( unsigned fib$v_norecord : 1;) unsigned fibdef$$_fill_4 : 2; } fib$r_acctl_bits0; variant_struct {) unsigned fibdef$$_fill_5 : 3;& unsigned fib$v_rewind : 1;& unsigned fib$v_curpos : 1;) unsigned fibdef$$_fill_6 : 1;& unsigned fib$v_update : 1;&    ACL_SCRUB.BCK?,:![DPMSYS.ACL_FIND.BUILD]FIBDEF.H;1J;1;2G unsigned fib$v_fill_1 : 1; } fib$r_acctl_bits1; variant_struct {& char fibdef$$_fill_13 [3]; char fib$b_wsize;" } fib$r_acctl_fields2; } fib$r_acctl_overlay; variant_union {) unsigned short int fib$w_fid [3]; variant_struct {- unsigned short int fib$w_fid_num;- unsigned short int fib$w_fid_seq; variant_union {1 unsigned short int fib$w_fid_rvn;! variant_struct {0 unsigned char fib$b_fid_rvn;0 unsigned char fib$b_fid_nmx;+ } fib$r_fid_rvn_fields;( } fib$r_fid_rvn_overlay; } fib$r_fid_fields; } fib$r_fid_overlay; variant_union {) unsigned short int fib$w_did [3]; variant_struct {- unsigned short int fib$w_did_num;- unsigned short int fib$w_did_seq; variant_union {1 unsigned short int fib$w_did_rvn;! variant_struct {0 unsigned char fib$b_did_rvn;0 unsigned char fib$b_did_nmx;+ } fib$r_did_rvn_fields;( } fib$r_did_rvn_overlay; } fib$r_did_fields; } fib$r_did_overlay; unsigned long int fib$l_wcc; variant_union {' unsigned short int fib$w_nmctl; variant_struct {) unsigned fibdef$$_fill_7 : 3;& unsigned fib$v_allver : 1;& unsigned fib$v_alltyp : 1;& unsigned fib$v_allnam : 1;) unsigned fibdef$$_fill_8 : 2;$ unsigned fib$v_wild : 1;& unsigned fib$v_newver : 1;) unsigned fib$v_supersede : 1;' unsigned fib$v_findfid : 1;) unsigned fibdef$$_fill_9 : 2;& unsigned fib$v_lowver : 1;' unsigned fib$v_highver : 1; } fib$r_nmctl_bits; } fib$r_nmctl_overlay; variant_union {' unsigned short int fib$w_exctl; variant_struct {% unsigned fib$v_alcon : 1;& unsigned fib$v_alconb : 1;& unsigned fib$v_filcon : 1;% unsigned fib$v_aldef : 1;( unsigned fib$v_allocatr : 1;* unsigned fibdef$$_fill_10 : 2;& unsigned fib$v_extend : 1;% unsigned fib$v_trunc : 1;( unsigned fib$v_nohdrext : 1;' unsigned fib$v_markbad : 1;* unsigned fibdef$$_fill_11 : 4;( unsigned fib$v_nocharge : 1; } fib$r_exctl_bits; } fib$r_exctl_overlay;! unsigned long int fib$l_exsz;" unsigned long int fib$l_exvbn; variant_union {# unsigned char fib$b_alopts; variant_struct {% unsigned fib$v_exact : 1;% unsigned fib$v_oncyl : 1;& unsigned fib$v_fill_2 : 6; } fib$r_alopts_bits; } fib$r_alopts_overlay; unsigned char fib$b_alalign; variant_union {+ unsigned short int fib$w_alloc [5]; variant_struct { variant_union {5 unsigned short int fib$w_loc_fid [3];! variant_struct {5 unsigned short int fib$w_loc_num;5 unsigned short int fib$w_loc_seq;$ variant_union {9 unsigned short int fib$w_loc_rvn;) variant_struct {8 unsigned char fib$b_loc_rvn;8 unsigned char fib$b_loc_nmx;3 } fib$r_loc_rvn_fields;0 } fib$r_loc_rvn_overlay;+ } fib$r_loc_fid_fields;( } fib$r_loc_fid_overlay;- unsigned long int fib$l_loc_addr;! } fib$r_alloc_fields; } fib$r_alloc_overlay;& unsigned short int fib$w_verlimit;# unsigned char fib$b_agent_mode; char fibdef$$_fill_12;# unsigned long int fib$l_aclctx;' unsigned long int fib$l_acl_status; variant_union {' unsigned long int fib$l_status; variant_struct {' unsigned fib$v_alt_req : 1;+ unsigned fib$v_alt_granted : 1;& unsigned fib$v_diracl : 1;) unsigned fib$v_propagate : 1;& unsigned fib$v_fill_3 : 4; } fib$r_status_bits; } fib$r_status_overlay;' unsigned long int fib$l_alt_access; } ;#define FIB$C_REWINDVOL 1#define FIB$C_POSEND 2#define FIB$C_NEXTVOL 3#define FIB$C_SPACE 4#define FIB$C_ILLEGAL 5#define FIB$C_REWINDFIL 6#define FIB$C_LOCK_VOL 7#define FIB$C_UNLK_VOL 8 #define FIB$C_ENA_QUOTA 9#define FIB$C_DSA_QUOTA 10#define FIB$C_ADD_QUOTA 11#define FIB$C_EXA_QUOTA 12#define FIB$C_MOD_QUOTA 13#define FIB$C_REM_QUOTA 14#define FIB$C_USEREOT 15#define FIB$C_REMAP 16#define FIB$C_CLSEREXCP 17#define FIB$C_FLUSH_CACHE 18#define FIB$K_MTALEN 28#define FIB$C_MTALEN 28e l r y#define FIB$C_FID_CACHE 1p#define FIB$C_EXTENT_CACHE 2#define FIB$C_QUOTA_CACHE 3u  t #define FIB$M_ALL_MEM 1s#define FIB$M_ALL_GRP 2i#define FIB$M_MOD_USE 48#define FIB$M_MOD_PERM 8#define FIB$M_MOD_OVER 16 struct fibdef1 { char fibdef$$_fill_14 [22];6' unsigned short int fib$w_cntrlfunc;_  f variant_union {) unsigned long int fib$l_cntrlval;E variant_struct {R' unsigned fib$v_all_mem : 1;f' unsigned fib$v_all_grp : 1;R' unsigned fib$v_mod_use : 1;1( unsigned fib$v_mod_perm : 1;( unsigned fib$v_mod_over : 1;& unsigned fib$v_fill_4 : 3;" } fib$r_cntrlval_bits;! } fib$r_cntrlval_overlay;  } ;n*[DPMSYS.ACL_FIND.BUILD]FID.C;1+,w_fid[0];! Fib.fib$w_fid[1]=fid->w_fid[1];! Fib.fib$w_fid[2]=fid->w_fid[2]; A /* Use the IO$_ACCESS function to return info about the file */K status = sys$qiow(0,*channel,IO$_ACCESS,&iosb,0,0,&FibDesc,0,0,0,&Atr,0);$ if (!(status & 1)) return(status);   ACL_SCRUB.BCKfi_r_fab.fab$l_stv,IO$_ACCESS,> &iosb,0,0,&fibdesc,0,0,0,&atr,0); */M status = sys$qiow(0,chan,IO$_ACCESS,&iosb,0,0,&fibdesc,0,0,0,&atr,0);* if ((status & 1) && (iosb[0] & 1)) fh2 = blockaddr; }; for (i=0;i<3;i++)# fib.fib$w_fid[i] = ofid[i];' fib.fib$l_acctl = FIB$M_NORECORD;J status = sys$qiow(0,chan,IO$_DEACCESS,&iosb,0,0,&fibdesc,0,0,0,0,0); }; return(fh2); }; /* get the header */ if (fid[0]) {( /* see if it is already mapped in */- blocknum = fid[0] + context->fi_l_recoff;) if ((blocknum > context->fi_l_offset)C &(blocknum < context->fi_l_offset+context->fi_l_pagcnt+1)) {4 /* the header is already mapped into memory */- addr = blocknum - context->fi_l_offset;- addr = addr*512 + context->fi_l_begadr; j=1; for (i=0;i<3;i++)J if ((fid[i] != (struct fh2 *)addr->fh2$w_fid[i]) && (fid[i] != 0)) j=0; if (j) fh2 = addr; else fh2 = 0; } else { fh2 = 0;4 /* need to read the right block into memory */A status = read_section_block(&context,&blocknum,&blockaddr); if (status & 1) fh2 = blockaddr; }; } else fh2 = 0;H /* if cached and we found a header, and the header fid isn't set to */8 /* zero, then get the real (possibly cached) header */J /* these conditions should be met if they specified a FILE_ID search */+ if (cached && fh2 && fh2->fh2$w_fid[0]) { if (blockaddr == 0) {- status = lib$get_vm(&block,&blockaddr);# if (!(status & 1)) return(0); };" atr[0].atr$l_addr = blockaddr; for (i=0;i<3;i++)) fib.fib$w_fid[i]=fh2->fh2$w_fid[i];C /* Use the IO$_ACCESS function to return info about the file */I status = sys$qiow(0,chan,IO$_ACCESS,&iosb,0,0,&fibdesc,0,0,0,&atr,0);& if ((status & 1) && (iosb[0] & 1)) fh2 = blockaddr; else fh2 = 0; }; return(fh2);}'*[DPMSYS.ACL_FIND.BUILD]GET_HEADER.OBJ;1+,q?./ 4 -:0123KPWO56_DӒ7}Ӓ89GHJ7 GET_HEADERV1.0 3-NOV-1989 15:21VAX C V3.0-031PHP KP P^UPլ ЬRb ЬR18eeߥ LIB$GET_VMPPeTS޼R>bQ> Pa`QPSߥP|~H|~߭22~ SYS$QIOWP eT1P|S޼R>bQ> Pa`QPSЏ0|~|~H|~߭r~2~ SYS$QIOWPHDS޼R>bQ> Pa`QPSߥP|~H|~߭22~ SYS$QIOWPeTS޼R>bQ> Pa`QPSЏ |~|~H|~߭42~ SYS$QIOWT  ACL_SCRUB.BCKq?:'[DPMSYS.ACL_FIND.BUILD]GET_HEADER.OBJ;1PެY12SЬ RSЭPЬ VЦQTPQTQ RRSPRSTTTSTBQPxR GET_HEADER get_header g CC$RMS_FAB CC$RMS_NAM CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRMREAD_SECTION_BLOCKSYS$QIOW LIB$GET_VM  GET_HEADER$CODE`$DATA PPfPTWXiV>fR>S2bQQ> Pa`QPRߥP|~H|~߭22~ SYS$QIOWP eSPSSP!*[DPMSYS.ACL_FIND.BUILD]HM2DEF.H;1+,?$./ 4G6-:0123KPWO56`Fc<7Ӓ89GHJ F/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */#define HM2$C_LEVEL1 257#define HM2$C_LEVEL2 512#define HM2$M_READCHECK 1#define HM2$M_WRITCHECK 2#define HM2$M_ERASE 4!#define HM2$M_NOHIGHWATER 8"#define HM2$M_CLASS_PROT 16#define HM2$S_HM2DEF 512#define HM2$S_CREDATE 8#define HM2$S_RETAINMIN 8#define HM2$S_RETAINMAX 8#define HM2$S_REVDATE 8#define HM2$S_MIN_CLASS 20#define HM2$S_MAX_CLASS 20#define HM2$S_STRUCNAME 12#define HM2$S_VOLNAME 12#define HM2$S_OWNERNAME 12#define HM2$S_FORMAT 12,#define DATE {unsigned : 32; unsigned : 32;} struct hm2def {" unsigned long int hm2$l_homelbn;$ unsigned long int hm2$l_alhomelbn;$ unsigned long int hm2$l_altidxlbn; variant_union {& unsigned short int hm2$w_struclev; variant_struct {# unsigned char hm2$b_strucver;# unsigned char hm2$b_struclev;" } hm2$dummy_w_struclev_struct; } hm2$dummy_w_struclev_union;# unsigned short int hm2$w_cluster;# unsigned short int hm2$w_homevbn;% unsigned short int hm2$w_alhomevbn;% unsigned short int hm2$w_altidxvbn;$ unsigned short int hm2$w_ibmapvbn;# unsigned long int hm2$l_ibmaplbn;# unsigned long int hm2$l_maxfiles;% unsigned short int hm2$w_ibmapsize;$ unsigned short int hm2$w_resfiles;# unsigned short int hm2$w_devtype; unsigned short int hm2$w_rvn;$ unsigned short int hm2$w_setcount; variant_union {% unsigned short int hm2$w_volchar; variant_struct {# unsigned hm2$v_readcheck : 1;# unsigned hm2$v_writcheck : 1; unsigned hm2$v_erase : 1;% unsigned hm2$v_nohighwater : 1;$ unsigned hm2$v_class_prot : 1;! } hm2$dummy_w_volchar_struct; } hm2$dummy_w_volchar_union;# unsigned long int hm2$l_volowner;# unsigned long int hm2$l_sec_mask;# unsigned short int hm2$w_protect;$ unsigned short int hm2$w_fileprot;# unsigned short int hm2$w_recprot;% unsigned short int hm2$w_checksum1; struct DATE hm2$q_credate; unsigned char hm2$b_window; unsigned char hm2$b_lru_lim;" unsigned short int hm2$w_extend; struct DATE hm2$q_retainmin; struct DATE hm2$q_retainmax; struct DATE hm2$q_revdate;1 unsigned char hm2$r_min_class[HM2$S_MIN_CLASS];1 unsigned char hm2$r_max_class[HM2$S_MAX_CLASS]; unsigned char hm2$fill_0[320];$ unsigned long int hm2$l_serialnum;1 unsigned char hm2$t_strucname[HM2$S_STRUCNAME];- unsigned char hm2$t_volname[HM2$S_VOLNAME];1 unsigned char hm2$t_ownername[HM2$S_OWNERNAME];+ unsigned char hm2$t_format[HM2$S_FORMAT]; unsigned char hm2$fill_1[2];% unsigned short int hm2$w_checksum2;}; *[DPMSYS.ACL_FIND.BUILD]IODEF.H;1+,*?./ 4GN-:0123KPWO56Sj<7̓Ӓ89GHJ F/* This header file was created by Joe Meadows, and is not copyrightedF in any way. No guarantee is made as to the accuracy of the contentsG of this header file. This header file was last modified on Sep. 8th, 1987. */#define IO$_NOP 0#define IO$_UNLOAD 1#define IO$_LOADMCODE 1#define IO$_SEEK 2#define IO$_SPACEFILE 2#define IO$_STARTMPROC 2#define IO$_RECAL 3#define IO$_STOP 3#define IO$_DRVCLR 4#define IO$_INITIALIZE 4#define IO$_RELEASE 5#define IO$_SETCLOCKP 5#define IO$_OFFSET 6#define IO$_ERASETAPE 6#define IO$_STARTDATAP 6#define IO$_RETCENTER 7#define IO$_QSTOP 7#define IO$_PACKACK 8#define IO$_SEARCH 9#define IO$_SPACERECORD 9#define IO$_READRCT 9#define IO$_WRITECHECK 10#define IO$_WRITEPBLK 11#define IO$_READPBLK 12#define IO$_WRITEHEAD 13#define IO$_RDSTATS 13#define IO$_CRESHAD 13#define IO$_READHEAD 14#define IO$_ADDSHAD 14#define IO$_WRITETRACKD 15#define IO$_COPYSHAD 15#define IO$_READTRACKD 16#define IO$_REMSHAD 16#define IO$_AVAILABLE 17#define IO$_SETPRFPATH 18#define IO$_DSE 21#define IO$_REREADN 22#define IO$_REREADP 23#define IO$_WRITERET 24#define IO$_WRITECHECKH 24#define IO$_READPRESET 25#define IO$_STARTSPNDL 25#define IO$_SETCHAR 26#define IO$_SENSECHAR 27#define IO$_WRITEMARK 28#define IO$_WRTTMKR 29#define IO$_DIAGNOSE 29#define IO$_SHADMV 29#define IO$_FORMAT 30#define IO$_CLEAN 30#define IO$_PHYSICAL 31#define IO$_WRITELBLK 32#define IO$_READLBLK 33#define IO$_REWINDOFF 34#define IO$_SETMODE 35#define IO$_REWIND 36#define IO$_SKIPFILE 37#define IO$_SKIPRECORD 38#define IO$_SENSEMODE 39#define IO$_WRITEOF 40#define IO$_TTY_PORT 41#define IO$_LOGICAL 47#define IO$_WRITEVBLK 48#define IO$_READVBLK 49#define IO$_ACCESS 50#define IO$_CREATE 51#define IO$_DEACCESS 52#define IO$_DELETE 53#define IO$_MODIFY 54#define IO$_NETCONTROL 54#define IO$_READPROMPT 55#define IO$_SETCLOCK 55#define IO$_ACPCONTROL 56#define IO$_STARTDATA 56#define IO$_MOUNT 57#define IO$_TTYREADALL 58#define IO$_TTYREADPALL 59#define IO$_CONINTREAD 60#define IO$_CONINTWRITE 61#define IO$_VIRTUAL 63#define IO$M_FCODE 63#define IO$M_FMODIFIERS 65472#define IO$M_INHERLOG 2048#define IO$M_ERASE 1024#define IO$M_ENCRYPT 8192#define IO$M_DATACHECK 16384#define IO$M_INHRETRY 32768#define IO$M_INHSEEK 4096#define IO$M_REVERSE 64#define IO$M_NOWAIT 128#define IO$M_INHEXTGAP 4096#define IO$M_MSCPMODIFS 256#define IO$M_SHADOW 64#define IO$M_LOCATE 128#define IO$M_ALLHOSTS 64#define IO$M_DISSOLVE 128#define IO$M_NOCLEANUP 256#define IO$M_SPINDOWN 64#define IO$M_FORCEPATH 64#define IO$M_COMMOD 64#define IO$M_MOVETRACK  ACL_SCRUB.BCK*?: [DPMSYS.ACL_FIND.BUILD]IODEF.H;11.FOR;1GD 128#define IO$M_DIAGNOSTIC 256#define IO$M_SKPSECINH 512#define IO$M_DELDATA 64#define IO$M_NOMRSP 64#define IO$M_SWAP 256#define IO$M_OPPOSITE 512#define IO$M_CLSEREXCP 512#define IO$M_ACCESS 64#define IO$M_CREATE 128#define IO$M_DELETE 256#define IO$M_MOUNT 512#define IO$M_DMOUNT 1024#define IO$M_REMOUNT 2048#define IO$M_BINARY 64#define IO$M_PACKED 128#define IO$M_NOW 64#define IO$M_READATTN 128#define IO$M_WRTATTN 256#define IO$M_SETPROT 512#define IO$M_NORSWAIT 1024#define IO$M_NOECHO 64#define IO$M_TIMED 128#define IO$M_CVTLOW 256#define IO$M_NOFILTR 512#define IO$M_DSABLMBX 1024#define IO$M_PURGE 2048#define IO$M_TRMNOECHO 4096#define IO$M_REFRESH 8192#define IO$M_ESCAPE 16384#define IO$M_EXTEND 32768#define IO$M_CANCTRLO 64#define IO$M_ENABLMBX 128#define IO$M_NOFORMAT 256#define IO$M_BREAKTHRU 512#define IO$M_NEWLINE 1024#define IO$M_TYPEAHDCNT 64#define IO$M_MAINT 64#define IO$M_CTRLYAST 128#define IO$M_CTRLCAST 256#define IO$M_HANGUP 512#define IO$M_OUTBAND 1024#define IO$M_TT_CONNECT 2048#define IO$M_TT_DISCON 4096#define IO$M_TT_PROCESS 8192#define IO$M_BRDCST 16384#define IO$M_LOOP 128#define IO$M_UNLOOP 256#define IO$M_LINE_OFF 512#define IO$M_SET_MODEM 1024#define IO$M_LINE_ON 2048#define IO$M_LOOP_EXT 4096#define IO$M_AUTXOF_ENA 8192#define IO$M_AUTXOF_DIS 16384#define IO$M_INCLUDE 2048#define IO$M_TT_ABORT 4096#define IO$M_INTERRUPT 64#define IO$M_ABORT 256#define IO$M_SYNCH 512#define IO$M_STARTUP 64#define IO$M_SHUTDOWN 128#define IO$M_ATTNAST 256#define IO$M_CTRL 512#define IO$M_RD_MEM 64#define IO$M_RD_MODEM 128#define IO$M_RD_COUNT 256#define IO$M_CLR_COUNT 1024#define IO$K_SRRUNOUT 0#define IO$K_PTPBSC 8192#define IO$K_LOOPTEST 57344#define IO$M_MORE 64#define IO$M_QUALIFIED 128#define IO$M_REDIRECT 64#define IO$M_ACCEPT 128#define IO$M_SETEVF 64#define IO$M_WORD 64#define IO$M_SETFNCT 512#define IO$M_DATAPATH 1024#define IO$M_CYCLE 4096#define IO$M_RESET 8192#define IO$M_SETCUADR 256#define IO$M_SETBSIZE 512#define IO$M_SETPOOLSZ 1024#define IO$M_SETENQCNT 2048#define IO$M_CLEAR 4096#define IO$M_LPBEXT 8192#define IO$M_LPBINT 16384#define IO$M_READCSR 32768#define IO$M_NOCTSWAIT 64#define IO$M_SLAVLOOP 128#define IO$M_NODSRWAIT 256#define IO$M_MAINTLOOP 512#define IO$M_LASTBLOCK 1024#define IO$M_INTCLOCK 4096#define IO$S_IODEF 2#define IO$S_FCODE 6#define IO$V_FCODE 0#define IO$S_FMODIFIERS 10#define IO$V_FMODIFIERS 6#define IO$V_INHERLOG 11#define IO$V_ERASE 10#define IO$V_ENCRYPT 13#define IO$V_DATACHECK 14#define IO$V_INHRETRY 15#define IO$V_INHSEEK 12#define IO$V_REVERSE 6#define IO$V_NOWAIT 7#define IO$V_INHEXTGAP 12#define IO$V_MSCPMODIFS 8#define IO$V_SHADOW 6#define IO$V_LOCATE 7#define IO$V_ALLHOSTS 6#define IO$V_DISSOLVE 7#define IO$V_NOCLEANUP 8#define IO$V_SPINDOWN 6#define IO$V_FORCEPATH 6#define IO$V_COMMOD 6#define IO$V_MOVETRACKD 7#define IO$V_DIAGNOSTIC 8#define IO$V_SKPSECINH 9#define IO$V_DELDATA 6#define IO$V_NOMRSP 6#define IO$V_SWAP 8#define IO$V_OPPOSITE 9#define IO$V_CLSEREXCP 9#define IO$V_ACCESS 6#define IO$V_CREATE 7#define IO$V_DELETE 8#define IO$V_MOUNT 9#define IO$V_DMOUNT 10#define IO$V_REMOUNT 11#define IO$V_BINARY 6#define IO$V_PACKED 7#define IO$V_NOW 6#define IO$V_READATTN 7#define IO$V_WRTATTN 8#define IO$V_SETPROT 9#define IO$V_NORSWAIT 10#define IO$V_NOECHO 6#define IO$V_TIMED 7#define IO$V_CVTLOW 8#define IO$V_NOFILTR 9#define IO$V_DSABLMBX 10#define IO$V_PURGE 11#define IO$V_TRMNOECHO 12#define IO$V_REFRESH 13#define IO$V_ESCAPE 14#define IO$V_EXTEND 15#define IO$V_CANCTRLO 6#define IO$V_ENABLMBX 7#define IO$V_NOFORMAT 8#define IO$V_BREAKTHRU 9#define IO$V_NEWLINE 10#define IO$V_TYPEAHDCNT 6#define IO$V_MAINT 6#define IO$V_CTRLYAST 7#define IO$V_CTRLCAST 8#define IO$V_HANGUP 9#define IO$V_OUTBAND 10#define IO$V_TT_CONNECT 11#define IO$V_TT_DISCON 12#define IO$V_TT_PROCESS 13#define IO$V_BRDCST 14#define IO$V_LOOP 7#define IO$V_UNLOOP 8#define IO$V_LINE_OFF 9#define IO$V_SET_MODEM 10#define IO$V_LINE_ON 11#define IO$V_LOOP_EXT 12#define IO$V_AUTXOF_ENA 13#define IO$V_AUTXOF_DIS 14#define IO$V_INCLUDE 11#define IO$V_TT_ABORT 12#define IO$V_INTERRUPT 6#define IO$V_ABORT 8#define IO$V_SYNCH 9#define IO$V_STARTUP 6#define IO$V_SHUTDOWN 7T#define IO$V_ATTNAST 8 #define IO$V_CTRL 9c#define IO$V_RD_MEM 6N#define IO$V_RD_MODEM 7h#define IO$V_RD_COUNT 8#define IO$V_CLR_COUNT 10#define IO$V_MORE 6i#define IO$V_QUALIFIED 7*#define IO$V_REDIRECT 6f#define IO$V_ACCEPT 7f#define IO$V_SETEVF 6f#define IO$V_WORD 6f#define IO$V_SETFNCT 9f#define IO$V_DATAPATH 10#define IO$V_CYCLE 12#define IO$V_RESET 13#define IO$V_SETCUADR 8f#define IO$V_SETBSIZE 9f#define IO$V_SETPOOLSZ 10#define IO$V_SETENQCNT 11#define IO$V_CLEAR 12#define IO$V_LPBEXT 13#define IO$V_LPBINT 14#define IO$V_READCSR 15#define IO$V_NOCTSWAIT 6f#define IO$V_SLAVLOOP 7f#define IO$V_NODSRWAIT 8f#define IO$V_MAINTLOOP 9f#define IO$V_LASTBLOCK 10#define IO$V_INTCLOCK 12&*[DPMSYS.ACL_FIND.BUILD]MAKEFILE.MKE;25+,??8./ 4V-:0123KPWO566Ĉ?7`SXӒ89GHJ COM_OPTS = #/debug/noopt LINK_OPTS =#/debugVacl_scrub.exe: acl_scrub.obj section.obj freptecnt.obj search.obj getdvi.obj cli.obj \@ fid.obj get_header.obj parse_uic.obj display.obj delete_acl.objV link $(LINK_OPTS) /exec=acl_scrub.exe acl_scrub,freptecnt,getdvi,search,section,fid,\8 cli,get_header,parse_uic,display,delete_acl,c_opts/optdelete_acl.obj: delete_acl.for for $(COM_OPTS) delete_acl.foracl_scrub.obj: acl_scrub.c cc $(COM_OPTS) acl_scrub.cfreptecnt.obj: freptecnt.c cc $(COM_OPTS) freptecnt.csection.obj: section.c cc $(COM_OPTS) section.c.c.obj: cc $(COM_OPTS) $* .for.obj: for $(COM_OPTS) $*&*[DPMSYS.ACL_FIND.BUILD]PARSE_UIC.MAR;1+, i./ 47n-:0123KPWO56j<7@Ӓ89GHJ  ACL_SCRUB.BCK i:&[DPMSYS.ACL_FIND.BUILD]PARSE_UIC.MAR;17$tpadef tparse_init: .long tpa$k_count0) .long tpa$m_blanks!tpa$m_abbrevtparse: .blkb tpa$k_length0 ' $init_state uic_stb,uic_ktb $state! $tran tpa$_ident,,,,uic $state" $tran tpa$_eos,tpa$_exit $end_state uic: .long ) .entry parse_uic,^m ! ; initialize tparse block7 movc5 #8,tparse_init,#0,#tpa$k_length0,tparse * ; set the tparse block string info movl 4(ap),r0+ movzwl (r0),tparse+tpa$l_stringcnt, movl 4(r0),tparse+tpa$l_stringptr  ; call lib$tparse pushab uic_ktb pushab uic_stb pushab tparse calls #3,g^lib$tparse  movl uic,@8(ap) ret .end&*[DPMSYS.ACL_FIND.BUILD]PARSE_UIC.OBJ;1+,s?./ 4`-:0123KPWO56Ӓ7`*Ӓ89GHJ0.MAIN.0 3-NOV-1989 15:21 VAX MACRO V5.0-8MAC PARSE_UIC  .MAIN.2 LIB$TPARSE UIC_KTB UIC_STB . ABS .c . BLANK .P$ABS$PQ$ _LIB$STATE$P _LIB$KEY0$P _LIB$KEY1$^P,PPP,PPP,PPPE,44,PPP,PP,P< 0< PARSE_UIC&@,$ЬP<`Р͟ LIB$TPARSEЯ̼0 PARSE_UIC` . BLANK .c _LIB$STATE$  _LIB$KEY0$ _LIB$KEY1$!*[DPMSYS.ACL_FIND.BUILD]SEARCH.C;3+,~=9. / 4y -:0123KPWO 56@TO7`rӒ89GHJ/* Modification History --------------------5 Sep. 8, 1987 JEM - Conversion from BETA to Release*/#include climsgdef#include "fh2def.h"#include "fi2def.h"#include "fm2def.h"#include "fileinfo.h"#include "acedef.h"-#include "searchdef.h" /* includes descrip */#include "cld.h"char *get_header();long int init_search(search) struct search_info *search;{H static struct dsc$descriptor minstr={0,DSC$K_DTYPE_T,DSC$K_CLASS_D,0};H static struct dsc$descriptor maxstr={0,DSC$K_DTYPE_T,DSC$K_CLASS_D,0}; static long int word = 2; static long int byte = 1; long int i,j,status,value; char *c; search->si_l_srchbits0 = 0; search->si_l_srchbits1 = 0;# if (cli_present(t_aclexists) & 1) search->si_v_aclexists = 1;' if (cli_present(t_aclcontains) & 1) { i = -1;5 while ((cli_get_value(t_aclcontains,&minstr) & 1). && ((++i)si_l_acl_id_list[++i] = 0;! search->si_v_aclcontains = 1; }; return(1);}P/******************************************************************************/P/* */P/******************************************************************************/6long int search_header(search,fh2,context,cached,chan) struct search_info *search; struct fh2def *fh2; struct FileInfo *context; int cached; short int chan;{: static char namebuff[FI2$S_FILENAME+FI2$S_FILENAMEXT];' static struct dsc$descriptor name =/ {0,DSC$K_DTYPE_T,DSC$K_CLASS_S,namebuff}; struct fh2def *exthdr; struct fi2def *fi2; struct fm2def *fm2,*fm2adr; short int nxtfid[3];> long int fm2offset=0,lbn=0,count=0,totextents=0,tothdrs=0; long int block; long int i,j,k,min,max; long status;# static short int and_match = 0;2 short int lbn_found,placement_found,acl_found; struct acedef *acaddr; long int *idaddr;K if (fh2->fh2$w_seg_num != 0) return(0); /* skip extention headers */# if (search->si_v_aclcontains) { acl_found = 0; exthdr = fh2;M while (exthdr && (exthdr->fh2$b_acoffset < exthdr->fh2$b_rsoffset)) {A acaddr = (char *)exthdr + exthdr->fh2$b_acoffset * 2;K while ((acaddr < ((char *)exthdr + (exthdr->fh2$b_rsoffset*2)))2 && (acaddr->ace$b_size != 0)) {W if (acaddr->ace$b_type == ACE$C_KEYID) { /* search through the ace */y i = -1; /* figure out how many id's are in this ace */e j = acaddr->ace$b_size - (4 * acaddr->ace$v_reserved); /* position to first id */O idaddr = (char *)acaddr + 8 + (4 * acaddr->ace$v_reserved);P while ((search->si_l_acl_id_list[++i] != 0) && !acl_found) {+ for (k=0;ksi_l_acl_id_list[i]) {. acl_found = 1; }U ++idaddr; /* increment to point to next longword */ }; }; };^ acaddr = (char *)acaddr + acaddr->ace$b_size; /* move forward to next ace */ };F exthdr = get_header(exthdr->fh2$w_ext_fid,exthdr->fh2$w_fid,3 context,cached,chan); };0 if (acl_found && ! and_match) return(1);0 if (and_match && ! acl_found) return(0); };};int present(s) struct dsc$descriptor *s;{ int status; status = cli$present(s); if (status & 1) return(1);) if (status == CLI$_NEGATED) return(-1); return(0);}#*[DPMSYS.ACL_FIND.BUILD]SEARCH.OBJ;1+,g?. / 4  -:0123KPWO 56`CXӒ7FeӒ89GHJ  ACL_SCRUB.BCKg?:#[DPMSYS.ACL_FIND.BUILD]SEARCH.OBJ;1BJ;1 H3SEARCHV1.0 3-NOV-1989 15:20VAX C V3.0-031PTypePPUndefinedPPFixedPPVariablePPVFC P"PStreamP")PLFStreamP)2PCRStreamP2;POrganizationP;HPSequentialPHSPRelativePS\PIndexedP\dPDirect PdkPAttributesPkvPFortranCCPvPImpliedCC PPPrintCC PPSpan PPCharacteristics PPACL_Corrupt PPBackupPPBest_Try_ContiguousPPChargePPContiguousPPDirectoryPPErase_On_DeletePPFile_CorruptPPLockedPPMarked_For_DeleteP PSpoolP &PRead_VerifyP&2PWrite_BackP2=PWrite_VerifyP=JPJournalPJRPJournalPRZPAIJnlPZ`PATJnlP`fPBIJnlPflPRUJnl PlrPNever_RU!Pr{POnly_RU"P{PAccess_Mode#PPUSER$PPSUPERVISOR$PPEXECUTIVE$PPKERNEL$ PPPlacement%PPExact&PPOn_Cylinder'PPRelative_Volume_Number(PPLBN_Specified)PPProtection*PPProtection.set+P PProtection.clear,P PSYSTEM-P#POWNER-P#)PGROUP-P)/PWORLD- P/5PRWED.P5:PWED.P:>PRED.P>BPED. PBEPRWD.PEIPWD.PILPRD.PLOPD.POQPRWE. PQUPWE.$PUXPRE.(PX[PE.,P[]PRW.0P]`PW.4P`bPR.8PbdePCreation_Date/PesPRevision_Date0PsPExpiration_Date1PPBackup_Date2PPNumber_Of_Revisions3PPVFC_Size4PPRecord_Size5PPMaximum_Record_Size6PPUsed7PPFirst_Free_Byte8PPAllocated9PPDefault_Extend_Quantity:PPBucket_Size;PPGlobal_Buffer_Count<P1PVersion_Limit=P1?PExtents>P?GPHeaders?PGOPLBN@POSPOwner_UICAPS]PFile_IDBP]ePDirectory_File_IDCPewPHighwater_MarkDPwPActive_Recovery_UnitsEPPWasted_BlocksFPPNameGPPFullnameHPPDisplayIPPACLJPPACEKPP PPPInvalid Identifer/UIC %.*s pPP^KVUTެWgRbԢJ CLI_PRESENTPf CLI_PRESENTPdRdf CLI_GET_VALUEPDRR(=SBUd PARSE_UICPݤ unsigned short int si_w_backlink[SI_K_BACKLINK_LIST_SIZE+1];5 long int si_l_acl_id_list[SI_K_ACL_ID_LIST_SIZE+1];& struct dsc$descriptor si_t_filename;};"*[DPMSYS.ACL_FIND.BUILD]SECTION.C;1+,=. / 4L j-:0123KPWO 563ak<7CӒ89GHJ/* Modification History --------------------5 Sep. 8, 1987 JEM - Conversion from BETA to Release */#include descrip#include iodef#include ssdef#include secdef #include "FileInfo.h" Hlong int map_section(Filename,Defaultname,PageCount,Offset,Flag,context)I/* This routines maps a file into memory. If no context has been set thenH it allocates a FileInfo structure, and opens the necessary file. OnceK the file has been opened the Filename, Default name, and Flag parameters are ignored. ' Filename = Name of file to be opened2 Defaultname = Default name of file to be opened9 PageCount = number of pages to try to read into memoryD Offset = VBN of the file to start reading from (1 is first block)3 Flag = Flag specifies attributes about the file:( bit 0 = File is opened for write' bit 1 = File may be appended toJ context = Pointer to a FileInfo structure. Initialize it to zero before@ the first call to MapSection, don't touch it after that. */" struct dsc$descriptor *Filename;% struct dsc$descriptor *Defaultname; long int *PageCount; long int *Offset; long int *Flag; struct FileInfo **context;{ long int Status,TmpStatus; long int MapFlag=0; long int RetAdr[2],DeltAdr[2]; long int i;  if (*context==0) {L /* This is a first call, we need to allocate space, init the FAB etc. */: Status = LIB$GET_VM(&sizeof(struct FileInfo),context);& if (!(Status & 1  ACL_SCRUB.BCK=:"[DPMSYS.ACL_FIND.BUILD]SECTION.C;1AR;1L p)) return(Status); " (*context)->fi_l_flag = *Flag; (*context)->fi_l_begadr=0; (*context)->fi_l_endadr=0;& (*context)->fi_r_fab = cc$rms_fab;& (*context)->fi_r_nam = cc$rms_nam;, (*context)->fi_r_xabfhc = cc$rms_xabfhc;- (*context)->fi_r_fab.fab$l_fop=FAB$M_UFO;- (*context)->fi_r_fab.fab$b_fac=FAB$M_GET;; (*context)->fi_r_fab.fab$l_fna=Filename->dsc$a_pointer;: (*context)->fi_r_fab.fab$b_fns=Filename->dsc$w_length;> (*context)->fi_r_fab.fab$l_dna=Defaultname->dsc$a_pointer;= (*context)->fi_r_fab.fab$b_dns=Defaultname->dsc$w_length;< (*context)->fi_r_fab.fab$l_nam = &(**context).fi_r_nam ;? (*context)->fi_r_fab.fab$l_xab = &(**context).fi_r_xabfhc ;  if ((*context)->fi_m_write)2 (*context)->fi_r_fab.fab$b_fac |= FAB$M_PUT; + Status=SYS$OPEN(&(*context)->fi_r_fab);& if (!(Status & 1)) return(Status); : /* use the xabfhc to find out the end of file block */@ (*context)->fi_l_filsiz = (*context)->fi_r_xabfhc.xab$l_ebk;/ if ((*context)->fi_r_xabfhc.xab$w_ffb == 0) --(*context)->fi_l_filsiz; I MapFlag = SEC$M_EXPREG; /* first time we definitely need to expand */ };  if (*Offset==0) *Offset=1; 7 if ((*Offset+*PageCount-1)>(*context)->fi_l_filsiz) {? /* they asked for more pages then there are in the file! */" if ((*context)->fi_m_append) {! /* okay, extend the file */J /* Extend by (*Offset+*PageCount-1)-(*context)->fi_l_filsiz bytes */1 /* and update (*context)->fi_l_filsiz += */" /* for now, it's a no-op. */ } else5 *PageCount=(*context)->fi_l_filsiz - *Offset + 1; };  if ((*context)->fi_m_write) MapFlag |= SEC$M_WRT; D Status=SYS$CRMPSC(&(*context)->fi_l_begadr,RetAdr,0,MapFlag,0,0,0,L (*context)->fi_r_fab.fab$l_stv,*PageCount,*Offset,0,0); ? /* see if we lost a chunk while remapping, if so deltva it */, if ((*context)->fi_l_endadr > RetAdr[1]) {K /* Hmm, the old end was larger than the new end, so deltva the diff */ DeltAdr[0] = RetAdr[1]+1;) DeltAdr[1] = (*context)->fi_l_endadr;( TmpStatus = SYS$DELTVA(DeltAdr,0,0);, if (!(TmpStatus & 1)) return(TmpStatus); };& (*context)->fi_l_begadr = RetAdr[0];& (*context)->fi_l_endadr = RetAdr[1]; " i = (RetAdr[1]-RetAdr[0]+1)/512;* if ((i < *PageCount) || (*PageCount==0)) *PageCount = i;' (*context)->fi_l_pagcnt = *PageCount;$ (*context)->fi_l_offset = *Offset;  return(Status);} long int delete_section(context) struct FileInfo **context;{ long int Status; 4 Status = SYS$DELTVA(&(*context)->fi_l_begadr,0,0);$ if (!(Status & 1)) return(Status); 6 Status = SYS$DASSGN((**context).fi_r_fab.fab$l_stv);$ if (!(Status & 1)) return(Status); 9 Status = LIB$FREE_VM(&sizeof(struct FileInfo),context); *context = 0;  return(Status);} 8long int read_section_block (context,blocknum,blockaddr) struct FileInfo **context; long int *blocknum; long int **blockaddr;{ static long int block=512; long int iosb[2]; long int Status;  if (*blockaddr==0) {? /* they didn't specify where to read the block to, so we'll. allocate a block and read into there */* Status = LIB$GET_VM(&block,blockaddr);& if (!(Status & 1)) return(Status); }; B Status = SYS$QIOW(0,(*context)->fi_r_fab.fab$l_stv,IO$_READVBLK,? iosb,0,0,*blockaddr,block,*blocknum,0,0,0); if (Status & 1) Status = iosb[0]; return(Status);}$*[DPMSYS.ACL_FIND.BUILD]SECTION.OBJ;1+,d?)./ 4 -:0123KPWO56>Ӓ7KӒ89GHJ4SECTIONV1.0 3-NOV-1989 15:19VAX C V3.0-031PP^WЬRb1R<߭ LIB$GET_VMPЬVfSм$ԶfRԢfR(P CC$RMS_FAB(fR(` CC$RMS_NAMxfR(, CC$RMS_XABFHCfRЏ,fR>fRЬSУTfRc\fRЬSУXfRc]fRxPfRLfS$>fR(SYS$OPENPЬScR cS<Rף ЏWЬUeeЬ VefTTмST $ e RRfЬTdS$W|~ݼݼ ݣ4|~W߭c SYS$CRMPSCPUdRѢdRТ|~߭ SYS$DELTVAPЬRЭbRЭíSSƏSЬ RSbbSbЬTdSм dRSECTION map_sectiondelete_sectionP read_section_block[   CC$RMS_FAB CC$RMS_NAM CC$RMS_XABALL CC$RMS_XABDAT CC$RMS_XABFHC CC$RMS_XABKEY CC$RMS_XABPRO CC$RMS_XABRDT CC$RMS_XABSUM CC$RMS_XABTRM SYS$DELTVA SYS$CRMPSCSYS$OPEN LIB$GET_VM LIB$FREE_VM SYS$DASSGN SYS$DELTVASYS$QIOW LIB$GET_VM MAP_SECTION DELETE_SECTION READ_SECTION_BLOCKg$CODE$DATASмUP^|~޼P߰ SYS$DELTVAPQPQPмPݠ4 SYS$DASSGNPQPQPЬRR<߭ LIB$FREE_VMb ^Ь P`P LIB$GET_VMPQPQP|~ݼݼ |~߭1мPݠ4 SYS$QIOWPQPЭQQP