mbfile check directory test is improved

This commit is contained in:
Michiel Broek 2002-04-22 21:09:05 +00:00
parent 24f0892f8d
commit d03a7e2b72

View File

@ -145,6 +145,7 @@ void Check(void)
WriteError("No others read access in %s, mode is %04o", area.Path, stb.st_mode & 0x1ff); WriteError("No others read access in %s, mode is %04o", area.Path, stb.st_mode & 0x1ff);
} }
if (Fix) { if (Fix) {
iErrors++;
if (chmod(area.Path, 0775)) if (chmod(area.Path, 0775))
WriteError("Could not set mode to 0775"); WriteError("Could not set mode to 0775");
else else
@ -162,6 +163,7 @@ void Check(void)
Fix = TRUE; Fix = TRUE;
} }
if (Fix) { if (Fix) {
iErrors++;
pw = getpwnam((char *)"mbse"); pw = getpwnam((char *)"mbse");
gr = getgrnam((char *)"bbs"); gr = getgrnam((char *)"bbs");
if (chown(area.Path, pw->pw_gid, gr->gr_gid)) if (chown(area.Path, pw->pw_gid, gr->gr_gid))