procmail
[Top] [All Lists]

Re: When is a .forward not a .forward

1997-12-06 13:07:45
On Sat, 6 Dec 1997 13:43:22 -0600 (CST) "David W. Tamkin" wrote
Chris Mikkelson wrote,

| A *hard* link is completely indistinguishable from the original file.

Well, let's say that a hard link to a file is completely indistinguishable
from any other hard link to the same file, and it is impossible to tell
whether a given name is the one under which the file was created or one to
which it was later hard-linked.

However, a file hard-linked to two or more names is very distinguishable from
a file with only one (hard) link, and procmail, for example, will not deliver
to a plain folder that has two or more hard links.

Good point.  I'd forgotten about the link count field in the inode.

Then again, its reasons for doing that have to do with writing, not reading,
so they wouldn't be logical as reasons for an MTA not to trust a .forward
with two or more hard links.

I suppose, the reasoning behind procmail's folder policy is that
procmail locks the file by name, not inode. Hence it cannot guarantee
mutual exclusion for access to a file which has multiple names.

My understanding of the .forward policy is that a symlink need not
share the permissions of its target.  Therefore somebody's .forward
symlink could have proper permissions, while it's target could be
writable by others.  This would allow anybody with the write
permissions to execute any program (potentially) from the user's
.forward file.

Two hard links share the same permission, so this argument doesn't
hold.

-- 
Chris Mikkelson                 
mikk0022(_at_)maroon(_dot_)tc(_dot_)umn(_dot_)edu
U of M Tuba and Student    "Life is too short for windows..."
'94-present