It's garbage. From open(2):

I think it's a bitmap of all of the flags. But I'm a bit confused by the truss output.


 mode  must  be specified when O_CREAT is in the flags, and
       is ignored otherwise.

You noted that my previous email included the patch that causes a lock file to be created for me? Specifying flags 0600 seems to have done the right thing in this case.


Here's something interesting. Running this test program:

#include <stdio.h>
#include <fcntl.h>
#include <errno.h>

int main() {
if (open("/tmp/lockfile",O_WRONLY|O_CREAT|O_EXCL, 017777763300) == -1) {
perror("Failed on /tmp with flags 017777763300: ");
} else {
printf("Worked on /tmp with flags 017777763300\n");
}


if (open("/home/vqmail/lockfile",O_WRONLY|O_CREAT|O_EXCL, 017777763300) == -1) {
perror("Failed on /home/vqmail with flags 017777763300: ");
} else {
printf("Worked on /home/vqmail with flags 017777763300\n");
}


if (open("/home/vqmail/lockfile",O_WRONLY|O_CREAT|O_EXCL, 0600) == -1) {
perror("Failed on /home/vqmail with flags 0600: ");
} else {
printf("Worked on /home/vqmail with flags 0600\n");
}
}

Produces this output: Worked on /tmp with flags 017777763300 Failed on /home/vqmail with flags 017777763300: : Permission denied Worked on /home/vqmail with flags 0600

/home/vqmail is NFS mounted. Those flags are doing something that NFS doesn't like (some locking problem?)

Unrelated question, I note that cache files aren't created for IMAP
folders other than the main folder.  Is this by design?  I see an
attempt to open a cache, but one is not created.

Perhaps this problem is related. What does the strace say here?

It attempts a stat(), attempts an open(), fails with ENOENT, and doesn't try to create a cache. Here's a truss after removing the inbox cache, showing the inbox cache being created and the folder caches not being created (gathered with "grep cache outfile"):


19290:  open("./bincimap-cache", O_RDONLY)              Err#2 ENOENT
19290:  lstat("./bincimap-cachengaqRL", 0xFFFFFFFF7FFFDF60) Err#2 ENOENT
19290:  open("./bincimap-cachengaqRL", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
19290:  rename("./bincimap-cachengaqRL", "./bincimap-cache") = 0
19294:  stat(".apache/bincimap-cache", 0xFFFFFFFF7FFFED80) Err#2 ENOENT
19294:  open(".apache/bincimap-cache", O_RDONLY)        Err#2 ENOENT

Thanks.
 - Jason

--

Saffron Solutions, LLC  <http://www.saffron.net>  
        System, Network, and Security Consulting
        E-Commerce, Web Site, and E-Mail Hosting



Reply via email to