Subject: Strange lock problems in /tmp

From: [email-masked] (Gregory Tucker-Kellogg)
Date: 11 Nov 1996 16:44:19 GMT

A while ago I wrote about upgrading pine to v 3.95 on our Sun (SunOS
4.1).  At the time I had the problem of a read-only INBOX which was
fixed by following the suggestion of Mark Crispin, who wrote:

> Second thing to try: as root, do: rm /tmp/.*

Thanks Mark!

Now I've installed pine for other users, and one of them just reported
the same problem.  I looked in /tmp, but *none* of the files there
were owned by him.  I noticed two old files, something like

----------   1 foo      cell           5 Nov  5 11:34 .706.11d33
----------   1 bar      cell           5 Nov  5 12:26 .706.11c06

which appeared to have come from old pine sessions.  After deleting
these, the user in question was able to open his INBOX properly.

How is it that a pre-existing file not owned by a user is able to
affect that user's ability to properly open a mailbox lock?

Greg

--
Gregory Tucker-Kellogg
Department of Biological Chemistry and Molecular Pharmacology
Harvard Medical School, Boston MA 02115
"Mojo Dobro"    Finger for PGP info

---

From: Mark Crispin <[email-masked]>
Date: Mon, 11 Nov 1996 10:38:43 -0800

The lock files on /tmp control locking between multiple copies of Pine or
imapd (as opposed to the .lock files which control locking with sendmail).
The /tmp lock files are assigned a name based upon the device and inode
number of the file (to handle the case of hard links).  This wouldn't have
to be done if UNIX had real locking, but UNIX doesn't.

A lock file with protection 000 (as in your example) is a bug.  That
should not happen in current versions of Pine, although some older
versions of Pine had this problem.  Were the files really from Nov 5, or
were they much older?  Does your system clear /tmp as part of its reboot
procedure (it should)?

> affect that user's ability to properly open a mailbox lock?

-- Mark --	Read http://www.imap.org for the "best kept secret in email"

DoD #0105, R90/6 pilot, FAX: (206) 685-4045  ICBM: N 47 39'35" W 122 18'39"
Science does not emerge from voting, party politics, or public debate.