From: SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM" 26-APR-1994 09:32:07.26 To: EVERHART CC: Subj: RE: ACL entry for across-decnet account problem X-Newsgroups: comp.os.vms From: tillman@swdev.si.com (Brian Tillman) Subject: RE: ACL entry for across-decnet account problem Message-ID: <25APR94.09245199@swdev.si.com> Sender: news@esseye.si.com Nntp-Posting-Host: terwed.si.com Organization: Smiths Industries Aerospace & Defense Date: Mon, 25 Apr 1994 09:24:51 GMT Lines: 50 To: Info-VAX@CRVAX.SRI.COM X-Gateway-Source-Info: USENET In a previous article, vaxs09@v7.vitro.com wrote: > >While this response may be strictly true, it is misleading. SYS$REM_ID >and SYS$REM_NODE are not a reliable indication of the remote user and >node initiating the _current_ DECnet file access request. The problem >is that SYS$REM_NODE and SYS$REM_ID are set when the DECnet server process >is first created. If the same server process is re-used to satisfy a >subsequent connect request from a different user or a different node, >those logical names will remain unchanged. I just checked and, under >[OPEN]VMS/AXP 1.5, server processes can be re-used in exactly this way >and the logical names are not refreshed with current information. (In >any case, the DECnet account's login procedure would not be re-invoked). >To the best of my knowledge, this situation exists in all versions of >VMS since the SYS$REM_NODE logical was introduced. > >A more reliable way to get remote node information is to modify NETSERVER.COM >or FAL.COM in SYS$SYSTEM and have it parse the remote node information >out of the SYS$NET logical name. And here's an example of that, in DCL: $! $! Obtain the client's execution node name, the remote requesting node name, $! and the remote username $! $ node = f$getsyi( "nodename" ) $ gosub parsencb .. $! $ parsencb: $! $! Parse the Network Control Block to obtain the remote node and user. We do $! this because SYS$REM_NODE can be inaccurate when network servers are $! reusable. $! $ sys$net = f$trnlnm( "sys$net" ) $ flag = f$locate( "::", sys$net ) $ slash = f$locate( "/", sys$net ) $! $ source_node = f$extract( 0, flag, sys$net ) $ source_user = f$edit( f$extract( flag+5, slash-flag-5, sys$net ), "trim" ) $ link_number = f$cvui( 0, 16, f$extract( slash+1, 2, sys$net ) ) $ return -----------------------------+-------------------------------- Brian Tillman | Internet: tillman@swdev.si.com Smiths Industries, Inc. | tillman_brian@si.com 4141 Eastern Ave., MS129 | Hey, I said this stuff myself. Grand Rapids, MI 49518-8727 | My company has no part in it. -----------------------------+--------------------------------