fetchmail-friends
[Top] [All Lists]

[fetchmail] [Malcolm Preen <sonic(_at_)spamcop(_dot_)net>] Bug#177128: fetchmail initialisation fails on AIX 5.2 on JFS2 filesystem

2003-01-17 05:04:27

Hi friends,

here is another bug report I received.  I don't know why I received it
since this is related to AIX and not to Debian.  So, I cannot
reproduce nor comment it.  As it contains a fix, you may find it
useful.

Cheers,
Benjamin


--- Begin Message ---
Package: fetchmail
Version: 6.2.1

Operating system: AIX
Version: 5.2

When running fetchmail on the above system, when the home directory of the user
is on a JFS2 filesystem, the program fails to run. It reports the error;

"File .fetchmailrc must have no more than -rwx--x--- (0710) permissions."

ls -l shows that the permissions on the file in question are 400, so SHOULD be
OK.

Debugging shows that the statbug.st_mode field contains 32 bits on AIX, and the
most significant bits are reserved for system use.

If the filesystem in question is JFS rather than JFS2 it works as expected (ie
the top 16 bits are all zero), but when the filesystem is JFS2 the bit pattern
is 0000 0000 0000 0010.

This causes the line;

if (statbuf.st_mode & ~(S_IFREG | S_IREAD | S_IWRITE | S_IEXEC | S_IXGRP))

to fail, as it does not mask out the most significant 16 bits.

Interestingly, moving the .fetchmailrc file to an alternate name just returns a;

"fetchmail: no mailservers have been specified"

Running fetchmailconf runs as expected, creates a new .fetchmailrc, which fails
as above.

There are, as far as I can see, two options....

- use JFS and not JFS2 filesystems
- mask out the most significant 16 bits (reserved for system use) before doing
the comparison.

If there is anymore information required, please feel to reply.

Malcolm
-- 
Malcolm - Great Britain Old Timers #32 - 19/Apr/2002 GB 5 HC Paris 4
Goaltending is 90% mental, the other 10% is in your head (ICQ#8195978)
Hockey Results & Tables: http://homepages.tcp.co.uk/~sonic/hockey.html




--- End Message ---

Attachment: pgpIZNVBOmk2e.pgp
Description: PGP signature



-- 
  .''`.
 ; ;' ;      Debian GNU/Linux     |   Benjamin Drieu
 `. `'    http://www.debian.org/  |  <benj(_at_)debian(_dot_)org>
   `-    
<Prev in Thread] Current Thread [Next in Thread>