Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Patch for Elm 2.4.23 under OSF/1 (DEC Alpha)
@ 1994-07-14 15:30 Greg Pratt
  1994-07-14 20:48 ` Torbj|rn Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Pratt @ 1994-07-14 15:30 UTC (permalink / raw)


I've no idea if a patch for Elm 2.4.23 under DEC's OSF/1 has been posted
yet, but I'll post this for all interested parties nonetheless.

Those of you who use Elm on an Alpha may notice that you sometimes get
strange mailbox ownership errors when you exit from Elm.  This appears to
be caused by Elm not thinking that chown(2) works like its BSD cousins.
When Elm tries to change the protections on the mailbox files, the chown()
call will fail, and the error will chain back up until a visible error
message is produced by the program.  This does not affect Elm's
functionality, but it is annoying.

The patch is fairly simple.  Chmod the file src/fileio.c to 600 (it's set
to 400 by default, I believe), and change line 468 as follows:

    468c468
    < #ifdef        BSD
    ---
    > #if (defined(BSD) || (defined(__osf__) && defined(__alpha)))

The above patch presumes that you'll be using DEC's C compiler; I have not
tested it with gcc.  I'm also assuming this will work on versions of OSF/1
older than 2.0 (which is what I'm using).

Note that I've compiled Elm to run non-setgid on my system.  (I'm not even
sure that in this case it makes a big difference.)

The above patch causes the behavior of chown() to be viewed as the same as
under a BSD system; that is, you must be root to change the owner of the
file, or (more importantly) you must be a member of the group to which you
are trying to change the file's group.  If this is he way chown() on your
system works, Elm does the chown (via elm_chown()) but ignores the return
status.

I'll send this off to the Elm development group.  If they thin it's a sane
patch, hopefully it will end up in the next patchlevel release of Elm 2.4.

-- 
Gregory Pratt                        Rochester Institute of Technology
Systems Programmer Assistant         103 Lomb Memorial Drive
Information Systems & Computing      Rochester, NY  14623-5608


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch for Elm 2.4.23 under OSF/1 (DEC Alpha)
  1994-07-14 15:30 Patch for Elm 2.4.23 under OSF/1 (DEC Alpha) Greg Pratt
@ 1994-07-14 20:48 ` Torbj|rn Lindgren
  1994-07-15 13:37   ` Phil Benchoff
  0 siblings, 1 reply; 4+ messages in thread
From: Torbj|rn Lindgren @ 1994-07-14 20:48 UTC (permalink / raw)


In article <1994Jul14.153046.19720@ultb.isc.rit.edu>,
Greg Pratt <glp5941@burn.isc.rit.edu> wrote:
>The patch is fairly simple.  Chmod the file src/fileio.c to 600 (it's set
>to 400 by default, I believe), and change line 468 as follows:

Another possibility is to answer yes on the query about setgid mail
(since the mail-file has the group this is probably correct, even if
the permission of the mail-directory means that you don't have to
answer yes) and answer *no* to the question about switching between
real and effective group id (using setgid).

When I answered this way it stopped making noise about 'Problem
restoring permissions'. Since mail-files has the group mailthe
question about setgid really should be answered with yes. The other
question is a bit harder to check (the manpage doesn't tell whether
setgid can switch back to a old group).

>The above patch presumes that you'll be using DEC's C compiler; I have not
>tested it with gcc.  I'm also assuming this will work on versions of OSF/1
>older than 2.0 (which is what I'm using).

My elm is compiled with DEC's cc under OSF/1 2.0 without any patches
to elm. 

>Note that I've compiled Elm to run non-setgid on my system.  (I'm not even
>sure that in this case it makes a big difference.)
[...]
>are trying to change the file's group.  If this is he way chown() on your
>system works, Elm does the chown (via elm_chown()) but ignores the return
>status.

Since the mail-files has the group 'mail' elm must be setgid mail to
have a chance to change the group back to 'mail'.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch for Elm 2.4.23 under OSF/1 (DEC Alpha)
  1994-07-14 20:48 ` Torbj|rn Lindgren
@ 1994-07-15 13:37   ` Phil Benchoff
  1994-07-21 13:50     ` Phil Benchoff
  0 siblings, 1 reply; 4+ messages in thread
From: Phil Benchoff @ 1994-07-15 13:37 UTC (permalink / raw)


Torbj|rn Lindgren (tl@cd.chalmers.se) wrote:

: My elm is compiled with DEC's cc under OSF/1 2.0 without any patches
: to elm. 

If I have  "alternatives=" set in my elmrc, I get a bunch of errors like
Unaligned access pid=8827 <elm> va=140028834 pc=12003cda0 ra=12003cd9c type=stq
Unaligned access pid=8827 <elm> va=14002886c pc=12003cddc ra=12003cdd8 type=stq
Unaligned access pid=8827 <elm> va=140028834 pc=12003cde0 ra=12003cdd8 type=stq
Unaligned access pid=8827 <elm> va=140028834 pc=12003cd34 ra=12003c200 type=ldq
Unaligned access pid=8827 <elm> va=140028834 pc=12003cd3c ra=12003c200 type=ldq
Unaligned access pid=8827 <elm> va=14002886c pc=12003cd44 ra=12003c200 type=ldq

I RTFMed a bit and found the -migrate -assume noaligned_objects flags for
cc, installed the subset you need for that, and recompiled.  Now ld can't
find functions called _Ots* (like _OtsDivide64Unsigned).  I have libots.a
and libots.so, but these don't seem to have the missing functions.
I ran the executable anyway, and I got several of the Unaligned access
messages before it died looking for one of the missing functions.

Does anyone else have this problem?  How about a fix?

Phil



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Patch for Elm 2.4.23 under OSF/1 (DEC Alpha)
  1994-07-15 13:37   ` Phil Benchoff
@ 1994-07-21 13:50     ` Phil Benchoff
  0 siblings, 0 replies; 4+ messages in thread
From: Phil Benchoff @ 1994-07-21 13:50 UTC (permalink / raw)


Phil Benchoff (benchoff@groupw.cns.vt.edu) wrote:

: If I have  "alternatives=" set in my elmrc, I get a bunch of errors like
: Unaligned access pid=8827 <elm> va=140028834 pc=12003cda0 ra=12003cd9c type=stq

I have found the problem.  pmalloc() in pmalloc.c allocates storage on
4-byte boundaries.  I changed it to 8 and the problem is gone.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1994-07-21 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-07-14 15:30 Patch for Elm 2.4.23 under OSF/1 (DEC Alpha) Greg Pratt
1994-07-14 20:48 ` Torbj|rn Lindgren
1994-07-15 13:37   ` Phil Benchoff
1994-07-21 13:50     ` Phil Benchoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox