frisco
October 24th, 2002, 19:01
anyone care to do some in-depth explaining of mount_portal?

i can get tcp to work with it, but can't figure out exec'ing stuff. the docs on this stuff seems really limited, but the potential seems great. i found this- http://wuarchive.wustl.edu/mirrors/NetBSD/NetBSD-current/src/sbin/mount_portal/examples/ but netbsd has a much more advanced mount_portal than openbsd and freebsd and so those examples dont have exec among them.

if anyone can provide an overview of any security issues involved with mount_portal, that'd be great too.


if you dont know what mount_portal is... it lets you access processes/tcp sockets like files. for example:
% cat /p/tcp/192.168.1.2/daytime
Thu Oct 24 17:42:44 2002

though the actual command run is 'cat', mount_portal ties the file /p/tcp/192.168.1.2/daytime to the tcp daytime socket on 192.168.1.2 and reads from it.

i'd like to be able to do something like this:
% cat /p/lynx/www.screamingelectron.org

and have it automatically run 'lynx -dump www.screamingelectron.org'.

right now i have the following in my portal.conf:
lynx/ exec lynx/ lynx -dump %s
and i get this errror:
cat: /p/lynx/www.screamingelectron.org: Exec format error

any ideas as to how to fix this?


i'd also like to use mount_portal to make 2 or more files appear as one.

thanks in advance.

bsdjunkie
October 25th, 2002, 16:04
Ive never actually heard of this feature b4 now... Ill look into it tonite and see what i can find though. :roll:

elmore
October 26th, 2002, 03:53
I as well have never used this feature, Although this sounds super wicked, I'm on it. Hopefully we'll be able to put our heads together and figure something out. Perhaps |MiN0N| has used this or knows about it.

|MiNi0n|
October 30th, 2002, 13:14
Perhaps |MiN0N| has used this or knows about it.

Nope! :roll:

bsdjunkie
October 30th, 2002, 14:45
Actually found a use for it that makes since on a NetBSD dreamcast FAQ site...

7.1 How do I send files to the Dreamcast if it's not mounted over NFS? (top)

The simplest solution for those running NetBSD or similar is to use the portal filesystem as follows:

# mkdir /p
# mount_portal /usr/share/examples/mount_portal/tcp.1.conf /p
Now that the portal filesystem is mounted cat can be employed to send a file to the console:

# cat filename > /p/tcp/dreamcast/port
Where `filename' is the file to send, `dreamcast' is the IP address of the console and `port' is the port number to send the file to. An example of sending a kernel called `bsd' to a Dreamcast with an IP address of 192.168.0.128 which is running the IP upload slave (which listens on port 4711) would be:

# cat bsd > /p/tcp/192.168.0.128/4711


:roll: