[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference smurf::dec_mls_plus

Title:dec_mls_plus
Moderator:SMURF::BAT
Created:Mon Nov 29 1993
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:534
Total number of notes:2544

452.0. "TCalling mand_import_endodings twice?" by NETRIX::"jm@uvo.dec.com" (John McNulty) Wed Feb 19 1997 11:01

A customer has the following problem:

They want to translate a security label from one system (A) to another
system  (B). In order to do this they are using the mand_import_encodings
function to invoke the  encodings file from system A.  They then translate
the security label for  system A, converting it into a bit pattern, and at
this point need to take the bit pattern and then pass it as a parameter to
the alternative encodings file.  But in order to do this they first need to
invoke the alternative encoding file, again using the mand_import_encodings
function.  However, the second call to mand_import_encodings is ignored. 

What's the trick to make this work?

If this explanation isn't sufficient, I should be able to get a code segment
from the customer so you can see what they're up to.

John
------------------------------------------------------------------------------

Email: jm@uvo.dec.com                            John McNulty
Tel: (44) 1256 373862                            UK CSC, Unix Support Group
DTN: 833-3862                                    Digital Equipment Corporation


[Posted by WWW Notes gateway]
T.RTitleUserPersonal
Name
DateLines
452.1mand_init works just once.SMURF::BATSegui la tua beatitudineFri Feb 21 1997 15:1123
    It appears that once you call mand_init, that's it (see mandlib.c).
    
    restore uses mand_import_encodings in a forked subprocess in order to
    translate the labels on the files on a tape into the labels on the
    system into which you are importing the files.  (dump writes a copy of
    the Encodings file onto the archive with the files, then restore reads
    that copy into the current directory and forks a subprocess to start
    the conversion of IR to ER using the dumped Encodings and then lookup
    the ER in the receiving system's Encodings).  Note that the parent
    starts up the child before doing the mand_init.  The child does the
    mand_import_encodings and then the parent does it's mand_init.
    
    Mike also suggests that you could have two processes, one which does
    the lookup on system A and then passes the parameters to the process
    that does the alternative encodings file lookup.
    
    We were both rather confused about the bit about conversion into a "bit
    pattern" -- do you mean the IR?  So we may have been misunderstanding
    what they are doing.
    
    At any rate, if you want to give them the example in restore, I don't
    see any problem with that -- usr/sbin/dump/dump_sec.c -- I don't think
    they'll need more than that.
452.2On the button..NETRIX::"jm@uvo.dec.com"John McNultyFri Feb 21 1997 15:5718
> We were both rather confused about the bit about conversion into a "bit
> pattern" -- do you mean the IR?  So we may have been misunderstanding
> what they are doing.

No you didn't misunderstand, they are talking about the IR.

Thanks for the dump/restore example, that helps explain the coding
approach they should be using here. They are trying to do all this
using just the one process and clearly they can't.  

I'll pass this back to the customer and if there are any further
issues then I'll post another reply.

Thanks :-)

John

[Posted by WWW Notes gateway]