🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1733

Re: Ports and the net name server

#1733
From: andrew
Date: Sun, 04 Oct 1992 20:54
49 lines
3164 bytes
In article <1ai1udINNl94@news.aero.org> strauss@Aero.org (Daryll Strauss) writes:
>I've got a few questions about mach/next ports and their interactions
>with the netname server, that I'm hoping someone out there in netland
>can help me with. I want to make sure I'm not missing something obvious.
>
>First, is there a way to store "persistent" information about a port
>other than through the net name server? For example, I have an
>application that wants to set up a private port and pass that along to
>other applications (probably via the other applications publicly
>registered port) Is there some set of information that it can pass to a
>second application so that the second application can write the
>information to disk, exit, be restarted some time later, reread the
>information off the disk and establish a connection to that private
>port? I get the impression that the answer is no. Ports and access
>rights are stored in the kernel and when the application quits they are
>gone forever. Is that correct?
>
>Second, is there a way to ask the net name server for all the registered
>ports that it knows about? Again, I think the answer is no. You have to
>know the port you are asking for in advance. This provides a potential
>solution to my first question. If my private port is registered with the
>net name server with a randomly generated name, then it can pass that
>randomly generated name to the other applications and they can use that
>to reestablish the connection. That all works if I can be sure that
>someone can't query the net name server and find my random name.
>
>Finally, is there is a way to request all the ports on the local net
>that match a certain name? Using the "*" parameter to one of the net
>name lookup routines will give me one port (the first to answer the
>broadcast request I would guess) Is there a form that gives me all the
>ports that answer? If not, why not? Are the broadcasts unreliable? Is
>there a better way?

I think what you are trying to do is setup a port that can only be
used by 'authorized' apps.  I would just make the port public, but use
some sort of higher level authentication on top of it.  So the first
message on the port by an app would include a credentials structure
which you would check along with it's task_self() (or thread_self()).
Then you would associate each app with it's task port.  So when the
app sends subsequent messages, it only needs to include it's task port
and won't have to be authenticated again.


andrew
-- 
andrew@cubetech.com     | "We shall not cease from exploration
Andrew Loewenstern      |  And the end of our exploring
Cube Technologies, Inc. |  Will be to arrive where we started
                        |  And know the place for the first time." -T.S. Eliot
Technical Details
Message-ID: <1992Oct4.205437.1185@cubetech.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!cubetech.com!imladris!andrew
References: <1ai1udINNl94@news.aero.org>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!cubetech.com!imladris!andrew
From: andrew@cubetech.com
Subject: Re: Ports and the net name server
Message-ID: <1992Oct4.205437.1185@cubetech.com>
Organization: Cube Technologies, Inc.
References: <1ai1udINNl94@news.aero.org>
Date: Sun, 4 Oct 1992 20:54:37 GMT
Lines: 49