[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#4658: elm incorrectly sets mail folders to mode 0600 upon exitting



Package: elm
Version: 2.4pl25-2

elm changes permissions on mail folders incorrectly when the mail folder is
nfs mounted from a non-linux box. The mode is changed from 0660 to 0600, which
prevents the mail daemon on the remote system from properly accessing the mail
folder. This may be a more general case of /var/spool/mail and /tmp being on
separate partitions, and requiring the mail folder to be copied upon exitting
from elm. For some reason, elm does not restore the permissions on a mail
folder which has been copied when quitting. I hacked the elm code with the
patch below to fix the problem at my site, but I doubt that my fix should be
used as a general fix. My first thought is that the sense of the if statement
needs to be reversed [ if (need_to_copy) { ], but I may be wrong.

--- elm-2.4pl25.orig/src/leavembox.c    Sun Mar 26 16:27:24 1995
+++ elm-2.4pl25/src/leavembox.c Mon Sep 30 21:54:36 1996
@@ -845,14 +845,18 @@
         * tracking down what it points to.
         */
 
+#if 0
        if (!need_to_copy) {
+#endif
          if(restore_file_stats(cur_folder) != 1) {
            error1(catgets(elm_msg_cat, ElmSet,
            ElmLeaveProblemsRestoringPerms,
                  "Problems restoring permissions of folder %s!"),
                  cur_folder);
            if (sleepmsg > 0)
                sleep(sleepmsg);
          }
+#if 0
        }
+#endif
 
 #if defined(BSD) && !defined(UTIMBUF)
        utime_buffer[0]     = buf.st_atime;


-- 
Scott Barker
Linux Consultant
scott@galileo.cuug.ab.ca
http://www.cuug.ab.ca:8001/~barkers/   (under construction)

[ I try to reply to all e-mail within 3 days. If you don't   ]
[ get a response by then, I probably didn't get your e-mail. ]
[ Unsolicited commercial and junk e-mail will be proof-read for US$100 ]

"The most likely way for the world to be destroyed, most experts agree, is by
   accident.  That's where we come in; we're computer professionals.  We cause
   accidents."
   - Nathaniel Borenstein

--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: