check access rights of maildir dirs (must be readable/writable)
authorMiloš Mulač <mulac@civ.zcu.cz>
Mon, 31 Jul 2006 14:20:48 +0000 (14:20 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Mon, 31 Jul 2006 14:20:48 +0000 (14:20 +0000)
org.glite.lb.common/src/lb_maildir.c

index c53123c..43df55e 100644 (file)
@@ -36,8 +36,10 @@ static int check_mkdir(const char *dir)
                }
                else return 1;
        }
-       else if (S_ISDIR(sbuf.st_mode)) return 0;
-       else return 1;
+       
+       if (!S_ISDIR(sbuf.st_mode)) return 1;
+
+       if (access(dir, R_OK | W_OK)) return 1;
 
        return 0;
 }