Kbase 13535: R-code CRCs and Procedure Integrity
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
R-code CRCs and Procedure Integrity
R-code CRC's and Procedure Integrity
PROGRESS Version 7 introduced r-code CRC, which is different
from database CRC. When PROGRESS compiles a procedure, it
calculates a special CRC based on the procedure name and code
content, and stores it in the r-code. This r-code CRC
is useful to ensure the integrity and security of PROGRESS
procedures, especially for schema triggers.
To find out what the CRC value is in the r-code, you can run
the following program. This was taken from page 819 of the
Language Reference Manual.
r-rcode.p
DEFINE VARIABLE rcode-file AS CHARACTER FORMAT "x(60)"
LABEL "File".
REPEAT:
SET rcode-file WITH FRAME rc-info.
RCODE-INFO:FILE-NAME = rcode-file.
DISPLAY RCODE-INFO:CRC-VALUE LABEL "CRC"
RCODE-INFO:LANGUAGES FORMAT "x(60)" LABEL
"Languages"
WITH FRAME rc-info SIDE-LABELS TITLE "R-code
Check".
END.
This is the output from the above program:
R-codeCheck
File: ref_call.p
CRC: 30,009
Languages: <unnamed>
The file ref_call in the Sports database has a CREATE
schema trigger. The file the CREATE trigger executes
is called ref_call.p. The CRC value in the r-code is
30009.
Next, run the following program against the metaschema:
FOR EACH _File-Trig.
DISPLAY _Event _Proc-Name _Override _Trig-CRC.
Event Proc-Name Override Trig-Crc
------ -------------------------------- -------- --------
CREATE sports/crinv.p no ?
DELETE sports/delinv.p no ?
CREATE sports/crcust.p no ?
DELETE sports/delcust.p no ?
WRITE sports/wrcust.p no ?
CREATE sports/critem.p no ?
WRITE sports/writem.p no ?
CREATE sports/crord.p no ?
CREATE sports/crordl.p no ?
DELETE sports/delordl.p no ?
WRITE sports/wrordl.p no ?
CREATE ref_call.p no 30009
As you can see, the crc value stored in the r-code is
30009 and this matches the r-code value stored in the
_Trig-Crc in the _File-Trig file.
Progress Software Technical Support Note # 13535