From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,feb2bd81a4f1e912 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-02-07 23:28:58 PST Path: gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!sdd.hp.com!think.com!paperboy.osf.org!bubba.osf.org!jec From: jec@bubba.osf.org (Jonathan Chinitz) Newsgroups: comp.unix.osf.misc Subject: Re: Per-connection info in DCE RPC server? Date: 8 Feb 1994 07:28:58 GMT Organization: IntelliSoft Corp. Message-ID: <2j7evq$agg@paperboy.osf.org> References: NNTP-Posting-Host: bubba.osf.org In article daniels@biles.com (Brad Daniels) writes: >We have an application which we want to be able to run either with or without >security services. In order to simplify implementation, we'd like to keep >a table of per-user customization information, and look up that information >inside our server function each time it is called. That way, we can establish >user contexts using either the security services or a voluntary non-secure >identification scheme, then do the lookups the same in either case. The only >problem is, we can't determine what would be a good key to use for the lookup. >Is the binding handle coming in to the server routine unique to each client, >or is it just the same as the binding handles on the clients' side (all of >which should be the same)? > >How is this situation usually handled? This is a perfect example for the use of a context handle. The semantics of a ch are such that each client rpc is assigend a uuid (on the server side) which is stuffed inside the (opaque to you) ch the first time that the client calls the server. During this 1st rpc you load whatever user data you need and setup per user structures. You have to tie the per-user data to the ch (easy - it is a void *). Whenever any subsequent rpc comes in for that client (which you will make with the ch as the binding handle) the runtime assigns the right per-user stuff to your context handle on the server side. You need to write a context rundown procedure to tear down the context. Ther is more in the DCE App Dev Guide (don't have it in front of me at the moment). -- ------------------------------------------------------------------------------- Jonathan Chinitz E-mail: jec@isoft.com IntelliSoft Corp. Distributed Computing Solutions P.O. Box 2645 Tel.: 508-635-9070 Acton, MA 01720 Fax: 508-635-9210