HP3000-L Archives

January 1997, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Chris Breemer <[log in to unmask]>
Reply To:
Chris Breemer <[log in to unmask]>
Date:
Fri, 24 Jan 1997 10:37:35 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (71 lines)
Craig Fairchild wrote:
>
> There are probably two problems that you are having. First, there is nothing
> intrinsically special about the name "ldev30". The reason you're getting a disk
> file with this name is because the shell just interprets the string "ldev30" as
> a file name. If a file by this name doesn't already exist, then it will create
> one for you. Your intent was to talk to the real logical device 30 and to do
> that you need a device file, just like you do in UNIX. To do this you use the
> mknod command:
>
>   $mknod /dev/ldev30 c 0 30
>
> To create a device file for any logical device on MPE/iX, specify the device
> file name (you'll need to create the /dev directory if it doesn't already
> exist) then use the "c" option to specify that it is a character special file,
> and finally use a major number of 0 and a minor number of the desired ldev.
>
> Once this file is created you can attempt your echo command:
>
>   $echo "Hi Bob" > /dev/ldev30
>
> This may still fail if another session has the ldev 30 device opened already.
> MPE device security rules stipulate that if another job or session has opened a
> non-sharable device (such as a terminal) then only processes belonging to that
> job or session can reopen that device. This prevents rogue processes from
> blasting messages on VPLUS screens, or issuing reads against a terminal and
> stealing data.
>

Good to know you can create terminal device files, I was not aware of that (the MPE
mknod(1) man page is not very helpful).

But again we're back to square one: you can only write to your OWN terminal, or to
a terminal that's not being logged in. In a X-windows environment where I use vt3k
or telnet to log on to the HP3000, each window is always in use, because the emulator
terminates as soon as I log off. So I can't have access to a terminal device that is
not in use by MPE. Are there emulators/protocols that do *not* drop the connection
when you log out (i.e. just sit there displaying the MPE/iX: prompt) ? That would at
least be a (partial) solution.

> If your echo command still fails because another session is logged onto the
> terminal, log off the terminal and it should work.

Yes, and then my window disappears (see above) ... Unless you have a DTS-connected
dumb char terminal next to your workstation this is not an option (the console isn't
either).
>
> Hope this helps,
> Craig
>
Well, frankly, not a lot (at least not for me), but thanks for the reply !

While at it, can we create a /dev/null sink that can be used for input as well as output ?
I don't like to use $NULL in shell scripts.

> P.S. Did you know that being able to send messages like your example was at one
> time a huge security hole on UNIX? It basically allowed very clever users to
> send messages to the terminals of superusers, and those messages were then
> executed as commands from the superuser's session. Because of MPE's device
> security rules (and a few other helpful security attributes), we were never in
> jeapordy from this type of attack. Just FYI.

Yup, in the dark dim days of UNIX there was lots wrong with it ;-) But that's why
UNIX was (and is) FUN ! At least you can do most anything you want, given the right
permissions, which is more than can be said about MPE - even with POSIX.

Best regards,

        Chris Breemer
        Compuware Europe B.V.

ATOM RSS1 RSS2