check access rights of maildir dirs
authorMiloš Mulač <mulac@civ.zcu.cz>
Tue, 15 Aug 2006 11:58:13 +0000 (11:58 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Tue, 15 Aug 2006 11:58:13 +0000 (11:58 +0000)
org.glite.lb.common/src/lb_maildir.c

index ede0b3d..8f48c49 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;
 }