[comp.unix.ultrix] Need help with mh *and* mail on RISC/Ultrix 4.1

smw@alcor.concordia.ca ( Steven Winikoff ) (05/14/91)

I'm having two separate problems, one with mh and one with 
/usr/ucb/mail.  Both occur regularly under Ultrix 4.1 on a
DECsystem 5500 and on a DECstation 2100.

First, mh:  I have *not* configured mh in any way. We're running the
standard vanilla flavour of mh that comes with the 4.1 unsupported
subsets.  Whenever I try to perform a shell escape under vi as 
called from the "comp" command, it fails with the message

    "csh: Permission denied"

(This occurs with the vi shell escape syntax of ":!cmd".  For whatever
reason, when invoked as "!!cmd", things work as they should!)

This behaviour is independent of the nature of the command.  I've
tried shell builtins, I've tried relative paths, absolute paths, I've
even tried using /bin/sh and /local/bin/tcsh instead of /bin/csh.

What's going on????


With /usr/ucb/mail, one of our users is trying to save his outgoing
mail.  "No problem", you say.  All he has to do is

   set record=~/some_file

in his .mailrc, right?  That's what I thought too.  That's what the
man page says he *should* be able to do.  Can he do it?  Nope.  All
that he gets for his pains is the message

   "is a directory"

It doesn't even attempt to explain just what it thinks is a 
directory, and it certainly doesn't explain why it thinks that.

This is decidedly unfriendly.

If anyone has any ideas about what's happening here, *please* let
me know!  

Thanks a lot,

   Steven

------------------------------------------------------------------------
Steven Winikoff                                 smw@antares.concordia.ca
Software Analyst
Dept. of Computing services
Concordia University                            voice: (514) 848-7619
Montreal, Quebec, Canada                               (10:00-18:00 EST)  

barrett@jhunix.HCF.JHU.EDU (Dan Barrett) (05/14/91)

In article <smw.674163539@alcor> smw@alcor.concordia.ca ( Steven Winikoff ) writes:
>Whenever I try to perform a shell escape under vi as 
>called from the "comp" command, it fails with the message
>    "csh: Permission denied"

	I have seen this behavior in several of our editors (JOVE, vi) when
"comp" was not involved, so I do not believe that it is an MH problem.

	The problem disappeared completely when I made /bin/sh my editor's
default shell.  I believe that there is a bug in csh that causes this
problem.

                                                        Dan

 //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
| Dan Barrett, Department of Computer Science      Johns Hopkins University |
| INTERNET:   barrett@cs.jhu.edu           |                                |
| COMPUSERVE: >internet:barrett@cs.jhu.edu | UUCP:   barrett@jhunix.UUCP    |
 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////

mwp@ubeaut.enet.dec.com (Michael Paddon) (05/20/91)

From article <8370@jhunix.HCF.JHU.EDU>, by barrett@jhunix.HCF.JHU.EDU (Dan Barrett):
>>Whenever I try to perform a shell escape under vi as 
>>called from the "comp" command, it fails with the message
>>    "csh: Permission denied"
> 
> 	I have seen this behavior in several of our editors (JOVE, vi) when
> "comp" was not involved, so I do not believe that it is an MH problem.
> 
> 	The problem disappeared completely when I made /bin/sh my editor's
> default shell.  I believe that there is a bug in csh that causes this
> problem.

No. The problem is that the relevant MH commands are setgid to kmem
(presumably so they can look at /dev/kmem, god only knows why). It is
a feature of csh that it will barf if you try and run it with set[gu]id
without using the -b flag. This stops a well known security hole.

The fix is to either trash the setgid bits, or even better, get the latest
release of MH and use that instead.

					Michael

Disclaimer: My views may or may not be those of my employer.

-------------------------------------------------------------------
|                     |     Internet: mwp@ubeaut.enet.dec.com     |
|   Michael Paddon    |     ACSnet:   mwp@munnari.oz.au           |
|                     |     Voice:    +61 3 895 9392              |
-------------------------------------------------------------------

jch@hollie.rdg.dec.com (John Haxby) (05/21/91)

In article <1991May20.010735.10221@ubeaut.enet.dec.com>, mwp@ubeaut.enet.dec.com (Michael Paddon) writes:
!> The fix is to either trash the setgid bits, or even better, get the latest
|> release of MH and use that instead.

If you blow away the setgid bits on the MH commands, they
won't work.  The horrible hack that required them has been
removed in 4.2, and 4.2 comes with MH6.7.1 which is
the latest.....
-- 
John Haxby, Definitively Wrong.
Digital				<jch@wessex.rdg.dec.com>
Reading, England		<...!ukc!wessex!jch>

----------------------------------------------------------------
The opinions expressed herein are my own, not my employers.