Re: CM KSAM Question/Problem - Hewlett Packard

This is a discussion on Re: CM KSAM Question/Problem - Hewlett Packard ; I have a CM KSAM file that gets encrypted. I save all the attributes of the file in user labels in the encrypted file so that when the file is decrypted the original file attributes are restored giving the impression ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: CM KSAM Question/Problem

  1. Re: CM KSAM Question/Problem

    I have a CM KSAM file that gets encrypted. I save all the attributes
    of the file in user labels in the encrypted file so that when the file is
    decrypted the original file attributes are restored giving the impression
    the file was never touched.

    It works great, does it all with the greatest of ease.....

    Except for one thing.....

    I use the intrinsic "FGETKEYINFO" to get the ksamparam data for the "FOPEN."
    The KSAM param info is stored in the user labels. No problem.

    However, the KSAM Control info gets lost because although it is gettable it is
    not puttable (that I know of).

    There are AIF's to work on KSAMXL files but not CM KSAM files.


    I would like to know how I can put the original KSAM control info back into
    the decrypted file.

    Any help is appreciated,

    TIA
    Brian.


    On Mon, 29 Oct 2007 19:04:23 -0400, Brian Donaldson
    wrote:

    >Here's the solution for posterity, the Smithsonian etc.....
    >
    ><<
    >
    >Just write as you would to any file with no other user labels. You willnot
    >overwrite the hidden one, and your numbers will be exactly as if that label
    >didn't exist. That label is truly transparent, except for the fact thatlistf,5

    told
    >you about its existence.
    >
    >Steve
    >
    >
    >
    >Steve:
    >
    >Thanks for the info. However, if I have to write labels to this KSAM file how

    do
    >I know
    >I won't overwrite the label already put there by KSAMUTIL ? Which user label
    >would
    >I do the fwritelabel to (zero, 1,2,3, ?)
    >
    >Thanks,
    >Brian.
    >
    >
    >
    >On Mon, 29 Oct 2007 17:59:13 -0400, Brian Donaldson
    > wrote:
    >
    >>I built this CM KSAM file named "KSAMFILE" via KSAMUTIL
    >>
    >>BUILD KSAMFILE;REC=-
    >>256,,F,ASCII;DISC=5001;KEY=B,1,10,,RDUP;KEY=B,12,1 4,,RDUP;KEY=B,27,13

    ,,
    >R
    >>DUP;KEY=B,40,11,,RDUP;KEY=B,51,12,,RDUP;KEY=B,65,1 1,,RDUP;KEY=B,77,1

    3,
    >,
    >>RDUP;KEY=B,91,14,,RDUP;KEY=B,105,18,,RDUP;KEY=B,12 5,11,,RDUP;KEY=B,1

    3
    >9
    >>,14,,RDUP;KEY=B,155,11,,RDUP;KEY=B,167,21,,RDUP;KE Y,B,191,18,,RDUP;KE

    Y
    >=
    >>B,212,12,,RDUP;KEY=B,232,21,,RDUP;FIRSTREC=1;LABEL S=0;KEYFILE=KSAM

    FI
    >L
    >>K
    >>
    >>
    >>The file was built ok, no problem..... so...
    >>
    >>At the colon prompt I did a listf KSAM@,-5 to look at all the attribs of the

    file
    >>and its keyfile
    >>
    >> LISTF KSAM@,-5
    >>
    >>FILE: KSAMFILE.PUB.DEV FILE CODE : 0 FOPTIONS:
    >>ASCII,FIXED,NOCCTL,KSAM BLK FACTOR: 1 CREATOR : MGR.DEV REC SIZE:

    >256
    >>(BYTES) LOCKWORD: BLK SIZE: 256(BYTES) SECURITY--READ : ANY EXT
    >>SIZE: 0(SECT) WRITE : ANY NUM REC: 0 APPEND : ANY NUM SEC: 640

    >LOCK :
    >>ANY NUM EXT: 1 EXECUTE : ANY MAX REC: 5001 **SECURITY IS ON

    FLAGS :
    >>NO ACCESSORS NUM LABELS: 1 CREATED : MON, OCT 29, 2007, 2:13 PM

    >MAX
    >>LABELS: 1 MODIFIED: MON, OCT 29, 2007, 2:13 PM DISC DEV #: 4

    >ACCESSED:
    >>MON, OCT 29, 2007, 2:13 PM SEC OFFSET: 256 LABEL ADDR:
    >>$00000061.$0008F120 VOLCLASS : MPEXL_SYSTEM_VOLUME_SETISC
    >>
    >>FILE: KSAMFILK.PUB.DEV FILE CODE : 1080 FOPTIONS:
    >>BINARY,FIXED,NOCCTL,KSAM BLK FACTOR: 1 CREATOR : MGR.DEV REC

    SIZE:
    >>256(BYTES) LOCKWORD: BLK SIZE: 256(BYTES) SECURITY--READ : ANY

    EXT
    >>SIZE: 1817(SECT) WRITE : ANY NUM REC: 14530 APPEND : ANY NUM SEC:
    >>14544 LOCK : ANY NUM EXT: 1 EXECUTE : ANY MAX REC: 14530

    **SECURITY
    >>IS ON MAX EXT: 8 FLAGS : NO ACCESSORS NUM LABELS: 0 CREATED :

    MON,
    >>OCT 29, 2007, 2:13 PM MAX LABELS: 0 MODIFIED: MON, OCT 29, 2007,

    2:13
    >>PM DISC DEV #: 4 ACCESSED: MON, OCT 29, 2007, 2:13 PM SEC OFFSET: 0
    >>LABEL ADDR: $00000061.$00092420 VOLCLASS :
    >>MPEXL_SYSTEM_VOLUME_SETISC
    >>
    >>
    >>It looked ok until I saw that the NUM LABELS and MAX LABELS both = 1

    >(huh?)
    >>I built the file with labels=0, so can anyone tell me why KSAMUTIL made

    >these
    >>label counts=1 ?
    >>
    >>I wrote a quickie program to read this label but the FREADLABEL intrinsic
    >>bombs with C-C > 0 (A label was referenced beyond the label written on the
    >>file) -- I started reading at label zero and read all the way thru to label 254.
    >>It's telling me there is no label to be read?
    >>
    >>Any help would be appreciated.
    >>
    >>TIA, Brian Donaldson.
    >>
    >>* To join/leave the list, search archives, change list settings, *
    >>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

    >
    >* To join/leave the list, search archives, change list settings, *
    >* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


  2. Re: CM KSAM Question/Problem

    Re:
    > There are AIF's to work on KSAMXL files but not CM KSAM files.
    >
    > I would like to know how I can put the original KSAM control info back into
    > the decrypted file.


    I.e, you want us to help design your product for you

    Well...I'd look at creating an output CM KSAM file with some
    dummy key information. Then, I'd simply put the correct (saved)
    userlabels into the file. To do that, I'd investigate: FWRITELABEL
    (perhaps opening the file in COPY mode), and/or privileged virtual
    address moves (being sure to post the data to disk properly).

    I'd also give some thought to using STORE/RESTORE to disk behind
    the user's back (depends upon performance characteristics/requirements).
    (e.g., store the CM KSAM file and key file to disk, encrypt that,
    and move it into where the CM KSAM file was)

    Stan

    --
    Stan Sieler
    sieler@allegro.com
    www.allegro.com/sieler/wanted/index.html

    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


+ Reply to Thread